qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Questions about the VFIO BAR region
@ 2019-11-04 16:40 Li Qiang
  2019-11-04 18:48 ` Alex Williamson
  0 siblings, 1 reply; 5+ messages in thread
From: Li Qiang @ 2019-11-04 16:40 UTC (permalink / raw)
  To: Alex Williamson, eric.auger@redhat.com, qemu-devel@nongnu.org,
	liq3ea@gmail.com

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]

Hello Alex, Auger and all,

I have a question about the VFIO virtual device BAR.

In vfio_region_setup, it initialize a ‘region->mem’ MR and set its ops to ‘vfio_regions_ops’. 
In ‘vfio_region_mmap’, it maps the physical device’s MMIO to QEMU’s virtual address space 
as a raw MR ‘region->mmaps[i].mem’. 
And also it set the latter MR as a subregion of the first one.

So when the guest accesses the BAR, it will direct go to the physical device’s BAR.
My question is here:
When the qemu will use the ‘vfio_regions_ops’ to read/write the BAR?
Also whey in the last of ‘vfio_region_write/read’ we need to call ‘vbasedev->ops->vfio_eoi(vbasedev);’?


Thanks,
Li Qiang


[-- Attachment #2: Type: text/html, Size: 2925 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-05 13:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-04 16:40 Questions about the VFIO BAR region Li Qiang
2019-11-04 18:48 ` Alex Williamson
2019-11-05  1:16   ` Li Qiang
2019-11-05 13:17     ` Auger Eric
2019-11-05 13:44       ` Li Qiang

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).