From: Eric Auger <eric.auger@redhat.com>
To: eric.auger.pro@gmail.com, thuth@redhat.com, qemu-arm@nongnu.org,
qemu-devel@nongnu.org, jean-philippe@linaro.org,
peter.maydell@linaro.org
Cc: lvivier@redhat.com, pbonzini@redhat.com
Subject: Re: [PATCH v6 1/4] virtio-iommu: Remove set_config callback
Date: Sat, 27 Nov 2021 08:50:27 +0100 [thread overview]
Message-ID: <638d96d9-a580-ab29-5fc1-48909a524c2a@redhat.com> (raw)
In-Reply-To: <20211127072910.1261824-2-eric.auger@redhat.com>
Hi,
On 11/27/21 8:29 AM, Eric Auger wrote:
> The spec says "the driver must not write to device configuration
> fields". So remove the set_config() callback which anyway did
> not do anything.
Forgot to mention that with the advent of VIRTIO_IOMMU_F_BYPASS_CONFIG
feature and bypass field in struct virtio_iommu_config coming, this will
change soon. Only the bypass field will be settable. But this is not yet
available in the imported linux header.
Thanks
Eric
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> ---
> hw/virtio/trace-events | 1 -
> hw/virtio/virtio-iommu.c | 14 --------------
> 2 files changed, 15 deletions(-)
>
> diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events
> index 650e521e351..54bd7da00c8 100644
> --- a/hw/virtio/trace-events
> +++ b/hw/virtio/trace-events
> @@ -92,7 +92,6 @@ virtio_iommu_device_reset(void) "reset!"
> virtio_iommu_get_features(uint64_t features) "device supports features=0x%"PRIx64
> virtio_iommu_device_status(uint8_t status) "driver status = %d"
> virtio_iommu_get_config(uint64_t page_size_mask, uint64_t start, uint64_t end, uint32_t domain_range, uint32_t probe_size) "page_size_mask=0x%"PRIx64" start=0x%"PRIx64" end=0x%"PRIx64" domain_range=%d probe_size=0x%x"
> -virtio_iommu_set_config(uint64_t page_size_mask, uint64_t start, uint64_t end, uint32_t domain_range, uint32_t probe_size) "page_size_mask=0x%"PRIx64" start=0x%"PRIx64" end=0x%"PRIx64" domain_bits=%d probe_size=0x%x"
> virtio_iommu_attach(uint32_t domain_id, uint32_t ep_id) "domain=%d endpoint=%d"
> virtio_iommu_detach(uint32_t domain_id, uint32_t ep_id) "domain=%d endpoint=%d"
> virtio_iommu_map(uint32_t domain_id, uint64_t virt_start, uint64_t virt_end, uint64_t phys_start, uint32_t flags) "domain=%d virt_start=0x%"PRIx64" virt_end=0x%"PRIx64 " phys_start=0x%"PRIx64" flags=%d"
> diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
> index 1b23e8e18c7..645c0aa3997 100644
> --- a/hw/virtio/virtio-iommu.c
> +++ b/hw/virtio/virtio-iommu.c
> @@ -832,19 +832,6 @@ static void virtio_iommu_get_config(VirtIODevice *vdev, uint8_t *config_data)
> memcpy(config_data, &dev->config, sizeof(struct virtio_iommu_config));
> }
>
> -static void virtio_iommu_set_config(VirtIODevice *vdev,
> - const uint8_t *config_data)
> -{
> - struct virtio_iommu_config config;
> -
> - memcpy(&config, config_data, sizeof(struct virtio_iommu_config));
> - trace_virtio_iommu_set_config(config.page_size_mask,
> - config.input_range.start,
> - config.input_range.end,
> - config.domain_range.end,
> - config.probe_size);
> -}
> -
> static uint64_t virtio_iommu_get_features(VirtIODevice *vdev, uint64_t f,
> Error **errp)
> {
> @@ -1185,7 +1172,6 @@ static void virtio_iommu_class_init(ObjectClass *klass, void *data)
> vdc->unrealize = virtio_iommu_device_unrealize;
> vdc->reset = virtio_iommu_device_reset;
> vdc->get_config = virtio_iommu_get_config;
> - vdc->set_config = virtio_iommu_set_config;
> vdc->get_features = virtio_iommu_get_features;
> vdc->set_status = virtio_iommu_set_status;
> vdc->vmsd = &vmstate_virtio_iommu_device;
next prev parent reply other threads:[~2021-11-27 7:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-27 7:29 [PATCH v6 0/4] virtio-iommu: config related fixes and qtest Eric Auger
2021-11-27 7:29 ` [PATCH v6 1/4] virtio-iommu: Remove set_config callback Eric Auger
2021-11-27 7:50 ` Eric Auger [this message]
2021-11-29 19:04 ` Jean-Philippe Brucker
2021-11-27 7:29 ` [PATCH v6 2/4] virtio-iommu: Fix endianness in get_config Eric Auger
2021-11-29 19:10 ` Jean-Philippe Brucker
2021-11-27 7:29 ` [PATCH v6 3/4] virtio-iommu: Fix the domain_range end Eric Auger
2021-11-29 19:12 ` Jean-Philippe Brucker
2021-11-27 7:29 ` [PATCH v6 4/4] tests: qtest: Add virtio-iommu test Eric Auger
2021-12-08 13:49 ` Thomas Huth
2021-12-13 10:02 ` [PATCH v6 0/4] virtio-iommu: config related fixes and qtest Thomas Huth
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=638d96d9-a580-ab29-5fc1-48909a524c2a@redhat.com \
--to=eric.auger@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=jean-philippe@linaro.org \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).