[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aNJXPTMmc7QLvBek@intel.com>
Date: Tue, 23 Sep 2025 16:15:57 +0800
From: Chao Gao <chao.gao@...el.com>
To: Sean Christopherson <seanjc@...gle.com>
CC: Paolo Bonzini <pbonzini@...hat.com>, <kvm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Tom Lendacky <thomas.lendacky@....com>,
Mathias Krause <minipli@...ecurity.net>, John Allen <john.allen@....com>,
Rick Edgecombe <rick.p.edgecombe@...el.com>, Binbin Wu
<binbin.wu@...ux.intel.com>, Xiaoyao Li <xiaoyao.li@...el.com>, "Maxim
Levitsky" <mlevitsk@...hat.com>, Zhang Yi Z <yi.z.zhang@...ux.intel.com>,
"Xin Li" <xin@...or.com>
Subject: Re: [PATCH v16 24/51] KVM: nVMX: Always forward XSAVES/XRSTORS exits
from L2 to L1
On Fri, Sep 19, 2025 at 03:32:31PM -0700, Sean Christopherson wrote:
>Unconditionally forward XSAVES/XRSTORS VM-Exits from L2 to L1, as KVM
>doesn't utilize the XSS-bitmap (KVM relies on controlling the XSS value
>in hardware to prevent unauthorized access to XSAVES state). KVM always
>loads vmcs02 with vmcs12's bitmap, and so any exit _must_ be due to
>vmcs12's XSS-bitmap.
>
>Drop the comment about XSS never being non-zero in anticipation of
>enabling CET_KERNEL and CET_USER support.
>
>Opportunistically WARN if XSAVES is not enabled for L2, as the CPU is
>supposed to generate #UD before checking the XSS-bitmap.
>
>Signed-off-by: Sean Christopherson <seanjc@...gle.com>
Reviewed-by: Chao Gao <chao.gao@...el.com>
Powered by blists - more mailing lists