From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: Using EPT to map guest MMIO to host MMIO Date: Fri, 05 Aug 2011 11:08:36 +0200 Message-ID: <4E3BB314.7030807@siemens.com> References: <4E3B9EA4.3070803@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: Cyclonus J Return-path: Received: from goliath.siemens.de ([192.35.17.28]:33436 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755707Ab1HEJIi (ORCPT ); Fri, 5 Aug 2011 05:08:38 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 2011-08-05 10:40, Cyclonus J wrote: > On Fri, Aug 5, 2011 at 12:41 AM, Jan Kiszka wrote: >> On 2011-08-05 09:20, Cyclonus J wrote: >>> hi, >>> >>> I am wondering if it is possible to map guest MMIO to host MMIO, the >>> purpose is to reduce VM_EXIT as the page tables will be setup before >>> MMIO accessing from guest. Here is what I have in mind: >> >> This is already the case if you pass through devices AND aligment&size >> of the MMIO resource allows this. > > I assume here pass through means using VT-d? ...or AMD IOMMU. Yes. > Unfortunately, I can't > use it for my case and I need to para-virtualize guest OS as well. Even with PV, you can't avoid VM exits if the IO access has side effects, ie. is supposed to trigger some device activity. Or if it is backed by some logic. You can only avoid exits if MMIO behaves like RAM. But then it's better to use RAM directly, like virtio but also real devices do for request data. Again my question what device you want to optimize precisely. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux