From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Gavin Shan <shangw@linux.vnet.ibm.com>,
kvm@vger.kernel.org, aik@ozlabs.ru
Subject: Re: [PATCH 3/3] drivers/vfio/pci: Fix MSIx message lost
Date: Mon, 03 Mar 2014 16:05:06 +1100 [thread overview]
Message-ID: <1393823106.10727.30.camel@pasglop> (raw)
In-Reply-To: <1393822189.2895.30.camel@ul30vt.home>
On Sun, 2014-03-02 at 21:49 -0700, Alex Williamson wrote:
> I understand from talking to Alexey that the BARs are reset by this
> BIST, but what about the MSIX capability? If that gets reset to be
> disabled, where does it get re-enabled?
The guest will do pci_save/restore_state iirc which will attempt
to save and restore everything, but qemu might get in the way here...
I'm not sure whether the IPR BIST clears the config space but we
probably should account for the general case of the driver in the guest
doing some kind of reset (BIST or otherwise) and trying to save and
restore state itself.
> QEMU won't know about the BIST,
> so probably assumes nothing changed when the guest writes the enable
> bit. VFIO doesn't allow userspace writes to the MSIX capability. So it
> seems like the above would restore the table entry, but not necessarily
> whether MSIX is enabled on the device.
Maybe qemu shouldn't trust its cache and upon guest writes, do a read
first to check the HW state ? It's not like any of this is performance
sensitive anyway...
> When I talked with Alexey I noted that we already have a BAR restore
> function, vfio_bar_restore(), that tries to do some fixup when backdoor
> resets are noticed. If we were to trigger that upon noting the user
> writing BAR values to what we think they're already set to, we could
> extend it to trigger an interrupt restore that could fixup both the
> capability and the table entries. Thanks,
Cheers,
Ben.
next prev parent reply other threads:[~2014-03-03 5:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-03 3:24 [PATCH 1/3] drivers/vfio: Rework offsetofend() Gavin Shan
2014-03-03 3:24 ` [PATCH 2/3] drivers/vfio/pci: Fix wrong MSI interrupt count Gavin Shan
2014-03-03 4:17 ` Alex Williamson
2014-03-03 3:24 ` [PATCH 3/3] drivers/vfio/pci: Fix MSIx message lost Gavin Shan
2014-03-03 3:51 ` Benjamin Herrenschmidt
2014-03-03 4:43 ` Alexey Kardashevskiy
2014-03-03 5:00 ` Benjamin Herrenschmidt
2014-03-03 4:49 ` Alex Williamson
2014-03-03 5:05 ` Benjamin Herrenschmidt [this message]
[not found] ` <20140303061036.GA4447@shangw.(null)>
2014-03-03 19:36 ` Alex Williamson
[not found] ` <20140304023018.GA21672@shangw.(null)>
2014-03-04 20:45 ` Alex Williamson
-- strict thread matches above, loose matches on Subject: below --
2014-03-10 5:46 [PATCH 0/3] VFIO Bug Fixes Gavin Shan
2014-03-10 5:46 ` [PATCH 3/3] drivers/vfio/pci: Fix MSIx message lost Gavin Shan
2014-03-17 22:16 ` Alex Williamson
[not found] ` <20140318013238.GA9843@shangw.(null)>
2014-03-18 22:44 ` Alex Williamson
2014-04-02 1:16 ` Alexey Kardashevskiy
2014-04-02 1:36 ` Alex Williamson
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=1393823106.10727.30.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=shangw@linux.vnet.ibm.com \
/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.