[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 00/11] x86 vendor check optimisations


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
  • Date: Fri, 28 Nov 2025 10:18:38 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZHLXLseoA3eo8/r9g2m5hKUIhaYs1D9J4LidwETFmHU=; b=MvMZZIdloO/XwX80f/GLHJYF4hKDMbSOVCOWjMzu6RFKLTwkXfCtDwsm22OGLihIuIvs0AfhVWgxvdomC3182J8xyvZTuTt3pM9YD+mlv5yDDRW49PaRtHnarInxqgKnnkOUkySOMzMvT6v5bV+3RzsNQJzqbx6mGWgMJ4oVfmS/9p0k1mcEBmUgm0fvDyzqPZZrgsvCjv3ywP0b6CuxF0fVJCXRcHO7OlqDv4kUAwyxM+vs7ZgDPuwUu/dUvrzg/VMjO3DhzkoutYdHI0oUhnMnIxKfFgIbu4UNiZwlpo4Yyt6cRBoVSsaUI67GGT7iXHasKo4Cmk5Cd9unJbW1zA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qzT62rWdaA8Vq/qnJEHfxk0r86e+msiOeAWZXGZfrWA2q5Ts9u9ndo7rfJpdxynjFdCXG2cTBgsqXhDJiXMNytsaP+kLhedsmsMt2AYBhjXXXWUNuNWtQhDuPbk4OBGwvt8tPeiJFIOkVG/eSlgUL9ICBIWJ5WivvLi642lk+Lul5p0GJ5qfZ7ol6M3i4SdiOiXTCfViRhvQRP90I/dYvebTF4UYewq2wC+HM7B6plG671kSqEQom/MXpGzhnlORJLbJ3bw5nEC3vb278/qPKHfUk35UvS/qPwT9G5kfLilnTqHXFFCHoIn2xXEe6NL7n4qNbmGYIZBoRwX/VlIL/A==
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>, "Xenia Ragiadakou" <xenia.ragiadakou@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 28 Nov 2025 09:19:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu Nov 27, 2025 at 11:11 PM CET, Andrew Cooper wrote:
> On 26/11/2025 4:44 pm, Alejandro Vallejo wrote:
>> Just knowing x86_vendor_is() is "good to have" is good enough as it enables 
>> our
>> downstream to customise it with whatever optimisations we need.
>>
>> I also suspect other areas of the hypervisor could benefit from this meld of
>> runtime+compiletime sort of checking, allowing transparent code removal.
>>
>> I'm thinking DOM0LESS_BOOT vs DOM0_BOOT vs PVSHIM_BOOT, or AMD_SVM vs 
>> INTEL_VMX
>> in HVM-only builds, or family checks to have (i.e) a explicit 
>> "older-than-zen"
>> Kconfig option with a similar approach on a family range check.
>>
>> This is maybe one of several such uses.
>>
>> So... thoughts? I'm definitely fond of the single-vendor bloat-o-meter 
>> output.
>
> Having looked through the whole series, I'm not a massive fan of
> converting the switch() statements, but it's the only way to do the
> DCE.  So be it.
>
> I think x86_vendor_is(var, MASK) wants to become boot_vendor(MASK).
>
> Most cases want the boot vendor, and those that appear to want something
> else don't actually.  When you disable the cross-vendor case (patch 2
> pulled out ahead), then cp->vendor == boot_vendor and then you don't
> need a variable to pass in.
>
> This also reduces the verbosity of the new lines which is an improvement.
>
>
> That said, this series also collides substantially with the Intel Fam
> 18/19 work, which is more urgent and needs backporting to 4.21.  More
> specifically, there are a bunch of changes which interfere with VFM
> conversion, and for which I can't see an obvious DCE reason to have, so
> I'm wondering if they were just part of "convert everything".
>
> ~Andrew

I converted everything under the sun because it's easier to find all of them
than the strict subset the will give me gains. It's also easier to have new
commits using the function when there are no seemingly random instances where
it's not used.

What's exactly the area you need to touch for the Fam 18/19 work? I can leave
that conversion for last in the series so you have time to push and backport.

It's quite likely not in an area of the tree I care deeply about.

Cheers,
Alejandro



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.