From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=fail reason="key not found in DNS" header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202312 header.b=mV4Uc9q7; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id ECA9F5A004F for ; Thu, 15 Aug 2024 06:59:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1723697958; bh=pM1davMY6hzvC1QoADpZjnd0IbAUCphZZMEmYrPqbLY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mV4Uc9q7M/8iX8HWCqBdpDoshW1u4KQLXsTPO6MHPocj8eS/YqlgRPCJX3NG86do4 ARnbKu+xCdOWexghDYZAUAQCjAhgl/TglmrS/roR6DI8LLMuz5FSIxGFfxvJ8WH9W2 KRSxn60oqx7Gx7bjpjKabajOuZX5O/Zk1nyIiw2dDg58LhV/mWWMcwviZdfKC8+B4T s+2CCK1jKVo2AYs8TU4CTTiw6lEr1Sq7sGv5EV7N6dL6J2VmAQgnc/+JDgW2rUDKzB pAybq3bwCiv32GgAVU6pqXIisctUisPVNlzjGlBlhM9+gjrb8fbDgexfLjf8WnWfxa L3wIJvG73mIkg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WktFf2Pb2z4x21; Thu, 15 Aug 2024 14:59:18 +1000 (AEST) Date: Thu, 15 Aug 2024 14:52:52 +1000 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH v2 2/4] vhost-user: introduce virtio API Message-ID: References: <20240712153244.831436-1-lvivier@redhat.com> <20240712153244.831436-3-lvivier@redhat.com> <7024df34-8a58-4eae-ab57-2af0e03aa2b0@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="P0cMMPuHsVndmP54" Content-Disposition: inline In-Reply-To: <7024df34-8a58-4eae-ab57-2af0e03aa2b0@redhat.com> Message-ID-Hash: XPIISJ7WKFYSKHBWW27IRSIZZB7AMMID X-Message-ID-Hash: XPIISJ7WKFYSKHBWW27IRSIZZB7AMMID X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --P0cMMPuHsVndmP54 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 14, 2024 at 02:47:36PM +0200, Laurent Vivier wrote: > On 17/07/2024 07:21, David Gibson wrote: > > On Fri, Jul 12, 2024 at 05:32:42PM +0200, Laurent Vivier wrote: > > > Add virtio.c and virtio.h that define the functions needed > > > to manage virtqueues. > > >=20 > > > Signed-off-by: Laurent Vivier > > > --- > > > Makefile | 4 +- > > > util.h | 11 + > > > virtio.c | 611 ++++++++++++++++++++++++++++++++++++++++++++++++++++= +++ > > > virtio.h | 190 +++++++++++++++++ > > > 4 files changed, 814 insertions(+), 2 deletions(-) > > > create mode 100644 virtio.c > > > create mode 100644 virtio.h > > >=20 > ... > > > + > > > +/** > > > + * struct vu_dev_region - guest shared memory region > > > + * @gpa: Guest physical address of the region > > > + * @size: Memory size in bytes > > > + * @qva: QEMU virtual address > >=20 > > Is this actually the qemu virtual address? Or is it our virtual > > address? > >=20 >=20 > It is actually QEMU virtual address, it's a virtual address provided by t= he > front-end (in our case QEMU). Ok. > https://qemu-project.gitlab.io/qemu/interop/vhost-user.html#memory-region= -description >=20 > It's used in qva_to_va() to convert vring addresses that are in QEMU > userspace (vhost-user) to our process userspace mapped address, while > vu_gpa_to_va() is used to convert guest physical address (virtio) of buff= ers > address stored vring descritors that are in guest physical address space = to > our process address space. >=20 > vhost-user addresses are in QEMU virtual adress space, virtio addresses a= re > in guest physical address space. >=20 >=20 > Thansk, > Laurent >=20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --P0cMMPuHsVndmP54 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAma9iaMACgkQzQJF27ox 2GeznQ//c2Xc9YSRElItUyIEgJPoLIKG5xVeRsAIcvz7HFzdbhjLJcqFjbo+fjdN LgH/pLSpepC/TWj+5SYHgAO/0bp9/mEgIz3Q3BArLJ+QevQBV+5Cz/b4tYO0COkp gx7kh/SZ/TSlczWcXzc5GO7mjYifRexX2U7rdKubV+GBw0raaH5CoFZxvcwyiOCK 6sWKBesETPQMEElqig/2CduF5lWvmv0sjvExMj4pkdwrNZBz6CkpPKXUjWh0wtEO fLuI/WiJ7PY0cBSyRpR2Wiz7NKJ9z1a5vJTnKZJYYejnRoMhix43SovgPb7srKL7 yDZxaCKUhGk8luKkwIeJBerp9xC5CeQYCUWDE9Jm1ZguYn7sYvIU0WLmWM99Yfdw FI1qG0HynmYImtUHgwPb0m92NDWuSeRE01lcHmIek5z5cLr6czqq6UGAn1s9RPap MLx8lMfuXIDVwiDm0Vehg/Kp9f8rhoP+L9f1OjMsAerZ5hISz67cULo24oR5sIwA jwVaHufBksduEhf56sQ5ft8xGjrLwSf+QEea8hTgzP85tbCWzR6luA0+yDlRXKrG 1zniVxPhwgtS8coPfAEuKpDqHNsMxa0uN5ZCqgvpBHTrfQYIWSUFnTkx6hAYlIo3 bczoAXgS56XMEE8JZP3pbAtOiKLlexZ9OnkpnEN9UMzJyb8TQ5E= =3Loe -----END PGP SIGNATURE----- --P0cMMPuHsVndmP54--