Re: [PATCH v5 8/8] eni_vdpa: add vDPA driver for Alibaba ENI

2021-10-15 Thread Randy Dunlap
On 10/15/21 12:15 AM, Wu Zongyong wrote: diff --git a/drivers/vdpa/Kconfig b/drivers/vdpa/Kconfig index 3d91982d8371..c0232a2148a7 100644 --- a/drivers/vdpa/Kconfig +++ b/drivers/vdpa/Kconfig @@ -78,4 +78,12 @@ config VP_VDPA help This kernel module bridges virtio PCI device to

Re: [PATCH V2 06/12] virtio_pci: harden MSI-X interrupts

2021-10-15 Thread Michael S. Tsirkin
On Fri, Oct 15, 2021 at 05:09:38AM -0700, Dongli Zhang wrote: > Hi Jason, > > On 10/11/21 11:52 PM, Jason Wang wrote: > > We used to synchronize pending MSI-X irq handlers via > > synchronize_irq(), this may not work for the untrusted device which > > may keep sending interrupts after reset which

Re: [PATCH V2 06/12] virtio_pci: harden MSI-X interrupts

2021-10-15 Thread Dongli Zhang
Hi Jason, On 10/11/21 11:52 PM, Jason Wang wrote: > We used to synchronize pending MSI-X irq handlers via > synchronize_irq(), this may not work for the untrusted device which > may keep sending interrupts after reset which may lead unexpected > results. Similarly, we should not enable MSI-X

Re: [RFC PATCH v4 20/20] vdpa: Add custom IOTLB translations to SVQ

2021-10-15 Thread Jason Wang
On Fri, Oct 15, 2021 at 4:21 PM Eugenio Perez Martin wrote: > > On Fri, Oct 15, 2021 at 9:37 AM Jason Wang wrote: > > > > On Fri, Oct 15, 2021 at 3:28 PM Eugenio Perez Martin > > wrote: > > > > > > On Wed, Oct 13, 2021 at 7:34 AM Jason Wang wrote: > > > > > > > > > > > > 在 2021/10/1 下午3:06,

Re: [PATCH v5 6/8] virtio_vdpa: setup correct vq size with callbacks get_vq_num_{max,min}

2021-10-15 Thread Jason Wang
在 2021/10/15 下午3:14, Wu Zongyong 写道: For the devices which implement the get_vq_num_min callback, the driver should not negotiate with virtqueue size with the backend vdpa device if the value returned by get_vq_num_min equals to the value returned by get_vq_num_max. This is useful for vdpa

Re: [PATCH v5 5/8] vdpa: min vq num of vdpa device cannot be greater than max vq num

2021-10-15 Thread Jason Wang
在 2021/10/15 下午3:14, Wu Zongyong 写道: Just failed to probe the vdpa device if the min virtqueue num returned by get_vq_num_min is greater than the max virtqueue num returned by get_vq_num_max. Signed-off-by: Wu Zongyong --- drivers/vdpa/vdpa.c | 8 1 file changed, 8 insertions(+)

Re: [PATCH v5 4/8] vdpa: add new callback get_vq_num_min in vdpa_config_ops

2021-10-15 Thread Jason Wang
在 2021/10/15 下午3:14, Wu Zongyong 写道: This callback is optional. For vdpa devices that not support to change virtqueue size, get_vq_num_min and get_vq_num_max will return the same value, so that users can choose a correct value for that device. Suggested-by: Jason Wang Signed-off-by: Wu

Re: [PATCH v5 1/8] virtio-pci: introduce legacy device module

2021-10-15 Thread Jason Wang
在 2021/10/15 下午3:14, Wu Zongyong 写道: +void vp_legacy_set_queue_enable(struct virtio_pci_legacy_device *ldev, + u16 idx, bool enable); Similar to previous one, this function is not implemented in this patch. Thanks

Re: [PATCH v5 8/8] eni_vdpa: add vDPA driver for Alibaba ENI

2021-10-15 Thread Jason Wang
在 2021/10/15 下午3:15, Wu Zongyong 写道: + +static u64 eni_vdpa_get_features(struct vdpa_device *vdpa) +{ + struct virtio_pci_legacy_device *ldev = vdpa_to_ldev(vdpa); + u64 features = vp_legacy_get_features(ldev); + + features |= BIT_ULL(VIRTIO_F_ACCESS_PLATFORM); +

Re: [PATCH v4 3/3] vdpa: Check for iova range at mappings changes

2021-10-15 Thread Jason Wang
在 2021/10/14 下午10:12, Eugenio Pérez 写道: Check vdpa device range before updating memory regions so we don't add any outside of it, and report the invalid change if any. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- include/hw/virtio/vhost-vdpa.h | 2 ++

Re: [RFC PATCH v4 20/20] vdpa: Add custom IOTLB translations to SVQ

2021-10-15 Thread Jason Wang
On Fri, Oct 15, 2021 at 3:28 PM Eugenio Perez Martin wrote: > > On Wed, Oct 13, 2021 at 7:34 AM Jason Wang wrote: > > > > > > 在 2021/10/1 下午3:06, Eugenio Pérez 写道: > > > Use translations added in VhostIOVATree in SVQ. > > > > > > Now every element needs to store the previous address also, so

Re: [PATCH v5 16/16] x86/tdx: Add cmdline option to force use of ioremap_host_shared

2021-10-15 Thread Michael S. Tsirkin
On Thu, Oct 14, 2021 at 10:50:59PM -0700, Andi Kleen wrote: > > > I thought you basically create an OperationRegion of SystemMemory type, > > and off you go. Maybe the OSPM in Linux is clever and protects > > some memory, I wouldn't know. > > > I investigated this now, and it looks like acpi is