All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Jane Malalane <jane.malalane@citrix.com>, Wei Liu <wl@xen.org>,
	Anthony PERARD <anthony.perard@citrix.com>,
	Juergen Gross <jgross@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Christian Lindig <christian.lindig@citrix.com>,
	David Scott <dave@recoil.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v3 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC
Date: Mon, 28 Feb 2022 14:14:26 +0100	[thread overview]
Message-ID: <7ad79609-bd67-aa44-56e0-1070f3ee88f7@suse.com> (raw)
In-Reply-To: <Yhyv6Ui4ap1wOeNd@Air-de-Roger>

On 28.02.2022 12:20, Roger Pau Monné wrote:
> On Thu, Feb 24, 2022 at 03:16:08PM +0100, Jan Beulich wrote:
>> On 18.02.2022 18:29, Jane Malalane wrote:
>>> --- a/xen/arch/x86/hvm/vmx/vmx.c
>>> +++ b/xen/arch/x86/hvm/vmx/vmx.c
>>> @@ -3333,15 +3333,15 @@ static void vmx_install_vlapic_mapping(struct vcpu *v)
>>>  
>>>  void vmx_vlapic_msr_changed(struct vcpu *v)
>>>  {
>>> -    int virtualize_x2apic_mode;
>>> +    bool virtualize_x2apic_mode;
>>>      struct vlapic *vlapic = vcpu_vlapic(v);
>>>      unsigned int msr;
>>>  
>>>      virtualize_x2apic_mode = ( (cpu_has_vmx_apic_reg_virt ||
>>>                                  cpu_has_vmx_virtual_intr_delivery) &&
>>> -                               cpu_has_vmx_virtualize_x2apic_mode );
>>> +                               v->domain->arch.hvm.assisted_x2apic );
>>
>> Following from my comment on patch 1, I'd expect this to become a simple
>> assignment of v->domain->arch.hvm.assisted_x2apic (at which point the
>> local variable could go away), just like ...
> 
> I think we want to keep assisted_x{2}apic mapped to
> SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES and
> SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE respectively, so that in the
> future we could add further controls for
> SECONDARY_EXEC_APIC_REGISTER_VIRT and interrupt delivery.

If we want to be able to control more (most?) VMX sub-features, it
would seem to me as if this would better be modeled accordingly
right away. At that point there would likely need to be VMX and SVM
specific controls rather than general HVM ones. Plus then it might
make sense to match bit assignments in our interface with that in
the VT-x spec.

Jan



  reply	other threads:[~2022-02-28 13:14 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18 17:29 [PATCH v3 0/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86 Jane Malalane
2022-02-18 17:29 ` [PATCH v3 1/2] " Jane Malalane
2022-02-24 14:08   ` Jan Beulich
2022-02-25 16:02     ` Jane Malalane
2022-02-28  7:32       ` Jan Beulich
2022-02-28 12:09         ` Jane Malalane
2022-02-28 13:07           ` Jan Beulich
2022-02-28 12:12         ` Jane Malalane
2022-02-28 10:59     ` Roger Pau Monné
2022-02-28 13:11       ` Jan Beulich
2022-02-28 15:36         ` Roger Pau Monné
2022-02-28 16:14           ` Jan Beulich
2022-02-28 16:31             ` Roger Pau Monné
2022-03-01  7:51               ` Jan Beulich
2022-03-01 14:19                 ` Roger Pau Monné
2022-03-01 14:40                   ` Jan Beulich
2022-02-25 13:08   ` Anthony PERARD
2022-02-18 17:29 ` [PATCH v3 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC Jane Malalane
2022-02-24 14:16   ` Jan Beulich
2022-02-24 16:59     ` Jane Malalane
2022-02-24 17:04       ` Jan Beulich
2022-02-25 14:27         ` Jane Malalane
2022-02-28 11:20     ` Roger Pau Monné
2022-02-28 13:14       ` Jan Beulich [this message]
2022-02-28 15:48         ` Roger Pau Monné
2022-03-01  7:54           ` Jan Beulich
2022-02-25 13:13   ` Anthony PERARD
2022-02-25 14:31     ` Jane Malalane

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=7ad79609-bd67-aa44-56e0-1070f3ee88f7@suse.com \
    --to=jbeulich@suse.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=christian.lindig@citrix.com \
    --cc=dave@recoil.org \
    --cc=george.dunlap@citrix.com \
    --cc=jane.malalane@citrix.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.com \
    --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.