Re: [PATCH v3 05/10] target/i386/kvm: Classify PMU vendor families

Zhao Liu <[email protected]>
Newsgroups org.kernel.vger.kvm,org.nongnu.qemu-devel
Message-ID <aovY88W/[email protected]>
On Mon, Aug 24, 2026 at 12:53:09PM +0800, Tina Zhang wrote:
> Date: Mon, 24 Aug 2026 12:53:09 +0800
> From: Tina Zhang <[email protected]>
> Subject: [PATCH v3 05/10] target/i386/kvm: Classify PMU vendor families
> X-Mailer: git-send-email 2.43.7
> 
> The Intel and Zhaoxin PMU architectures are compatible, while AMD uses
> a separate PMU CPUID/MSR layout.  KVM's PMU initialization, host/guest
> compatibility, and MSR save/restore paths open-code these vendor checks
> in several places.
> 
> Introduce X86PMUVendor and helpers that classify the existing CPU and
> host vendors by PMU architecture.  Use the classification consistently
> for the compatibility check, PMU initialization, and PMU MSR paths.
> 
> This is a refactoring with no functional change.
> 
> Signed-off-by: Tina Zhang <[email protected]>
> ---
>  target/i386/kvm/kvm.c | 72 +++++++++++++++++++++++++++++++++----------
>  1 file changed, 55 insertions(+), 17 deletions(-)

Reviewed-by: Zhao Liu <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.