qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@gmail.com>
To: qemu-devel@nongnu.org
Cc: Glauber Costa <glommer@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>
Subject: Re: [Qemu-devel] Re: [PATCH 3/4] mask out forbidden cpuid features with kvm ioctl
Date: Fri, 30 Jan 2009 10:37:45 -0200	[thread overview]
Message-ID: <5d6222a80901300437y2dde03dak2c9a91f8a1783730@mail.gmail.com> (raw)
In-Reply-To: <498216B0.9030400@us.ibm.com>

On Thu, Jan 29, 2009 at 6:50 PM, Anthony Liguori <aliguori@us.ibm.com> wrote:
> Glauber Costa wrote:
>>
>> KVM has a (so far unused) ioctl to inform userspace
>> about supported cpuid bits in the current host.
>>
>> The lack of this kind of checking can lead to bugs in which
>> a cpuid bit is exposed but not supported by the host kernel
>> (an example is fedora bug
>> https://bugzilla.redhat.com/show_bug.cgi?id=481274)
>>
>> The current host_cpuid code is replaced by this general check.
>>
>> Signed-off-by: Glauber Costa <glommer@redhat.com>
>>
>
> So what do we do about live migration?  Does KVM mask a set of bits
> unconditionally?  Before, we were masking unconditionally which should
> insulate migration reasonable well.
>

Just to be clear:

Are you raising the flag against the lack of unconditional mask only,
or about it + querying kvm.ko for supported bits?

I think we need to query it anyway, because calling cpuid will only
give you information about your cpu, and querying the kernel will give
you this, plus information about what the kernel supports (think of
the 32 bit kernel on 64 bit hardware case), plus whatever else kvm
wants to mask for whatever reason.

About migration, I was under the impression that the solution we were
going towards was based on defining a kvm machine type that would
contain a common set of features among the hosts involved. If this is
the case, I believe we don't need to unconditionally mask out
anything, since the features we expose in the machine type won't even
have the problematic features.

If this is not the case, I'm fine with redoing this patch with
querying kvm.ko + unconditional mask of potentially problematic
features.

-- 
Glauber  Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."

  reply	other threads:[~2009-01-30 12:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-29 17:19 [Qemu-devel] [PATCH 0/4] Improve cpuid x86 code Glauber Costa
2009-01-29 17:19 ` [Qemu-devel] [PATCH 1/4] convert cpuid registration to KVM_SET_CPUID2 Glauber Costa
2009-01-29 17:19   ` [Qemu-devel] [PATCH 2/4] Factor out common code in filling cpuid code Glauber Costa
2009-01-29 17:19     ` [Qemu-devel] [PATCH 3/4] mask out forbidden cpuid features with kvm ioctl Glauber Costa
2009-01-29 17:19       ` [Qemu-devel] [PATCH 4/4] kvm pv features PART I Glauber Costa
2009-01-29 19:17         ` Glauber Costa
2009-01-29 20:50       ` [Qemu-devel] Re: [PATCH 3/4] mask out forbidden cpuid features with kvm ioctl Anthony Liguori
2009-01-30 12:37         ` Glauber Costa [this message]
2009-02-03 21:25         ` Avi Kivity
2009-02-04  6:26           ` Amit Shah
2009-02-03 21:27         ` Avi Kivity
2009-02-03 21:36           ` Anthony Liguori
2009-01-30 10:15 ` [Qemu-devel] [PATCH 0/4] Improve cpuid x86 code Amit Shah

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=5d6222a80901300437y2dde03dak2c9a91f8a1783730@mail.gmail.com \
    --to=glommer@gmail.com \
    --cc=aliguori@us.ibm.com \
    --cc=glommer@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 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).