[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/6] i386/cpu: add IsDefined flag to smp-cache property
From: |
Zhao Liu |
Subject: |
Re: [PATCH v3 2/6] i386/cpu: add IsDefined flag to smp-cache property |
Date: |
Sat, 12 Oct 2024 17:50:26 +0800 |
Hi Alireze,
On Thu, Oct 10, 2024 at 12:18:18PM +0100, Alireza Sanaee wrote:
> Date: Thu, 10 Oct 2024 12:18:18 +0100
> From: Alireza Sanaee <alireza.sanaee@huawei.com>
> Subject: [PATCH v3 2/6] i386/cpu: add IsDefined flag to smp-cache property
> X-Mailer: git-send-email 2.34.1
>
> 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.
>
> 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;
>
> /**
Thanks for your patch, now I've added this commit in my series to
resolve my TODO, which can also help your series be more ARM-focused :).
I will post my next version soon.
Thanks,
Zhao
- [RFC PATCH v3 0/6] Specifying cache topology on ARM, Alireza Sanaee, 2024/10/10
- [PATCH v3 1/6] bios-tables-test: prepare to change ARM ACPI virt PPTT, Alireza Sanaee, 2024/10/10
- [PATCH v3 2/6] i386/cpu: add IsDefined flag to smp-cache property, Alireza Sanaee, 2024/10/10
- Re: [PATCH v3 2/6] i386/cpu: add IsDefined flag to smp-cache property,
Zhao Liu <=
- [PATCH v3 3/6] target/arm/tcg: increase cache level for cpu=max, Alireza Sanaee, 2024/10/10
- [PATCH v3 4/6] hw/acpi: add cache hierarchy node to pptt table, Alireza Sanaee, 2024/10/10
- [PATCH v3 5/6] tests/qtest/bios-table-test: testing new ARM ACPI PPTT topology, Alireza Sanaee, 2024/10/10
- [PATCH v3 6/6] Update the ACPI tables according to the acpi aml_build change, also empty bios-tables-test-allowed-diff.h., Alireza Sanaee, 2024/10/10