xen-devel
[Xen-devel] Re: [PATCH 07/15] [swiotlb] In 'swiotlb_free' check iommu_sw
To: |
Chris Wright <chrisw@xxxxxxxxxxxx> |
Subject: |
[Xen-devel] Re: [PATCH 07/15] [swiotlb] In 'swiotlb_free' check iommu_sw pointer. |
From: |
Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> |
Date: |
Tue, 19 Jan 2010 12:45:26 -0500 |
Cc: |
Ian.Campbell@xxxxxxxxxxxxx, jeremy@xxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, joerg.roedel@xxxxxxx, fujita.tomonori@xxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, dwmw2@xxxxxxxxxxxxx, alex.williamson@xxxxxx |
Delivery-date: |
Tue, 19 Jan 2010 09:52:44 -0800 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<20100115020240.GG6021@xxxxxxxxxxxxxxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<1263510064-16788-1-git-send-email-konrad.wilk@xxxxxxxxxx> <1263510064-16788-2-git-send-email-konrad.wilk@xxxxxxxxxx> <1263510064-16788-3-git-send-email-konrad.wilk@xxxxxxxxxx> <1263510064-16788-4-git-send-email-konrad.wilk@xxxxxxxxxx> <1263510064-16788-5-git-send-email-konrad.wilk@xxxxxxxxxx> <1263510064-16788-6-git-send-email-konrad.wilk@xxxxxxxxxx> <1263510064-16788-7-git-send-email-konrad.wilk@xxxxxxxxxx> <1263510064-16788-8-git-send-email-konrad.wilk@xxxxxxxxxx> <20100115020240.GG6021@xxxxxxxxxxxxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Thu, Jan 14, 2010 at 06:02:40PM -0800, Chris Wright wrote:
> * Konrad Rzeszutek Wilk (konrad.wilk@xxxxxxxxxx) wrote:
> > --- a/lib/swiotlb.c
> > +++ b/lib/swiotlb.c
> > @@ -364,7 +364,7 @@ cleanup1:
> >
> > void __init swiotlb_free(void)
> > {
> > - if (!iommu_sw->overflow_buffer)
> > + if (!iommu_sw)
> > return;
> >
>
> Sure this is safe for the case where allocation failed? Wouldn't this
> do free_late_bootmem(__pa(0))?
That would indeed fail, but alloc_bootmem_low_pages (___alloc_bootmem)
panics the machine if it can't allocate the buffer. So we would never
actually get to swiotlb_free if we failed to allocate the buffers for
SWIOTLB.
But for the case where the SWIOTLB allocation happens when using
swiotlb_late_init_with_default_size, and it fails, this check
is not sufficient. I will add a check for that or just make
swiotlb_late_init_with_default_size set iommu_sw to NULL when
the allocation fails.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 10/15] [swiotlb] Replace the [phys, bus]->virt and virt->[bus, phys] functions with iommu_sw calls., (continued)
- [Xen-devel] [PATCH 10/15] [swiotlb] Replace the [phys, bus]->virt and virt->[bus, phys] functions with iommu_sw calls., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 11/15] [swiotlb] Replace late_alloc with iommu_sw->priv usage., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 12/15] [swiotlb] Remove un-used static declerations obsoleted by iommu_sw., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 13/15] [swiotlb] Make io_tlb_nslabs visible outside lib/swiotlb.c and rename it., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 14/15] [swiotlb] Move initialization (swiotlb_init) and its friends in swiotlb-default.c, Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 15/15] [swiotlb] Take advantage of iommu_sw->name and add %s to printk's., Konrad Rzeszutek Wilk
- [Xen-devel] Re: [PATCH 14/15] [swiotlb] Move initialization (swiotlb_init) and its friends in swiotlb-default.c, Chris Wright
- [Xen-devel] Re: [PATCH 14/15] [swiotlb] Move initialization (swiotlb_init) and its friends in swiotlb-default.c, Konrad Rzeszutek Wilk
- [Xen-devel] Re: [PATCH 14/15] [swiotlb] Move initialization (swiotlb_init) and its friends in swiotlb-default.c, Chris Wright
- [Xen-devel] Re: [PATCH 07/15] [swiotlb] In 'swiotlb_free' check iommu_sw pointer., Chris Wright
- [Xen-devel] Re: [PATCH 07/15] [swiotlb] In 'swiotlb_free' check iommu_sw pointer.,
Konrad Rzeszutek Wilk <=
- [Xen-devel] Re: [PATCH 07/15] [swiotlb] In 'swiotlb_free' check iommu_sw pointer., Chris Wright
- [Xen-devel] Re: [PATCH 06/15] [swiotlb] In 'swiotlb_init' take advantage of the default swiotlb_engine support., Chris Wright
- [Xen-devel] Re: [PATCH 06/15] [swiotlb] In 'swiotlb_init' take advantage of the default swiotlb_engine support., Konrad Rzeszutek Wilk
- [Xen-devel] Re: [PATCH 05/15] [swiotlb] Respect the io_tlb_nslabs argument value., Chris Wright
- [Xen-devel] Re: [PATCH 04/15] [swiotlb] Search and replace s/io_tlb/iommu_sw->/, Chris Wright
- [Xen-devel] Re: [PATCH 04/15] [swiotlb] Search and replace s/io_tlb/iommu_sw->/, Konrad Rzeszutek Wilk
- [Xen-devel] Re: [PATCH 03/15] [swiotlb] Add swiotlb_register_engine function., Chris Wright
- [Xen-devel] Re: [PATCH 03/15] [swiotlb] Add swiotlb_register_engine function., Konrad Rzeszutek Wilk
- [Xen-devel] Re: [PATCH 02/15] [swiotlb] Add swiotlb_engine structure for tracking multiple software IO TLBs., Chris Wright
- [Xen-devel] Re: [PATCH 02/15] [swiotlb] Add swiotlb_engine structure for tracking multiple software IO TLBs., Konrad Rzeszutek Wilk
|
|
|