linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Xen-SWIOTLB fies (v3) for v3.7.
@ 2012-08-16 15:54 Konrad Rzeszutek Wilk
  2012-08-16 15:54 ` [PATCH 1/5] xen/swiotlb: Simplify the logic Konrad Rzeszutek Wilk
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-08-16 15:54 UTC (permalink / raw)
  To: linux-kernel, xen-devel

Since changeset: v2: https://lkml.org/lkml/2012/7/31/337
 - fixed smatch warnings (add __ref and appropiate header files.

Besides that it is exactly like the one I posted in July except
it has been tested more extensively.


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH] Xen-SWIOTLB fixes (v2) for 3.7
@ 2012-07-31 14:00 Konrad Rzeszutek Wilk
  2012-07-31 14:00 ` [PATCH 2/5] xen/swiotlb: With more than 4GB on 64-bit, disable the native SWIOTLB Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 12+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-07-31 14:00 UTC (permalink / raw)
  To: fujita.tomonori, xen-devel, linux-kernel, stefano.stabellini, JBeulich

The original problem I mentioned in the above mentioned URL:
"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 1/5] xen/swiotlb: Simplify the logic.

Just so that next time I am not confused.
 [PATCH 2/5] 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.

Here are the 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 3/5] 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 4/5] xen/swiotlb: Use the swiotlb_late_init_with_tbl to init
along with Xen PCI frontend to utilize it.
 [PATCH 5/5] xen/pcifront: Use Xen-SWIOTLB when initting if required.

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.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-08-23 19:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-16 15:54 [PATCH] Xen-SWIOTLB fies (v3) for v3.7 Konrad Rzeszutek Wilk
2012-08-16 15:54 ` [PATCH 1/5] xen/swiotlb: Simplify the logic Konrad Rzeszutek Wilk
2012-08-17 17:08   ` [Xen-devel] " Stefano Stabellini
2012-08-16 15:54 ` [PATCH 2/5] xen/swiotlb: With more than 4GB on 64-bit, disable the native SWIOTLB Konrad Rzeszutek Wilk
2012-08-16 15:54 ` [PATCH 3/5] swiotlb: add the late swiotlb initialization function with iotlb memory Konrad Rzeszutek Wilk
2012-08-16 15:54 ` [PATCH 4/5] xen/swiotlb: Use the swiotlb_late_init_with_tbl to init Xen-SWIOTLB late when PV PCI is used Konrad Rzeszutek Wilk
2012-08-17 17:25   ` [Xen-devel] " Stefano Stabellini
2012-08-23 19:30     ` Konrad Rzeszutek Wilk
2012-08-16 15:54 ` [PATCH 5/5] xen/pcifront: Use Xen-SWIOTLB when initting if required Konrad Rzeszutek Wilk
2012-08-17 17:14   ` [Xen-devel] " Stefano Stabellini
  -- strict thread matches above, loose matches on Subject: below --
2012-07-31 14:00 [PATCH] Xen-SWIOTLB fixes (v2) for 3.7 Konrad Rzeszutek Wilk
2012-07-31 14:00 ` [PATCH 2/5] xen/swiotlb: With more than 4GB on 64-bit, disable the native SWIOTLB Konrad Rzeszutek Wilk
2012-07-31 14:46   ` Stefano Stabellini

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).