[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: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 25 Nov 2021 10:24:25 +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=mnFv9LvI7mKi/swmefPyxLvhUBwfrxUZDCF5Hhq/V+U=; b=T7DZZE91pDpMd9q6Jzy8hbEvv5V0+VW+ICi+QFNRGLgKuuYaT1kwtuk9lM4sh1T9sfcrf2bWfX7uX9428KdQdyGJxI3Pqj+3KJUyPDQF0RrOEhLg/xZPtBDc3ySHOr6UgJJLTFMawMhvgknCmB0ISRBIXHh0iXl3qxc3lNFCyVaTDFPAtnzp87xY6ILbtyTGLoSMRHysAiSmj44Xy1eVklG5mLTPksYL3wv03APaJm/eEva3WCYVHLxlNiMaBMXHWcB7iEGQWugU26AjecYdo+We/IYlS3wd1HmS6ZUdIHJd/CWBWXKG0pj/nTEC80Me7m+RueepzHZ/IE8X1AbgdQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AhtBEtJvancO7QulRuNajrnB4hl/zJA3+ri76d/VOOsIFe6iYqvTF/WB/YGS3LwTLvRoWvR5OxmvJN42zANbKej4YkJ2jtgqrCnEIedEaXUkmU8o6t1O0xML8OuT5KGOaH5mhEPNQAEDCQJ3F2YvdEf8ZLb2wVZHfbkeCxXrEitND7S4Bcb+DsomjVGiMbqcnXGXcdmL5AztTu6it9VptkLtrmtY2OGwynEJU5+g3aTexYCeZzhltVeSLTTe3UJcH18WlpW1+pMnvaqRdp2aIMnwVQGlS6wq+cY8OBWEZR+LOZrSUY7mNnadyeFn/QXG2yt6NUWm18zl3b9EwKyPAg==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 25 Nov 2021 09:24:45 +0000
  • Ironport-data: A9a23:yHLDkasJdNfO9tvLG18fM8wFqOfnVLFZMUV32f8akzHdYApBsoF/q tZmKWmAb/eCZmWget0iao2y8R4C7MKDy4UxTlBtqS0xRH4V+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZQP0VOZigHtIQMsadUsxKbVIiGHhJZS5LwbZj29cx24XhWmthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ NplrZCWVj4jPaD3k7okCgh/SSxfB6pY0eqSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DJoQQt2sm1TjEJf0nXYrCU+PB4towMDIY25AQRaqGO JBxhTxHYj7eRCYWCnwsD6kDh/mlvFTaYQxEgQfAzUYwyzeKl1EguFT3C/LUZd6iVchThlyfp G/N4yL+GB5yHMySz3+J/2yhgsfLnDjnQ8QCGbug7PlojVaPgGsJB3U+V1G2vP24gU6WQM9EJ gof/S9Ghbc23FymSJ/6RRLQnZKflkdCAZwKSbR8sVzTj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gPM RbAtZD4b/LfCFHZK/BiWHSebZQo6j3zEnrv5an854Ed3AUV0gK1XYeNu/0KDwTeOEQbqBJaK Z0q/A37AaISDAyVICWF3MFV+/Mq5nik4/nWwcPA1oC5BOVhT2lxbbmG1zAty1uHg9n8PMHyy zoggb57qKsv7WSzQLd7Xba69BzlMH6wtVOKcSQgow+KynqiCyveIN9Mofy9gwdkaWK0hIHgd PMqxAvM4Ba7G7QRHi8pV/X1wzpwF8Vmgnf4G7dpUGmjd3yRTo8BcYEr5leaAHl500pu8w5+L 5X3kqC3qAnQy/orWDY3ZzlRhtqnk27rT4JiugIlUFSVoMYdft4sZEfxkVIC50NdRiKp7zPKN MeTP002cwmMm9zNxvizytSKZ2XLzgO9y69Mwk/Upf/6UkSoJh7p3Fos/D30E1wsK7VcKM0lN gsBJ4Y4I2mfvVmHZ6VO91xM/dfKla9CC4kY1jiaWgOKsk8SgfwQtjMkfII2N0=
  • Ironport-sdr: 0z85WXdirYH6+SxV3AJrv4yBlZrxRKZipvvBJn4hodXnvc3C8W2+vbEEkFzrNFjthSQ2RhiTQx a/LnwISg4nydDzA3c9H/g/wQkfR8PpqTcxhq5HPVlDZToHhiheb/LTeVJPBDOcUVcRLjf2W8l/ pm+EfWY0mKxOPZG6t19tvuDVFgaZnA+GC1AfNq56ivyA7B7gAIr6oODMtX1SRzNQwoQ+pO1Neo nls7TgFdRvEHy2lqxmUBcHJ8ykwcBTIu/SE+b7ScV9AsmRg1aCP//6iPP7mVyfbkxA4eSZT2ak xAPAJD2ThWi5hY9Bmgh4XUI5
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Nov 25, 2021 at 09:57:31AM +0100, Jan Beulich wrote:
> 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.

It's from a pair of newish boxes that Credativ and Ian where
attempting to commission yesterday. Since the boxes are not yet in
production Ian wasn't sure if the issue could be on the testing or
hardware side, so emailed the details in private for us to provide
some feedback on the issue. The error is at:

http://logs.test-lab.xenproject.org/osstest/logs/166296/test-amd64-amd64-migrupgrade/info.html

> > 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).

I think there are two separate issues, which I tried to clarify in my
reply to this same patch.

Options set using cpuid= with xl could now be rejected when in
previous versions they were accepted just fine. That's because the
shrinking to the policies can now cause find_leaf calls in
xc_cpuid_xend_policy to fail, and thus the whole operation would
fail.

There's another likely error that only affects callers of
xc_cpuid_apply_policy that pass a featureset (so not the upstream
toolstack), where some leaves of the featureset could now be ignored
by the guest if the max leaves value doesn't cover them anymore. Note
this was already an issue even before 540d911c2813, as applying the
featureset doesn't check that the set feature leaves are below the max
leaf.

Roger.



 


Rackspace

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