From: "Nadav Har'El" <nyh@math.technion.ac.il>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-devel@nongnu.org, avi@redhat.com
Subject: Re: [Qemu-devel] [PATCH] Add VMX cpuid feature to qemu64
Date: Tue, 4 Jan 2011 23:39:07 +0200 [thread overview]
Message-ID: <20110104213907.GA6364@fermat.math.technion.ac.il> (raw)
In-Reply-To: <8153A341-349B-4A89-A737-DCF5187FFE23@suse.de>
On Tue, Jan 04, 2011, Alexander Graf wrote about "Re: [Qemu-devel] [PATCH] Add VMX cpuid feature to qemu64":
>
> On 04.01.2011, at 16:06, Nadav Har'El wrote:
>
> > This patch adds the "VMX" cpuid feature to the default "qemu64" CPU type.
> > If KVM doesn't support this feature (i.e., nested VMX is not in the code,
> > or not enabled) it will mask out this bit.
>
> "qemu64" defines capabilities that qemu emulates. Qemu does not emulate VMX. So it doesn't belong there. I thought we had a "kvm64" type for your use case?
I have to apologize for making such beginner's mistakes, because I am not
very familiar with the inner workings of qemu.
It seemed to me, but please correct me if I'm wrong, that when I use qemu-kvm,
the default CPU type is "qemu64", not "kvm64", despite my using of KVM.
In this is true, why shouldn't qemu64 indeed include all the bits that KVM
may (perhaps) support? I wanted qemu-kvm to support nested VMX whenever the
underlying KVM supports this, without needing to resort to special "-cpu ..."
options.
I'm not sure what you meant by Qemu emulating SVM as the reason why SVM (but
not VMX) appears in qemu64's capabilities. As far as I understand, when you
use KVM, qemu doesn't emulate any of the CPU capabilities - rather, any
capability that KVM cannot support (such as nested SVM on an Intel processor)
are removed from the CPUID capabilties list.
Now that I think of it, perhaps I'm writing to the wrong mailing list?
Is there a separate mailing list for the development of qemu-kvm, as
opposed to the "general" qemu? I actually came here after being told by
the KVM developers to write to the "qemu-devel" mailing list...
> > Note that other relevant CPU types, such as "core2duo" already correctly
> > include the VMX feature, and "qemu64" already includes the SVM feature
>
> "core2duo" really shouldn't include VMX as qemu simply can't emulate it. Qemu does emulate SVM, hence the bit in the "qemu64" type.
Well, as you can see in target-i386/cpuid.c, at least in the qemu version
I checked out from KVM's repository, the "core2duo" and "coreduo" cpu types
do list the CPUID_EXT_VMX - and those are the only ones that list this feature.
I don't understand why they should have this bit, and qemu64 not, or,
alternatively - if none of those had the CPUID_EXT_VMX bit, how am I supposed
to run qemu to allow KVM to do nested VMX? I can think of some tricks (the
easiest is to use "-cpu host"), but why should these tricks be necessary
when they aren't for nested SVM? And when real core2duo CPUs *do* have VMX,
so if we try to accurately emulate them, we do need to support (nested) VMX?
Thanks in advance, and again I apologize if I'm missing the obvious, or
writing to the wrong mailing list.
--
Nadav Har'El | Tuesday, Jan 4 2011, 29 Tevet 5771
nyh@math.technion.ac.il |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |Sign above a shop selling burglar alarms:
http://nadav.harel.org.il |"For the man who has everything"
next prev parent reply other threads:[~2011-01-04 21:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-04 15:06 [Qemu-devel] [PATCH] Add VMX cpuid feature to qemu64 Nadav Har'El
2011-01-04 15:53 ` Alexander Graf
2011-01-04 21:39 ` Nadav Har'El [this message]
2011-01-04 21:55 ` Alexander Graf
2011-01-05 8:17 ` Nadav Har'El
2011-01-05 8:32 ` Avi Kivity
2011-01-05 8:50 ` Nadav Har'El
2011-01-05 9:06 ` Avi Kivity
2011-01-05 9:22 ` Nadav Har'El
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=20110104213907.GA6364@fermat.math.technion.ac.il \
--to=nyh@math.technion.ac.il \
--cc=agraf@suse.de \
--cc=avi@redhat.com \
--cc=qemu-devel@nongnu.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.