[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL v4 15/47] intel_iommu: support snoop control
From: |
Peter Maydell |
Subject: |
Re: [PULL v4 15/47] intel_iommu: support snoop control |
Date: |
Thu, 31 Mar 2022 10:51:17 +0100 |
On Mon, 7 Mar 2022 at 22:45, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> From: Jason Wang <jasowang@redhat.com>
>
> SC is required for some kernel features like vhost-vDPA. So this patch
> implements basic SC feature. The idea is pretty simple, for software
> emulated DMA it would be always coherent. In this case we can simple
> advertise ECAP_SC bit. For VFIO and vhost, thing will be more much
> complicated, so this patch simply fail the IOMMU notifier
> registration.
>
> In the future, we may want to have a dedicated notifiers flag or
> similar mechanism to demonstrate the coherency so VFIO could advertise
> that if it has VFIO_DMA_CC_IOMMU, for vhost kernel backend we don't
> need that since it's a software backend.
Hi; Coverity points out (CID 1487174) an error in this change:
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -3030,6 +3030,13 @@ static int
> vtd_iommu_notify_flag_changed(IOMMUMemoryRegion *iommu,
> VTDAddressSpace *vtd_as = container_of(iommu, VTDAddressSpace, iommu);
> IntelIOMMUState *s = vtd_as->iommu_state;
>
> + /* TODO: add support for VFIO and vhost users */
> + if (s->snoop_control) {
> + error_setg_errno(errp, -ENOTSUP,
> + "Snoop Control with vhost or VFIO is not
> supported");
> + return -ENOTSUP;
> + }
error_setg_errno() expects a normal errno value, not a negated
one, so we should be passing it "ENOTSUP" here, not "-ENOTSUP".
thanks
-- PMM
- [PULL v4 06/47] hw/smbios: code cleanup - use macro definitions for table header handles, (continued)
- [PULL v4 06/47] hw/smbios: code cleanup - use macro definitions for table header handles, Michael S. Tsirkin, 2022/03/07
- [PULL v4 07/47] hw/smbios: fix overlapping table handle numbers with large memory vms, Michael S. Tsirkin, 2022/03/07
- [PULL v4 08/47] hw/smbios: add assertion to ensure handles of tables 19 and 32 do not collide, Michael S. Tsirkin, 2022/03/07
- [PULL v4 09/47] vhost-user: remove VirtQ notifier restore, Michael S. Tsirkin, 2022/03/07
- [PULL v4 10/47] vhost-user: fix VirtQ notifier cleanup, Michael S. Tsirkin, 2022/03/07
- [PULL v4 11/47] virtio: fix the condition for iommu_platform not supported, Michael S. Tsirkin, 2022/03/07
- [PULL v4 12/47] hw/vhost-user-i2c: Add support for VIRTIO_I2C_F_ZERO_LENGTH_REQUEST, Michael S. Tsirkin, 2022/03/07
- [PULL v4 13/47] hw/virtio: vdpa: Fix leak of host-notifier memory-region, Michael S. Tsirkin, 2022/03/07
- [PULL v4 14/47] vhost-vdpa: make notifiers _init()/_uninit() symmetric, Michael S. Tsirkin, 2022/03/07
- [PULL v4 15/47] intel_iommu: support snoop control, Michael S. Tsirkin, 2022/03/07
- Re: [PULL v4 15/47] intel_iommu: support snoop control,
Peter Maydell <=
- [PULL v4 16/47] hw/i386: Improve bounds checking in OVMF table parsing, Michael S. Tsirkin, 2022/03/07
- [PULL v4 17/47] hw/i386: Replace magic number with field length calculation, Michael S. Tsirkin, 2022/03/07
- [PULL v4 18/47] virtio-iommu: Default to bypass during boot, Michael S. Tsirkin, 2022/03/07
- [PULL v4 19/47] virtio-iommu: Support bypass domain, Michael S. Tsirkin, 2022/03/07
- [PULL v4 20/47] tests/qtest/virtio-iommu-test: Check bypass config, Michael S. Tsirkin, 2022/03/07
- [PULL v4 21/47] hw/i386/pc_piix: Mark the machine types from version 1.4 to 1.7 as deprecated, Michael S. Tsirkin, 2022/03/07
- [PULL v4 22/47] hw/pci-bridge/pxb: Fix missing swizzle, Michael S. Tsirkin, 2022/03/07
- [PULL v4 25/47] pcie: Add some SR/IOV API documentation in docs/pcie_sriov.txt, Michael S. Tsirkin, 2022/03/07
- [PULL v4 23/47] virtio-net: Unlimit tx queue size if peer is vdpa, Michael S. Tsirkin, 2022/03/07