qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH v3] virtio-pci: fix migration for pci bus master
Date: Tue, 21 Oct 2014 14:12:07 +0200	[thread overview]
Message-ID: <54464D97.5080006@suse.de> (raw)
In-Reply-To: <20141021121022.GA23466@redhat.com>



On 21.10.14 14:10, Michael S. Tsirkin wrote:
> On Tue, Oct 21, 2014 at 01:35:39PM +0200, Alexander Graf wrote:
>>
>>
>> On 21.10.14 12:16, Michael S. Tsirkin wrote:
>>> On Mon, Oct 20, 2014 at 06:08:56PM +0200, Alexander Graf wrote:
>>>>
>>>>
>>>> On 20.10.14 08:58, Michael S. Tsirkin wrote:
>>>>> Current support for bus master (clearing OK bit) together with the need to
>>>>> support guests which do not enable PCI bus mastering, leads to extra state in
>>>>> VIRTIO_PCI_FLAG_BUS_MASTER_BUG bit, which isn't robust in case of cross-version
>>>>> migration for the case when guests use the device before setting DRIVER_OK.
>>>>>
>>>>> Rip out this code, and replace it:
>>>>> -   Modern QEMU doesn't need VIRTIO_PCI_FLAG_BUS_MASTER_BUG
>>>>>     so just drop it for latest machine type.
>>>>> -   For compat machine types, set PCI_COMMAND if DRIVER_OK
>>>>>     is set.
>>>>>
>>>>> As this is needed for 2.1 for both pc and ppc, move PC_COMPAT macros from pc.h
>>>>> to a new common header.
>>>>>
>>>>> Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
>>>>> Tested-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
>>>>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>>>> ---
>>>>>
>>>>> Alexander, could you pls ack me merging this?
>>>>> Thanks!
>>>>
>>>> Have you tried whether this works with old kernel versions? We
>>>> introduced the broken flag for very specific old kernel versions that
>>>> got their flags wrong IIRC.
>>>>
>>>>
>>>> Alex
>>>
>>> Yes. The point is that since 2.1 the broken flag isn't effective
>>> anymore: when bus master is off, PCI blocks outgoing transactions and
>>> setting internal flags isn't going to help.
>>>
>>> Instead, we detect a buggy guest and immediately enable bus master for
>>> it - no need for a separate flag.
>>
>> Ok, works for me then.
>>
>>
>> Alex
> 
> cool.
> Gerd tells me there's a conflict with your next tree:
> would you like for me to wait until it's merged,
> or go ahead and send pull request and rebase yours on top?

Whoever sends it first wins I'd say ;)


Alex

  reply	other threads:[~2014-10-21 12:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20  6:58 [Qemu-devel] [PATCH v3] virtio-pci: fix migration for pci bus master Michael S. Tsirkin
2014-10-20 14:15 ` Greg Kurz
2014-10-20 16:08 ` Alexander Graf
2014-10-20 16:40   ` Greg Kurz
2014-10-21 10:16   ` Michael S. Tsirkin
2014-10-21 11:35     ` Alexander Graf
2014-10-21 12:10       ` Michael S. Tsirkin
2014-10-21 12:12         ` Alexander Graf [this message]
2014-10-21 12:36         ` 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=54464D97.5080006@suse.de \
    --to=agraf@suse.de \
    --cc=aliguori@amazon.com \
    --cc=mst@redhat.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).