Skip to content

Commit

Permalink
KVM: s390: Export virtio-ccw api.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
cohuck authored and matosatti committed Mar 5, 2013
1 parent 07e1693 commit 6a773cb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions arch/s390/include/uapi/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
21 changes: 21 additions & 0 deletions arch/s390/include/uapi/asm/virtio-ccw.h
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions drivers/s390/kvm/virtio_ccw.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <asm/irq.h>
#include <asm/cio.h>
#include <asm/ccwdev.h>
#include <asm/virtio-ccw.h>

/*
* virtio related functions
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6a773cb

Please sign in to comment.