All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Goldstein <cardoe@gentoo.org>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: libvir-list@redhat.com, qemu-devel@nongnu.org,
	QChristophe Fergeau <cfergeau@redhat.com>,
	"Zeeshan Ali (Khattak)" <zeeshanak@gnome.org>
Subject: Re: [Qemu-devel] [libvirt] Problem setting CPU topology
Date: Tue, 10 Jul 2012 21:19:37 -0500	[thread overview]
Message-ID: <CAFWqQMT_yJGa=hJ94tTR9EJwoZDPUgBxVT+wNMDfRphTHxrikw@mail.gmail.com> (raw)
In-Reply-To: <20120710190201.GE9711@otherpad.lan.raisama.net>

On Tue, Jul 10, 2012 at 2:02 PM, Eduardo Habkost <ehabkost@redhat.com> wrote:
> On Tue, Jul 10, 2012 at 11:54:05AM +0200, Christophe Fergeau wrote:
>> On Sat, Jul 07, 2012 at 07:10:53PM +0300, Zeeshan Ali (Khattak) wrote:
>> > Hi,
>> >    I'm trying to set exact CPU topology to qemu-kvm domains to match
>> > host's topology. In my case, host topology is: 1 socket, 2 cores and 2
>> > threads. If I set the XML like this:
>> >
>> > <domain type='kvm'>
>> >   ..
>> >   <vcpu placement='static'>4</vcpu>
>> >   <os>
>> >     <type arch='i686' machine='pc-0.15'>hvm</type>
>> >     <boot dev='hd'/>
>> >   </os>
>> >   <cpu mode='host-model'>
>> >     <model fallback='allow'/>
>> >     <topology sockets='1' cores='2' threads='2'/>
>> >   </cpu>
>> > ..
>> >
>> > The qemu commandline launched for this domain looks like this:
>> >
>> > /usr/bin/qemu-kvm -name fedora17-2 -S -M pc-0.15 -cpu
>> > core2duo,+lahf_lm,+rdtscp,+aes,+popcnt,+sse4.2,+sse4.1,+pdcm,+xtpr,+cx16,+tm2,+est,+smx,+vmx,+ds_cpl,+dtes64,+pclmuldq,+pbe,+tm,+ht,+ss,+acpi,+ds
>> > -enable-kvm -m 1152 -smp 4,sockets=1,cores=2,threads=2 -uuid
>> > c573342b-2876-05b8-098e-6d5314cab062 -nodefconfig -nodefaults -chardev
>> > socket,id=charmonitor,path=/home/zeenix/.config/libvirt/qemu/lib/fedora17-2.monitor,server,nowait
>> > -mon chardev=charmonitor,id=monitor,mode=control -rtc
>> > base=utc,driftfix=slew -no-kvm-pit-reinjection -no-shutdown -no-acpi
>>
>> I debugged this together with Zeeshan, and the issue comes from this -no-acpi flag
>> which libvirt added because the domain XML was missing
>> <features><acpi/></features>
>> So in the end that was a bug in Boxes, not really a libvirt/qemu issue.
>> Unless libvirt/qemu should be taught that CPU topology won't work without ACPI
>> and complain about it?
>
> I don't think it's really impossible for any guest OS to recognize the
> CPU topology or boot the other CPUs without ACPI. It looks like it's
> just a limitation of (most?) guest OSes. If that's the case, libvirt or
> QEMU can't prevent the user from running a (possibly valid)
> configuration just because it's not very common.
>
> --
> Eduardo
>

Isn't MPS and APIC support required for a guest OS to really handle
the topology correctly? Now days ACPI provides most of that
information so its likely that QEMU doesn't support plain old MPS +
APIC. Its also possible that QEMU does support this but the kernel got
confused because I see the CPUID +acpi specified in the command line
while -no-acpi is on the command line as you noted.

-- 
Doug Goldstein

  reply	other threads:[~2012-07-11  2:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAAa3hFMNLyfwiztf1GyiV-QMu7E75kPaYK03wUAqohfpP=9N2w@mail.gmail.com>
     [not found] ` <20120710095405.GH2162@teriyaki.cdg.redhat.com>
2012-07-10 19:02   ` [Qemu-devel] [libvirt] Problem setting CPU topology Eduardo Habkost
2012-07-11  2:19     ` Doug Goldstein [this message]
2012-07-11 11:58       ` 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='CAFWqQMT_yJGa=hJ94tTR9EJwoZDPUgBxVT+wNMDfRphTHxrikw@mail.gmail.com' \
    --to=cardoe@gentoo.org \
    --cc=cfergeau@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zeeshanak@gnome.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.