From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: julien@xen.org, sstabellini@kernel.org,
oleksandr_tyshchenko@epam.com, volodymyr_babchuk@epam.com,
artem_mygaiev@epam.com, bertrand.marquis@arm.com,
rahul.singh@arm.com,
Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
Julien Grall <jgrall@amazon.com>
Subject: [PATCH v8 3/4] xen/arm: account IO handler for emulated PCI host bridge
Date: Thu, 9 Dec 2021 09:29:17 +0200 [thread overview]
Message-ID: <20211209072918.460902-4-andr2000@gmail.com> (raw)
In-Reply-To: <20211209072918.460902-1-andr2000@gmail.com>
From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
At the moment, we always allocate an extra 16 slots for IO handlers
(see MAX_IO_HANDLER). So while adding an IO trap handler for the emulated
PCI host bridge we are not breaking anything, but we have a latent bug
as the maximum number of IOs may be exceeded.
Fix this by explicitly telling that we have an additional IO handler, so it is
accounted.
Fixes: d59168dc05a5 ("xen/arm: Enable the existing x86 virtual PCI support for ARM")
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Acked-by: Julien Grall <jgrall@amazon.com>
---
Since v7:
- updated comment
New in v7
---
xen/arch/arm/vpci.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/xen/arch/arm/vpci.c b/xen/arch/arm/vpci.c
index 1564448c6c8d..84aaaaebd69d 100644
--- a/xen/arch/arm/vpci.c
+++ b/xen/arch/arm/vpci.c
@@ -124,7 +124,11 @@ unsigned int domain_vpci_get_num_mmio_handlers(struct domain *d)
return ret < 0 ? 0 : ret;
}
- return 0;
+ /*
+ * For guests each host bridge requires one region to cover the
+ * configuration space. At the moment, we only expose a single host bridge.
+ */
+ return 1;
}
/*
--
2.25.1
next prev parent reply other threads:[~2021-12-09 7:29 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
2021-12-15 17:36 ` Julien Grall
2021-12-09 7:29 ` Oleksandr Andrushchenko [this message]
2021-12-09 10:19 ` [PATCH v8 3/4] xen/arm: account IO handler for emulated PCI host bridge 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=20211209072918.460902-4-andr2000@gmail.com \
--to=andr2000@gmail.com \
--cc=artem_mygaiev@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=jgrall@amazon.com \
--cc=julien@xen.org \
--cc=oleksandr_andrushchenko@epam.com \
--cc=oleksandr_tyshchenko@epam.com \
--cc=rahul.singh@arm.com \
--cc=sstabellini@kernel.org \
--cc=volodymyr_babchuk@epam.com \
--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.