[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 05/44] linux-headers: Update headers to pull in TDX API ch
From: |
isaku . yamahata |
Subject: |
[RFC PATCH v2 05/44] linux-headers: Update headers to pull in TDX API changes |
Date: |
Wed, 7 Jul 2021 17:54:35 -0700 |
From: Xiaoyao Li <xiaoyao.li@intel.com>
Pull in recent TDX updates, which are not backwards compatible.
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Co-developed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
---
linux-headers/asm-x86/kvm.h | 60 +++++++++++++++++++++++++++++++++++++
linux-headers/linux/kvm.h | 2 ++
2 files changed, 62 insertions(+)
diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
index 0662f644aa..dbcb590fb8 100644
--- a/linux-headers/asm-x86/kvm.h
+++ b/linux-headers/asm-x86/kvm.h
@@ -490,4 +490,64 @@ struct kvm_pmu_event_filter {
#define KVM_PMU_EVENT_ALLOW 0
#define KVM_PMU_EVENT_DENY 1
+#define KVM_X86_LEGACY_VM 0
+#define KVM_X86_SW_PROTECTED_VM 1
+#define KVM_X86_TDX_VM 2
+
+/* Trust Domain eXtension command*/
+enum kvm_tdx_cmd_id {
+ KVM_TDX_CAPABILITIES = 0,
+ KVM_TDX_INIT_VM,
+ KVM_TDX_INIT_VCPU,
+ KVM_TDX_INIT_MEM_REGION,
+ KVM_TDX_FINALIZE_VM,
+
+ KVM_TDX_CMD_NR_MAX,
+};
+
+struct kvm_tdx_cmd {
+ __u32 id;
+ __u32 metadata;
+ __u64 data;
+};
+
+struct kvm_tdx_cpuid_config {
+ __u32 leaf;
+ __u32 sub_leaf;
+ __u32 eax;
+ __u32 ebx;
+ __u32 ecx;
+ __u32 edx;
+};
+
+struct kvm_tdx_capabilities {
+ __u64 attrs_fixed0;
+ __u64 attrs_fixed1;
+ __u64 xfam_fixed0;
+ __u64 xfam_fixed1;
+
+ __u32 nr_cpuid_configs;
+ __u32 padding;
+ struct kvm_tdx_cpuid_config cpuid_configs[0];
+};
+
+struct kvm_tdx_init_vm {
+ __u32 max_vcpus;
+ __u32 tsc_khz;
+ __u64 attributes;
+ __u64 cpuid;
+ __u64 mrconfigid[6]; /* sha384 digest */
+ __u64 mrowner[6]; /* sha384 digest */
+ __u64 mrownerconfig[6]; /* sha348 digest */
+ __u64 reserved[43]; /* must be zero for future extensibility */
+};
+
+#define KVM_TDX_MEASURE_MEMORY_REGION (1UL << 0)
+
+struct kvm_tdx_init_mem_region {
+ __u64 source_addr;
+ __u64 gpa;
+ __u64 nr_pages;
+};
+
#endif /* _ASM_X86_KVM_H */
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 20d6a263bb..65ac70d6fd 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -1084,6 +1084,8 @@ struct kvm_ppc_resize_hpt {
#define KVM_CAP_VM_COPY_ENC_CONTEXT_FROM 197
#define KVM_CAP_PTP_KVM 198
+#define KVM_CAP_VM_TYPES 1000
+
#ifdef KVM_CAP_IRQ_ROUTING
struct kvm_irq_routing_irqchip {
--
2.25.1
- [RFC PATCH v2 36/44] hw/i386: add eoi_intercept_unsupported member to X86MachineState, (continued)
- [RFC PATCH v2 36/44] hw/i386: add eoi_intercept_unsupported member to X86MachineState, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 07/44] i386/kvm: Squash getting/putting guest state for TDX VMs, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 14/44] i386/tdx: Frame in the call for KVM_TDX_INIT_VCPU, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 16/44] hw/i386: Add definitions from UEFI spec for volumes, resources, etc..., isaku . yamahata, 2021/07/07
- [RFC PATCH v2 37/44] hw/i386: add option to forcibly report edge trigger in acpi tables, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 39/44] ioapic: add property to disallow SMI delivery mode, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 34/44] target/i386/tdx: set reboot action to shutdown when tdx, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 06/44] hw/i386: Introduce kvm-type for TDX guest, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 05/44] linux-headers: Update headers to pull in TDX API changes,
isaku . yamahata <=
- [RFC PATCH v2 15/44] i386/tdx: Add hook to require generic device loader, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 18/44] hw/i386: refactor e820_add_entry(), isaku . yamahata, 2021/07/07
- [RFC PATCH v2 19/44] hw/i386/e820: introduce a helper function to change type of e820, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 41/44] ioapic: add property to disallow INIT/SIPI delivery mode, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 20/44] i386/tdx: Parse tdx metadata and store the result into TdxGuestState, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 22/44] i386/tdx: Add TDVF memory via INIT_MEM_REGION, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 21/44] i386/tdx: Create the TD HOB list upon machine init done, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 40/44] hw/i386: add a flag to disallow SMI, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 43/44] i386/tdx: disallow level interrupt and SMI/INIT/SIPI delivery mode, isaku . yamahata, 2021/07/07
- [RFC PATCH v2 44/44] i386/tdx: disable S3/S4 unconditionally, isaku . yamahata, 2021/07/07