Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123977
b: refs/heads/master
c: db40598
h: refs/heads/master
i:
  123975: 48b3509
v: v3
  • Loading branch information
Rusty Russell committed Dec 29, 2008
1 parent 3a58ca7 commit 7be4378
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2966af73e70dee461c256b5eb877b2ff757f8c82
refs/heads/master: db40598863e8cbbd11053ad3c8bae89000f603f9
4 changes: 4 additions & 0 deletions trunk/arch/s390/include/asm/kvm_virtio.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ struct kvm_vqconfig {
#define KVM_S390_VIRTIO_RESET 1
#define KVM_S390_VIRTIO_SET_STATUS 2

/* The alignment to use between consumer and producer parts of vring.
* This is pagesize for historical reasons. */
#define KVM_S390_VIRTIO_RING_ALIGN 4096

#ifdef __KERNEL__
/* early virtio console setup */
#ifdef CONFIG_S390_GUEST
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/s390/kvm/kvm_virtio.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ static struct virtqueue *kvm_find_vq(struct virtio_device *vdev,
config = kvm_vq_config(kdev->desc)+index;

err = vmem_add_mapping(config->address,
vring_size(config->num, PAGE_SIZE));
vring_size(config->num,
KVM_S390_VIRTIO_RING_ALIGN));
if (err)
goto out;

Expand All @@ -209,7 +210,8 @@ static struct virtqueue *kvm_find_vq(struct virtio_device *vdev,
return vq;
unmap:
vmem_remove_mapping(config->address,
vring_size(config->num, PAGE_SIZE));
vring_size(config->num,
KVM_S390_VIRTIO_RING_ALIGN));
out:
return ERR_PTR(err);
}
Expand All @@ -220,7 +222,8 @@ static void kvm_del_vq(struct virtqueue *vq)

vring_del_virtqueue(vq);
vmem_remove_mapping(config->address,
vring_size(config->num, PAGE_SIZE));
vring_size(config->num,
KVM_S390_VIRTIO_RING_ALIGN));
}

/*
Expand Down

0 comments on commit 7be4378

Please sign in to comment.