On Thu, Aug 17, 2017 at 03:01:31PM -0700, Ram Pai wrote: > On Thu, Aug 17, 2017 at 05:54:45PM -0300, Thiago Jung Bauermann wrote: [snip] > > > > I'm currently preparing a patch for that. One question: did I understand > > correctly that Paul Mackerras' answer on this thread¹ means that KVM > > doesn't need to reserve any keys for itself and can pass on 32 keys to > > the guest? > > No. KVM does use key 31 for emulated MMIO. > > if (!(memslot && !(memslot->flags & KVM_MEMSLOT_INVALID))) { > /* Emulated MMIO - mark this with key=31 */ > pteh |= HPTE_V_ABSENT; > ptel |= HPTE_R_KEY_HI | > HPTE_R_KEY_LO; > goto do_insert; > } Actually, the guest *can* use all 32 keys. We only use key 31 on absent HPTEs (see the HPTE_V_ABSENT flag above - these are HPTEs that the guest thinks are valid but are not actually mapped in the real HPT). Paul. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html