All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
	qemu-devel@nongnu.org, mtosatti@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH 3/3] apic: always update the in-kernel status after loading
Date: Fri, 02 Nov 2012 15:59:11 +0100	[thread overview]
Message-ID: <5093DFBF.9010900@siemens.com> (raw)
In-Reply-To: <5093DE70.6030007@redhat.com>

On 2012-11-02 15:53, Paolo Bonzini wrote:
> Il 30/10/2012 19:21, Jan Kiszka ha scritto:
>>>> Aren't we still dependent on the order of processing?  If the APIC is
>>>> restored after the device, won't we get the same problem?
>>>
>>> Strictly speaking yes, but CPUs and APICs are always the first devices
>>> to be saved.
>> Hmm, thinking about this again: Why is the MSI event injected at all
>> during restore, specifically while the device models are in transitional
>> state. Can you explain this?
> 
> Because the (virtio-serial) port was connected on the source and
> disconnected on the destination, or vice versa.
> 
> In my simplified reproducer, I'm really using different command-lines on
> the source and destination, but it is not necessary.  For example, if
> you have a socket backend, the destination will usually be disconnected
> at the time the machine loads.
> 
> One alternative fix is a vm_clock timer that expires immediately.  It
> would fix both MSI and INTx, on the other hand I thought it was an APIC
> bug because the QEMU APIC works nicely.

I think deferring IRQ events to the point when the complete vmstate is
loaded is the cleaner and more robust approach.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: mtosatti@redhat.com, Avi Kivity <avi@redhat.com>,
	kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] apic: always update the in-kernel status after loading
Date: Fri, 02 Nov 2012 15:59:11 +0100	[thread overview]
Message-ID: <5093DFBF.9010900@siemens.com> (raw)
In-Reply-To: <5093DE70.6030007@redhat.com>

On 2012-11-02 15:53, Paolo Bonzini wrote:
> Il 30/10/2012 19:21, Jan Kiszka ha scritto:
>>>> Aren't we still dependent on the order of processing?  If the APIC is
>>>> restored after the device, won't we get the same problem?
>>>
>>> Strictly speaking yes, but CPUs and APICs are always the first devices
>>> to be saved.
>> Hmm, thinking about this again: Why is the MSI event injected at all
>> during restore, specifically while the device models are in transitional
>> state. Can you explain this?
> 
> Because the (virtio-serial) port was connected on the source and
> disconnected on the destination, or vice versa.
> 
> In my simplified reproducer, I'm really using different command-lines on
> the source and destination, but it is not necessary.  For example, if
> you have a socket backend, the destination will usually be disconnected
> at the time the machine loads.
> 
> One alternative fix is a vm_clock timer that expires immediately.  It
> would fix both MSI and INTx, on the other hand I thought it was an APIC
> bug because the QEMU APIC works nicely.

I think deferring IRQ events to the point when the complete vmstate is
loaded is the cleaner and more robust approach.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2012-11-02 14:59 UTC|newest]

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