qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Eric Auger <eric.auger@redhat.com>,
	Eric Auger <eric.auger.pro@gmail.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Thomas Huth <thuth@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 for-3.1] hw/arm/sysbus-fdt: Only call match_fn callback if the type matches
Date: Thu, 8 Nov 2018 13:49:55 +0000	[thread overview]
Message-ID: <CAFEAcA_da2B6xQOF8CdZPvNb2WiBOdiUAZ+3h5-=ntNRL0EDLg@mail.gmail.com> (raw)
In-Reply-To: <20181107092721.6c01f09e@w520.home>

On 7 November 2018 at 16:27, Alex Williamson <alex.williamson@redhat.com> wrote:
> On Tue,  6 Nov 2018 19:42:12 +0100
> Eric Auger <eric.auger@redhat.com> wrote:
>
>> Commit af7d64ede0b9 (hw/arm/sysbus-fdt: Allow device matching with DT
>> compatible value) introduced a match_fn callback which gets called
>> for each registered combo to check whether a sysbus device can be
>> dynamically instantiated. However the callback gets called even if
>> the device type does not match the binding combo typename field.
>> This causes an assert when passing "-device ramfb" to the qemu
>> command line as vfio_platform_match() gets called on a non
>> vfio-platform device.
>>
>> To fix this regression, let's change the add_fdt_node() logic so
>> that we first check the type and if the match_fn callback is defined,
>> then we also call it.
>>
>> Binding combos only requesting a type check do not define the
>> match_fn callback.
>>
>> Fixes: af7d64ede0b9 (hw/arm/sysbus-fdt: Allow device matching with
>> DT compatible value)
>>
>> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>> Reported-by: Thomas Huth <thuth@redhat.com>
>
> The commit this fixes went through the vfio tree, but since the fix
> itself only lives in arm code, I'll leave it to arm maintainers to
> shepherd this fix and offer:
>
> Reviewed-by: Alex Williamson <alex.williamson@redhat.com>

Applied to target-arm.next, thanks.

-- PMM

      reply	other threads:[~2018-11-08 13:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 18:42 [Qemu-devel] [PATCH v2 for-3.1] hw/arm/sysbus-fdt: Only call match_fn callback if the type matches Eric Auger
2018-11-07  8:41 ` Geert Uytterhoeven
2018-11-07 16:27 ` Alex Williamson
2018-11-08 13:49   ` Peter Maydell [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='CAFEAcA_da2B6xQOF8CdZPvNb2WiBOdiUAZ+3h5-=ntNRL0EDLg@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=alex.williamson@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=eric.auger@redhat.com \
    --cc=geert+renesas@glider.be \
    --cc=kraxel@redhat.com \
    --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).