Re: [Xen-devel] [PATCH 4/7] xen/9pfs: connect to the backend

2017-03-07 Thread Julien Grall
ntend", ring); + if (ring->irq < 0) { + xenbus_free_evtchn(dev, ring->evtchn); + ret = ring->irq; + goto error; + } return 0; + +error: + if (ring->intf != NULL) + kfree(ring->intf); + if (ring->bytes != NULL) + kfree(ring->bytes); + return ret; } Cheers, -- Julien Grall

Re: [Xen-devel] [PATCH 1/7] xen: import new ring macros in ring.h

2017-03-07 Thread Julien Grall
works with 64K kernel. Cheers, -- Julien Grall

Re: [Xen-devel] [PATCH 1/7] xen: import new ring macros in ring.h

2017-03-08 Thread Julien Grall
Hi Stefano, On 08/03/17 00:12, Stefano Stabellini wrote: On Tue, 7 Mar 2017, Julien Grall wrote: Hi Stefano, On 03/06/2017 08:01 PM, Stefano Stabellini wrote: Sync the ring.h file with upstream Xen, to introduce the new ring macros. They will be used by the Xen transport for 9pfs. Signed

Re: [Xen-devel] [PATCH 4/7] xen/9pfs: connect to the backend

2017-03-08 Thread Julien Grall
Hi Stefano, On 08/03/17 00:49, Stefano Stabellini wrote: On Tue, 7 Mar 2017, Julien Grall wrote: On 03/06/2017 08:01 PM, Stefano Stabellini wrote: + if (ring->bytes == NULL) + goto error; + for (i = 0; i < (1 << XEN_9PFS_RING_ORDER); i++) +

[PATCH] xen: grant-table: Check truncation when giving access to a frame

2016-06-13 Thread Julien Grall
physical address, although today the RAM is always located under 40-bits (see xen/include/public/arch-arm.h). Add a truncation check in gnttab_update_entry_v1 to prevent the guest to give access to the wrong frame. Signed-off-by: Julien Grall --- This is limiting us to a 44-bit address space

Re: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving access to a frame

2016-06-13 Thread Julien Grall
Hi David, On 13/06/16 11:57, David Vrabel wrote: On 13/06/16 11:50, Julien Grall wrote: The version 1 of the grant-table protocol only supports frame encoded on 32-bit. When the platform is supporting 48-bit physical address, the frame will be encoded on 36-bit which will lead a truncation

Re: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving access to a frame

2016-06-13 Thread Julien Grall
Hello Paul, On 13/06/16 13:12, Paul Durrant wrote: -Original Message- From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of Julien Grall Sent: 13 June 2016 11:51 To: boris.ostrov...@oracle.com; David Vrabel; jgr...@suse.com; sstabell...@kernel.org; konrad.w...@oracle.com

Re: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving access to a frame

2016-06-13 Thread Julien Grall
On 13/06/16 13:41, Julien Grall wrote: Hello Paul, On 13/06/16 13:12, Paul Durrant wrote: -Original Message- From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of Julien Grall Sent: 13 June 2016 11:51 To: boris.ostrov...@oracle.com; David Vrabel; jgr...@suse.com

Re: [Xen-devel] [PATCH] xen: grant-table: Check truncation when giving access to a frame

2016-06-13 Thread Julien Grall
On 13/06/16 13:45, Paul Durrant wrote: -Original Message- From: Julien Grall [mailto:julien.gr...@arm.com] Sent: 13 June 2016 13:42 To: Paul Durrant; boris.ostrov...@oracle.com; David Vrabel; jgr...@suse.com; sstabell...@kernel.org; konrad.w...@oracle.com Cc: Andrew Cooper; xen-de

Re: [PATCH v3 4/9] irqchip/gic-v2: Parse and export virtual GIC information

2016-03-14 Thread Julien Grall
Hi Christoffer, On 09/03/16 05:14, Christoffer Dall wrote: On Tue, Mar 08, 2016 at 11:29:28AM +, Julien Grall wrote: For now, the firmware tables are parsed 2 times: once in the GIC drivers, the other timer when initializing the vGIC. It means code duplication and make more tedious to add

Re: [RFC v5 03/17] iommu: introduce a reserved iova cookie

2016-03-03 Thread Julien Grall
, domain->ops = bus->iommu_ops; domain->type = type; + mutex_init(&domain->reserved_mutex); For consistency, the RB-tree reserved_binding_list should be initialized too: domain->reserved_binding_list = RB_ROOT; Cheers, -- Julien Grall

Re: [PATCH v2 2/6] KVM: arm/arm64: arch_timer: Rely on the arch timer to parse the firmware tables

2016-03-04 Thread Julien Grall
Hi Christoffer, On 03/03/16 19:38, Christoffer Dall wrote: On Thu, Feb 11, 2016 at 03:33:20PM +, Julien Grall wrote: [...] diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 6eb2c5d..3cdbefd 100644 --- a/drivers/clocksource/arm_arch_timer.c

[PATCH v3 8/9] KVM: arm/arm64: vgic: Rely on the GIC driver to parse the firmware tables

2016-03-08 Thread Julien Grall
information about the virtual GIC. With this change, the virtual GIC becomes agnostic to the firmware table and KVM will be able to initialize the vGIC on ACPI. Signed-off-by: Julien Grall --- Cc: Christoffer Dall Cc: Marc Zyngier Cc: Gleb Natapov Cc: Paolo Bonzini Changes in v2: - Use 0

[PATCH v3 1/9] clocksource: arm_arch_timer: Gather KVM specific information in a structure

2016-03-08 Thread Julien Grall
4 and ARM32. The function arch_timer_get_timecounter is kept for the time being and will be dropped in a subsequent patch. Signed-off-by: Julien Grall --- Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Marc Zyngier Changes in v3: - Rename the patch - Move the KVM change

[PATCH v3 9/9] clocksource: arm_arch_timer: Remove arch_timer_get_timecounter

2016-03-08 Thread Julien Grall
The only call of arch_timer_get_timecounter (in KVM) has been removed. Signed-off-by: Julien Grall --- Cc: Daniel Lezcano Cc: Thomas Gleixner Changes in v3: - Patch added --- drivers/clocksource/arm_arch_timer.c | 5 - include/clocksource/arm_arch_timer.h | 6 -- 2 files

[PATCH v3 4/9] irqchip/gic-v2: Parse and export virtual GIC information

2016-03-08 Thread Julien Grall
information. Also fill up the structure for GICv2. Signed-off-by: Julien Grall --- Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Changes in v2: - Use 0 rather than a negative value to know when the maintenance IRQ is not present. - Use resource for vcpu and

[PATCH v3 6/9] irqchip/gic-v3: Parse and export virtual GIC information

2016-03-08 Thread Julien Grall
Fill up the recently introduced gic_kvm_info with the virtual GIC information. Signed-off-by: Julien Grall Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier --- Changes in v3: - Add ACPI support Changes in v2: - Use 0 rather than a negative value to know when the

[PATCH v3 3/9] irqchip/gic-v2: Gather ACPI specific data in a single structure

2016-03-08 Thread Julien Grall
For now, there is only one member. More member will be added later. Signed-off-by: Julien Grall --- Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Changes in v2: - Patch added --- drivers/irqchip/irq-gic.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions

[PATCH v3 5/9] irqchip/gic-v3: Gather all ACPI specific data in a single structure

2016-03-08 Thread Julien Grall
Even though all the variables aren't marked with __initdata, they are only used during initialization. So the structure is marked with __initdata. Signed-off-by: Julien Grall --- Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Changes in v3: - Patch added --- dr

[PATCH v3 7/9] KVM: arm/arm64: arch_timer: Rely on the arch timer to parse the firmware tables

2016-03-08 Thread Julien Grall
virtual timer code. Signed-off-by: Julien Grall --- Cc: Christoffer Dall Cc: Marc Zyngier Cc: Gleb Natapov Cc: Paolo Bonzini Changes in v3: - Patch added --- virt/kvm/arm/arch_timer.c | 40 +++- 1 file changed, 11 insertions(+), 29 deletions

[PATCH v3 0/9] arm64: Add support of KVM with ACPI

2016-03-08 Thread Julien Grall
, Julien Grall (9): clocksource: arm_arch_timer: Gather KVM specific information in a structure clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ irqchip/gic-v2: Gather ACPI specific data in a single structure irqchip/gic-v2: Parse and export virtual GIC

[PATCH v3 2/9] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ

2016-03-08 Thread Julien Grall
subsequent patch. Signed-off-by: Julien Grall --- Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Marc Zyngier Changes in v3: - Move the KVM changes in a separate patch and rename the patch - Move the initialization of the virtual_irq to arch_timer_common_init

Re: [PATCH v4 9/9] clocksource: arm_arch_timer: Remove arch_timer_get_timecounter

2016-03-29 Thread Julien Grall
On 29/03/16 15:39, Daniel Lezcano wrote: On 03/24/2016 06:53 PM, Julien Grall wrote: The only call of arch_timer_get_timecounter (in KVM) has been removed. Signed-off-by: Julien Grall Acked-by: Christoffer Dall Hi Julien, Hi Daniel, do you want me to take this patch through my tree

Re: [PATCH v7 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-03-29 Thread Julien Grall
o re-use xen_for_each_gfn? This will avoid open-coding the loop to break down the Linux page. Regards, -- Julien Grall

Re: [PATCH v7 10/17] arm/xen: Get event-channel irq through HVM_PARAM when booting with ACPI

2016-03-29 Thread Julien Grall
+ } Can you invert the condition to remove one layer of indentation? Regards, -- Julien Grall

Re: [PATCH v7 13/17] ARM: Xen: Document UEFI support on Xen ARM virtual platforms

2016-03-29 Thread Julien Grall
regular UEFI stub. However +they differ because they are provided by the Xen hypervisor, together with a set +of UEFI runtime services implemented via hypercalls, see +http://xenbits.xen.org/docs/unstable/hypercall/x86_64/include,public,platform.h.html. Regards, [1] http://lists.xenproject.org/archives/html/xen-devel/2016-03/msg03413.html -- Julien Grall

Re: [PATCH v3 6/9] irqchip/gic-v3: Parse and export virtual GIC information

2016-03-22 Thread Julien Grall
Hi Graeme, On 22/03/16 11:27, Graeme Gregory wrote: On Tue, Mar 08, 2016 at 11:29:30AM +, Julien Grall wrote: @@ -1020,6 +1060,13 @@ gic_acpi_parse_madt_gicc(struct acpi_subtable_header *header, return -ENOMEM; gic_acpi_register_redist(gicc->gicr_base_addr

[PATCH v4 9/9] clocksource: arm_arch_timer: Remove arch_timer_get_timecounter

2016-03-24 Thread Julien Grall
The only call of arch_timer_get_timecounter (in KVM) has been removed. Signed-off-by: Julien Grall Acked-by: Christoffer Dall --- Cc: Daniel Lezcano Cc: Thomas Gleixner Changes in v4: - Add Christoffer's acked-by Changes in v3: - Patch added --- drivers/clocks

[PATCH v4 1/9] clocksource: arm_arch_timer: Gather KVM specific information in a structure

2016-03-24 Thread Julien Grall
4 and ARM32. The function arch_timer_get_timecounter is kept for the time being and will be dropped in a subsequent patch. Signed-off-by: Julien Grall --- Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Marc Zyngier Changes in v3: - Rename the patch - Move the KVM change

[PATCH v4 8/9] KVM: arm/arm64: vgic: Rely on the GIC driver to parse the firmware tables

2016-03-24 Thread Julien Grall
information about the virtual GIC. With this change, the virtual GIC becomes agnostic to the firmware table and KVM will be able to initialize the vGIC on ACPI. Signed-off-by: Julien Grall --- Cc: Christoffer Dall Cc: Marc Zyngier Cc: Gleb Natapov Cc: Paolo Bonzini Changes in v4: - Remove

[PATCH v4 5/9] irqchip/gic-v3: Gather all ACPI specific data in a single structure

2016-03-24 Thread Julien Grall
initialization. Therefore, the new variable, which hold the structure, can be marked with __initdata. Signed-off-by: Julien Grall --- Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Changes in v4: - Rework commit message Changes in v3: - Patch added --- drivers

[PATCH v4 0/9] arm64: Add support for KVM with ACPI

2016-03-24 Thread Julien Grall
introduces new helpers to retrieve the information from the different drivers in order to avoid duplication of the parsing code. To make the merge easier via the different trees, each patch modifies a single subsystem. For all the changes see the different patches. Yours sincerely, Julien Grall (9

[PATCH v4 4/9] irqchip/gic-v2: Parse and export virtual GIC information

2016-03-24 Thread Julien Grall
information. Also fill up the structure for GICv2. Signed-off-by: Julien Grall --- Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Changes in v4: - Change the flow to call gic_set_kvm_info when all the information are present. - Rework comments in arm-gic

[PATCH v4 6/9] irqchip/gic-v3: Parse and export virtual GIC information

2016-03-24 Thread Julien Grall
Fill up the recently introduced gic_kvm_info with the hardware information used for virtualization. Signed-off-by: Julien Grall Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier --- Changes in v4: - Change the flow to call gic_kvm_set_info only when all the mandatory

[PATCH v4 7/9] KVM: arm/arm64: arch_timer: Rely on the arch timer to parse the firmware tables

2016-03-24 Thread Julien Grall
virtual timer code. Signed-off-by: Julien Grall Acked-by: Christoffer Dall --- Cc: Christoffer Dall Cc: Marc Zyngier Cc: Gleb Natapov Cc: Paolo Bonzini Changes in v4: - Add Christoffer's acked-by Changes in v3: - Patch added --- virt/kvm/arm/arch_timer.c

[PATCH v4 2/9] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ

2016-03-24 Thread Julien Grall
subsequent patch. Signed-off-by: Julien Grall --- Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Marc Zyngier Changes in v4: - Move the initialization of the virtual_irq into arch_timer_init as KVM mandates the system registers timer. Changes in v3: - Move the KVM

[PATCH v4 3/9] irqchip/gic-v2: Gather ACPI specific data in a single structure

2016-03-24 Thread Julien Grall
The ACPI code requires to use global variables in order to collect information from the tables. For now, a single global variable is used, but more will be added in a subsequent patch. To make clear they are ACPI specific, gather all the information in a single structure. Signed-off-by: Julien

[PATCH v2 1/6] KVM: arm/arm64: arch_timer: Gather KVM specific information in a structure

2016-02-11 Thread Julien Grall
, a stub for the new helper hasn't been introduced because KVM is requiring the arch timer for both ARM64 and ARM32. Signed-off-by: Julien Grall --- Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Christoffer Dall Cc: Marc Zyngier Cc: Gleb Natapov Cc: Paolo Bonzini --- drivers/clocks

[PATCH v2 0/6] arm64: Add support of KVM with ACPI

2016-02-11 Thread Julien Grall
Julien Grall (6): KVM: arm/arm64: arch_timer: Gather KVM specific information in a structure KVM: arm/arm64: arch_timer: Rely on the arch timer to parse the firmware tables irqchip/gic-v2: Gather ACPI specific data in a single structure irqchip/gic-v2: Parse and export virtual GIC

[PATCH v2 3/6] irqchip/gic-v2: Gather ACPI specific data in a single structure

2016-02-11 Thread Julien Grall
For now, there is only one member. More member will be added later. Signed-off-by: Julien Grall --- Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Changes in v2: - Patch added --- drivers/irqchip/irq-gic.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions

[PATCH v2 2/6] KVM: arm/arm64: arch_timer: Rely on the arch timer to parse the firmware tables

2016-02-11 Thread Julien Grall
timer code. With this changes, the support for ACPI is coming free. Signed-off-by: Julien Grall --- Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Christoffer Dall Cc: Marc Zyngier Cc: Gleb Natapov Cc: Paolo Bonzini --- drivers/clocksource/arm_arch_timer.c | 2 ++ include/clocksource

[PATCH v2 6/6] KVM: arm/arm64: vgic: Rely on the GIC driver to parse the firmware tables

2016-02-11 Thread Julien Grall
information about the virtual GIC. With this change, the virtual GIC becomes agnostic to the firmware table and KVM will be able to initialize the vGIC on ACPI. Signed-off-by: Julien Grall --- Cc: Christoffer Dall Cc: Marc Zyngier Cc: Gleb Natapov Cc: Paolo Bonzini Changes in v2: - Use

[PATCH v2 5/6] irqchip/gic-v3: Parse and export virtual GIC information

2016-02-11 Thread Julien Grall
Fill up the recently introduced gic_kvm_info with the virtual GIC information. Signed-off-by: Julien Grall --- Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Changes in v2: - Use 0 rather than a negative value to know when the maintenance IRQ is not present

[PATCH v2 4/6] irqchip/gic-v2: Parse and export virtual GIC information

2016-02-11 Thread Julien Grall
information. Also fill up the structure for GICv2. Signed-off-by: Julien Grall --- Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Changes in v2: - Use 0 rather than a negative value to know when the maintenance IRQ is not present. - Use resource for vcpu and

[PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64

2015-09-28 Thread Julien Grall
quire some changes in Linux side. For now, introduce a new config options XEN_PCI which will be turned off for ARM platform. Reported-by: Robert Richter Signed-off-by: Julien Grall --- Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel --- drivers/xen/Kconfig | 6 +- driver

Re: [Xen-devel] [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64

2015-09-28 Thread Julien Grall
Hi David, On 28/09/15 14:52, David Vrabel wrote: > On 28/09/15 14:30, Julien Grall wrote: >> The PCI support for Xen doesn't compile on ARM/ARM64 when >> CONFIG_PCI_MMCONFIG=y: >> >> drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or >>

Re: [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64

2015-09-28 Thread Julien Grall
On 28/09/15 14:48, Stefano Stabellini wrote: > On Mon, 28 Sep 2015, Julien Grall wrote: >> The PCI support for Xen doesn't compile on ARM/ARM64 when >> CONFIG_PCI_MMCONFIG=y: >> >> drivers/xen/pci.c:31:25: fatal error: asm/pci_x86.h: No such file or >> direc

Re: [Xen-devel] [PATCH] xen/pci: Don't build Xen pci code for ARM and ARM64

2015-09-28 Thread Julien Grall
On 28/09/15 15:02, Boris Ostrovsky wrote: > On 09/28/2015 09:59 AM, Julien Grall wrote: >> Hi David, >> >> On 28/09/15 14:52, David Vrabel wrote: >>> On 28/09/15 14:30, Julien Grall wrote: >>>> The PCI support for Xen doesn't compile on ARM/ARM64 whe

Re: [PATCH v4 00/20] xen/arm64: Add support for 64KB page in Linux

2015-09-18 Thread Julien Grall
he overhead with my series is about 0.56%. 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 v1 0/8] xen/arm: vgic: Support 32-bit access for 64-bit register

2015-09-25 Thread Julien Grall
branch has been pushed based on the lastest staging: git://xenbits.xen.org/people/julieng/xen-unstable.git branch gicv3-32bit-v1 Sincerely yours, Julien Grall (8): xen/arm: io: remove mmio_check_t typedef xen/arm: io: Extend write/read handler to pass the register in parameter xen/arm

[PATCH v1 7/8] xen/arm: vgic: Introduce helpers to read/write/clear/set vGIC register ...

2015-09-25 Thread Julien Grall
supports any access size and expect the caller to validate the access size supported by the emulated registers. Finally, take the opportunity to fix the coding style in section we are modifying. Signed-off-by: Julien Grall --- I've only done quick tests. I sent them in order to help

[PATCH v1 4/8] xen/arm: vgic: ctlr stores a 32-bit hardware register so use uint32_t

2015-09-25 Thread Julien Grall
Signed-off-by: Julien Grall --- Changes in v2: - Patch added --- xen/include/asm-arm/domain.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h index c3f5a95..1a5bfd7 100644 --- a/xen/include/asm-arm

[PATCH v1 5/8] xen/arm: vgic: Optimize the way to store GICD_IPRIORITYR in the rank

2015-09-25 Thread Julien Grall
emulation code will now have to generate the GICD_PRIORITYR register for read access and split it to store in a convenient way. Signed-off-by: Julien Grall --- The real reason is I'd like to drop vgic_byte_* helpers in favors of more generic access helper. Although it would make the code to retriev

[PATCH v1 8/8] xen/arm: vgic-v3: Support 32-bit access for 64-bit registers

2015-09-25 Thread Julien Grall
access for them doesn't hurt. Note that we would need some extra care when they will be implemented (for instance GICR_PROPBASER). Signed-off-by: Julien Grall --- This is technically fixing boot of FreeBSD ARM64 guest with GICv3. AFAICT, Linux is not using 32-bit access in the GI

[PATCH v1 2/8] xen/arm: io: Extend write/read handler to pass the register in parameter

2015-09-25 Thread Julien Grall
From: Julien Grall Rather than letting each handler to retrieve the register used by the I/O access, add a new parameter to pass the register in parameter. This will help to implement generic register manipulation on I/O access such as sign-extension and endianess. Read handlers need to modify

[PATCH v1 6/8] xen/arm: vgic: Optimize the way to store the target vCPU in the rank

2015-09-25 Thread Julien Grall
is fine because the GIC spec doesn't require to return exactly the value written and it can be seen as if we decide to implement the register read-only. Finally take the opportunity to fix coding style in section we are modifying. Signed-off-by: Julien Grall --- The real reason is I&#

[PATCH v1 1/8] xen/arm: io: remove mmio_check_t typedef

2015-09-25 Thread Julien Grall
From: Julien Grall This typedef is a left-over of the previous MMIO emulation implementation. Signed-off-by: Julien Grall --- Changes in v2: - Patch added --- xen/include/asm-arm/mmio.h | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/include/asm-arm/mmio.h b/xen/include/asm

[PATCH v1 3/8] xen/arm: Support sign-extension for every read access

2015-09-25 Thread Julien Grall
vGIG emulation. Although there is no reason to not have it generically. So move the support just after we get the data from the MMIO emulation. Signed-off-by: Julien Grall --- I was thinking to completely drop the sign-extension support in Xen as it will be very unlikely to use ldrs

Re: [PATCH v1 0/8] xen/arm: vgic: Support 32-bit access for 64-bit register

2015-09-25 Thread Julien Grall
Please ignore this version, I've sent it to the wrong mailing list. Sorry for the noise. On 25/09/15 15:50, Julien Grall wrote: > Hi all, > > This series aims to fix the 32-bit access on 64-bit register. Some guest > OS such as FreeBSD and Linux (only in the ITS) use 32-bi

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

2015-08-20 Thread Julien Grall
On 20/08/2015 03:11, David Vrabel wrote: On 20/08/15 01:40, Julien Grall wrote: Hi, Ping? I'm missing some reviews on block and netfront code. We'd like to see this series going in Linux 4.3. Some distributions plans to use this version for aarch64 support. If we miss it, we won&

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

2015-08-10 Thread Julien Grall
Hi Stefano, On 10/08/15 11:50, Stefano Stabellini wrote: > On Fri, 7 Aug 2015, Julien Grall wrote: >> On ARM all dma-capable devices on a same platform may not be protected >> by an IOMMU. The DMA requests have to use the BFN (i.e MFN on ARM) in >> order to use correctly th

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

2015-08-10 Thread Julien Grall
back the gfn into a pfn and the into a page. The cost of the translation may be big and I wanted to avoid anymore XEN_PAGE_SHIFT in the code. In general we should avoid to deal with 4KB PFN when it's not necessary, it make the code more confusing to read. If your only concern is the size

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

2015-08-10 Thread Julien Grall
On 10/08/15 12:25, Stefano Stabellini wrote: > yes and page/pages: > > xen/biomerge: Don't allow biovec's to be merged when Linux is not using 4KB > pages Why the ' in biovec's ? Shouldn't we says biovecs directly? Regards, -- Julien Grall -- To unsu

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

2015-08-10 Thread Julien Grall
On 10/08/15 12:39, Wei Liu wrote: > On Mon, Aug 10, 2015 at 10:57:48AM +0100, Julien Grall wrote: >> while (size > 0) { >> BUG_ON(offset >= PAGE_SIZE); >> >> bytes = PAGE_SIZE - offset; >> if (bytes &

Re: [Xen-devel] [PATCH v3 19/20] xen/privcmd: Add support for Linux 64KB page granularity

2015-08-10 Thread Julien Grall
Hi Stefano, On 10/08/15 13:57, Stefano Stabellini wrote: > On Mon, 10 Aug 2015, David Vrabel wrote: >> On 10/08/15 13:03, Stefano Stabellini wrote: >>> On Fri, 7 Aug 2015, Julien Grall wrote: >>>> - rc = HYPERVISOR_memory_op(XENMEM_add_to_physmap_range, &xatp)

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

2015-08-10 Thread Julien Grall
his optimization for later. Anyway, I'm wondering if we could re-use the lru field to link the page when allocate them and retrieve in the second loop in order to avoid the pages array. Regards, -- Julien Grall -- To unsubscribe from this list: send the line "unsubscribe linux-kernel

[PATCH] xen/xenbus: Don't leak memory when unmapping the ring on HVM backend

2015-08-10 Thread Julien Grall
s when the backends are running in HVM domains. Signed-off-by: Julien Grall --- Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: Wei Liu Appeared in Linux 4.1. HVM backend, which is always the case on ARM, will leak every mapped ring (i.e ~12KB per domain with 1 disk

[PATCH] net/bridge: Add missing in6_dev_put in br_validate_ipv6

2015-07-03 Thread Julien Grall
estroy any netdevice using ipv6 and bridge. Spotted while trying to destroy a Xen guest on the upstream Linux: "unregister_netdevice: waiting for vif1.0 to become free. Usage count = 1" Signed-off-by: Julien Grall Cc: Bernhard Thaler Cc: Pablo Neira Ayuso Cc: f...@strlen.de Cc: ian.ca

Re: [PATCH] net/bridge: Add missing in6_dev_put in br_validate_ipv6

2015-07-06 Thread Julien Grall
Hi, On 03/07/15 21:42, Florian Westphal wrote: > Julien Grall wrote: >> The commit efb6de9b4ba0092b2c55f6a52d16294a8a698edd "netfilter: bridge: >> forward IPv6 fragmented packets" introduced a new function >> br_validate_ipv6 which take a reference on the inet6 dev

Re: [Xen-devel] [PATCH] net/bridge: Add missing in6_dev_put in br_validate_ipv6

2015-07-06 Thread Julien Grall
On 06/07/15 12:19, Florian Westphal wrote: > Julien Grall wrote: >> On 03/07/15 21:42, Florian Westphal wrote: >>> I think it makes more sense to use __in6_dev_get() instead which doesn't >>> take a reference. >> >> __in6_dev_get requires to hold rc

[PATCH v2] net/bridge: Use __in6_dev_get rather than in6_dev_get in br_validate_ipv6

2015-07-07 Thread Julien Grall
aiting for vif1.0 to become free. Usage count = 1" Signed-off-by: Julien Grall Cc: Bernhard Thaler Cc: Pablo Neira Ayuso Cc: f...@strlen.de Cc: ian.campb...@citrix.com Cc: wei.l...@citrix.com Cc: Bob Liu --- Note that it's impossible to create new guest after this message.

Re: [Xen-devel] [PATCH] xen-blkback: free requests on disconnection

2015-09-21 Thread Julien Grall
Hi Konrad, On 09/09/2015 16:02, Konrad Rzeszutek Wilk wrote: Konrad, would you like me to resend the patch with the modified commit message, or do you plan to amend it yourself while committing? I will amend it. Thanks! What the status for this patch? Regards, -- Julien Grall -- To

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

2015-07-13 Thread Julien Grall
Hi Boris, On 13/07/2015 22:13, Boris Ostrovsky wrote: On 07/09/2015 04:42 PM, Julien Grall wrote: - struct remap_data { xen_pfn_t *fgmfn; /* foreign domain's gmfn */ +xen_pfn_t *efgmfn; /* pointer to the end of the fgmfn array */ It might be better to keep size of fgmfn

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

2015-07-14 Thread Julien Grall
Hi Boris, On 14/07/2015 17:28, Boris Ostrovsky wrote: On 07/13/2015 06:05 PM, Julien Grall wrote: On 13/07/2015 22:13, Boris Ostrovsky wrote: On 07/09/2015 04:42 PM, Julien Grall wrote: - struct remap_data { xen_pfn_t *fgmfn; /* foreign domain's gmfn */ +xen_pfn_t *e

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

2015-07-15 Thread Julien Grall
Hi Konrad, On 10/07/2015 21:12, Konrad Rzeszutek Wilk wrote: On Thu, Jul 09, 2015 at 09:42:21PM +0100, Julien Grall wrote: When Linux is using 64K page granularity, every page will be slipt in multiple non-contiguous 4K MFN (page granularity of Xen). But you don't care about that o

Re: [PATCH] arm/arm64: xen: Fix to convert percpu address to gfn correctly

2020-10-05 Thread Julien Grall
define gfn_to_virt(m)(__va(gfn_to_pfn(m) << XEN_PAGE_SHIFT)) +#define percpu_to_gfn(v) \ + (pfn_to_gfn(per_cpu_ptr_to_phys(v) >> XEN_PAGE_SHIFT)) + /* Only used in PV code. But ARM guests are always HVM. */ static inline xmaddr_t arbitrary_virt_to_machine(void *vaddr) { Cheers, -- Julien Grall

Re: [PATCH 01/10] swiotlb-xen: use vmalloc_to_page on vmalloc virt addresses

2020-05-22 Thread Julien Grall
Hi Stefano, On 22/05/2020 04:54, Stefano Stabellini wrote: On Thu, 21 May 2020, Julien Grall wrote: Hi, On 21/05/2020 00:45, Stefano Stabellini wrote: From: Boris Ostrovsky Don't just assume that virt_to_page works on all virtual addresses. Instead add a is_vmalloc_addr check an

Re: [PATCH 02/10] swiotlb-xen: remove start_dma_addr

2020-05-22 Thread Julien Grall
Hi, On 22/05/2020 04:55, Stefano Stabellini wrote: On Thu, 21 May 2020, Julien Grall wrote: Hi, On 21/05/2020 00:45, Stefano Stabellini wrote: From: Stefano Stabellini It is not strictly needed. Call virt_to_phys on xen_io_tlb_start instead. It will be useful not to have a start_dma_addr

Re: [PATCH v3 4/4] xen: add helpers to allocate unpopulated memory

2020-07-28 Thread Julien Grall
se of hotplug in the balloon code conditional (maybe using CONFIG_ARM64 and CONFIG_ARM)? Cheers, -- Julien Grall

Re: [PATCH v3 4/4] xen: add helpers to allocate unpopulated memory

2020-07-28 Thread Julien Grall
Hi Roger, On 28/07/2020 17:59, Roger Pau Monné wrote: On Tue, Jul 28, 2020 at 05:48:23PM +0100, Julien Grall wrote: Hi, On 27/07/2020 10:13, Roger Pau Monne wrote: To be used in order to create foreign mappings. This is based on the ZONE_DEVICE facility which is used by persistent memory

Re: [PATCH v2 04/11] x86/xen: add system core suspend and resume callbacks

2020-07-22 Thread Julien Grall
); bool xen_is_xen_suspend(void); +void xen_setup_syscore_ops(void); The function is only implemented and used by x86. So shouldn't this be declared in an x86 header? Cheers, -- Julien Grall

Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a separate file

2019-06-05 Thread Julien Grall
valid. Signed-off-by: Julien Grall --- This code will be used in the virt code for allocating VMID. I am not entirely sure where to place it. Lib could potentially be a good place but I am not entirely convinced the algo as it is could be used by other architecture. Looking at x86, it seems that it

Re: [PATCH V2 2/4] csky: Add new asid lib code from arm

2019-06-21 Thread Julien Grall
Hi, On 21/06/2019 10:39, guo...@kernel.org wrote: Signed-off-by: Guo Ren Cc: Arnd Bergmann Cc: Julien Grall --- arch/arm64/lib/asid.c| 9 ++- This change should be in a separate e-mail with the Arm64 maintainers in CC. But you seem to have a copy of the allocator in csky now

[PATCH] arm64/cpufeature: Convert hook_lock to raw_spin_lock_t in cpu_enable_ssbs()

2019-05-30 Thread Julien Grall
raw_spin_lock() is required here. Given this is already done under stop_machine() and the work done under the lock is quite small, the latency should not increase too much. Signed-off-by: Julien Grall --- It was noticed when looking at the current use of spin_lock in arch/arm64. I don't h

Re: [PATCH] arm64/cpufeature: Convert hook_lock to raw_spin_lock_t in cpu_enable_ssbs()

2019-05-30 Thread Julien Grall
Hi Will, On 5/30/19 1:01 PM, Will Deacon wrote: On Thu, May 30, 2019 at 12:30:58PM +0100, Julien Grall wrote: cpu_enable_ssbs() is called via stop_machine() as part of the cpu_enable callback. A spin lock is used to ensure the hook is registered before the rest of the callback is executed. On

Re: [OSSTEST PATCH] ts-kernel-build: Disable CONFIG_ARCH_QCOM in Xen Project CI

2019-05-31 Thread Julien Grall
is is not present in all relevant stable branches. We currently have no Qualcomm hardware in the Xen Project test lab so we do not need this enabled. CC: Julien Grall CC: linux-arm-...@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: Stephen Boyd CC: Andy Gross CC: Bjorn Andersson CC: Ava

Re: [RFC PATCH] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state

2019-04-11 Thread Julien Grall
Hi Dave, On 4/5/19 4:07 PM, Dave Martin wrote: On Fri, Apr 05, 2019 at 10:02:45AM +0100, Julien Grall wrote: +#ifdef CONFIG_KERNEL_MODE_NEON + /* * may_use_simd - whether it is allowable at this time to issue SIMD *instructions or access the SIMD register file diff

Re: [RFC PATCH] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state

2019-04-11 Thread Julien Grall
Hi Dave, On 4/11/19 5:34 PM, Dave Martin wrote: On Thu, Apr 11, 2019 at 04:58:41PM +0100, Julien Grall wrote: Hi Dave, On 4/5/19 4:07 PM, Dave Martin wrote: On Fri, Apr 05, 2019 at 10:02:45AM +0100, Julien Grall wrote: +#ifdef CONFIG_KERNEL_MODE_NEON + /* * may_use_simd - whether it is

[PATCH v2 0/3] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state

2019-04-12 Thread Julien Grall
: * hackbench 1000 process 1000 (20 times) * 3.4% quicker Note that while the benchmark has been done on 5.1-rc4, the patch series is based on kvm-arm/next as it has few conflicts with the SVE KVM series. Cheers, Julien Grall (3): arm64/fpsimd: Remove the prototype for sve_flush_cpu_state() arch

[PATCH v2 1/3] arm64/fpsimd: Remove the prototype for sve_flush_cpu_state()

2019-04-12 Thread Julien Grall
The function sve_flush_cpu_state() has been removed in commit 21cdd7fd76e3 "KVM: arm64: Remove eager host SVE state saving". So remove the associated prototype in asm/fpsimd.h. Signed-off-by: Julien Grall --- Changes in v2: - Patch added --- arch/arm64/include/asm/fp

[PATCH v2 3/3] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state

2019-04-12 Thread Julien Grall
has been benchmarked on Linux 5.1-rc4 with defconfig. On Juno2: * hackbench 100 process 1000 (10 times) * .7% quicker On ThunderX 2: * hackbench 1000 process 1000 (20 times) * 3.4% quicker Signed-off-by: Julien Grall --- Changes in v2: - Remove spurious call to

[PATCH v2 2/3] arch/arm64: fpsimd: Introduce fpsimd_save_and_flush_cpu_state() and use it

2019-04-12 Thread Julien Grall
fpsimd_save() and fpsimd_flush_cpu_state(). This has also the advantage to remove any external call of fpsimd_save() and fpsimd_flush_cpu_state(), so they can be turned static. Lastly, the new function can also be used in the PM notifier. Signed-off-by: Julien Grall --- Changes in v2

Re: [PATCH] arm64: xen: Implement EFI reset_system callback

2017-04-20 Thread Julien Grall
+0200, Juergen Gross wrote: On 06/04/17 18:06, Daniel Kiper wrote: Hi Julien, On Thu, Apr 06, 2017 at 04:39:13PM +0100, Julien Grall wrote: Hi Daniel, On 06/04/17 16:20, Daniel Kiper wrote: On Thu, Apr 06, 2017 at 04:38:24PM +0200, Juergen Gross wrote: On 06/04/17 16:27, Daniel Kiper wrote

[PATCH] arm64: xen: Implement EFI reset_system callback

2017-04-05 Thread Julien Grall
(null)>] (null) [ 37.434982] [] machine_restart+0x6c/0x70 [ 37.440550] [] kernel_restart+0x6c/0x78 [ 37.446030] [] SyS_reboot+0x130/0x228 [ 37.451337] [] el0_svc_naked+0x24/0x28 [ 37.456737] Code: bad PC value [ 37.459891] ---[ end trace 76e2fc17e050aecd ]--- Signed-off-by: Julien Gral

Re: [PATCH] arm64: xen: Implement EFI reset_system callback

2017-04-06 Thread Julien Grall
Hi Juergen, On 06/04/17 07:23, Juergen Gross wrote: On 05/04/17 21:49, Boris Ostrovsky wrote: On 04/05/2017 02:14 PM, Julien Grall wrote: The x86 code has theoritically a similar issue, altought EFI does not seem to be the preferred method. I have left it unimplemented on x86 and CCed Linux

Re: [PATCH] arm64: xen: Implement EFI reset_system callback

2017-04-06 Thread Julien Grall
Hi Daniel, On 06/04/17 15:27, Daniel Kiper wrote: On Thu, Apr 06, 2017 at 09:32:32AM +0100, Julien Grall wrote: Hi Juergen, On 06/04/17 07:23, Juergen Gross wrote: On 05/04/17 21:49, Boris Ostrovsky wrote: On 04/05/2017 02:14 PM, Julien Grall wrote: The x86 code has theoritically a similar

Re: [PATCH] arm64: xen: Implement EFI reset_system callback

2017-04-06 Thread Julien Grall
Hi Daniel, On 06/04/17 16:20, Daniel Kiper wrote: On Thu, Apr 06, 2017 at 04:38:24PM +0200, Juergen Gross wrote: On 06/04/17 16:27, Daniel Kiper wrote: On Thu, Apr 06, 2017 at 09:32:32AM +0100, Julien Grall wrote: Hi Juergen, On 06/04/17 07:23, Juergen Gross wrote: On 05/04/17 21:49, Boris

Re: [For Linux 4/4] xen/displif: add ABI for para-virtual display

2017-04-07 Thread Julien Grall
efine XENDISPL_IN_RING_REF(page, idx) \ + (XENDISPL_IN_RING((page))[(idx) % XENDISPL_IN_RING_LEN]) + +#endif /* __XEN_PUBLIC_IO_DISPLIF_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ Che

Re: "Consolidate get_dma_ops" breaks Xen on ARM

2017-04-11 Thread Julien Grall
ops(struct device *dev) { + if (xen_initial_domain()) + return xen_dma_ops; if (dev && dev->dma_ops) return dev->dma_ops; return get_arch_dma_ops(dev ? dev->bus : NULL); It is not nice as this is common code, but I can't find a better solution so far. Any opinions? Cheers, -- Julien Grall

Re: "Consolidate get_dma_ops" breaks Xen on ARM

2017-04-13 Thread Julien Grall
Hi Stefano, Sorry for the late answer. On 12/04/17 00:39, Stefano Stabellini wrote: On Tue, 11 Apr 2017, Catalin Marinas wrote: On Tue, Apr 11, 2017 at 01:43:28PM +0100, Julien Grall wrote: On 11/04/17 02:14, Bart Van Assche wrote: On 04/10/17 17:31, Stefano Stabellini wrote: I think the

<    2   3   4   5   6   7   8   >