Re: [PATCH v2 2/2] KVM:SVM: Update cr3_lm_rsvd_bits for AMD SEV guests

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

 



On 12/11/20 23:18, Babu Moger wrote:
+	/*
+	 * For sev guests, update the cr3_lm_rsvd_bits to mask the memory
+	 * encryption bit from reserved bits
+	 */

Say why in the comment, don't repeat what the code already says (ok, technically the code didn't say that CPUID[0x8000001F].ebx hosts the memory encryption bit). I changed this to:

/* For sev guests, the memory encryption bit is not reserved in CR3.  */

and queued the patches,

Paolo

+	if (sev_guest(vcpu->kvm)) {
+		best = kvm_find_cpuid_entry(vcpu, 0x8000001F, 0);
+		if (best)
+			vcpu->arch.cr3_lm_rsvd_bits &= ~(1UL << (best->ebx & 0x3f));
+	}
+




[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