aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2013-02-28 06:33:17 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2013-03-05 17:12:10 -0500
commit6a773cb825afb74a600a08fe87fab55ee98ec2ac (patch)
tree03724ab9ae67a391c732f512c405fe6591b3b160
parent07e169335ff0570c6e67b5ccf74d793f00ab0834 (diff)
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>
-rw-r--r--arch/s390/include/uapi/asm/Kbuild1
-rw-r--r--arch/s390/include/uapi/asm/virtio-ccw.h21
-rw-r--r--drivers/s390/kvm/virtio_ccw.c5
3 files changed, 23 insertions, 4 deletions
diff --git a/arch/s390/include/uapi/asm/Kbuild b/arch/s390/include/uapi/asm/Kbuild
index 7bf68fff7c5d..9ccd1905bdad 100644
--- a/arch/s390/include/uapi/asm/Kbuild
+++ b/arch/s390/include/uapi/asm/Kbuild
@@ -44,5 +44,6 @@ header-y += termios.h
44header-y += types.h 44header-y += types.h
45header-y += ucontext.h 45header-y += ucontext.h
46header-y += unistd.h 46header-y += unistd.h
47header-y += virtio-ccw.h
47header-y += vtoc.h 48header-y += vtoc.h
48header-y += zcrypt.h 49header-y += zcrypt.h
diff --git a/arch/s390/include/uapi/asm/virtio-ccw.h b/arch/s390/include/uapi/asm/virtio-ccw.h
new file mode 100644
index 000000000000..a9a4ebf79fa7
--- /dev/null
+++ b/arch/s390/include/uapi/asm/virtio-ccw.h
@@ -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
diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c
index 3d657522b3e2..42d507c4e06b 100644
--- a/drivers/s390/kvm/virtio_ccw.c
+++ b/drivers/s390/kvm/virtio_ccw.c
@@ -31,6 +31,7 @@
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/cio.h> 32#include <asm/cio.h>
33#include <asm/ccwdev.h> 33#include <asm/ccwdev.h>
34#include <asm/virtio-ccw.h>
34 35
35/* 36/*
36 * virtio related functions 37 * virtio related functions
@@ -80,10 +81,6 @@ struct virtio_ccw_vq_info {
80 long cookie; 81 long cookie;
81}; 82};
82 83
83#define KVM_VIRTIO_CCW_RING_ALIGN 4096
84
85#define KVM_S390_VIRTIO_CCW_NOTIFY 3
86
87#define CCW_CMD_SET_VQ 0x13 84#define CCW_CMD_SET_VQ 0x13
88#define CCW_CMD_VDEV_RESET 0x33 85#define CCW_CMD_VDEV_RESET 0x33
89#define CCW_CMD_SET_IND 0x43 86#define CCW_CMD_SET_IND 0x43