public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] swiotlb=nslabs not honored when launching xen pv guests.
@ 2011-06-01 16:42 Konrad Rzeszutek Wilk
  2011-06-01 16:42 ` [PATCH] swiotlb: Export io_tlb_nslabs as swiotlb_nslabs and use it Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 4+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-06-01 16:42 UTC (permalink / raw)
  To: linux-kernel, fujita.tomonori

Hey Tomo-san,

I ran into an issue where the 'swiotlb' argument was being ignored when
launching a PV guest. Please see the patch - it has a nice explanation
in the description of the patch.

Not sure if this is the best way of fixing it. The other way of fixing
this would be to change swiotlb_init_with_tbl to sample the 'io_tlb_nslabs'
and if the io_tlb_nslabs is set use that instead of the passed in value?
But that looks a bit sneaky..

Something like this (not tested, nor compiled)?

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 93ca08b..3cfad6e 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -136,9 +136,11 @@ void __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose)
 {
 	unsigned long i, bytes;
 
+	if (io_tlb_nslabs)
+		nslabs = io_tlb_nslabs;
+
 	bytes = nslabs << IO_TLB_SHIFT;
 
-	io_tlb_nslabs = nslabs;
 	io_tlb_start = tlb;
 	io_tlb_end = io_tlb_start + bytes;
 


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

end of thread, other threads:[~2011-06-06 13:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-01 16:42 [PATCH] swiotlb=nslabs not honored when launching xen pv guests Konrad Rzeszutek Wilk
2011-06-01 16:42 ` [PATCH] swiotlb: Export io_tlb_nslabs as swiotlb_nslabs and use it Konrad Rzeszutek Wilk
2011-06-05  2:47   ` FUJITA Tomonori
2011-06-06 13:56     ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox