Re: [PATCH v2] hvc/xen: lock console list traversal

2022-11-30 Thread Stefano Stabellini
re switch from using list_for_each_entry_safe to > list_for_each_entry: the current entry cursor won't be removed as > part of the code in the loop body, so using the _safe variant is > pointless. > > Fixes: 02e19f9c7cac ('hvc_xen: implement multiconsole support') > Signed-off-by: Roger Pau Monn

Re: [PATCH v2] hvc/xen: prevent concurrent accesses to the shared ring

2022-11-30 Thread Stefano Stabellini
On Wed, 30 Nov 2022, Roger Pau Monne wrote: > The hvc machinery registers both a console and a tty device based on > the hv ops provided by the specific implementation. Those two > interfaces however have different locks, and there's no single locks > that's shared between the tty and the console

Re: [PATCH] hvc/xen: lock console list traversal

2022-11-29 Thread Stefano Stabellini
On Tue, 29 Nov 2022, Roger Pau Monne wrote: > The currently lockless access to the xen console list in > vtermno_to_xencons() is incorrect, as additions and removals from the > list can happen anytime, and as such the traversal of the list to get > the private console data for a given termno needs

Re: [PATCH] hvc/xen: prevent concurrent accesses to the shared ring

2022-11-29 Thread Stefano Stabellini
On Tue, 29 Nov 2022, Roger Pau Monne wrote: > The hvc machinery registers both a console and a tty device based on > the hv ops provided by the specific implementation. Those two > interfaces however have different locks, and there's no single locks > that's shared between the tty and the console

Re: [PATCH] xen: replace xen_remap() with memremap()

2022-05-31 Thread Stefano Stabellini
th memremap() specifying the MEMREMAP_WB caching mode. > > xen_unmap() can be replaced with memunmap(). > > Reported-by: kernel test robot > Signed-off-by: Juergen Gross Acked-by: Stefano Stabellini > --- > arch/x86/include/asm/xen/page.h | 3 --- > drivers/t

Re: [PATCH 13/15] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-14 Thread Stefano Stabellini
ristoph Hellwig For arch/arm/xen and drivers/xen/swiotlb-xen.c Reviewed-by: Stefano Stabellini

Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-04 Thread Stefano Stabellini
On Fri, 4 Mar 2022, Christoph Hellwig wrote: > On Thu, Mar 03, 2022 at 02:49:29PM -0800, Stefano Stabellini wrote: > > On Thu, 3 Mar 2022, Christoph Hellwig wrote: > > > On Wed, Mar 02, 2022 at 05:25:10PM -0800, Stefano Stabellini wrote: > > > > Thinking more abo

Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-03 Thread Stefano Stabellini
On Thu, 3 Mar 2022, Christoph Hellwig wrote: > On Wed, Mar 02, 2022 at 05:25:10PM -0800, Stefano Stabellini wrote: > > Thinking more about it we actually need to drop the xen_initial_domain() > > check otherwise some cases won't be functional (Dom0 not 1:1 mapped, or > > DomU

Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-02 Thread Stefano Stabellini
On Wed, 2 Mar 2022, Christoph Hellwig wrote: > On Tue, Mar 01, 2022 at 06:55:47PM -0800, Stefano Stabellini wrote: > > Unrelated to this specific patch series: now that I think about it, if > > io_tlb_default_mem.nslabs is already allocated by the time xen_mm_init > > i

Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-01 Thread Stefano Stabellini
rn 0; > > - rc = xen_swiotlb_init(); > /* we can work with the default swiotlb */ > - if (rc < 0 && rc != -EEXIST) > - return rc; > + if (!io_tlb_default_mem.nslabs) { > + if (!xen_initial_domain()) > + return -EINVAL; I don't thi

Re: [PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-14 Thread Stefano Stabellini
On Tue, 14 Sep 2021, Christoph Hellwig wrote: > On Tue, Sep 14, 2021 at 05:29:07PM +0200, Jan Beulich wrote: > > I'm not convinced the swiotlb use describe there falls under "intended > > use" - mapping a 1280x720 framebuffer in a single chunk? (As an aside, > > the bottom of this page is also

Re: [PATCH v14 01/12] swiotlb: Refactor swiotlb init functions

2021-06-22 Thread Stefano Stabellini
On Sat, 19 Jun 2021, Claire Chang wrote: > Add a new function, swiotlb_init_io_tlb_mem, for the io_tlb_mem struct > initialization to make the code reusable. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by

Re: [PATCH v13 01/12] swiotlb: Refactor swiotlb init functions

2021-06-21 Thread Stefano Stabellini
On Fri, 18 Jun 2021, Christoph Hellwig wrote: > On Fri, Jun 18, 2021 at 09:09:17AM -0500, Tom Lendacky wrote: > > > swiotlb_init_with_tbl uses memblock_alloc to allocate the io_tlb_mem > > > and memblock_alloc[1] will do memset in memblock_alloc_try_nid[2], so > > > swiotlb_init_with_tbl is also

Re: [PATCH v13 09/12] swiotlb: Add restricted DMA alloc/free support

2021-06-17 Thread Stefano Stabellini
g, one must set up > another device coherent pool by shared-dma-pool and use > dma_alloc_from_dev_coherent instead for atomic coherent allocation. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by: Wil

Re: [PATCH v13 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-17 Thread Stefano Stabellini
by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by: Will Deacon Acked-by: Stefano Stabellini > --- > drivers/xen/swiotlb-xen.c | 2 +- > include/linux/swiotlb.h | 11 +++ > kernel/dma/direct.c | 2 +- > kernel/dma/direct.h | 2 +- &

Re: [PATCH v13 05/12] swiotlb: Update is_swiotlb_active to add a struct device argument

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Update is_swiotlb_active to add a struct device argument. This will be > useful later to allow for different pools. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by

Re: [PATCH v13 04/12] swiotlb: Update is_swiotlb_buffer to add a struct device argument

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Update is_swiotlb_buffer to add a struct device argument. This will be > useful later to allow for different pools. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by

Re: [PATCH v13 03/12] swiotlb: Set dev->dma_io_tlb_mem to the swiotlb pool used

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Always have the pointer to the swiotlb pool used in struct device. This > could help simplify the code for other pools. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by

Re: [PATCH v13 01/12] swiotlb: Refactor swiotlb init functions

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Add a new function, swiotlb_init_io_tlb_mem, for the io_tlb_mem struct > initialization to make the code reusable. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > T

Re: [PATCH v12 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-16 Thread Stefano Stabellini
On Wed, 16 Jun 2021, Claire Chang wrote: > Propagate the swiotlb_force into io_tlb_default_mem->force_bounce and > use it to determine whether to bounce the data or not. This will be > useful later to allow for different pools. > > Signed-off-by: Claire Chang > --- > include/linux/swiotlb.h |

Re: [PATCH v12 11/12] dt-bindings: of: Add restricted DMA pool

2021-06-16 Thread Stefano Stabellini
On Wed, 16 Jun 2021, Claire Chang wrote: > Introduce the new compatible string, restricted-dma-pool, for restricted > DMA. One can specify the address and length of the restricted DMA memory > region by restricted-dma-pool in the reserved-memory node. > > Signed-off-by: Claire Chang > --- >

Re: [PATCH RFC v1 5/6] xen-swiotlb: convert variables to arrays

2021-02-22 Thread Stefano Stabellini
On Fri, 19 Feb 2021, Konrad Rzeszutek Wilk wrote: > On Sun, Feb 07, 2021 at 04:56:01PM +0100, Christoph Hellwig wrote: > > On Thu, Feb 04, 2021 at 09:40:23AM +0100, Christoph Hellwig wrote: > > > So one thing that has been on my mind for a while: I'd really like > > > to kill the separate dma ops

Re: next build: 37 warnings 2 failures (next/next-20160519)

2016-05-19 Thread Stefano Stabellini
On Thu, 19 May 2016, Arnd Bergmann wrote: > > 2 drivers/xen/balloon.c:154:13: warning: 'release_memory_resource' > > declared 'static' but never defined [-Wunused-function] > > I sent a patch on May 11, subject "xen: remove incorrect forward declaration"

Re: [PATCH 2/3] swiotlb: prefix dma_to_phys and phys_to_dma functions

2016-03-29 Thread Stefano Stabellini
On Mon, 28 Mar 2016, Konrad Rzeszutek Wilk wrote: > On Fri, Mar 18, 2016 at 11:00 AM, Sinan Kaya wrote: > > On 3/18/2016 8:12 AM, Robin Murphy wrote: > >> Since we know for sure that swiotlb_to_phys is a no-op on arm64, it might > >> be cleaner to simply not reference it at

Re: [PATCH 3/3] tty: hvc_xen: hide xen_console_remove when unused

2016-01-26 Thread Stefano Stabellini
On Mon, 25 Jan 2016, Boris Ostrovsky wrote: > On 01/25/2016 04:54 PM, Arnd Bergmann wrote: > > xencons_disconnect_backend() is only called from xen_console_remove(), > > and also from xencons_probe()/xencons_resume(). But those two are also under > the > same ifdef. Good point. Aside from this

Re: [PATCH v2 34/34] xen/io: use virt_xxx barriers

2016-01-04 Thread Stefano Stabellini
non-SMP guest runs on an SMP host. > > Switch to virt_xxx barriers which serve this exact purpose. > > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> > include/xen/interface/io/ring.h | 16 -

Re: [PATCH v2 33/34] xenbus: use virt_xxx barriers

2016-01-04 Thread Stefano Stabellini
non-SMP guest runs on an SMP host. > > Switch to virt_xxx barriers which serve this exact purpose. > > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Reviewed-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> Are you also going to take care of drivers/xen/gran

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-06 Thread Stefano Stabellini
On Thu, 6 Aug 2015, Julien Grall wrote: Hi, On 04/08/15 19:12, Julien Grall wrote: diff --git a/include/xen/page.h b/include/xen/page.h index c5ed20b..e7e1425 100644 --- a/include/xen/page.h +++ b/include/xen/page.h @@ -3,9 +3,9 @@ #include asm/xen/page.h -static

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-06 Thread Stefano Stabellini
On Thu, 6 Aug 2015, Julien Grall wrote: On 06/08/15 12:06, Stefano Stabellini wrote: On Thu, 6 Aug 2015, Julien Grall wrote: Hi, On 04/08/15 19:12, Julien Grall wrote: diff --git a/include/xen/page.h b/include/xen/page.h index c5ed20b..e7e1425 100644 --- a/include/xen/page.h

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Stefano Stabellini
On Tue, 4 Aug 2015, Boris Ostrovsky wrote: On 08/04/2015 02:12 PM, Julien Grall wrote: /* * We detect special mappings in one of two ways: @@ -217,9 +232,13 @@ static inline unsigned long bfn_to_local_pfn(unsigned long mfn) /* VIRT - MACHINE conversion */ #define

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Stefano Stabellini
such as pfn_to_mfn(page_to_pfn(page)) into page_to_gfn. More complex clean up will come in follow-up patches. [1] http://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=e758ed14f390342513405dd766e874934573e6cb Signed-off-by: Julien Grall julien.gr...@citrix.com Cc: Stefano Stabellini

Re: [PATCH 4/8] xen: Use the correctly the Xen memory terminologies

2015-07-31 Thread Stefano Stabellini
by no auto-translated guests. I will let x86 xen expert doing it. [1] Xen tree: e758ed14f390342513405dd766e874934573e6cb Signed-off-by: Julien Grall julien.gr...@citrix.com Aside from the many typos Reviewed-by: Stefano Stabellini stefano.stabell...@eu.citrix.com arch/arm/include/asm/xen

Re: [PATCH v2 11/20] tty/hvc: xen: Use xen page definition

2015-07-16 Thread Stefano Stabellini
Stabellini stefano.stabell...@eu.citrix.com Cc: Boris Ostrovsky boris.ostrov...@oracle.com Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Stefano Stabellini stefano.stabell...@eu.citrix.com drivers/tty/hvc/hvc_xen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [patch] hvc_xen: NULL dereference on allocation failure

2012-05-15 Thread Stefano Stabellini
Acked-by: Stefano Stabellini stefano.stabell...@eu.citrix.com ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev