Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7262750imu; Tue, 22 Jan 2019 03:09:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN6aQateSjQ4lVuWUMHRHTNdG0ZXpkpREvTHmkqUTJk1LeOHot0jEPGZwDzw5uelMNETfdB+ X-Received: by 2002:a17:902:ba8b:: with SMTP id k11mr33756417pls.177.1548155387712; Tue, 22 Jan 2019 03:09:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548155387; cv=none; d=google.com; s=arc-20160816; b=Ooj/VKrTNJcTPV6lWcD5UvXh/O9X0pPB5Mw6VS+SzC0arbd0aWAEkLkW4tae3NjA+k 0aPxfvmjANMuGOWLlQ8xreEjfS62qvXAL+sAxZuvT4OFgxGjWSkpdBIEuUrC4mupnelL h7hH4owI6d72z9B6rtQtidvNv7nCfggPDAz1ZNNrRk/JaIIq1Y2Jown7kr1+mwV6O4MH qeJaQxv67ClwShUMTpL24pkvXn0zTMv10jblzra2GHrEFBQgZC2jdIVgO90hNjnhIwNM jqjH5M9cZs1Kc1YGRwUMp5XLj7Kx/9N12aabBxxd5xDHFalVDaixqVnPi//q8+x9gZ3l exXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EJU1+iABV41MeMg3b/5ot4tw6swDHx34xqIMpqD+h3o=; b=DA+o4Wtg39RT8VGbrOecOHHBFHROEpY2rkvGJy5ZvNVSMrQqbosdLuH9AiCEW7m8MG bE82dZgWZQfsMV9G+Lz3EJwXkiEYQyKpkRovuEjibGLp/IQ1xPFyyCddPXo426nBNj2w 2zdHPbCy6jzkg72bBmss9hkeYLxRFIKKUacE78j1aFCtbEKs2W7YWQEDA7QfAzadxktG 5RWHrfa9AKUn3t6ymcEEx9naVhOiqOWg/Y/C6QrMFDpfMakwGEgql+P91M5Qr/M8SxhB b60PIdllZv2LOCpldLJOXJiOaSy5ljz7ExQ6LVBlCc0zGsMtQ7uhNt8iQKLoj9GE/UN8 WyhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=APYQNW2T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si16131507pla.104.2019.01.22.03.09.31; Tue, 22 Jan 2019 03:09:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=APYQNW2T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728026AbfAVLHQ (ORCPT + 99 others); Tue, 22 Jan 2019 06:07:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:33076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727663AbfAVLHP (ORCPT ); Tue, 22 Jan 2019 06:07:15 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D9C6020879; Tue, 22 Jan 2019 11:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548155235; bh=PN9qyb7Tga6APWiAMsAzlzUCzqb/OG4ULtvSOZ/biqA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=APYQNW2TCAS07fUZjRVRG4pu2wNlaISegCHTqDh91PIHUJQg7LfWFuSGh/Z1Jeofu Wt/MXh8K0VzV+Mj5LBzXu+lGpupKtU/Nf/07a3Pz7PMJHOnPGI8t/CbVVlVfwk9fj8 gF45lIB6Kfdu3pfmbbI+FCyeF3wxwMVx29cDQ74k= Date: Tue, 22 Jan 2019 12:07:12 +0100 From: Greg KH To: rkir@google.com Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] drivers: platform: goldfish: goldfish_address_space: add a driver Message-ID: <20190122110712.GA1004@kroah.com> References: <20190109021112.5836-1-rkir@google.com> <20190109021112.5836-2-rkir@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190109021112.5836-2-rkir@google.com> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 08, 2019 at 06:11:11PM -0800, rkir@google.com wrote: > From: Roman Kiryanov > > A driver for the Goldfish Android emulator that occupies > address space to use it with the memory sharing device > on the QEMU side. The memory sharding device allocates > subranges and populate them with actual RAM. > This allows sharing host's memory with the guest. > > Signed-off-by: Roman Kiryanov > --- > Changes in v3: > - No changes. > > Changes in v2: > - Removed WARN_ON. > - Moved to drivers/platform/goldfish (from drivers/misc). > > drivers/platform/goldfish/Kconfig | 9 + > drivers/platform/goldfish/Makefile | 1 + > .../goldfish/goldfish_address_space.c | 666 ++++++++++++++++++ > .../linux/goldfish/goldfish_address_space.h | 27 + > 4 files changed, 703 insertions(+) > create mode 100644 drivers/platform/goldfish/goldfish_address_space.c > create mode 100644 include/uapi/linux/goldfish/goldfish_address_space.h > > diff --git a/drivers/platform/goldfish/Kconfig b/drivers/platform/goldfish/Kconfig > index 74fdfa68d1f2..60ecec4a3c59 100644 > --- a/drivers/platform/goldfish/Kconfig > +++ b/drivers/platform/goldfish/Kconfig > @@ -16,4 +16,13 @@ config GOLDFISH_PIPE > This is a virtual device to drive the QEMU pipe interface used by > the Goldfish Android Virtual Device. > > +config GOLDFISH_ADDRESS_SPACE > + tristate "A Goldfish driver that talks to the memory sharing device in QEMU" > + depends on PCI > + depends on GOLDFISH > + help > + A Goldfish driver that allocates address space ranges in the guest to > + populate them later in the host. This allows sharing host's memory > + with the guest. How does QEMU do this today? There isn't a virtio or some other virtual memory device that allows memory regions to be shared? I can't believe that there isn't one yet. If not, then this should be some kind of "generic" QEMU memory device, not a "goldfish" specific one, right? Please work with the QEMU developers on this, I need their ack before I can take something like this. thanks, greg k-h