mbox series

[0/3] target/i386/cpu: Misc Cleanup on host-cache-info

Message ID 20240619144215.3273989-1-zhao1.liu@intel.com
Headers show
Series target/i386/cpu: Misc Cleanup on host-cache-info | expand

Message

Zhao Liu June 19, 2024, 2:42 p.m. UTC
Hi,

This series is mainly to addresss Igor's comment about if one check in
host-cache-info could be removed [1], i.e., whether Guest's cache
topology should be self-consistent (able to correspond to Guest's CPU
topology level, as we currently do with the Guest cache topo).

I originally thought (in the mail thread with Igor) that host-cache-info
should allow Guest and Host to have the same topology level information,
e.g. if Host shares cache on core level, then via host-cache-info, Guest
should also share on core level.

But in practice, I gave up on this idea, because in the cache info
passthrough case, it should be possible for Guest to get the original
Host cache info (including the original threads sharing cache) without
further modifying the info to Guest.

Therefore, I simply added the comment in PATCH 3 to hopefully illustrate
the need for such a check.

Hope my explanation is clear enough so that my poor English doesn't
bother you!

[1]: https://lore.kernel.org/qemu-devel/20240527170317.14520a2f@imammedo.users.ipa.redhat.com/

Thanks and Best Regards,
Zhao
---
Zhao Liu (3):
  target/i386/cpu: Use hex mask to check for valid cache CPUID leaf
  target/i386/cpu: Check guest_thread_ids_per_pkg for host-cache-info
    case
  target/i386/cpu: Add comment about adjusting the Guest cache topo for
    host-cache-info

 target/i386/cpu.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

Comments

Zhao Liu July 8, 2024, 2:23 a.m. UTC | #1
Hi Igor,

Just a gentle poke and what do you think about this minor series?

Thanks,
Zhao

On Wed, Jun 19, 2024 at 10:42:12PM +0800, Zhao Liu wrote:
> Date: Wed, 19 Jun 2024 22:42:12 +0800
> From: Zhao Liu <zhao1.liu@intel.com>
> Subject: [PATCH 0/3] target/i386/cpu: Misc Cleanup on host-cache-info
> X-Mailer: git-send-email 2.34.1
> 
> Hi,
> 
> This series is mainly to addresss Igor's comment about if one check in
> host-cache-info could be removed [1], i.e., whether Guest's cache
> topology should be self-consistent (able to correspond to Guest's CPU
> topology level, as we currently do with the Guest cache topo).
> 
> I originally thought (in the mail thread with Igor) that host-cache-info
> should allow Guest and Host to have the same topology level information,
> e.g. if Host shares cache on core level, then via host-cache-info, Guest
> should also share on core level.
> 
> But in practice, I gave up on this idea, because in the cache info
> passthrough case, it should be possible for Guest to get the original
> Host cache info (including the original threads sharing cache) without
> further modifying the info to Guest.
> 
> Therefore, I simply added the comment in PATCH 3 to hopefully illustrate
> the need for such a check.
> 
> Hope my explanation is clear enough so that my poor English doesn't
> bother you!
> 
> [1]: https://lore.kernel.org/qemu-devel/20240527170317.14520a2f@imammedo.users.ipa.redhat.com/
> 
> Thanks and Best Regards,
> Zhao
> ---
> Zhao Liu (3):
>   target/i386/cpu: Use hex mask to check for valid cache CPUID leaf
>   target/i386/cpu: Check guest_thread_ids_per_pkg for host-cache-info
>     case
>   target/i386/cpu: Add comment about adjusting the Guest cache topo for
>     host-cache-info
> 
>  target/i386/cpu.c | 24 +++++++++++++++++++-----
>  1 file changed, 19 insertions(+), 5 deletions(-)
> 
> -- 
> 2.34.1
> 
>
Zhao Liu July 15, 2024, 1:15 p.m. UTC | #2
Hi Igor,

Just a friendly ping :-)

May I ask if you are satisfied with the clarification in this series?

Thanks,
Zhao

On Mon, Jul 08, 2024 at 10:23:26AM +0800, Zhao Liu wrote:
> Date: Mon, 8 Jul 2024 10:23:26 +0800
> From: Zhao Liu <zhao1.liu@intel.com>
> Subject: Re: [PATCH 0/3] target/i386/cpu: Misc Cleanup on host-cache-info
> 
> Hi Igor,
> 
> Just a gentle poke and what do you think about this minor series?
> 
> Thanks,
> Zhao
> 
> On Wed, Jun 19, 2024 at 10:42:12PM +0800, Zhao Liu wrote:
> > Date: Wed, 19 Jun 2024 22:42:12 +0800
> > From: Zhao Liu <zhao1.liu@intel.com>
> > Subject: [PATCH 0/3] target/i386/cpu: Misc Cleanup on host-cache-info
> > X-Mailer: git-send-email 2.34.1
> > 
> > Hi,
> > 
> > This series is mainly to addresss Igor's comment about if one check in
> > host-cache-info could be removed [1], i.e., whether Guest's cache
> > topology should be self-consistent (able to correspond to Guest's CPU
> > topology level, as we currently do with the Guest cache topo).
> > 
> > I originally thought (in the mail thread with Igor) that host-cache-info
> > should allow Guest and Host to have the same topology level information,
> > e.g. if Host shares cache on core level, then via host-cache-info, Guest
> > should also share on core level.
> > 
> > But in practice, I gave up on this idea, because in the cache info
> > passthrough case, it should be possible for Guest to get the original
> > Host cache info (including the original threads sharing cache) without
> > further modifying the info to Guest.
> > 
> > Therefore, I simply added the comment in PATCH 3 to hopefully illustrate
> > the need for such a check.
> > 
> > Hope my explanation is clear enough so that my poor English doesn't
> > bother you!
> > 
> > [1]: https://lore.kernel.org/qemu-devel/20240527170317.14520a2f@imammedo.users.ipa.redhat.com/
> > 
> > Thanks and Best Regards,
> > Zhao
> > ---
> > Zhao Liu (3):
> >   target/i386/cpu: Use hex mask to check for valid cache CPUID leaf
> >   target/i386/cpu: Check guest_thread_ids_per_pkg for host-cache-info
> >     case
> >   target/i386/cpu: Add comment about adjusting the Guest cache topo for
> >     host-cache-info
> > 
> >  target/i386/cpu.c | 24 +++++++++++++++++++-----
> >  1 file changed, 19 insertions(+), 5 deletions(-)
> > 
> > -- 
> > 2.34.1
> > 
> > 
>