lkml.org 
[lkml]   [2020]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] KVM: VMX: Use wrapper macro ~RMODE_GUEST_OWNED_EFLAGS_BITS directly
Date
Paolo Bonzini <pbonzini@redhat.com> wrote:
>On 05/03/20 03:35, linmiaohe wrote:
>> (X86_EFLAGS_IOPL | X86_EFLAGS_VM) indicates the eflag bits that can
>> not be owned by realmode guest, i.e. ~RMODE_GUEST_OWNED_EFLAGS_BITS.
>
>... but ~RMODE_GUEST_OWNED_EFLAGS_BITS is the bits that are owned by the host; they could be 0 or 1 and that's why the code was using X86_EFLAGS_IOPL | X86_EFLAGS_VM.
>
>I understand where ~RMODE_GUEST_OWNED_EFLAGS_BITS is better than X86_EFLAGS_IOPL | X86_EFLAGS_VM, but I cannot think of a way to express it that is the best of both worlds.
>

Define a macro RMODE_HOST_OWNED_EFLAGS_BITS for (X86_EFLAGS_IOPL | X86_EFLAGS_VM) as suggested by Vitaly seems a good way to fix this ? Thanks.

\
 
 \ /
  Last update: 2020-03-06 03:18    [W:0.043 / U:3.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site