From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabiano Rosas Date: Fri, 07 Jan 2022 13:07:47 +0000 Subject: Re: [PATCH v2 6/7] KVM: PPC: mmio: Return to guest after emulation failure Message-Id: <87a6g73d98.fsf@linux.ibm.com> List-Id: References: <20220106200304.4070825-1-farosas@linux.ibm.com> <20220106200304.4070825-7-farosas@linux.ibm.com> <63f9a19c-0b5c-8746-7ef4-ab72cbda397c@ozlabs.ru> In-Reply-To: <63f9a19c-0b5c-8746-7ef4-ab72cbda397c@ozlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexey Kardashevskiy , kvm-ppc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com Alexey Kardashevskiy writes: > On 07/01/2022 07:03, Fabiano Rosas wrote: >> If MMIO emulation fails we don't want to crash the whole guest by >> returning to userspace. >> >> The original commit bbf45ba57eae ("KVM: ppc: PowerPC 440 KVM >> implementation") added a todo: >> >> /* XXX Deliver Program interrupt to guest. */ >> >> and later the commit d69614a295ae ("KVM: PPC: Separate loadstore >> emulation from priv emulation") added the Program interrupt injection >> but in another file, so I'm assuming it was missed that this block >> needed to be altered. >> >> Signed-off-by: Fabiano Rosas > > > Looks right. > Reviewed-by: Alexey Kardashevskiy > > but this means if I want to keep debugging those kvm selftests in > comfort, I'll have to have some exception handlers in the vm as > otherwise the failing $pc is lost after this change :) Yes! But that will be a problem for any test. These kinds of issues is why I wanted a trial period before sending the test infrastructure upstream. Maybe we don't need exception handlers, but just a way to force the test to crash if it tries to fetch from 0x700.