qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: mtosatti@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org,
	avi@redhat.com
Subject: Re: [Qemu-devel] [PATCH 3/3] apic: always update the in-kernel status after loading
Date: Tue, 30 Oct 2012 19:17:42 +0100	[thread overview]
Message-ID: <509019C6.7060301@web.de> (raw)
In-Reply-To: <1351599394-24876-4-git-send-email-pbonzini@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]

On 2012-10-30 13:16, Paolo Bonzini wrote:
> The LAPIC is loaded separately from the rest of the VCPU state.  Thus,
> when restoring the CPU the dummy post-reset state is passed to the
> in-kernel APIC.
> 
> This can cause MSI injection to fail if attempted during the restore of
> another device, because the LAPIC believes it's not enabled.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/apic_common.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/apic_common.c b/hw/apic_common.c
> index f373ba8..1ef52b2 100644
> --- a/hw/apic_common.c
> +++ b/hw/apic_common.c
> @@ -362,6 +362,7 @@ static int apic_dispatch_post_load(void *opaque, int version_id)
>      if (info->post_load) {
>          info->post_load(s);
>      }
> +    cpu_put_apic_state(DEVICE(s));

Just implement a post_load handler for the KVM APIC and trigger putting
from there.

Jan

>      return 0;
>  }
>  
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  parent reply	other threads:[~2012-10-30 18:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30 12:16 [Qemu-devel] [PATCH uq/master 0/3] Fix MSI injection at load time Paolo Bonzini
2012-10-30 12:16 ` [Qemu-devel] [PATCH 1/3] kvm: move KVM_GET_LAPIC/KVM_SET_LAPIC to hw/kvm/apic.c Paolo Bonzini
2012-10-30 18:13   ` Jan Kiszka
2012-10-30 12:16 ` [Qemu-devel] [PATCH 2/3] apic: add get/put methods Paolo Bonzini
2012-10-30 18:17   ` Jan Kiszka
2012-10-30 12:16 ` [Qemu-devel] [PATCH 3/3] apic: always update the in-kernel status after loading Paolo Bonzini
2012-10-30 12:38   ` Avi Kivity
2012-10-30 14:16     ` Paolo Bonzini
2012-10-30 18:21       ` Jan Kiszka
2012-11-02 14:53         ` Paolo Bonzini
2012-11-02 14:59           ` Jan Kiszka
2012-11-02 15:07             ` Gerd Hoffmann
2012-11-02 15:13               ` Paolo Bonzini
2012-11-02 15:17                 ` Gerd Hoffmann
2012-11-02 15:21                   ` Paolo Bonzini
2012-10-30 18:17   ` Jan Kiszka [this message]
2012-10-30 12:16 ` [Qemu-devel] [PATCH 4/3] ioapic: change pre_save/post_load methods to get/put Paolo Bonzini
2012-10-30 18:18   ` Jan Kiszka
2012-10-30 12:16 ` [Qemu-devel] [PATCH 5/3] ioapic: unify reset callbacks Paolo Bonzini
2012-10-30 16:47 ` [Qemu-devel] [PATCH uq/master 0/3] Fix MSI injection at load time Paolo Bonzini
2012-10-30 18:22   ` Jan Kiszka

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=509019C6.7060301@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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).