Messages in this thread |  | | From | "Huang, Kai" <> | | Subject | Re: [PATCH 2/2] KVM: TDX: Disable pmu virtualization for TDX VMs | | Date | Wed, 6 May 2026 23:56:09 +0000 |
| |
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.
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().
|  |