All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>,
	avi@redhat.com, gleb@redhat.com, qemu-devel@nongnu.org,
	kvm@vger.kernel.org, Jan Kiszka <jan.kiszka@web.de>
Subject: Re: [PATCHv2 2/4] pc: refactor compat code
Date: Tue, 28 Aug 2012 19:31:24 +0300	[thread overview]
Message-ID: <20120828163124.GB3245@redhat.com> (raw)
In-Reply-To: <20120828162317.GA30308@amt.cnet>

On Tue, Aug 28, 2012 at 01:23:18PM -0300, Marcelo Tosatti wrote:
> On Mon, Aug 27, 2012 at 03:20:13PM +0300, Michael S. Tsirkin wrote:
> > In preparation to adding PV EOI migration for 1.2,
> > trivially refactor some some compat code
> > to make it easier to add version specific
> > cpuid tweaks.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >  hw/pc_piix.c | 44 ++++++++++++++++++++++++++++++++++++--------
> >  1 file changed, 36 insertions(+), 8 deletions(-)
> 
> Why can't you clear the cpuid bit in kvm paravirt leaf at hw/pc_piix.c, 
> leaving compat code isolated there?

This is not how we handle it for compat properties:
there we set flag in pc_piix and make devices look at
that flag.
And it makes sense because what you suggest does not scale: we can not
teach pc_piix about quirks of all hardware.

It will also scale better if we ever get interested about
compatibility and migration for non pc machines.
-- 
MST

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: gleb@redhat.com, kvm@vger.kernel.org, qemu-devel@nongnu.org,
	Jan Kiszka <jan.kiszka@web.de>,
	avi@redhat.com, Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCHv2 2/4] pc: refactor compat code
Date: Tue, 28 Aug 2012 19:31:24 +0300	[thread overview]
Message-ID: <20120828163124.GB3245@redhat.com> (raw)
In-Reply-To: <20120828162317.GA30308@amt.cnet>

On Tue, Aug 28, 2012 at 01:23:18PM -0300, Marcelo Tosatti wrote:
> On Mon, Aug 27, 2012 at 03:20:13PM +0300, Michael S. Tsirkin wrote:
> > In preparation to adding PV EOI migration for 1.2,
> > trivially refactor some some compat code
> > to make it easier to add version specific
> > cpuid tweaks.
> > 
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> >  hw/pc_piix.c | 44 ++++++++++++++++++++++++++++++++++++--------
> >  1 file changed, 36 insertions(+), 8 deletions(-)
> 
> Why can't you clear the cpuid bit in kvm paravirt leaf at hw/pc_piix.c, 
> leaving compat code isolated there?

This is not how we handle it for compat properties:
there we set flag in pc_piix and make devices look at
that flag.
And it makes sense because what you suggest does not scale: we can not
teach pc_piix about quirks of all hardware.

It will also scale better if we ever get interested about
compatibility and migration for non pc machines.
-- 
MST

  reply	other threads:[~2012-08-28 16:30 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27 12:20 [PATCHv2 0/4] migrate PV EOI MSR Michael S. Tsirkin
2012-08-27 12:20 ` [Qemu-devel] " Michael S. Tsirkin
2012-08-27 12:20 ` [PATCHv2 1/4] linux-headers: update to 3.6-rc3 Michael S. Tsirkin
2012-08-27 12:20   ` [Qemu-devel] " Michael S. Tsirkin
2012-08-27 12:42   ` Peter Maydell
2012-08-27 12:42     ` Peter Maydell
2012-08-27 12:48     ` Jan Kiszka
2012-08-27 12:48       ` Jan Kiszka
2012-08-27 14:53       ` Michael S. Tsirkin
2012-08-27 14:53         ` Michael S. Tsirkin
2012-08-27 14:59         ` Jan Kiszka
2012-08-27 14:59           ` [Qemu-devel] " Jan Kiszka
2012-08-27 18:48           ` Michael S. Tsirkin
2012-08-27 18:48             ` Michael S. Tsirkin
2012-08-27 14:50     ` Michael S. Tsirkin
2012-08-27 14:50       ` Michael S. Tsirkin
2012-08-27 12:20 ` [PATCHv2 2/4] pc: refactor compat code Michael S. Tsirkin
2012-08-27 12:20   ` [Qemu-devel] " Michael S. Tsirkin
2012-08-28 16:23   ` Marcelo Tosatti
2012-08-28 16:23     ` [Qemu-devel] " Marcelo Tosatti
2012-08-28 16:31     ` Michael S. Tsirkin [this message]
2012-08-28 16:31       ` Michael S. Tsirkin
2012-08-28 16:37       ` Marcelo Tosatti
2012-08-28 16:37         ` [Qemu-devel] " Marcelo Tosatti
2012-08-28 21:29         ` Michael S. Tsirkin
2012-08-28 21:29           ` [Qemu-devel] " Michael S. Tsirkin
2012-08-27 12:20 ` [PATCHv2 3/4] cpuid: disable pv eoi for 1.1 and older compat types Michael S. Tsirkin
2012-08-27 12:20   ` [Qemu-devel] " Michael S. Tsirkin
2012-08-27 18:58   ` Blue Swirl
2012-08-27 18:58     ` [Qemu-devel] " Blue Swirl
2012-08-27 19:06     ` Michael S. Tsirkin
2012-08-27 19:06       ` Michael S. Tsirkin
2012-08-27 19:12       ` Blue Swirl
2012-08-27 19:12         ` Blue Swirl
2012-08-27 19:24         ` Michael S. Tsirkin
2012-08-27 19:24           ` Michael S. Tsirkin
2012-08-27 19:40           ` Blue Swirl
2012-08-27 19:40             ` Blue Swirl
2012-08-28 15:46             ` Michael S. Tsirkin
2012-08-28 15:46               ` Michael S. Tsirkin
2012-08-28 17:02               ` malc
2012-08-28 17:02                 ` malc
2012-08-28 21:50                 ` Michael S. Tsirkin
2012-08-28 21:50                   ` [Qemu-devel] " Michael S. Tsirkin
2012-08-28 19:13   ` Anthony Liguori
2012-08-28 19:13     ` [Qemu-devel] " Anthony Liguori
2012-08-28 19:40     ` Eduardo Habkost
2012-08-28 19:40       ` [Qemu-devel] " Eduardo Habkost
2012-08-28 21:41       ` Michael S. Tsirkin
2012-08-28 21:41         ` Michael S. Tsirkin
2012-08-28 21:40     ` Michael S. Tsirkin
2012-08-28 21:40       ` [Qemu-devel] " Michael S. Tsirkin
2012-08-27 12:20 ` [PATCHv2 4/4] kvm: get/set PV EOI MSR Michael S. Tsirkin
2012-08-27 12:20   ` [Qemu-devel] " Michael S. Tsirkin

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=20120828163124.GB3245@redhat.com \
    --to=mst@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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.