qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [libvirt] Modern CPU models cannot be used with libvirt


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [libvirt] Modern CPU models cannot be used with libvirt
Date: Mon, 12 Mar 2012 12:16:37 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Mar 12, 2012 at 09:48:11AM -0500, Anthony Liguori wrote:
> On 03/11/2012 11:16 AM, Gleb Natapov wrote:
> >On Sun, Mar 11, 2012 at 10:33:15AM -0500, Anthony Liguori wrote:
> >>On 03/11/2012 09:56 AM, Gleb Natapov wrote:
> >>>On Sun, Mar 11, 2012 at 09:12:58AM -0500, Anthony Liguori wrote:
> >>>>-cpu best wouldn't solve this.  You need a read/write configuration
> >>>>file where QEMU probes the available CPU and records it to be used
> >>>>for the lifetime of the VM.
> >>>That what I thought too, but this shouldn't be the case (Avi's idea).
> >>>We need two things: 1) CPU model config should be per machine type.
> >>>2) QEMU should refuse to start if it cannot create cpu exactly as
> >>>specified by model config.
> >>
> >>This would either mean:
> >>
> >>A. pc-1.1 uses -cpu best with a fixed mask for 1.1
> >>
> >>B. pc-1.1 hardcodes Westmere or some other family
> >>
> >This would mean neither A nor B. May be it wasn't clear but I didn't talk
> >about -cpu best above. I am talking about any CPU model with fixed meaning
> >(not host or best which are host cpu dependant). Lets take Nehalem for
> >example (just to move from Westmere :)). Currently it has level=2. Eduardo
> >wants to fix it to be 11, but old guests, installed with -cpu Nehalem,
> >should see the same CPU exactly. How do you do it? Have different
> >Nehalem definition for pc-1.0 (which level=2) and pc-1.1 (with level=11).
> >Lets get back to Westmere. It actually has level=11, but that's only
> >expose another problem. Kernel 3.3 and qemu-1.1 combo will support
> >architectural PMU which is exposed in cpuid leaf 10. We do not want
> >guests installed with -cpu Westmere and qemu-1.0 to see architectural
> >PMU after upgrade. How do you do it? Have different Westmere definitions
> >for pc-1.0 (does not report PMU) and pc-1.1 (reports PMU). What happens
> >if you'll try to run qemu-1.1 -cpu Westmere on Kernel<  3.3 (without
> >PMU support)? Qemu will fail to start.
> 
> So, you're essentially proposing that -cpu Westmere becomes a machine
> option and that we let the machines interpret it as they see fit?
> 
> So --machine pc-1.0,cpu=Westmere would result in something different
> than --machine pc-1.1,cpu=Westmere?

Exactly.

> That's something pretty different than what we're doing today.  I
> think that we would have a single CPUX86 object and that part of the
> pc initialization process was to create an appropriately configured
> CPUx86 object.

Yes, that's different from what we're doing today, and it has to be
fixed.

(And, BTW, I'm really worried about your proposal that machine-types
would suddenly disappear when using -nodefconfig in case we decide to
move machine-type data to an external file one day. Design decisions
aside, this would break an interface that management tools already have
today.)

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]