Re: [PATCH v7 8/9] mmu: spp: Handle SPP protected pages when VM memory changes

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

 



On Thu, Nov 21, 2019 at 11:32:15AM +0100, Paolo Bonzini wrote:
> On 19/11/19 09:49, Yang Weijiang wrote:
> > +			/*
> > +			 * if it's EPT leaf entry and the physical page is
> > +			 * SPP protected, then re-enable SPP protection for
> > +			 * the page.
> > +			 */
> > +			if (kvm->arch.spp_active &&
> > +			    level == PT_PAGE_TABLE_LEVEL) {
> > +				struct kvm_subpage spp_info = {0};
> > +				int i;
> > +
> > +				spp_info.base_gfn = gfn;
> > +				spp_info.npages = 1;
> > +				i = kvm_spp_get_permission(kvm, &spp_info);
> > +				if (i == 1 &&
> > +				    spp_info.access_map[0] != FULL_SPP_ACCESS)
> > +					new_spte |= PT_SPP_MASK;
> > +			}
> 
> This can use gfn_to_subpage_wp_info directly (or is_spp_protected if you
> prefer).
>
Sure, will change it, thank you!
> Paolo



[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