1 Sep 2009 03:14
[[PATCH v2]] VMX: Enhance invalid guest state emulation
Mohammed Gamal <m.gamal005 <at> gmail.com>
2009-09-01 01:14:45 GMT
2009-09-01 01:14:45 GMT
- Change returned handle_invalid_guest_state() to return relevant exit codes
- Move triggering the emulation from vmx_vcpu_run() to vmx_handle_exit()
- Return to userspace instead of repeatedly trying to emulate
instructions that have already failed
Signed-off-by: Mohammed Gamal <m.gamal005 <at> gmail.com>
---
arch/x86/kvm/vmx.c | 31 +++++++++++++++----------------
1 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 78101dd..34bfd87 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
<at> <at> -107,7 +107,6 <at> <at> struct vcpu_vmx {
} rmode;
int vpid;
bool emulation_required;
- enum emulation_result invalid_state_emulation_result;
/* Support for vnmi-less CPUs */
int soft_vnmi_blocked;
<at> <at> -3318,22 +3317,24 <at> <at> static int handle_nmi_window(struct kvm_vcpu *vcpu)
return 1;
}
-static void handle_invalid_guest_state(struct kvm_vcpu *vcpu)
+static int handle_invalid_guest_state(struct kvm_vcpu *vcpu)
{
- struct vcpu_vmx *vmx = to_vmx(vcpu);
(Continue reading)
RSS Feed