From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
"fujita.tomonori@lab.ntt.co.jp" <fujita.tomonori@lab.ntt.co.jp>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"JBeulich@suse.com" <JBeulich@suse.com>
Subject: Re: [Xen-devel] [PATCH 2/5] xen/swiotlb: With more than 4GB on 64-bit, disable the native SWIOTLB.
Date: Wed, 1 Aug 2012 11:09:12 +0100 [thread overview]
Message-ID: <alpine.DEB.2.02.1208011108590.4645@kaball.uk.xensource.com> (raw)
In-Reply-To: <20120731182551.GA1559@phenom.dumpdata.com>
On Tue, 31 Jul 2012, Konrad Rzeszutek Wilk wrote:
> commit 21ef55f4ab2b6d63eb0ed86abbc959d31377853b
> Author: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Date: Fri Jul 27 20:16:00 2012 -0400
>
> xen/swiotlb: With more than 4GB on 64-bit, disable the native SWIOTLB.
>
> If a PV guest is booted the native SWIOTLB should not be
> turned on. It does not help us (we don't have any PCI devices)
> and it eats 64MB of good memory. In the case of PV guests
> with PCI devices we need the Xen-SWIOTLB one.
>
> [v1: Rewrite comment per Stefano's suggestion]
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> diff --git a/arch/x86/xen/pci-swiotlb-xen.c b/arch/x86/xen/pci-swiotlb-xen.c
> index b6a5340..1c17227 100644
> --- a/arch/x86/xen/pci-swiotlb-xen.c
> +++ b/arch/x86/xen/pci-swiotlb-xen.c
> @@ -8,6 +8,11 @@
> #include <xen/xen.h>
> #include <asm/iommu_table.h>
>
> +#ifdef CONFIG_X86_64
> +#include <asm/iommu.h>
> +#include <asm/dma.h>
> +#endif
> +
> int xen_swiotlb __read_mostly;
>
> static struct dma_map_ops xen_swiotlb_dma_ops = {
> @@ -49,6 +54,15 @@ int __init pci_xen_swiotlb_detect(void)
> * the 'swiotlb' flag is the only one turning it on. */
> swiotlb = 0;
>
> +#ifdef CONFIG_X86_64
> + /* pci_swiotlb_detect_4gb turns on native SWIOTLB if no_iommu == 0
> + * (so no iommu=X command line over-writes).
> + * Considering that PV guests do not want the *native SWIOTLB* but
> + * only Xen SWIOTLB it is not useful to us so set no_iommu=1 here.
> + */
> + if (max_pfn > MAX_DMA32_PFN)
> + no_iommu = 1;
> +#endif
> return xen_swiotlb;
> }
>
>
next prev parent reply other threads:[~2012-08-01 10:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-31 14:00 [PATCH] Xen-SWIOTLB fixes (v2) for 3.7 Konrad Rzeszutek Wilk
2012-07-31 14:00 ` [PATCH 1/5] xen/swiotlb: Simplify the logic 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
2012-07-31 18:25 ` [Xen-devel] " Konrad Rzeszutek Wilk
2012-08-01 10:09 ` Stefano Stabellini [this message]
2012-07-31 14:00 ` [PATCH 3/5] swiotlb: add the late swiotlb initialization function with iotlb memory Konrad Rzeszutek Wilk
2012-07-31 14:00 ` [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-07-31 14:00 ` [PATCH 5/5] xen/pcifront: Use Xen-SWIOTLB when initting if required 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=alpine.DEB.2.02.1208011108590.4645@kaball.uk.xensource.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®