From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>, jbeulich@suse.com
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH] x86: Correctly report max number of hypervisor leaves
Date: Mon, 2 Jun 2014 11:29:48 +0200 [thread overview]
Message-ID: <538C440C.10608@citrix.com> (raw)
In-Reply-To: <1401480676-4542-1-git-send-email-boris.ostrovsky@oracle.com>
On 30/05/14 22:11, Boris Ostrovsky wrote:
> Commit def0bbd31 provided support for changing max number of
> hypervisor cpuid leaves (in leaf 0x4000xx00). It also made the
> hypervisor incorrectly report this number for guests that
> use default value (i.e. don't specify leaf 0x4000xx00 in config
> file)
>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Reported-by: Roger Pau Monne <roger.pau@citrix.com>
Tested-by: Roger Pau Monné <roger.pau@citrix.com>
However I think we should prevent PVH guests from seeing the newly
introduced XEN_HVM_CPUID_APIC_ACCESS_VIRT and
XEN_HVM_CPUID_X2APIC_VIRT flags. I have the following patch, but it
still adds one more is_pvh_vcpu into VMX code. I've tried checking for
vlapic_enabled, but it also returns true for PVH guests.
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index d45fb7f..ecc010e 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1660,7 +1660,7 @@ void vmx_hypervisor_cpuid_leaf(uint32_t sub_idx,
uint32_t *eax, uint32_t *ebx,
uint32_t *ecx, uint32_t *edx)
{
- if ( sub_idx != 0 )
+ if ( sub_idx != 0 || is_pvh_vcpu(current) )
return;
if ( cpu_has_vmx_apic_reg_virt )
*eax |= XEN_HVM_CPUID_APIC_ACCESS_VIRT;
next prev parent reply other threads:[~2014-06-02 9:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 20:11 [PATCH] x86: Correctly report max number of hypervisor leaves Boris Ostrovsky
2014-06-02 9:29 ` Roger Pau Monné [this message]
2014-06-02 10:36 ` 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=538C440C.10608@citrix.com \
--to=roger.pau@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xen.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.