aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2010-01-20 12:20:20 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 10:36:02 -0500
commitc76de350c8a3ba770becc17eaa744dc3c7642295 (patch)
treee8a50babf616fa41f39a86962f60641027996d8f /arch/x86/include
parentfd7373cce767a8803e79f51bd3fc5f531234657f (diff)
KVM: SVM: Clean up and enhance mov dr emulation
Enhance mov dr instruction emulation used by SVM so that it properly handles dr4/5: alias to dr6/7 if cr4.de is cleared. Otherwise return EMULATE_FAIL which will let our only possible caller in that scenario, ud_interception, re-inject UD. We do not need to inject faults, SVM does this for us (exceptions take precedence over instruction interceptions). For the same reason, the value overflow checks can be removed. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/kvm_host.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index a1f0b5dd7d75..d73ed48587e4 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -506,9 +506,8 @@ struct kvm_x86_ops {
506 void (*set_idt)(struct kvm_vcpu *vcpu, struct descriptor_table *dt); 506 void (*set_idt)(struct kvm_vcpu *vcpu, struct descriptor_table *dt);
507 void (*get_gdt)(struct kvm_vcpu *vcpu, struct descriptor_table *dt); 507 void (*get_gdt)(struct kvm_vcpu *vcpu, struct descriptor_table *dt);
508 void (*set_gdt)(struct kvm_vcpu *vcpu, struct descriptor_table *dt); 508 void (*set_gdt)(struct kvm_vcpu *vcpu, struct descriptor_table *dt);
509 unsigned long (*get_dr)(struct kvm_vcpu *vcpu, int dr); 509 int (*get_dr)(struct kvm_vcpu *vcpu, int dr, unsigned long *dest);
510 void (*set_dr)(struct kvm_vcpu *vcpu, int dr, unsigned long value, 510 int (*set_dr)(struct kvm_vcpu *vcpu, int dr, unsigned long value);
511 int *exception);
512 void (*cache_reg)(struct kvm_vcpu *vcpu, enum kvm_reg reg); 511 void (*cache_reg)(struct kvm_vcpu *vcpu, enum kvm_reg reg);
513 unsigned long (*get_rflags)(struct kvm_vcpu *vcpu); 512 unsigned long (*get_rflags)(struct kvm_vcpu *vcpu);
514 void (*set_rflags)(struct kvm_vcpu *vcpu, unsigned long rflags); 513 void (*set_rflags)(struct kvm_vcpu *vcpu, unsigned long rflags);