All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Philippe Brucker <jean-philippe@linaro.org>
To: Eric Auger <eric.auger@redhat.com>
Cc: lvivier@redhat.com, peter.maydell@linaro.org, thuth@redhat.com,
	qemu-devel@nongnu.org, qemu-arm@nongnu.org, pbonzini@redhat.com,
	eric.auger.pro@gmail.com
Subject: Re: [PATCH v6 3/4] virtio-iommu: Fix the domain_range end
Date: Mon, 29 Nov 2021 19:12:26 +0000	[thread overview]
Message-ID: <YaUmGvfuOFbIDlUp@myrica> (raw)
In-Reply-To: <20211127072910.1261824-4-eric.auger@redhat.com>

On Sat, Nov 27, 2021 at 08:29:09AM +0100, Eric Auger wrote:
> in old times the domain range was defined by a domain_bits le32.
> This was then converted into a domain_range struct. During the
> upgrade the original value of '32' (bits) has been kept while
> the end field now is the max value of the domain id (UINT32_MAX).
> Fix that and also use UINT64_MAX for the input_range.end.
> 
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> Reported-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

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

> ---
>  hw/virtio/virtio-iommu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
> index 30ee09187b8..aa9c16a17b1 100644
> --- a/hw/virtio/virtio-iommu.c
> +++ b/hw/virtio/virtio-iommu.c
> @@ -978,8 +978,8 @@ static void virtio_iommu_device_realize(DeviceState *dev, Error **errp)
>      s->event_vq = virtio_add_queue(vdev, VIOMMU_DEFAULT_QUEUE_SIZE, NULL);
>  
>      s->config.page_size_mask = TARGET_PAGE_MASK;
> -    s->config.input_range.end = -1UL;
> -    s->config.domain_range.end = 32;
> +    s->config.input_range.end = UINT64_MAX;
> +    s->config.domain_range.end = UINT32_MAX;
>      s->config.probe_size = VIOMMU_PROBE_SIZE;
>  
>      virtio_add_feature(&s->features, VIRTIO_RING_F_EVENT_IDX);
> -- 
> 2.26.3
> 

  reply	other threads:[~2021-11-29 19:16 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
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 [this message]
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=YaUmGvfuOFbIDlUp@myrica \
    --to=jean-philippe@linaro.org \
    --cc=eric.auger.pro@gmail.com \
    --cc=eric.auger@redhat.com \
    --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 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.