Skip to content

Commit 6a773cb

Browse files
cohuckmatosatti
authored andcommitted
KVM: s390: Export virtio-ccw api.
Export the virtio-ccw api in a header for usage by other code. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
1 parent 07e1693 commit 6a773cb

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

‎arch/s390/include/uapi/asm/Kbuild‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@ header-y += termios.h
4444
header-y += types.h
4545
header-y += ucontext.h
4646
header-y += unistd.h
47+
header-y += virtio-ccw.h
4748
header-y += vtoc.h
4849
header-y += zcrypt.h
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Definitions for virtio-ccw devices.
3+
*
4+
* Copyright IBM Corp. 2013
5+
*
6+
* This program is free software; you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License (version 2 only)
8+
* as published by the Free Software Foundation.
9+
*
10+
* Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
11+
*/
12+
#ifndef __KVM_VIRTIO_CCW_H
13+
#define __KVM_VIRTIO_CCW_H
14+
15+
/* Alignment of vring buffers. */
16+
#define KVM_VIRTIO_CCW_RING_ALIGN 4096
17+
18+
/* Subcode for diagnose 500 (virtio hypercall). */
19+
#define KVM_S390_VIRTIO_CCW_NOTIFY 3
20+
21+
#endif

‎drivers/s390/kvm/virtio_ccw.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <asm/irq.h>
3232
#include <asm/cio.h>
3333
#include <asm/ccwdev.h>
34+
#include <asm/virtio-ccw.h>
3435

3536
/*
3637
* virtio related functions
@@ -80,10 +81,6 @@ struct virtio_ccw_vq_info {
8081
long cookie;
8182
};
8283

83-
#define KVM_VIRTIO_CCW_RING_ALIGN 4096
84-
85-
#define KVM_S390_VIRTIO_CCW_NOTIFY 3
86-
8784
#define CCW_CMD_SET_VQ 0x13
8885
#define CCW_CMD_VDEV_RESET 0x33
8986
#define CCW_CMD_SET_IND 0x43

0 commit comments

Comments
 (0)