History

Merge branch 'vfio-ccw-for-martin' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into features

Pull vfio-ccw branch to add the basic channel I/O passthrough intrastructure based on vfio. The focus is on supporting dasd-eckd(cu_type/dev_type = 0x3990/0x3390) as the target device.

Martin Schwidefsky committed 9 years ago

Commit 6fb81d62 parents 485527b 187788819 files · +2417 −46Browse files

Showing the changes to include/uapi/linux (2 of 19 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/vfio.h +18 −0
  2. include/uapi/linux/vfio_ccw.h +24 −0
include/uapi/linux/vfio.h+18−0
@@ -198,6 +198,7 @@ struct vfio_device_info { · 197 unmodified lines
198#define VFIO_DEVICE_FLAGS_PCI (1 << 1) /* vfio-pci device */198#define VFIO_DEVICE_FLAGS_PCI (1 << 1) /* vfio-pci device */
199#define VFIO_DEVICE_FLAGS_PLATFORM (1 << 2) /* vfio-platform device */199#define VFIO_DEVICE_FLAGS_PLATFORM (1 << 2) /* vfio-platform device */
200#define VFIO_DEVICE_FLAGS_AMBA (1 << 3) /* vfio-amba device */200#define VFIO_DEVICE_FLAGS_AMBA (1 << 3) /* vfio-amba device */
201#define VFIO_DEVICE_FLAGS_CCW (1 << 4) /* vfio-ccw device */
201 __u32 num_regions; /* Max region index + 1 */202 __u32 num_regions; /* Max region index + 1 */
202 __u32 num_irqs; /* Max IRQ index + 1 */203 __u32 num_irqs; /* Max IRQ index + 1 */
203};204};
@@ -212,6 +213,7 @@ struct vfio_device_info { · 8 unmodified lines
212#define VFIO_DEVICE_API_PCI_STRING "vfio-pci"213#define VFIO_DEVICE_API_PCI_STRING "vfio-pci"
213#define VFIO_DEVICE_API_PLATFORM_STRING "vfio-platform"214#define VFIO_DEVICE_API_PLATFORM_STRING "vfio-platform"
214#define VFIO_DEVICE_API_AMBA_STRING "vfio-amba"215#define VFIO_DEVICE_API_AMBA_STRING "vfio-amba"
216#define VFIO_DEVICE_API_CCW_STRING "vfio-ccw"
215 217
216/**218/**
217 * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8,219 * VFIO_DEVICE_GET_REGION_INFO - _IOWR(VFIO_TYPE, VFIO_BASE + 8,
@@ -446,6 +448,22 @@ enum { · 228 unmodified lines
446 VFIO_PCI_NUM_IRQS448 VFIO_PCI_NUM_IRQS
447};449};
448 450
451/*
452 * The vfio-ccw bus driver makes use of the following fixed region and
453 * IRQ index mapping. Unimplemented regions return a size of zero.
454 * Unimplemented IRQ types return a count of zero.
455 */
456
457enum {
458 VFIO_CCW_CONFIG_REGION_INDEX,
459 VFIO_CCW_NUM_REGIONS
460};
461
462enum {
463 VFIO_CCW_IO_IRQ_INDEX,
464 VFIO_CCW_NUM_IRQS
465};
466
449/**467/**
450 * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO - _IORW(VFIO_TYPE, VFIO_BASE + 12,468 * VFIO_DEVICE_GET_PCI_HOT_RESET_INFO - _IORW(VFIO_TYPE, VFIO_BASE + 12,
451 * struct vfio_pci_hot_reset_info)469 * struct vfio_pci_hot_reset_info)
include/uapi/linux/vfio_ccw.h+24−0
@@ -0,0 +1,24 @@
1/*
2 * Interfaces for vfio-ccw
3 *
4 * Copyright IBM Corp. 2017
5 *
6 * Author(s): Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
7 */
8
9#ifndef _VFIO_CCW_H_
10#define _VFIO_CCW_H_
11
12#include <linux/types.h>
13
14struct ccw_io_region {
15#define ORB_AREA_SIZE 12
16 __u8 orb_area[ORB_AREA_SIZE];
17#define SCSW_AREA_SIZE 12
18 __u8 scsw_area[SCSW_AREA_SIZE];
19#define IRB_AREA_SIZE 96
20 __u8 irb_area[IRB_AREA_SIZE];
21 __u32 ret_code;
22} __packed;
23
24#endif