Re: [PATCH] KVM/nVMX: Remove uneeded forward jump in nested_vmx_check_vmentry_hw asm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/10/18 00:09, Uros Bizjak wrote:
> There is no need to jump just after the jump insn itself. Also, make
> code similar to entering guest mode in vmx_vcpu_run.
> 
> Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
> ---
>  arch/x86/kvm/vmx.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 641a65b30685..5600a01fa6d7 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -13240,13 +13240,11 @@ static int __noclone nested_vmx_check_vmentry_hw(struct kvm_vcpu *vcpu)
>  
>  		/* Check if vmlaunch of vmresume is needed */
>  		"cmpl $0, %c[launched](%0)\n\t"
> -		"je 1f\n\t"
> -		__ex("vmresume") "\n\t"
> -		"jmp 2f\n\t"
> -		"1: " __ex("vmlaunch") "\n\t"
> +		"jne 1f\n\t"
> +		__ex("vmlaunch") "\n\t"
>  		"jmp 2f\n\t"
> +		"1: " __ex("vmresume") "\n\t"
>  		"2: "
> -
>  		/* Set vmx->fail accordingly */
>  		"setbe %c[fail](%0)\n\t"
>  
> 

Queued, thanks.

Paolo



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux