All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Bharat Bhushan <bbhushan2@marvell.com>,
	joro@8bytes.org, jasowang@redhat.com,
	virtualization@lists.linux-foundation.org,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	eric.auger.pro@gmail.com, eric.auger@redhat.com
Subject: Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
Date: Tue, 12 May 2020 18:47:03 +0200	[thread overview]
Message-ID: <20200512164703.GA1902@myrica> (raw)
In-Reply-To: <20200512105149-mutt-send-email-mst@kernel.org>

On Tue, May 12, 2020 at 10:53:39AM -0400, Michael S. Tsirkin wrote:
> >  static int viommu_add_resv_mem(struct viommu_endpoint *vdev,
> >  			       struct virtio_iommu_probe_resv_mem *mem,
> >  			       size_t len)
> > @@ -499,6 +513,9 @@ static int viommu_probe_endpoint(struct viommu_dev *viommu, struct device *dev)
> >  		case VIRTIO_IOMMU_PROBE_T_RESV_MEM:
> >  			ret = viommu_add_resv_mem(vdev, (void *)prop, len);
> >  			break;
> > +		case VIRTIO_IOMMU_PROBE_T_PAGE_SIZE_MASK:
> > +			ret = viommu_set_pgsize_bitmap(vdev, (void *)prop, len);
> > +			break;
> >  		default:
> >  			dev_err(dev, "unknown viommu prop 0x%x\n", type);
> >  		}
> 
> So given this is necessary early in boot, how about we
> add this in the config space? And maybe ACPI too ...

A page_size_mask field is already in the config space and applies to all
endpoints. Here we add a property to override the global value for
individual endpoints. It can be necessary when mixing physical (pass-
through) and virtual endpoints under the same virtio-iommu device.

Thanks,
Jean

WARNING: multiple messages have this Message-ID (diff)
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: jasowang@redhat.com, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	iommu@lists.linux-foundation.org,
	Bharat Bhushan <bbhushan2@marvell.com>,
	eric.auger.pro@gmail.com
Subject: Re: [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint
Date: Tue, 12 May 2020 18:47:03 +0200	[thread overview]
Message-ID: <20200512164703.GA1902@myrica> (raw)
In-Reply-To: <20200512105149-mutt-send-email-mst@kernel.org>

On Tue, May 12, 2020 at 10:53:39AM -0400, Michael S. Tsirkin wrote:
> >  static int viommu_add_resv_mem(struct viommu_endpoint *vdev,
> >  			       struct virtio_iommu_probe_resv_mem *mem,
> >  			       size_t len)
> > @@ -499,6 +513,9 @@ static int viommu_probe_endpoint(struct viommu_dev *viommu, struct device *dev)
> >  		case VIRTIO_IOMMU_PROBE_T_RESV_MEM:
> >  			ret = viommu_add_resv_mem(vdev, (void *)prop, len);
> >  			break;
> > +		case VIRTIO_IOMMU_PROBE_T_PAGE_SIZE_MASK:
> > +			ret = viommu_set_pgsize_bitmap(vdev, (void *)prop, len);
> > +			break;
> >  		default:
> >  			dev_err(dev, "unknown viommu prop 0x%x\n", type);
> >  		}
> 
> So given this is necessary early in boot, how about we
> add this in the config space? And maybe ACPI too ...

A page_size_mask field is already in the config space and applies to all
endpoints. Here we add a property to override the global value for
individual endpoints. It can be necessary when mixing physical (pass-
through) and virtual endpoints under the same virtio-iommu device.

Thanks,
Jean
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2020-05-12 16:47 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05  9:30 [PATCH v5] iommu/virtio: Use page size bitmap supported by endpoint Bharat Bhushan
2020-05-05  9:30 ` Bharat Bhushan
2020-05-05  9:30 ` Bharat Bhushan
2020-05-06  0:22 ` Michael S. Tsirkin
2020-05-06  0:22   ` Michael S. Tsirkin
2020-05-07 11:24   ` [EXT] " Bharat Bhushan
2020-05-07 11:24     ` Bharat Bhushan
2020-05-07 11:24     ` Bharat Bhushan
2020-05-07 11:32     ` Michael S. Tsirkin
2020-05-07 11:32       ` Michael S. Tsirkin
2020-05-07 11:32       ` Michael S. Tsirkin
2020-05-07 12:51       ` Auger Eric
2020-05-07 12:51         ` Auger Eric
2020-05-07 12:51         ` Auger Eric
2020-05-07 13:00         ` Michael S. Tsirkin
2020-05-07 13:00           ` Michael S. Tsirkin
2020-05-07 13:00           ` Michael S. Tsirkin
2020-05-07 12:43     ` Auger Eric
2020-05-07 12:43       ` Auger Eric
2020-05-07 12:43       ` Auger Eric
2020-05-07 12:52   ` Auger Eric
2020-05-07 12:52     ` Auger Eric
2020-05-13  9:15   ` [EXT] " Bharat Bhushan
2020-05-13  9:15     ` Bharat Bhushan
2020-05-13  9:15     ` Bharat Bhushan
2020-05-13 10:45     ` Jean-Philippe Brucker
2020-05-13 10:45       ` Jean-Philippe Brucker
2020-05-13 10:45       ` Jean-Philippe Brucker
2020-05-12 14:53 ` Michael S. Tsirkin
2020-05-12 14:53   ` Michael S. Tsirkin
2020-05-12 16:47   ` Jean-Philippe Brucker [this message]
2020-05-12 16:47     ` Jean-Philippe Brucker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200512164703.GA1902@myrica \
    --to=jean-philippe@linaro.org \
    --cc=bbhushan2@marvell.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=eric.auger@redhat.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jasowang@redhat.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.