Commit 1382aba0 authored by Sasha Levin's avatar Sasha Levin Committed by Will Deacon
Browse files

kvm tools: Ninja out support for VIRTIO_F_FEATURES_HIGH



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@rustcorp.com.au>
Signed-off-by: default avatarSasha Levin <levinsasha928@gmail.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 8a585d13
......@@ -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 */
......@@ -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;
......
......@@ -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:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment