Displaying 20 results from an estimated 28 matches for "virtio_config_writeb".
Did you mean:
virtio_config_writel
2013 Mar 21
2
[RFC virt-spec PATCH] only writing out the last byte of MAC makes it have effect
The lengcy guests don't have mac programming command, we don't know when
it's safe to use MAC. We can change QEMU to make MAC change effect when
the last byte of MAC is written to config space.
Signed-off-by: Amos Kong <akong at redhat.com>
---
virtio-spec.lyx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/virtio-spec.lyx b/virtio-spec.lyx
index
2013 Mar 21
2
[RFC virt-spec PATCH] only writing out the last byte of MAC makes it have effect
The lengcy guests don't have mac programming command, we don't know when
it's safe to use MAC. We can change QEMU to make MAC change effect when
the last byte of MAC is written to config space.
Signed-off-by: Amos Kong <akong at redhat.com>
---
virtio-spec.lyx | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/virtio-spec.lyx b/virtio-spec.lyx
index
2015 Mar 02
4
[PATCH 1/2] virtio: add modern config accessors
...++++++
2 files changed, 99 insertions(+)
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index df09993..7a6a9d1 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -227,6 +227,12 @@ uint32_t virtio_config_readl(VirtIODevice *vdev, uint32_t addr);
void virtio_config_writeb(VirtIODevice *vdev, uint32_t addr, uint32_t data);
void virtio_config_writew(VirtIODevice *vdev, uint32_t addr, uint32_t data);
void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data);
+uint32_t virtio_config_modern_readb(VirtIODevice *vdev, uint32_t addr);
+uint32_t virtio_co...
2015 Mar 02
4
[PATCH 1/2] virtio: add modern config accessors
...++++++
2 files changed, 99 insertions(+)
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index df09993..7a6a9d1 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -227,6 +227,12 @@ uint32_t virtio_config_readl(VirtIODevice *vdev, uint32_t addr);
void virtio_config_writeb(VirtIODevice *vdev, uint32_t addr, uint32_t data);
void virtio_config_writew(VirtIODevice *vdev, uint32_t addr, uint32_t data);
void virtio_config_writel(VirtIODevice *vdev, uint32_t addr, uint32_t data);
+uint32_t virtio_config_modern_readb(VirtIODevice *vdev, uint32_t addr);
+uint32_t virtio_co...
2009 May 11
0
[PATCH 1/2] qemu-kvm: add MSI-X support
...vdev->addr;
+ if (addr < config)
+ return virtio_ioport_read(opaque, addr);
+ addr -= config;
if (addr > (vdev->config_len - sizeof(val)))
return (uint32_t)-1;
@@ -575,9 +624,15 @@ static uint32_t virtio_config_readl(void *opaque, uint32_t addr)
static void virtio_config_writeb(void *opaque, uint32_t addr, uint32_t data)
{
VirtIODevice *vdev = opaque;
+ uint32_t config = VIRTIO_PCI_CONFIG(&vdev->pci_dev);
uint8_t val = data;
- addr -= vdev->addr + VIRTIO_PCI_CONFIG;
+ addr -= vdev->addr;
+ if (addr < config) {
+ virtio_iopor...
2009 May 11
0
[PATCH 1/2] qemu-kvm: add MSI-X support
...vdev->addr;
+ if (addr < config)
+ return virtio_ioport_read(opaque, addr);
+ addr -= config;
if (addr > (vdev->config_len - sizeof(val)))
return (uint32_t)-1;
@@ -575,9 +624,15 @@ static uint32_t virtio_config_readl(void *opaque, uint32_t addr)
static void virtio_config_writeb(void *opaque, uint32_t addr, uint32_t data)
{
VirtIODevice *vdev = opaque;
+ uint32_t config = VIRTIO_PCI_CONFIG(&vdev->pci_dev);
uint8_t val = data;
- addr -= vdev->addr + VIRTIO_PCI_CONFIG;
+ addr -= vdev->addr;
+ if (addr < config) {
+ virtio_iopor...
2015 Mar 02
0
[PATCH 2/2] virtio-pci: switch to modern accessors for 1.0
...val = virtio_config_readl(vdev, addr);
+ val = virtio_config_modern_readl(vdev, addr);
break;
}
return val;
@@ -1216,13 +1216,13 @@ static void virtio_pci_device_write(void *opaque, hwaddr addr,
VirtIODevice *vdev = opaque;
switch (size) {
case 1:
- virtio_config_writeb(vdev, addr, val);
+ virtio_config_modern_writeb(vdev, addr, val);
break;
case 2:
- virtio_config_writew(vdev, addr, val);
+ virtio_config_modern_writew(vdev, addr, val);
break;
case 4:
- virtio_config_writel(vdev, addr, val);
+ virtio_c...
2015 Mar 02
0
[PATCH 2/2] virtio-pci: switch to modern accessors for 1.0
...val = virtio_config_readl(vdev, addr);
+ val = virtio_config_modern_readl(vdev, addr);
break;
}
return val;
@@ -1216,13 +1216,13 @@ static void virtio_pci_device_write(void *opaque, hwaddr addr,
VirtIODevice *vdev = opaque;
switch (size) {
case 1:
- virtio_config_writeb(vdev, addr, val);
+ virtio_config_modern_writeb(vdev, addr, val);
break;
case 2:
- virtio_config_writew(vdev, addr, val);
+ virtio_config_modern_writew(vdev, addr, val);
break;
case 4:
- virtio_config_writel(vdev, addr, val);
+ virtio_c...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
...vdev->addr;
+ if (addr < config)
+ return virtio_ioport_read(opaque, addr);
+ addr -= config;
if (addr > (vdev->config_len - sizeof(val)))
return (uint32_t)-1;
@@ -575,9 +634,15 @@ static uint32_t virtio_config_readl(void *opaque, uint32_t addr)
static void virtio_config_writeb(void *opaque, uint32_t addr, uint32_t data)
{
VirtIODevice *vdev = opaque;
+ uint32_t config = VIRTIO_PCI_CONFIG(&vdev->pci_dev);
uint8_t val = data;
- addr -= vdev->addr + VIRTIO_PCI_CONFIG;
+ addr -= vdev->addr;
+ if (addr < config) {
+ virtio_iopor...
2009 May 20
0
[PATCHv2-RFC 1/2] qemu-kvm: add MSI-X support
...vdev->addr;
+ if (addr < config)
+ return virtio_ioport_read(opaque, addr);
+ addr -= config;
if (addr > (vdev->config_len - sizeof(val)))
return (uint32_t)-1;
@@ -575,9 +634,15 @@ static uint32_t virtio_config_readl(void *opaque, uint32_t addr)
static void virtio_config_writeb(void *opaque, uint32_t addr, uint32_t data)
{
VirtIODevice *vdev = opaque;
+ uint32_t config = VIRTIO_PCI_CONFIG(&vdev->pci_dev);
uint8_t val = data;
- addr -= vdev->addr + VIRTIO_PCI_CONFIG;
+ addr -= vdev->addr;
+ if (addr < config) {
+ virtio_iopor...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...uint32_t addr)
+{
+ VirtIODevice *vdev = opaque;
+ uint32_t val;
+
+ addr -= vdev->addr + VIRTIO_PCI_CONFIG;
+ if (addr > (vdev->config_len - sizeof(val)))
+ return (uint32_t)-1;
+
+ memcpy(&val, vdev->config + addr, sizeof(val));
+ return val;
+}
+
+static void virtio_config_writeb(void *opaque, uint32_t addr, uint32_t
data)
+{
+ VirtIODevice *vdev = opaque;
+ uint8_t val = data;
+
+ addr -= vdev->addr + VIRTIO_PCI_CONFIG;
+ if (addr > (vdev->config_len - sizeof(val)))
+ return;
+
+ memcpy(vdev->config + addr, &val, sizeof(val));
+}
+
+stati...
2007 Dec 21
0
[Virtio-for-kvm] [PATCH 1/7] userspace virtio
...uint32_t addr)
+{
+ VirtIODevice *vdev = opaque;
+ uint32_t val;
+
+ addr -= vdev->addr + VIRTIO_PCI_CONFIG;
+ if (addr > (vdev->config_len - sizeof(val)))
+ return (uint32_t)-1;
+
+ memcpy(&val, vdev->config + addr, sizeof(val));
+ return val;
+}
+
+static void virtio_config_writeb(void *opaque, uint32_t addr, uint32_t
data)
+{
+ VirtIODevice *vdev = opaque;
+ uint8_t val = data;
+
+ addr -= vdev->addr + VIRTIO_PCI_CONFIG;
+ if (addr > (vdev->config_len - sizeof(val)))
+ return;
+
+ memcpy(vdev->config + addr, &val, sizeof(val));
+}
+
+stati...
2009 May 25
0
[PATCH 10/11] qemu: MSI-X support in virtio PCI
...tIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+ if (addr < config) {
+ virtio_ioport_write(proxy, addr, val);
+ return;
+ }
+ addr -= config;
virtio_config_writeb(proxy->vdev, addr, val);
}
static void virtio_pci_config_writew(void *opaque, uint32_t addr, uint32_t val)
{
VirtIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+...
2009 Jun 02
0
[PATCHv2 10/13] qemu: MSI-X support in virtio PCI
...tIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+ if (addr < config) {
+ virtio_ioport_write(proxy, addr, val);
+ return;
+ }
+ addr -= config;
virtio_config_writeb(proxy->vdev, addr, val);
}
static void virtio_pci_config_writew(void *opaque, uint32_t addr, uint32_t val)
{
VirtIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+...
2009 Jun 05
0
[PATCHv3 10/13] qemu: MSI-X support in virtio PCI
...tIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+ if (addr < config) {
+ virtio_ioport_write(proxy, addr, val);
+ return;
+ }
+ addr -= config;
virtio_config_writeb(proxy->vdev, addr, val);
}
static void virtio_pci_config_writew(void *opaque, uint32_t addr, uint32_t val)
{
VirtIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+...
2009 Jun 10
0
[PATCHv4 10/13] qemu: MSI-X support in virtio PCI
...tIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+ if (addr < config) {
+ virtio_ioport_write(proxy, addr, val);
+ return;
+ }
+ addr -= config;
virtio_config_writeb(proxy->vdev, addr, val);
}
static void virtio_pci_config_writew(void *opaque, uint32_t addr, uint32_t val)
{
VirtIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+...
2009 May 25
0
[PATCH 10/11] qemu: MSI-X support in virtio PCI
...tIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+ if (addr < config) {
+ virtio_ioport_write(proxy, addr, val);
+ return;
+ }
+ addr -= config;
virtio_config_writeb(proxy->vdev, addr, val);
}
static void virtio_pci_config_writew(void *opaque, uint32_t addr, uint32_t val)
{
VirtIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+...
2009 Jun 02
0
[PATCHv2 10/13] qemu: MSI-X support in virtio PCI
...tIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+ if (addr < config) {
+ virtio_ioport_write(proxy, addr, val);
+ return;
+ }
+ addr -= config;
virtio_config_writeb(proxy->vdev, addr, val);
}
static void virtio_pci_config_writew(void *opaque, uint32_t addr, uint32_t val)
{
VirtIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+...
2009 Jun 05
0
[PATCHv3 10/13] qemu: MSI-X support in virtio PCI
...tIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+ if (addr < config) {
+ virtio_ioport_write(proxy, addr, val);
+ return;
+ }
+ addr -= config;
virtio_config_writeb(proxy->vdev, addr, val);
}
static void virtio_pci_config_writew(void *opaque, uint32_t addr, uint32_t val)
{
VirtIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+...
2009 Jun 10
0
[PATCHv4 10/13] qemu: MSI-X support in virtio PCI
...tIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+ if (addr < config) {
+ virtio_ioport_write(proxy, addr, val);
+ return;
+ }
+ addr -= config;
virtio_config_writeb(proxy->vdev, addr, val);
}
static void virtio_pci_config_writew(void *opaque, uint32_t addr, uint32_t val)
{
VirtIOPCIProxy *proxy = opaque;
- addr -= proxy->addr + VIRTIO_PCI_CONFIG;
+ uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ addr -= proxy->addr;
+...