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

Re: [PATCH] x86/cpuid: prevent decreasing of hypervisor max leaf on migration


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 27 Oct 2021 16:11:04 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=ia2GqD4k/yLn9puVehXGjmi3W3/nGkAK14/JGRToq4g=; b=egv/Et2je9KDXBZLrItOr/Q8sH9B19Ma40QbkSuJqUhLhOEB+GhEUriVRytxdcP7rD3K88B0q9qv/an9/JKBfjFTv3xzIEXu4mN+RsrP6JPpZaP/pw3eMVVVZRfsMQWziNaafuXa7MtP/jUm68Hybt8YowxVWqdDMhuUeZYxK2C6vbjVgSSqxAZcK3W/PE6fTODVOtaYMAXEsiMVipIfMpHUPwyouqXX6Uu7bWl57zbVfEwcZzzubg1XAaDGY+TCeP/tKsar8XktidCM7NtlMh3pOkFxAL8dzyg1flb/Vjfhxh/94AT9yd+txIkdqhHrp2ZAqhyF8HM+WrZXhys8IQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V1imqS5mt4yI9d7ZUzmYBElUvAofxUQDErwE5k8NdNmeeCLlmZo+tF0NIOWqQB9RJCzmSc+/MJfYGKVOcpuHZvaJMFCOLf2voNh1OUpKmHN68gKrHo7g4s8+quAzypw84z5Mz/goxQAOAr5nUPoRrK4dl1Y+3c0ntr18Cmgs90F5h1V9QuEfsAXOGatsz9rOq08wMUVf2L058gJWSjI+uSirUIgcDGN1YEpCtGP/ZvT8XKdy/JjGik8o4lth9BeRkv3cotesMxISgfNBFiP8b1vw5LOZ9Vgt3OS45Qq/aT06m9mQ0vk1qw1u79gbsVCv20udZO6bEp83JWD8dVt7Yg==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • Delivery-date: Wed, 27 Oct 2021 15:11:56 +0000
  • Ironport-data: A9a23:kCFxaKo6P53idgIJ0l7K2U8CWnVeBmLlYhIvgKrLsJaIsI4StFCzt garIBnUO6vfN2Ghe9sla4XipEtUvpSAyt8ySgM+rSlnFH8Q95uZCYyVIHmrMnLJJKUvbq7GA +byyDXkBJppJpMJjk71atANlZT4vE2xbuKU5NTsY0idfic5Dnd+4f5fs7Rh2Ncx2YLmW1nlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCncagVx1qI/bJo+QUciVHPgFVPLwb8bCSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex6RCXvFKoZtmtt0nfyCvE+TIqYa67L+cVZzHE7gcUm8fP2O pRCOGowMUWojxtnCwwdJIozzM6UuyP7VBBm60CKmKU97D2GpOB2+Oe0a4eEEjCQfu1XlEuFo mPN/0ziHwoXcteYzFKt4n+qw+PCgy7/cIYTD6GjsO5nhkWJwW4eAwFQUkG0ydG4lUyWS99ZM 1YT+Cclse417kPDZsb5dw21pjiDpBF0ZjZLO7RkskfXkPOSulvHQDhfJtJcVDA4nJUmWyZp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UyZJ8STzJ866U 4kSdkFNDSSNykLsS+Z2njALz9I+rDum8rJ9ISuvEuFDzsaDJ2Ihz0JezpzeXcGJjWua6BJca Z0qvA33AZJLh8sH7qG7zQ+LqX+juyOsKijTQ8NBhYh5gXLpTS06ITiGxzd+hsFSTtAzZor7G CAymXCl+qemsD+7iWZ+37Y7pxQltek4txfBPaUgsxQDjn3kA6naKloRrXHljEop+OE7kosjb D30lsdFvU2z0mUUnC+oBPr1QWl+DEy60X6wVvdunfnqdyRfkNzN+NxwaZiNjfJ4Uspu99xlI hR2XiCipZRBRTc2Azg+tnhTXhR5wqJiEtntdRWo21UUIMYZrMUh5cY5llpHJAJGz+/wJw7Ed NpENrX6J9tABKnhkjizytSKeGXLzEO9k/seDlHhiXV6UkZoJlB9Tpa+CRF9U1ws67USPF/lq 352+pT5fdzp/QtHNdA7dE6ML2K41z2MGDx2V2pUCDa/YE8SjnwQs3Mkf8IDN/DQu1+8HJ1ou WZbG9l
  • Ironport-sdr: vIBzT9eAxsPzK4Sb0DGFee0i9i7uKaISFbcLtD0mQD1cKOp5CBNFWLIo6WsLJEIyD8GTjwVqC6 L+n7PaItzjbq90gkOqq7zhQbgHXso8Mik+NiDxnIwJ9GJI9rJnMwrht3uilgoQ7WJwXfqcUtKT UFkc2rSuhvf9Dmugz1h6RmWzpVRkvVuD+FYaHW+R75V9MB+v8C9/64dL94m9RV7z6fJG5qmtuB UVnSs19bID2nYgjav7BZ5RhLEthQYpsgcFOV5g0U6GUkEGuP5rm2PHY7pGA9r/vx/zDRcLJXVP yH02xRE7/AJocOBk1lhK3SCS
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27/10/2021 15:00, Roger Pau Monne wrote:
> In order to be compatible with previous Xen versions, and not change
> max hypervisor leaf as a result of a migration, keep the clamping of
> the maximum leaf value provided to XEN_CPUID_MAX_NUM_LEAVES, instead
> of doing it based on the domain type. Also set the default maximum
> leaf without taking the domain type into account. The maximum
> hypervisor leaf is not migrated, so we need the default to not regress
> beyond what might already be reported to a guest by existing Xen
> versions.
>
> This is a partial revert of 540d911c28 and restores the previous
> behaviour and assures that HVM guests won't see it's maximum
> hypervisor leaf reduced from 5 to 4 as a result of a migration.
>
> Fixes: 540d911c28 ('x86/CPUID: shrink max_{,sub}leaf fields according to 
> actual leaf contents')
> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks.

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

> ---
> Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>
> ---
> Regarding release risks:
>
> This is a partial revert of a commit.  The main issues could be that a
> partial revert could break the build or leave the remaining code in a
> non-working condition.
>
> Breaking the build will be easily discovered by our automated testing,
> while leaving the remaining code in a broken state is unlikely, as the
> chunks reverted are isolated from the rest of the change in
> 540d911c28.

This fixes a regression vs 4.15.  Furthermore, the changes to the
hypervisor leaves don't even interact with the rest of the patch.

Failure to compile is about the only risk, and this is easy to prove one
way or another.

~Andrew




 


Rackspace

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