lkml.org 
[lkml]   [2026]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] KVM: TDX: Disable pmu virtualization for TDX VMs
On Wed, May 6, 2026 at 4:56 PM Huang, Kai <kai.huang@intel.com> wrote:
>
> On Wed, 2026-05-06 at 16:03 -0700, Sean Christopherson wrote:
> > The question then becomes, do we keep patch 1 and also clear enable_pmu in tdx.c,
> > or do we keep the ordering and have kvm_arch_init_vm() consume has_protected_pmu?
> > Neither one is particularly awesome :-/
>
> Maybe keeping patch 1 is slightly better? This allows the vm_init() to toggle
> all the values and flags that the default ones don't fit. If we go with latter,
> when there's similar cases where we need more flags, then kvm_arch_init_vm()
> needs to consume more flags.

For now I have sent a v2 without moving around the default flags. It's
definitely better to move them up as done in patch1, but I think its
ok to keep the flow unchanged untill we have a more concrete reason to
do the move.

>
> This is also consistent with how KVM sets the existing kvm-
> >arch.shadow_mmio_value: KVM sets the default in kvm_arch_init_vm() ->
> kvm_mmu_init_vm(), and then TDX changes it to other values in tdx_vm_init().

\
 
 \ /
  Last update: 2026-05-07 02:41    [W:0.071 / U:21.619 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog