From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com,
stefano.stabellini@eu.citrix.com
Subject: [PATCH] Xen-SWIOTLB fixes (v4) for v3.7
Date: Mon, 10 Sep 2012 15:45:57 -0400 [thread overview]
Message-ID: <1347306367-28669-1-git-send-email-konrad.wilk@oracle.com> (raw)
The original problem was:
<begin>
"if one boots a PV 64-bit guests with more than 4GB, the SWIOTLB [Xen]
gets turned on - and 64MB of precious low-memory gets used." was totally
bogus. The SWIOTLB that gets turned on is the *native* one - which does
not exhaust any low-memory of the host. But it does eat up perfectly
fine 64MB of the guest and never gets used.
So this patchset has some things I wanted to do for some time:
[PATCH 01/10] xen/swiotlb: Simplify the logic.
Just so that next time I am not confused.
[PATCH 02/10] xen/swiotlb: With more than 4GB on 64-bit, disable the
and don't turn the *native* SWIOTLB on PV guests and waste those 64MB.
<end>
The rest are exciting new patches - basically I want to emulate what
IA64 does which is to turn on the SWIOTLB late in the bootup cycle.
This means not using the alloc_bootmem and having a "late" variant
to initialize SWIOTLB. There is some surgery in the SWIOTLB library:
[PATCH 03/10] swiotlb: add the late swiotlb initialization function
to allow it to use an io_tlb passed in. Note: I hadn't tested this
on IA64 and that is something I need to do.
And then the implementation in the Xen-SWIOTLB to use it:
[PATCH 06/10] xen/swiotlb: Use the swiotlb_late_init_with_tbl to
along with Xen PCI frontend to utilize it.
[PATCH 07/10] xen/pcifront: Use Xen-SWIOTLB when initting if
The end result is that a PV guest can now dynamically(*) deal with
PCI passthrough cards. I say "dynamically" b/c if one boots a PV guest
with more than 3GB without using 'e820_hole' (or is it called 'e820_host'
now?) the PCI subsystem won't be able to squeeze the BARs as they
are RAM occupied. The workaround is to boot with 'e820_hole' or some
new work where we manipulate at boot time the E820 to leave a nice
big 1GB hole under 4G - and with all the work on the P2M tree that
should be fairly easy actually.
Note: If one uses 'iommu=soft' on the Linux command line, the Xen-SWIOTLB
still gets turned on.
next reply other threads:[~2012-09-10 19:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 19:45 Konrad Rzeszutek Wilk [this message]
2012-09-10 19:45 ` [PATCH 01/10] xen/swiotlb: Simplify the logic Konrad Rzeszutek Wilk
2012-09-10 19:45 ` [PATCH 02/10] xen/swiotlb: With more than 4GB on 64-bit, disable the native SWIOTLB Konrad Rzeszutek Wilk
2012-09-10 19:46 ` [PATCH 03/10] swiotlb: add the late swiotlb initialization function with iotlb memory Konrad Rzeszutek Wilk
2012-09-10 19:46 ` [PATCH 04/10] xen/swiotlb: Move the nr_tbl determination in its own function Konrad Rzeszutek Wilk
2012-09-14 16:08 ` Stefano Stabellini
2012-09-10 19:46 ` [PATCH 05/10] xen/swiotlb: Move the error strings to " Konrad Rzeszutek Wilk
2012-09-14 16:00 ` Stefano Stabellini
2012-09-10 19:46 ` [PATCH 06/10] xen/swiotlb: Use the swiotlb_late_init_with_tbl to init Xen-SWIOTLB late when PV PCI is used Konrad Rzeszutek Wilk
2012-09-14 16:26 ` Stefano Stabellini
2012-09-10 19:46 ` [PATCH 07/10] xen/pcifront: Use Xen-SWIOTLB when initting if required Konrad Rzeszutek Wilk
2012-09-10 19:46 ` [PATCH 08/10] xen/swiotlb: Remove functions not needed anymore Konrad Rzeszutek Wilk
2012-09-14 16:06 ` Stefano Stabellini
2012-09-14 17:06 ` Konrad Rzeszutek Wilk
2012-09-17 10:52 ` Stefano Stabellini
2012-09-10 19:46 ` [PATCH 09/10] xen/swiotlb: Fix compile warnings when using plain integer instead of NULL pointer Konrad Rzeszutek Wilk
2012-09-14 16:11 ` Stefano Stabellini
2012-09-10 19:46 ` [PATCH 10/10] xen/swiotlb: Depending on after_bootmem is not correct Konrad Rzeszutek Wilk
2012-09-14 16:10 ` Stefano Stabellini
2012-09-14 17:09 ` Konrad Rzeszutek Wilk
2012-09-17 14:23 ` Konrad Rzeszutek Wilk
2012-09-17 14:25 ` Is: [PATCH 11/10] xen/swiotlb: For early initialization, return zero on success. Was: " Konrad Rzeszutek Wilk
2012-09-17 14:53 ` Stefano Stabellini
2012-09-17 14:52 ` Stefano Stabellini
2012-09-17 17:02 ` Konrad Rzeszutek Wilk
[not found] ` <m2n.s.1TBAAE-152299@chiark.greenend.org.uk>
2012-09-13 15:53 ` [Xen-devel] [PATCH 09/10] xen/swiotlb: Fix compile warnings when using plain integer instead of NULL pointer Ian Jackson
2012-09-13 15:56 ` Ian Jackson
2012-09-13 16:00 ` Ian Jackson
2012-09-22 13:28 ` [Xen-devel] [PATCH] Xen-SWIOTLB fixes (v4) for v3.7 Konrad Rzeszutek Wilk
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=1347306367-28669-1-git-send-email-konrad.wilk@oracle.com \
--to=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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).