From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Keir Fraser <keir@xen.org>,
Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH] ns16550: limit mapped MMIO size
Date: Mon, 16 Nov 2015 16:52:11 +0000 [thread overview]
Message-ID: <1447692731.27871.116.camel@citrix.com> (raw)
In-Reply-To: <5644C3E002000078000B4594@prv-mh.provo.novell.com>
On Thu, 2015-11-12 at 08:52 -0700, Jan Beulich wrote:
> There's no point in mapping more than the memory we actually may need
> to touch, and in fact the too large region could actually extend into
> another device's one (which currently is benign on x86 since only a
> single page gets mapped anyway, but which is a latent bug on ARM
> whenever PCI support gets enabled there).
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -931,6 +931,8 @@ pci_uart_config (struct ns16550 *uart, i
> uart->io_base += bar_idx *
> uart_param[p].uart_offset;
> if ( uart_param[p].base_baud )
> uart->clock_hz = uart_param[p].base_baud *
> 16;
> + size = max(8U << uart_param[p].reg_shift,
> + uart_param[p].uart_offset);
I assume 8 bytes (suitably shifted as above) corresponds to the "need to
touch" set of registers, but I can't fathom the link to uart_offset, rather
than uart_offset + those 8 bytes or something like that.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-11-16 16:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 15:52 [PATCH] ns16550: limit mapped MMIO size Jan Beulich
2015-11-12 17:04 ` Andrew Cooper
2015-11-16 16:52 ` Ian Campbell [this message]
2015-11-17 10:19 ` Jan Beulich
2015-11-17 10:32 ` Ian Campbell
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=1447692731.27871.116.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--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.