* Re: [PATCH v2 0/3] KVM: Fix and clean up kvm_vcpu_map[_readonly]() usages
[not found] ` <20260427080554.GD1733452@pedri>
@ 2026-05-04 17:59 ` Sean Christopherson
2026-05-07 8:18 ` Peter Fang
0 siblings, 1 reply; 2+ messages in thread
From: Sean Christopherson @ 2026-05-04 17:59 UTC (permalink / raw)
To: Peter Fang
Cc: David Woodhouse, Paolo Bonzini, Madhavan Srinivasan,
Nicholas Piggin, Fred Griffoul, Yosry Ahmed, Ritesh Harjani,
Michael Ellerman, Christophe Leroy (CS GROUP), Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
kvm, linuxppc-dev, linux-kernel
On Mon, Apr 27, 2026, Peter Fang wrote:
> On Fri, Apr 24, 2026 at 11:27:03AM +0100, David Woodhouse wrote:
> >
> > Fred is already removing all the usage of kvm_vcpu_map() in nested VMX¹
> > and nested SVM probably wants the same treatment. And the PowerPC one
> > looks like it could just as easily operate on the userspace address?
> >
> > Could we just kill kvm_vcpu_map() completely?
Yeah, that's probably for the best in the long run.
> Thanks David!
>
> I think I'd need at least input from the maintainers on this but just by
> code inspection, the kvm_vcpu_map() usage in sev.c seems a bit tricky.
> Unmapping doesn't happen until right before switching to the guest, so
> this might fall into the "keep the mapping around for a longer time"
> category [1].
It definitely falls into that category. But that code is also rather gross, i.e.
could use some cleanup no matter what, so I don't think it's a good argument for
keeping kvm_vcpu_map() around.
To avoid a bunch of pointless work and churn, let's hold off on hardening and/or
renaming kvm_vcpu_map() for now. I'll take this v2 as-is; even though taking a
gpa instead of a gfn will conflict with the nVMX series, it's dead simple and a
worthwhile cleanup even if some of the conversions get discarded shortly after.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2 0/3] KVM: Fix and clean up kvm_vcpu_map[_readonly]() usages
2026-05-04 17:59 ` [PATCH v2 0/3] KVM: Fix and clean up kvm_vcpu_map[_readonly]() usages Sean Christopherson
@ 2026-05-07 8:18 ` Peter Fang
0 siblings, 0 replies; 2+ messages in thread
From: Peter Fang @ 2026-05-07 8:18 UTC (permalink / raw)
To: Sean Christopherson
Cc: David Woodhouse, Paolo Bonzini, Madhavan Srinivasan,
Nicholas Piggin, Fred Griffoul, Yosry Ahmed, Ritesh Harjani,
Michael Ellerman, Christophe Leroy (CS GROUP), Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
kvm, linuxppc-dev, linux-kernel
On Mon, May 04, 2026 at 10:59:06AM -0700, Sean Christopherson wrote:
> On Mon, Apr 27, 2026, Peter Fang wrote:
>
> > Thanks David!
> >
> > I think I'd need at least input from the maintainers on this but just by
> > code inspection, the kvm_vcpu_map() usage in sev.c seems a bit tricky.
> > Unmapping doesn't happen until right before switching to the guest, so
> > this might fall into the "keep the mapping around for a longer time"
> > category [1].
>
> It definitely falls into that category. But that code is also rather gross, i.e.
> could use some cleanup no matter what, so I don't think it's a good argument for
> keeping kvm_vcpu_map() around.
>
> To avoid a bunch of pointless work and churn, let's hold off on hardening and/or
> renaming kvm_vcpu_map() for now. I'll take this v2 as-is; even though taking a
> gpa instead of a gfn will conflict with the nVMX series, it's dead simple and a
> worthwhile cleanup even if some of the conversions get discarded shortly after.
Makes sense to me. Thanks for the review Sean!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-07 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260408001137.3290444-1-peter.fang@intel.com>
[not found] ` <c2fad21764d2561469151f5dd5d35833ae8f76e6.camel@infradead.org>
[not found] ` <20260427080554.GD1733452@pedri>
2026-05-04 17:59 ` [PATCH v2 0/3] KVM: Fix and clean up kvm_vcpu_map[_readonly]() usages Sean Christopherson
2026-05-07 8:18 ` Peter Fang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox