From: "Andreas Färber" <afaerber@suse.de>
To: Igor Mammedov <imammedo@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Jia Liu <proljc@gmail.com>, Anthony Green <green@moxielogic.com>,
qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,
Blue Swirl <blauwirbel@gmail.com>,
Max Filippov <jcmvbkbc@gmail.com>,
Michael Walle <michael@walle.cc>, qemu-ppc <qemu-ppc@nongnu.org>,
Paul Brook <paul@codesourcery.com>,
chen.fan.fnst@cn.fujitsu.com,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Guan Xuetao <gxt@mprc.pku.edu.cn>,
Aurelien Jarno <aurelien@aurel32.net>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH qom-cpu for-1.6] cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"
Date: Sun, 28 Jul 2013 13:20:28 +0200 [thread overview]
Message-ID: <51F4FE7C.6050403@suse.de> (raw)
In-Reply-To: <20130728081309.3f904480@thinkpad>
Am 28.07.2013 08:13, schrieb Igor Mammedov:
> On Sat, 27 Jul 2013 04:01:50 +0200
> Andreas Färber <afaerber@suse.de> wrote:
>
>> Commit c643bed99 moved qemu_init_vcpu() calls to common CPUState code.
>> This causes x86 cpu-add to fail with "KVM: setting VAPIC address failed".
>>
>> The reason for the failure is that CPUClass::kvm_fd is not yet
>> initialized in the following call graph:
>> ->x86_cpu_realizefn
>> ->x86_cpu_apic_realize
>> ->qdev_init
>> ->device_set_realized
>> ->device_reset (hotplugged == 1)
>> ->apic_reset_common
>> ->vapic_base_update
>> ->kvm_apic_vapic_base_update
>> This causes attempted KVM vCPU ioctls to fail.
>>
>> By contrast, in the non-hotplug case the APIC is reset much later, when
>> the vCPU is already initialized.
>>
>> As a quick and safe solution, move the qemu_init_vcpu() call back into
>> the targets' realize functions.
>>
>> Reported-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>
> ACK for target-i386
Thanks, applied to qom-cpu:
https://github.com/afaerber/qemu-cpu/commits/qom-cpu
I used the diff of the offending commit to determine placement of
qemu_init_vcpu() and only avoided duplicate CPU() casts, so other
targets should be fine as well.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-07-28 11:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-27 2:01 [Qemu-devel] [PATCH qom-cpu for-1.6] cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState" Andreas Färber
2013-07-28 6:13 ` Igor Mammedov
2013-07-28 11:20 ` Andreas Färber [this message]
2013-07-28 12:31 ` Jia Liu
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=51F4FE7C.6050403@suse.de \
--to=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--cc=chen.fan.fnst@cn.fujitsu.com \
--cc=edgar.iglesias@gmail.com \
--cc=green@moxielogic.com \
--cc=gxt@mprc.pku.edu.cn \
--cc=imammedo@redhat.com \
--cc=jcmvbkbc@gmail.com \
--cc=michael@walle.cc \
--cc=paul@codesourcery.com \
--cc=peter.maydell@linaro.org \
--cc=proljc@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/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.