lkml.org 
[lkml]   [2015]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] kvmtool: Adjust to new upstream virtio constants
tools/kvm won't build on newer kernels, due to the rename in:

1862ee22ce2e ("virtio-mmio: Update the device to OASIS spec version")

adjust the code to the new names.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
diff --git a/tools/kvm/virtio/mmio.c b/tools/kvm/virtio/mmio.c
index 5174455c6c90..1587d5c8b73a 100644
--- a/tools/kvm/virtio/mmio.c
+++ b/tools/kvm/virtio/mmio.c
@@ -122,7 +122,7 @@ static void virtio_mmio_config_in(struct kvm_cpu *vcpu,
case VIRTIO_MMIO_INTERRUPT_STATUS:
ioport__write32(data, *(u32 *)(((void *)&vmmio->hdr) + addr));
break;
- case VIRTIO_MMIO_HOST_FEATURES:
+ case VIRTIO_MMIO_DEVICE_FEATURES:
if (vmmio->hdr.host_features_sel == 0)
val = vdev->ops->get_host_features(vmmio->kvm,
vmmio->dev);
@@ -152,8 +152,8 @@ static void virtio_mmio_config_out(struct kvm_cpu *vcpu,
u32 val = 0;

switch (addr) {
- case VIRTIO_MMIO_HOST_FEATURES_SEL:
- case VIRTIO_MMIO_GUEST_FEATURES_SEL:
+ case VIRTIO_MMIO_DEVICE_FEATURES_SEL:
+ case VIRTIO_MMIO_DRIVER_FEATURES_SEL:
case VIRTIO_MMIO_QUEUE_SEL:
val = ioport__read32(data);
*(u32 *)(((void *)&vmmio->hdr) + addr) = val;
@@ -165,7 +165,7 @@ static void virtio_mmio_config_out(struct kvm_cpu *vcpu,
if (vdev->ops->notify_status)
vdev->ops->notify_status(kvm, vmmio->dev, vmmio->hdr.status);
break;
- case VIRTIO_MMIO_GUEST_FEATURES:
+ case VIRTIO_MMIO_DRIVER_FEATURES:
if (vmmio->hdr.guest_features_sel == 0) {
val = ioport__read32(data);
vdev->ops->set_guest_features(vmmio->kvm,

\
 
 \ /
  Last update: 2015-03-16 15:41    [W:1.565 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site