Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
- index b3d6e32..ede3fde 100644
- --- a/xen/arch/x86/x86_64/entry.S
- +++ b/xen/arch/x86/x86_64/entry.S
- @@ -52,6 +52,15 @@ restore_all_guest:
- movq 8(%rsp),%rcx # RIP
- movq 24(%rsp),%r11 # RFLAGS
- movq 32(%rsp),%rsp # RSP
- +
- + cmp $135792468, %rax # IF this is dummy hvc
- + jne orig_out
- + rdtsc
- + shl $0x20, %rdx
- + OR %rax, %rdx
- + movq $135792469, %rax
- +
- +orig_out:
- je 1f
- sysretq
- 1: sysretl
- @@ -120,6 +129,14 @@ restore_all_xen:
- * the space left by the trampoline.
- */
- ENTRY(syscall_enter)
- + cmp $39, %rax # IF this is dummy hvc
- + jne orig_syscall_enter
- + rdtsc
- + shl $0x20, %rdx
- + OR %rax, %rdx
- + movq $39, %rax
- +
- +orig_syscall_enter:
- sti
- movl $FLAT_KERNEL_SS,24(%rsp)
- pushq %rcx
- @@ -772,6 +789,7 @@ ENTRY(hypercall_table)
- .quad do_domctl
- .quad do_kexec_op
- .quad do_tmem_op
- + .quad do_dummy_hyp /* 39 */
- .rept __HYPERVISOR_arch_0-((.-hypercall_table)/8)
- .quad do_ni_hypercall
- .endr
- @@ -821,6 +839,7 @@ ENTRY(hypercall_args_table)
- .BYTE 1 /* do_domctl */
- .BYTE 2 /* do_kexec */
- .BYTE 1 /* do_tmem_op */
- + .BYTE 0 /* do_dummy_hyp */
- .rept __HYPERVISOR_arch_0-(.-hypercall_args_table)
- .BYTE 0 /* do_ni_hypercall */
- .endr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement