All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>, Alex Olson <this.is.a0lson@gmail.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	"Ian Jackson" <iwj@xenproject.org>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Juergen Gross" <jgross@suse.com>,
	"Anthony PERARD" <anthony.perard@citrix.com>,
	"Alex Olson" <alex.olson@starlab.io>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 1/1] x86: centralize default APIC id definition
Date: Fri, 1 Oct 2021 15:29:45 +0100	[thread overview]
Message-ID: <d63a0e7d-7f9d-0dcb-0ac9-8995e56698b4@citrix.com> (raw)
In-Reply-To: <d899b058-a201-e2f8-35d2-f0e59ab4bab3@suse.com>

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@intel.com>,
>> 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


  reply	other threads:[~2021-10-01 14:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 19:39 [PATCH 0/1] x86: centralize default APIC id definition Alex Olson
2021-09-24 19:39 ` [PATCH 1/1] " Alex Olson
2021-10-01 14:19   ` Jan Beulich
2021-10-01 14:29     ` Andrew Cooper [this message]
2021-10-01 15:08       ` Juergen Gross
2021-10-01 17:38         ` Andrew Cooper
2021-10-01 19:07           ` Alex Olson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d63a0e7d-7f9d-0dcb-0ac9-8995e56698b4@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=alex.olson@starlab.io \
    --cc=anthony.perard@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=this.is.a0lson@gmail.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.