On Fri, 2022-02-18 at 19:57 +0000, Sean Christopherson wrote: > On Thu, Feb 10, 2022, David Woodhouse wrote: > > From: David Woodhouse > > RFC, or lazy? :-D > The important parts are in place. It needs me to finish the self tests but you don't need that to start heckling it, and I realised after I'd posted it that I also hadn't finished the save/restore of pending oneshot timers, which is now implemented in the version at https://git.infradead.org/users/dwmw2/linux.git/shortlog/refs/heads/xen-evtchn-kernel > > Signed-off-by: David Woodhouse > > --- > > - r = kvm_gfn_to_hva_cache_init(vcpu->kvm, > > + r = kvm_gfn_to_pfn_cache_init(vcpu->kvm, > > &vcpu->arch.xen.runstate_cache, > > - data->u.gpa, > > - sizeof(struct vcpu_runstate_info)); > > - if (!r) { > > - vcpu->arch.xen.runstate_set = true; > > - } > > + NULL, false, true, data->u.gpa, > > + sizeof(struct vcpu_runstate_info), > > + false); > > Now that I'm all too aware of the subtle importants of @guest_uses_pa and > @kernel_map, before the pfn cache code gains more users, can you slot this in at > the beginning of the series? It'd be quite easy to mess up and pass "false, false" > and completely mishandle cases where the PFN is mapped into the guest. Looks good to me; I'll roll it in. Thanks.