qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4] tests: qtest: Add virtio-iommu test


From: Jean-Philippe Brucker
Subject: Re: [PATCH v4] tests: qtest: Add virtio-iommu test
Date: Fri, 22 Oct 2021 16:41:02 +0100

On Tue, Oct 19, 2021 at 08:37:55AM +0200, Eric Auger wrote:
> +static void pci_config(void *obj, void *data, QGuestAllocator *t_alloc)
> +{
> +    QVirtioIOMMU *v_iommu = obj;
> +    QVirtioDevice *dev = v_iommu->vdev;
> +    uint64_t input_range_start = qvirtio_config_readq(dev, 8);
> +    uint64_t input_range_end = qvirtio_config_readq(dev, 16);
> +    uint32_t domain_range_start = qvirtio_config_readl(dev, 24);
> +    uint32_t domain_range_end = qvirtio_config_readl(dev, 28);
> +    printf("%s  domain_range_end = %d\n", __func__, domain_range_end);

Looks like a debug leftover

> +
> +    g_assert_cmpint(input_range_start, ==, 0);
> +    g_assert_cmphex(input_range_end, ==, UINT64_MAX);
> +    g_assert_cmpint(domain_range_start, ==, 0);
> +    g_assert_cmpint(domain_range_end, ==, 32);
> +}

[...]
> +/* Test unmap scenari documented in the spec v0.12 */

Comment seems in the wrong place (also v0.12 was just to keep track during
development)

Apart from that it looks good to me. The mappings should normally be
aligned on the page granule, but as the device doesn't do alignment checks
the tests are not incorrect. I'll update them when adding the alignment
checks.

With the printf removed:

Tested-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]