Re: [PATCH v2 05/10] KVM: SVM: Require AP's "requested" SEV_FEATURES to match KVM's view

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 27, 2025, Pankaj Gupta wrote:
> On 2/27/2025 2:25 AM, Sean Christopherson wrote:
> > 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.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux