From: "Michael S. Tsirkin" <mst@redhat.com>
To: Alexey Korolev <alexey.korolev@endace.com>
Cc: sfd@endace.com, Kevin O'Connor <kevin@koconnor.net>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC/PATCH] Fix guest OS panic when 64bit BAR is present
Date: Wed, 25 Jan 2012 17:38:05 +0200 [thread overview]
Message-ID: <20120125153415.GA10267@redhat.com> (raw)
In-Reply-To: <4F1F971B.4020309@endace.com>
On Wed, Jan 25, 2012 at 06:46:03PM +1300, Alexey Korolev wrote:
> Hi,
> In this post
> http://lists.gnu.org/archive/html/qemu-devel/2011-12/msg03171.html I've
> mentioned about the issues when 64Bit PCI BAR is present and 32bit
> address range is selected for it.
> The issue affects all recent qemu releases and all
> old and recent guest Linux kernel versions.
>
For testing, I applied the following patch to qemu,
converting msix bar to 64 bit.
Guest did not seem to crash.
I booted Fedora Live CD 32 bit guest on a 32 bit host
to level 3 without crash, and verified that
the BAR is a 64 bit one, and that I got assigned an address
at fe000000.
command line I used:
qemu-system-x86_64 -bios /scm/seabios/out/bios.bin -snapshot -drive
file=qemu-images/f15-test.qcow2,if=none,id=diskid,cache=unsafe
-device virtio-blk-pci,drive=diskid -net user -net nic,model=ne2k_pci
-cdrom Fedora-15-i686-Live-LXDE.iso
At boot prompt type tab and add '3' to kernel command line
to have guest boot into a fast text console instead
of a graphical one which is very slow.
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 2ac87ea..5271394 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -711,7 +711,8 @@ void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev)
memory_region_init(&proxy->msix_bar, "virtio-msix", 4096);
if (vdev->nvectors && !msix_init(&proxy->pci_dev, vdev->nvectors,
&proxy->msix_bar, 1, 0)) {
- pci_register_bar(&proxy->pci_dev, 1, PCI_BASE_ADDRESS_SPACE_MEMORY,
+ pci_register_bar(&proxy->pci_dev, 1, PCI_BASE_ADDRESS_SPACE_MEMORY |
+ PCI_BASE_ADDRESS_MEM_TYPE_64,
&proxy->msix_bar);
} else
vdev->nvectors = 0;
next prev parent reply other threads:[~2012-01-25 15:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-25 5:46 [Qemu-devel] [RFC/PATCH] Fix guest OS panic when 64bit BAR is present Alexey Korolev
2012-01-25 12:51 ` Michael S. Tsirkin
2012-01-26 3:20 ` Alexey Korolev
2012-01-25 15:38 ` Michael S. Tsirkin [this message]
2012-01-25 18:59 ` Alex Williamson
2012-01-26 3:19 ` Alexey Korolev
2012-01-26 13:51 ` Avi Kivity
2012-01-26 14:05 ` Michael S. Tsirkin
2012-01-26 14:33 ` Avi Kivity
2012-01-26 9:14 ` Michael S. Tsirkin
2012-01-26 13:52 ` Avi Kivity
2012-01-26 14:36 ` Michael S. Tsirkin
2012-01-26 15:12 ` Avi Kivity
2012-01-27 4:42 ` Alexey Korolev
2012-01-31 9:40 ` Avi Kivity
2012-01-31 9:43 ` Avi Kivity
2012-02-01 5:44 ` Alexey Korolev
2012-02-01 7:04 ` Michael S. Tsirkin
2012-02-02 2:22 ` Alexey Korolev
2012-01-31 10:51 ` Avi Kivity
2012-01-27 4:40 ` Alexey Korolev
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=20120125153415.GA10267@redhat.com \
--to=mst@redhat.com \
--cc=alexey.korolev@endace.com \
--cc=kevin@koconnor.net \
--cc=qemu-devel@nongnu.org \
--cc=sfd@endace.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 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).