From: Nicholas Piggin Date: Fri, 03 Apr 2020 02:15:38 +0000 Subject: Re: [RFC/PATCH 1/3] powerpc/kvm: Handle H_FAC_UNAVAIL when guest executes stop. Message-Id: <1585880035.5ddwqv4syr.astroid@bobo.none> List-Id: References: <1585656658-1838-1-git-send-email-ego@linux.vnet.ibm.com> <1585656658-1838-2-git-send-email-ego@linux.vnet.ibm.com> In-Reply-To: <1585656658-1838-2-git-send-email-ego@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Bharata B Rao , David Gibson , "Gautham R. Shenoy" , Michael Neuling , Michael Ellerman , Paul Mackerras , Vaidyanathan Srinivasan Cc: linuxppc-dev@ozlabs.org, linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org Gautham R. Shenoy's on March 31, 2020 10:10 pm: > From: "Gautham R. Shenoy" > > If a guest executes a stop instruction when the hypervisor has set the > PSSCR[ESL|EC] bits, the processor will throw an Hypervisor Facility > Unavailable exception. Currently when we receive this exception, we > only check if the exeception is generated due to a doorbell > instruction, in which case we emulate it. For all other cases, > including the case when the guest executes a stop-instruction, the > hypervisor sends a PROGILL to the guest program, which results in a > guest crash. > > This patch adds code to handle the case when the hypervisor receives a > H_FAC_UNAVAIL exception due to guest executing the stop > instruction. The hypervisor increments the pc to the next instruction > and resumes the guest as expected by the semantics of the > PSSCR[ESL|EC] = 0 stop instruction. This seems reasonable, I don't think we need to crash the guest here. Thanks, Nick