Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6014f1a authored by Radim Krčmář's avatar Radim Krčmář
Browse files
KVM: s390: fixes and improvements for 4.15

- Some initial preparation patches for exitless interrupts and crypto
- New capability for AIS migration
- Fixes
- merge of the sthyi tree from the base s390 team, which moves the sthyi
out of KVM into a shared function also for non-KVM
parents 61d75077 da9a1446
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4351,3 +4351,12 @@ This capability indicates that userspace can load HV_X64_MSR_VP_INDEX msr. Its
value is used to denote the target vcpu for a SynIC interrupt.  For
compatibilty, KVM initializes this msr to KVM's internal vcpu index.  When this
capability is absent, userspace can still query this msr's value.

8.13 KVM_CAP_S390_AIS_MIGRATION

Architectures: s390
Parameters: none

This capability indicates if the flic device will be able to get/set the
AIS states for migration via the KVM_DEV_FLIC_AISM_ALL attribute and allows
to discover this without having to create a flic device.
+5 −0
Original line number Diff line number Diff line
@@ -151,8 +151,13 @@ struct kvm_s390_ais_all {
    to an ISC (MSB0 bit 0 to ISC 0 and so on). The combination of simm bit and
    nimm bit presents AIS mode for a ISC.

    KVM_DEV_FLIC_AISM_ALL is indicated by KVM_CAP_S390_AIS_MIGRATION.

Note: The KVM_SET_DEVICE_ATTR/KVM_GET_DEVICE_ATTR device ioctls executed on
FLIC with an unknown group or attribute gives the error code EINVAL (instead of
ENXIO, as specified in the API documentation). It is not possible to conclude
that a FLIC operation is unavailable based on the error code resulting from a
usage attempt.

Note: The KVM_DEV_FLIC_CLEAR_IO_IRQ ioctl will return EINVAL in case a zero
schid is specified.
+21 −5
Original line number Diff line number Diff line
@@ -685,11 +685,28 @@ struct kvm_s390_crypto {
	__u8 dea_kw;
};

#define APCB0_MASK_SIZE 1
struct kvm_s390_apcb0 {
	__u64 apm[APCB0_MASK_SIZE];		/* 0x0000 */
	__u64 aqm[APCB0_MASK_SIZE];		/* 0x0008 */
	__u64 adm[APCB0_MASK_SIZE];		/* 0x0010 */
	__u64 reserved18;			/* 0x0018 */
};

#define APCB1_MASK_SIZE 4
struct kvm_s390_apcb1 {
	__u64 apm[APCB1_MASK_SIZE];		/* 0x0000 */
	__u64 aqm[APCB1_MASK_SIZE];		/* 0x0020 */
	__u64 adm[APCB1_MASK_SIZE];		/* 0x0040 */
	__u64 reserved60[4];			/* 0x0060 */
};

struct kvm_s390_crypto_cb {
	__u8    reserved00[72];                 /* 0x0000 */
	struct kvm_s390_apcb0 apcb0;		/* 0x0000 */
	__u8   reserved20[0x0048 - 0x0020];	/* 0x0020 */
	__u8   dea_wrapping_key_mask[24];	/* 0x0048 */
	__u8   aes_wrapping_key_mask[32];	/* 0x0060 */
	__u8    reserved80[128];                /* 0x0080 */
	struct kvm_s390_apcb1 apcb1;		/* 0x0080 */
};

/*
@@ -736,7 +753,6 @@ struct kvm_arch{
	wait_queue_head_t ipte_wq;
	int ipte_lock_count;
	struct mutex ipte_mutex;
	struct ratelimit_state sthyi_limit;
	spinlock_t start_stop_lock;
	struct sie_page2 *sie_page2;
	struct kvm_s390_cpu_model model;
+1 −0
Original line number Diff line number Diff line
@@ -198,4 +198,5 @@ struct service_level {
int register_service_level(struct service_level *);
int unregister_service_level(struct service_level *);

int sthyi_fill(void *dst, u64 *rc);
#endif /* __ASM_S390_SYSINFO_H */
+6 −0
Original line number Diff line number Diff line
#ifndef _UAPI_ASM_STHYI_H
#define _UAPI_ASM_STHYI_H

#define STHYI_FC_CP_IFL_CAP	0

#endif /* _UAPI_ASM_STHYI_H */
Loading