* [PATCH] xen/arm: Return correct code error for xen_swiotlb_map_page @ 2014-11-06 17:07 Frediano Ziglio 2014-11-06 17:30 ` Stefano Stabellini 0 siblings, 1 reply; 6+ messages in thread From: Frediano Ziglio @ 2014-11-06 17:07 UTC (permalink / raw) To: Konrad Rzeszutek Wilk, Boris Ostrovsky, David Vrabel, frediano.ziglio Cc: xen-devel, linux-kernel On ARM error code is not 0 so avoid to return it as error. Signed-off-by: Frediano Ziglio <frediano.ziglio@huawei.com> --- drivers/xen/swiotlb-xen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index ebd8f21..3b8d628 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -425,7 +425,7 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, */ if (!dma_capable(dev, dev_addr, size)) { swiotlb_tbl_unmap_single(dev, map, size, dir); - dev_addr = 0; + dev_addr = DMA_ERROR_CODE; } return dev_addr; } -- 1.9.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xen/arm: Return correct code error for xen_swiotlb_map_page 2014-11-06 17:07 [PATCH] xen/arm: Return correct code error for xen_swiotlb_map_page Frediano Ziglio @ 2014-11-06 17:30 ` Stefano Stabellini [not found] ` <CAHt6W4cDvgK=jdkMot5E4COoC=3aeZn8vPxiR5K5XS53g=+FXA@mail.gmail.com> 0 siblings, 1 reply; 6+ messages in thread From: Stefano Stabellini @ 2014-11-06 17:30 UTC (permalink / raw) To: Frediano Ziglio Cc: Konrad Rzeszutek Wilk, Boris Ostrovsky, David Vrabel, xen-devel, linux-kernel On Thu, 6 Nov 2014, Frediano Ziglio wrote: > On ARM error code is not 0 so avoid to return it as error. > > Signed-off-by: Frediano Ziglio <frediano.ziglio@huawei.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Could you please fix the same error in lib/swiotlb.c too please? > drivers/xen/swiotlb-xen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c > index ebd8f21..3b8d628 100644 > --- a/drivers/xen/swiotlb-xen.c > +++ b/drivers/xen/swiotlb-xen.c > @@ -425,7 +425,7 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, > */ > if (!dma_capable(dev, dev_addr, size)) { > swiotlb_tbl_unmap_single(dev, map, size, dir); > - dev_addr = 0; > + dev_addr = DMA_ERROR_CODE; > } > return dev_addr; > } > -- > 1.9.1 > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://secure-web.cisco.com/1cvjROyUxV6SnA0uBTMRubqrQWsaXGhps-FWjY3vly9AxaKKlt2DPY7GjL0FCHeP4rsbjKsc-P4zH2_7-kpcxwEH-udGrGCCqkCLlH1-fLOo1X6Nlui6EwEVHUpB2r7gt-Gsgxbep9QWPnIdypDPNf8Hf5clxCMXYcvWsOK5s3qg/http%3A%2F%2Fwww.tux.org%2Flkml%2F > ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CAHt6W4cDvgK=jdkMot5E4COoC=3aeZn8vPxiR5K5XS53g=+FXA@mail.gmail.com>]
* Re: [Xen-devel] [PATCH] xen/arm: Return correct code error for xen_swiotlb_map_page [not found] ` <CAHt6W4cDvgK=jdkMot5E4COoC=3aeZn8vPxiR5K5XS53g=+FXA@mail.gmail.com> @ 2014-11-06 19:14 ` Stefano Stabellini 2014-11-07 9:56 ` Frediano Ziglio 2014-11-07 14:45 ` Konrad Rzeszutek Wilk 0 siblings, 2 replies; 6+ messages in thread From: Stefano Stabellini @ 2014-11-06 19:14 UTC (permalink / raw) To: Frediano Ziglio Cc: Stefano Stabellini, Frediano Ziglio, xen-devel, Boris Ostrovsky, David Vrabel, linux-kernel [-- Attachment #1: Type: text/plain, Size: 2087 bytes --] On Thu, 6 Nov 2014, Frediano Ziglio wrote: > 2014-11-06 17:30 GMT+00:00 Stefano Stabellini <stefano.stabellini@eu.citrix.com>: > On Thu, 6 Nov 2014, Frediano Ziglio wrote: > > On ARM error code is not 0 so avoid to return it as error. > > > > Signed-off-by: Frediano Ziglio <frediano.ziglio@huawei.com> > > Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > > > Could you please fix the same error in lib/swiotlb.c too please? > > > Same patch or another ? > Another > > > drivers/xen/swiotlb-xen.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c > > index ebd8f21..3b8d628 100644 > > --- a/drivers/xen/swiotlb-xen.c > > +++ b/drivers/xen/swiotlb-xen.c > > @@ -425,7 +425,7 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, > > */ > > if (!dma_capable(dev, dev_addr, size)) { > > swiotlb_tbl_unmap_single(dev, map, size, dir); > > - dev_addr = 0; > > + dev_addr = DMA_ERROR_CODE; > > } > > return dev_addr; > > } > > -- > > 1.9.1 > > > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > Please read the FAQ at http://secure-web.cisco.com/1cvjROyUxV6SnA0uBTMRubqrQWsaXGhps-FWjY3vly9AxaKKlt2DPY7GjL0FCHeP4rsbjKsc-P4zH2_7-kpcxwEH-udGrGCCq > kCLlH1-fLOo1X6Nlui6EwEVHUpB2r7gt-Gsgxbep9QWPnIdypDPNf8Hf5clxCMXYcvWsOK5s3qg/http%3A%2F%2Fwww.tux.org%2Flkml%2F > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel > > > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [Xen-devel] [PATCH] xen/arm: Return correct code error for xen_swiotlb_map_page 2014-11-06 19:14 ` [Xen-devel] " Stefano Stabellini @ 2014-11-07 9:56 ` Frediano Ziglio 2014-11-07 14:45 ` Konrad Rzeszutek Wilk 1 sibling, 0 replies; 6+ messages in thread From: Frediano Ziglio @ 2014-11-07 9:56 UTC (permalink / raw) To: Stefano Stabellini, Frediano Ziglio Cc: xen-devel, Boris Ostrovsky, David Vrabel, linux-kernel [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2530 bytes --] > On Thu, 6 Nov 2014, Frediano Ziglio wrote: > > 2014-11-06 17:30 GMT+00:00 Stefano Stabellini > <stefano.stabellini@eu.citrix.com>: > > On Thu, 6 Nov 2014, Frediano Ziglio wrote: > > > On ARM error code is not 0 so avoid to return it as error. > > > > > > Signed-off-by: Frediano Ziglio <frediano.ziglio@huawei.com> > > > > Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > > > > > > Could you please fix the same error in lib/swiotlb.c too please? > > > > > > Same patch or another ? > > > > Another > lib/swiotlb.c is not affected at a physical address to io_tlb_overflow_buffer is returned in case of error. Looks like a way to transform silently an allocation error to a more serious memory corruption. Frediano > > > > > drivers/xen/swiotlb-xen.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb- > xen.c > > > index ebd8f21..3b8d628 100644 > > > --- a/drivers/xen/swiotlb-xen.c > > > +++ b/drivers/xen/swiotlb-xen.c > > > @@ -425,7 +425,7 @@ dma_addr_t xen_swiotlb_map_page(struct > device *dev, struct page *page, > > >    */ > > >    if (!dma_capable(dev, dev_addr, size)) { > > >        swiotlb_tbl_unmap_single(dev, map, size, dir); > > > -       dev_addr = 0; > > > +       dev_addr = DMA_ERROR_CODE; > > >    } > > >    return dev_addr; > > > } > > > -- > > > 1.9.1 > > > > > > > > > -- > > > To unsubscribe from this list: send the line "unsubscribe > linux-kernel" in > > > the body of a message to majordomo@vger.kernel.org > > > More majordomo info at http://vger.kernel.org/majordomo- > info.html > > > Please read the FAQ at http://secure- > web.cisco.com/1cvjROyUxV6SnA0uBTMRubqrQWsaXGhps- > FWjY3vly9AxaKKlt2DPY7GjL0FCHeP4rsbjKsc-P4zH2_7-kpcxwEH-udGrGCCq > > kCLlH1-fLOo1X6Nlui6EwEVHUpB2r7gt- > Gsgxbep9QWPnIdypDPNf8Hf5clxCMXYcvWsOK5s3qg/http%3A%2F%2Fwww.tux.org%2Fl > kml%2F > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel > > > > > > > > ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xen-devel] [PATCH] xen/arm: Return correct code error for xen_swiotlb_map_page 2014-11-06 19:14 ` [Xen-devel] " Stefano Stabellini 2014-11-07 9:56 ` Frediano Ziglio @ 2014-11-07 14:45 ` Konrad Rzeszutek Wilk 2014-11-10 9:27 ` Frediano Ziglio 1 sibling, 1 reply; 6+ messages in thread From: Konrad Rzeszutek Wilk @ 2014-11-07 14:45 UTC (permalink / raw) To: Stefano Stabellini Cc: Frediano Ziglio, linux-kernel, Frediano Ziglio, David Vrabel, xen-devel, Boris Ostrovsky On Thu, Nov 06, 2014 at 07:14:51PM +0000, Stefano Stabellini wrote: > On Thu, 6 Nov 2014, Frediano Ziglio wrote: > > 2014-11-06 17:30 GMT+00:00 Stefano Stabellini <stefano.stabellini@eu.citrix.com>: > > On Thu, 6 Nov 2014, Frediano Ziglio wrote: > > > On ARM error code is not 0 so avoid to return it as error. > > > > > > Signed-off-by: Frediano Ziglio <frediano.ziglio@huawei.com> > > > > Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> > > > > > > Could you please fix the same error in lib/swiotlb.c too please? > > > > > > Same patch or another ? > > > > Another It might break the build. Please double-check that it does not affect ia64. > > > > > > drivers/xen/swiotlb-xen.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c > > > index ebd8f21..3b8d628 100644 > > > --- a/drivers/xen/swiotlb-xen.c > > > +++ b/drivers/xen/swiotlb-xen.c > > > @@ -425,7 +425,7 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, > > > */ > > > if (!dma_capable(dev, dev_addr, size)) { > > > swiotlb_tbl_unmap_single(dev, map, size, dir); > > > - dev_addr = 0; > > > + dev_addr = DMA_ERROR_CODE; That looks Ok to me. > > > } > > > return dev_addr; > > > } > > > -- > > > 1.9.1 > > > > > > > > > -- > > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > > > the body of a message to majordomo@vger.kernel.org > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > Please read the FAQ at http://secure-web.cisco.com/1cvjROyUxV6SnA0uBTMRubqrQWsaXGhps-FWjY3vly9AxaKKlt2DPY7GjL0FCHeP4rsbjKsc-P4zH2_7-kpcxwEH-udGrGCCq > > kCLlH1-fLOo1X6Nlui6EwEVHUpB2r7gt-Gsgxbep9QWPnIdypDPNf8Hf5clxCMXYcvWsOK5s3qg/http%3A%2F%2Fwww.tux.org%2Flkml%2F > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel > > > > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [Xen-devel] [PATCH] xen/arm: Return correct code error for xen_swiotlb_map_page 2014-11-07 14:45 ` Konrad Rzeszutek Wilk @ 2014-11-10 9:27 ` Frediano Ziglio 0 siblings, 0 replies; 6+ messages in thread From: Frediano Ziglio @ 2014-11-10 9:27 UTC (permalink / raw) To: Konrad Rzeszutek Wilk, Stefano Stabellini Cc: Frediano Ziglio, linux-kernel, David Vrabel, xen-devel, Boris Ostrovsky > On Thu, Nov 06, 2014 at 07:14:51PM +0000, Stefano Stabellini wrote: > > On Thu, 6 Nov 2014, Frediano Ziglio wrote: > > > 2014-11-06 17:30 GMT+00:00 Stefano Stabellini > <stefano.stabellini@eu.citrix.com>: > > > On Thu, 6 Nov 2014, Frediano Ziglio wrote: > > > > On ARM error code is not 0 so avoid to return it as error. > > > > > > > > Signed-off-by: Frediano Ziglio <frediano.ziglio@huawei.com> > > > > > > Acked-by: Stefano Stabellini > > > <stefano.stabellini@eu.citrix.com> > > > > > > > > > Could you please fix the same error in lib/swiotlb.c too > please? > > > > > > > > > Same patch or another ? > > > > > > > Another > > It might break the build. Please double-check that it does not affect > ia64. > > Code in lin/swiotlb.c does not require any changes as the error value is completely different here (is the pa address of a static allocated buffer). On ia64 the constant I used in my previous patch is 0 so it produce the same assembly code. Frediano > > > > > > > drivers/xen/swiotlb-xen.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/xen/swiotlb-xen.c > b/drivers/xen/swiotlb-xen.c > > > > index ebd8f21..3b8d628 100644 > > > > --- a/drivers/xen/swiotlb-xen.c > > > > +++ b/drivers/xen/swiotlb-xen.c > > > > @@ -425,7 +425,7 @@ dma_addr_t xen_swiotlb_map_page(struct > device *dev, struct page *page, > > > > */ > > > > if (!dma_capable(dev, dev_addr, size)) { > > > > swiotlb_tbl_unmap_single(dev, map, size, dir); > > > > - dev_addr = 0; > > > > + dev_addr = DMA_ERROR_CODE; > > That looks Ok to me. > > > > > } > > > > return dev_addr; > > > > } > > > > -- > > > > 1.9.1 > > > > > > > > > > > > -- > > > > To unsubscribe from this list: send the line "unsubscribe > linux-kernel" in > > > > the body of a message to majordomo@vger.kernel.org > > > > More majordomo info at http://vger.kernel.org/majordomo- > info.html > > > > Please read the FAQ at http://secure- > web.cisco.com/1cvjROyUxV6SnA0uBTMRubqrQWsaXGhps- > FWjY3vly9AxaKKlt2DPY7GjL0FCHeP4rsbjKsc-P4zH2_7-kpcxwEH-udGrGCCq > > > kCLlH1-fLOo1X6Nlui6EwEVHUpB2r7gt- > Gsgxbep9QWPnIdypDPNf8Hf5clxCMXYcvWsOK5s3qg/http%3A%2F%2Fwww.tux.org%2Fl > kml%2F > > > > > > > > > > _______________________________________________ > > > Xen-devel mailing list > > > Xen-devel@lists.xen.org > > > http://lists.xen.org/xen-devel > > > > > > > > > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-10 9:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-06 17:07 [PATCH] xen/arm: Return correct code error for xen_swiotlb_map_page Frediano Ziglio
2014-11-06 17:30 ` Stefano Stabellini
[not found] ` <CAHt6W4cDvgK=jdkMot5E4COoC=3aeZn8vPxiR5K5XS53g=+FXA@mail.gmail.com>
2014-11-06 19:14 ` [Xen-devel] " Stefano Stabellini
2014-11-07 9:56 ` Frediano Ziglio
2014-11-07 14:45 ` Konrad Rzeszutek Wilk
2014-11-10 9:27 ` Frediano Ziglio
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®