Commit dd5bd0a6 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

Merge tag 'kvm-s390-next-4.20-1' of...

Merge tag 'kvm-s390-next-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD

KVM: s390: Features for 4.20
- Initial version of AP crypto virtualization via vfio-mdev
- Set the host program identifier
- Optimize page table locking
parents 7e712684 55d09dd4
Loading
Loading
Loading
Loading
+837 −0

File added.

Preview size limit exceeded, changes collapsed.

+12 −0
Original line number Original line Diff line number Diff line
@@ -12668,6 +12668,18 @@ W: http://www.ibm.com/developerworks/linux/linux390/
S:	Supported
S:	Supported
F:	drivers/s390/crypto/
F:	drivers/s390/crypto/


S390 VFIO AP DRIVER
M:	Tony Krowiak <akrowiak@linux.ibm.com>
M:	Pierre Morel <pmorel@linux.ibm.com>
M:	Halil Pasic <pasic@linux.ibm.com>
L:	linux-s390@vger.kernel.org
W:	http://www.ibm.com/developerworks/linux/linux390/
S:	Supported
F:	drivers/s390/crypto/vfio_ap_drv.c
F:	drivers/s390/crypto/vfio_ap_private.h
F:	drivers/s390/crypto/vfio_ap_ops.c
F:	Documentation/s390/vfio-ap.txt

S390 ZFCP DRIVER
S390 ZFCP DRIVER
M:	Steffen Maier <maier@linux.ibm.com>
M:	Steffen Maier <maier@linux.ibm.com>
M:	Benjamin Block <bblock@linux.ibm.com>
M:	Benjamin Block <bblock@linux.ibm.com>
+11 −0
Original line number Original line Diff line number Diff line
@@ -773,6 +773,17 @@ config VFIO_CCW
	  To compile this driver as a module, choose M here: the
	  To compile this driver as a module, choose M here: the
	  module will be called vfio_ccw.
	  module will be called vfio_ccw.


config VFIO_AP
	def_tristate n
	prompt "VFIO support for AP devices"
	depends on S390_AP_IOMMU && VFIO_MDEV_DEVICE && KVM
	help
		This driver grants access to Adjunct Processor (AP) devices
		via the VFIO mediated device interface.

		To compile this driver as a module, choose M here: the module
		will be called vfio_ap.

endmenu
endmenu


menu "Dump support"
menu "Dump support"
+12 −1
Original line number Original line Diff line number Diff line
@@ -44,6 +44,7 @@
#define KVM_REQ_ICPT_OPEREXC	KVM_ARCH_REQ(2)
#define KVM_REQ_ICPT_OPEREXC	KVM_ARCH_REQ(2)
#define KVM_REQ_START_MIGRATION KVM_ARCH_REQ(3)
#define KVM_REQ_START_MIGRATION KVM_ARCH_REQ(3)
#define KVM_REQ_STOP_MIGRATION  KVM_ARCH_REQ(4)
#define KVM_REQ_STOP_MIGRATION  KVM_ARCH_REQ(4)
#define KVM_REQ_VSIE_RESTART	KVM_ARCH_REQ(5)


#define SIGP_CTRL_C		0x80
#define SIGP_CTRL_C		0x80
#define SIGP_CTRL_SCN_MASK	0x3f
#define SIGP_CTRL_SCN_MASK	0x3f
@@ -186,6 +187,7 @@ struct kvm_s390_sie_block {
#define ECA_AIV		0x00200000
#define ECA_AIV		0x00200000
#define ECA_VX		0x00020000
#define ECA_VX		0x00020000
#define ECA_PROTEXCI	0x00002000
#define ECA_PROTEXCI	0x00002000
#define ECA_APIE	0x00000008
#define ECA_SII		0x00000001
#define ECA_SII		0x00000001
	__u32	eca;			/* 0x004c */
	__u32	eca;			/* 0x004c */
#define ICPT_INST	0x04
#define ICPT_INST	0x04
@@ -237,7 +239,11 @@ struct kvm_s390_sie_block {
	psw_t	gpsw;			/* 0x0090 */
	psw_t	gpsw;			/* 0x0090 */
	__u64	gg14;			/* 0x00a0 */
	__u64	gg14;			/* 0x00a0 */
	__u64	gg15;			/* 0x00a8 */
	__u64	gg15;			/* 0x00a8 */
	__u8	reservedb0[20];		/* 0x00b0 */
	__u8	reservedb0[8];		/* 0x00b0 */
#define HPID_KVM	0x4
#define HPID_VSIE	0x5
	__u8	hpid;			/* 0x00b8 */
	__u8	reservedb9[11];		/* 0x00b9 */
	__u16	extcpuaddr;		/* 0x00c4 */
	__u16	extcpuaddr;		/* 0x00c4 */
	__u16	eic;			/* 0x00c6 */
	__u16	eic;			/* 0x00c6 */
	__u32	reservedc8;		/* 0x00c8 */
	__u32	reservedc8;		/* 0x00c8 */
@@ -255,6 +261,8 @@ struct kvm_s390_sie_block {
	__u8	reservede4[4];		/* 0x00e4 */
	__u8	reservede4[4];		/* 0x00e4 */
	__u64	tecmc;			/* 0x00e8 */
	__u64	tecmc;			/* 0x00e8 */
	__u8	reservedf0[12];		/* 0x00f0 */
	__u8	reservedf0[12];		/* 0x00f0 */
#define CRYCB_FORMAT_MASK 0x00000003
#define CRYCB_FORMAT0 0x00000000
#define CRYCB_FORMAT1 0x00000001
#define CRYCB_FORMAT1 0x00000001
#define CRYCB_FORMAT2 0x00000003
#define CRYCB_FORMAT2 0x00000003
	__u32	crycbd;			/* 0x00fc */
	__u32	crycbd;			/* 0x00fc */
@@ -715,6 +723,7 @@ struct kvm_s390_crypto {
	__u32 crycbd;
	__u32 crycbd;
	__u8 aes_kw;
	__u8 aes_kw;
	__u8 dea_kw;
	__u8 dea_kw;
	__u8 apie;
};
};


#define APCB0_MASK_SIZE 1
#define APCB0_MASK_SIZE 1
@@ -855,6 +864,8 @@ void kvm_arch_async_page_not_present(struct kvm_vcpu *vcpu,
void kvm_arch_async_page_present(struct kvm_vcpu *vcpu,
void kvm_arch_async_page_present(struct kvm_vcpu *vcpu,
				 struct kvm_async_pf *work);
				 struct kvm_async_pf *work);


void kvm_arch_crypto_clear_masks(struct kvm *kvm);

extern int sie64a(struct kvm_s390_sie_block *, u64 *);
extern int sie64a(struct kvm_s390_sie_block *, u64 *);
extern char sie_exit;
extern char sie_exit;


+2 −0
Original line number Original line Diff line number Diff line
@@ -160,6 +160,8 @@ struct kvm_s390_vm_cpu_subfunc {
#define KVM_S390_VM_CRYPTO_ENABLE_DEA_KW	1
#define KVM_S390_VM_CRYPTO_ENABLE_DEA_KW	1
#define KVM_S390_VM_CRYPTO_DISABLE_AES_KW	2
#define KVM_S390_VM_CRYPTO_DISABLE_AES_KW	2
#define KVM_S390_VM_CRYPTO_DISABLE_DEA_KW	3
#define KVM_S390_VM_CRYPTO_DISABLE_DEA_KW	3
#define KVM_S390_VM_CRYPTO_ENABLE_APIE		4
#define KVM_S390_VM_CRYPTO_DISABLE_APIE		5


/* kvm attributes for migration mode */
/* kvm attributes for migration mode */
#define KVM_S390_VM_MIGRATION_STOP	0
#define KVM_S390_VM_MIGRATION_STOP	0
Loading