From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org,
George Dunlap <george.dunlap@citrix.com>,
Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH] x86/vcpu: relax VCPUOP_initialise restriction for non-PV vCPUs
Date: Wed, 20 Mar 2024 15:26:40 +0100 [thread overview]
Message-ID: <ZfryIBR6RECujayD@macbook> (raw)
In-Reply-To: <1304a0d2-ff17-4823-9d31-c32eb7b79f30@citrix.com>
On Wed, Mar 20, 2024 at 02:06:27PM +0000, Andrew Cooper wrote:
> On 20/03/2024 1:57 pm, Roger Pau Monne wrote:
> > There's no reason to force HVM guests to have a valid vcpu_info area when
> > initializing a vCPU, as the vCPU can also be brought online using the local
> > APIC, and on that path there's no requirement for vcpu_info to be setup ahead
> > of the bring up. Note an HVM vCPU can operate normally without making use of
> > vcpu_info.
> >
> > Restrict the check against dummy_vcpu_info to only apply to PV guests.
> >
> > Fixes: 192df6f9122d ('x86: allow HVM guests to use hypercalls to bring up vCPUs')
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>
> Thanks for looking into this. But, do we actually need to force this on
> PV either?
Possibly, having now taken a look at the users it does seem they could
cope with unpopulated vcpu_info_area.
Part of my understanding was that this was some kind of courtesy to PV
guests in order to prevent starting them without a vcpu_info, which
strictly speaking is not mandatory, but otherwise the guest vCPU won't
be able to receive interrupts, not even IPIs.
> The only interesting user of dummy_vcpu_info now is vcpu_info_populate()
> which can cope with any arbitrary vCPU.
>
> I have a suspicion that we can (now) delete these two checks, delete the
> dummy_vcpu_info object, and use a regular NULL pointer in
> vcpu_info_{populate,reset}(), and in doing so, remove one of the bigger
> pieces of PV-absurdity from Xen.
I was expecting this to be something we can backport. OTOH removing
the check completely (or even getting rid of dummy_vcpu_info) is not
something that we would want to backport.
I would rather do the removal of dummy_vcpu_info as followup work.
> I can entirely believe that this is only safe to do with Jan's physical
> registration changes in place.
Quite possible.
Thanks, Roger.
next prev parent reply other threads:[~2024-03-20 14:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 13:57 [PATCH] x86/vcpu: relax VCPUOP_initialise restriction for non-PV vCPUs Roger Pau Monne
2024-03-20 14:06 ` Andrew Cooper
2024-03-20 14:26 ` Roger Pau Monné [this message]
2024-03-20 14:39 ` Andrew Cooper
2024-03-26 22:08 ` Julien Grall
2024-03-27 7:15 ` Jan Beulich
2024-03-20 15:03 ` Jan Beulich
2024-03-20 15:09 ` Jan Beulich
2024-03-20 15:20 ` Andrew Cooper
2024-03-21 7:55 ` Jan Beulich
2024-03-20 16:29 ` Roger Pau Monné
2024-03-21 8:07 ` Jan Beulich
2024-03-21 9:10 ` Roger Pau Monné
2024-03-21 9:17 ` Jan Beulich
2024-03-21 9:57 ` Roger Pau Monné
2024-03-21 10:18 ` Jan Beulich
2024-03-25 10:17 ` Jan Beulich
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=ZfryIBR6RECujayD@macbook \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=sstabellini@kernel.org \
--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.