From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Donnelly Subject: R/W HG memory mappings with kvm? Date: Mon, 6 Jul 2009 10:41:22 +1200 Message-ID: <5f370d430907051541o752d3dbag80d5cb251e5e4d00@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from mail-yx0-f188.google.com ([209.85.210.188]:36375 "EHLO mail-yx0-f188.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754611AbZGEWlU (ORCPT ); Sun, 5 Jul 2009 18:41:20 -0400 Received: by yxe26 with SMTP id 26so5028766yxe.33 for ; Sun, 05 Jul 2009 15:41:23 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: I am looking at how to do memory mapped IO between host and guests under kvm. I expect to use the PCI emulation layer to present a PCI device to the guest. I see virtio_pci uses cpu_physical_memory_map() which provides either read or write mappings and notes "Use only for reads OR writes - not for read-modify-write operations." Is there an alternative method that allows large (Several MB) persistent hg memory mappings that are r/w? I would only be using this under kvm, not kqemu or plain qemu. Also it appears that PCI IO memory (cpu_register_io_memory) is provided via access functions, like the pci config space? Does this cause a page fault/vm_exit on each read or write, or is it more efficient than that? Thanks, Stephen.