qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: Alireza Sanaee <alireza.sanaee@huawei.com>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	zhenyu.z.wang@intel.com, dapeng1.mi@linux.intel.com,
	yongwei.ma@intel.com, armbru@redhat.com, farman@linux.ibm.com,
	peter.maydell@linaro.org, mst@redhat.com, anisinha@redhat.com,
	shannon.zhaosl@gmail.com, imammedo@redhat.com,
	mtosatti@redhat.com, berrange@redhat.com,
	richard.henderson@linaro.org, linuxarm@huwei.com,
	shameerali.kolothum.thodi@huawei.com,
	Jonathan.Cameron@huawei.com, jiangkunkun@huawei.comi,
	zhao1.liu@intel.com
Subject: Re: [PATCH 2/5] i386/cpu: add IsDefined flag to smp-cache property
Date: Mon, 7 Oct 2024 20:01:32 +0800	[thread overview]
Message-ID: <ZwPNnLE1ZmsNWTQA@intel.com> (raw)
In-Reply-To: <20240912133829.400-3-alireza.sanaee@huawei.com>

Hi Ali,

On Thu, Sep 12, 2024 at 02:38:26PM +0100, Alireza Sanaee wrote:
> Date: Thu, 12 Sep 2024 14:38:26 +0100
> From: Alireza Sanaee <alireza.sanaee@huawei.com>
> Subject: [PATCH 2/5] 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!

I'd add the flag "has_caches" in SMPCompatProps.
I could pick this patch into my next version and remove my "TODO". :-)

Regards,
Zhao




  parent reply	other threads:[~2024-10-07 11:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12 13:38 [RFC PATCH 0/5] Specifying cache topology on ARM Alireza Sanaee via
2024-09-12 13:38 ` [PATCH 1/5] bios-tables-test: prepare to change ARM ACPI virt PPTT Alireza Sanaee via
2024-09-12 13:38 ` [PATCH 2/5] i386/cpu: add IsDefined flag to smp-cache property Alireza Sanaee via
2024-09-13 10:21   ` Jonathan Cameron via
2024-09-13 13:26     ` Alireza Sanaee via
2024-10-07 12:01   ` Zhao Liu [this message]
2024-09-12 13:38 ` [PATCH 3/5] target/arm/tcg: increase cache level for cpu=max Alireza Sanaee via
2024-09-12 13:38 ` [PATCH 4/5] hw/acpi: add cache hierarchy node to pptt table Alireza Sanaee via
2024-09-12 13:38 ` [PATCH 5/5] tests/acpi/arm/virt/PPTT: update golden masters for PPTT update Alireza Sanaee via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZwPNnLE1ZmsNWTQA@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=alireza.sanaee@huawei.com \
    --cc=anisinha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=farman@linux.ibm.com \
    --cc=imammedo@redhat.com \
    --cc=jiangkunkun@huawei.comi \
    --cc=linuxarm@huwei.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=shannon.zhaosl@gmail.com \
    --cc=yongwei.ma@intel.com \
    --cc=zhenyu.z.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).