public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nakajima, Jun" <jun.nakajima@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	"Tian, Kevin" <kevin.tian@intel.com>,
	"Liu, Jing2" <jing2.liu@intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"Arjan van de Ven" <arjan@linux.intel.com>,
	Jing Liu <jing2.liu@linux.intel.com>,
	"seanjc@google.com" <seanjc@google.com>,
	"Cooper, Andrew" <andrew.cooper3@citrix.com>,
	"Bae, Chang Seok" <chang.seok.bae@intel.com>
Subject: Re: Thoughts of AMX KVM support based on latest kernel
Date: Fri, 19 Nov 2021 15:41:55 +0000	[thread overview]
Message-ID: <5ABC728C-9FD3-4BEB-BD02-61E910D69847@intel.com> (raw)
In-Reply-To: <87sfvslaha.ffs@tglx>

Hi Thomas,

> On Nov 19, 2021, at 2:13 AM, Thomas Gleixner <tglx@linutronix.de> wrote:
> 
> Jun,
> 
> On Thu, Nov 18 2021 at 23:17, Jun Nakajima wrote:
>> On Nov 17, 2021, at 4:53 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>> 
>>> It doesn't have to happen in current processors, but it should be
>>> architecturally valid behavior to clear the processor's state as soon
>>> as a bit in XFD is set to 1.
>> 
>> 3.3 RECOMMENDATIONS FOR SYSTEM SOFTWARE
>> 
>> System software may disable use of Intel AMX by clearing XCR0[18:17],
>> by clearing CR4.OSXSAVE, or by setting IA32_XFD[18]. It is recommended
>> that system software initialize AMX state (e.g., by executing
>> TILERELEASE) before doing so. This is because maintaining AMX state in
>> a non-initialized state may have negative power and performance
>> implications.
>> 
>> System software should not use XFD to implement a “lazy restore”
>> approach to management of the XTILEDATA state component. This approach
>> will not operate correctly for a variety of reasons. One is that the
>> LDTILECFG and TILERELEASE instructions initialize XTILEDATA and do not
>> cause an #NM exception. Another is that an execution of XSAVE by a
>> user thread will save XTILEDATA as initialized instead of the data
>> expected by the user thread.
> 
> Can this pretty please be reworded so that it says:
> 
>  When setting IA32_XFD[18] the AMX register state is not guaranteed to
>  be preserved. The resulting register state depends on the
>  implementation.
> 
> Also it's a real design disaster that component 17 cannot be fenced off
> via XFD. That's really inconsistent and leads exactly to this half
> defined state.
> 

I’ll work with the H/W team on those (i.e. rewording and the component 17 issue).

Thanks,
---
Jun







  reply	other threads:[~2021-11-19 15:42 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 13:01 Thoughts of AMX KVM support based on latest kernel Liu, Jing2
2021-11-16 12:18 ` Thomas Gleixner
2021-11-16 16:05   ` Sean Christopherson
2021-11-16 18:55     ` Thomas Gleixner
2021-11-16 19:49       ` Paolo Bonzini
2021-11-16 20:14         ` Sean Christopherson
2021-11-16 20:36         ` Thomas Gleixner
2021-11-16 22:11           ` Nakajima, Jun
2021-11-17  7:39           ` Paolo Bonzini
2021-11-16 20:12       ` Sean Christopherson
2021-11-16 23:35         ` Thomas Gleixner
2021-11-16 19:20 ` Thomas Gleixner
2021-11-17  4:52   ` Nakajima, Jun
2021-11-17  7:31     ` Paolo Bonzini
2021-11-17 10:15       ` Tian, Kevin
2021-11-17 12:24         ` Thomas Gleixner
2021-11-17 12:53         ` Paolo Bonzini
2021-11-18 23:17           ` Nakajima, Jun
2021-11-19 10:13             ` Thomas Gleixner
2021-11-19 15:41               ` Nakajima, Jun [this message]
2021-12-08  0:50                 ` Rewording of Setting IA32_XFD[18] (Re: Thoughts of AMX KVM support based on latest kernel) Nakajima, Jun
2021-12-08 13:57                   ` Paolo Bonzini
2021-12-10 21:53                   ` Thomas Gleixner

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=5ABC728C-9FD3-4BEB-BD02-61E910D69847@intel.com \
    --to=jun.nakajima@intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=arjan@linux.intel.com \
    --cc=chang.seok.bae@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=jing2.liu@intel.com \
    --cc=jing2.liu@linux.intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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