[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 17:28: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-SenderADCheck; bh=dO6qQWqwyorMYGU7047AcVjW2mxs/SQxbE8+jVjUZWI=; b=l+kcMhYMgSxzE5imh4hLEOk8L+0dLrhfjnxXV35+sdB9Mtt/HwDaS8RtTdD3W2jtAJ7zzjGjyCULAeDAg8ZE41CNsRMQfDP3jvBSQQrBRvP2NLnsvCA4RnG5DZ3kK1/TleoTpbuLmfMSdbi61XclX2bMv+Xo4OcGZuePVQypZMzOdRJFhkGEegwkars8Kyv/lw9ovzZi3nNLBo301ViqUCYf8166Vt7PtmA2MXAHxKwsxP7z82+va8xLDrhib13BcKahKeIIUydZ+ZwSUhECUDbOJmw0lm7OGBLWeffj5oqOAKKosMhI3Mn73qvRSDgChgZO9iaX9Qky/k6fErJ9GQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RWYt9vbgBRREqjxjyp+x0YJS4vbOmDFc9i8uaZjaCW8DtGVtgqxREsU4aDQ62X2/ZUPfo99iFViS1v+QwUw+H3TI84PDM2NTAwSIgn+JIJUyc6eFd1Z38BRr8BwsmQksJ2sXQynnlB91zW4CLLDBoRJW/MQvnkGtVdY8+BQcGYj36OlWRCNcfMOx4kvGFQ0TGspRI6EfP6FGztUzKw6APSXQh5VOmQQ2WQLMxzLu/QhsPF2GL3CNOdyYAIGf/9q2fBxKCleoc0tSrZriO4QuONfcuVij8SJjBs0brwlJRsl03ETh0WZ6MqLwjAnZdZfUDhsgCCgunkgAqWNkjjoEGQ==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 01 Jul 2021 16:28:42 +0000
  • Ironport-hdrordr: A9a23:2pcpYahlRlYpNpddzo9X7mGYM3BQXh4ji2hC6mlwRA09TyX5ra 2TdZUgpHrJYVMqMk3I9uruBEDtex3hHP1OkOss1NWZPDUO0VHARO1fBOPZqAEIcBeOldK1u5 0AT0B/YueAd2STj6zBkXSF+wBL+qj6zEiq792usEuEVWtRGsVdB58SMHfiLqVxLjM2YqYRJd 6nyedsgSGvQngTZtTTPAh/YwCSz+e78q4PeHQ9dmca1DU=
  • Ironport-sdr: MckqqaUWzpl+kSosY7VrEv+yDz6/amnJt6NQWllmdDNpuc6Qufdef20kgUP/pgXanXQ5Dr9iOC WgFtWMM9PADZkplQBx0tISiwVXezP2XwF8x1mcAwu3remqrwnydUab4hk/8Hsz2eI6DgW061yo d9cJawgrxeZJBqTroxi60bnVkfXHkuWaLmEQ5X07NZu1cbX6kocr+HZ2d1ztswa6n45NpgHE8/ CLyaH31pb/qG6Z3Z6Qig3D5ZoumS+JbMH2xRMBD0/HkKPQy/fkFpuolRHE2OMGkMALgpPZEGWw 6sU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01/07/2021 17:23, Olaf Hering wrote:
> Am Thu, 1 Jul 2021 16:25:10 +0100
> schrieb Andrew Cooper <andrew.cooper3@xxxxxxxxxx>:
>
>> -        p->extd.max_leaf = min(p->extd.max_leaf, 0x1cu);
>> +        p->extd.max_leaf = 0x80000000 | min(p->extd.max_leaf & 0xffff,
>> 0x1cu);
> Yes, this fixes it for me. Thanks.

Fantastic.  I'll try and do a proper patch in due course.

On further thought, I think I'm going to go with the slightly simpler

p->extd.max_leaf = min(p->extd.max_leaf, 0x8000001c);

This is a policy obtained directly from Xen, which means it is running
on a 64bit capable system, which means that 0x80000008 is the lowest
number which can possibly exist in extd.max_leaf.

~Andrew



 


Rackspace

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