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

Re: [PATCH for-4.16] Revert "x86/CPUID: shrink max_{,sub}leaf fields according to actual leaf contents"


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 25 Nov 2021 09:57:31 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=/ZugTODvumOoUEH0iwV7P16SieULvvvYTObxq/PhdKQ=; b=WWwJTNHtfZnSwSSMlO1WjiOUqVZxjcJjI93yNCpUO/05NHTnqjsnRjridyyeQhPE3uyGym0Jj2Eavns/6w7GWVqrtqebNA/krwYLJxD+vxaAEhk40TLwyGngGfK8vxG35DpGAtMPwf/czWQwyTD8IniYzrceDY0u/OZTbmZfqIYTO+vTq+lHh0pS4/wwGqGiqYGIjxVnXmtgBiEwruiNqI3eHNoejUp2EOqa+uzbfTwjhntZt9siOdEY3bYNsr8uCBU7N7XxcdBq1nTIssbpDDILWucU7ROXgZ6QOd8csirQo/ZB4fyJkKPkPfJUjsKSKQj6jLtF/oKti5DOlEcwdg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OVJyUKarxjUS+6HYylEKTLnTo/5zWhSAFo/AmnQu2YDrbtk23sTCLMkdn/9U2du9LadYTCVSzU0CB3AO4cDSSC3ZKB4ZiChmRVCRyeLqXu6q06ok8NwzF8+79o/OvsdKEKC7nZwkAE7vFTRUCH/8lgFLax8fhJ7CtEIsgah5gBdgZfiOAH1KQNOOGeCgwTAEn6b2wsxvmkOTi0MkxjckC1GDGzKlYUG+654oS94I76V5IL8j5ydViW9hQr0PsR6SC9fWOrkQiWWGjWX4qWFvEJFgq8Aqgj5GkDp5reLCvz9FCHBGCgitD9+kLTwstOKumpJ+h97dPbbiu72HEGiGPg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 25 Nov 2021 08:57:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.11.2021 22:11, Andrew Cooper wrote:
> OSSTest has identified a 3rd regression caused by this change.  Migration
> between Xen 4.15 and 4.16 on the nocera pair of machines (AMD Opteron 4133)
> fails with:
> 
>   xc: error: Failed to set CPUID policy: leaf 00000000, subleaf ffffffff, msr 
> ffffffff (22 = Invalid argument): Internal error
>   xc: error: Restore failed (22 = Invalid argument): Internal error
> 
> which is a safety check to prevent resuming the guest when the CPUID data has
> been truncated.  The problem is caused by shrinking of the max policies, which
> is an ABI that needs handling compatibly between different versions of Xen.

Would you mind pointing me to the flight which has hit this problem? I
don't think I've seen any respective failure. I also don't think I've
seen any respective discussion on irc, so I really wonder where all
this is coming from all of the sudden. It's not like the change in
question would have gone in just yesterday.

> Furthermore, shrinking of the default policies also breaks things in some
> cases, because certain cpuid= settings in a VM config file which used to have
> an effect will now be silently discarded.

I'm afraid I don't see what you're talking about here. Could you give
an example? Is this about features the flags of which live in the
higher leaves, which would have got stripped from the default policies?
Which would mean the stripping really should happen on the max policies
only (where it may not have much of an effect).

> This reverts commit 540d911c2813c3d8f4cdbb3f5672119e5e768a3d, as well as the
> partial fix attempt in 81da2b544cbb003a5447c9b14d275746ad22ab37 (which added
> one new case where cpuid= settings might not apply correctly) and restores the
> same behaviour as Xen 4.15.
> 
> Fixes: 540d911c2813 ("x86/CPUID: shrink max_{,sub}leaf fields according to 
> actual leaf contents")
> Fixes: 81da2b544cbb ("x86/cpuid: prevent shrinking migrated policies max 
> leaves")
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

I'll be okay ack-ing this revert, but I'd really like to fully
understand things first.

Jan




 


Rackspace

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