[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Questions about the VFIO device BAR emulation

From: Li Qiang
Subject: [Qemu-devel] Questions about the VFIO device BAR emulation
Date: Mon, 3 Dec 2018 21:06:00 +0800

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;

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?

Li Qiang

reply via email to

[Prev in Thread] Current Thread [Next in Thread]