From: <peng.hao2@zte.com.cn>
To: eric.auger@redhat.com
Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] hw/arm/sysbus-fdt: fix assert in matchfunction
Date: Mon, 19 Nov 2018 21:10:03 +0800 (CST) [thread overview]
Message-ID: <201811192110034389139@zte.com.cn> (raw)
In-Reply-To: <5fb48e39-d91b-6750-975b-ea58575ade92@redhat.com>
>Hi Peng,
>
>On 11/17/18 8:22 PM, Peng Hao wrote:
>> In match function it should not call OBJECK_CHECK. When there is
>> a mismatch, we should continue to match rather than assert().
>
>Normally this issue should have been fixed by
>e9ac8e84f0 "hw/arm/sysbus-fdt: Only call match_fn callback if the type
>matches". Please can you confirm?
>
yes,it works after updating your patch.
Thanks.
>Thanks
>
>Eric
>>
>> Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
>> ---
>> hw/arm/sysbus-fdt.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c
>> index 0e24c80..41b962d 100644
>> --- a/hw/arm/sysbus-fdt.c
>> +++ b/hw/arm/sysbus-fdt.c
>> @@ -419,10 +419,15 @@ static int add_amd_xgbe_fdt_node(SysBusDevice *sbdev, void *opaque)
>> static bool vfio_platform_match(SysBusDevice *sbdev,
>> const BindingEntry *entry)
>> {
>> - VFIOPlatformDevice *vdev = VFIO_PLATFORM_DEVICE(sbdev);
>> + VFIOPlatformDevice *vdev;
>> const char *compat;
>> unsigned int n;
>>
>> + vdev = (VFIOPlatformDevice *) object_dynamic_cast(OBJECT(sbdev),
>> + TYPE_VFIO_PLATFORM);
>> + if (!vdev)
>> + return false;
>> +
>> for (n = vdev->num_compat, compat = vdev->compat; n > 0;
>> n--, compat += strlen(compat) + 1) {
>> if (!strcmp(entry->compat, compat)) {
>>
prev parent reply other threads:[~2018-11-19 13:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-17 19:22 [Qemu-devel] [PATCH] hw/arm/sysbus-fdt: fix assert in match function Peng Hao
2018-11-17 16:10 ` Auger Eric
2018-11-19 13:10 ` peng.hao2 [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=201811192110034389139@zte.com.cn \
--to=peng.hao2@zte.com.cn \
--cc=eric.auger@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--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).