From: Jan Beulich <jbeulich@suse.com>
To: Stewart Hildebrand <stewart.hildebrand@amd.com>
Cc: Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Michal Orzel <michal.orzel@amd.com>,
Julien Grall <julien@xen.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v14 5/5] arm/vpci: honor access size when returning an error
Date: Wed, 15 May 2024 08:32:27 +0200 [thread overview]
Message-ID: <20335f55-4b16-45e5-a8aa-868006b57ca5@suse.com> (raw)
In-Reply-To: <735c3e3c-d70a-40f5-aca7-f134bc5b98b1@amd.com>
On 14.05.2024 22:31, Stewart Hildebrand wrote:
> Here's what the patch ("arm/vpci: honor access size when returning an
> error") now looks like based on staging:
>
> diff --git a/xen/arch/arm/vpci.c b/xen/arch/arm/vpci.c
> index 3bc4bb55082a..31e9e1d20751 100644
> --- a/xen/arch/arm/vpci.c
> +++ b/xen/arch/arm/vpci.c
> @@ -29,6 +29,8 @@ static int vpci_mmio_read(struct vcpu *v, mmio_info_t *info,
> {
> struct pci_host_bridge *bridge = p;
> pci_sbdf_t sbdf = vpci_sbdf_from_gpa(bridge, info->gpa);
> + const uint8_t access_size = (1U << info->dabt.size) * 8;
And why exactly uint8_t here, rather than unsigned int? See ./CODING_STYLE.
> + const uint64_t invalid = GENMASK_ULL(access_size - 1, 0);
I'm not entirely convinced of uint64_t here either, but I'd view this as
more borderline than the uint8_t above. As per ...
> @@ -39,7 +41,7 @@ static int vpci_mmio_read(struct vcpu *v, mmio_info_t *info,
> return 1;
> }
>
> - *r = ~0ul;
> + *r = invalid;
... the original rhs here, unsigned long (or perhaps register_t) would seem
more appropriate, but I have no idea whether on Arm32 info->dabt.size can
end up being 3.
Jan
next prev parent reply other threads:[~2024-05-15 6:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-14 14:33 [PATCH v14 0/5] PCI devices passthrough on Arm, part 3 Stewart Hildebrand
2024-05-14 14:33 ` [PATCH v14 1/5] vpci/header: emulate PCI_COMMAND register for guests Stewart Hildebrand
2024-05-16 9:11 ` Jan Beulich
2024-05-14 14:33 ` [PATCH v14 2/5] vpci: add initial support for virtual PCI bus topology Stewart Hildebrand
2024-05-16 9:23 ` Jan Beulich
2024-05-14 14:33 ` [PATCH v14 3/5] xen/arm: translate virtual PCI bus topology for guests Stewart Hildebrand
2024-05-14 14:33 ` [PATCH v14 4/5] xen/arm: account IO handlers for emulated PCI MSI-X Stewart Hildebrand
2024-05-14 14:33 ` [PATCH v14 5/5] arm/vpci: honor access size when returning an error Stewart Hildebrand
2024-05-14 17:48 ` Julien Grall
2024-05-14 20:31 ` Stewart Hildebrand
2024-05-15 6:32 ` Jan Beulich [this message]
2024-05-15 15:23 ` Stewart Hildebrand
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=20335f55-4b16-45e5-a8aa-868006b57ca5@suse.com \
--to=jbeulich@suse.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=sstabellini@kernel.org \
--cc=stewart.hildebrand@amd.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).