Re: [PATCH] KVM: VMX: Use wrapper macro ~RMODE_GUEST_OWNED_EFLAGS_BITS directly

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

 



Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> writes:
>linmiaohe <linmiaohe@xxxxxxxxxx> writes:
>
>> From: Miaohe Lin <linmiaohe@xxxxxxxxxx>
>>
>>  
>>  	vmcs_writel(GUEST_RFLAGS, flags);
>>  	vmcs_writel(GUEST_CR4, vmcs_readl(GUEST_CR4) | X86_CR4_VME);
>
>Double negations are evil, let's define a macro for 'X86_EFLAGS_IOPL | X86_EFLAGS_VM' instead (completely untested):

You catch the evil guys again. :) But ~RMODE_GUEST_OWNED_EFLAGS_BITS is used by many other func, we should fix them
together. Would try your version, many thanks!

>
>
>-       flags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM;
>+       flags |= RMODE_HOST_OWNED_EFLAGS_BITS;
> 
>        vmcs_writel(GUEST_RFLAGS, flags);
>        vmcs_writel(GUEST_CR4, vmcs_readl(GUEST_CR4) | X86_CR4_VME);
>



[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