From: Alex Williamson <alex.williamson@redhat.com>
To: deniv@lavabit.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] VFIO-VGA Issue
Date: Tue, 09 Apr 2013 16:53:48 -0600 [thread overview]
Message-ID: <1365548028.16420.180.camel@bling.home> (raw)
In-Reply-To: <32071.216.218.134.12.1365546804.squirrel@lavabit.com>
On Tue, 2013-04-09 at 18:33 -0400, deniv@lavabit.com wrote:
> Here's debug output from qemu, the last lines repeat indefinitely:
>
> vfio: vfio_initfn(0000:01:00.0) group 1
> vfio: region_add 0 - 7fffffff [0x7f605fe00000]
> vfio: SKIPPING region_add fec00000 - fec00fff
> vfio: SKIPPING region_add fed00000 - fed003ff
> vfio: SKIPPING region_add fee00000 - feefffff
> vfio: SKIPPING region_add fffe0000 - ffffffff
> vfio: Device 0000:01:00.0 flags: 3, regions: 9, irgs: 3
> vfio: Device 0000:01:00.0 region 0:
> vfio: size: 0x10000000, offset: 0x0, flags: 0x7
> vfio: Device 0000:01:00.0 region 1:
> vfio: size: 0x0, offset: 0x10000000000, flags: 0x0
> vfio: Device 0000:01:00.0 region 2:
> vfio: size: 0x40000, offset: 0x20000000000, flags: 0x7
> vfio: Device 0000:01:00.0 region 3:
> vfio: size: 0x0, offset: 0x30000000000, flags: 0x0
> vfio: Device 0000:01:00.0 region 4:
> vfio: size: 0x100, offset: 0x40000000000, flags: 0x3
> vfio: Device 0000:01:00.0 region 5:
> vfio: size: 0x0, offset: 0x50000000000, flags: 0x0
> vfio: Device 0000:01:00.0 ROM:
> vfio: size: 0x20000, offset: 0x60000000000, flags: 0x1
> vfio: Device 0000:01:00.0 config:
> vfio: size: 0x1000, offset: 0x70000000000, flags: 0x3
> vfio: vfio_load_rom(0000:01:00.0)
> vfio: vfio_bar_write(0000:01:00.0:BAR4+0x0, 0x4010, 4)
> vfio: vfio_bar_read(0000:01:00.0:BAR4+0x4, 4) = 0xe000000c
> vfio: Enabled ATI/AMD quirk 0x4010 for device 0000:01:00.0
> vfio: Enabled ATI/AMD quirk 0x3c3 for device 0000:01:00.0
...
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
> vfio: vfio_vga_read(0x3c3, 1) = 0x0
This is a quirk that I haven't fully figured out yet. ATI/AMD cards use
VGA register 0x3c3 to read upper byte of the address of the I/O port
BAR, but sometimes it reads 0. Try the patch below to have it always
return the virtual BAR address and let me know if it works. Thanks,
Alex
--- a/hw/vfio_pci.c
+++ b/hw/vfio_pci.c
@@ -1117,7 +1117,7 @@ static uint64_t vfio_ati_3c3_quirk_read(void *opaque,
uint64_t data = vfio_vga_read(&vdev->vga.region[QEMU_PCI_VGA_IO_HI],
addr + 0x3, size);
- if (data == quirk->data) {
+ if (1 || data == quirk->data) {
data = pci_get_byte(pdev->config + PCI_BASE_ADDRESS_4 + 1);
DPRINTF("%s(0x3c3, 1) = 0x%"PRIx64"\n", __func__, data);
}
next prev parent reply other threads:[~2013-04-09 22:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-09 12:22 [Qemu-devel] VFIO-VGA Issue deniv
2013-04-09 17:18 ` Alex Williamson
2013-04-09 22:17 ` Alex Williamson
2013-04-10 9:01 ` Gleb Natapov
2013-04-10 15:20 ` Alex Williamson
2013-04-10 15:22 ` Gleb Natapov
2013-04-10 17:36 ` Paolo Bonzini
2013-04-09 22:33 ` deniv
2013-04-09 22:53 ` Alex Williamson [this message]
2013-04-10 0:02 ` deniv
2013-04-10 15:37 ` Alex Williamson
2013-04-10 17:11 ` deniv
2013-04-10 18:30 ` Alex Williamson
2013-04-10 20:32 ` deniv
2013-04-10 20:42 ` Alex Williamson
2013-04-11 17:59 ` deniv
2013-04-15 18:48 ` Alex Williamson
2013-04-25 18:15 ` deniv
[not found] ` <517915C5.3020309@lavabit.com>
[not found] ` <1366915789.2918.794.camel@bling.home>
2013-04-26 12:02 ` deniv
-- strict thread matches above, loose matches on Subject: below --
2013-05-16 20:46 Maik Broemme
2013-05-17 10:23 ` Paolo Bonzini
2013-05-20 3:10 ` 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=1365548028.16420.180.camel@bling.home \
--to=alex.williamson@redhat.com \
--cc=deniv@lavabit.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).