[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 08/22] virtio: create vp_cap struct for legacy ba
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH v2 08/22] virtio: create vp_cap struct for legacy bar |
Date: |
Tue, 30 Jun 2015 10:38:59 +0200 |
Signed-off-by: Gerd Hoffmann <address@hidden>
---
src/hw/virtio-pci.c | 5 ++++-
src/hw/virtio-pci.h | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/hw/virtio-pci.c b/src/hw/virtio-pci.c
index 0acf65f..3badb15 100644
--- a/src/hw/virtio-pci.c
+++ b/src/hw/virtio-pci.c
@@ -144,8 +144,11 @@ struct vp_device *vp_init_simple(struct pci_device *pci)
pci_bdf_to_bus(pci->bdf), pci_bdf_to_dev(pci->bdf));
}
- vp->ioaddr = pci_config_readl(pci->bdf, PCI_BASE_ADDRESS_0) &
+ vp->legacy.bar = 0;
+ vp->legacy.addr = pci_config_readl(pci->bdf, PCI_BASE_ADDRESS_0) &
PCI_BASE_ADDRESS_IO_MASK;
+ vp->legacy.is_io = 1;
+ vp->ioaddr = vp->legacy.addr; /* temporary */
vp_reset(vp);
pci_config_maskw(pci->bdf, PCI_COMMAND, 0, PCI_COMMAND_MASTER);
diff --git a/src/hw/virtio-pci.h b/src/hw/virtio-pci.h
index 0f57ca8..29cd969 100644
--- a/src/hw/virtio-pci.h
+++ b/src/hw/virtio-pci.h
@@ -124,7 +124,7 @@ struct vp_cap {
struct vp_device {
unsigned int ioaddr;
- struct vp_cap common, notify, isr, device;
+ struct vp_cap common, notify, isr, device, legacy;
};
static inline u32 vp_get_features(struct vp_device *vp)
--
1.8.3.1
- [Qemu-devel] [PATCH v2 00/22] virtio: add version 1.0 support, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 01/22] pci: allow to loop over capabilities, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 02/22] virtio: run drivers in 32bit mode, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 10/22] virtio: add read/write functions and macros, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 08/22] virtio: create vp_cap struct for legacy bar,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH v2 06/22] virtio: add version 0.9.5 struct, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 04/22] virtio: pass struct pci_device to vp_init_simple, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 09/22] virtio: add version 0.9.5 struct [fixup], Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 12/22] virtio: add version 1.0 support to vp_{get, set}_status, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 13/22] virtio: add version 1.0 support to vp_get_isr, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 16/22] virtio: remove unused vp_del_vq, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 14/22] virtio: add version 1.0 support to vp_reset, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 11/22] virtio: make features 64bit, support version 1.0 features, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 18/22] virtio-scsi: fix initialization for version 1.0, Gerd Hoffmann, 2015/06/30
- [Qemu-devel] [PATCH v2 21/22] virtio: also probe version 1.0 pci ids, Gerd Hoffmann, 2015/06/30