From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: linux-kernel@vger.kernel.org, fujita.tomonori@lab.ntt.co.jp
Subject: [PATCH] swiotlb=nslabs not honored when launching xen pv guests.
Date: Wed, 1 Jun 2011 12:42:43 -0400 [thread overview]
Message-ID: <1306946564-30481-1-git-send-email-konrad.wilk@oracle.com> (raw)
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;
next reply other threads:[~2011-06-01 16:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 16:42 Konrad Rzeszutek Wilk [this message]
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
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=1306946564-30481-1-git-send-email-konrad.wilk@oracle.com \
--to=konrad.wilk@oracle.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®