Re: [PATCH 07/10] KVM: PPC: Add PAPR hypercall code for PR mode

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

 



On Fri, Aug 12, 2011 at 07:38:54AM +0200, Alexander Graf wrote:
> 
> Am 12.08.2011 um 05:35 schrieb David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>:
> 
> > On Tue, Aug 09, 2011 at 06:31:45PM +0200, Alexander Graf wrote:
> >> When running a PAPR guest, we need to handle a few hypercalls in kernel space,
> >> most prominently the page table invalidation (to sync the shadows).
> >> 
> >> So this patch adds handling for a few PAPR hypercalls to PR mode KVM. I tried
> >> to share the code with HV mode, but it ended up being a lot easier this way
> >> around, as the two differ too much in those details.
> > 
> > Are these strictly necessary, or just an optimization?  Because you're
> > using the space allocated by qemu for the guest hash table, it seems
> > to be you could just let h_enter fall through to qemu which will put
> > the right thing into the guest hash table which you can then walk in
> > the kernel translation code.
> 
> Every time a PTE can be invalidated, we need to do so in kvm to keep
> the SPT in sync. IIRC h_enter can evict/overwrite a previous entry,
> so we need to handle it in kvm as well :). Removal definitely needs
> to happin in-kernel.

True.  I think you could actually delay this invalidation until the
guest issues the tlbie, but it's probably not worth it.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
--
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