qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Questions about the VFIO device BAR emulation
@ 2018-12-03 13:06 Li Qiang
  2018-12-03 14:00 ` Alex Williamson
  0 siblings, 1 reply; 2+ messages in thread
From: Li Qiang @ 2018-12-03 13:06 UTC (permalink / raw)
  To: Alex Williamson, qemu-devel@nongnu.org, pbonzini@redhat.com

Hello Alex, Paolo and all

I have a question about VFIO about the BAR.

Why we have two MemoryRegion for every device’s BAR.
I mean in VFIOBAR we have a field ‘mr’.
typedef struct VFIOBAR {
    VFIORegion region;
    MemoryRegion *mr;
    size_t size;
    uint8_t type;
    bool ioport;
    bool mem64;
    QLIST_HEAD(, VFIOQuirk) quirks;
} VFIOBAR;

And in the field ‘region’ field of VFIOBAR,
We also have a MemoryReion named ‘mem’.
And the ‘VFIOBAR’s mr is just the subregion of ‘VFIOREGION’.

Why here we can’t use just one MR link VFIOREGION’s ‘mem’field to represent the device’s BAR?


Thanks,
Li Qiang

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

end of thread, other threads:[~2018-12-03 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-03 13:06 [Qemu-devel] Questions about the VFIO device BAR emulation Li Qiang
2018-12-03 14:00 ` Alex Williamson

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