From: Mingwei Zhang <mizhang@google.com>
To: "Chang S. Bae" <chang.seok.bae@intel.com>
Cc: Aaron Lewis <aaronlewis@google.com>, "Christopherson,,
Sean" <seanjc@google.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"jmattson@google.com" <jmattson@google.com>,
Thomas Gleixner <tglx@linutronix.de>, "bp@suse.de" <bp@suse.de>
Subject: Re: [PATCH v2 1/6] KVM: x86: Clear all supported MPX xfeatures if they are not all set
Date: Thu, 12 Jan 2023 19:17:03 +0000 [thread overview]
Message-ID: <Y8Bcr9VBA/VLjAwd@google.com> (raw)
In-Reply-To: <a1308e46-c319-fb73-1fde-eb3b071c10e8@intel.com>
On Thu, Jan 12, 2023, Chang S. Bae wrote:
> On 1/12/2023 10:21 AM, Mingwei Zhang wrote:
> >
> > Hmm. Given that XFEATURE_XTILE_DATA is a dynamic feature, that means
> > XFEATURE_XTILE_CFG could be set without XFEATURE_XTILE_DATA.
>
> No, XCR0 is different from the IA32_XFD MSR. Check this in the SDM -- Vol.1
> 13.3 "Enabling the XSAVE Feature Set and XSAVE-Enabled Features":
>
> "In addition, executing the XSETBV instruction causes a general-
> protection fault (#GP) if ECX = 0 and EAX[17] ≠ EAX[18] (TILECFG and
> TILEDATA must be enabled together). This implies that the value of
> XCR0[18:17] is always either 00b or 11b."
>
> Thanks,
> Chang
Hmm. Make sense. The proper execution of XSETBV was the key point of the
patch. But the permitted_xcr0 and supported_xcr0 seems never used
directly as the parameter of XSETBV, but only for size calculation.
One more question: I am very confused by the implementation of
xstate_get_guest_group_perm(). It seems fetching the xfeatures from the
host process (¤t->group_leader->thread.fpu). Is this intentional?
Does that mean in order to enable AMX in the guest we have to enable it
on the host process first?
next prev parent reply other threads:[~2023-01-12 19:26 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-30 16:24 [PATCH v2 0/6] Clean up the supported xfeatures Aaron Lewis
2022-12-30 16:24 ` [PATCH v2 1/6] KVM: x86: Clear all supported MPX xfeatures if they are not all set Aaron Lewis
2023-01-02 15:03 ` Xiaoyao Li
2023-01-03 18:47 ` Sean Christopherson
2023-01-03 18:46 ` Sean Christopherson
2023-01-10 14:49 ` Aaron Lewis
2023-01-10 18:32 ` Chang S. Bae
2023-01-12 18:21 ` Mingwei Zhang
2023-01-12 18:44 ` Chang S. Bae
2023-01-12 19:17 ` Mingwei Zhang [this message]
2023-01-12 20:31 ` Chang S. Bae
2023-01-12 21:21 ` Mingwei Zhang
2023-01-12 21:33 ` Chang S. Bae
2023-01-13 0:25 ` Mingwei Zhang
2023-01-13 14:43 ` Aaron Lewis
2023-01-17 20:32 ` Chang S. Bae
2023-01-17 22:39 ` Mingwei Zhang
2023-01-18 0:34 ` Chang S. Bae
2022-12-30 16:24 ` [PATCH v2 2/6] KVM: x86: Clear all supported AVX-512 " Aaron Lewis
2023-01-04 16:33 ` Sean Christopherson
2023-01-04 16:39 ` Sean Christopherson
2022-12-30 16:24 ` [PATCH v2 3/6] KVM: x86: Clear all supported AMX " Aaron Lewis
2022-12-30 16:24 ` [PATCH v2 4/6] KVM: selftests: Hoist XGETBV and XSETBV to make them more accessible Aaron Lewis
2022-12-30 16:24 ` [PATCH v2 5/6] KVM: selftests: Add XFEATURE masks to common code Aaron Lewis
2023-01-04 16:43 ` Sean Christopherson
2022-12-30 16:24 ` [PATCH v2 6/6] KVM: selftests: Add XCR0 Test Aaron Lewis
2023-01-04 17:13 ` Sean Christopherson
2023-01-05 22:46 ` Aaron Lewis
2023-01-05 23:10 ` 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=Y8Bcr9VBA/VLjAwd@google.com \
--to=mizhang@google.com \
--cc=aaronlewis@google.com \
--cc=bp@suse.de \
--cc=chang.seok.bae@intel.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
/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 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.