[PATCH] kvm tools: Ninja out support for VIRTIO_F_FEATURES_HIGH

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

 



Rusty has just removed it out of the spec. Since we probably the only ones
who implemented support for it, we should remove it out of our code as well.

There is no issue with breaking anything since nothing else worked with it,
so it's fully backwards compatible.

Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
---
 tools/kvm/include/kvm/virtio.h |    3 +--
 tools/kvm/virtio/core.c        |    9 +--------
 tools/kvm/virtio/pci.c         |    4 ++--
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/tools/kvm/include/kvm/virtio.h b/tools/kvm/include/kvm/virtio.h
index a7aa020..610f4d0 100644
--- a/tools/kvm/include/kvm/virtio.h
+++ b/tools/kvm/include/kvm/virtio.h
@@ -14,7 +14,6 @@
 
 #define VIRTIO_PCI_O_CONFIG	0
 #define VIRTIO_PCI_O_MSIX	1
-#define VIRTIO_PCI_O_FEATURES	2
 
 struct virt_queue {
 	struct vring	vring;
@@ -63,6 +62,6 @@ u16 virt_queue__get_head_iov(struct virt_queue *vq, struct iovec iov[], u16 *out
 u16 virt_queue__get_inout_iov(struct kvm *kvm, struct virt_queue *queue,
 			      struct iovec in_iov[], struct iovec out_iov[],
 			      u16 *in, u16 *out);
-int virtio__get_dev_specific_field(int offset, bool msix, bool features_hi, u32 *config_off);
+int virtio__get_dev_specific_field(int offset, bool msix, u32 *config_off);
 
 #endif /* KVM__VIRTIO_H */
diff --git a/tools/kvm/virtio/core.c b/tools/kvm/virtio/core.c
index fe9d588..5dc767a 100644
--- a/tools/kvm/virtio/core.c
+++ b/tools/kvm/virtio/core.c
@@ -128,7 +128,7 @@ u16 virt_queue__get_inout_iov(struct kvm *kvm, struct virt_queue *queue,
 	return head;
 }
 
-int virtio__get_dev_specific_field(int offset, bool msix, bool features_hi, u32 *config_off)
+int virtio__get_dev_specific_field(int offset, bool msix, u32 *config_off)
 {
 	if (msix) {
 		if (offset < 4)
@@ -137,13 +137,6 @@ int virtio__get_dev_specific_field(int offset, bool msix, bool features_hi, u32
 			offset -= 4;
 	}
 
-	if (features_hi) {
-		if (offset < 4)
-			return VIRTIO_PCI_O_FEATURES;
-		else
-			offset -= 4;
-	}
-
 	*config_off = offset;
 
 	return VIRTIO_PCI_O_CONFIG;
diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c
index 0737ae7..3d9a7f8 100644
--- a/tools/kvm/virtio/pci.c
+++ b/tools/kvm/virtio/pci.c
@@ -69,7 +69,7 @@ static bool virtio_pci__specific_io_in(struct kvm *kvm, struct virtio_trans *vtr
 	struct virtio_pci *vpci = vtrans->virtio;
 	int type = virtio__get_dev_specific_field(offset - 20,
 							virtio_pci__msix_enabled(vpci),
-							0, &config_offset);
+							&config_offset);
 	if (type == VIRTIO_PCI_O_MSIX) {
 		switch (offset) {
 		case VIRTIO_MSI_CONFIG_VECTOR:
@@ -140,7 +140,7 @@ static bool virtio_pci__specific_io_out(struct kvm *kvm, struct virtio_trans *vt
 	struct virtio_pci *vpci = vtrans->virtio;
 	u32 config_offset, gsi, vec;
 	int type = virtio__get_dev_specific_field(offset - 20, virtio_pci__msix_enabled(vpci),
-							0, &config_offset);
+							&config_offset);
 	if (type == VIRTIO_PCI_O_MSIX) {
 		switch (offset) {
 		case VIRTIO_MSI_CONFIG_VECTOR:
-- 
1.7.8

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux