virtio-pci: implement cfg capability

spec says we must, so let's do it!

Note: the implementation is incorrect for BE targets.
Will fix with a patch on top, not a big deal now as
the only user is seabios, used on x86 only.

Tested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Michael S. Tsirkin 2015-07-02 14:59:49 +02:00
parent c36f24a204
commit ada434cd0b
2 changed files with 78 additions and 1 deletions

View file

@ -112,9 +112,12 @@ struct VirtIOPCIProxy {
VirtIOPCIRegion device;
VirtIOPCIRegion notify;
MemoryRegion modern_bar;
MemoryRegion modern_cfg;
AddressSpace modern_as;
uint32_t legacy_io_bar;
uint32_t msix_bar;
uint32_t modern_mem_bar;
int config_cap;
uint32_t flags;
uint32_t class_code;
uint32_t nvectors;