[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XEN_SYSCTL_cpu_policy_hvm_default truncates leaf count
- To: Olaf Hering <olaf@xxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Thu, 1 Jul 2021 16:25:10 +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-SenderADCheck; bh=mjwVxX4GgIrAQoSzUjcjTbNJwYYZxd6+6mayAKz3JtU=; b=Dax8dpeRQJNFqEhNGHJhsSYPuF43nWL/aR5pUff6noAFwBWgMQuSzE4BL7ntgqwVQHdncMP+hmZt1MLr4zOBsd4sk0uVwDo7TjB98buc8eqU4mA0FveZyKjIMODq+5zEWLU9OpONzfdgtSxPSa7YNXqW5qT6YdNM98ch2LusgppMsTKj8yod7XOwp5zMWBlTMWlZsAOoZ/itJV4X7aGq9T11+Sm0y169yCNVBdtUho5QPX/IEc6gvU+3l+p3XwpQKisG2ZB/C70cXTQk1Z/Ky55ilfObNmo7oJ19sLp+oC/K3mcaUyl2GgMdmlYatdE2TmVJbHti426GAXd2qpkEBQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f4mgmGHWxsu3RaQMRFAyOgsPoC7dttGOOkH8Xor5Eqy/jKYgViChM7RywtYpqOhvKwDqMDUO1jiadE07A9MCmmk6Ji87GmY+XyLo7ROQL/qlxMKB36npglfBiCzzLefyv9p50yNHTfkLqhxMWt5vBDscvwXBMc+V/MoQhkojkxhIpaoFPDJkNqkXH9ieY6ewKCXv7qiBEhTYTt9+pvQ7UKZFNYPl0ZXn2FwoxjhyN3SoiDHuIr6QLp6baCQbj3Niu7SP29XJsRoEqG2DfRfsnFOj4quEML5SE0vISguo8cfCgTPXVinTeC9VVtyqx65dagV33vB7TYGz46/GBFNEmw==
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=hardfail (body hash did not verify [final]) header.i=@citrix.onmicrosoft.com
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 01 Jul 2021 15:25:27 +0000
- Ironport-hdrordr: A9a23:5a/oW6+ZpwXnPhFqhxRuk+E1db1zdoMgy1knxilNoENuHPBwxv rAoB1E73PJYVYqOE3Jmbi7Sc69qADnhOBICO4qTMiftWjdyReVxeRZjLcKrAeQYBEWmtQtrJ uINpIOdeEYbmIK//oSgjPIa+rIqePvmMvD6Ja8vhUdOT2CKZsQiTuRYjzrYXGeLzM2YKbReq Dsgvav6wDQA0j+Oa+Adwk4tqX41pL2vaOjRSRDKw8s6QGIgz/twLnmEyKA1hNbdz9U278t/U XMjgS8v8yYwrCG4y6Z81WWw4VdmdPnxNcGLMuQivINIjGprgqzfoxuV5CLoThwiuCy71QBls XKvn4bTopOwkKUWlvwjQrm2gHm3jprwWTl00WkjXzqptG8bC4mCuJa7LgpMCfx2g4FhpVRwa hL12WWu958FhXbhhnw4NDOSlVDile0m3w/iuQe5kYvErf2UIUh6bD3wXklV6vpREnBmcYa+a hVfYHhDc9tABanhyuzhBg3/DTENU5DaytvQSA5y4aoOnZt7ShEJnAjtboid0E7hdkAoql/lp P525tT5fhzp+8tHO9A7bQ6MIeK4lKke2OFDIvEGyWXKEhAAQOXl6LK
- Ironport-sdr: AxWbYp+n8zJn626r/8nVZagjrA9vK/HRgctX5sBjxiDLboBgojMajFNpOTFsSElb5+qVLt7UDm IzAHNGI4G3xjdlzOejouTclhEtTm4PxRXidxT5fL49gcTR8G1yuokBppr/DvDxVU5ReZNNIRfy Cs1kNimiawwRwnjF0rUnVICOeVGeZsf707zZ1UErjLxxpivEDaBHiItlctrdueRbM9sKbVLhSE hULnDmfDd/3GPJlMDBNUVzTR2ox74swBN8G3d4V4mXGnxKoAt8esZG8eqp0IYB38+Ju662EAAR Io8=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 01/07/2021 16:18, Olaf Hering wrote:
> Am Thu, 1 Jul 2021 16:13:21 +0100
> schrieb Andrew Cooper <andrew.cooper3@xxxxxxxxxx>:
>
>> That logic is definitely incorrect, but using a different constant isn't
>> right.
> Yeah, that occurred to me after sending this email.
> I think in the end the values should probably get closer to 51, not smaller
> than the current one.
Can you give this a spin? (Sorry - I'm busy with another task right now
- I'll do a commit message in due course)
~Andrew
diff --git a/tools/libs/guest/xg_cpuid_x86.c
b/tools/libs/guest/xg_cpuid_x86.c
index e01d657e03..e1fa33d708 100644
--- a/tools/libs/guest/xg_cpuid_x86.c
+++ b/tools/libs/guest/xg_cpuid_x86.c
@@ -513,7 +513,7 @@ int xc_cpuid_apply_policy(xc_interface *xch,
uint32_t domid, bool restore,
/* Clamp maximum leaves to the ones supported on 4.12. */
p->basic.max_leaf = min(p->basic.max_leaf, 0xdu);
p->feat.max_subleaf = 0;
- p->extd.max_leaf = min(p->extd.max_leaf, 0x1cu);
+ p->extd.max_leaf = 0x80000000 | min(p->extd.max_leaf & 0xffff,
0x1cu);
}
if ( featureset )
|