[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f59991ed-e24d-4bf4-8739-b314327ca1d3@amd.com>
Date: Thu, 27 Feb 2025 16:18:26 +0100
From: "Gupta, Pankaj" <pankaj.gupta@....com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Naveen N Rao <naveen@...nel.org>,
Kim Phillips <kim.phillips@....com>, Tom Lendacky <thomas.lendacky@....com>,
Alexey Kardashevskiy <aik@....com>
Subject: Re: [PATCH v2 05/10] KVM: SVM: Require AP's "requested" SEV_FEATURES
to match KVM's view
>>> diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
>>> index 9aad0dae3a80..bad5834ec143 100644
>>> --- a/arch/x86/kvm/svm/sev.c
>>> +++ b/arch/x86/kvm/svm/sev.c
>>> @@ -3932,6 +3932,7 @@ void sev_snp_init_protected_guest_state(struct kvm_vcpu *vcpu)
>>> static int sev_snp_ap_creation(struct vcpu_svm *svm)
>>> {
>>> + struct kvm_sev_info *sev = to_kvm_sev_info(svm->vcpu.kvm);
>>> struct kvm_vcpu *vcpu = &svm->vcpu;
>>> struct kvm_vcpu *target_vcpu;
>>> struct vcpu_svm *target_svm;
>>> @@ -3963,26 +3964,18 @@ static int sev_snp_ap_creation(struct vcpu_svm *svm)
>>> mutex_lock(&target_svm->sev_es.snp_vmsa_mutex);
>>> - /* 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 ^= to_kvm_sev_info(svm->vcpu.kvm)->vmsa_features;
>>> -
>>> - if (sev_features & SVM_SEV_FEAT_INT_INJ_MODES) {
>>
>> 'SVM_SEV_FEAT_INT_INJ_MODES' would even be required in any future use-case,
>> maybe?
>
> Can you elaborate? I don't quite follow what you're suggesting.
SVM_SEV_FEAT_INT_INJ_MODES macro is not used anymore? If there is no
plan to use it, maybe we can remove that as well?
Or I am missing something.
Thanks,
Pankaj
Powered by blists - more mailing lists