From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH v2] Shared memory device with interrupt support Date: Tue, 19 May 2009 13:31:08 -0500 Message-ID: <4A12FAEC.9070601@codemonkey.ws> References: <1241712992-17004-1-git-send-email-cam@cs.ualberta.ca> <4A11AECB.70908@codemonkey.ws> <4A123639.9000901@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Cam Macdonell , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from rv-out-0506.google.com ([209.85.198.234]:10121 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752614AbZESSbM (ORCPT ); Tue, 19 May 2009 14:31:12 -0400 Received: by rv-out-0506.google.com with SMTP id f9so1899326rvb.1 for ; Tue, 19 May 2009 11:31:11 -0700 (PDT) In-Reply-To: <4A123639.9000901@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > Anthony Liguori wrote: >> I'd strongly recommend working these patches on qemu-devel and lkml. >> I suspect Avi may disagree with me, but in order for this to be >> eventually merged in either place, you're going to have additional >> requirements put on you. > > I don't disagree with the fact that there will be additional > requirements, but I might disagree with some of those additional > requirements themselves. It actually works out better than I think you expect it to... We can't use mmap() directly. With the new RAM allocation scheme, I think it's pretty reasonable to now allow portions of ram to come from files that get mmap() (sort of like -mem-path). This RAM area could be setup as a BAR. > In particular I think your proposal was unimplementable; I would > like to see how how you can address my concerns. I don't remember what my proposal was to be perfectly honest :-) I think I suggested registering a guest allocated portion of memory as a sharable region via virtio? Why is that unimplementable? > I don't think bulk memory sharing and the current transactional virtio > mechanisms are a good fit for each other; but if we were to add a > BAR-like capability to virtio that would address the compatibility > requirement (though it might be difficult to implement on s390 with > its requirement on contiguous host virtual address space). It doesn't necessarily have to be virtio if that's not what makes sense. The QEMU bits and the device model bits are actually relatively simple. The part that I think needs more deep thought is the guest-visible interface. A char device is probably not the best interface. I think you want something like tmpfs/hugetlbfs. Another question is whether you want a guest to be able to share a portion of it's memory with another guest or have everything setup by the host. If everything is setup by the host, hot plug is important. Regards, Anthony Liguori