qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Subject: [Qemu-devel] i386/kvm: QEMU crash when doing 'info cpus' after CPU hotplug
Date: Mon, 9 Oct 2017 19:19:15 +0200	[thread overview]
Message-ID: <20171009191915.6bd2bc69@bahia.lan> (raw)

Hi x86 folks,

While trying to reproduce on x86 an issue we're currently hitting on ppc,
I got this:

$ ./x86_64-softmmu/qemu-system-x86_64 -snapshot -no-shutdown -nographic -machine q35,accel=kvm -smp 1,maxcpus=2 -serial mon:stdio -drive file=$HOME/images/fedora26-x86_64.qcow2,if=virtio
QEMU 2.10.50 monitor - type 'help' for more information
(qemu) device_add host-x86_64-cpu,socket-id=1,core-id=0,thread-id=0,id=foo
(qemu) info cpus
error: failed to get MSR 0x38d
qemu-system-x86_64: /home/greg/Work/qemu/qemu-devel/target/i386/kvm.c:2121: kvm_get_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
Aborted (core dumped)

Same happens with a pc machine.

But it doesn't happen if I use cpu-add instead of device_add:

(qemu) cpu-add 1
(qemu) [    8.335221] CPU1 has been hot-added
(qemu) info cpus
* CPU #0: pc=0xffffffffb08986e6 (halted) thread_id=23964
  CPU #1: pc=0x00000000fffffff0 thread_id=24001

This is with the QEMU master branch SHA1 530049bc1dcc24c.

Cheers,

--
Greg

             reply	other threads:[~2017-10-09 17:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09 17:19 Greg Kurz [this message]
2017-10-10 12:40 ` [Qemu-devel] i386/kvm: QEMU crash when doing 'info cpus' after CPU hotplug Igor Mammedov
2017-10-10 15:39   ` Greg Kurz

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=20171009191915.6bd2bc69@bahia.lan \
    --to=groug@kaod.org \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@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).