diff options
Diffstat (limited to 'tools/include/uapi/linux/kvm.h')
| -rw-r--r-- | tools/include/uapi/linux/kvm.h | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h index 8fb90a0819c3..0fb5ef939732 100644 --- a/tools/include/uapi/linux/kvm.h +++ b/tools/include/uapi/linux/kvm.h | |||
| @@ -1362,6 +1362,96 @@ struct kvm_s390_ucas_mapping { | |||
| 1362 | /* Available with KVM_CAP_S390_CMMA_MIGRATION */ | 1362 | /* Available with KVM_CAP_S390_CMMA_MIGRATION */ |
| 1363 | #define KVM_S390_GET_CMMA_BITS _IOWR(KVMIO, 0xb8, struct kvm_s390_cmma_log) | 1363 | #define KVM_S390_GET_CMMA_BITS _IOWR(KVMIO, 0xb8, struct kvm_s390_cmma_log) |
| 1364 | #define KVM_S390_SET_CMMA_BITS _IOW(KVMIO, 0xb9, struct kvm_s390_cmma_log) | 1364 | #define KVM_S390_SET_CMMA_BITS _IOW(KVMIO, 0xb9, struct kvm_s390_cmma_log) |
| 1365 | /* Memory Encryption Commands */ | ||
| 1366 | #define KVM_MEMORY_ENCRYPT_OP _IOWR(KVMIO, 0xba, unsigned long) | ||
| 1367 | |||
| 1368 | struct kvm_enc_region { | ||
| 1369 | __u64 addr; | ||
| 1370 | __u64 size; | ||
| 1371 | }; | ||
| 1372 | |||
| 1373 | #define KVM_MEMORY_ENCRYPT_REG_REGION _IOR(KVMIO, 0xbb, struct kvm_enc_region) | ||
| 1374 | #define KVM_MEMORY_ENCRYPT_UNREG_REGION _IOR(KVMIO, 0xbc, struct kvm_enc_region) | ||
| 1375 | |||
| 1376 | /* Secure Encrypted Virtualization command */ | ||
| 1377 | enum sev_cmd_id { | ||
| 1378 | /* Guest initialization commands */ | ||
| 1379 | KVM_SEV_INIT = 0, | ||
| 1380 | KVM_SEV_ES_INIT, | ||
| 1381 | /* Guest launch commands */ | ||
| 1382 | KVM_SEV_LAUNCH_START, | ||
| 1383 | KVM_SEV_LAUNCH_UPDATE_DATA, | ||
| 1384 | KVM_SEV_LAUNCH_UPDATE_VMSA, | ||
| 1385 | KVM_SEV_LAUNCH_SECRET, | ||
| 1386 | KVM_SEV_LAUNCH_MEASURE, | ||
| 1387 | KVM_SEV_LAUNCH_FINISH, | ||
| 1388 | /* Guest migration commands (outgoing) */ | ||
| 1389 | KVM_SEV_SEND_START, | ||
| 1390 | KVM_SEV_SEND_UPDATE_DATA, | ||
| 1391 | KVM_SEV_SEND_UPDATE_VMSA, | ||
| 1392 | KVM_SEV_SEND_FINISH, | ||
| 1393 | /* Guest migration commands (incoming) */ | ||
| 1394 | KVM_SEV_RECEIVE_START, | ||
| 1395 | KVM_SEV_RECEIVE_UPDATE_DATA, | ||
| 1396 | KVM_SEV_RECEIVE_UPDATE_VMSA, | ||
| 1397 | KVM_SEV_RECEIVE_FINISH, | ||
| 1398 | /* Guest status and debug commands */ | ||
| 1399 | KVM_SEV_GUEST_STATUS, | ||
| 1400 | KVM_SEV_DBG_DECRYPT, | ||
| 1401 | KVM_SEV_DBG_ENCRYPT, | ||
| 1402 | /* Guest certificates commands */ | ||
| 1403 | KVM_SEV_CERT_EXPORT, | ||
| 1404 | |||
| 1405 | KVM_SEV_NR_MAX, | ||
| 1406 | }; | ||
| 1407 | |||
| 1408 | struct kvm_sev_cmd { | ||
| 1409 | __u32 id; | ||
| 1410 | __u64 data; | ||
| 1411 | __u32 error; | ||
| 1412 | __u32 sev_fd; | ||
| 1413 | }; | ||
| 1414 | |||
| 1415 | struct kvm_sev_launch_start { | ||
| 1416 | __u32 handle; | ||
| 1417 | __u32 policy; | ||
| 1418 | __u64 dh_uaddr; | ||
| 1419 | __u32 dh_len; | ||
| 1420 | __u64 session_uaddr; | ||
| 1421 | __u32 session_len; | ||
| 1422 | }; | ||
| 1423 | |||
| 1424 | struct kvm_sev_launch_update_data { | ||
| 1425 | __u64 uaddr; | ||
| 1426 | __u32 len; | ||
| 1427 | }; | ||
| 1428 | |||
| 1429 | |||
| 1430 | struct kvm_sev_launch_secret { | ||
| 1431 | __u64 hdr_uaddr; | ||
| 1432 | __u32 hdr_len; | ||
| 1433 | __u64 guest_uaddr; | ||
| 1434 | __u32 guest_len; | ||
| 1435 | __u64 trans_uaddr; | ||
| 1436 | __u32 trans_len; | ||
| 1437 | }; | ||
| 1438 | |||
| 1439 | struct kvm_sev_launch_measure { | ||
| 1440 | __u64 uaddr; | ||
| 1441 | __u32 len; | ||
| 1442 | }; | ||
| 1443 | |||
| 1444 | struct kvm_sev_guest_status { | ||
| 1445 | __u32 handle; | ||
| 1446 | __u32 policy; | ||
| 1447 | __u32 state; | ||
| 1448 | }; | ||
| 1449 | |||
| 1450 | struct kvm_sev_dbg { | ||
| 1451 | __u64 src_uaddr; | ||
| 1452 | __u64 dst_uaddr; | ||
| 1453 | __u32 len; | ||
| 1454 | }; | ||
| 1365 | 1455 | ||
| 1366 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) | 1456 | #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) |
| 1367 | #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) | 1457 | #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) |
