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

Re: [PATCH 1/1] x86: centralize default APIC id definition


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Alex Olson <this.is.a0lson@xxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 1 Oct 2021 15:29:45 +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=bu5lfKqc/MOtq0lV000NQTbgxDYRjVUN3tPlvMIgE4I=; b=n+V/pu4bnnxu0jqw3bOJOLKQVh3l076Q1d68YQytSUWDS1KaitOTQoJSxkdLr8jxJkB6J7cr61o3IfCejMj++1vRJaApeE6oyPj8UlQ6isbGBr6wWP61kqgNlkZqKcPMPXEUXwJZHxUn2NAknevd63nRR4DLQuhcxECHtmcNu/RGRxFHPuRARLpnG9RVQ6cYEzhDcn6fS/Veof1k+RTkZfZdIZZpIHWgOnHOyxcpeo0m/nIGaWJZv/QCtc95xEpmZbAAEuG/fPDOdd5l1CrdQqu+VieRB3BuVfzvYmyc465s8ugx2EwG8PN5X8yENCOc+43IyhALbU1eQXugE/ViZw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M97n2Xb4Gxs+wS7RYIMshAiZEdA8kERcT8tSyB3TQXqy2FdKFkruKYjHFr3enAy7KbYDE++KYpxewJs7dUy5YAm2IQ3BZbtlPeXduZ2Mrtywr3o2cdFfxcKtL689vem9cFt39gPPiJOQfV2XwX5Ur1KcGpyDT53T/HTQa2WUI+Hho7bsPaJZNibfoMU+R2RxIsjHZ0VdrYEgrOR4Tg2sXhWlHIZwGENH04h9iKck9xKZcwmCKn602UVXa3Db8CSrjE1aSd8ivjAfnkFAxd0K/h/G01T5/jNAYWiBlYC7azcXzysWUrIIb4eimwGcZDGTn4ZsGyecgdQ3k/9Gznfnkg==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Alex Olson <alex.olson@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 01 Oct 2021 14:31:04 +0000
  • Ironport-data: A9a23:yHQFpagRRzmX2888enJDDtR6X161BRYKZh0ujC45NGQN5FlHY01je htvDG7QbKuKYWDzftsjPdjn8EgGsZ7QmodgGwJlrC8yQyob9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oAMKRCQ7InQLlbGILes1htZGEk0FU/NtTo5w7Rg29Yw2IDia++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1cuazzUFkQYJHsu6MRXAhnSA5CO5xZreqvzXiX6aR/zmXDenrohf5vEFs3LcsT/eMf7WNmr KJCbmpXN1ba2rzwkOnTpupE36zPKOHCOo8Ft24m5jbeFfs8GrjIQrnQ5M8e1zA17ixLNauCP pZJN2s0BPjGSwV1FggIDo4up8ex2EugWhcbjnmeooNitgA/yyQuieOwYbI5YOeiW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mPFvRgMVP8jyyAmX8m9NOw/u3JO4hf9/ld0Yl0wTmBTAQ/ sLfv7eEpTRxfMCaMFLtdPQ19
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01/10/2021 15:19, Jan Beulich wrote:
> On 24.09.2021 21:39, Alex Olson wrote:
>> Inspired by an earlier attempt by Chao Gao <chao.gao@xxxxxxxxx>,
>> this revision aims to put the hypervisor in control of x86 APIC identifier
>> definition instead of hard-coding a formula in multiple places
>> (libxl, hvmloader, hypervisor).
>>
>> This is intended as a first step toward exposing/altering CPU topology
>> seen by guests.
>>
>> Changes:
>>
>> - Add field to vlapic for holding default ID (on reset)
>>
>> - add HVMOP_get_vcpu_topology_id hypercall so libxl (for PVH domains)
>>   can access APIC ids needed for ACPI table definition prior to domain start.
>>
>> - For HVM guests, hvmloader now also uses the same hypercall.
>>
>> - Make CPUID code use vlapic ID instead of hard-coded formula
>>   for runtime reporting to guests
> I'm afraid a primary question from back at the time remains: How is
> migration of a guest from an old hypervisor to one with this change
> in place going to work?

I'm afraid its not.

Fixing this is incredibly complicated.  I have a vague plan, but it
needs building on the still-pending libxl cpuid work of Rogers.

Both the toolstack and Xen need to learn about how to describe topology
correctly (and I'm afraid this patch isn't correct even for a number of
the simple cases), and know about "every VM booted up until this point
in time" being wrong.

~Andrew



 


Rackspace

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