Thread (36 messages) flat view 36 messages, 6 authors, 2011-11-11

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

From: Alexander Graf <hidden>
Date: 2011-08-12 08:09:18
Also in: kvm

Am 12.08.2011 um 09:43 schrieb David Gibson [off-list ref]:
On Fri, Aug 12, 2011 at 07:38:54AM +0200, Alexander Graf wrote:
quoted
=20
Am 12.08.2011 um 05:35 schrieb David Gibson [off-list ref]=
:
quoted
=20
quoted
On Tue, Aug 09, 2011 at 06:31:45PM +0200, Alexander Graf wrote:
quoted
When running a PAPR guest, we need to handle a few hypercalls in kernel=
 space,
quoted
quoted
quoted
most prominently the page table invalidation (to sync the shadows).
=20
So this patch adds handling for a few PAPR hypercalls to PR mode KVM. I=
 tried
quoted
quoted
quoted
to share the code with HV mode, but it ended up being a lot easier this=
 way
quoted
quoted
quoted
around, as the two differ too much in those details.
=20
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.
=20
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.
=20
True.  I think you could actually delay this invalidation until the
guest issues the tlbie, but it's probably not worth it.
Well, since we need to have HTAB modification code in kvm for PR either way,=
 I'd rather have all of it at the same place :)

Alex=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help