From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@epam.com>
To: Julien Grall <julien@xen.org>,
Oleksandr Andrushchenko <andr2000@gmail.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "sstabellini@kernel.org" <sstabellini@kernel.org>,
Oleksandr Tyshchenko <Oleksandr_Tyshchenko@epam.com>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
Artem Mygaiev <Artem_Mygaiev@epam.com>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Rahul Singh <rahul.singh@arm.com>
Subject: Re: [PATCH v8 2/4] xen/arm: setup MMIO range trap handlers for hardware domain
Date: Fri, 10 Dec 2021 18:37:20 +0000 [thread overview]
Message-ID: <d58e87db-2be9-e982-b78e-64d72afb59ef@epam.com> (raw)
In-Reply-To: <78ee3d68-7901-2cfe-b0f1-76239339dc49@xen.org>
Hi, Julien!
On 10.12.21 19:52, Julien Grall wrote:
> Hi Oleksandr,
>
> On 09/12/2021 07:29, Oleksandr Andrushchenko wrote:
>> +unsigned int domain_vpci_get_num_mmio_handlers(struct domain *d)
>> +{
>> + if ( !has_vpci(d) )
>> + return 0;
>> +
>> + if ( is_hardware_domain(d) )
>> + {
>> + int ret = pci_host_iterate_bridges_and_count(d, vpci_get_num_handlers_cb);
>> +
>> + return ret < 0 ? 0 : ret;
>
> Sorry I only spotted this now. AFAICT, ret is not meant to return ret < 0 in this case. But if it were then I think it would be wrong to continue as nothing happened because the code will likely fall over/crash when registering the I/O handlers.
>
> I would document this oddity with
>
> if ( ret < 0 )
> {
> ASSERT_UNREACHABLE();
> return 0;
> }
>
> I can do the change on commit if the others are happy with it.
Yes, please, do me a favor
>
> Cheers,
>
Thank you,
Oleksandr
next prev parent reply other threads:[~2021-12-10 18:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 7:29 [PATCH v8 0/4] PCI devices passthrough on Arm, part 2 Oleksandr Andrushchenko
2021-12-09 7:29 ` [PATCH v8 1/4] xen/arm: add pci-domain for disabled devices Oleksandr Andrushchenko
2021-12-09 7:29 ` [PATCH v8 2/4] xen/arm: setup MMIO range trap handlers for hardware domain Oleksandr Andrushchenko
2021-12-09 10:18 ` Rahul Singh
2021-12-10 17:52 ` Julien Grall
2021-12-10 18:37 ` Oleksandr Andrushchenko [this message]
2021-12-15 17:36 ` Julien Grall
2021-12-09 7:29 ` [PATCH v8 3/4] xen/arm: account IO handler for emulated PCI host bridge Oleksandr Andrushchenko
2021-12-09 10:19 ` Rahul Singh
2021-12-09 7:29 ` [PATCH v8 4/4] xen/arm: do not map PCI ECAM and MMIO space to Domain-0's p2m Oleksandr Andrushchenko
2021-12-09 10:19 ` Rahul Singh
2021-12-15 17:48 ` [PATCH v8 0/4] PCI devices passthrough on Arm, part 2 Julien Grall
2021-12-15 18:00 ` Oleksandr Andrushchenko
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=d58e87db-2be9-e982-b78e-64d72afb59ef@epam.com \
--to=oleksandr_andrushchenko@epam.com \
--cc=Artem_Mygaiev@epam.com \
--cc=Oleksandr_Tyshchenko@epam.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andr2000@gmail.com \
--cc=bertrand.marquis@arm.com \
--cc=julien@xen.org \
--cc=rahul.singh@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 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.