# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1305189239 -3600
# Node ID 955d4f369d5ac4d4392ce6ee6818c9a57abcc1c0
# Parent 0957e0c5f0e4fdeb4835da5cdeccf83bfe340597
x86/hvm: Use UNLIKELY_{START,END} in a few suitable places in asm.
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
diff -r 0957e0c5f0e4 -r 955d4f369d5a xen/arch/x86/hvm/svm/entry.S
--- a/xen/arch/x86/hvm/svm/entry.S Thu May 12 09:15:05 2011 +0100
+++ b/xen/arch/x86/hvm/svm/entry.S Thu May 12 09:33:59 2011 +0100
@@ -66,20 +66,20 @@
jnz .Lsvm_process_softirqs
testb $0, VCPU_nsvm_hap_enabled(r(bx))
- jz .Lsvm_asid_handle
-
+UNLIKELY_START(nz, nsvm_hap)
mov VCPU_nhvm_p2m(r(bx)),r(ax)
test r(ax),r(ax)
sete %al
andb VCPU_nhvm_guestmode(r(bx)),%al
jnz .Lsvm_nsvm_no_p2m
+UNLIKELY_END(nsvm_hap)
-.Lsvm_asid_handle:
call svm_asid_handle_vmrun
cmpb $0,addr_of(tb_init_done)
- jnz .Lsvm_trace
-.Lsvm_trace_done:
+UNLIKELY_START(nz, svm_trace)
+ call svm_trace_vmentry
+UNLIKELY_END(svm_trace)
mov VCPU_svm_vmcb(r(bx)),r(cx)
mov UREGS_rax(r(sp)),r(ax)
@@ -181,10 +181,6 @@
call do_softirq
jmp svm_asm_do_resume
-.Lsvm_trace:
- call svm_trace_vmentry
- jmp .Lsvm_trace_done
-
.Lsvm_nsvm_no_p2m:
/* Someone shot down our nested p2m table; go round again
* and nsvm_vcpu_switch() will fix it for us. */
diff -r 0957e0c5f0e4 -r 955d4f369d5a xen/arch/x86/hvm/vmx/entry.S
--- a/xen/arch/x86/hvm/vmx/entry.S Thu May 12 09:15:05 2011 +0100
+++ b/xen/arch/x86/hvm/vmx/entry.S Thu May 12 09:33:59 2011 +0100
@@ -132,12 +132,12 @@
testb $0xff,VCPU_vmx_emulate(r(bx))
jnz .Lvmx_goto_emulator
testb $0xff,VCPU_vmx_realmode(r(bx))
- jz .Lvmx_not_realmode
+UNLIKELY_START(nz, realmode)
cmpw $0,VCPU_vm86_seg_mask(r(bx))
jnz .Lvmx_goto_emulator
call_with_regs(vmx_enter_realmode)
+UNLIKELY_END(realmode)
-.Lvmx_not_realmode:
call vmx_vmenter_helper
mov VCPU_hvm_guest_cr2(r(bx)),r(ax)
mov r(ax),%cr2
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|