Re: [PATCH v0 02/15] KVM: x86/xen: Use gfn_to_pfn_cache for runstate area

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

 



On Fri, 2022-02-18 at 19:57 +0000, Sean Christopherson wrote:
> On Thu, Feb 10, 2022, David Woodhouse wrote:
> > From: David Woodhouse <dwmw@xxxxxxxxxxxx>
> 
> 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 <dwmw@xxxxxxxxxxxx>
> > ---
> > -		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.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[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