lkml.org 
[lkml]   [2020]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] KVM: nVMX: set rflags to specify success in handle_invvpid() default case
On Thu, Jan 23, 2020 at 1:54 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 23/01/20 10:45, Vitaly Kuznetsov wrote:
> >>> SDM says that "If an
> >>> unsupported INVVPID type is specified, the instruction fails." and this
> >>> is similar to INVEPT and I decided to check what handle_invept()
> >>> does. Well, it does BUG_ON().
> >>>
> >>> Are we doing the right thing in any of these cases?
> >>
> >> Yes, both INVEPT and INVVPID catch this earlier.
> >>
> >> So I'm leaning towards not applying Miaohe's patch.
> >
> > Well, we may at least want to converge on BUG_ON() for both
> > handle_invvpid()/handle_invept(), there's no need for them to differ.
>
> WARN_ON_ONCE + nested_vmx_failValid would probably be better, if we
> really want to change this.
>
> Paolo

In both cases, something is seriously wrong. The only plausible
explanations are compiler error or hardware failure. It would be nice
to handle *all* such failures with a KVM_INTERNAL_ERROR exit to
userspace. (I'm also thinking of situations like getting a VM-exit for
INIT.)

\
 
 \ /
  Last update: 2020-01-23 19:23    [W:0.075 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site