Re: [RFC] need to improve slot creation/destruction? -- Re: [RFC][PATCH] srcu: Implement call_srcu()

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

 



Avi Kivity <avi@xxxxxxxxxx> wrote:

> > 2. When we create(and shift?) a memory slot, we call kvm_arch_flush_shadow()
> > to clear all mmio sptes, again not restricted to that slot.
> >
> > 	/*
> > 	 * If the new memory slot is created, we need to clear all
> > 	 * mmio sptes.
> > 	 */
> > 	if (npages && old.base_gfn != mem->guest_phys_addr >> PAGE_SHIFT)
> > 		kvm_arch_flush_shadow(kvm);
> 
> This is pretty rare outside the previous scenario (memory/pci hotplug).

Is this condition correct?

When npages != 0 and old.npages == 0, the slot is being newly created, do we
really need to flush shadow pages?

This should be
	if (npages && old.npages && (old.base_gfn != base_gfn))
No?

	Takuya
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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