qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Igor Mammedov" <imammedo@redhat.com>,
	qemu-devel@nongnu.org, "Gleb Natapov" <gleb@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [qom-cpu PATCH 2/2] i386: disable PMU passthrough mode by default
Date: Tue, 23 Jul 2013 21:43:06 +0200	[thread overview]
Message-ID: <51EEDCCA.600@redhat.com> (raw)
In-Reply-To: <20130723174107.GA18526@otherpad.lan.raisama.net>

Il 23/07/2013 19:41, Eduardo Habkost ha scritto:
> On Tue, Jul 23, 2013 at 06:23:08PM +0200, Paolo Bonzini wrote:
>> Il 23/07/2013 17:40, Eduardo Habkost ha scritto:
>>> On Tue, Jul 23, 2013 at 05:09:02PM +0200, Paolo Bonzini wrote:
>>>> Il 23/07/2013 16:13, Eduardo Habkost ha scritto:
>>>>> On Tue, Jul 23, 2013 at 11:18:03AM +0200, Paolo Bonzini wrote:
>>>>>> Il 22/07/2013 21:25, Eduardo Habkost ha scritto:
>>>>>>> Bug description: QEMU currently gets all bits from GET_SUPPORTED_CPUID
>>>>>>> for CPUID leaf 0xA and passes them directly to the guest. This makes
>>>>>>> the guest ABI depend on host kernel and host CPU capabilities, and
>>>>>>> breaks live migration if we migrate between host with different
>>>>>>> capabilities (e.g. different number of PMU counters).
>>>>>>>
>>>>>>> This patch adds a "pmu-passthrough" property to X86CPU, and set it to
>>>>>>> true only on "-cpu host", or on pc-*-1.5 and older machine-types.
>>>>>>
>>>>>> Can we just call the property "pmu"?  It doesn't have to be passthough.
>>>>>
>>>>> Yes, but the only options we have today are "no PMU" and "passthrough
>>>>> PMU". I wouldn't like to make "pmu=on" enable the passthrough behavior
>>>>> implicitly (I don't want things that break live-migration to be enabled
>>>>> without making it explicit that it is a host-dependent/passthrough
>>>>> mode).
>>>>
>>>> I think "passthrough PMU" should be considered a bug except of course
>>>> with "-cpu host".
>>>>
>>>> If "-cpu Nehalem,pmu=on" goes from passthrough to Nehalem-compatible in
>>>> a future QEMU release, that'll be a bugfix.
>>>
>>> Exactly. But then I don't understand your suggestion. We still need a
>>> property to enable pasthrough behavior on old machine-types (not
>>> perfect, but a best-effort way to try to keep compatibility),
>>
>> Do we?
>>
>> We only need "pmu=on"---which right now is buggy on old machine types
>> because it will always passthrough.
> 
> I am not sure I understand what you are arguing for.
> 
> You agree that pmu=on needs to keep the buggy passthrough behavior on
> pc-1.5 and older, right?

I agree it needs to remain enabled on 1.5.  But if, for example, 1.8
makes pmu=on emulate a Nehalem-compatible PMU, I think it is fine if
pc-1.5 moves from a host-compatible PMU to a Nehalem-compatible PMU.

The reason is that pc-1.5 has never guaranteed any feature of the
emulated PMU.

Paolo

  reply	other threads:[~2013-07-23 20:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22 19:25 [Qemu-devel] [qom-cpu PATCH 0/2] i386: disable PMU passthrough mode by default Eduardo Habkost
2013-07-22 19:25 ` [Qemu-devel] [qom-cpu PATCH 1/2] i386: pass X86CPU object to cpu_x86_find_by_name() Eduardo Habkost
2013-07-22 19:25 ` [Qemu-devel] [qom-cpu PATCH 2/2] i386: disable PMU passthrough mode by default Eduardo Habkost
2013-07-23  6:01   ` Igor Mammedov
2013-07-23 14:18     ` Eduardo Habkost
2013-07-23  9:18   ` Paolo Bonzini
2013-07-23 14:13     ` Eduardo Habkost
2013-07-23 15:09       ` Paolo Bonzini
2013-07-23 15:40         ` Eduardo Habkost
2013-07-23 16:23           ` Paolo Bonzini
2013-07-23 17:41             ` Eduardo Habkost
2013-07-23 19:43               ` Paolo Bonzini [this message]
2013-07-24 13:15                 ` Eduardo Habkost
2013-07-24 13:21                   ` Paolo Bonzini
2013-07-24 13:44                     ` Eduardo Habkost
2013-07-26 16:19 ` [Qemu-devel] [qom-cpu PATCH 0/2] " Andreas Färber
2013-07-26 16:29   ` Eduardo Habkost

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=51EEDCCA.600@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=ehabkost@redhat.com \
    --cc=gleb@redhat.com \
    --cc=imammedo@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).