From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aarm1-0007zp-FO for qemu-devel@nongnu.org; Tue, 01 Mar 2016 16:24:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aarlw-0004mN-CY for qemu-devel@nongnu.org; Tue, 01 Mar 2016 16:24:05 -0500 Received: from thoth.sbs.de ([192.35.17.2]:42416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aarlw-0004lM-4C for qemu-devel@nongnu.org; Tue, 01 Mar 2016 16:24:00 -0500 References: <1456078260-6669-1-git-send-email-davidkiarie4@gmail.com> <20160301134419-mutt-send-email-mst@redhat.com> <56D59DA3.3040002@siemens.com> <56D5A069.9030004@siemens.com> <20160301220139-mutt-send-email-mst@redhat.com> <56D5F8F6.2000001@siemens.com> <20160301223551-mutt-send-email-mst@redhat.com> From: Jan Kiszka Message-ID: <56D6086B.3010004@siemens.com> Date: Tue, 1 Mar 2016 22:23:55 +0100 MIME-Version: 1.0 In-Reply-To: <20160301223551-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [V6 0/4] AMD IOMMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: valentine.sinitsyn@gmail.com, marcel@redhat.com, David Kiarie , qemu-devel@nongnu.org On 2016-03-01 21:39, Michael S. Tsirkin wrote: > On Tue, Mar 01, 2016 at 09:17:58PM +0100, Jan Kiszka wrote: >> On 2016-03-01 21:11, Michael S. Tsirkin wrote: >>> >>> What this seems to call for is a new kind of protection >>> where yes PTE is write protected, but instead of >>> making PTE writeable (or killing guest) >>> KVM handles it as an MMIO: emulates the write and then skips the instruction. >>> >>> Emulation can be in kernel, just writing into guest memory >>> on behalf of the guest - with some kind of notifier >>> to flush the vfio cache - or instead it can exit to userspace >>> and have QEMU handle it like MMIO and write into guest memory. >> >> Exactly, but that's nothing new, is it? It's "just" slow, like other >> shadow MMUs. >> >> Jan > > Well AFAIK KVM does not have such an option ATM: MMIO causes exits for > reads and writes. We want MMIO exits for writes but not reads. > I agree it should be easy to implement. We have read-only memory slot support for quite a while. It's used to support execute (and read) from emulated ROM devices. Jan -- Siemens AG, Corporate Technology, CT RDA ITP SES-DE Corporate Competence Center Embedded Linux