Lines Matching defs:val

391 	u64 val;
395 ret = rdmsrl_safe(msr, &val);
398 ret = wrmsrl_safe(msr, val);
1373 int kvm_set_dr(struct kvm_vcpu *vcpu, int dr, unsigned long val)
1379 vcpu->arch.db[array_index_nospec(dr, size)] = val;
1381 vcpu->arch.eff_db[dr] = val;
1385 if (!kvm_dr6_valid(val))
1387 vcpu->arch.dr6 = (val & DR6_VOLATILE) | kvm_dr6_fixed(vcpu);
1391 if (!kvm_dr7_valid(val))
1393 vcpu->arch.dr7 = (val & DR7_VOLATILE) | DR7_FIXED_1;
1402 void kvm_get_dr(struct kvm_vcpu *vcpu, int dr, unsigned long *val)
1408 *val = vcpu->arch.db[array_index_nospec(dr, size)];
1412 *val = vcpu->arch.dr6;
1416 *val = vcpu->arch.dr7;
2229 u64 val;
2239 if (do_get_msr(vcpu, index, &val) || *data != val)
5362 unsigned long val;
5366 kvm_get_dr(vcpu, 6, &val);
5367 dbgregs->dr6 = val;
7345 static int kvm_read_guest_virt_helper(gva_t addr, void *val, unsigned int bytes,
7350 void *data = val;
7378 gva_t addr, void *val, unsigned int bytes,
7396 ret = kvm_vcpu_read_guest_page(vcpu, gpa >> PAGE_SHIFT, val,
7405 gva_t addr, void *val, unsigned int bytes,
7417 return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access,
7423 gva_t addr, void *val, unsigned int bytes,
7434 return kvm_read_guest_virt_helper(addr, val, bytes, vcpu, access, exception);
7437 static int kvm_write_guest_virt_helper(gva_t addr, void *val, unsigned int bytes,
7442 void *data = val;
7467 static int emulator_write_std(struct x86_emulate_ctxt *ctxt, gva_t addr, void *val,
7479 return kvm_write_guest_virt_helper(addr, val, bytes, vcpu,
7483 int kvm_write_guest_virt_system(struct kvm_vcpu *vcpu, gva_t addr, void *val,
7489 return kvm_write_guest_virt_helper(addr, val, bytes, vcpu,
7572 const void *val, int bytes)
7576 ret = kvm_vcpu_write_guest(vcpu, gpa, val, bytes);
7579 kvm_page_track_write(vcpu, gpa, val, bytes);
7584 int (*read_write_prepare)(struct kvm_vcpu *vcpu, void *val,
7587 void *val, int bytes);
7589 int bytes, void *val);
7591 void *val, int bytes);
7595 static int read_prepare(struct kvm_vcpu *vcpu, void *val, int bytes)
7599 vcpu->mmio_fragments[0].gpa, val);
7608 void *val, int bytes)
7610 return !kvm_vcpu_read_guest(vcpu, gpa, val, bytes);
7614 void *val, int bytes)
7616 return emulator_write_phys(vcpu, gpa, val, bytes);
7619 static int write_mmio(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes, void *val)
7621 trace_kvm_mmio(KVM_TRACE_MMIO_WRITE, bytes, gpa, val);
7622 return vcpu_mmio_write(vcpu, gpa, bytes, val);
7626 void *val, int bytes)
7633 void *val, int bytes)
7655 static int emulator_read_write_onepage(unsigned long addr, void *val,
7684 if (!ret && ops->read_write_emulate(vcpu, gpa, val, bytes))
7690 handled = ops->read_write_mmio(vcpu, gpa, bytes, val);
7696 val += handled;
7701 frag->data = val;
7708 void *val, unsigned int bytes,
7717 ops->read_write_prepare(vcpu, val, bytes))
7727 rc = emulator_read_write_onepage(addr, val, now, exception,
7735 val += now;
7739 rc = emulator_read_write_onepage(addr, val, bytes, exception,
7757 return ops->read_write_exit_mmio(vcpu, gpa, val, bytes);
7762 void *val,
7766 return emulator_read_write(ctxt, addr, val, bytes,
7772 const void *val,
7776 return emulator_read_write(ctxt, addr, (void *)val, bytes,
7908 unsigned short port, void *val, unsigned int count)
7910 int r = emulator_pio_in_out(vcpu, size, port, val, count, true);
7912 trace_kvm_pio(KVM_PIO_IN, port, size, count, val);
7917 static void complete_emulator_pio_in(struct kvm_vcpu *vcpu, void *val)
7921 memcpy(val, vcpu->arch.pio_data, size * count);
7927 int size, unsigned short port, void *val,
7939 complete_emulator_pio_in(vcpu, val);
7943 return emulator_pio_in(vcpu, size, port, val, count);
7947 unsigned short port, const void *val,
7950 trace_kvm_pio(KVM_PIO_OUT, port, size, count, val);
7951 return emulator_pio_in_out(vcpu, size, port, (void *)val, count, false);
7956 const void *val, unsigned int count)
7958 return emulator_pio_out(emul_to_vcpu(ctxt), size, port, val, count);
8050 static int emulator_set_cr(struct x86_emulate_ctxt *ctxt, int cr, ulong val)
8057 res = kvm_set_cr0(vcpu, mk_cr_64(kvm_read_cr0(vcpu), val));
8060 vcpu->arch.cr2 = val;
8063 res = kvm_set_cr3(vcpu, val);
8066 res = kvm_set_cr4(vcpu, mk_cr_64(kvm_read_cr4(vcpu), val));
8069 res = kvm_set_cr8(vcpu, val);
8282 static void emulator_write_gpr(struct x86_emulate_ctxt *ctxt, unsigned reg, ulong val)
8284 kvm_register_write_raw(emul_to_vcpu(ctxt), reg, val);
9098 unsigned long val = kvm_rax_read(vcpu);
9099 int ret = emulator_pio_out(vcpu, size, port, &val, 1);
9122 unsigned long val;
9133 val = (vcpu->arch.pio.size < 4) ? kvm_rax_read(vcpu) : 0;
9135 complete_emulator_pio_in(vcpu, &val);
9136 kvm_rax_write(vcpu, val);
9144 unsigned long val;
9148 val = (size < 4) ? kvm_rax_read(vcpu) : 0;
9150 ret = emulator_pio_in(vcpu, size, port, &val, 1);
9152 kvm_rax_write(vcpu, val);
9303 static int kvmclock_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
9309 if (val == CPUFREQ_PRECHANGE && freq->old > freq->new)
9311 if (val == CPUFREQ_POSTCHANGE && freq->old < freq->new)
13068 u32 val;
13071 &val, offset, sizeof(val)))
13074 return !val;