Re: [RFC 4/8] hw/core: Add cache topology options in -smp

2024-02-28 Thread Zhao Liu
Hi JeeHeng, > > diff --git a/hw/core/machine.c b/hw/core/machine.c > > index 426f71770a84..cb5173927b0d 100644 > > --- a/hw/core/machine.c > > +++ b/hw/core/machine.c > > @@ -886,6 +886,10 @@ static void machine_get_smp(Object *obj, Visitor *v, > > const char *name, > > .has_cores = true

RE: [RFC 4/8] hw/core: Add cache topology options in -smp

2024-02-27 Thread JeeHeng Sia
> -Original Message- > From: Zhao Liu > Sent: Tuesday, February 20, 2024 5:25 PM > To: Daniel P . Berrangé ; Eduardo Habkost > ; Marcel Apfelbaum > ; Philippe Mathieu-Daudé ; > Yanan Wang ; > Michael S . Tsirkin ; Paolo Bonzini ; > Richard Henderson ; > Eric Blake ; Markus Armbruster

Re: [RFC 4/8] hw/core: Add cache topology options in -smp

2024-02-27 Thread Zhao Liu
On Tue, Feb 27, 2024 at 10:51:45AM +, Jonathan Cameron wrote: > Date: Tue, 27 Feb 2024 10:51:45 + > From: Jonathan Cameron > Subject: Re: [RFC 4/8] hw/core: Add cache topology options in -smp > X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) > > On Tue, 27

Re: [RFC 4/8] hw/core: Add cache topology options in -smp

2024-02-27 Thread Jonathan Cameron via
On Tue, 27 Feb 2024 17:20:25 +0800 Zhao Liu wrote: > Hi Jonathan, > > > Hi Zhao Liu > > > > I like the scheme. Strikes a good balance between complexity of description > > and systems that actually exist. Sure there are systems with more cache > > levels etc but they are rare and support can b

Re: [RFC 4/8] hw/core: Add cache topology options in -smp

2024-02-27 Thread Zhao Liu
> > > > +if (smp_cache_string_to_topology(ms, config->l1d_cache, > > > > +&ms->smp_cache.l1d, errp)) { > > > > > > Indent is to wrong opening bracket. > > > Same for other cases. > > > > Could you please educate me about the correct style here? > > I'm unsure if it should be i

Re: [RFC 4/8] hw/core: Add cache topology options in -smp

2024-02-27 Thread Daniel P . Berrangé
On Tue, Feb 27, 2024 at 05:20:25PM +0800, Zhao Liu wrote: > Hi Jonathan, > > > Hi Zhao Liu > > > > I like the scheme. Strikes a good balance between complexity of description > > and systems that actually exist. Sure there are systems with more cache > > levels etc but they are rare and support

Re: [RFC 4/8] hw/core: Add cache topology options in -smp

2024-02-27 Thread Zhao Liu
Hi Jonathan, > Hi Zhao Liu > > I like the scheme. Strikes a good balance between complexity of description > and systems that actually exist. Sure there are systems with more cache > levels etc but they are rare and support can be easily added later > if people want to model them. Thanks for yo

Re: [RFC 4/8] hw/core: Add cache topology options in -smp

2024-02-26 Thread Jonathan Cameron via
On Tue, 20 Feb 2024 17:25:00 +0800 Zhao Liu wrote: > From: Zhao Liu > > Add "l1d-cache", "l1i-cache". "l2-cache", and "l3-cache" options in > -smp to define the cache topology for SMP system. > > Signed-off-by: Zhao Liu Hi Zhao Liu I like the scheme. Strikes a good balance between complexit

Re: [RFC 4/8] hw/core: Add cache topology options in -smp

2024-02-21 Thread Zhao Liu
On Wed, Feb 21, 2024 at 01:46:21PM +0100, Markus Armbruster wrote: > Date: Wed, 21 Feb 2024 13:46:21 +0100 > From: Markus Armbruster > Subject: Re: [RFC 4/8] hw/core: Add cache topology options in -smp > > Zhao Liu writes: > > > From: Zhao Liu > > > > Add

Re: [RFC 4/8] hw/core: Add cache topology options in -smp

2024-02-21 Thread Markus Armbruster
Zhao Liu writes: > From: Zhao Liu > > Add "l1d-cache", "l1i-cache". "l2-cache", and "l3-cache" options in > -smp to define the cache topology for SMP system. > > Signed-off-by: Zhao Liu [...] > diff --git a/qapi/machine.json b/qapi/machine.json > index d0e7f1f615f3..0a923ac38803 100644 > ---