From: "Huang, Kai" <kai.huang@intel.com>
To: "Christopherson,, Sean" <seanjc@google.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] KVM: VMX: Don't rely _only_ on CPUID to enforce XCR0 restrictions for ECREATE
Date: Thu, 20 Apr 2023 10:55:22 +0000 [thread overview]
Message-ID: <f9eac75ac315070db68a76454e9430ed11398ccf.camel@intel.com> (raw)
In-Reply-To: <6f7611300b3d2dfacd1399ccf4a2fdc1dd50b20f.camel@intel.com>
> >
> > Oooh, right. It's not that FP+SSE are always allowed, it's that FP+SSE must always
> > be _set_. So this?
> >
> > xfrm & ~(vcpu->arch.guest_supported_xcr0 | XFEATURE_MASK_FPSSE) ||
> > (xfrm & XFEATURE_MASK_FPSSE) != XFEATURE_MASK_FPSSE
>
> Looks good.
>
> I'll try to get some test done with this code change.
>
Tested this series with your above code change by running simple SGX app in the
guest.
For this particular case, tested with ECREATE with xfrm = 0x1 in the guest, and
guest can receive #GP.
So for the entire series:
Reviewed-by: Kai Huang <kai.huang@intel.com>
Tested-by: Kai Huang <kai.huang@intel.com>
>
next prev parent reply other threads:[~2023-04-20 10:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-05 0:59 [PATCH 0/3] KVM: x86: SGX vs. XCR0 cleanups Sean Christopherson
2023-04-05 0:59 ` [PATCH 1/3] KVM: VMX: Don't rely _only_ on CPUID to enforce XCR0 restrictions for ECREATE Sean Christopherson
2023-04-05 10:52 ` Huang, Kai
2023-04-06 1:44 ` Sean Christopherson
2023-04-06 3:02 ` Huang, Kai
2023-04-06 19:12 ` Sean Christopherson
2023-04-12 10:12 ` Huang, Kai
2023-04-20 10:55 ` Huang, Kai [this message]
2023-04-05 0:59 ` [PATCH 2/3] KVM: x86: Don't adjust guest's CPUID.0x12.1 (allowed SGX enclave XFRM) Sean Christopherson
2023-04-05 0:59 ` [PATCH 3/3] KVM: x86: Open code supported XCR0 calculation in kvm_vcpu_after_set_cpuid() Sean Christopherson
2023-04-05 3:05 ` [PATCH 0/3] KVM: x86: SGX vs. XCR0 cleanups Huang, Kai
2023-04-05 9:44 ` Huang, Kai
2023-04-06 2:10 ` Sean Christopherson
2023-04-06 10:01 ` Zhi Wang
2023-04-12 12:07 ` Huang, Kai
2023-04-12 15:22 ` Sean Christopherson
2023-04-13 0:20 ` Huang, Kai
2023-04-13 22:48 ` Sean Christopherson
2023-04-14 13:42 ` Huang, Kai
2023-04-16 6:36 ` Zhi Wang
2023-04-13 6:07 ` Zhi Wang
2023-04-12 12:15 ` Huang, Kai
2023-04-12 14:57 ` Sean Christopherson
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9eac75ac315070db68a76454e9430ed11398ccf.camel@intel.com \
--to=kai.huang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®