From: Cam Macdonell Subject: Re: KVM ivshmem enquiry Date: Mon, 1 Mar 2010 11:17:09 -0700 Message-ID: <8286e4ee1003011017y7727e3fcp52a1a47e483285e1@mail.gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: Khaled Ibrahim Return-path: Received: from mail-iw0-f182.google.com ([209.85.223.182]:63813 "EHLO mail-iw0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751339Ab0CASRK convert rfc822-to-8bit (ORCPT ); Mon, 1 Mar 2010 13:17:10 -0500 Received: by iwn12 with SMTP id 12so2621958iwn.21 for ; Mon, 01 Mar 2010 10:17:09 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Hi Khaled, On Sun, Feb 28, 2010 at 1:20 PM, Khaled Ibrahim wro= te: > > Cam,I am interested in the shared memory support you developed on > =A0KVM, but the whole process is not very clear to me. I patched the = kernel on the > =A0guest OSs and used the samples codes found in http://www.mail-arch= ive.com/kvm@vger.kernel.org/msg13328.html,=A0but the applications fails= in mmap. > > =A0I have not done anything at booting the guest OS, and I am=A0using= vanilla qemu-kvm. I guest I am missing something for initialization. > > =A0Do I need to patch qemu/kvm also? Where can I find the most=A0rece= nt ivshmem patches for the guest kernel and kvm if applicable. What is=A0= the proper way to start the guest OS to enable shared memory? You need two patches, one for qemu and one of the linux kernel. The linux kernel patch is just a driver, so you could compile it separately (you don't need to re-compile the whole kernel). I will send two patches soon, one is for qemu-kvm and the other is the driver. Once you have patches and compiled qemu-kvm, you need to add a command-line argument -ivshmem , where is the size in MB of the POSIX shared object you want to create and is the name to use for it (not a full path). After you start kvm with this command-line argument, a file will be created at /dev/shm/ of the size you specify. > =A0If you have developed a documentation or a complete working exampl= e,=A0please refer me to it. > Documentation is scarce at this point as the implementation is still under development, but feel free to ask any questions you have via email. I do have a set of sample code and OS init scripts (to create the device file in the guest) here: http://www.gitorious.org/nahanni/ Cheers, Cam > > =A0I appreciate your help. > > > =A0Thank you, > > =A0-Khaled > > > _________________________________________________________________ > Hotmail: Trusted email with powerful SPAM protection. > http://clk.atdmt.com/GBL/go/201469227/direct/01/ > >