xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Anisov <andrii.anisov@gmail.com>
To: Peng Fan <peng.fan@nxp.com>
Cc: van.freenix@gmail.com, Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	wei.liu2@citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH V4] xen/arm: domain_build: allocate lowmem for dom0 as much as possible
Date: Fri, 11 Nov 2016 13:35:27 +0200	[thread overview]
Message-ID: <CAC1Wxdi684-FMQ-18aB7WKT2N4aed+Bw1=PO2sJDGEV+RjoO_Q@mail.gmail.com> (raw)
In-Reply-To: <1474599334-30709-1-git-send-email-peng.fan@nxp.com>


[-- Attachment #1.1: Type: text/plain, Size: 1970 bytes --]

Sorry for the late intrusion into this discussion. I would introduce my
vision of the issues behind the 32 bits addressing DMA controllers in
ARMv7/v8 SoCs.

On AArch64 SoCs, some IPs may only have the capability to access
> 32 bits address space. The physical memory assigned for Dom0 maybe
> not in 4GB address space, then the IPs will not work properly.
> So need to allocate memory under 4GB for Dom0.
>
IMHO that is a wrong approach. Unfortunately the problem is much bigger.
Normally you would need to run guest domains as well. With at least PV
Block and PV NET drivers. Due to the fact that PV drivers made in a way
that DMA controller at last will work with DomU's pages, those pages should
be from below 4GB.
So any DomU running PV drivers should have some amount of pages from below
4GB. Moreover, the OS running in DomU should be knowing that only those
pages are DMA-able, and that PV drivers should be working with DMA-able
pages only: I.e. pages should be mapped correspondingly into different
banks under and over 4GB.

The approach, I believe is more suitable, is to specify explicitly an
amount of RAM below 4GB and above 4GB for any domain. For dom0 through xen
command line, for domU through domain configuration file.

Such approach was implemented by GL. You can find preliminary patches over
here: https://lists.xen.org/archives/html/xen-devel/2016-05/msg01785.html
https://lists.xen.org/archives/html/xen-devel/2016-05/msg01786.html .
I really hope GL will decide to tailor and upstream the feature.

I am undecided whether this should be considered as a bug fix for Xen 4.8.
> Are you aware of any ARM64 platform we currently support requiring
> allocation of memory below 4GB?

That is not only ARM64 problem. Any ARMv7/v8 based platform having no IOMMU
supported (or owned) by XEN with 32-bit DMA controllers and RAM over 4GB
will suffer from this problem. From living products: new J6 EVM with 4GB
RAM, Salvator-X.

Sincerely,
Andrii Anisov.

[-- Attachment #1.2: Type: text/html, Size: 2814 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-11-11 11:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-23  2:55 [PATCH V4] xen/arm: domain_build: allocate lowmem for dom0 as much as possible Peng Fan
2016-10-08  2:25 ` Peng Fan
2016-11-01 14:42 ` Julien Grall
2016-11-01 18:12   ` Stefano Stabellini
2016-11-10  8:30   ` Peng Fan
2016-11-10 13:01     ` Julien Grall
2016-11-11  1:10       ` Peng Fan
2016-11-11  1:41       ` Wei Liu
2016-11-11 11:35 ` Andrii Anisov [this message]
2016-11-11 11:59   ` Julien Grall
2016-11-11 14:24     ` Andrii Anisov
2016-11-11 14:39       ` Andrii Anisov
2016-11-11 16:02       ` Julien Grall
2016-11-11 19:27         ` Stefano Stabellini
2016-11-14  8:54           ` Andrii Anisov
2016-11-14  9:11           ` Andrii Anisov
2016-11-14 20:30             ` Julien Grall
2016-11-16 14:49               ` Andrii Anisov
2016-11-14  9:25         ` Andrii Anisov
2016-11-14  9:43         ` Andrii Anisov
2016-11-14 23:28           ` Stefano Stabellini
2016-11-16 15:28             ` Andrii Anisov
2016-11-17 17:21               ` Stefano Stabellini
2016-11-18 18:00                 ` Stefano Stabellini
2016-11-21 11:04                 ` Andrii Anisov
2016-11-21 17:52                   ` Stefano Stabellini
2016-11-11 19:25       ` Stefano Stabellini

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='CAC1Wxdi684-FMQ-18aB7WKT2N4aed+Bw1=PO2sJDGEV+RjoO_Q@mail.gmail.com' \
    --to=andrii.anisov@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=peng.fan@nxp.com \
    --cc=sstabellini@kernel.org \
    --cc=van.freenix@gmail.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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).