From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1] hvmloader, pci: Don't try to relocate memory if 64-bit BAR is bigger than 4GB
Date: Thu, 7 Jul 2016 11:27:28 -0400 [thread overview]
Message-ID: <20160707152727.GK17766@localhost.localdomain> (raw)
In-Reply-To: <577E341802000078000FC03C@prv-mh.provo.novell.com>
> > + {
> > + /* If bigger than 4GB, don't try to put under 4GB. */
> > + if ( is_64bar && bar_sz > (1ull<<32) )
>
> Clearly at the very least this should be >=. However, even when
> it's a 2Gb BAR, we won't be able to fit it (as it can't go at address
> zero, nor at address 0x80000000, both for different reasons).
<nods>
.. snip..
> > @@ -451,7 +462,10 @@ void pci_setup(void)
> > resource = &mem_resource;
> > bar_data &= ~PCI_BASE_ADDRESS_MEM_MASK;
> > }
> > - mmio_total -= bar_sz;
> > + if ( bars[i].is_64bar && bar_sz > (1ull<<32) )
>
> Now that you use this constant a second time, it clearly needs to
> become a #define.
Do you have a preference on the ull? Most of the code has ull but there
are two instances of ULL?
>
> Jan
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-07-07 15:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 18:16 [PATCH v1] hvmloader, pci: Don't try to relocate memory if 64-bit BAR is bigger than 4GB Konrad Rzeszutek Wilk
2016-07-07 8:51 ` Jan Beulich
2016-07-07 15:27 ` Konrad Rzeszutek Wilk [this message]
2016-07-07 15:53 ` Jan Beulich
2016-09-28 19:23 ` Konrad Rzeszutek Wilk
2016-09-29 6:08 ` Jan Beulich
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=20160707152727.GK17766@localhost.localdomain \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.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 NNTP newsgroup(s).