[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z5Cr-6t469cZRTaA@tlindgre-MOBL1>
Date: Wed, 22 Jan 2025 10:27:39 +0200
From: Tony Lindgren <tony.lindgren@...ux.intel.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
Cc: "pbonzini@...hat.com" <pbonzini@...hat.com>,
"seanjc@...gle.com" <seanjc@...gle.com>,
"Huang, Kai" <kai.huang@...el.com>,
"Li, Xiaoyao" <xiaoyao.li@...el.com>,
"isaku.yamahata@...il.com" <isaku.yamahata@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"Zhao, Yan Y" <yan.y.zhao@...el.com>,
"Chatre, Reinette" <reinette.chatre@...el.com>
Subject: Re: [PATCH v2 00/25] TDX vCPU/VM creation
On Sat, Jan 04, 2025 at 01:43:56AM +0000, Edgecombe, Rick P wrote:
> On Mon, 2024-12-23 at 17:25 +0100, Paolo Bonzini wrote:
> > 11: see the type safety comment above:
> > > The ugly part here is the type-unsafety of to_vmx/to_tdx. We probably
> > > should add some "#pragma poison" of to_vmx/to_tdx: for example both can
> > > be poisoned in pmu_intel.c after the definition of
> > > vcpu_to_lbr_records(), while one of them can be poisoned in
> > > sgx.c/posted_intr.c/vmx.c/tdx.c.
>
> I left it off because you said "Not a strict requirement though." and gave it a
> RB tag. Other stuff seemed higher priority. We can look at some options for a
> follow on patch if it lightens your load.
I suggest we do this:
- Make to_kvm_tdx() and to_tdx() private to tdx.c as they're only used
in tdx.c
- Add pragma poison to_vmx at the top of tdx.c
- Add pragma poison to_vmx in pmu_intel.c after vcpu_to_lbr_records()
Other pragma poison to_vmx can be added as needed, but AFAIK there's
not need to add it for to_tdx().
Regards,
Tony
Powered by blists - more mailing lists