[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:13:21 +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=OMFB/iP2HOsEBbJCx9O3lVcQ2RR3FXbB/e+5SkWgTGQ=; b=g4Sk1FHeSiA2UfQt0wmG8VUm92Y4VhYW2P+/5Mf0WqsK8TfipaZhpgMWUeC2hLeKqIN1jbd+/DSErdzULT0dgvJBpXBaH57VtitNyqpPUaaGlF0mFjIkXwNh0mAA3yPT3lYaDJ8nyPC//hqow4kO/Q/PGZtTT1EzvjPn+McxyqyCdnPqa1alFDDOMbYvs4uzxhkvBjAyhoYuNNddDG9LtnM1Hml7LypI4vppzovEYOL3BkoPOvXaWW9lJa9PtjfiYq9NcHK06qgIKLexNcR5eed2xE3BvPMepqqE4i58TeuyHT98DpL8YrD5iha8Zzy1J4LlpNvikTmzOLtvHvp9bA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OxycDaqTSqXA31CRNt4Bg7MVYYSWtPTqRW30unpo0noBzIBEv9HjrZ4CTTmurEAUh0jowPXDYutmyeXGscOTflyMGdbX/AWgGDjTlKYTlF6VrQlvyzWXIqgiOaKWMWsfiXhEEbqTY07/vnYWWoJP+6W9U0w7UKzT/5vbPk71U7bd44spO1FuPuzIjMhcy1kyvMn2xsA2IVZdgUgHSh2Adx1vl90tuuSN4ILLslEJt67xixqXqpLsrpm6X5BCn7tzuiJzZsen/Ru+D1XLpYGFAWE9GGRG2QCWp+pqxKr4l+S2ow8vWFNk1yAcEFjlqeCN+xdeUki1OfWlTD6XOeDF+g==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 01 Jul 2021 15:13:33 +0000
  • Ironport-hdrordr: A9a23:viFdeK/7gbOtc9MSIk1uk+AuI+orL9Y04lQ7vn2ZKSY5TiVXra CTdZUgpHnJYVMqMk3I9uruBEDtex3hHNtOkOss1NSZLW7bUQmTXeJfBOLZqlWNJ8S9zJ856U 4JScND4bbLfDxHZKjBgTVRE7wbsaa6GKLDv5ah85+6JzsaGp2J7G1Ce3am+lUdfng+OXKgfq Dsm/auoVCbCAwqR/X+PFYpdc7ZqebGkZr3CCR2eyLOuGG1/EiVAKeRKWnj4isj
  • Ironport-sdr: 6zI9ZKMYwdDrFHIvYFY2ic19yUSQSrDwKs6wgxS/4c0ougVrejlwwcN7Nye4PNbrguV7dWMQ0U OrNEfgnX77O03+MpTn13/xladx/CiSN0ut64Q01DrlKzPRtcmNDDzpPE40vibCGN1AsFSMCT1W kVlKCBas7kebf7yirIBh7ERku9+XYdLz/ub55Tc65DrTqSBh2+T+gueSbhyIyQcBrhl3ItPf9p Zhrhjw87tnCmkcP+DQm8AwekuWQwf352s5wqfhIXqWo94oIKiNe9ITPGy9YB+AXkWau5JSNogH fr0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01/07/2021 16:00, Olaf Hering wrote:
> Am Thu, 1 Jul 2021 12:19:24 +0100
> schrieb Andrew Cooper <andrew.cooper3@xxxxxxxxxx>:
>
>>  Where is the 51 leaves coming in?
> I suspect the bug is this line, and the magic "0x1c" value:
>
> p->extd.max_leaf = min(p->extd.max_leaf, 0x1cu);
>
> In my testing basic remains at 13, while extd is truncated from 0x80000008 to 
> 28.
> I think it should be truncated to CPUID_GUEST_NR_EXTD_INTEL?

That logic is definitely incorrect, but using a different constant isn't
right.  I think it has been copied from elsewhere else and incorrectly
simplified.

I'll see about trying to fix it...

~Andrew




 


Rackspace

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