qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Geoffrey McRae <geoff@hostfission.com>,
	qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	"Daniel P . Berrange" <berrange@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [PATCH] hw/core/qdev-properties-system: allow bus addresses > 0x1f
Date: Sat, 7 Nov 2020 09:58:13 +0100	[thread overview]
Message-ID: <ae70570e-dd35-ffc4-c073-f2b8674ba8e5@redhat.com> (raw)
In-Reply-To: <20201106234510.2101-1-geoff@hostfission.com>

Hi Geoffrey,

Cc'ing the QOM maintainers.

On 11/7/20 12:45 AM, Geoffrey McRae wrote:
> The commit bccb20c49df1bd683248a366021973901c11982f introduced an error
> in the checking logic that validates the bus addresses for PCI device
> addresses preventing usage of devices via vfio-pci that sit at a bus
> address of 0x20 or higher. This patch resolves this by reverting the
> checking logic to the original maximum value of 0xff
> 
> Signed-off-by: Geoffrey McRae <geoff@hostfission.com>
> ---
>  hw/core/qdev-properties-system.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/core/qdev-properties-system.c b/hw/core/qdev-properties-system.c
> index b81a4e8d14..e62644bc69 100644
> --- a/hw/core/qdev-properties-system.c
> +++ b/hw/core/qdev-properties-system.c
> @@ -882,7 +882,7 @@ static void set_pci_host_devaddr(Object *obj, Visitor *v, const char *name,
>      bus = val;
>  
>      p = (char *)e + 1;
> -    if (qemu_strtoul(p, &e, 16, &val) < 0 || val > 0x1f || e == p) {
> +    if (qemu_strtoul(p, &e, 16, &val) < 0 || val > 0xff || e == p) {

The fix has already been suggested last month ...:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg750122.html

... then reworked:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg750121.html

You could help to get it merged by reviewing it ;)

Thanks,

Phil.

>          goto inval;
>      }
>      if (*e == ':') {
> 



      reply	other threads:[~2020-11-07  8:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06 23:45 [PATCH] hw/core/qdev-properties-system: allow bus addresses > 0x1f Geoffrey McRae
2020-11-07  8:58 ` Philippe Mathieu-Daudé [this message]

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=ae70570e-dd35-ffc4-c073-f2b8674ba8e5@redhat.com \
    --to=philmd@redhat.com \
    --cc=berrange@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=geoff@hostfission.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).