From: Nicholas Piggin Date: Thu, 01 Apr 2021 10:03:10 +0000 Subject: Re: [PATCH v4 15/46] KVM: PPC: Book3S 64: Move hcall early register setup to KVM Message-Id: <1617271255.sz2p0e41kb.astroid@bobo.none> List-Id: References: <20210323010305.1045293-1-npiggin@gmail.com> <20210323010305.1045293-16-npiggin@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org Excerpts from Paul Mackerras's message of April 1, 2021 3:41 pm: > On Tue, Mar 23, 2021 at 11:02:34AM +1000, Nicholas Piggin wrote: >> System calls / hcalls have a different calling convention than >> other interrupts, so there is code in the KVMTEST to massage these >> into the same form as other interrupt handlers. >> >> Move this work into the KVM hcall handler. This means teaching KVM >> a little more about the low level interrupt handler setup, PACA save >> areas, etc., although that's not obviously worse than the current >> approach of coming up with an entirely different interrupt register >> / save convention. > > [snip] > >> @@ -1964,29 +1948,8 @@ EXC_VIRT_END(system_call, 0x4c00, 0x100) >> >> #ifdef CONFIG_KVM_BOOK3S_64_HANDLER >> TRAMP_REAL_BEGIN(system_call_kvm) >> - /* >> - * This is a hcall, so register convention is as above, with these >> - * differences: > > I haven't checked all the code changes in detail yet, but this comment > at least is slightly misleading, since under PR KVM, system calls (to > the guest kernel) and hypercalls both come through this path. Yeah good point, I'll update the comment at its destination. Thanks, Nick