diff options
author | Avi Kivity <avi@redhat.com> | 2010-12-02 10:55:23 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:30:20 -0500 |
commit | a295673aba42895997a6c1be87f467a7cfc0f332 (patch) | |
tree | da66b4023d9ea0ae58e253c1a7decfe7765a0838 | |
parent | b7c4145ba2eb0717db0ddac1b5f7f48012189c53 (diff) |
KVM: VMX: Return 0 from a failed VMREAD
If we execute VMREAD during reboot we'll just skip over it. Instead of
returning garbage, return 0, which has a much smaller chance of confusing
the code. Otherwise we risk a flood of debug printk()s which block the
reboot process if a serial console or netconsole is enabled.
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/x86/kvm/vmx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index ab05ff68bcd7..f3693ca93982 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -565,10 +565,10 @@ static inline void ept_sync_individual_addr(u64 eptp, gpa_t gpa) | |||
565 | 565 | ||
566 | static unsigned long vmcs_readl(unsigned long field) | 566 | static unsigned long vmcs_readl(unsigned long field) |
567 | { | 567 | { |
568 | unsigned long value; | 568 | unsigned long value = 0; |
569 | 569 | ||
570 | asm volatile (__ex(ASM_VMX_VMREAD_RDX_RAX) | 570 | asm volatile (__ex(ASM_VMX_VMREAD_RDX_RAX) |
571 | : "=a"(value) : "d"(field) : "cc"); | 571 | : "+a"(value) : "d"(field) : "cc"); |
572 | return value; | 572 | return value; |
573 | } | 573 | } |
574 | 574 | ||