xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: "Zhang, Yang Z" <yang.z.zhang@intel.com>
Cc: "keir@xen.org" <keir@xen.org>,
	"jbeulich@suse.com" <jbeulich@suse.com>,
	"stefano.stabellini@eu.citrix.com"
	<stefano.stabellini@eu.citrix.com>,
	"Dong, Eddie" <eddie.dong@intel.com>,
	"ian.jackson@eu.citrix.com" <ian.jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	"Nakajima, Jun" <jun.nakajima@intel.com>,
	"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
	"ian.campbell@citrix.com" <ian.campbell@citrix.com>
Subject: Re: [PATCH v3 4/4] x86/hvm: Indicate avaliability of HW support of APIC virtualization to HVM guests
Date: Mon, 17 Mar 2014 13:18:22 -0400	[thread overview]
Message-ID: <53272E5E.4090906@oracle.com> (raw)
In-Reply-To: <A9667DDFB95DB7438FA9D7D576C3D87E0AA17211@SHSMSX104.ccr.corp.intel.com>

On 03/16/2014 08:40 PM, Zhang, Yang Z wrote:
> Boris Ostrovsky wrote on 2014-03-14:
>> On 03/13/2014 09:48 PM, Zhang, Yang Z wrote:
>>>
>>> +/*
>>> + * Leaf 5 (0x40000004)
>>> + * HVM-specific features
>>> + */
>>> +
>>> +/* EAX Features */
>>> +#define XEN_HVM_CPUID_APIC_ACCESS_VIRT (1u << 0) /* Virtualized
>>> +APIC
>>> registers */
>>> +#define XEN_HVM_CPUID_X2APIC_VIRT      (1u << 1) /* Virtualized
>>> x2APIC accesses */
>>> I still wonder why expose the x2APIC? I guess you only want to know
>>> whether
>> the APICv is used and all platforms that support APICv must also
>> support virtualized x2apic. What can guest do if he knows there is
>> only virtuazliaed x2apic but no APICv?
>>
>> You mean if it has virtualized x2APIC but not virtualized APIC
>> registers (i.e. bit 4 in VMCS secondary controls is set but bit 8 is
>> not)? I thought that term APICv encompasses both of these features.
>>
>> Then it's up to the guest to decide whether to use APIC or pirqs:
>>
>> * If the guest is in APIC mode then it probably should stick to pirqs
>> since memory-mapped accesses to APIC will cause VMEXIT.
>> * If it is in x2APIC mode then it makes sense for it to not use pirqs
>> and go with APIC (x2APIC, really) since accesses will be handled transparently.
>>
> Does x2apic mode faster than pirq?

In terms of the number of VMEXITs -- yes, it results in far fewer of 
them. For example, eoi_pirq() may end up in a hypercall, something that 
will be avoided with virtualized x2APIC.


-boris

>
>> I said in the cover letter I am not particularly happy about having
>> two bits for this but I thought it is justified in this case.
>>
>> -boris
>
> Best regards,
> Yang
>
>

  reply	other threads:[~2014-03-17 17:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13 18:08 [PATCH v3 0/4] Expose HW APIC virtualization support to HVM guests Boris Ostrovsky
2014-03-13 18:08 ` [PATCH v3 1/4] xen/libxc: Allow changes to hypervisor CPUID leaf from config file Boris Ostrovsky
2014-03-14  8:09   ` Jan Beulich
2014-03-14 15:41     ` Boris Ostrovsky
2014-03-14 15:53       ` Jan Beulich
2014-03-13 18:08 ` [PATCH v3 2/4] x86/hvm: Revert 80ecb40362365ba77e68fc609de8bd3b7208ae19 Boris Ostrovsky
2014-03-13 18:08 ` [PATCH v3 3/4] x86/hvm: Add HVM-specific hypervisor CPUID leaf Boris Ostrovsky
2014-03-14  8:14   ` Jan Beulich
2014-03-14 14:41     ` Boris Ostrovsky
2014-03-14 14:52       ` Jan Beulich
2014-03-13 18:08 ` [PATCH v3 4/4] x86/hvm: Indicate avaliability of HW support of APIC virtualization to HVM guests Boris Ostrovsky
2014-03-14  1:48   ` Zhang, Yang Z
2014-03-14 13:55     ` Boris Ostrovsky
2014-03-17  0:40       ` Zhang, Yang Z
2014-03-17 17:18         ` Boris Ostrovsky [this message]
2014-03-14  8:16   ` 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=53272E5E.4090906@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=eddie.dong@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yang.z.zhang@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).