Re: [RFC PATCH 3/7] x86: Grant AMX permission for guest

2022-01-21 Thread Yang Zhong
On Tue, Jan 18, 2022 at 02:06:55PM +0100, Paolo Bonzini wrote: > Sorry, hit send on the wrong window. This is the only patch that > will require a bit more work. > > On 1/18/22 13:52, Paolo Bonzini wrote: > >>@@ -124,6 +150,8 @@ void x86_cpus_init(X86MachineState *x86ms, > >>int

Re: [RFC PATCH 3/7] x86: Grant AMX permission for guest

2022-01-18 Thread Paolo Bonzini
Sorry, hit send on the wrong window. This is the only patch that will require a bit more work. On 1/18/22 13:52, Paolo Bonzini wrote: @@ -124,6 +150,8 @@ void x86_cpus_init(X86MachineState *x86ms, int default_cpu_version)   MachineState *ms = MACHINE(x86ms);   MachineClass *mc =

Re: [RFC PATCH 3/7] x86: Grant AMX permission for guest

2022-01-18 Thread Paolo Bonzini
On 1/7/22 10:31, Yang Zhong wrote: +static void x86_xsave_req_perm(void) +{ +unsigned long bitmask; + +long rc = syscall(SYS_arch_prctl, ARCH_REQ_XCOMP_GUEST_PERM, + XSTATE_XTILE_DATA_BIT); +if (rc) { +/* + * The older kernel version(<5.15) can't

Re: [RFC PATCH 3/7] x86: Grant AMX permission for guest

2022-01-10 Thread Yang Zhong
On Mon, Jan 10, 2022 at 04:36:13PM +0800, Tian, Kevin wrote: > > From: Zhong, Yang > > Sent: Friday, January 7, 2022 5:32 PM > > > > Kernel mechanism for dynamically enabled XSAVE features > > there is no definition of "dynamically-enabled XSAVE features). > Thanks! > > asks userspace VMM

RE: [RFC PATCH 3/7] x86: Grant AMX permission for guest

2022-01-10 Thread Tian, Kevin
> From: Zhong, Yang > Sent: Friday, January 7, 2022 5:32 PM > > Kernel mechanism for dynamically enabled XSAVE features there is no definition of "dynamically-enabled XSAVE features). > asks userspace VMM requesting guest permission if it wants > to expose the features. Only with the

[RFC PATCH 3/7] x86: Grant AMX permission for guest

2022-01-07 Thread Yang Zhong
Kernel mechanism for dynamically enabled XSAVE features asks userspace VMM requesting guest permission if it wants to expose the features. Only with the permission, kernel can try to enable the features when detecting the intention from guest in runtime. Qemu should request the permission for