History

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

KVM: s390: Features and Enhancements for 5.7 part1 1. Allow to disable gisa 2. protected virtual machines Protected VMs (PVM) are KVM VMs, where KVM can't access the VM's state like guest memory and guest registers anymore. Instead the PVMs are mostly managed by a new entity called Ultravisor (UV), which provides an API, so KVM and the PV can request management actions. PVMs are encrypted at rest and protected from hypervisor access while running. They switch from a normal operation into protected mode, so we can still use the standard boot process to load a encrypted blob and then move it into protected mode. Rebooting is only possible by passing through the unprotected/normal mode and switching to protected again. One mm related patch will go via Andrews mm tree ( mm/gup/writeback: add callbacks for inaccessible pages)

Paolo Bonzini committed 6 years ago

Commit 1c482452 parents 6d05a96 cc674ef362 files · +6431 −2586Browse files

Showing the changes to include/uapi/linux (1 of 362 files). Show all

Unified · Split

include/uapi/linux/kvm.h+41−2
@@ -474,12 +474,17 @@ struct kvm_s390_mem_op { · 473 unmodified lines
474 __u32 size; /* amount of bytes */474 __u32 size; /* amount of bytes */
475 __u32 op; /* type of operation */475 __u32 op; /* type of operation */
476 __u64 buf; /* buffer in userspace */476 __u64 buf; /* buffer in userspace */
477 __u8 ar; /* the access register number */477 union {
478 __u8 reserved[31]; /* should be set to 0 */478 __u8 ar; /* the access register number */
479 __u32 sida_offset; /* offset into the sida */
480 __u8 reserved[32]; /* should be set to 0 */
481 };
479};482};
480/* types for kvm_s390_mem_op->op */483/* types for kvm_s390_mem_op->op */
481#define KVM_S390_MEMOP_LOGICAL_READ 0484#define KVM_S390_MEMOP_LOGICAL_READ 0
482#define KVM_S390_MEMOP_LOGICAL_WRITE 1485#define KVM_S390_MEMOP_LOGICAL_WRITE 1
486#define KVM_S390_MEMOP_SIDA_READ 2
487#define KVM_S390_MEMOP_SIDA_WRITE 3
483/* flags for kvm_s390_mem_op->flags */488/* flags for kvm_s390_mem_op->flags */
484#define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0)489#define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0)
485#define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1)490#define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1)
@@ -1010,6 +1015,7 @@ struct kvm_ppc_resize_hpt { · 524 unmodified lines
1010#define KVM_CAP_ARM_NISV_TO_USER 1771015#define KVM_CAP_ARM_NISV_TO_USER 177
1011#define KVM_CAP_ARM_INJECT_EXT_DABT 1781016#define KVM_CAP_ARM_INJECT_EXT_DABT 178
1012#define KVM_CAP_S390_VCPU_RESETS 1791017#define KVM_CAP_S390_VCPU_RESETS 179
1018#define KVM_CAP_S390_PROTECTED 180
1013 1019
1014#ifdef KVM_CAP_IRQ_ROUTING1020#ifdef KVM_CAP_IRQ_ROUTING
1015 1021
@@ -1478,6 +1484,39 @@ struct kvm_enc_region { · 462 unmodified lines
1478#define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3)1484#define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3)
1479#define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4)1485#define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4)
1480 1486
1487struct kvm_s390_pv_sec_parm {
1488 __u64 origin;
1489 __u64 length;
1490};
1491
1492struct kvm_s390_pv_unp {
1493 __u64 addr;
1494 __u64 size;
1495 __u64 tweak;
1496};
1497
1498enum pv_cmd_id {
1499 KVM_PV_ENABLE,
1500 KVM_PV_DISABLE,
1501 KVM_PV_SET_SEC_PARMS,
1502 KVM_PV_UNPACK,
1503 KVM_PV_VERIFY,
1504 KVM_PV_PREP_RESET,
1505 KVM_PV_UNSHARE_ALL,
1506};
1507
1508struct kvm_pv_cmd {
1509 __u32 cmd; /* Command to be executed */
1510 __u16 rc; /* Ultravisor return code */
1511 __u16 rrc; /* Ultravisor return reason code */
1512 __u64 data; /* Data or address */
1513 __u32 flags; /* flags for future extensions. Must be 0 for now */
1514 __u32 reserved[3];
1515};
1516
1517/* Available with KVM_CAP_S390_PROTECTED */
1518#define KVM_S390_PV_COMMAND _IOWR(KVMIO, 0xc5, struct kvm_pv_cmd)
1519
1481/* Secure Encrypted Virtualization command */1520/* Secure Encrypted Virtualization command */
1482enum sev_cmd_id {1521enum sev_cmd_id {
1483 /* Guest initialization commands */1522 /* Guest initialization commands */