All of
 help / color / mirror / Atom feed
From: Paolo Bonzini <>
To: Xiaoyao Li <>,
	Like Xu <>,
	Jun Nakajima <>
Cc: Sean Christopherson <>,
	Jim Mattson <>,
	Vitaly Kuznetsov <>,
	Wanpeng Li <>,
	Joerg Roedel <>,,
Subject: Re: [DROP][PATCH] KVM: x86: Fix the #GP(0) and #UD conditions for XSETBV emulation
Date: Thu, 20 Jan 2022 10:49:00 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 1/20/22 10:31, Xiaoyao Li wrote:
>> So while my gut feeling that #UD would not cause a vmexit was correct,
>> technically I was reading the SDM incorrectly.
> SDM also states
>    Certain exceptions have priority over VM exits. These include
>    invalid-opcode exception, faults based on privilege level,
>    and general-protection exceptions that are based on checking
>    I/O permission bits in the task-state segment(TSS)
> in "Relative Priority of Faults and VM Exits"
> So my understanding is that the architectural check always takes the 
> higher priority than VM exit.

Good point!  It's right above in 25.1.1.  I was confused by the specific 
mention of GETSEC, but the reason for the footnote is because undefined 
GETSEC leaves cause a vmexit instead of #UD, and GETSEC vmexits also 
override #GP faults based on privilege level.



      reply	other threads:[~2022-01-20  9:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17  7:24 [PATCH] KVM: x86: Fix the #GP(0) and #UD conditions for XSETBV emulation Like Xu
2022-01-17  8:31 ` Paolo Bonzini
2022-01-17  9:44   ` Like Xu
2022-01-17 11:18     ` Paolo Bonzini
2022-01-20  7:48       ` [DROP][PATCH] " Like Xu
2022-01-20  9:17         ` Paolo Bonzini
2022-01-20  9:31           ` Xiaoyao Li
2022-01-20  9:49             ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.