[PATCH] xen/hvc: Fix warning compilation when CONFIG_HVC_XEN_FRONTEND is not enabled

2014-09-11 Thread Julien Grall
#ifdef CONFIG_HVC_XEN_FRONTEND earlier to only compile xen_console_remove, xen_cons_free, xen_cons_disconnect_backend when it's necessary. Signed-off-by: Julien Grall Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: David Vrabel Cc: Paul Gortmaker Cc: Konrad Rzeszutek Wilk --- drivers/tt

[PATCH] arm/xen: Remove definiition of virt_to_pfn in asm/xen/page.h

2014-04-18 Thread Julien Grall
he same (it directly expand PFN_DOWN), so we can safely drop virt_to_pfn in xen include. Signed-off-by: Julien Grall --- arch/arm/include/asm/xen/page.h |1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h index cf4f3e8..ded062f 1

[PATCH] xen/events: xen_evtchn_fifo_init can be called very late

2014-01-27 Thread Julien Grall
initialized. This can be fixed by calling the init function on every online cpu when the event channel fifo driver is initialized. Signed-off-by: Julien Grall --- drivers/xen/events/events_fifo.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/xen/events

[PATCH] xen/gnttab: Use phys_addr_t to describe the grant frame base address

2014-01-27 Thread Julien Grall
On ARM, address size can be 32 bits or 64 bits (if CONFIG_ARCH_PHYS_ADDR_T_64BIT is enabled). We can't assume that the grant frame base address will always fits in an unsigned long. Use phys_addr_t instead of unsigned long as argument for gnttab_setup_auto_xlat_frames. Signed-off-by: Julien

Re: [PATCH] xen/events: xen_evtchn_fifo_init can be called very late

2014-01-28 Thread Julien Grall
On 01/28/2014 02:30 PM, Stefano Stabellini wrote: > On Tue, 28 Jan 2014, David Vrabel wrote: >> On 28/01/14 00:34, Julien Grall wrote: >>> On ARM, xen_init_IRQ (which calls xen_evtchn_fifo_init) is called after >>> all CPUs are online. It would mean that the no

[PATCH] arm/xen: Initialize event channels earlier

2014-01-28 Thread Julien Grall
when the CPU is running Signed-off-by: Julien Grall --- arch/arm/xen/enlighten.c | 84 ++ 1 file changed, 55 insertions(+), 29 deletions(-) diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 293eeea..39b668e 100644 --- a/arch/arm

Re: [Xen-devel] [PATCH] arm/xen: Initialize event channels earlier

2014-01-28 Thread Julien Grall
On 01/28/2014 05:13 PM, Stefano Stabellini wrote: > On Tue, 28 Jan 2014, Julien Grall wrote: >> Event channels driver needs to be initialized very early. Until now, Xen >> initialization was done after all CPUs was bring up. >> >> We can safely move the initiali

Re: [Xen-devel] [PATCH] arm/xen: Initialize event channels earlier

2014-01-28 Thread Julien Grall
On 01/28/2014 05:46 PM, Stefano Stabellini wrote: > On Tue, 28 Jan 2014, Julien Grall wrote: >>>> +static int xen_cpu_notification(struct notifier_block *self, >>>> + unsigned long action, >>>> + void *hcp

[PATCH v2] arm/xen: Initialize event channels earlier

2014-01-28 Thread Julien Grall
when the CPU is running Signed-off-by: Julien Grall --- Changes in v2: - Check earlier if the event IRQ is valid - We can safely register the VCPU when the cpu is booting --- arch/arm/xen/enlighten.c | 71 -- 1 file changed, 44

Re: [Xen-devel] [PATCH v6] xen/grant-table: Avoid m2p_override during mapping

2014-02-02 Thread Julien Grall
mfn); >> if (ret) >> goto out; >> } >> @@ -979,8 +1028,22 @@ int gnttab_unmap_refs(struct gnttab_unmap_grant_ref >> *unmap_ops, >> >> return ret; >> } >> + >> +int gnttab_u

Re: [PATCH v8 14/19] ASoC: Samsung: Rename dma_ops by samsung_dma_ops

2013-10-23 Thread Julien Grall
(Add samsung sounds maintainers) On 10/17/2013 06:43 PM, Stefano Stabellini wrote: From: Julien Grall The commit "arm: introduce a global dma_ops pointer" introduce compilation issue when CONFIG_SND_SOC_SAMSUNG is enabled. sound/soc/samsung/dma.c:345:27: error: conflicting types fo

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-23 Thread Julien Grall
On 10/23/2013 05:15 PM, Konrad Rzeszutek Wilk wrote: On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: On 09/30/2013 03:45 PM, Konrad Rzeszutek Wilk wrote: On Fri, Sep 27, 2013 at 10:49:37PM +0100, Julien Grall wrote: On 09/27/2013 10:25 PM, Konrad Rzeszutek Wilk wrote

Re: [Xen-devel] [PATCH] xen/hvc-console: Make it work with HVM guests.

2013-10-24 Thread Julien Grall
On 10/24/2013 03:49 PM, Konrad Rzeszutek Wilk wrote: On Wed, Oct 23, 2013 at 11:08:01PM +0100, Julien Grall wrote: On 10/23/2013 05:15 PM, Konrad Rzeszutek Wilk wrote: On Sun, Oct 06, 2013 at 09:52:40PM +0100, Julien Grall wrote: Actually, I looked closer the code, with the new solution

Re: [PATCH v2 06/20] block/xen-blkfront: Store a page rather a pfn in the grant structure

2015-07-23 Thread Julien Grall
Hi Stefano, On 16/07/15 16:11, Stefano Stabellini wrote: > On Thu, 9 Jul 2015, Julien Grall wrote: >> All the usage of the field pfn are done using the same idiom: >> >> pfn_to_page(grant->pfn) >> >> This will return always the same page. Store directly the

Re: [Xen-devel] [PATCH v2 01/20] xen: Add Xen specific page definition

2015-07-24 Thread Julien Grall
Hi David, On 24/07/15 10:28, David Vrabel wrote: > On 09/07/15 21:42, Julien Grall wrote: >> The Xen hypercall interface is always using 4K page granularity on ARM >> and x86 architecture. >> >> With the incoming support of 64K page granularity for ARM64 guest, it >

Re: [Xen-devel] [PATCH v2 01/20] xen: Add Xen specific page definition

2015-07-24 Thread Julien Grall
On 24/07/15 10:48, David Vrabel wrote: > On 24/07/15 10:39, Julien Grall wrote: >> Hi David, >> >> On 24/07/15 10:28, David Vrabel wrote: >>> On 09/07/15 21:42, Julien Grall wrote: >>>> The Xen hypercall interface is always using 4K page granularity on ARM

Re: [Xen-devel] [PATCH v2 02/20] xen: Introduce a function to split a Linux page into Xen page

2015-07-24 Thread Julien Grall
On 24/07/15 10:31, David Vrabel wrote: > On 09/07/15 21:42, Julien Grall wrote: >> The Xen interface is always using 4KB page. This means that a Linux page >> may be split across multiple Xen page when the page granularity is not >> the same. >> >> This helper will

Re: [Xen-devel] [PATCH v2 02/20] xen: Introduce a function to split a Linux page into Xen page

2015-07-24 Thread Julien Grall
On 24/07/15 11:10, David Vrabel wrote: > On 24/07/15 10:54, Julien Grall wrote: >> On 24/07/15 10:31, David Vrabel wrote: >>> On 09/07/15 21:42, Julien Grall wrote: >>>> The Xen interface is always using 4KB page. This means that a Linux page >>>> may

Re: [Xen-devel] [PATCH v2 01/20] xen: Add Xen specific page definition

2015-07-24 Thread Julien Grall
On 24/07/15 11:34, David Vrabel wrote: > On 24/07/15 10:51, Julien Grall wrote: >> On 24/07/15 10:48, David Vrabel wrote: >>> On 24/07/15 10:39, Julien Grall wrote: >>>> Hi David, >>>> >>>> On 24/07/15 10:28, David Vrabel wrote: >>>>

Re: [Xen-devel] [PATCH 1/8] arm/xen: Remove helpers which are PV specific

2015-08-04 Thread Julien Grall
grammer point of view. > > "English grammar" :-P > > Sorry. What I really meant to say was that "assimilated" doesn't make sense > in this context either. I think maybe what was meant is "ARM guests are > always HVM". Yes. I will update t

[PATCH v2 3/8] arm/xen: implement correctly pfn_to_mfn

2015-08-04 Thread Julien Grall
re to rename pfn_to_mfn to a suitable name. Signed-off-by: Julien Grall Cc: Stefano Stabellini Cc: Russell King Cc: linux-arm-ker...@lists.infradead.org --- arch/arm/include/asm/xen/page.h | 8 1 file changed, 8 deletions(-) diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/in

[PATCH v2 1/8] arm/xen: Remove helpers which are PV specific

2015-08-04 Thread Julien Grall
is only used in PV specific code. Therefore we should never call the function. Add a BUG() in this helper and drop all the others. Signed-off-by: Julien Grall Acked-by: Stefano Stabellini Cc: Russell King Cc: linux-arm-ker...@lists.infradead.org --- Changes in v2: - Typoes

[PATCH v2 5/8] xen/tmem: Use page_to_gfn rather than pfn_to_gfn

2015-08-04 Thread Julien Grall
All the caller of xen_tmem_{get,put}_page have a struct page * in hand and call pfn_to_gfn for the only benefits of these 2 functions. Rather than passing the pfn in parameter, pass directly the page and use directly page_to_gfn. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Boris

[PATCH v2 0/8] Use correctly the Xen memory terminologies in Linux

2015-08-04 Thread Julien Grall
Cc: linux-fb...@vger.kernel.org Cc: linux-in...@vger.kernel.org Cc: linuxppc-...@lists.ozlabs.org Cc: linux-s...@vger.kernel.org Cc: net...@vger.kernel.org Cc: "Roger Pau Monné" Cc: Russell King Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tomi Valkeinen Cc: Wei Liu Cc: x...@ke

[PATCH v2 8/8] xen/privcmd: Further s/MFN/GFN/ clean-up

2015-08-04 Thread Julien Grall
foreign change has been left unchanged given that the userspace is using it. Nonetheless, add a comment to explain the expected value within the "mfn" field. Signed-off-by: Julien Grall Reviewed-by: David Vrabel Cc: Stefano Stabellini Cc: Russell King Cc: Konrad Rzeszutek Wilk Cc: Boris

[PATCH v2 2/8] xen: Make clear that swiotlb and biomerge are dealing with DMA address

2015-08-04 Thread Julien Grall
ovec using foreign page and another using Linux memory. Lastly, the helper mfn_to_local_pfn has been renamed to dnf_to_local_pfn given that the only usage was in swiotlb. Signed-off-by: Julien Grall Cc: Stefano Stabellini Cc: Russell King Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David

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

2015-08-04 Thread Julien Grall
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 Cc: Stefano Stabellini Cc: Russell King Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: T

[PATCH v2 7/8] hvc/xen: Further s/MFN/GFN clean-up

2015-08-04 Thread Julien Grall
HVM_PARAM_CONSOLE_PFN is used to retrieved the console PFN for HVM guest. It returns a PFN (aka GFN) and not a MFN. Furthermore, use directly virt_to_gfn for both PV and HVM domain rather than doing a special case for each of the them. Signed-off-by: Julien Grall Reviewed-by: David Vrabel Cc

[PATCH v2 6/8] video/xen-fbfront: Further s/MFN/GFN clean-up

2015-08-04 Thread Julien Grall
The PV driver xen-fbfront is only dealing with GFN and not MFN. Rename all the occurence of MFN to GFN. Also take the opportunity to replace to usage of pfn_to_gfn by page_to_pfn. Signed-off-by: Julien Grall Reviewed-by: David Vrabel Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc

Re: [PATCH v2 2/8] xen: Make clear that swiotlb and biomerge are dealing with DMA address

2015-08-05 Thread Julien Grall
> > You missed a bunch of dfn->bfn renamings. Sorry, I forgot to double check that before sending the patch. I will fix it in the next version. > Aside from those and the commit message error: > > Reviewed-by: Stefano Stabellini Thank you! Regards, -- Julien Grall -- To u

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

2015-08-05 Thread Julien Grall
Hi Boris, On 05/08/15 00:16, 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) >>

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

2015-08-05 Thread Julien Grall
On 05/08/15 13:19, Boris Ostrovsky wrote: > On 08/05/2015 06:51 AM, Julien Grall wrote: >> >>>> diff --git a/drivers/video/fbdev/xen-fbfront.c >>>> b/drivers/video/fbdev/xen-fbfront.c >>>> index 09dc447..25e3cce 100644 >>>> --- a/drivers/vid

Re: [Xen-devel] [PATCH v2 02/20] xen: Introduce a function to split a Linux page into Xen page

2015-08-05 Thread Julien Grall
Hi David, On 24/07/15 11:10, David Vrabel wrote: > On 24/07/15 10:54, Julien Grall wrote: >> On 24/07/15 10:31, David Vrabel wrote: >>> On 09/07/15 21:42, Julien Grall wrote: >>>> The Xen interface is always using 4KB page. This means that a Linux page >>>

Re: [Xen-devel] [PATCH v2 02/20] xen: Introduce a function to split a Linux page into Xen page

2015-08-05 Thread Julien Grall
ce the implementation xen_apply_to_page. Anyway, I will see to do what you suggest. > Sorry for being so picky here, but the inconsistency of terminology and > API misuse is already confusing and I don't want to see it get worse. No worry, I'm happy to rework this code to be

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

2015-08-06 Thread Julien Grall
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 > > -static inline unsigned long page_to_mfn(s

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

2015-08-06 Thread Julien Grall
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 >>>

[PATCH v2 04/20] xen/grant: Add helper gnttab_page_grant_foreign_access_ref

2015-07-09 Thread Julien Grall
result to page_mfn not being defined when necessary. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel --- Changes in v2: - Patch added --- arch/x86/include/asm/xen/page.h | 2 +- include/xen/grant_table.h | 9 + 2 files

[PATCH v2 03/20] xen/grant: Introduce helpers to split a page into grant

2015-07-09 Thread Julien Grall
grant. In order to help some PV drivers, the callback is allowed to use less data and must update the resulting length. This is useful for netback. Also provide and helper to count the number of grants within a given contiguous region. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc

[PATCH v2 05/20] block/xen-blkfront: Split blkif_queue_request in 2

2015-07-09 Thread Julien Grall
execution path, separate the function in 2. This will also remove one level of tabulation. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Roger Pau Monné Cc: Boris Ostrovsky Cc: David Vrabel --- Changes in v2: - Patch added --- drivers/block/xen-blkfront.c | 280

[PATCH v2 18/20] net/xen-netback: Make it running on 64KB page granularity

2015-07-09 Thread Julien Grall
ng on the grant table code. Signed-off-by: Julien Grall Cc: Ian Campbell Cc: Wei Liu Cc: net...@vger.kernel.org --- Improvement such as support of 64KB grant is not taken into consideration in this patch because we have the requirement to run a Linux using 64KB pages on a non-modifie

[PATCH v2 08/20] net/xen-netback: xenvif_gop_frag_copy: move GSO check out of the loop

2015-07-09 Thread Julien Grall
The skb doesn't change within the function. Therefore it's only necessary to check if we need GSO once at the beginning. Signed-off-by: Julien Grall Cc: Ian Campbell Cc: Wei Liu Cc: net...@vger.kernel.org --- Changes in v2: - Patch added --- drivers/net/xen-netback/netb

[PATCH v2 01/20] xen: Add Xen specific page definition

2015-07-09 Thread Julien Grall
page definition. They have exactly the same name but prefixed with XEN_/xen_ prefix. Also modify page_to_pfn to use new Xen page definition. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel --- I'm wondering if we should drop page_to_pfn has

[PATCH v2 19/20] xen/privcmd: Add support for Linux 64KB page granularity

2015-07-09 Thread Julien Grall
will have to map multiple Xen PFN in a single Linux page. Note that this solution works on page granularity which is a multiple of 4KB. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel --- Changes in v2: - Use xen_apply_to_page --- drivers/xen

[PATCH v2 14/20] xen/grant-table: Make it running on 64KB granularity

2015-07-09 Thread Julien Grall
multiple grant. It will require some care with the {Set,Clear}ForeignPage macro. Note that no changes has been made in the x86 code because both Linux and Xen will only use 4KB page granularity. Signed-off-by: Julien Grall Reviewed-by: David Vrabel Cc: Stefano Stabellini Cc: Russell King Cc: Konrad

[PATCH v2 20/20] arm/xen: Add support for 64KB page granularity

2015-07-09 Thread Julien Grall
page even though only the first 4KB is used. I don't think this is really important for now as it helps to have the pointer 4KB aligned (XENMEM_add_to_physmap is taking a Xen PFN). Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini Cc: Russell King --- Changes in v2

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

2015-07-09 Thread Julien Grall
The console ring is always based on the page granularity of Xen. Signed-off-by: Julien Grall Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: David Vrabel Cc: Stefano Stabellini Cc: Boris Ostrovsky Cc: linuxppc-...@lists.ozlabs.org --- drivers/tty/hvc/hvc_xen.c | 6 +++--- 1 file changed, 3

[PATCH v2 13/20] xen/events: fifo: Make it running on 64KB granularity

2015-07-09 Thread Julien Grall
chunk). That would require more care when we fail to expand the event channel. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel --- drivers/xen/events/events_base.c | 2 +- drivers/xen/events/events_fifo.c | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH v2 16/20] block/xen-blkback: Make it running on 64KB page granularity

2015-07-09 Thread Julien Grall
lying on the grant table code. Note that the grant table code is allocating a Linux page per grant which will result to waste 6OKB for every grant when Linux is using 64KB page granularity. This could be improved by sharing the page between multiple grants. Signed-off-by: Julien Grall Cc: K

[PATCH v2 15/20] block/xen-blkfront: Make it running on 64KB page granularity

2015-07-09 Thread Julien Grall
From: Julien Grall The PV block protocol is using 4KB page granularity. The goal of this patch is to allow a Linux using 64KB page granularity using block device on a non-modified Xen. The block API is using segment which should at least be the size of a Linux page. Therefore, the driver will

[PATCH v2 12/20] xen/balloon: Don't rely on the page granularity is the same for Xen and Linux

2015-07-09 Thread Julien Grall
will have to split the Linux page in 4K chunk before asking Xen to add/remove the frame from the guest. Note that this can work on any page granularity assuming it's a multiple of 4K. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: We

[PATCH v2 10/20] xen/xenbus: Use Xen page definition

2015-07-09 Thread Julien Grall
All the ring (xenstore, and PV rings) are always based on the page granularity of Xen. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel --- Changes in v2: - Also update the ring mapping function --- drivers/xen/xenbus/xenbus_client.c | 6

[PATCH v2 02/20] xen: Introduce a function to split a Linux page into Xen page

2015-07-09 Thread Julien Grall
The Xen interface is always using 4KB page. This means that a Linux page may be split across multiple Xen page when the page granularity is not the same. This helper will break down a Linux page into 4KB chunk and call the helper on each of them. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek

[PATCH v2 09/20] xen/biomerge: Don't allow biovec to be merge when Linux is not using 4KB page

2015-07-09 Thread Julien Grall
igned-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel --- Changes in v2: - Remove the workaround and check if the Linux page granularity is the same as Xen or not --- drivers/xen/biomerge.c | 7 +++ 1 file changed, 7 insertions(+) diff

[PATCH v2 06/20] block/xen-blkfront: Store a page rather a pfn in the grant structure

2015-07-09 Thread Julien Grall
All the usage of the field pfn are done using the same idiom: pfn_to_page(grant->pfn) This will return always the same page. Store directly the page in the grant to clean up the code. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Roger Pau Monné Cc: Boris Ostrovsky Cc: Da

[PATCH v2 07/20] block/xen-blkfront: split get_grant in 2

2015-07-09 Thread Julien Grall
to copy data from persistent grant or indirect grant. Avoid to set it for other use case as it will have no meaning given the page will be split in multiple grant. Provide 2 functions, to setup indirect grant, the other for bio page. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Roger

[PATCH v2 17/20] net/xen-netfront: Make it running on 64KB page granularity

2015-07-09 Thread Julien Grall
n the grant table code. Note that we allocate a Linux page for each rx skb but only the first 4KB is used. We may improve the memory usage by extending the size of the rx skb. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: net...@vger.kerne

[PATCH v2 00/20] xen/arm64: Add support for 64KB page

2015-07-09 Thread Julien Grall
m.git branch xen-64k-v2 Comments, suggestions are welcomed. Sincerely yours, Cc: david.vra...@citrix.com Cc: konrad.w...@oracle.com Cc: boris.ostrov...@oracle.com Cc: wei.l...@citrix.com Cc: roger@citrix.com Julien Grall (20): xen: Add Xen specific page definition xen: Introduce a functi

[PATCH 3/8] arm/xen: implement correctly pfn_to_mfn

2015-07-28 Thread Julien Grall
re to rename pfn_to_mfn to a suitable name. Signed-off-by: Julien Grall Cc: Stefano Stabellini Cc: Russell King Cc: linux-arm-ker...@lists.infradead.org --- arch/arm/include/asm/xen/page.h | 8 1 file changed, 8 deletions(-) diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/in

[PATCH 0/8] Use correctly the Xen memory terminologies in Linux

2015-07-28 Thread Julien Grall
ts.ozlabs.org Cc: linux-s...@vger.kernel.org Cc: net...@vger.kernel.org Cc: "Roger Pau Monné" Cc: Russell King Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tomi Valkeinen Cc: Wei Liu Cc: x...@kernel.org Julien Grall (8): arm/xen: Remove helpers which are PV specific xen: Make clear th

[PATCH 6/8] video/xen-fbfront: Further s/MFN/GFN clean-up

2015-07-28 Thread Julien Grall
The PV driver xen-fbfront is only dealing with GFN and not MFN. Rename all the occurence of MFN to GFN. Also take the opportunity to replace to usage of pfn_to_gfn by page_to_pfn. Signed-off-by: Julien Grall Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: David Vrabel Cc: linux

[PATCH 5/8] xen/tmem: Use page_to_gfn rather than pfn_to_gfn

2015-07-28 Thread Julien Grall
All the caller of xen_tmem_{get,put}_page have a struct page * in hand and call pfn_to_gfn for the only benefits of these 2 functions. Rather than passing the pfn in parameter, pass directly the page and use directly page_to_gfn. Signed-off-by: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Boris

[PATCH 2/8] xen: Make clear that swiotlb and biomerge are dealing with DMA address

2015-07-28 Thread Julien Grall
ovec using foreign page and another using Linux memory. Lastly, the helper mfn_to_local_pfn has been renamed to dnf_to_local_pfn given that the only usage was in swiotlb. Signed-off-by: Julien Grall Cc: Stefano Stabellini Cc: Russell King Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David

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

2015-07-28 Thread Julien Grall
ng it. [1] Xen tree: e758ed14f390342513405dd766e874934573e6cb Signed-off-by: Julien Grall Cc: Stefano Stabellini Cc: Russell King Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Cc: "

[PATCH 1/8] arm/xen: Remove helpers which are PV specific

2015-07-28 Thread Julien Grall
arbitrary_virt_to_machine is only used in PV specific code. Therefore we should never call the function. Add a BUG() in this helper and drop all the others. Signed-off-by: Julien Grall Cc: Stefano Stabellini Cc: Russell King Cc: linux-arm-ker...@lists.infradead.org --- arch/arm/include/asm/xen

[PATCH 7/8] hvc/xen: Further s/MFN/GFN clean-up

2015-07-28 Thread Julien Grall
HVM_PARAM_CONSOLE_PFN is used to retrieved the console PFN for HVM guest. It returns a PFN (aka GFN) and not a MFN. Furthermore, use directly virt_to_gfn for both PV and HVM domain rather than doing a special case for each of the them. Signed-off-by: Julien Grall Cc: Greg Kroah-Hartman Cc

[PATCH 8/8] xen/privcmd: Further s/MFN/GFN/ clean-up

2015-07-28 Thread Julien Grall
foreign change has been left unchanged given that the userspace is using it. Nonetheless, add a comment to explain the expected value within the "mfn" field. Signed-off-by: Julien Grall Cc: Stefano Stabellini Cc: Russell King Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel

Re: [Xen-devel] [PATCH 2/8] xen: Make clear that swiotlb and biomerge are dealing with DMA address

2015-07-28 Thread Julien Grall
Hi David, On 28/07/15 16:52, David Vrabel wrote: > On 28/07/15 16:02, Julien Grall wrote: >> >> +/* Pseudo-physical <-> DMA conversion */ >> +static inline unsigned long pfn_to_dfn(unsigned long pfn) > > Use BFN for bus frame number. This is the terminology th

Re: [PATCH 0/8] Use correctly the Xen memory terminologies in Linux

2015-07-29 Thread Julien Grall
On 28/07/15 16:02, Julien Grall wrote: > Hi all, > > This patch series aims to use the memory terminologies described in > include/linux/mm.h [1] for Linux xen code. I mistakenly wrote the wrong include here. It should be include/xen/mm.h from the Xen tree: http://xenbits.xen.o

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

2015-07-29 Thread Julien Grall
On 28/07/15 18:16, David Vrabel wrote: > On 28/07/15 16:02, Julien Grall wrote: >> Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN >> is meant, I suspect this is because the first support for Xen was for >> PV. This brough some misimplementation of helper

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

2015-07-29 Thread Julien Grall
Hi Boris, On 28/07/15 20:12, Boris Ostrovsky wrote: > On 07/28/2015 11:02 AM, Julien Grall wrote: >> Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN >> is meant, I suspect this is because the first support for Xen was for >> PV. This brough some misimpl

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

2015-07-29 Thread Julien Grall
.] > >> For clarity and avoid new confusion, replace any reference of mfn into gnf >> in any helpers used by PV drivers. > Typo : "gfn" > I'd suggest "...replace any reference to mfn with gfn..." > > [...] Thanks for telling me the typoes. I wil

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

2015-07-29 Thread Julien Grall
Hi Wei, On 29/07/15 11:13, Wei Liu wrote: > On Tue, Jul 28, 2015 at 04:02:45PM +0100, Julien Grall wrote: > [...] >> diff --git a/drivers/net/xen-netback/netback.c >> b/drivers/net/xen-netback/netback.c >> index 7d50711..3b7b7c3 100644 >> --- a/drivers/net/xen-netb

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

2015-07-29 Thread Julien Grall
stly contained in the x86 specific code. I don't mind to either add pfn_to_mfn and use it or add a comment /* PV-specific so mfn == gfn */ for every use of mfn = pfn_to_gfn(...). Regards, -- Julien Grall -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: [Xen-devel] [PATCH v2 13/20] xen/events: fifo: Make it running on 64KB granularity

2015-08-06 Thread Julien Grall
Hi David, On 24/07/15 11:36, David Vrabel wrote: > On 09/07/15 21:42, Julien Grall wrote: >> Only use the first 4KB of the page to store the events channel info. It >> means that we will wast 60KB every time we allocate page for: >> * control block: a page

Re: [Xen-devel] [PATCH v5 0/6] xen/PMU: PMU support for Xen PV(H) guests

2015-08-07 Thread Julien Grall
t exists for ARM and xensyms is not even plumbed. I would make sure that XEN_SYMS is not enabled for ARM maybe adding the line below in the kconfig? depends on X86 && XEN_DOM0 && XENFS Regards, -- Julien Grall -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH v3 5/9] xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn

2015-08-07 Thread Julien Grall
All the caller of xen_tmem_{get,put}_page have a struct page * in hand and call pfn_to_gfn for the only benefits of these 2 functions. Rather than passing the pfn in parameter, pass directly the page and use directly xen_page_to_gfn. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini

[PATCH v3 3/9] arm/xen: implement correctly pfn_to_mfn

2015-08-07 Thread Julien Grall
re to rename pfn_to_mfn to a suitable name. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- Cc: Russell King Cc: linux-arm-ker...@lists.infradead.org Changes in v3: - Typoes in the commit message - Add Stefano's reviewed-by --- arch/arm/include/asm/

[PATCH v3 6/9] video/xen-fbfront: Further s/MFN/GFN clean-up

2015-08-07 Thread Julien Grall
The PV driver xen-fbfront is only dealing with GFN and not MFN. Rename all the occurence of MFN to GFN. Also take the opportunity to replace to usage of pfn_to_gfn by xen_page_to_gfn. Signed-off-by: Julien Grall Reviewed-by: David Vrabel --- Cc: Jean-Christophe Plagniol-Villard Cc: Tomi

[PATCH v3 4/9] xen: Use correctly the Xen memory terminologies

2015-08-07 Thread Julien Grall
Take also the opportunity to simplify simple construction such as pfn_to_mfn(page_to_pfn(page)) into xen_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

[PATCH v3 1/9] arm/xen: Remove helpers which are PV specific

2015-08-07 Thread Julien Grall
is only used in PV specific code. Therefore we should never call the function. Add a BUG() in this helper and drop all the others. Signed-off-by: Julien Grall Acked-by: Stefano Stabellini --- Cc: Russell King Cc: linux-arm-ker...@lists.infradead.org Changes in v2: - Typoes

[PATCH v3 9/9] xen/xenbus: Rename the variable xen_store_mfn to xen_store_gfn

2015-08-07 Thread Julien Grall
The variable xen_store_mfn is effectively storing a GFN and not an MFN. Signed-off-by: Julien Grall --- Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel I think that the assignation of xen_start_info in xenstored_local_init is pointless. Although I haven't drop it

[PATCH v3 8/9] xen/privcmd: Further s/MFN/GFN/ clean-up

2015-08-07 Thread Julien Grall
foreign change has been left unchanged given that the userspace is using it. Nonetheless, add a comment to explain the expected value within the "mfn" field. Signed-off-by: Julien Grall Reviewed-by: David Vrabel --- Cc: Stefano Stabellini Cc: Russell King Cc: Konrad Rzeszutek Wilk

[PATCH v3 0/9] Use correctly the Xen memory terminologies

2015-08-07 Thread Julien Grall
.@vger.kernel.org Cc: linuxppc-...@lists.ozlabs.org Cc: linux-s...@vger.kernel.org Cc: net...@vger.kernel.org Cc: "Roger Pau Monné" Cc: Russell King Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Tomi Valkeinen Cc: Wei Liu Cc: x...@kernel.org Julien Grall (9): arm/xen: Remove helpers

[PATCH v3 7/9] hvc/xen: Further s/MFN/GFN clean-up

2015-08-07 Thread Julien Grall
HVM_PARAM_CONSOLE_PFN is used to retrieved the console PFN for HVM guest. It returns a PFN (aka GFN) and not a MFN. Furthermore, use directly virt_to_gfn for both PV and HVM domain rather than doing a special case for each of the them. Signed-off-by: Julien Grall Reviewed-by: David Vrabel

[PATCH v3 2/9] xen: Make clear that swiotlb and biomerge are dealing with DMA address

2015-08-07 Thread Julien Grall
ovec using foreign page and another using Linux memory. Lastly, the helper mfn_to_local_pfn has been renamed to bfn_to_local_pfn given that the only usage was in swiotlb. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- Cc: Russell King Cc: Konrad Rzeszutek Wilk Cc: Boris Ost

[PATCH v3 02/20] arm/xen: Drop pte_mfn and mfn_pte

2015-08-07 Thread Julien Grall
They are not used in common code expect in one place in balloon.c which is only compiled when Linux is using PV MMU. It's not the case on ARM. Rather than worrying how to handle the 64KB case, drop them. Signed-off-by: Julien Grall --- Stefano Stabellini Russell King Changes

[PATCH v3 09/20] xen/biomerge: Don't allow biovec to be merge when Linux is not using 4KB page

2015-08-07 Thread Julien Grall
-off-by: Julien Grall --- Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel There is some ideas to check whether two biovec could be merged (see [1]) but it's not critical and can be consider as a performance improvement. Changes in v3: - Update c

[PATCH v3 05/20] xen/grant: Add helper gnttab_page_grant_foreign_access_ref_one

2015-08-07 Thread Julien Grall
which result to page_mfn not being defined when necessary. Signed-off-by: Julien Grall Reviewed-by: David Vrabel Reviewed-by: Stefano Stabellini --- Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Changes in v3: - Rename gnttab_page_grant_foreign_access_ref into

[PATCH v3 08/20] block/xen-blkfront: split get_grant in 2

2015-08-07 Thread Julien Grall
to copy data from persistent grant or indirect grant. Avoid to set it for other use case as it will have no meaning given the page will be split in multiple grant. Provide 2 functions, to setup indirect grant, the other for bio page. Signed-off-by: Julien Grall --- Cc: Konrad Rzeszutek Wilk Cc

[PATCH v3 06/20] block/xen-blkfront: Split blkif_queue_request in 2

2015-08-07 Thread Julien Grall
execution path, separate the function in 2. This will also remove one level of tabulation. Signed-off-by: Julien Grall Reviewed-by: Roger Pau Monné --- Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Roger, if you really want if can drop the else clause in

[PATCH v3 00/20] xen/arm64: Add support for 64KB page

2015-08-07 Thread Julien Grall
ter can be found here: git://xenbits.xen.org/people/julieng/linux-arm.git branch xen-64k-v3 Comments, suggestions are welcomed. Sincerely yours, Cc: david.vra...@citrix.com Cc: konrad.w...@oracle.com Cc: boris.ostrov...@oracle.com Cc: wei.l...@citrix.com Cc: roger@citrix.com Julien Grall (20):

[PATCH v3 01/20] net/xen-netback: xenvif_gop_frag_copy: move GSO check out of the loop

2015-08-07 Thread Julien Grall
The skb doesn't change within the function. Therefore it's only necessary to check if we need GSO once at the beginning. Signed-off-by: Julien Grall --- Cc: Ian Campbell Cc: Wei Liu Cc: net...@vger.kernel.org Changes in v2: - Patch added --- drivers/net/xen-netback

[PATCH v3 04/20] xen/grant: Introduce helpers to split a page into grant

2015-08-07 Thread Julien Grall
k the compilation. Furthermore, only definition in interface/grant_table.h was required. Signed-off-by: Julien Grall --- Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x...@kernel.org Changes in v3:

[PATCH v3 07/20] block/xen-blkfront: Store a page rather a pfn in the grant structure

2015-08-07 Thread Julien Grall
All the usage of the field pfn are done using the same idiom: pfn_to_page(grant->pfn) This will return always the same page. Store directly the page in the grant to clean up the code. Signed-off-by: Julien Grall Acked-by: Roger Pau Monné Reviewed-by: Stefano Stabellini --- Cc: Kon

[PATCH v3 03/20] xen: Add Xen specific page definition

2015-08-07 Thread Julien Grall
page definition. They have exactly the same name but prefixed with XEN_/xen_ prefix. Also modify xen_page_to_gfn to use new Xen page definition. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Changes

Re: [Xen-devel] [PATCH v3 00/20] xen/arm64: Add support for 64KB page

2015-08-07 Thread Julien Grall
On 07/08/15 17:46, Julien Grall wrote: > Hi all, > > ARM64 Linux is supporting both 4KB and 64KB page granularity. Although, Xen > hypercall interface and PV protocol are always based on 4KB page granularity. > > Any attempt to boot a Linux guest with 64KB pages enabled will r

[PATCH v3 14/20] xen/grant-table: Make it running on 64KB granularity

2015-08-07 Thread Julien Grall
multiple grant. It will require some care with the {Set,Clear}ForeignPage macro. Note that no changes has been made in the x86 code because both Linux and Xen will only use 4KB page granularity. Signed-off-by: Julien Grall Reviewed-by: David Vrabel Reviewed-by: Stefano Stabellini --- Cc: Stefano

[PATCH v3 18/20] net/xen-netback: Make it running on 64KB page granularity

2015-08-07 Thread Julien Grall
ng on the grant table code. Signed-off-by: Julien Grall --- Cc: Ian Campbell Cc: Wei Liu Cc: net...@vger.kernel.org Improvement such as support of 64KB grant is not taken into consideration in this patch because we have the requirement to run a Linux using 64KB pages on a non-modifie

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

2015-08-07 Thread Julien Grall
The console ring is always based on the page granularity of Xen. Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: David Vrabel Cc: Boris Ostrovsky Cc: linuxppc-...@lists.ozlabs.org Changes in v3: - Some changes has been

[PATCH v3 17/20] net/xen-netfront: Make it running on 64KB page granularity

2015-08-07 Thread Julien Grall
n the grant table code. Note that we allocate a Linux page for each rx skb but only the first 4KB is used. We may improve the memory usage by extending the size of the rx skb. Signed-off-by: Julien Grall --- Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: net...@vger.kerne

<    1   2   3   4   5   6   7   8   >