From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from ws5-mx01.kavi.com (ws5-mx01.kavi.com [34.193.7.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ED93CC76195 for ; Tue, 28 Mar 2023 11:28:53 +0000 (UTC) Received: from lists.oasis-open.org (oasis.ws5.connectedcommunity.org [10.110.1.242]) by ws5-mx01.kavi.com (Postfix) with ESMTP id 44BFE3DF29 for ; Tue, 28 Mar 2023 11:28:53 +0000 (UTC) Received: from lists.oasis-open.org (oasis-open.org [10.110.1.242]) by lists.oasis-open.org (Postfix) with ESMTP id 389609863E5 for ; Tue, 28 Mar 2023 11:28:53 +0000 (UTC) Received: from host09.ws5.connectedcommunity.org (host09.ws5.connectedcommunity.org [10.110.1.97]) by lists.oasis-open.org (Postfix) with QMQP id 2C88898634B; Tue, 28 Mar 2023 11:28:53 +0000 (UTC) Mailing-List: contact virtio-dev-help@lists.oasis-open.org; run by ezmlm List-ID: Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [10.110.1.242]) by lists.oasis-open.org (Postfix) with ESMTP id 1D5A298637D for ; Tue, 28 Mar 2023 11:28:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at kavi.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680002931; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=vb0DTSv9wEHNLZijpIORbSppIJNmyE3YOU6O+WGux0E=; b=m6P/VY9HHqlE84rTLXJYsK7grovLDcHGVgI7okkPjUp3F01xKOClFK+hEV8AsSiZ1h O5Idi1F05OJ9E4YEmqItjwyl/3MHqz0A+Mme8EZjfEzlPVYBu/9sLASXx+AV+U3la84W 3mbu5pxtfkP6Q8yhNdhavWXz+EAP9VC+nwPtqZVVtj73lYwtwcgDx8I96DiLJnrep1x5 oKdLQO39K1ESdjz4UrQMxJkmXL9L5aRPKayVsjuYBT2JskId33TVSh339SugzCvqv5Rk OJATntZE2t2ucXmrVZlgpby4ZW6uJVbkax7ke/T4d67PszVeXvNNtMbIlYYJVnI99sZ8 CmIg== X-Gm-Message-State: AO0yUKVWJLrQrhGa5Gm8b3Imm+PJMqTFtEsqDL8oZOHVOkYXfMSSvZFv nqiHcuX5xEL/IFv6cgZsDI+Q+Q== X-Google-Smtp-Source: AK7set9dTJkMQYlZNEtMnnUsOG7J832VNvyYYZs/1b3NcBIGkUnLhqbfE5332XP0aXA1RG5zIZ9LYw== X-Received: by 2002:a7b:ce16:0:b0:3ed:9b20:c7c1 with SMTP id m22-20020a7bce16000000b003ed9b20c7c1mr10702075wmc.20.1680002931595; Tue, 28 Mar 2023 04:28:51 -0700 (PDT) References: <6d0bd7f0e1aeec3ddb603ae4ff334c75c7d0d7b3.1678351495.git.viresh.kumar@linaro.org> User-agent: mu4e 1.10.0; emacs 29.0.60 From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Viresh Kumar Cc: qemu-devel@nongnu.org, virtio-dev@lists.oasis-open.org, Stefan Hajnoczi , "Michael S. Tsirkin" , Vincent Guittot , stratos-dev@op-lists.linaro.org, Oleksandr Tyshchenko , xen-devel@lists.xen.org, Andrew Cooper , Juergen Gross , Sebastien Boeuf , Liu Jiang , Mathieu Poirier Date: Tue, 28 Mar 2023 12:28:45 +0100 In-reply-to: <6d0bd7f0e1aeec3ddb603ae4ff334c75c7d0d7b3.1678351495.git.viresh.kumar@linaro.org> Message-ID: <87wn31qfm5.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [virtio-dev] Re: [PATCH V3 2/2] docs: vhost-user: Add Xen specific memory mapping support Viresh Kumar writes: > The current model of memory mapping at the back-end works fine where a > standard call to mmap() (for the respective file descriptor) is enough > before the front-end can start accessing the guest memory. > > There are other complex cases though where the back-end needs more > information and simple mmap() isn't enough. For example Xen, a type-1 > hypervisor, currently supports memory mapping via two different methods, > foreign-mapping (via /dev/privcmd) and grant-dev (via /dev/gntdev). In > both these cases, the back-end needs to call mmap() and ioctl(), with > extra information like the Xen domain-id of the guest whose memory we > are trying to map. > > Add a new protocol feature, 'VHOST_USER_PROTOCOL_F_XEN_MMAP', which lets > the back-end know about the additional memory mapping requirements. > When this feature is negotiated, the front-end will send the additional > information within the memory regions themselves. > > Signed-off-by: Viresh Kumar Reviewed-by: Alex Benn=C3=A9e --=20 Alex Benn=C3=A9e Virtualisation Tech Lead @ Linaro --------------------------------------------------------------------- To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75064C76196 for ; Tue, 28 Mar 2023 11:29:09 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.515671.798787 (Exim 4.92) (envelope-from ) id 1ph7VW-00010c-5B; Tue, 28 Mar 2023 11:28:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 515671.798787; Tue, 28 Mar 2023 11:28:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ph7VW-00010V-2E; Tue, 28 Mar 2023 11:28:54 +0000 Received: by outflank-mailman (input) for mailman id 515671; Tue, 28 Mar 2023 11:28:52 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ph7VU-00010O-TC for xen-devel@lists.xen.org; Tue, 28 Mar 2023 11:28:52 +0000 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [2a00:1450:4864:20::331]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b7532aff-cd5b-11ed-85db-49a42c6b2330; Tue, 28 Mar 2023 13:28:52 +0200 (CEST) Received: by mail-wm1-x331.google.com with SMTP id u1so6705567wmn.5 for ; Tue, 28 Mar 2023 04:28:52 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id k11-20020a05600c0b4b00b003edef091b17sm16896279wmr.37.2023.03.28.04.28.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 04:28:51 -0700 (PDT) Received: from zen (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E5E1A1FFB7; Tue, 28 Mar 2023 12:28:50 +0100 (BST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b7532aff-cd5b-11ed-85db-49a42c6b2330 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680002931; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=vb0DTSv9wEHNLZijpIORbSppIJNmyE3YOU6O+WGux0E=; b=h2z8xiA4BAvpHt8YCGoGagfxlAgNHvIX/uZXc5kpXiDtN5Z+d8vGnpc25lcrtP84yK H62NA4mSkvxVywzE2GUXVDmmKyBm8XCXn4GUXzftjKCATz4uj5s8G2vOgH/PKrmZDQPP HnpmRcpGILgpwbHDItUujilSlsmBNhlwy0nAk1KFndHLd8eHmp+CYAFR87A1Ph3C9oNm pGYWmTgO7EHdAWvXAxw5xIGfN5SLN/nzw0WIhE9KfGAGbm3GB5PXZQYp1TFSym+Cq9q0 a9vJ9ZuX8fEMdxRKoBcWk8fOlI+q2BpCsbZ/WpzkbVJEvPqPYupyKyrjxFfjtBFpUcHJ 8qew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680002931; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=vb0DTSv9wEHNLZijpIORbSppIJNmyE3YOU6O+WGux0E=; b=upKy9fzRXyRi51W6t2MCbWnU/fN0XZQvDb+Swzyq3qaa20YyURgfFsaTTCxOnOvtGu BWkxbSYfoiFN9HZZ3+wIWAzkbLmVeUxy9+jT1QwW3MNVf5RaGa9YiUhjicg7ibV0XRvz xS+QhPoxxJZeGDHSriRskTPtVdxVfIQbqUZYedao++QVkRjxcYwAAlqj+QLMvi6xY4Sc uZ+IaYcwUht56gfaSNGNwFr77/kqX+B5OBe6XHtebzJAdF1RVKuEHsIzpE9GD/xQ6CSq Fz2bNIEYYW9dzJzHhGrQqEIFP35ElX9R9RJSGdkDFdUJ8BxiFDR6vfjStAxN1QrTkSNj wHFA== X-Gm-Message-State: AO0yUKUd8HKPxyvYCU6R/RQfzwPb12jFyYxu2zrzehcg4/7gt8RuuQCY YLAbu6k2hjnwLrtVe213EVkcXQ== X-Google-Smtp-Source: AK7set9dTJkMQYlZNEtMnnUsOG7J832VNvyYYZs/1b3NcBIGkUnLhqbfE5332XP0aXA1RG5zIZ9LYw== X-Received: by 2002:a7b:ce16:0:b0:3ed:9b20:c7c1 with SMTP id m22-20020a7bce16000000b003ed9b20c7c1mr10702075wmc.20.1680002931595; Tue, 28 Mar 2023 04:28:51 -0700 (PDT) References: <6d0bd7f0e1aeec3ddb603ae4ff334c75c7d0d7b3.1678351495.git.viresh.kumar@linaro.org> User-agent: mu4e 1.10.0; emacs 29.0.60 From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Viresh Kumar Cc: qemu-devel@nongnu.org, virtio-dev@lists.oasis-open.org, Stefan Hajnoczi , "Michael S. Tsirkin" , Vincent Guittot , stratos-dev@op-lists.linaro.org, Oleksandr Tyshchenko , xen-devel@lists.xen.org, Andrew Cooper , Juergen Gross , Sebastien Boeuf , Liu Jiang , Mathieu Poirier Subject: Re: [PATCH V3 2/2] docs: vhost-user: Add Xen specific memory mapping support Date: Tue, 28 Mar 2023 12:28:45 +0100 In-reply-to: <6d0bd7f0e1aeec3ddb603ae4ff334c75c7d0d7b3.1678351495.git.viresh.kumar@linaro.org> Message-ID: <87wn31qfm5.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Viresh Kumar writes: > The current model of memory mapping at the back-end works fine where a > standard call to mmap() (for the respective file descriptor) is enough > before the front-end can start accessing the guest memory. > > There are other complex cases though where the back-end needs more > information and simple mmap() isn't enough. For example Xen, a type-1 > hypervisor, currently supports memory mapping via two different methods, > foreign-mapping (via /dev/privcmd) and grant-dev (via /dev/gntdev). In > both these cases, the back-end needs to call mmap() and ioctl(), with > extra information like the Xen domain-id of the guest whose memory we > are trying to map. > > Add a new protocol feature, 'VHOST_USER_PROTOCOL_F_XEN_MMAP', which lets > the back-end know about the additional memory mapping requirements. > When this feature is negotiated, the front-end will send the additional > information within the memory regions themselves. > > Signed-off-by: Viresh Kumar Reviewed-by: Alex Benn=C3=A9e --=20 Alex Benn=C3=A9e Virtualisation Tech Lead @ Linaro