From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Stewart Hildebrand <stewart.hildebrand@amd.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH] xen/vpci: fix memory type in guest_mem_bar_read()
Date: Tue, 10 Dec 2024 17:37:36 +0100 [thread overview]
Message-ID: <Z1huUDOTgJIB8qTE@macbook.local> (raw)
In-Reply-To: <20241210162546.403882-1-stewart.hildebrand@amd.com>
On Tue, Dec 10, 2024 at 11:25:44AM -0500, Stewart Hildebrand wrote:
> Currently, if bar->type is anything other than VPCI_BAR_MEM32, the
> memory type bits get set to PCI_BASE_ADDRESS_MEM_TYPE_64 in the returned
> value. This leads to the wrong memory type for, e.g. VPCI_BAR_EMPTY.
> Only set PCI_BASE_ADDRESS_MEM_TYPE_64 when the bar type is
> VPCI_BAR_MEM64_LO.
I'm confused, VPCI_BAR_EMPTY shouldn't use guest_mem_bar_read() in the
first place, as its read handler should be vpci_read_val() instead.
Is there something I'm missing from init_header()?
if ( size == 0 )
{
bars[i].type = VPCI_BAR_EMPTY;
if ( !is_hwdom )
{
rc = vpci_add_register(pdev->vpci, vpci_read_val, NULL,
reg, 4, (void *)0);
if ( rc )
goto fail;
}
continue;
}
AFAICT guest_mem_bar_read() should only handle BAR types that are
either VPCI_BAR_MEM32, VPCI_BAR_MEM64_HI or VPCI_BAR_MEM64_LO, and
that seems to be correctly handled?
Thanks, Roger.
next prev parent reply other threads:[~2024-12-10 16:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 16:25 [PATCH] xen/vpci: fix memory type in guest_mem_bar_read() Stewart Hildebrand
2024-12-10 16:33 ` Jan Beulich
2024-12-10 16:37 ` Roger Pau Monné [this message]
2024-12-10 17:10 ` 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=Z1huUDOTgJIB8qTE@macbook.local \
--to=roger.pau@citrix.com \
--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 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.