From: "Michael S. Tsirkin" <mst@redhat.com>
To: Knut Omang <knut.omang@oracle.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pcie: Fix bug in pcie_ext_cap_set_next
Date: Tue, 25 Dec 2012 14:18:20 +0200 [thread overview]
Message-ID: <20121225121820.GB12528@redhat.com> (raw)
In-Reply-To: <1355866589.8438.6.camel@ori.omang.mine.nu>
On Tue, Dec 18, 2012 at 10:36:29PM +0100, Knut Omang wrote:
> Upper 16 bits of the PCIe Extended Capability Header was truncated during update,
> also breaking pcie_add_capability.
>
> Signed-off-by: Knut Omang <knut.omang@oracle.com>
Applied, thanks.
> ---
> hw/pcie.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/pcie.c b/hw/pcie.c
> index 7c92f19..fa260af 100644
> --- a/hw/pcie.c
> +++ b/hw/pcie.c
> @@ -494,7 +494,7 @@ uint16_t pcie_find_capability(PCIDevice *dev, uint16_t cap_id)
>
> static void pcie_ext_cap_set_next(PCIDevice *dev, uint16_t pos, uint16_t next)
> {
> - uint16_t header = pci_get_long(dev->config + pos);
> + uint32_t header = pci_get_long(dev->config + pos);
> assert(!(next & (PCI_EXT_CAP_ALIGN - 1)));
> header = (header & ~PCI_EXT_CAP_NEXT_MASK) |
> ((next << PCI_EXT_CAP_NEXT_SHIFT) & PCI_EXT_CAP_NEXT_MASK);
> --
> 1.7.11.7
>
prev parent reply other threads:[~2012-12-25 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 21:36 [Qemu-devel] [PATCH] pcie: Fix bug in pcie_ext_cap_set_next Knut Omang
2012-12-25 12:18 ` Michael S. Tsirkin [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=20121225121820.GB12528@redhat.com \
--to=mst@redhat.com \
--cc=knut.omang@oracle.com \
--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).