All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ashish Kalra <Ashish.Kalra@amd.com>
To: <x86@kernel.org>, <linux-kernel@vger.kernel.org>,
	<kvm@vger.kernel.org>, <linux-coco@lists.linux.dev>,
	<linux-mm@kvack.org>, <linux-crypto@vger.kernel.org>
Cc: <tglx@linutronix.de>, <mingo@redhat.com>, <jroedel@suse.de>,
	<thomas.lendacky@amd.com>, <hpa@zytor.com>, <ardb@kernel.org>,
	<pbonzini@redhat.com>, <seanjc@google.com>, <vkuznets@redhat.com>,
	<jmattson@google.com>, <luto@kernel.org>,
	<dave.hansen@linux.intel.com>, <slp@redhat.com>,
	<pgonda@google.com>, <peterz@infradead.org>,
	<srinivas.pandruvada@linux.intel.com>, <rientjes@google.com>,
	<dovmurik@linux.ibm.com>, <tobin@ibm.com>, <bp@alien8.de>,
	<michael.roth@amd.com>, <vbabka@suse.cz>, <kirill@shutemov.name>,
	<ak@linux.intel.com>, <tony.luck@intel.com>, <marcorr@google.com>,
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	<alpergun@google.com>, <dgilbert@redhat.com>, <jarkko@kernel.org>
Subject: [PATCH Part2 v6 44/49] KVM: SVM: Support SEV-SNP AP Creation NAE event
Date: Mon, 20 Jun 2022 23:14:12 +0000	[thread overview]
Message-ID: <ca0055ea49a36fcbc618f318083da5e062cccdb5.1655761627.git.ashish.kalra@amd.com> (raw)
In-Reply-To: <cover.1655761627.git.ashish.kalra@amd.com>

From: Tom Lendacky <thomas.lendacky@amd.com>

Add support for the SEV-SNP AP Creation NAE event. This allows SEV-SNP
guests to alter the register state of the APs on their own. This allows
the guest a way of simulating INIT-SIPI.

A new event, KVM_REQ_UPDATE_PROTECTED_GUEST_STATE, is created and used
so as to avoid updating the VMSA pointer while the vCPU is running.

For CREATE
  The guest supplies the GPA of the VMSA to be used for the vCPU with
  the specified APIC ID. The GPA is saved in the svm struct of the
  target vCPU, the KVM_REQ_UPDATE_PROTECTED_GUEST_STATE event is added
  to the vCPU and then the vCPU is kicked.

For CREATE_ON_INIT:
  The guest supplies the GPA of the VMSA to be used for the vCPU with
  the specified APIC ID the next time an INIT is performed. The GPA is
  saved in the svm struct of the target vCPU.

For DESTROY:
  The guest indicates it wishes to stop the vCPU. The GPA is cleared
  from the svm struct, the KVM_REQ_UPDATE_PROTECTED_GUEST_STATE event is
  added to vCPU and then the vCPU is kicked.

The KVM_REQ_UPDATE_PROTECTED_GUEST_STATE event handler will be invoked
as a result of the event or as a result of an INIT. The handler sets the
vCPU to the KVM_MP_STATE_UNINITIALIZED state, so that any errors will
leave the vCPU as not runnable. Any previous VMSA pages that were
installed as part of an SEV-SNP AP Creation NAE event are un-pinned. If
a new VMSA is to be installed, the VMSA guest page is pinned and set as
the VMSA in the vCPU VMCB and the vCPU state is set to
KVM_MP_STATE_RUNNABLE. If a new VMSA is not to be installed, the VMSA is
cleared in the vCPU VMCB and the vCPU state is left as
KVM_MP_STATE_UNINITIALIZED to prevent it from being run.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
---
 arch/x86/include/asm/kvm-x86-ops.h |   1 -
 arch/x86/include/asm/kvm_host.h    |   3 +-
 arch/x86/include/asm/svm.h         |   7 +-
 arch/x86/kvm/svm/sev.c             | 197 +++++++++++++++++++++++++++++
 arch/x86/kvm/svm/svm.c             |   5 +-
 arch/x86/kvm/svm/svm.h             |   6 +
 arch/x86/kvm/x86.c                 |   9 +-
 7 files changed, 221 insertions(+), 7 deletions(-)

diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h
index 2dd2bc0cf4c3..e0068e702692 100644
--- a/arch/x86/include/asm/kvm-x86-ops.h
+++ b/arch/x86/include/asm/kvm-x86-ops.h
@@ -130,7 +130,6 @@ KVM_X86_OP(vcpu_deliver_sipi_vector)
 KVM_X86_OP_OPTIONAL_RET0(vcpu_get_apicv_inhibit_reasons);
 KVM_X86_OP(alloc_apic_backing_page)
 KVM_X86_OP_OPTIONAL(rmp_page_level_adjust)
-KVM_X86_OP(update_protected_guest_state)
 
 #undef KVM_X86_OP
 #undef KVM_X86_OP_OPTIONAL
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 1db4d178eb1d..660cf39344fb 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -105,6 +105,7 @@
 	KVM_ARCH_REQ_FLAGS(30, KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP)
 #define KVM_REQ_MMU_FREE_OBSOLETE_ROOTS \
 	KVM_ARCH_REQ_FLAGS(31, KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP)
+#define KVM_REQ_UPDATE_PROTECTED_GUEST_STATE	KVM_ARCH_REQ(32)
 
 #define CR0_RESERVED_BITS                                               \
 	(~(unsigned long)(X86_CR0_PE | X86_CR0_MP | X86_CR0_EM | X86_CR0_TS \
@@ -1524,8 +1525,6 @@ struct kvm_x86_ops {
 	void *(*alloc_apic_backing_page)(struct kvm_vcpu *vcpu);
 
 	void (*rmp_page_level_adjust)(struct kvm *kvm, kvm_pfn_t pfn, int *level);
-
-	int (*update_protected_guest_state)(struct kvm_vcpu *vcpu);
 };
 
 struct kvm_x86_nested_ops {
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
index 284a8113227e..a69b6da71a65 100644
--- a/arch/x86/include/asm/svm.h
+++ b/arch/x86/include/asm/svm.h
@@ -263,7 +263,12 @@ enum avic_ipi_failure_cause {
 #define AVIC_HPA_MASK	~((0xFFFULL << 52) | 0xFFF)
 #define VMCB_AVIC_APIC_BAR_MASK		0xFFFFFFFFFF000ULL
 
-#define SVM_SEV_FEAT_SNP_ACTIVE		BIT(0)
+#define SVM_SEV_FEAT_SNP_ACTIVE			BIT(0)
+#define SVM_SEV_FEAT_RESTRICTED_INJECTION	BIT(3)
+#define SVM_SEV_FEAT_ALTERNATE_INJECTION	BIT(4)
+#define SVM_SEV_FEAT_INT_INJ_MODES		\
+	(SVM_SEV_FEAT_RESTRICTED_INJECTION |	\
+	 SVM_SEV_FEAT_ALTERNATE_INJECTION)
 
 struct vmcb_seg {
 	u16 selector;
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index d5584551f3dd..bb7d4547df81 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -657,6 +657,7 @@ static int sev_launch_update_data(struct kvm *kvm, struct kvm_sev_cmd *argp)
 
 static int sev_es_sync_vmsa(struct vcpu_svm *svm)
 {
+	struct kvm_sev_info *sev = &to_kvm_svm(svm->vcpu.kvm)->sev_info;
 	struct sev_es_save_area *save = svm->sev_es.vmsa;
 
 	/* Check some debug related fields before encrypting the VMSA */
@@ -702,6 +703,12 @@ static int sev_es_sync_vmsa(struct vcpu_svm *svm)
 	if (sev_snp_guest(svm->vcpu.kvm))
 		save->sev_features |= SVM_SEV_FEAT_SNP_ACTIVE;
 
+	/*
+	 * Save the VMSA synced SEV features. For now, they are the same for
+	 * all vCPUs, so just save each time.
+	 */
+	sev->sev_features = save->sev_features;
+
 	return 0;
 }
 
@@ -3090,6 +3097,10 @@ static int sev_es_validate_vmgexit(struct vcpu_svm *svm, u64 *exit_code)
 		if (!ghcb_sw_scratch_is_valid(ghcb))
 			goto vmgexit_err;
 		break;
+	case SVM_VMGEXIT_AP_CREATION:
+		if (!ghcb_rax_is_valid(ghcb))
+			goto vmgexit_err;
+		break;
 	case SVM_VMGEXIT_NMI_COMPLETE:
 	case SVM_VMGEXIT_AP_HLT_LOOP:
 	case SVM_VMGEXIT_AP_JUMP_TABLE:
@@ -3672,6 +3683,178 @@ static void snp_handle_ext_guest_request(struct vcpu_svm *svm, gpa_t req_gpa, gp
 	svm_set_ghcb_sw_exit_info_2(vcpu, rc);
 }
 
+static int __sev_snp_update_protected_guest_state(struct kvm_vcpu *vcpu)
+{
+	struct vcpu_svm *svm = to_svm(vcpu);
+	kvm_pfn_t pfn;
+	hpa_t cur_pa;
+
+	WARN_ON(!mutex_is_locked(&svm->sev_es.snp_vmsa_mutex));
+
+	/* Save off the current VMSA PA for later checks */
+	cur_pa = svm->sev_es.vmsa_pa;
+
+	/* Mark the vCPU as offline and not runnable */
+	vcpu->arch.pv.pv_unhalted = false;
+	vcpu->arch.mp_state = KVM_MP_STATE_STOPPED;
+
+	/* Clear use of the VMSA */
+	svm->sev_es.vmsa_pa = INVALID_PAGE;
+	svm->vmcb->control.vmsa_pa = INVALID_PAGE;
+
+	if (cur_pa != __pa(svm->sev_es.vmsa) && VALID_PAGE(cur_pa)) {
+		/*
+		 * The svm->sev_es.vmsa_pa field holds the hypervisor physical
+		 * address of the about to be replaced VMSA which will no longer
+		 * be used or referenced, so un-pin it.
+		 */
+		kvm_release_pfn_dirty(__phys_to_pfn(cur_pa));
+	}
+
+	if (VALID_PAGE(svm->sev_es.snp_vmsa_gpa)) {
+		/*
+		 * The VMSA is referenced by the hypervisor physical address,
+		 * so retrieve the PFN and pin it.
+		 */
+		pfn = gfn_to_pfn(vcpu->kvm, gpa_to_gfn(svm->sev_es.snp_vmsa_gpa));
+		if (is_error_pfn(pfn))
+			return -EINVAL;
+
+		/* Use the new VMSA */
+		svm->sev_es.vmsa_pa = pfn_to_hpa(pfn);
+		svm->vmcb->control.vmsa_pa = svm->sev_es.vmsa_pa;
+
+		/* Mark the vCPU as runnable */
+		vcpu->arch.pv.pv_unhalted = false;
+		vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
+
+		svm->sev_es.snp_vmsa_gpa = INVALID_PAGE;
+	}
+
+	/*
+	 * When replacing the VMSA during SEV-SNP AP creation,
+	 * mark the VMCB dirty so that full state is always reloaded.
+	 */
+	vmcb_mark_all_dirty(svm->vmcb);
+
+	return 0;
+}
+
+/*
+ * Invoked as part of svm_vcpu_reset() processing of an init event.
+ */
+void sev_snp_init_protected_guest_state(struct kvm_vcpu *vcpu)
+{
+	struct vcpu_svm *svm = to_svm(vcpu);
+	int ret;
+
+	if (!sev_snp_guest(vcpu->kvm))
+		return;
+
+	mutex_lock(&svm->sev_es.snp_vmsa_mutex);
+
+	if (!svm->sev_es.snp_ap_create)
+		goto unlock;
+
+	svm->sev_es.snp_ap_create = false;
+
+	ret = __sev_snp_update_protected_guest_state(vcpu);
+	if (ret)
+		vcpu_unimpl(vcpu, "snp: AP state update on init failed\n");
+
+unlock:
+	mutex_unlock(&svm->sev_es.snp_vmsa_mutex);
+}
+
+static int sev_snp_ap_creation(struct vcpu_svm *svm)
+{
+	struct kvm_sev_info *sev = &to_kvm_svm(svm->vcpu.kvm)->sev_info;
+	struct kvm_vcpu *vcpu = &svm->vcpu;
+	struct kvm_vcpu *target_vcpu;
+	struct vcpu_svm *target_svm;
+	unsigned int request;
+	unsigned int apic_id;
+	bool kick;
+	int ret;
+
+	request = lower_32_bits(svm->vmcb->control.exit_info_1);
+	apic_id = upper_32_bits(svm->vmcb->control.exit_info_1);
+
+	/* Validate the APIC ID */
+	target_vcpu = kvm_get_vcpu_by_id(vcpu->kvm, apic_id);
+	if (!target_vcpu) {
+		vcpu_unimpl(vcpu, "vmgexit: invalid AP APIC ID [%#x] from guest\n",
+			    apic_id);
+		return -EINVAL;
+	}
+
+	ret = 0;
+
+	target_svm = to_svm(target_vcpu);
+
+	/*
+	 * We have a valid target vCPU, so the vCPU will be kicked unless the
+	 * request is for CREATE_ON_INIT. For any errors at this stage, the
+	 * kick will place the vCPU in an non-runnable state.
+	 */
+	kick = true;
+
+	mutex_lock(&target_svm->sev_es.snp_vmsa_mutex);
+
+	target_svm->sev_es.snp_vmsa_gpa = INVALID_PAGE;
+	target_svm->sev_es.snp_ap_create = true;
+
+	/* Interrupt injection mode shouldn't change for AP creation */
+	if (request < SVM_VMGEXIT_AP_DESTROY) {
+		u64 sev_features;
+
+		sev_features = vcpu->arch.regs[VCPU_REGS_RAX];
+		sev_features ^= sev->sev_features;
+		if (sev_features & SVM_SEV_FEAT_INT_INJ_MODES) {
+			vcpu_unimpl(vcpu, "vmgexit: invalid AP injection mode [%#lx] from guest\n",
+				    vcpu->arch.regs[VCPU_REGS_RAX]);
+			ret = -EINVAL;
+			goto out;
+		}
+	}
+
+	switch (request) {
+	case SVM_VMGEXIT_AP_CREATE_ON_INIT:
+		kick = false;
+		fallthrough;
+	case SVM_VMGEXIT_AP_CREATE:
+		if (!page_address_valid(vcpu, svm->vmcb->control.exit_info_2)) {
+			vcpu_unimpl(vcpu, "vmgexit: invalid AP VMSA address [%#llx] from guest\n",
+				    svm->vmcb->control.exit_info_2);
+			ret = -EINVAL;
+			goto out;
+		}
+
+		target_svm->sev_es.snp_vmsa_gpa = svm->vmcb->control.exit_info_2;
+		break;
+	case SVM_VMGEXIT_AP_DESTROY:
+		break;
+	default:
+		vcpu_unimpl(vcpu, "vmgexit: invalid AP creation request [%#x] from guest\n",
+			    request);
+		ret = -EINVAL;
+		break;
+	}
+
+out:
+	if (kick) {
+		if (target_vcpu->arch.mp_state == KVM_MP_STATE_UNINITIALIZED)
+			target_vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
+
+		kvm_make_request(KVM_REQ_UPDATE_PROTECTED_GUEST_STATE, target_vcpu);
+		kvm_vcpu_kick(target_vcpu);
+	}
+
+	mutex_unlock(&target_svm->sev_es.snp_vmsa_mutex);
+
+	return ret;
+}
+
 static int sev_handle_vmgexit_msr_protocol(struct vcpu_svm *svm)
 {
 	struct vmcb_control_area *control = &svm->vmcb->control;
@@ -3937,6 +4120,18 @@ int sev_handle_vmgexit(struct kvm_vcpu *vcpu)
 		ret = 1;
 		break;
 	}
+	case SVM_VMGEXIT_AP_CREATION:
+		ret = sev_snp_ap_creation(svm);
+		if (ret) {
+			svm_set_ghcb_sw_exit_info_1(vcpu, 1);
+			svm_set_ghcb_sw_exit_info_2(vcpu,
+						    X86_TRAP_GP |
+						    SVM_EVTINJ_TYPE_EXEPT |
+						    SVM_EVTINJ_VALID);
+		}
+
+		ret = 1;
+		break;
 	case SVM_VMGEXIT_UNSUPPORTED_EVENT:
 		vcpu_unimpl(vcpu,
 			    "vmgexit: unsupported event - exit_info_1=%#llx, exit_info_2=%#llx\n",
@@ -4024,6 +4219,8 @@ void sev_es_vcpu_reset(struct vcpu_svm *svm)
 	set_ghcb_msr(svm, GHCB_MSR_SEV_INFO(GHCB_VERSION_MAX,
 					    GHCB_VERSION_MIN,
 					    sev_enc_bit));
+
+	mutex_init(&svm->sev_es.snp_vmsa_mutex);
 }
 
 void sev_es_prepare_switch_to_guest(struct sev_es_save_area *hostsa)
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index f7155abe7567..fced6ea423ad 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -1237,6 +1237,9 @@ static void svm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
 	svm->spec_ctrl = 0;
 	svm->virt_spec_ctrl = 0;
 
+	if (init_event)
+		sev_snp_init_protected_guest_state(vcpu);
+
 	init_vmcb(vcpu);
 
 	if (!init_event)
@@ -4749,8 +4752,6 @@ static struct kvm_x86_ops svm_x86_ops __initdata = {
 	.alloc_apic_backing_page = svm_alloc_apic_backing_page,
 
 	.rmp_page_level_adjust = sev_rmp_page_level_adjust,
-
-	.update_protected_guest_state = sev_snp_update_protected_guest_state,
 };
 
 /*
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
index 46790bab07a8..971ff4e949fd 100644
--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -100,6 +100,8 @@ struct kvm_sev_info {
 	spinlock_t psc_lock;
 	void *snp_certs_data;
 	struct mutex guest_req_lock;
+
+	u64 sev_features;	/* Features set at VMSA creation */
 };
 
 struct kvm_svm {
@@ -217,6 +219,10 @@ struct vcpu_sev_es_state {
 	u64 ghcb_sw_exit_info_2;
 
 	u64 ghcb_registered_gpa;
+
+	struct mutex snp_vmsa_mutex;
+	gpa_t snp_vmsa_gpa;
+	bool snp_ap_create;
 };
 
 struct vcpu_svm {
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 4a1d16231e30..c649d15efae3 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -10095,6 +10095,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
 
 		if (kvm_check_request(KVM_REQ_UPDATE_CPU_DIRTY_LOGGING, vcpu))
 			static_call(kvm_x86_update_cpu_dirty_logging)(vcpu);
+
+		if (kvm_check_request(KVM_REQ_UPDATE_PROTECTED_GUEST_STATE, vcpu)) {
+			kvm_vcpu_reset(vcpu, true);
+			if (vcpu->arch.mp_state != KVM_MP_STATE_RUNNABLE)
+				goto out;
+		}
 	}
 
 	if (kvm_check_request(KVM_REQ_EVENT, vcpu) || req_int_win ||
@@ -12219,7 +12225,8 @@ static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu)
 	if (!list_empty_careful(&vcpu->async_pf.done))
 		return true;
 
-	if (kvm_apic_has_events(vcpu))
+	if (kvm_apic_has_events(vcpu) ||
+	    kvm_test_request(KVM_REQ_UPDATE_PROTECTED_GUEST_STATE, vcpu))
 		return true;
 
 	if (vcpu->arch.pv.pv_unhalted)
-- 
2.25.1


  parent reply	other threads:[~2022-06-20 23:14 UTC|newest]

Thread overview: 306+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20 22:56 [PATCH Part2 v6 00/49] Add AMD Secure Nested Paging (SEV-SNP) Ashish Kalra
2022-06-20 22:59 ` [PATCH Part2 v6 01/49] x86/cpufeatures: Add SEV-SNP CPU feature Ashish Kalra
2022-06-21  8:58   ` Borislav Petkov
2022-06-20 22:59 ` [PATCH Part2 v6 02/49] iommu/amd: Introduce function to check SEV-SNP support Ashish Kalra
2022-06-21 15:28   ` Peter Gonda
2022-06-21 17:45     ` Kalra, Ashish
2022-06-21 17:50       ` Peter Gonda
2022-06-22  7:33         ` Suthikulpanit, Suravee
2022-08-25  1:28         ` jarkko
2022-08-25  1:30           ` Jarkko Sakkinen
2022-08-26 18:54             ` Kalra, Ashish
2022-08-28  4:18               ` Jarkko Sakkinen
2022-07-01 10:42   ` Borislav Petkov
2022-07-05 13:56     ` Kalra, Ashish
2022-07-05 14:33       ` Borislav Petkov
2022-07-05 14:53         ` Kalra, Ashish
2022-06-20 23:02 ` [PATCH Part2 v6 03/49] x86/sev: Add the host SEV-SNP initialization support Ashish Kalra
2022-06-21 15:47   ` Peter Gonda
2022-06-21 17:59     ` Kalra, Ashish
2022-06-23 20:48   ` Marc Orr
2022-06-23 22:22     ` Kalra, Ashish
2022-07-17 10:01   ` Borislav Petkov
2022-07-19  3:56     ` Kalra, Ashish
2022-07-19  8:38       ` Borislav Petkov
2022-07-19 11:34         ` Kalra, Ashish
2022-06-20 23:02 ` [PATCH Part2 v6 04/49] x86/sev: set SYSCFG.MFMD Ashish Kalra
2022-06-23 21:00   ` Marc Orr
2022-07-21 11:29   ` Borislav Petkov
2022-08-01 21:16     ` Kalra, Ashish
2022-06-20 23:02 ` [PATCH Part2 v6 05/49] x86/sev: Add RMP entry lookup helpers Ashish Kalra
2022-06-22 14:13   ` Dave Hansen
2022-06-22 14:22     ` Kalra, Ashish
2022-06-22 14:29       ` Dave Hansen
2022-06-22 18:15         ` Kalra, Ashish
2022-06-22 18:17           ` Dave Hansen
2022-06-22 18:34             ` Kalra, Ashish
2022-06-22 18:42               ` Dave Hansen
2022-06-22 18:50                 ` Kalra, Ashish
2022-06-22 19:43                 ` Kalra, Ashish
2022-06-22 19:49                   ` Dave Hansen
2022-06-22 20:15                     ` Kalra, Ashish
2022-06-22 20:58                       ` Kalra, Ashish
2022-06-23 22:36                       ` Sean Christopherson
2022-06-23 22:43                         ` Kalra, Ashish
2022-07-22 11:35                           ` Borislav Petkov
2022-07-22 19:04                             ` Sean Christopherson
2022-07-22 19:25                               ` Borislav Petkov
2022-07-22 19:38                                 ` Borislav Petkov
2022-08-01 21:53                                   ` Kalra, Ashish
2022-07-22 22:16                                 ` Sean Christopherson
2022-07-22 22:25                                   ` Borislav Petkov
2022-08-01 21:50                                 ` Kalra, Ashish
2022-06-23 21:30   ` Marc Orr
2022-07-22 11:43   ` Borislav Petkov
2022-08-01 21:45     ` Kalra, Ashish
2022-07-25 14:32   ` Borislav Petkov
2022-08-01 22:04     ` Kalra, Ashish
2022-06-20 23:02 ` [PATCH Part2 v6 06/49] x86/sev: Add helper functions for RMPUPDATE and PSMASH instruction Ashish Kalra
2022-06-21 16:40   ` Dr. David Alan Gilbert
2022-06-21 17:38     ` Kalra, Ashish
2022-06-22 18:17       ` Kalra, Ashish
2022-06-28 10:50         ` Dr. David Alan Gilbert
2022-06-28 17:57           ` Kalra, Ashish
2022-06-28 18:58             ` Dr. David Alan Gilbert
2022-06-28 19:03             ` Dave Hansen
2022-07-25 13:24             ` Borislav Petkov
2022-08-01 23:32               ` Kalra, Ashish
2022-08-02 14:14                 ` Borislav Petkov
2022-06-22 14:26   ` Dave Hansen
2022-06-22 18:04     ` Kalra, Ashish
2022-07-24 17:31   ` Dov Murik
2022-08-02  4:49     ` Kalra, Ashish
2022-07-25 14:36   ` Borislav Petkov
2022-08-01 22:31     ` Kalra, Ashish
2022-08-03 20:26       ` Borislav Petkov
2022-06-20 23:03 ` [PATCH Part2 v6 07/49] x86/sev: Invalid pages from direct map when adding it to RMP table Ashish Kalra
2022-06-24  0:06   ` Marc Orr
2022-07-27 17:01   ` Borislav Petkov
2022-08-01 23:57     ` Kalra, Ashish
2022-08-04 12:11       ` Borislav Petkov
2022-11-02  3:12         ` Kalra, Ashish
2022-11-02 11:27           ` Borislav Petkov
2022-12-19 15:00     ` Michael Roth
2022-12-19 20:08       ` Borislav Petkov
2022-12-27 21:49         ` Kalra, Ashish
2022-12-29 17:09           ` Borislav Petkov
2023-01-05 21:46             ` Kalra, Ashish
2023-01-05 22:08           ` Marc Orr
2023-01-05 22:27             ` Kalra, Ashish
2023-01-05 22:31               ` Marc Orr
2022-12-30 15:19         ` Mike Rapoport
2022-06-20 23:03 ` [PATCH Part2 v6 08/49] x86/traps: Define RMP violation #PF error code Ashish Kalra
2022-08-08 13:13   ` Borislav Petkov
2022-06-20 23:03 ` [PATCH Part2 v6 09/49] x86/fault: Add support to handle the RMP fault for user address Ashish Kalra
2022-06-22 14:29   ` Jeremi Piotrowski
2022-07-12 11:57   ` Jarkko Sakkinen
2022-07-12 14:29     ` Kalra, Ashish
2022-07-12 14:54       ` Jarkko Sakkinen
2022-08-09 16:55   ` Borislav Petkov
2022-08-10  3:59     ` Kalra, Ashish
2022-08-10  9:42       ` Borislav Petkov
2022-08-10 22:00         ` Kalra, Ashish
2022-08-11 14:27           ` Borislav Petkov
2022-09-01 20:32           ` Kalra, Ashish
2022-09-02  6:52             ` Borislav Petkov
2022-09-02 15:33               ` Kalra, Ashish
2022-09-03  4:25                 ` Borislav Petkov
2022-09-03  5:51                   ` Kalra, Ashish
2022-09-03  6:57                     ` Kalra, Ashish
2022-09-03  8:31                       ` Boris Petkov
2022-09-03 17:30                         ` Kalra, Ashish
2022-09-04  6:37                           ` Borislav Petkov
2022-09-06 14:06                             ` Kalra, Ashish
2022-09-06 10:25     ` Jarkko Sakkinen
2022-09-06 10:33       ` Jarkko Sakkinen
2022-09-06 13:54       ` Marc Orr
2022-09-06 14:17         ` Kalra, Ashish
2022-09-06 15:06           ` Michael Roth
2022-09-06 16:39             ` Kalra, Ashish
2022-09-07  5:14               ` Marc Orr
2022-09-06 15:44           ` Jarkko Sakkinen
2022-09-08  7:46             ` Jarkko Sakkinen
2022-09-08  7:57               ` Jarkko Sakkinen
2022-08-11 15:15   ` vbabka
2022-09-06  2:30   ` Dave Hansen
2022-06-20 23:03 ` [PATCH Part2 v6 10/49] x86/fault: Add support to dump RMP entry on fault Ashish Kalra
2022-06-22 14:33   ` Jeremi Piotrowski
2022-06-22 14:42     ` Jeremi Piotrowski
2022-06-22 18:08       ` Kalra, Ashish
2022-08-23 13:21   ` Borislav Petkov
2022-06-20 23:04 ` [PATCH Part2 v6 11/49] crypto:ccp: Define the SEV-SNP commands Ashish Kalra
2022-09-20 13:03   ` Borislav Petkov
2022-09-20 13:46     ` Kalra, Ashish
2022-09-20 14:04       ` Borislav Petkov
2022-06-20 23:04 ` [PATCH Part2 v6 12/49] crypto: ccp: Add support to initialize the AMD-SP for SEV-SNP Ashish Kalra
2022-10-01 17:33   ` Borislav Petkov
2022-10-14 21:09     ` Kalra, Ashish
2022-10-14 21:31       ` Kalra, Ashish
2022-10-25  8:56         ` Borislav Petkov
2022-10-19 18:48       ` Kalra, Ashish
2022-10-23 21:17         ` Jarkko Sakkinen
2022-10-25  9:07         ` Borislav Petkov
2022-10-25  8:30       ` Borislav Petkov
2022-06-20 23:04 ` [PATCH Part2 v6 13/49] crypto:ccp: Provide APIs to issue SEV-SNP commands Ashish Kalra
2022-06-21 21:43   ` Peter Gonda
2022-06-22  1:44     ` Kalra, Ashish
2022-08-02 10:52     ` Jarkko Sakkinen
2022-10-01 20:17   ` Borislav Petkov
2022-10-03 14:38     ` Kalra, Ashish
2022-10-03 16:16       ` Borislav Petkov
2022-10-03 17:11         ` Kalra, Ashish
2022-10-03 17:45           ` Borislav Petkov
2022-10-03 18:01             ` Peter Gonda
2022-10-03 18:16               ` Borislav Petkov
2022-10-03 18:43                 ` Kalra, Ashish
2022-10-03 18:53                   ` Borislav Petkov
2022-06-20 23:05 ` [PATCH Part2 v6 14/49] crypto: ccp: Handle the legacy TMR allocation when SNP is enabled Ashish Kalra
2022-06-21 18:11   ` Peter Gonda
2022-06-21 20:17     ` Kalra, Ashish
2022-06-24 14:19       ` Peter Gonda
2022-08-02 12:17       ` jarkko
2022-08-02 11:17   ` Jarkko Sakkinen
2022-10-13 15:15   ` Borislav Petkov
2022-10-14 20:00     ` Kalra, Ashish
2022-10-25 10:25       ` Borislav Petkov
2022-10-31 20:10         ` Kalra, Ashish
2022-10-31 21:15           ` Borislav Petkov
2022-10-31 21:58             ` Kalra, Ashish
2022-11-02 11:22               ` Borislav Petkov
2022-11-14 23:36                 ` Kalra, Ashish
2022-11-15 14:26                   ` Borislav Petkov
2022-11-15 15:14                   ` Vlastimil Babka
2022-11-15 15:22                     ` Borislav Petkov
2022-11-15 16:27                       ` Borislav Petkov
2022-11-15 22:44                         ` Kalra, Ashish
2022-11-15 17:24                     ` Kalra, Ashish
2022-11-15 18:15                       ` Kalra, Ashish
2022-11-16  9:08                         ` Vlastimil Babka
2022-11-16 10:19                           ` Kalra, Ashish
2022-11-16 10:25                             ` Vlastimil Babka
2022-11-16 18:01                               ` Kalra, Ashish
2022-11-16 18:33                                 ` Borislav Petkov
2022-11-16 18:53                                   ` Kalra, Ashish
2022-11-16 19:09                                     ` Borislav Petkov
2022-11-16 19:23                                       ` Kalra, Ashish
2022-11-16 18:32                               ` Dave Hansen
2022-11-16  5:19                     ` HORIGUCHI NAOYA(堀口 直也)
2022-11-16 10:28                       ` Kalra, Ashish
2022-11-16 23:41                         ` HORIGUCHI NAOYA(堀口 直也)
2022-11-17 20:56       ` Kalra, Ashish
2022-11-20 21:34         ` Borislav Petkov
2022-11-22  0:37           ` Kalra, Ashish
2022-11-22 10:17             ` Borislav Petkov
2022-11-22 10:32               ` Kalra, Ashish
2022-11-22 10:44                 ` Borislav Petkov
2022-11-22 11:44                   ` Kalra, Ashish
2022-11-23 11:40                     ` Borislav Petkov
2022-11-23 18:32                       ` Kalra, Ashish
2022-06-20 23:05 ` [PATCH Part2 v6 15/49] crypto: ccp: Handle the legacy SEV command " Ashish Kalra
2022-06-20 23:05 ` [PATCH Part2 v6 16/49] crypto: ccp: Add the SNP_PLATFORM_STATUS command Ashish Kalra
2022-06-20 23:05 ` [PATCH Part2 v6 17/49] crypto: ccp: Add the SNP_{SET,GET}_EXT_CONFIG command Ashish Kalra
2022-06-21 22:13   ` Peter Gonda
2022-06-22  1:58     ` Kalra, Ashish
2022-08-02 12:31   ` Jarkko Sakkinen
2022-08-08 19:27     ` Dionna Amalie Glaze
2022-08-08 21:32       ` Tom Lendacky
2022-08-08 23:25         ` Dionna Amalie Glaze
2022-06-20 23:06 ` [PATCH Part2 v6 18/49] crypto: ccp: Provide APIs to query extended attestation report Ashish Kalra
2022-06-21 22:30   ` Peter Gonda
2022-08-02 12:39   ` Jarkko Sakkinen
2022-06-20 23:06 ` [PATCH Part2 v6 19/49] KVM: SVM: Add support to handle AP reset MSR protocol Ashish Kalra
2022-06-20 23:06 ` [PATCH Part2 v6 20/49] KVM: SVM: Provide the Hypervisor Feature support VMGEXIT Ashish Kalra
2022-06-20 23:06 ` [PATCH Part2 v6 21/49] KVM: SVM: Make AVIC backing, VMSA and VMCB memory allocation SNP safe Ashish Kalra
2022-08-04 11:32   ` Vlastimil Babka
2022-06-20 23:07 ` [PATCH Part2 v6 22/49] KVM: SVM: Add initial SEV-SNP support Ashish Kalra
2022-06-20 23:07 ` [PATCH Part2 v6 23/49] KVM: SVM: Add KVM_SNP_INIT command Ashish Kalra
2022-06-20 23:07 ` [PATCH Part2 v6 24/49] KVM: SVM: Add KVM_SEV_SNP_LAUNCH_START command Ashish Kalra
2022-06-24 14:42   ` Peter Gonda
2022-06-24 18:17     ` Kalra, Ashish
2022-08-02 13:19   ` Jarkko Sakkinen
2022-06-20 23:07 ` [PATCH Part2 v6 25/49] KVM: SVM: Disallow registering memory range from HugeTLB for SNP guest Ashish Kalra
2022-08-04 13:37   ` Vlastimil Babka
2022-06-20 23:08 ` [PATCH Part2 v6 26/49] KVM: SVM: Add KVM_SEV_SNP_LAUNCH_UPDATE command Ashish Kalra
2022-06-24 14:33   ` Peter Gonda
2022-06-29 18:14     ` Kalra, Ashish
2022-08-02 12:50   ` Jarkko Sakkinen
2022-08-09 13:55   ` Sabin Rapan
2022-08-15 23:04     ` Kalra, Ashish
2022-06-20 23:08 ` [PATCH Part2 v6 27/49] KVM: SVM: Mark the private vma unmerable for SEV-SNP guests Ashish Kalra
2022-06-22 10:29   ` Dr. David Alan Gilbert
2022-08-04 10:56   ` Vlastimil Babka
2022-06-20 23:08 ` [PATCH Part2 v6 28/49] KVM: SVM: Add KVM_SEV_SNP_LAUNCH_FINISH command Ashish Kalra
2022-07-11 14:05   ` Peter Gonda
2022-07-11 22:41     ` Kalra, Ashish
2022-07-12 14:45       ` Peter Gonda
2022-07-12 15:22         ` Kalra, Ashish
2022-07-12 16:04           ` Peter Gonda
2022-07-12 17:40         ` Tom Lendacky
2022-07-13 14:59           ` Peter Gonda
2022-08-02 13:28   ` Jarkko Sakkinen
2022-09-08 14:55   ` [[PATCH for v6]] KVM: SEV: fix snp_launch_finish Harald Hoyer
2022-09-08 15:11     ` Sean Christopherson
2022-09-08 20:34       ` Jarkko Sakkinen
2022-09-09  8:04   ` [PATCH Part2 v6 28/49] KVM: SVM: Add KVM_SEV_SNP_LAUNCH_FINISH command Harald Hoyer
2022-06-20 23:08 ` [PATCH Part2 v6 29/49] KVM: X86: Keep the NPT and RMP page level in sync Ashish Kalra
2022-07-12 16:44   ` Jarkko Sakkinen
2022-06-20 23:09 ` [PATCH Part2 v6 30/49] KVM: x86/mmu: Introduce kvm_mmu_map_tdp_page() for use by TDX and SNP Ashish Kalra
2022-06-20 23:09 ` [PATCH Part2 v6 31/49] KVM: x86: Introduce kvm_mmu_get_tdp_walk() for SEV-SNP use Ashish Kalra
2022-09-07 17:45   ` Alper Gun
2022-06-20 23:09 ` [PATCH Part2 v6 32/49] KVM: x86: Define RMP page fault error bits for #NPF Ashish Kalra
2022-06-20 23:10 ` [PATCH Part2 v6 33/49] KVM: x86: Update page-fault trace to log full 64-bit error code Ashish Kalra
2022-07-25 11:19   ` Vlastimil Babka
2022-06-20 23:10 ` [PATCH Part2 v6 34/49] KVM: SVM: Do not use long-lived GHCB map while setting scratch area Ashish Kalra
2022-06-20 23:10 ` [PATCH Part2 v6 35/49] KVM: SVM: Remove the long-lived GHCB host map Ashish Kalra
2022-06-24 15:12   ` Peter Gonda
2022-06-24 20:14     ` Kalra, Ashish
2022-07-07 20:06       ` Peter Gonda
2022-07-07 20:31         ` Kalra, Ashish
2022-07-08 15:54           ` Peter Gonda
2022-07-08 15:59             ` Kalra, Ashish
2022-06-20 23:11 ` [PATCH Part2 v6 36/49] KVM: SVM: Add support to handle GHCB GPA register VMGEXIT Ashish Kalra
2022-06-28 13:28   ` Dr. David Alan Gilbert
2022-06-20 23:11 ` [PATCH Part2 v6 37/49] KVM: SVM: Add support to handle MSR based Page State Change VMGEXIT Ashish Kalra
2022-08-19 16:54   ` Peter Gonda
2022-09-19 17:53     ` Alper Gun
2022-09-19 21:38       ` Tom Lendacky
2022-09-19 22:02         ` Alper Gun
2022-09-19 22:18           ` Tom Lendacky
2022-09-19 23:46             ` Ashish Kalra
2022-09-26 15:19               ` Peter Gonda
2022-10-12 20:15                 ` Kalra, Ashish
2022-10-12 22:57                   ` Michael Roth
2022-06-20 23:11 ` [PATCH Part2 v6 38/49] KVM: SVM: Add support to handle " Ashish Kalra
2022-06-20 23:12 ` [PATCH Part2 v6 39/49] KVM: SVM: Introduce ops for the post gfn map and unmap Ashish Kalra
2022-08-18  3:47   ` Alper Gun
2022-11-17 20:18     ` Peter Gonda
2022-11-17 20:28       ` Kalra, Ashish
2022-11-17 21:36       ` Kalra, Ashish
2022-06-20 23:12 ` [PATCH Part2 v6 40/49] KVM: x86: Export the kvm_zap_gfn_range() for the SNP use Ashish Kalra
2022-06-20 23:13 ` [PATCH Part2 v6 41/49] KVM: SVM: Add support to handle the RMP nested page fault Ashish Kalra
2022-07-12 12:33   ` Jarkko Sakkinen
2022-07-12 12:45     ` Jarkko Sakkinen
2022-07-12 12:48       ` Jarkko Sakkinen
2022-07-12 15:32         ` Kalra, Ashish
2022-10-10 22:03   ` Alper Gun
2022-10-11  2:32     ` Kalra, Ashish
2022-10-12 22:53       ` Alper Gun
2022-10-13 15:00         ` Kalra, Ashish
2022-06-20 23:13 ` [PATCH Part2 v6 42/49] KVM: SVM: Provide support for SNP_GUEST_REQUEST NAE event Ashish Kalra
2022-06-24 16:25   ` Peter Gonda
2022-06-27 19:03     ` Kalra, Ashish
2022-06-29 19:15       ` Kalra, Ashish
2022-07-08 15:28         ` Peter Gonda
2022-10-21 19:06   ` Tom Lendacky
2022-10-21 21:12     ` Kalra, Ashish
2022-10-21 21:30       ` Tom Lendacky
2022-10-21 21:56         ` Kalra, Ashish
2022-06-20 23:13 ` [PATCH Part2 v6 43/49] KVM: SVM: Use a VMSA physical address variable for populating VMCB Ashish Kalra
2022-06-20 23:14 ` Ashish Kalra [this message]
2022-06-20 23:14 ` [PATCH Part2 v6 45/49] KVM: SVM: Add module parameter to enable the SEV-SNP Ashish Kalra
2022-06-20 23:14 ` [PATCH Part2 v6 46/49] ccp: add support to decrypt the page Ashish Kalra
2022-06-20 23:14 ` [PATCH Part2 v6 47/49] *fix for stale per-cpu pointer due to cond_resched during ghcb mapping Ashish Kalra
2022-06-24 16:35   ` Peter Gonda
2022-06-24 16:44     ` Kalra, Ashish
2022-06-20 23:15 ` [PATCH Part2 v6 48/49] *debug: warn and retry failed rmpupdates Ashish Kalra
2022-06-20 23:15 ` [PATCH Part2 v6 49/49] KVM: SVM: Sync the GHCB scratch buffer using already mapped ghcb Ashish Kalra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca0055ea49a36fcbc618f318083da5e062cccdb5.1655761627.git.ashish.kalra@amd.com \
    --to=ashish.kalra@amd.com \
    --cc=ak@linux.intel.com \
    --cc=alpergun@google.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=dgilbert@redhat.com \
    --cc=dovmurik@linux.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jarkko@kernel.org \
    --cc=jmattson@google.com \
    --cc=jroedel@suse.de \
    --cc=kirill@shutemov.name \
    --cc=kvm@vger.kernel.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=marcorr@google.com \
    --cc=michael.roth@amd.com \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pgonda@google.com \
    --cc=rientjes@google.com \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=seanjc@google.com \
    --cc=slp@redhat.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=tobin@ibm.com \
    --cc=tony.luck@intel.com \
    --cc=vbabka@suse.cz \
    --cc=vkuznets@redhat.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.