Skip to content

Commit b8fc228

Browse files
committed
tools headers kvm: Sync linux/kvm.h with the kernel sources
To pick up the changes from: 9a5788c ("KVM: PPC: Book3S HV: Add a capability for enabling secure guests") 3c9bd40 ("KVM: x86: enable dirty log gradually in small chunks") 13da9ae ("KVM: s390: protvirt: introduce and enable KVM_CAP_S390_PROTECTED") e0d2773 ("KVM: s390: protvirt: UV calls in support of diag308 0, 1") 19e1227 ("KVM: S390: protvirt: Introduce instruction data area bounce buffer") 29b40f1 ("KVM: s390: protvirt: Add initial vm and cpu lifecycle handling") So far we're ignoring those arch specific ioctls, we need to revisit this at some time to have arch specific tables, etc: $ grep S390 tools/perf/trace/beauty/kvm_ioctl.sh egrep -v " ((ARM|PPC|S390)_|[GS]ET_(DEBUGREGS|PIT2|XSAVE|TSC_KHZ)|CREATE_SPAPR_TCE_64)" | \ $ This addresses these tools/perf build warnings: Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/include/uapi/asm/kvm.h' diff -u tools/arch/arm/include/uapi/asm/kvm.h arch/arm/include/uapi/asm/kvm.h Cc: Adrian Hunter <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Janosch Frank <[email protected]> Cc: Jay Zhou <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Paul Mackerras <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 1abcb9d commit b8fc228

File tree

1 file changed

+45
-2
lines changed
  • tools/include/uapi/linux

1 file changed

+45
-2
lines changed

tools/include/uapi/linux/kvm.h

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,12 +474,17 @@ struct kvm_s390_mem_op {
474474
__u32 size; /* amount of bytes */
475475
__u32 op; /* type of operation */
476476
__u64 buf; /* buffer in userspace */
477-
__u8 ar; /* the access register number */
478-
__u8 reserved[31]; /* should be set to 0 */
477+
union {
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+
};
479482
};
480483
/* types for kvm_s390_mem_op->op */
481484
#define KVM_S390_MEMOP_LOGICAL_READ 0
482485
#define KVM_S390_MEMOP_LOGICAL_WRITE 1
486+
#define KVM_S390_MEMOP_SIDA_READ 2
487+
#define KVM_S390_MEMOP_SIDA_WRITE 3
483488
/* flags for kvm_s390_mem_op->flags */
484489
#define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0)
485490
#define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1)
@@ -1010,6 +1015,8 @@ struct kvm_ppc_resize_hpt {
10101015
#define KVM_CAP_ARM_NISV_TO_USER 177
10111016
#define KVM_CAP_ARM_INJECT_EXT_DABT 178
10121017
#define KVM_CAP_S390_VCPU_RESETS 179
1018+
#define KVM_CAP_S390_PROTECTED 180
1019+
#define KVM_CAP_PPC_SECURE_GUEST 181
10131020

10141021
#ifdef KVM_CAP_IRQ_ROUTING
10151022

@@ -1478,6 +1485,39 @@ struct kvm_enc_region {
14781485
#define KVM_S390_NORMAL_RESET _IO(KVMIO, 0xc3)
14791486
#define KVM_S390_CLEAR_RESET _IO(KVMIO, 0xc4)
14801487

1488+
struct kvm_s390_pv_sec_parm {
1489+
__u64 origin;
1490+
__u64 length;
1491+
};
1492+
1493+
struct kvm_s390_pv_unp {
1494+
__u64 addr;
1495+
__u64 size;
1496+
__u64 tweak;
1497+
};
1498+
1499+
enum pv_cmd_id {
1500+
KVM_PV_ENABLE,
1501+
KVM_PV_DISABLE,
1502+
KVM_PV_SET_SEC_PARMS,
1503+
KVM_PV_UNPACK,
1504+
KVM_PV_VERIFY,
1505+
KVM_PV_PREP_RESET,
1506+
KVM_PV_UNSHARE_ALL,
1507+
};
1508+
1509+
struct kvm_pv_cmd {
1510+
__u32 cmd; /* Command to be executed */
1511+
__u16 rc; /* Ultravisor return code */
1512+
__u16 rrc; /* Ultravisor return reason code */
1513+
__u64 data; /* Data or address */
1514+
__u32 flags; /* flags for future extensions. Must be 0 for now */
1515+
__u32 reserved[3];
1516+
};
1517+
1518+
/* Available with KVM_CAP_S390_PROTECTED */
1519+
#define KVM_S390_PV_COMMAND _IOWR(KVMIO, 0xc5, struct kvm_pv_cmd)
1520+
14811521
/* Secure Encrypted Virtualization command */
14821522
enum sev_cmd_id {
14831523
/* Guest initialization commands */
@@ -1628,4 +1668,7 @@ struct kvm_hyperv_eventfd {
16281668
#define KVM_HYPERV_CONN_ID_MASK 0x00ffffff
16291669
#define KVM_HYPERV_EVENTFD_DEASSIGN (1 << 0)
16301670

1671+
#define KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE (1 << 0)
1672+
#define KVM_DIRTY_LOG_INITIALLY_SET (1 << 1)
1673+
16311674
#endif /* __LINUX_KVM_H */

0 commit comments

Comments
 (0)