From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Gabriel L. Somlo" <gsomlo@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Alexander Graf <agraf@suse.de>,
kvm@vger.kernel.org, Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH v2] kvm: x86: emulate monitor and mwait instructions as nop
Date: Wed, 4 Jun 2014 22:40:10 +0300 [thread overview]
Message-ID: <20140604194010.GB744@redhat.com> (raw)
In-Reply-To: <20140604193337.GJ1653@ERROL.INI.CMU.EDU>
On Wed, Jun 04, 2014 at 03:33:38PM -0400, Gabriel L. Somlo wrote:
> On Wed, Jun 04, 2014 at 10:08:12PM +0300, Michael S. Tsirkin wrote:
> > On Wed, Jun 04, 2014 at 06:34:04PM +0200, Paolo Bonzini wrote:
> > > Il 04/06/2014 16:44, Alexander Graf ha scritto:
> > > >
> > > >
> > > >>Obviously, if you really like the current behavior better you can
> > > >>always reject whatever patch I'll come up with, but I'd like to at
> > > >>least try and see what it would look like :)
> > > >
> > > >I think it's perfectly fine to leave mwait always implemented as NOP -
> > > >it's valid behavior.
> > > >
> > > >As for the CPUID exposure, that should be a pure QEMU thing. If
> > > >overriding CPUID bits the kernel mask tells us doesn't work today, we
> > > >should just make it possible :).
> > >
> > > That should be the purpose of KVM_GET_EMULATED_CPUID, so MWAIT could be
> > > added in __do_cpuid_ent_emulated. However, the corresponding QEMU patches
> > > were never included. Borislav, can you refresh them?
> > >
> > > Paolo
> >
> > I don't understand why would we want mwait bit set in CPUID.
> > The only reason we want the nop is because of broken guests which
> > don't check CPUID.
>
> E.g., OS X 10.5 *does* check CPUID, and panics if it doesn't find it.
> It needs the MONITOR cpuid flag to be on, *and* the actual
> instructions to work.
Aha. I didn't realize this. I thought it used mwait without
checking CPUID.
> HOWEVER: I really do NOT want us to bend over backwards to support it,
> I think having 10.6 and up working is good enough. Besides, there are
> other problems we'd run into with 10.5 if we got the mwait situation
> taken care of, so even more reason to leave well enough alone.
>
> Thanks,
> --Gabriel
>
> PS. Thanks again for everyone's patience while I wrapped my head
> around the fine details :)
It's up to you of course. If some guests refuse to run without
the CPUID bit, then of course an option to set it might be useful.
Sorry about misunderstanding and making noise.
--
MST
next prev parent reply other threads:[~2014-06-04 19:39 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 20:52 [PATCH v2] kvm: x86: emulate monitor and mwait instructions as nop Gabriel L. Somlo
2014-06-02 19:25 ` Gabriel L. Somlo
2014-06-02 19:48 ` Alexander Graf
2014-06-02 20:20 ` Michael S. Tsirkin
2014-06-02 20:35 ` Alexander Graf
2014-06-02 20:41 ` Michael S. Tsirkin
2014-06-02 21:01 ` Alexander Graf
2014-06-03 1:55 ` Gabriel L. Somlo
2014-06-02 20:24 ` Michael S. Tsirkin
2014-06-03 9:17 ` Paolo Bonzini
2014-06-03 14:21 ` Gabriel L. Somlo
2014-06-03 15:37 ` Alexander Graf
2014-06-03 19:07 ` Gabriel L. Somlo
2014-06-10 10:16 ` Michael S. Tsirkin
2014-06-04 14:39 ` Gabriel L. Somlo
2014-06-04 14:44 ` Alexander Graf
2014-06-04 15:05 ` Gabriel L. Somlo
2014-06-04 15:09 ` Alexander Graf
2014-06-04 17:07 ` Gabriel L. Somlo
2014-06-04 19:06 ` Michael S. Tsirkin
2014-06-04 19:24 ` Gabriel L. Somlo
2014-06-04 19:37 ` Michael S. Tsirkin
2014-06-04 16:34 ` Paolo Bonzini
2014-06-04 19:08 ` Michael S. Tsirkin
2014-06-04 19:33 ` Gabriel L. Somlo
2014-06-04 19:40 ` Michael S. Tsirkin [this message]
2014-06-04 19:12 ` Nadav Amit
2014-06-04 19:43 ` Gabriel L. Somlo
2014-06-04 20:44 ` Borislav Petkov
2014-06-05 14:40 ` Eduardo Habkost
2014-06-05 20:59 ` Eric Northup
2014-06-05 21:19 ` Gabriel L. Somlo
[not found] <46EF8587-E226-44C5-930A-49E4F7FBBC82@gmail.com>
2014-06-04 20:01 ` Nadav Amit
2014-06-04 20:11 ` Gabriel L. Somlo
2014-06-04 20:55 ` Nadav Amit
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=20140604194010.GB744@redhat.com \
--to=mst@redhat.com \
--cc=agraf@suse.de \
--cc=bp@alien8.de \
--cc=gsomlo@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.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