From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyRbO-0004hR-Dm for qemu-devel@nongnu.org; Mon, 16 Nov 2015 16:46:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyRbN-0003Qc-8U for qemu-devel@nongnu.org; Mon, 16 Nov 2015 16:46:18 -0500 Date: Tue, 17 Nov 2015 08:46:11 +1100 From: Paul Mackerras Message-ID: <20151116214611.GA24123@fergus.ozlabs.ibm.com> References: <20151111171135.4328.41819.stgit@aravindap> <20151111171602.4328.34006.stgit@aravindap> <56444957.9080003@redhat.com> <20151116035046.GA19340@iris.ozlabs.ibm.com> <56499B65.6050601@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56499B65.6050601@redhat.com> Subject: Re: [Qemu-devel] [PATCH 4/4] target-ppc: Handle NMI guest exit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: benh@au1.ibm.com, aik@ozlabs.ru, agraf@suse.de, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Aravinda Prasad , sam.bobroff@au1.ibm.com, david@gibson.dropbear.id.au On Mon, Nov 16, 2015 at 10:01:25AM +0100, Thomas Huth wrote: > On 16/11/15 04:50, Paul Mackerras wrote: > > On Thu, Nov 12, 2015 at 09:09:59AM +0100, Thomas Huth wrote: > >> > >> Shouldn't you also check MSR_ME here first and enter checkstop when > >> machine checks are disabled? > > > > MSR_ME is a hypervisor resource and is not able to be controlled by HV > > KVM guests, or in fact by the OS running on the pseries machine target > > regardless of how it's accelerated or emulated. > > > > What you say would only apply if we had a powernv machine target and > > we were emulating the whole system, and in that case we wouldn't be > > using any hcalls, and we wouldn't be doing FWNMI (or at least not at > > this level). > > > > So the answer is no, MSR_ME will always be set when running in a > > guest, and we don't ever need to checkstop the virtual machine. > > Good point, I missed that sentence about the hypervisor resource in the > PowerISA. So QEMU does not have to check this bit here. > > But out of curiosity: What happens if a guest disables the ME bit? Is > this checked somewhere or simply ignored? The guest can't turn off the ME bit. Any attempt to do so is ignored. See the descriptions of rfid and mtmsrd in the architecture spec. Paul.