Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/xen/arch/x86/hvm/vmx/entry.S b/xen/arch/x86/hvm/vmx/entry.S
- index 664ed83..ea47a9b 100644
- --- a/xen/arch/x86/hvm/vmx/entry.S
- +++ b/xen/arch/x86/hvm/vmx/entry.S
- @@ -30,6 +30,13 @@
- #define VMLAUNCH .byte 0x0f,0x01,0xc2
- ENTRY(vmx_asm_vmexit_handler)
- + cmp $0x4b000000, %rax
- + jne .Lnormal
- + RDTSC
- + shl $0x20, %rdx
- + or %rax, %rdx
- + mov $0x4b000000, %rax
- +.Lnormal:
- push %rdi
- push %rsi
- push %rdx
- diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
- index f2554d6..e5191fe 100644
- --- a/xen/arch/x86/hvm/vmx/vmx.c
- +++ b/xen/arch/x86/hvm/vmx/vmx.c
- @@ -2955,7 +2955,14 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
- {
- int rc;
- HVMTRACE_1D(VMMCALL, regs->eax);
- + if (regs->rax == 0x4b000000)
- + {
- + regs->rdx = hvm_get_guest_tsc_fixed(v, regs->rdx);
- + rc = HVM_HCALL_completed;
- + goto skip_vmcall;
- + }
- rc = hvm_do_hypercall(regs);
- +skip_vmcall:
- if ( rc != HVM_HCALL_preempted )
- {
- update_guest_eip(); /* Safe: VMCALL */
Add Comment
Please, Sign In to add comment