Advertisement
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..f577c60 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
- + mov $0x7777, %rcx
- + RDTSC
- + shl $0x20, %rdx
- + or %rax, %rdx
- +.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..09c7f57 100644
- --- a/xen/arch/x86/hvm/vmx/vmx.c
- +++ b/xen/arch/x86/hvm/vmx/vmx.c
- @@ -2953,9 +2953,16 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
- break;
- case EXIT_REASON_VMCALL:
- {
- - int rc;
- - HVMTRACE_1D(VMMCALL, regs->eax);
- - rc = hvm_do_hypercall(regs);
- + int rc;
- + HVMTRACE_1D(VMMCALL, regs->eax);
- + if (regs->rcx == 0x7777)
- + {
- + 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 */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement