qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH RESEND 04/18] i386/cpu: Fix number of addressable IDs in CPUI


From: Xiaoyao Li
Subject: Re: [PATCH RESEND 04/18] i386/cpu: Fix number of addressable IDs in CPUID.04H
Date: Mon, 20 Feb 2023 14:59:20 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.8.0

On 2/13/2023 5:36 PM, Zhao Liu wrote:
For i-cache and d-cache, the maximum IDs for CPUs sharing cache (
CPUID.04H.00H:EAX[bits 25:14] and CPUID.04H.01H:EAX[bits 25:14]) are
both 0, and this means i-cache and d-cache are shared in the SMT level.
This is correct if there's single thread per core, but is wrong for the
hyper threading case (one core contains multiple threads) since the
i-cache and d-cache are shared in the core level other than SMT level.

Therefore, in order to be compatible with both multi-threaded and
single-threaded situations, we should set i-cache and d-cache be shared
at the core level by default.

It's true for VM only when the exactly HW topology is configured to VM. i.e., two virtual LPs of one virtual CORE are pinned to two physical LPs that of one physical CORE. Otherwise it's incorrect for VM.

for example. given a VM of 4 threads and 2 cores. If not pinning the 4 threads to physical 4 LPs of 2 CORES. It's likely each vcpu running on a LP of different physical cores. So no vcpu shares L1i/L1d cache at core level.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]