Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257969
b: refs/heads/master
c: 5e520e6
h: refs/heads/master
i:
  257967: fd2739c
v: v3
  • Loading branch information
Avi Kivity committed Jul 12, 2011
1 parent 0bbd57f commit 022f8b1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b105ca2903b84f023c49965d9a511c5e55256dc
refs/heads/master: 5e520e62787afd8fc28626fd8d4f77491135119d
6 changes: 5 additions & 1 deletion trunk/arch/x86/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -830,11 +830,12 @@ enum {
asmlinkage void kvm_spurious_fault(void);
extern bool kvm_rebooting;

#define __kvm_handle_fault_on_reboot(insn) \
#define ____kvm_handle_fault_on_reboot(insn, cleanup_insn) \
"666: " insn "\n\t" \
"668: \n\t" \
".pushsection .fixup, \"ax\" \n" \
"667: \n\t" \
cleanup_insn "\n\t" \
"cmpb $0, kvm_rebooting \n\t" \
"jne 668b \n\t" \
__ASM_SIZE(push) " $666b \n\t" \
Expand All @@ -844,6 +845,9 @@ extern bool kvm_rebooting;
_ASM_PTR " 666b, 667b \n\t" \
".popsection"

#define __kvm_handle_fault_on_reboot(insn) \
____kvm_handle_fault_on_reboot(insn, "")

#define KVM_ARCH_WANT_MMU_NOTIFIER
int kvm_unmap_hva(struct kvm *kvm, unsigned long hva);
int kvm_age_hva(struct kvm *kvm, unsigned long hva);
Expand Down
8 changes: 5 additions & 3 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
#include "trace.h"

#define __ex(x) __kvm_handle_fault_on_reboot(x)
#define __ex_clear(x, reg) \
____kvm_handle_fault_on_reboot(x, "xor " reg " , " reg)

MODULE_AUTHOR("Qumranet");
MODULE_LICENSE("GPL");
Expand Down Expand Up @@ -587,10 +589,10 @@ static inline void ept_sync_individual_addr(u64 eptp, gpa_t gpa)

static unsigned long vmcs_readl(unsigned long field)
{
unsigned long value = 0;
unsigned long value;

asm volatile (__ex(ASM_VMX_VMREAD_RDX_RAX)
: "+a"(value) : "d"(field) : "cc");
asm volatile (__ex_clear(ASM_VMX_VMREAD_RDX_RAX, "%0")
: "=a"(value) : "d"(field) : "cc");
return value;
}

Expand Down

0 comments on commit 022f8b1

Please sign in to comment.