lkml.org 
[lkml]   [2022]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH v5 027/104] KVM: TDX: initialize VM with TDX specific parameters
From
Date
On Thu, 2022-04-07 at 09:29 +0800, Xiaoyao Li wrote:
> On 4/5/2022 8:58 PM, Paolo Bonzini wrote:
> > On 3/4/22 20:48, isaku.yamahata@intel.com wrote:
> > > +    td_params->attributes = init_vm->attributes;
> > > +    if (td_params->attributes & TDX_TD_ATTRIBUTE_PERFMON) {
> > > +        pr_warn("TD doesn't support perfmon. KVM needs to save/restore "
> > > +            "host perf registers properly.\n");
> > > +        return -EOPNOTSUPP;
> > > +    }
> >
> > Why does KVM have to hardcode this (and LBR/AMX below)?  Is the level of
> > hardware support available from tdx_caps, for example through the CPUID
> > configs (0xA for this one, 0xD for LBR and AMX)?
>
> It's wrong code. PMU is allowed.
>
> AMX and LBR are disallowed because and the time we wrote the codes they
> are not supported by KVM. Now AMX should be allowed, but (arch-)LBR
> should be still blocked until KVM merges arch-LBR support.

I think Isaku's idea is we don't support them in the first submission?

If so as I suggested, we should add a TODO in comment..

\
 
 \ /
  Last update: 2022-04-07 17:29    [W:0.322 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site