On 13/2/23 10:50, Zhao Liu wrote:
From: Zhao Liu <[email protected]>
Since X86ApicidTopoInfo is only used for APIC ID related work, the
common variable topo_info of X86ApicidTopoInfo type should be also
renamed to better suit its purpose.
Generic topology access should be obtained from MachineState.topo
(for the whole machine) or CPUState.topo (for the current CPU), and
apicid_topo (X86ApicidTopoInfo type) is only used to collaborate with
APIC ID.
Co-Developed-by: Zhuocheng Ding <[email protected]>
Signed-off-by: Zhuocheng Ding <[email protected]>
Signed-off-by: Zhao Liu <[email protected]>
---
hw/i386/x86.c | 38 ++++-----
include/hw/i386/topology.h | 76 ++++++++---------
include/hw/i386/x86.h | 2 +-
target/i386/cpu.c | 71 ++++++++--------
tests/unit/test-x86-apicid.c | 158 +++++++++++++++++------------------
5 files changed, 173 insertions(+), 172 deletions(-)
The 'id' suffix doesn't add a lot of value IMO. Anyway,
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>