Re: virtio-gpu dedicated heap

2022-03-03 Thread Michael S. Tsirkin
$ ./scripts/get_maintainer.pl -f ./drivers/gpu/drm/virtio/ David Airlie (maintainer:VIRTIO GPU DRIVER) Gerd Hoffmann (maintainer:VIRTIO GPU DRIVER) Daniel Vetter (maintainer:DRM DRIVERS) dri-de...@lists.freedesktop.org (open list:VIRTIO GPU DRIVER) virtualizat...@lists.linux-foundation.org (ope

Re: [PATCH v2] iommu/iova: Separate out rcache init

2022-02-03 Thread Michael S. Tsirkin
ndled safely, which is > less than ideal. > > Make "fast" users call a separate rcache init explicitly, which includes > error checking. > > Signed-off-by: John Garry virtio things: Acked-by: Michael S. Tsirkin > --- > Differences to v1: > - Drop stubs

Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 08:57:49PM +0800, Yongji Xie wrote: > On Tue, Jan 11, 2022 at 7:54 PM Michael S. Tsirkin wrote: > > > > On Tue, Jan 11, 2022 at 11:31:37AM +0800, Yongji Xie wrote: > > > On Mon, Jan 10, 2022 at 11:44 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 11:31:37AM +0800, Yongji Xie wrote: > On Mon, Jan 10, 2022 at 11:44 PM Michael S. Tsirkin wrote: > > > > On Mon, Jan 10, 2022 at 11:24:40PM +0800, Yongji Xie wrote: > > > On Mon, Jan 10, 2022 at 11:10 PM Michael S. Tsirkin > > > wrot

Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace

2022-01-10 Thread Michael S. Tsirkin
On Mon, Jan 10, 2022 at 11:24:40PM +0800, Yongji Xie wrote: > On Mon, Jan 10, 2022 at 11:10 PM Michael S. Tsirkin wrote: > > > > On Mon, Jan 10, 2022 at 09:54:08PM +0800, Yongji Xie wrote: > > > On Mon, Jan 10, 2022 at 8:57 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace

2022-01-10 Thread Michael S. Tsirkin
On Mon, Jan 10, 2022 at 09:54:08PM +0800, Yongji Xie wrote: > On Mon, Jan 10, 2022 at 8:57 PM Michael S. Tsirkin wrote: > > > > On Mon, Aug 30, 2021 at 10:17:24PM +0800, Xie Yongji wrote: > > > This series introduces a framework that makes it possible to implement >

Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace

2022-01-10 Thread Michael S. Tsirkin
On Mon, Aug 30, 2021 at 10:17:24PM +0800, Xie Yongji wrote: > This series introduces a framework that makes it possible to implement > software-emulated vDPA devices in userspace. And to make the device > emulation more secure, the emulated vDPA device's control path is handled > in the kernel and

Re: [PATCH v2 4/5] iommu/virtio: Pass end address to viommu_add_mapping()

2021-11-27 Thread Michael S. Tsirkin
On Sat, Nov 27, 2021 at 06:09:40PM +0100, Eric Auger wrote: > > > On 11/23/21 4:53 PM, Jean-Philippe Brucker wrote: > > To support identity mappings, the virtio-iommu driver must be able to > > represent full 64-bit ranges internally. Pass (start, end) instead of > > (start, size) to viommu_add/d

Re: [PATCH 0/5] iommu/virtio: Add identity domains

2021-10-22 Thread Michael S. Tsirkin
On Wed, Oct 13, 2021 at 01:10:48PM +0100, Jean-Philippe Brucker wrote: > Support identity domains, allowing to only enable IOMMU protection for a > subset of endpoints (those assigned to userspace, for example). Users > may enable identity domains at compile time > (CONFIG_IOMMU_DEFAULT_PASSTHROUGH

Re: [PATCH 1/5] iova: Move fast alloc size roundup into alloc_iova_fast()

2021-10-18 Thread Michael S. Tsirkin
for vdpa code: Acked-by: Michael S. Tsirkin > --- > drivers/iommu/dma-iommu.c| 8 > drivers/iommu/iova.c | 9 + > drivers/vdpa/vdpa_user/iova_domain.c | 8 > 3 files changed, 9 insertions(+), 16 deletions(-) > > diff --git a

Re: [PATCH 0/5] iommu/virtio: Add identity domains

2021-10-18 Thread Michael S. Tsirkin
On Mon, Oct 18, 2021 at 04:23:41PM +0100, Jean-Philippe Brucker wrote: > On Thu, Oct 14, 2021 at 03:00:38AM +, Tian, Kevin wrote: > > > From: Jean-Philippe Brucker > > > Sent: Wednesday, October 13, 2021 8:11 PM > > > > > > Support identity domains, allowing to only enable IOMMU protection fo

Re: [PATCH RFC] virtio: wrap config->reset calls

2021-10-13 Thread Michael S. Tsirkin
On Wed, Oct 13, 2021 at 01:03:46PM +0200, David Hildenbrand wrote: > On 13.10.21 12:55, Michael S. Tsirkin wrote: > > This will enable cleanups down the road. > > The idea is to disable cbs, then add "flush_queued_cbs" callback > > as a parameter, this way driver

[PATCH RFC] virtio: wrap config->reset calls

2021-10-13 Thread Michael S. Tsirkin
This will enable cleanups down the road. The idea is to disable cbs, then add "flush_queued_cbs" callback as a parameter, this way drivers can flush any work queued after callbacks have been disabled. Signed-off-by: Michael S. Tsirkin --- arch/um/drivers/virt-pci.c

Re: [PATCH v13 05/13] vdpa: Add reset callback in vdpa_config_ops

2021-09-06 Thread Michael S. Tsirkin
On Mon, Sep 06, 2021 at 04:45:55PM +0800, Yongji Xie wrote: > On Mon, Sep 6, 2021 at 4:01 PM Michael S. Tsirkin wrote: > > > > On Mon, Sep 06, 2021 at 03:06:44PM +0800, Yongji Xie wrote: > > > On Mon, Sep 6, 2021 at 2:37 PM Michael S. Tsirkin wrote: > > > > &

Re: [PATCH v13 05/13] vdpa: Add reset callback in vdpa_config_ops

2021-09-06 Thread Michael S. Tsirkin
On Mon, Sep 06, 2021 at 03:06:44PM +0800, Yongji Xie wrote: > On Mon, Sep 6, 2021 at 2:37 PM Michael S. Tsirkin wrote: > > > > On Mon, Sep 06, 2021 at 02:09:25PM +0800, Yongji Xie wrote: > > > On Mon, Sep 6, 2021 at 1:56 PM Michael S. Tsirkin wrote: > > > > &

Re: [PATCH v13 05/13] vdpa: Add reset callback in vdpa_config_ops

2021-09-05 Thread Michael S. Tsirkin
On Mon, Sep 06, 2021 at 02:09:25PM +0800, Yongji Xie wrote: > On Mon, Sep 6, 2021 at 1:56 PM Michael S. Tsirkin wrote: > > > > On Tue, Aug 31, 2021 at 06:36:26PM +0800, Xie Yongji wrote: > > > This adds a new callback to support device specific reset > > > behavi

Re: [PATCH v13 05/13] vdpa: Add reset callback in vdpa_config_ops

2021-09-05 Thread Michael S. Tsirkin
On Tue, Aug 31, 2021 at 06:36:26PM +0800, Xie Yongji wrote: > This adds a new callback to support device specific reset > behavior. The vdpa bus driver will call the reset function > instead of setting status to zero during resetting. > > Signed-off-by: Xie Yongji This does gloss over a signifi

Re: [PATCH v12 05/13] vdpa: Add reset callback in vdpa_config_ops

2021-09-05 Thread Michael S. Tsirkin
On Mon, Aug 30, 2021 at 10:17:29PM +0800, Xie Yongji wrote: > This adds a new callback to support device specific reset > behavior. The vdpa bus driver will call the reset function > instead of setting status to zero during resetting. > > Signed-off-by: Xie Yongji This does gloss over a signific

Re: [PATCH v13 03/13] file: Export receive_fd() to modules

2021-09-05 Thread Michael S. Tsirkin
On Tue, Aug 31, 2021 at 06:36:24PM +0800, Xie Yongji wrote: > Export receive_fd() so that some modules can use > it to pass file descriptor between processes without > missing any security stuffs. > > Signed-off-by: Xie Yongji > Acked-by: Jason Wang This needs some acks from fs devels. Viro?

Re: [PATCH v11 11/12] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-08-24 Thread Michael S. Tsirkin
On Wed, Aug 18, 2021 at 08:06:41PM +0800, Xie Yongji wrote: > This VDUSE driver enables implementing software-emulated vDPA > devices in userspace. The vDPA device is created by > ioctl(VDUSE_CREATE_DEV) on /dev/vduse/control. Then a char device > interface (/dev/vduse/$NAME) is exported to userspa

Re: [PATCH v11 01/12] iova: Export alloc_iova_fast() and free_iova_fast()

2021-08-24 Thread Michael S. Tsirkin
On Wed, Aug 18, 2021 at 08:06:31PM +0800, Xie Yongji wrote: > Export alloc_iova_fast() and free_iova_fast() so that > some modules can make use of the per-CPU cache to get > rid of rbtree spinlock in alloc_iova() and free_iova() > during IOVA allocation. > > Signed-off-by: Xie Yongji This needs

Re: [PATCH v9 16/17] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-07-13 Thread Michael S. Tsirkin
On Wed, Jul 14, 2021 at 01:45:39PM +0800, Jason Wang wrote: > > +static int vduse_dev_msg_sync(struct vduse_dev *dev, > > + struct vduse_dev_msg *msg) > > +{ > > + int ret; > > + > > + init_waitqueue_head(&msg->waitq); > > + spin_lock(&dev->msg_lock); > > + msg->req.

Re: [PATCH] eventfd: Enlarge recursion limit to allow vhost to work

2021-07-03 Thread Michael S. Tsirkin
On Fri, Jun 18, 2021 at 04:44:12PM +0800, He Zhe wrote: > commit b5e683d5cab8 ("eventfd: track eventfd_signal() recursion depth") > introduces a percpu counter that tracks the percpu recursion depth and > warn if it greater than zero, to avoid potential deadlock and stack > overflow. > > However s

Re: [PATCH v7 00/12] Introduce VDUSE - vDPA Device in Userspace

2021-05-24 Thread Michael S. Tsirkin
On Tue, May 25, 2021 at 02:40:57PM +0800, Jason Wang wrote: > > 在 2021/5/20 下午5:06, Yongji Xie 写道: > > On Thu, May 20, 2021 at 2:06 PM Michael S. Tsirkin wrote: > > > On Mon, May 17, 2021 at 05:55:01PM +0800, Xie Yongji wrote: > > > > This series introduces

Re: [PATCH v7 00/12] Introduce VDUSE - vDPA Device in Userspace

2021-05-19 Thread Michael S. Tsirkin
On Mon, May 17, 2021 at 05:55:01PM +0800, Xie Yongji wrote: > This series introduces a framework, which can be used to implement > vDPA Devices in a userspace program. The work consist of two parts: > control path forwarding and data path offloading. > > In the control path, the VDUSE driver will

Re: Re: [PATCH v7 04/12] virtio-blk: Add validation for block size in config space

2021-05-19 Thread Michael S. Tsirkin
On Thu, May 20, 2021 at 01:25:16PM +0800, Yongji Xie wrote: > On Wed, May 19, 2021 at 10:42 PM Dan Carpenter > wrote: > > > > On Wed, May 19, 2021 at 09:39:20PM +0800, Yongji Xie wrote: > > > On Mon, May 17, 2021 at 5:56 PM Xie Yongji > > > wrote: > > > > > > > > This ensures that we will not u

Re: [PATCH v2 0/6] Add support for ACPI VIOT

2021-05-14 Thread Michael S. Tsirkin
On Fri, Apr 23, 2021 at 01:38:31PM +0200, Jean-Philippe Brucker wrote: > Add a driver for the ACPI VIOT table, which provides topology > information for para-virtual platforms. Enable virtio-iommu on > non-devicetree platforms, including x86. Acked-by: Michael S. Tsirkin Mostly ACPI s

Re: [PATCH v2 6/6] iommu/virtio: Enable x86 support

2021-05-14 Thread Michael S. Tsirkin
ch_setup_dma_ops() at the > moment. Similarly to Vt-d and AMD IOMMU, call iommu_setup_dma_ops() from > probe_finalize(). > > Acked-by: Joerg Roedel > Signed-off-by: Jean-Philippe Brucker Acked-by: Michael S. Tsirkin > --- > drivers/iommu/Kconfig| 3 ++- > drivers/i

Re: [PATCH 3/3] iommu/virtio: Enable x86 support

2021-03-18 Thread Michael S. Tsirkin
pe Brucker Acked-by: Michael S. Tsirkin > --- > drivers/iommu/Kconfig | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > index 2819b5c8ec30..ccca83ef2f06 100644 > --- a/drivers/iommu/Kconfig > +

Re: swiotlb/virtio: unchecked device dma address and length

2020-12-16 Thread Michael S. Tsirkin
On Tue, Dec 15, 2020 at 11:20:48AM +0800, Jason Wang wrote: > > On 2020/12/15 上午5:49, Konrad Rzeszutek Wilk wrote: > > On Fri, Dec 11, 2020 at 06:31:21PM +0100, Felicitas Hetzelt wrote: > > > Hello, > > Hi! Please see below my responses. > > > > > we have been analyzing the Hypervisor-OS interfac

Re: [PATCH 2/2] virtio: let virtio use DMA API when guest RAM is protected

2020-10-28 Thread Michael S. Tsirkin
On Wed, Oct 28, 2020 at 03:24:03PM +0100, Alexander Graf wrote: > On 24.02.20 18:16, Christoph Hellwig wrote: > > On Sat, Feb 22, 2020 at 02:07:58PM -0500, Michael S. Tsirkin wrote: > > > On Fri, Feb 21, 2020 at 03:33:40PM +0100, Halil Pasic wrote: > > > > AFAI

Re: [PATCH v3 0/6] Add virtio-iommu built-in topology

2020-09-25 Thread Michael S. Tsirkin
On Fri, Sep 25, 2020 at 01:26:29PM +0200, Jean-Philippe Brucker wrote: > On Fri, Sep 25, 2020 at 06:22:57AM -0400, Michael S. Tsirkin wrote: > > On Fri, Sep 25, 2020 at 10:48:06AM +0200, Jean-Philippe Brucker wrote: > > > On Fri, Aug 21, 2020 at 03:15:34PM +0200, Jean-Phil

Re: [PATCH v3 0/6] Add virtio-iommu built-in topology

2020-09-25 Thread Michael S. Tsirkin
On Fri, Sep 25, 2020 at 10:48:06AM +0200, Jean-Philippe Brucker wrote: > On Fri, Aug 21, 2020 at 03:15:34PM +0200, Jean-Philippe Brucker wrote: > > Add a topology description to the virtio-iommu driver and enable x86 > > platforms. > > > > Since [v2] we have made some progress on adding ACPI suppo

Re: [PATCH v3 0/6] Add virtio-iommu built-in topology

2020-09-25 Thread Michael S. Tsirkin
On Thu, Sep 24, 2020 at 02:50:46PM +0200, Joerg Roedel wrote: > On Thu, Sep 24, 2020 at 08:41:21AM -0400, Michael S. Tsirkin wrote: > > But this has nothing to do with Linux. There is also no guarantee that > > the two committees will decide to use exactly the same format. Once

Re: [PATCH v3 0/6] Add virtio-iommu built-in topology

2020-09-24 Thread Michael S. Tsirkin
On Thu, Sep 24, 2020 at 12:02:55PM +0200, Joerg Roedel wrote: > On Thu, Sep 24, 2020 at 05:38:13AM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 24, 2020 at 11:21:29AM +0200, Joerg Roedel wrote: > > > On Thu, Sep 24, 2020 at 05:00:35AM -0400, Michael S. Tsirkin wrote: > &

Re: [PATCH v3 0/6] Add virtio-iommu built-in topology

2020-09-24 Thread Michael S. Tsirkin
On Thu, Sep 24, 2020 at 11:21:29AM +0200, Joerg Roedel wrote: > On Thu, Sep 24, 2020 at 05:00:35AM -0400, Michael S. Tsirkin wrote: > > OK so this looks good. Can you pls repost with the minor tweak > > suggested and all acks included, and I will queue this? > > My NACK still

Re: [PATCH v3 0/6] Add virtio-iommu built-in topology

2020-09-24 Thread Michael S. Tsirkin
On Fri, Sep 04, 2020 at 06:24:12PM +0200, Auger Eric wrote: > Hi, > > On 8/21/20 3:15 PM, Jean-Philippe Brucker wrote: > > Add a topology description to the virtio-iommu driver and enable x86 > > platforms. > > > > Since [v2] we have made some progress on adding ACPI support for > > virtio-iommu,

Re: [PATCH v3 0/6] Add virtio-iommu built-in topology

2020-08-26 Thread Michael S. Tsirkin
On Fri, Aug 21, 2020 at 03:15:34PM +0200, Jean-Philippe Brucker wrote: > Add a topology description to the virtio-iommu driver and enable x86 > platforms. > > Since [v2] we have made some progress on adding ACPI support for > virtio-iommu, which is the preferred boot method on x86. It will be a >

[PATCH v3 36/38] virtio-iommu: convert to LE accessors

2020-08-05 Thread Michael S. Tsirkin
Virtio iommu is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin --- drivers/iommu/virtio-iommu.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-07-11 Thread Michael S. Tsirkin
On Fri, Jul 10, 2020 at 10:23:22AM -0700, Stefano Stabellini wrote: > Sorry for the late reply -- a couple of conferences kept me busy. > > > On Wed, 1 Jul 2020, Michael S. Tsirkin wrote: > > On Wed, Jul 01, 2020 at 10:34:53AM -0700, Stefano Stabellini wrote: > > >

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-07-01 Thread Michael S. Tsirkin
On Wed, Jul 01, 2020 at 10:34:53AM -0700, Stefano Stabellini wrote: > Would you be in favor of a more flexible check along the lines of the > one proposed in the patch that started this thread: > > if (xen_vring_use_dma()) > return true; > > > xen_vring_use_dma would be implement

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-07-01 Thread Michael S. Tsirkin
On Wed, Jul 01, 2020 at 10:34:53AM -0700, Stefano Stabellini wrote: > On Wed, 1 Jul 2020, Christoph Hellwig wrote: > > On Mon, Jun 29, 2020 at 04:46:09PM -0700, Stefano Stabellini wrote: > > > > I could imagine some future Xen hosts setting a flag somewhere in the > > > > platform capability saying

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-06-28 Thread Michael S. Tsirkin
On Mon, Jun 29, 2020 at 06:25:41AM +, Peng Fan wrote: > > > > > Anyway, re-reading the last messages of the original thread [1], > > > > > it looks like Peng had a clear idea on how to fix the general issue. > > > > > Peng, what happened with that? > > > > > > We shrinked the rpmsg reserved are

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-06-28 Thread Michael S. Tsirkin
On Mon, Jun 29, 2020 at 03:05:19AM +, Peng Fan wrote: > > Subject: Re: [PATCH] xen: introduce xen_vring_use_dma > > > > On Thu, Jun 25, 2020 at 10:31:27AM -0700, Stefano Stabellini wrote: > > > On Wed, 24 Jun 2020, Michael S. Tsirkin wrote: > > > > O

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-06-26 Thread Michael S. Tsirkin
On Thu, Jun 25, 2020 at 10:31:27AM -0700, Stefano Stabellini wrote: > On Wed, 24 Jun 2020, Michael S. Tsirkin wrote: > > On Wed, Jun 24, 2020 at 02:53:54PM -0700, Stefano Stabellini wrote: > > > On Wed, 24 Jun 2020, Michael S. Tsirkin wrote: > > > > On Wed, Ju

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-06-24 Thread Michael S. Tsirkin
On Wed, Jun 24, 2020 at 02:53:54PM -0700, Stefano Stabellini wrote: > On Wed, 24 Jun 2020, Michael S. Tsirkin wrote: > > On Wed, Jun 24, 2020 at 10:59:47AM -0700, Stefano Stabellini wrote: > > > On Wed, 24 Jun 2020, Michael S. Tsirkin wrote: > > > > On Wed, Jun 24,

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-06-24 Thread Michael S. Tsirkin
On Wed, Jun 24, 2020 at 10:59:47AM -0700, Stefano Stabellini wrote: > On Wed, 24 Jun 2020, Michael S. Tsirkin wrote: > > On Wed, Jun 24, 2020 at 05:17:32PM +0800, Peng Fan wrote: > > > Export xen_swiotlb for all platforms using xen swiotlb > > > > > > Use

Re: [PATCH] xen: introduce xen_vring_use_dma

2020-06-24 Thread Michael S. Tsirkin
On Wed, Jun 24, 2020 at 05:17:32PM +0800, Peng Fan wrote: > Export xen_swiotlb for all platforms using xen swiotlb > > Use xen_swiotlb to determine when vring should use dma APIs to map the > ring: when xen_swiotlb is enabled the dma API is required. When it is > disabled, it is not required. > >

Re: [PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint

2020-05-14 Thread Michael S. Tsirkin
On Thu, May 14, 2020 at 12:50:16PM +0200, Jean-Philippe Brucker wrote: > On Thu, May 14, 2020 at 05:31:00AM -0400, Michael S. Tsirkin wrote: > > On Thu, May 14, 2020 at 01:22:37PM +0530, Bharat Bhushan wrote: > > > Different endpoint can support different page size, probe &g

Re: [PATCH v6] iommu/virtio: Use page size bitmap supported by endpoint

2020-05-14 Thread Michael S. Tsirkin
On Thu, May 14, 2020 at 01:22:37PM +0530, Bharat Bhushan wrote: > Different endpoint can support different page size, probe > endpoint if it supports specific page size otherwise use > global page sizes. > > Device attached to domain should support a minimum of > domain supported page sizes. If de

Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint

2020-05-12 Thread Michael S. Tsirkin
On Tue, May 05, 2020 at 03:00:04PM +0530, Bharat Bhushan wrote: > Different endpoint can support different page size, probe > endpoint if it supports specific page size otherwise use > global page sizes. > > Signed-off-by: Bharat Bhushan > --- > v4->v5: > - Rebase to Linux v5.7-rc4 > > v3->v4:

Re: [EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint

2020-05-07 Thread Michael S. Tsirkin
On Thu, May 07, 2020 at 02:51:32PM +0200, Auger Eric wrote: > Hi, > > On 5/7/20 1:32 PM, Michael S. Tsirkin wrote: > > On Thu, May 07, 2020 at 11:24:29AM +, Bharat Bhushan wrote: > >> > >> > >>> -----Original Message- > >>> From: Mi

Re: [EXT] Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint

2020-05-07 Thread Michael S. Tsirkin
On Thu, May 07, 2020 at 11:24:29AM +, Bharat Bhushan wrote: > > > > -Original Message- > > From: Michael S. Tsirkin > > Sent: Wednesday, May 6, 2020 5:53 AM > > To: Bharat Bhushan > > Cc: jean-phili...@linaro.org; j...@8bytes.org; jasow...@redhat

Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint

2020-05-05 Thread Michael S. Tsirkin
On Tue, May 05, 2020 at 03:00:04PM +0530, Bharat Bhushan wrote: > Different endpoint can support different page size, probe > endpoint if it supports specific page size otherwise use > global page sizes. > > Signed-off-by: Bharat Bhushan > --- > v4->v5: > - Rebase to Linux v5.7-rc4 > > v3->v4:

Re: [RFC/PATCH 1/1] virtio: Introduce MMIO ops

2020-04-30 Thread Michael S. Tsirkin
On Thu, Apr 30, 2020 at 07:03:21PM +0530, Srivatsa Vaddagiri wrote: > * Jan Kiszka [2020-04-30 14:59:50]: > > > >I believe ivshmem2_virtio requires hypervisor to support PCI device > > >emulation > > >(for life-cycle management of VMs), which our hypervisor may not support. PCI is mostly just 2

Re: [RFC/PATCH 0/1] virtio_mmio: hypervisor specific interfaces for MMIO

2020-04-30 Thread Michael S. Tsirkin
On Thu, Apr 30, 2020 at 03:32:55PM +0530, Srivatsa Vaddagiri wrote: > The Type-1 hypervisor we are dealing with does not allow for MMIO transport. How about PCI then? -- MST ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxf

Re: [PATCH 5/5] virtio: Add bounce DMA ops

2020-04-29 Thread Michael S. Tsirkin
On Wed, Apr 29, 2020 at 12:26:43PM +0200, Jan Kiszka wrote: > On 29.04.20 12:20, Michael S. Tsirkin wrote: > > On Wed, Apr 29, 2020 at 03:39:53PM +0530, Srivatsa Vaddagiri wrote: > > > That would still not work I think where swiotlb is used for pass-thr > > > devices &g

Re: [PATCH 5/5] virtio: Add bounce DMA ops

2020-04-29 Thread Michael S. Tsirkin
On Wed, Apr 29, 2020 at 03:39:53PM +0530, Srivatsa Vaddagiri wrote: > That would still not work I think where swiotlb is used for pass-thr devices > (when private memory is fine) as well as virtio devices (when shared memory is > required). So that is a separate question. When there are multiple u

Re: [PATCH 5/5] virtio: Add bounce DMA ops

2020-04-29 Thread Michael S. Tsirkin
On Wed, Apr 29, 2020 at 03:14:10PM +0530, Srivatsa Vaddagiri wrote: > * Michael S. Tsirkin [2020-04-29 02:50:41]: > > > So it seems that with modern Linux, all one needs > > to do on x86 is mark the device as untrusted. > > It's already possible to do this with ACP

Re: [PATCH 5/5] virtio: Add bounce DMA ops

2020-04-28 Thread Michael S. Tsirkin
On Wed, Apr 29, 2020 at 01:42:13PM +0800, Lu Baolu wrote: > On 2020/4/29 12:57, Michael S. Tsirkin wrote: > > On Wed, Apr 29, 2020 at 10:22:32AM +0800, Lu Baolu wrote: > > > On 2020/4/29 4:41, Michael S. Tsirkin wrote: > > > > On Tue, Apr 28, 2020 at 11:19:52PM +

Re: [PATCH 5/5] virtio: Add bounce DMA ops

2020-04-28 Thread Michael S. Tsirkin
On Wed, Apr 29, 2020 at 10:22:32AM +0800, Lu Baolu wrote: > On 2020/4/29 4:41, Michael S. Tsirkin wrote: > > On Tue, Apr 28, 2020 at 11:19:52PM +0530, Srivatsa Vaddagiri wrote: > > > * Michael S. Tsirkin [2020-04-28 12:17:57]: > > > > > > > Okay, but how is

Re: [PATCH 5/5] virtio: Add bounce DMA ops

2020-04-28 Thread Michael S. Tsirkin
On Tue, Apr 28, 2020 at 11:19:52PM +0530, Srivatsa Vaddagiri wrote: > * Michael S. Tsirkin [2020-04-28 12:17:57]: > > > Okay, but how is all this virtio specific? For example, why not allow > > separate swiotlbs for any type of device? > > For example, this might make se

Re: [PATCH 5/5] virtio: Add bounce DMA ops

2020-04-28 Thread Michael S. Tsirkin
On Tue, Apr 28, 2020 at 05:09:18PM +0530, Srivatsa Vaddagiri wrote: > For better security, its desirable that a guest VM's memory is > not accessible to any entity that executes outside the context of > guest VM. In case of virtio, backend drivers execute outside the > context of guest VM and in ge

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-04-13 Thread Michael S. Tsirkin
On Fri, Feb 28, 2020 at 06:25:36PM +0100, Jean-Philippe Brucker wrote: > diff --git a/include/uapi/linux/virtio_iommu.h > b/include/uapi/linux/virtio_iommu.h > index 237e36a280cb..ec57d215086a 100644 > --- a/include/uapi/linux/virtio_iommu.h > +++ b/include/uapi/linux/virtio_iommu.h > @@ -16,6 +16

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-11 Thread Michael S. Tsirkin
On Wed, Mar 11, 2020 at 06:48:22PM +0100, Jean-Philippe Brucker wrote: > Yes "not elegant" in part because of the PCI fixup. Fixups are used to > work around bugs Not really - they are for anything unusual that common PCI code can not handle on its own. -- MST __

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-05 Thread Michael S. Tsirkin
On Wed, Mar 04, 2020 at 10:54:49PM +0100, Joerg Roedel wrote: > On Wed, Mar 04, 2020 at 01:37:44PM -0800, Jacob Pan (Jun) wrote: > > + Mike and Erik who work closely on UEFI and ACPICA. > > > > Copy paste Erik's initial response below on how to get a new table, > > seems to confirm with the proces

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-05 Thread Michael S. Tsirkin
On Wed, Mar 04, 2020 at 10:50:02PM +0100, Joerg Roedel wrote: > On Wed, Mar 04, 2020 at 02:34:33PM -0500, Michael S. Tsirkin wrote: > > All these extra levels of indirection is one of the reasons > > hypervisors such as kata try to avoid ACPI. > > Platforms that don&#x

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-04 Thread Michael S. Tsirkin
On Wed, Mar 04, 2020 at 02:37:08PM +0100, Joerg Roedel wrote: > Hi Michael, > > On Tue, Mar 03, 2020 at 11:09:41AM -0500, Michael S. Tsirkin wrote: > > No. It's coded into the hardware. Which might even be practical > > for bare-metal (e.g. on-board flash), but is v

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-03 Thread Michael S. Tsirkin
On Tue, Mar 03, 2020 at 04:53:19PM +0100, Joerg Roedel wrote: > On Tue, Mar 03, 2020 at 09:00:05AM -0500, Michael S. Tsirkin wrote: > > Not necessarily. E.g. some power systems have neither. > > There are also systems looking to bypass ACPI e.g. for boot speed. > > If there

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-03 Thread Michael S. Tsirkin
On Mon, Mar 02, 2020 at 05:16:12PM +0100, Joerg Roedel wrote: > On Fri, Feb 28, 2020 at 06:25:36PM +0100, Jean-Philippe Brucker wrote: > > This solution isn't elegant nor foolproof, but is the best we can do at > > the moment and works with existing virtio-iommu implementations. It also > > enables

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-03 Thread Michael S. Tsirkin
On Tue, Mar 03, 2020 at 02:01:56PM +0100, Joerg Roedel wrote: > Hi Eric, > > On Tue, Mar 03, 2020 at 11:19:20AM +0100, Auger Eric wrote: > > Michael has pushed this solution (putting the "configuration in the PCI > > config space"), I think for those main reasons: > > - ACPI may not be supported o

Re: [PATCH v2 1/3] iommu/virtio: Add topology description to virtio-iommu config space

2020-03-01 Thread Michael S. Tsirkin
On Fri, Feb 28, 2020 at 06:25:36PM +0100, Jean-Philippe Brucker wrote: > Platforms without device-tree do not currently have a method for > describing the vIOMMU topology. Provide a topology description embedded > into the virtio device. > > Use PCI FIXUP to probe the config space early, because w

Re: [PATCH 0/2] virtio: decouple protected guest RAM form VIRTIO_F_IOMMU_PLATFORM

2020-02-24 Thread Michael S. Tsirkin
On Mon, Feb 24, 2020 at 05:26:20PM +0800, Jason Wang wrote: > > On 2020/2/24 下午3:48, Michael S. Tsirkin wrote: > > On Mon, Feb 24, 2020 at 02:45:03PM +0800, Jason Wang wrote: > > > On 2020/2/24 下午2:06, Michael S. Tsirkin wrote: > > > > On Mon, Feb 24, 2020 at 1

Re: [PATCH 0/2] virtio: decouple protected guest RAM form VIRTIO_F_IOMMU_PLATFORM

2020-02-23 Thread Michael S. Tsirkin
On Mon, Feb 24, 2020 at 02:45:03PM +0800, Jason Wang wrote: > > On 2020/2/24 下午2:06, Michael S. Tsirkin wrote: > > On Mon, Feb 24, 2020 at 12:01:57PM +0800, Jason Wang wrote: > > > On 2020/2/21 下午10:56, Halil Pasic wrote: > > > > On Fri, 21 Feb 2020 14:22:2

Re: [PATCH 0/2] virtio: decouple protected guest RAM form VIRTIO_F_IOMMU_PLATFORM

2020-02-23 Thread Michael S. Tsirkin
On Mon, Feb 24, 2020 at 12:01:57PM +0800, Jason Wang wrote: > > On 2020/2/21 下午10:56, Halil Pasic wrote: > > On Fri, 21 Feb 2020 14:22:26 +0800 > > Jason Wang wrote: > > > > > On 2020/2/21 上午12:06, Halil Pasic wrote: > > > > Currently if one intends to run a memory protection enabled VM with > >

Re: [PATCH 2/2] virtio: let virtio use DMA API when guest RAM is protected

2020-02-22 Thread Michael S. Tsirkin
On Fri, Feb 21, 2020 at 03:33:40PM +0100, Halil Pasic wrote: > AFAIU you have a positive attitude towards the idea, that > !F_VIRTIO_PLATFORM implies 'no DMA API is used by virtio' > should be scrapped. > > I would like to accomplish that without adverse effects to virtio-ccw > (because caring

Re: [PATCH 2/2] virtio: let virtio use DMA API when guest RAM is protected

2020-02-21 Thread Michael S. Tsirkin
On Fri, Feb 21, 2020 at 02:12:30PM +0100, Halil Pasic wrote: > On Thu, 20 Feb 2020 15:55:14 -0500 > "Michael S. Tsirkin" wrote: > > > On Thu, Feb 20, 2020 at 05:06:06PM +0100, Halil Pasic wrote: > > > Currently the advanced guest memory protection technolog

Re: [PATCH 1/2] mm: move force_dma_unencrypted() to mem_encrypt.h

2020-02-21 Thread Michael S. Tsirkin
On Fri, Feb 21, 2020 at 02:06:39PM +0100, Halil Pasic wrote: > On Fri, 21 Feb 2020 14:27:27 +1100 > David Gibson wrote: > > > On Thu, Feb 20, 2020 at 05:31:35PM +0100, Christoph Hellwig wrote: > > > On Thu, Feb 20, 2020 at 05:23:20PM +0100, Christian Borntraeger wrote: > > > > >From a users persp

Re: [PATCH 0/2] virtio: decouple protected guest RAM form VIRTIO_F_IOMMU_PLATFORM

2020-02-20 Thread Michael S. Tsirkin
On Thu, Feb 20, 2020 at 05:06:04PM +0100, Halil Pasic wrote: > For vhost-net the feature VIRTIO_F_IOMMU_PLATFORM has the following side > effect The vhost code assumes it the addresses on the virtio descriptor > ring are not guest physical addresses but iova's, and insists on doing a > translation

Re: [PATCH 0/2] virtio: decouple protected guest RAM form VIRTIO_F_IOMMU_PLATFORM

2020-02-20 Thread Michael S. Tsirkin
On Thu, Feb 20, 2020 at 05:06:04PM +0100, Halil Pasic wrote: > * This usage is not congruent with standardised semantics of > VIRTIO_F_IOMMU_PLATFORM. Guest memory protected is an orthogonal reason > for using DMA API in virtio (orthogonal with respect to what is > expressed by VIRTIO_F_IOMMU_PLAT

Re: [PATCH 2/2] virtio: let virtio use DMA API when guest RAM is protected

2020-02-20 Thread Michael S. Tsirkin
On Thu, Feb 20, 2020 at 05:06:06PM +0100, Halil Pasic wrote: > Currently the advanced guest memory protection technologies (AMD SEV, > powerpc secure guest technology and s390 Protected VMs) abuse the > VIRTIO_F_IOMMU_PLATFORM flag to make virtio core use the DMA API, which > is in turn necessary,

Re: [PATCH 0/2] virtio: decouple protected guest RAM form VIRTIO_F_IOMMU_PLATFORM

2020-02-20 Thread Michael S. Tsirkin
On Thu, Feb 20, 2020 at 05:06:04PM +0100, Halil Pasic wrote: > Currently if one intends to run a memory protection enabled VM with > virtio devices and linux as the guest OS, one needs to specify the > VIRTIO_F_IOMMU_PLATFORM flag for each virtio device to make the guest > linux use the DMA API, wh

Re: [PATCH 3/3] iommu/virtio: Enable x86 support

2020-02-17 Thread Michael S. Tsirkin
On Mon, Feb 17, 2020 at 01:22:44PM +, Robin Murphy wrote: > On 17/02/2020 1:01 pm, Michael S. Tsirkin wrote: > > On Mon, Feb 17, 2020 at 10:01:07AM +0100, Jean-Philippe Brucker wrote: > > > On Sun, Feb 16, 2020 at 04:50:33AM -0500, Michael S. Tsirkin wrote: > > > &

Re: [PATCH 3/3] iommu/virtio: Enable x86 support

2020-02-17 Thread Michael S. Tsirkin
On Mon, Feb 17, 2020 at 10:01:07AM +0100, Jean-Philippe Brucker wrote: > On Sun, Feb 16, 2020 at 04:50:33AM -0500, Michael S. Tsirkin wrote: > > On Fri, Feb 14, 2020 at 04:57:11PM +, Robin Murphy wrote: > > > On 14/02/2020 4:04 pm, Jean-Philippe Brucker wrote: > &g

Re: [PATCH 3/3] iommu/virtio: Enable x86 support

2020-02-16 Thread Michael S. Tsirkin
On Fri, Feb 14, 2020 at 04:57:11PM +, Robin Murphy wrote: > On 14/02/2020 4:04 pm, Jean-Philippe Brucker wrote: > > With the built-in topology description in place, x86 platforms can now > > use the virtio-iommu. > > > > Signed-off-by: Jean-Philippe Brucker > > --- > > drivers/iommu/Kconfig

Re: [RFC 00/13] virtio-iommu on non-devicetree platforms

2019-11-22 Thread Michael S. Tsirkin
On Fri, Nov 22, 2019 at 11:49:47AM +0100, Jean-Philippe Brucker wrote: > I'm seeking feedback on multi-platform support for virtio-iommu. At the > moment only devicetree (DT) is supported and we don't have a pleasant > solution for other platforms. Once we figure out the topology > description, x86

Re: [RFC 13/13] iommu/virtio: Add topology description to

2019-11-22 Thread Michael S. Tsirkin
On Fri, Nov 22, 2019 at 11:50:00AM +0100, Jean-Philippe Brucker wrote: > Some hypervisors don't implement either device-tree or ACPI, but still > need a method to describe the IOMMU topology. Read the virtio-iommu > config early and parse the topology description. Hook into the > dma_setup() callba

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-09-05 Thread Michael S. Tsirkin
On Mon, Aug 12, 2019 at 02:15:32PM +0200, Christoph Hellwig wrote: > On Sun, Aug 11, 2019 at 04:55:27AM -0400, Michael S. Tsirkin wrote: > > On Sun, Aug 11, 2019 at 07:56:07AM +0200, Christoph Hellwig wrote: > > > So we need a flag on the virtio device, exposed by the > > &

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-08-11 Thread Michael S. Tsirkin
On Sun, Aug 11, 2019 at 07:56:07AM +0200, Christoph Hellwig wrote: > So we need a flag on the virtio device, exposed by the > hypervisor (or hardware for hw virtio devices) that says: hey, I'm real, > don't take a shortcut. The point here is that it's actually still not real. So we would still us

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-08-11 Thread Michael S. Tsirkin
On Sat, Aug 10, 2019 at 11:46:21PM -0700, Ram Pai wrote: > On Sun, Aug 11, 2019 at 07:56:07AM +0200, Christoph Hellwig wrote: > > sev_active() is gone now in linux-next, at least as a global API. > > > > And once again this is entirely going in the wrong direction. The only > > way using the DMA

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-08-11 Thread Michael S. Tsirkin
On Sun, Aug 11, 2019 at 07:56:07AM +0200, Christoph Hellwig wrote: > And once again this is entirely going in the wrong direction. The only > way using the DMA API is going to work at all is if the device is ready > for it. So the point made is that if DMA addresses are also physical addresses (n

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-08-11 Thread Michael S. Tsirkin
On Sat, Aug 10, 2019 at 03:07:02PM -0700, Ram Pai wrote: > On Sat, Aug 10, 2019 at 02:57:17PM -0400, Michael S. Tsirkin wrote: > > On Tue, Jan 29, 2019 at 03:08:12PM -0200, Thiago Jung Bauermann wrote: > > > > > > Hello, > > > > > > With Christoph

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-08-10 Thread Michael S. Tsirkin
On Tue, Jan 29, 2019 at 03:08:12PM -0200, Thiago Jung Bauermann wrote: > > Hello, > > With Christoph's rework of the DMA API that recently landed, the patch > below is the only change needed in virtio to make it work in a POWER > secure guest under the ultravisor. > > The other change we need (m

Re: [PATCH 2/2] virtio/virtio_ring: Fix the dma_max_mapping_size call

2019-07-24 Thread Michael S. Tsirkin
On Tue, Jul 23, 2019 at 05:38:51PM +0200, Christoph Hellwig wrote: > On Mon, Jul 22, 2019 at 04:36:09PM +0100, Robin Murphy wrote: > >> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > >> index c8be1c4f5b55..37c143971211 100644 > >> --- a/drivers/virtio/virtio_ring.c > >>

Re: [PATCH 2/2] virtio/virtio_ring: Fix the dma_max_mapping_size call

2019-07-23 Thread Michael S. Tsirkin
On Tue, Jul 23, 2019 at 05:38:30PM +0200, Christoph Hellwig wrote: > On Mon, Jul 22, 2019 at 11:33:35AM -0400, Michael S. Tsirkin wrote: > > On Mon, Jul 22, 2019 at 04:55:09PM +0200, Eric Auger wrote: > > > Do not call dma_max_mapping_size for devices that have no DMA > >

Re: [PATCH v2] dma-mapping: Use dma_get_mask in dma_addressing_limited

2019-07-22 Thread Michael S. Tsirkin
On Mon, Jul 22, 2019 at 06:56:49PM +0200, Auger Eric wrote: > Hi Christoph, > > On 7/22/19 6:51 PM, Eric Auger wrote: > > We currently have cases where the dma_addressing_limited() gets > > called with dma_mask unset. This causes a NULL pointer dereference. > > > > Use dma_get_mask() accessor to

Re: [PATCH v2] dma-mapping: Use dma_get_mask in dma_addressing_limited

2019-07-22 Thread Michael S. Tsirkin
quot;dma-mapping: add a dma_addressing_limited helper") > Signed-off-by: Eric Auger Acked-by: Michael S. Tsirkin If possible I really prefer this approach: avoids changing all callers and uses documented interfaces. > --- > > v1 -> v2: > - was [PATCH 1/2] dma-mapping: P

Re: [PATCH 2/2] virtio/virtio_ring: Fix the dma_max_mapping_size call

2019-07-22 Thread Michael S. Tsirkin
On Mon, Jul 22, 2019 at 04:36:09PM +0100, Robin Murphy wrote: > On 22/07/2019 15:55, Eric Auger wrote: > > Do not call dma_max_mapping_size for devices that have no DMA > > mask set, otherwise we can hit a NULL pointer dereference. > > > > This occurs when a virtio-blk-pci device is protected with

Re: [PATCH 2/2] virtio/virtio_ring: Fix the dma_max_mapping_size call

2019-07-22 Thread Michael S. Tsirkin
irtio. In any case, for both v1 and v2 of the patches, you can merge them through your tree: Acked-by: Michael S. Tsirkin -- MST

Re: [PATCH 2/2] virtio/virtio_ring: Fix the dma_max_mapping_size call

2019-07-22 Thread Michael S. Tsirkin
On Mon, Jul 22, 2019 at 04:55:09PM +0200, Eric Auger wrote: > Do not call dma_max_mapping_size for devices that have no DMA > mask set, otherwise we can hit a NULL pointer dereference. > > This occurs when a virtio-blk-pci device is protected with > a virtual IOMMU. > > Fixes: e6d6dd6c875e ("virt

  1   2   3   >