[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 1/7] i386/cpu: add IsDefined flag to smp-cache property
From: |
Alireza Sanaee |
Subject: |
[PATCH v4 1/7] i386/cpu: add IsDefined flag to smp-cache property |
Date: |
Mon, 16 Dec 2024 17:54:08 +0000 |
This commit adds IsDefined flag to the object and this helps in avoiding
extra checks for every single layer of caches in both x86 and ARM.
There is already a discussion on mailing list to have this flag. A
patch that enables this flag will follow later.
Signed-off-by: Alireza Sanaee <alireza.sanaee@huawei.com>
---
hw/core/machine-smp.c | 2 ++
include/hw/boards.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/hw/core/machine-smp.c b/hw/core/machine-smp.c
index 9a28194676..5a02bbf584 100644
--- a/hw/core/machine-smp.c
+++ b/hw/core/machine-smp.c
@@ -371,6 +371,8 @@ bool machine_parse_smp_cache(MachineState *ms,
return false;
}
+ ms->smp_cache.IsDefined = true;
+
return true;
}
diff --git a/include/hw/boards.h b/include/hw/boards.h
index db2aa2b706..2883a57084 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -373,6 +373,7 @@ typedef struct CpuTopology {
typedef struct SmpCache {
SmpCacheProperties props[CACHE_LEVEL_AND_TYPE__MAX];
+ bool IsDefined;
} SmpCache;
/**
--
2.34.1
- [RFC PATCH v4 0/7] Specifying cache topology on ARM, Alireza Sanaee, 2024/12/16
- [PATCH v4 1/7] i386/cpu: add IsDefined flag to smp-cache property,
Alireza Sanaee <=
- [PATCH v4 2/7] target/arm/tcg: increase cache level for cpu=max, Alireza Sanaee, 2024/12/16
- [PATCH v4 3/7] arm/virt.c: add cache hierarchy to device tree, Alireza Sanaee, 2024/12/16
- [PATCH v4 4/7] bios-tables-test: prepare to change ARM ACPI virt PPTT, Alireza Sanaee, 2024/12/16
- [PATCH v4 5/7] hw/acpi/aml-build.c: add cache hierarchy to pptt table, Alireza Sanaee, 2024/12/16
- [PATCH v4 6/7] tests/qtest/bios-table-test: testing new ARM ACPI PPTT topology, Alireza Sanaee, 2024/12/16