|
Justin M. Forbes |
272dfe |
Rename features->guest_features. This is
|
|
Justin M. Forbes |
272dfe |
what they are, avoid confusion with
|
|
Justin M. Forbes |
272dfe |
host features which we also need to keep around.
|
|
Justin M. Forbes |
272dfe |
|
|
Justin M. Forbes |
272dfe |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Justin M. Forbes |
272dfe |
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Justin M. Forbes |
272dfe |
(cherry picked from commit 704a76fcd24372a683652651b4597f6654084975)
|
|
Justin M. Forbes |
272dfe |
---
|
|
Justin M. Forbes |
272dfe |
hw/s390-virtio-bus.c | 2 +-
|
|
Justin M. Forbes |
272dfe |
hw/syborg_virtio.c | 4 ++--
|
|
Justin M. Forbes |
272dfe |
hw/virtio-net.c | 10 +++++-----
|
|
Justin M. Forbes |
272dfe |
hw/virtio-pci.c | 4 ++--
|
|
Justin M. Forbes |
272dfe |
hw/virtio.c | 8 ++++----
|
|
Justin M. Forbes |
272dfe |
hw/virtio.h | 2 +-
|
|
Justin M. Forbes |
272dfe |
6 files changed, 15 insertions(+), 15 deletions(-)
|
|
Justin M. Forbes |
272dfe |
|
|
Justin M. Forbes |
272dfe |
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
|
|
Justin M. Forbes |
272dfe |
index dc154ed..6c0da11 100644
|
|
Justin M. Forbes |
272dfe |
--- a/hw/s390-virtio-bus.c
|
|
Justin M. Forbes |
272dfe |
+++ b/hw/s390-virtio-bus.c
|
|
Justin M. Forbes |
272dfe |
@@ -251,7 +251,7 @@ void s390_virtio_device_update_status(VirtIOS390Device *dev)
|
|
Justin M. Forbes |
272dfe |
if (vdev->set_features) {
|
|
Justin M. Forbes |
272dfe |
vdev->set_features(vdev, features);
|
|
Justin M. Forbes |
272dfe |
}
|
|
Justin M. Forbes |
272dfe |
- vdev->features = features;
|
|
Justin M. Forbes |
272dfe |
+ vdev->guest_features = features;
|
|
Justin M. Forbes |
272dfe |
}
|
|
Justin M. Forbes |
272dfe |
|
|
Justin M. Forbes |
272dfe |
VirtIOS390Device *s390_virtio_bus_console(VirtIOS390Bus *bus)
|
|
Justin M. Forbes |
272dfe |
diff --git a/hw/syborg_virtio.c b/hw/syborg_virtio.c
|
|
Justin M. Forbes |
272dfe |
index a84206a..fe6fc23 100644
|
|
Justin M. Forbes |
272dfe |
--- a/hw/syborg_virtio.c
|
|
Justin M. Forbes |
272dfe |
+++ b/hw/syborg_virtio.c
|
|
Justin M. Forbes |
272dfe |
@@ -90,7 +90,7 @@ static uint32_t syborg_virtio_readl(void *opaque, target_phys_addr_t offset)
|
|
Justin M. Forbes |
272dfe |
ret |= vdev->binding->get_features(s);
|
|
Justin M. Forbes |
272dfe |
break;
|
|
Justin M. Forbes |
272dfe |
case SYBORG_VIRTIO_GUEST_FEATURES:
|
|
Justin M. Forbes |
272dfe |
- ret = vdev->features;
|
|
Justin M. Forbes |
272dfe |
+ ret = vdev->guest_features;
|
|
Justin M. Forbes |
272dfe |
break;
|
|
Justin M. Forbes |
272dfe |
case SYBORG_VIRTIO_QUEUE_BASE:
|
|
Justin M. Forbes |
272dfe |
ret = virtio_queue_get_addr(vdev, vdev->queue_sel);
|
|
Justin M. Forbes |
272dfe |
@@ -132,7 +132,7 @@ static void syborg_virtio_writel(void *opaque, target_phys_addr_t offset,
|
|
Justin M. Forbes |
272dfe |
case SYBORG_VIRTIO_GUEST_FEATURES:
|
|
Justin M. Forbes |
272dfe |
if (vdev->set_features)
|
|
Justin M. Forbes |
272dfe |
vdev->set_features(vdev, value);
|
|
Justin M. Forbes |
272dfe |
- vdev->features = value;
|
|
Justin M. Forbes |
272dfe |
+ vdev->guest_features = value;
|
|
Justin M. Forbes |
272dfe |
break;
|
|
Justin M. Forbes |
272dfe |
case SYBORG_VIRTIO_QUEUE_BASE:
|
|
Justin M. Forbes |
272dfe |
if (value == 0)
|
|
Justin M. Forbes |
272dfe |
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
|
|
Justin M. Forbes |
272dfe |
index 2f201ff..ab20a33 100644
|
|
Justin M. Forbes |
272dfe |
--- a/hw/virtio-net.c
|
|
Justin M. Forbes |
272dfe |
+++ b/hw/virtio-net.c
|
|
Justin M. Forbes |
272dfe |
@@ -768,11 +768,11 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id)
|
|
Justin M. Forbes |
272dfe |
if (n->has_vnet_hdr) {
|
|
Justin M. Forbes |
272dfe |
tap_using_vnet_hdr(n->nic->nc.peer, 1);
|
|
Justin M. Forbes |
272dfe |
tap_set_offload(n->nic->nc.peer,
|
|
Justin M. Forbes |
272dfe |
- (n->vdev.features >> VIRTIO_NET_F_GUEST_CSUM) & 1,
|
|
Justin M. Forbes |
272dfe |
- (n->vdev.features >> VIRTIO_NET_F_GUEST_TSO4) & 1,
|
|
Justin M. Forbes |
272dfe |
- (n->vdev.features >> VIRTIO_NET_F_GUEST_TSO6) & 1,
|
|
Justin M. Forbes |
272dfe |
- (n->vdev.features >> VIRTIO_NET_F_GUEST_ECN) & 1,
|
|
Justin M. Forbes |
272dfe |
- (n->vdev.features >> VIRTIO_NET_F_GUEST_UFO) & 1);
|
|
Justin M. Forbes |
272dfe |
+ (n->vdev.guest_features >> VIRTIO_NET_F_GUEST_CSUM) & 1,
|
|
Justin M. Forbes |
272dfe |
+ (n->vdev.guest_features >> VIRTIO_NET_F_GUEST_TSO4) & 1,
|
|
Justin M. Forbes |
272dfe |
+ (n->vdev.guest_features >> VIRTIO_NET_F_GUEST_TSO6) & 1,
|
|
Justin M. Forbes |
272dfe |
+ (n->vdev.guest_features >> VIRTIO_NET_F_GUEST_ECN) & 1,
|
|
Justin M. Forbes |
272dfe |
+ (n->vdev.guest_features >> VIRTIO_NET_F_GUEST_UFO) & 1);
|
|
Justin M. Forbes |
272dfe |
}
|
|
Justin M. Forbes |
272dfe |
}
|
|
Justin M. Forbes |
272dfe |
|
|
Justin M. Forbes |
272dfe |
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
|
|
Justin M. Forbes |
272dfe |
index 3594152..c23dbc0 100644
|
|
Justin M. Forbes |
272dfe |
--- a/hw/virtio-pci.c
|
|
Justin M. Forbes |
272dfe |
+++ b/hw/virtio-pci.c
|
|
Justin M. Forbes |
272dfe |
@@ -181,7 +181,7 @@ static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val)
|
|
Justin M. Forbes |
272dfe |
}
|
|
Justin M. Forbes |
272dfe |
if (vdev->set_features)
|
|
Justin M. Forbes |
272dfe |
vdev->set_features(vdev, val);
|
|
Justin M. Forbes |
272dfe |
- vdev->features = val;
|
|
Justin M. Forbes |
272dfe |
+ vdev->guest_features = val;
|
|
Justin M. Forbes |
272dfe |
break;
|
|
Justin M. Forbes |
272dfe |
case VIRTIO_PCI_QUEUE_PFN:
|
|
Justin M. Forbes |
272dfe |
pa = (target_phys_addr_t)val << VIRTIO_PCI_QUEUE_ADDR_SHIFT;
|
|
Justin M. Forbes |
272dfe |
@@ -239,7 +239,7 @@ static uint32_t virtio_ioport_read(VirtIOPCIProxy *proxy, uint32_t addr)
|
|
Justin M. Forbes |
272dfe |
ret |= vdev->binding->get_features(proxy);
|
|
Justin M. Forbes |
272dfe |
break;
|
|
Justin M. Forbes |
272dfe |
case VIRTIO_PCI_GUEST_FEATURES:
|
|
Justin M. Forbes |
272dfe |
- ret = vdev->features;
|
|
Justin M. Forbes |
272dfe |
+ ret = vdev->guest_features;
|
|
Justin M. Forbes |
272dfe |
break;
|
|
Justin M. Forbes |
272dfe |
case VIRTIO_PCI_QUEUE_PFN:
|
|
Justin M. Forbes |
272dfe |
ret = virtio_queue_get_addr(vdev, vdev->queue_sel)
|
|
Justin M. Forbes |
272dfe |
diff --git a/hw/virtio.c b/hw/virtio.c
|
|
Justin M. Forbes |
272dfe |
index cecd0dc..c25a5f1 100644
|
|
Justin M. Forbes |
272dfe |
--- a/hw/virtio.c
|
|
Justin M. Forbes |
272dfe |
+++ b/hw/virtio.c
|
|
Justin M. Forbes |
272dfe |
@@ -445,7 +445,7 @@ void virtio_reset(void *opaque)
|
|
Justin M. Forbes |
272dfe |
if (vdev->reset)
|
|
Justin M. Forbes |
272dfe |
vdev->reset(vdev);
|
|
Justin M. Forbes |
272dfe |
|
|
Justin M. Forbes |
272dfe |
- vdev->features = 0;
|
|
Justin M. Forbes |
272dfe |
+ vdev->guest_features = 0;
|
|
Justin M. Forbes |
272dfe |
vdev->queue_sel = 0;
|
|
Justin M. Forbes |
272dfe |
vdev->status = 0;
|
|
Justin M. Forbes |
272dfe |
vdev->isr = 0;
|
|
Justin M. Forbes |
272dfe |
@@ -598,7 +598,7 @@ void virtio_notify(VirtIODevice *vdev, VirtQueue *vq)
|
|
Justin M. Forbes |
272dfe |
{
|
|
Justin M. Forbes |
272dfe |
/* Always notify when queue is empty (when feature acknowledge) */
|
|
Justin M. Forbes |
272dfe |
if ((vring_avail_flags(vq) & VRING_AVAIL_F_NO_INTERRUPT) &&
|
|
Justin M. Forbes |
272dfe |
- (!(vdev->features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) ||
|
|
Justin M. Forbes |
272dfe |
+ (!(vdev->guest_features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) ||
|
|
Justin M. Forbes |
272dfe |
(vq->inuse || vring_avail_idx(vq) != vq->last_avail_idx)))
|
|
Justin M. Forbes |
272dfe |
return;
|
|
Justin M. Forbes |
272dfe |
|
|
Justin M. Forbes |
272dfe |
@@ -625,7 +625,7 @@ void virtio_save(VirtIODevice *vdev, QEMUFile *f)
|
|
Justin M. Forbes |
272dfe |
qemu_put_8s(f, &vdev->status);
|
|
Justin M. Forbes |
272dfe |
qemu_put_8s(f, &vdev->isr);
|
|
Justin M. Forbes |
272dfe |
qemu_put_be16s(f, &vdev->queue_sel);
|
|
Justin M. Forbes |
272dfe |
- qemu_put_be32s(f, &vdev->features);
|
|
Justin M. Forbes |
272dfe |
+ qemu_put_be32s(f, &vdev->guest_features);
|
|
Justin M. Forbes |
272dfe |
qemu_put_be32(f, vdev->config_len);
|
|
Justin M. Forbes |
272dfe |
qemu_put_buffer(f, vdev->config, vdev->config_len);
|
|
Justin M. Forbes |
272dfe |
|
|
Justin M. Forbes |
272dfe |
@@ -670,7 +670,7 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f)
|
|
Justin M. Forbes |
272dfe |
features, supported_features);
|
|
Justin M. Forbes |
272dfe |
return -1;
|
|
Justin M. Forbes |
272dfe |
}
|
|
Justin M. Forbes |
272dfe |
- vdev->features = features;
|
|
Justin M. Forbes |
272dfe |
+ vdev->guest_features = features;
|
|
Justin M. Forbes |
272dfe |
vdev->config_len = qemu_get_be32(f);
|
|
Justin M. Forbes |
272dfe |
qemu_get_buffer(f, vdev->config, vdev->config_len);
|
|
Justin M. Forbes |
272dfe |
|
|
Justin M. Forbes |
272dfe |
diff --git a/hw/virtio.h b/hw/virtio.h
|
|
Justin M. Forbes |
272dfe |
index 35532a6..85ef171 100644
|
|
Justin M. Forbes |
272dfe |
--- a/hw/virtio.h
|
|
Justin M. Forbes |
272dfe |
+++ b/hw/virtio.h
|
|
Justin M. Forbes |
272dfe |
@@ -100,7 +100,7 @@ struct VirtIODevice
|
|
Justin M. Forbes |
272dfe |
uint8_t status;
|
|
Justin M. Forbes |
272dfe |
uint8_t isr;
|
|
Justin M. Forbes |
272dfe |
uint16_t queue_sel;
|
|
Justin M. Forbes |
272dfe |
- uint32_t features;
|
|
Justin M. Forbes |
272dfe |
+ uint32_t guest_features;
|
|
Justin M. Forbes |
272dfe |
size_t config_len;
|
|
Justin M. Forbes |
272dfe |
void *config;
|
|
Justin M. Forbes |
272dfe |
uint16_t config_vector;
|
|
Justin M. Forbes |
272dfe |
--
|
|
Justin M. Forbes |
272dfe |
1.6.6.144.g5c3af
|