qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: "Andreas Färber" <afaerber@suse.de>
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>, PowerPC <qemu-ppc@nongnu.org>,
	Paul Brook <paul@codesourcery.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	Guan Xuetao <gxt@mprc.pku.edu.cn>,
	Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PULL for-1.6 1/3] cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"
Date: Mon, 29 Jul 2013 07:41:18 -1000	[thread overview]
Message-ID: <51F6A93E.2000807@twiddle.net> (raw)
In-Reply-To: <1375111939-19577-2-git-send-email-afaerber@suse.de>

On 07/29/2013 05:32 AM, Andreas Färber 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>
> Acked-by: Igor Mammedov <imammedo@redhat.com> (for i386)
> Tested-by: Jia Liu <proljc@gmail.com> (for openrisc)
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Tested-by: Richard Henderson <rth@twiddle.net> (for Alpha)


r~

  reply	other threads:[~2013-07-29 17:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 15:32 [Qemu-devel] [PULL 0/3] QOM CPUState patch queue 2013-07-29 Andreas Färber
2013-07-29 15:32 ` [Qemu-devel] [PULL for-1.6 1/3] cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState" Andreas Färber
2013-07-29 17:41   ` Richard Henderson [this message]
2013-07-29 15:32 ` [Qemu-devel] [PULL for-1.6 2/3] target-i386: Pass X86CPU object to cpu_x86_find_by_name() Andreas Färber
2013-07-29 15:32 ` [Qemu-devel] [PULL for-1.6 3/3] target-i386: Disable PMU CPUID leaf by default Andreas Färber

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=51F6A93E.2000807@twiddle.net \
    --to=rth@twiddle.net \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=green@moxielogic.com \
    --cc=gxt@mprc.pku.edu.cn \
    --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 \
    /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).