From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Marcelo Tosatti <mtosatti@redhat.com>, Gleb Natapov <gleb@redhat.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
Carsten Otte <cotte@de.ibm.com>, Alexander Graf <agraf@suse.de>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
"Michael S. Tsirkin" <mst@redhat.com>, KVM <kvm@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>,
qemu-devel <qemu-devel@nongnu.org>
Subject: [PATCH v5 2/6] KVM: s390: Export virtio-ccw api.
Date: Thu, 28 Feb 2013 12:33:17 +0100 [thread overview]
Message-ID: <1362051201-56541-3-git-send-email-cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1362051201-56541-1-git-send-email-cornelia.huck@de.ibm.com>
Export the virtio-ccw api in a header for usage by other code.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
arch/s390/include/uapi/asm/Kbuild | 1 +
arch/s390/include/uapi/asm/virtio-ccw.h | 21 +++++++++++++++++++++
drivers/s390/kvm/virtio_ccw.c | 5 +----
3 files changed, 23 insertions(+), 4 deletions(-)
create mode 100644 arch/s390/include/uapi/asm/virtio-ccw.h
diff --git a/arch/s390/include/uapi/asm/Kbuild b/arch/s390/include/uapi/asm/Kbuild
index 7bf68ff..9ccd190 100644
--- a/arch/s390/include/uapi/asm/Kbuild
+++ b/arch/s390/include/uapi/asm/Kbuild
@@ -44,5 +44,6 @@ header-y += termios.h
header-y += types.h
header-y += ucontext.h
header-y += unistd.h
+header-y += virtio-ccw.h
header-y += vtoc.h
header-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 0000000..a9a4ebf
--- /dev/null
+++ b/arch/s390/include/uapi/asm/virtio-ccw.h
@@ -0,0 +1,21 @@
+/*
+ * Definitions for virtio-ccw devices.
+ *
+ * Copyright IBM Corp. 2013
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License (version 2 only)
+ * as published by the Free Software Foundation.
+ *
+ * Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
+ */
+#ifndef __KVM_VIRTIO_CCW_H
+#define __KVM_VIRTIO_CCW_H
+
+/* Alignment of vring buffers. */
+#define KVM_VIRTIO_CCW_RING_ALIGN 4096
+
+/* Subcode for diagnose 500 (virtio hypercall). */
+#define KVM_S390_VIRTIO_CCW_NOTIFY 3
+
+#endif
diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c
index 259a2fb..bf5ba3b 100644
--- a/drivers/s390/kvm/virtio_ccw.c
+++ b/drivers/s390/kvm/virtio_ccw.c
@@ -31,6 +31,7 @@
#include <asm/irq.h>
#include <asm/cio.h>
#include <asm/ccwdev.h>
+#include <asm/virtio-ccw.h>
/*
* virtio related functions
@@ -80,10 +81,6 @@ struct virtio_ccw_vq_info {
long cookie;
};
-#define KVM_VIRTIO_CCW_RING_ALIGN 4096
-
-#define KVM_S390_VIRTIO_CCW_NOTIFY 3
-
#define CCW_CMD_SET_VQ 0x13
#define CCW_CMD_VDEV_RESET 0x33
#define CCW_CMD_SET_IND 0x43
--
1.7.12.4
next prev parent reply other threads:[~2013-02-28 11:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 11:33 [PATCH v5 0/6] kvm: Make ioeventfd usable on s390 Cornelia Huck
2013-02-28 11:33 ` [PATCH v5 1/6] virtio_ccw: pass a cookie value to kvm hypercall Cornelia Huck
2013-02-28 11:33 ` Cornelia Huck [this message]
2013-02-28 11:33 ` [PATCH v5 3/6] KVM: Initialize irqfd from kvm_init() Cornelia Huck
2013-02-28 11:33 ` [PATCH v5 4/6] KVM: Introduce KVM_VIRTIO_CCW_NOTIFY_BUS Cornelia Huck
2013-02-28 11:33 ` [PATCH v5 5/6] KVM: ioeventfd for virtio-ccw devices Cornelia Huck
2013-02-28 11:33 ` [PATCH v5 6/6] KVM: s390: Wire up ioeventfd Cornelia Huck
2013-03-05 0:07 ` Marcelo Tosatti
2013-03-05 8:13 ` Cornelia Huck
2013-03-05 13:19 ` Michael S. Tsirkin
2013-03-05 14:24 ` Cornelia Huck
2013-02-28 13:12 ` [PATCH v5 0/6] kvm: Make ioeventfd usable on s390 Michael S. Tsirkin
2013-03-05 22:14 ` Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362051201-56541-3-git-send-email-cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cotte@de.ibm.com \
--cc=gleb@redhat.com \
--cc=heiko.carstens@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox