Re: [PATCH v2 10/17] kvm: arm64: Dynamic configuration of VTCR and VTTBR mask

2018-04-30 Thread Julien Grall
+ * descriptors in section D4.2.8 in ARM DDI 0487B.b. + * + * The algorithm defines the expectaions on the BaseAddress (for the page NIT: s/expectaions/expectations/ Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lis

Re: [PATCH v2 08/17] kvm: arm/arm64: Prepare for VM specific stage2 translations

2018-04-27 Thread Julien Grall
Hi Suzuki, On 27/04/18 16:58, Suzuki K Poulose wrote: On 27/04/18 16:22, Suzuki K Poulose wrote: On 26/04/18 14:35, Julien Grall wrote: Hi Suzuki, On 27/03/18 14:15, Suzuki K Poulose wrote: Right now the stage2 page table for a VM is hard coded, assuming an IPA of 40bits. As we are about to

Re: [PATCH v2 05/17] arm64: Helper for parange to PASize

2018-04-27 Thread Julien Grall
On 27/04/18 16:18, Suzuki K Poulose wrote: On 26/04/18 11:58, Julien Grall wrote: Hi Suzuki, On 27/03/18 14:15, Suzuki K Poulose wrote: Add a helper to convert ID_AA64MMFR0_EL1:PARange to they physical size shift. Limit the size to the maximum supported by the kernel. We are about to move

Re: [kvmtool PATCH 21/17] kvmtool: arm: Add support for creating VM with PA size

2018-04-26 Thread Julien Grall
pe other than 0. So I think the best would be to bail out if KVM_ARM_GET_MAX_VM_PHYS_SHIFT does not exist. For safety, you could even check that arch.phys_shift is always 40 when running under older Linux. Cheers, -- Julien Grall ___ kvmarm mailing li

Re: [PATCH v2 08/17] kvm: arm/arm64: Prepare for VM specific stage2 translations

2018-04-26 Thread Julien Grall
M_PHYS_SHIFT +#define kvm_phys_size(kvm) (_AC(1, ULL) << kvm_phys_shift(kvm)) NIT: is the _AC(...) necessary? It does not look like this function is going to be usable in assembly. +#define kvm_phys_mask(kvm) (kvm_phys_size(kvm) - _AC(1, ULL)) Same here

Re: [PATCH v2 05/17] arm64: Helper for parange to PASize

2018-04-26 Thread Julien Grall
@@ u32 __hyp_text __init_stage2_translation(void) write_sysreg(val, vtcr_el2); - return parange; + return phys_shift; } -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v2 04/17] arm64: Refactor pud_huge for reusability

2018-04-26 Thread Julien Grall
Hi Suzuki, On 27/03/18 14:15, Suzuki K Poulose wrote: Make pud_huge reusable for stage2 tables, independent of the stage1 levels. Cc: Steve Capper Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Cc: Christoffer Dall Signed-off-by: Suzuki K Poulose Reviewed-by: Julien Grall

Re: [PATCH v2 03/17] arm64: Make page table helpers reusable

2018-04-26 Thread Julien Grall
: Julien Grall Cheers, --- arch/arm64/include/asm/pgalloc.h | 34 +++ arch/arm64/include/asm/pgtable.h | 60 +--- 2 files changed, 66 insertions(+), 28 deletions(-) diff --git a/arch/arm64/include/asm/pgalloc.h b/arch/arm64/include/asm

Re: [PATCH v2 09/17] kvm: arm64: Make stage2 page table layout dynamic

2018-04-25 Thread Julien Grall
, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v2 13/17] kvm: arm/arm64: Allow tuning the physical address size for VM

2018-04-25 Thread Julien Grall
return ret; kvm->arch.last_vcpu_ran = alloc_percpu(typeof(*kvm->arch.last_vcpu_ran)); if (!kvm->arch.last_vcpu_ran) Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columb

Re: [PATCH v5 36/40] KVM: arm/arm64: Handle VGICv2 save/restore from the main VGIC code

2018-03-15 Thread Julien Grall
optimizations. Signed-off-by: Christoffer Dall Reviewed-by: Julien Grall Cheers, --- Notes: Changes since v1: - Removed unnecessary kvm_hyp.h include - Adapted the patch based on having gotten rid of storing the elrsr prior to this patch. - No longer change the

Re: [PATCH v5 17/40] KVM: arm64: Move userspace system registers into separate function

2018-03-05 Thread Julien Grall
. We also take this chance to rename the function saving/restoring the remaining system register to make it clear this function deals with the EL1 system registers. Reviewed-by: Andrew Jones Reviewed-by: Marc Zyngier Signed-off-by: Christoffer Dall Reviewed-by: Julien Grall Cheers, ---

Re: [PATCH v5 03/40] KVM: arm64: Avoid storing the vcpu pointer on the stack

2018-03-05 Thread Julien Grall
n VHE, and the _EL2 accessor does the same thing on both systems. Cc: Ard Biesheuvel Reviewed-by: Marc Zyngier Reviewed-by: Andrew Jones Signed-off-by: Christoffer Dall Reviewed-by: Julien Grall Cheers, --- Notes: Changes since v4: - Clarified rationale in commit me

Re: [PATCH v4 35/40] KVM: arm/arm64: Get rid of vgic_elrsr

2018-02-23 Thread Julien Grall
reading different types here. I can't find any endianness code removed in this code. What did I miss? Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v4 31/40] KVM: arm64: Move common VHE/non-VHE trap config in separate functions

2018-02-23 Thread Julien Grall
vcpu->arch.hcr_el2 = read_sysreg(hcr_el2); + __deactivate_traps_common(); __deactivate_traps_arch()(); - write_sysreg(0, hstr_el2); - write_sysreg(0, pmuserenr_el0); } static void __hyp_text __activate_vm(struct kvm *kvm) Cheers, -- Julien Grall ___

Re: [PATCH v4 29/40] KVM: arm64: Prepare to handle deferred save/restore of 32-bit registers

2018-02-23 Thread Julien Grall
rn; + case DBGVCR32_EL2: write_sysreg_s(val, SYS_DBGVCR32_EL2); return; } immediate_write: Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v4 28/40] KVM: arm64: Defer saving/restoring 64-bit sysregs to vcpu load/put on VHE

2018-02-22 Thread Julien Grall
On 22/02/18 18:30, Julien Grall wrote: Hi Christoffer, On 15/02/18 21:03, Christoffer Dall wrote: Some system registers do not affect the host kernel's execution and can therefore be loaded when we are about to run a VCPU and we don't have to restore the host state to the hardware

Re: [PATCH v4 28/40] KVM: arm64: Defer saving/restoring 64-bit sysregs to vcpu load/put on VHE

2018-02-22 Thread Julien Grall
te_write: Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v4 25/40] KVM: arm64: Introduce framework for accessing deferred sysregs

2018-02-22 Thread Julien Grall
e when HCR_EL2.VSE is set */ u64 vsesr_el2; + + /* True when deferrable sysregs are loaded on the physical CPU, +* see kvm_vcpu_load_sysregs and kvm_vcpu_put_sysregs. */ NIT: I think the preferred style comment is /* * Foo */

Re: [PATCH v4 24/40] KVM: arm64: Rewrite system register accessors to read/write functions

2018-02-19 Thread Julien Grall
MU_USERENR_MASK; + } else { NIT: There is a double space between else and {. + p->regval = __vcpu_sys_reg(vcpu, PMUSERENR_EL0) & ARMV8_PMU_USERENR_MASK; } Cheers, -- Julien Grall _

Re: [PATCH v4 17/40] KVM: arm64: Move userspace system registers into separate function

2018-02-19 Thread Julien Grall
like it would be possible to have hardware where ACTLR_EL1 would still have an effect on host EL0. I also read the comments on the version 2 of this patch but I wasn't able to find what I missing. Cheers, -- Julien Grall ___ kvmarm mailing l

Re: [PATCH v3 17/41] KVM: arm64: Remove noop calls to timer save/restore from VHE switch

2018-02-19 Thread Julien Grall
Hi Christoffer, Sorry for the late reply. On 13/02/18 22:31, Christoffer Dall wrote: On Fri, Feb 09, 2018 at 05:53:43PM +, Julien Grall wrote: Hi Christoffer, On 01/12/2018 12:07 PM, Christoffer Dall wrote: The VHE switch function calls __timer_enable_traps and __timer_disable_traps

Re: [PATCH v4 03/40] KVM: arm64: Avoid storing the vcpu pointer on the stack

2018-02-19 Thread Julien Grall
ht want to remove this paragraph as you don't seem to have rework that part of the code in this version. Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v3 18/41] KVM: arm64: Move userspace system registers into separate function

2018-02-09 Thread Julien Grall
p of the function says the host must save ACTLR_EL1 in the VHE case. But AFAICT, after this patch the register will not get saved in the host context. Did I miss anything? Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.e

Re: [PATCH v3 17/41] KVM: arm64: Remove noop calls to timer save/restore from VHE switch

2018-02-09 Thread Julien Grall
* Physical counter access is allowed +*/ + val = read_sysreg(cnthctl_el2); + val &= ~CNTHCTL_EL1PCEN; + val |= CNTHCTL_EL1PCTEN; + write_sysreg(val, cnthctl_el2); } Cheers, -- Julien Grall ___ kvmar

Re: [PATCH v3 14/41] KVM: arm64: Introduce VHE-specific kvm_vcpu_run

2018-02-09 Thread Julien Grall
kvm_vcpu_run_vhe(vcpu); + else + ret = kvm_call_hyp(__kvm_vcpu_run_nvhe, vcpu); vcpu->mode = OUTSIDE_GUEST_MODE; vcpu->stat.exits++; Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm

Re: [PATCH v3 09/41] KVM: arm64: Defer restoring host VFP state to vcpu_put

2018-02-09 Thread Julien Grall
- -bool __hyp_text __fpsimd_enabled(void) Now that __fpsimd_enabled is removed, I think you need to remove the prototype in arch/arm64/include/kvm_hyp.h too. -{ - return __fpsimd_is_enabled()(); -} Cheers, -- Julien Grall ___ kvmarm m

Re: [PATCH v3 08/41] KVM: arm/arm64: Introduce vcpu_el1_is_32bit

2018-02-09 Thread Julien Grall
by: Julien Grall Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v3 05/41] KVM: arm64: Move HCR_INT_OVERRIDE to default HCR_EL2 guest flag

2018-02-09 Thread Julien Grall
g(hcr_el2); - val |= HCR_INT_OVERRIDE; val |= vcpu->arch.irq_lines; write_sysreg(val, hcr_el2); Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v3 04/41] KVM: arm64: Rework hyp_panic for VHE and non-VHE

2018-02-09 Thread Julien Grall
Hi Christoffer, On 02/08/2018 01:24 PM, Christoffer Dall wrote: On Mon, Feb 05, 2018 at 06:04:25PM +, Julien Grall wrote: On 12/01/18 12:07, Christoffer Dall wrote: + panic(__hyp_panic_string, spsr, elr, read_sysreg_el2(esr), read_sysreg_el2(far

Re: [PATCH v3 04/41] KVM: arm64: Rework hyp_panic for VHE and non-VHE

2018-02-05 Thread Julien Grall
On 05/02/18 18:04, Julien Grall wrote: On 12/01/18 12:07, Christoffer Dall wrote: @@ -436,37 +446,31 @@ static void __hyp_text __hyp_call_panic_nvhe(u64 spsr, u64 elr, u64 par, read_sysreg(hpfar_el2), par, vcpu);   } -static void __hyp_text __hyp_call_panic_vhe(u64 spsr, u64

Re: [PATCH v3 04/41] KVM: arm64: Rework hyp_panic for VHE and non-VHE

2018-02-05 Thread Julien Grall
elr, par, host_ctxt); unreachable(); } Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v3 03/41] KVM: arm64: Avoid storing the vcpu pointer on the stack

2018-02-05 Thread Julien Grall
ectre is also touching this code (see https://patchwork.kernel.org/patch/10190297/). Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v3 02/41] KVM: arm/arm64: Move vcpu_load call after kvm_vcpu_first_run_init

2018-02-05 Thread Julien Grall
flag. Signed-off-by: Christoffer Dall Reviewed-by: Julien Grall Cheers, --- virt/kvm/arm/arch_timer.c | 7 --- virt/kvm/arm/arm.c| 22 -- virt/kvm/arm/vgic/vgic-init.c | 11 --- 3 files changed, 8 insertions(+), 32 deletions(-) diff --git a

Re: [PATCH v3 01/41] KVM: arm/arm64: Avoid vcpu_load for other vcpu ioctls than KVM_RUN

2018-02-05 Thread Julien Grall
we're actually going to run the vcpu. Signed-off-by: Christoffer Dall Reviewed-by: Julien Grall Cheers, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v4 49/56] KVM: arm/arm64: vgic-new: vgic_init: implement kvm_vgic_hyp_init

2016-05-17 Thread Julien Grall
ns an error code otherwise + */ +int vgic_v3_probe(const struct gic_kvm_info *info) Regards, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PULL 00/29] KVM/ARM Changes for v4.7

2016-05-17 Thread Julien Grall
Hello, On 17/05/2016 00:28, Itaru Kitayama wrote: The new v4.6 upstream kernel gets to the prompt on Mustang (Rev A3). I would recommend you to bissect Linux and finger one or multiple commits which break booting on your board. Regards, -- Julien Grall

Re: [PULL 00/29] KVM/ARM Changes for v4.7

2016-05-15 Thread Julien Grall
c1 so I would recommend you to try Linux-next. Regards, -- Julien Grall ___ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Re: [PATCH v6 05/10] irqchip/gic-v3: Prefix all pr_* messages by "GICv3: "

2016-04-26 Thread Julien Grall
Hi Hanjun, Sorry for the late answer. On 13/04/16 11:01, Hanjun Guo wrote: On 2016/4/11 23:32, Julien Grall wrote: Currently, most of the pr_* messages in the GICv3 driver don't have a prefix. Add one to make clear where the messages come from. Signed-off-by: Julien Grall --- Ch

[PATCH v6 10/10] clocksource: arm_arch_timer: Remove arch_timer_get_timecounter

2016-04-11 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 v6 00/10] arm64: Add support for KVM with ACPI

2016-04-11 Thread Julien Grall
are merged via the clocksource tree Patches #2-#7 are merged via the irqchip tree 2) Patches #8-#9 are merge via the KVM tree 3) Patch #10 is merged via the clocksource tree. For all the changes see in each patch. Regards, Julien Grall (10): clocksource: arm_arch_timer: Gather KVM specific

[PATCH v6 01/10] clocksource: arm_arch_timer: Gather KVM specific information in a structure

2016-04-11 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 Acked-by: Christoffer Dall --- Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Marc Zyngier Changes in v6: - Add Christoffer'

[PATCH v6 07/10] irqchip/gic-v3: Parse and export virtual GIC information

2016-04-11 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 v6: - Skip unusable CPUs Changes in v5: - Remove the alignment check

[PATCH v6 08/10] KVM: arm/arm64: arch_timer: Rely on the arch timer to parse the firmware tables

2016-04-11 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 v6 03/10] irqchip/gic-v2: Gather ACPI specific data in a single structure

2016-04-11 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 v6 06/10] irqchip/gic-v3: Gather all ACPI specific data in a single structure

2016-04-11 Thread Julien Grall
initialization. Therefore, the new variable, which hold the structure, can be marked with __initdata. Signed-off-by: Julien Grall Acked-by: Christoffer Dall Reviewed-by: Hanjun Guo --- Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Tomasz Nowicki Changes in v6: - Add

[PATCH v6 02/10] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ

2016-04-11 Thread Julien Grall
subsequent patch. Signed-off-by: Julien Grall Acked-by: Christoffer Dall --- Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: Marc Zyngier Changes in v6: - Add Christoffer's acked-by Changes in v4: - Move the initialization of the virtual_irq into arch_timer_in

[PATCH v6 05/10] irqchip/gic-v3: Prefix all pr_* messages by "GICv3: "

2016-04-11 Thread Julien Grall
Currently, most of the pr_* messages in the GICv3 driver don't have a prefix. Add one to make clear where the messages come from. Signed-off-by: Julien Grall --- Changes in v6: - Patch added --- drivers/irqchip/irq-gic-v3.c | 2 ++ 1 file changed, 2 insertions(+) diff --

[PATCH v6 09/10] KVM: arm/arm64: vgic: Rely on the GIC driver to parse the firmware tables

2016-04-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 Reviewed-by: Christoffer Dall --- Cc: Marc Zyngier Cc: Gleb Natapov Cc: Paolo Bonzini Changes in v6

[PATCH v6 04/10] irqchip/gic-v2: Parse and export virtual GIC information

2016-04-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 v6: - Move the code to get the maintenance interrupt later. It will avoid to call acpi_unregister_gsi when the function fails

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

2016-04-11 Thread Julien Grall
Hello Hanjun, On 11/04/16 06:27, Hanjun Guo wrote: On 2016/4/4 19:37, Julien Grall wrote: +static void __init gic_acpi_setup_kvm_info(void) +{ +int irq; + +if (!gic_acpi_collect_virt_info()) { +pr_warn("Unable to get hardware information used for virtualizat

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

2016-04-11 Thread Julien Grall
On 09/04/16 03:29, Shanker Donthineni wrote: Hi Julien, Hello Shanker, On 04/04/2016 06:37 AM, Julien Grall wrote: +static int __init gic_acpi_parse_virt_madt_gicc(struct acpi_subtable_header *header, + const unsigned long end) +{ + struct

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

2016-04-11 Thread Julien Grall
On 11/04/16 04:17, Hanjun Guo wrote: Hi Julian, Hi Hanjun, On 2016/4/4 19:37, Julien Grall wrote: @@ -1302,6 +1339,41 @@ static bool __init gic_validate_dist(struct acpi_subtable_header *header, #define ACPI_GICV2_DIST_MEM_SIZE(SZ_4K) #define ACPI_GIC_CPU_IF_MEM_SIZE(SZ_8K

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

2016-04-06 Thread Julien Grall
Hi Christoffer, On 06/04/2016 18:28, Christoffer Dall wrote: On Mon, Apr 04, 2016 at 12:37:31PM +0100, Julien Grall wrote: Hello, This patch series allows KVM to work with ACPI on ARM64. Currently, the firmware tables are parsed by the the virtual timer and virtual GIC code in order to

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

2016-04-06 Thread Julien Grall
Hi Christoffer, On 06/04/2016 18:22, Christoffer Dall wrote: On Mon, Apr 04, 2016 at 12:37:37PM +0100, Julien Grall wrote: +static void __init gic_acpi_setup_kvm_info(void) +{ + int irq; + + if (!gic_acpi_collect_virt_info()) { + pr_warn("Unable to get har

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

2016-04-06 Thread Julien Grall
Hi Christoffer, On 06/04/2016 18:04, Christoffer Dall wrote: On Mon, Apr 04, 2016 at 12:37:35PM +0100, Julien Grall wrote: diff --git a/include/linux/irqchip/arm-gic-common.h b/include/linux/irqchip/arm-gic-common.h new file mode 100644 index 000..ef34f6f --- /dev/null +++ b/include/linux

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

2016-04-04 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 v5 9/9] clocksource: arm_arch_timer: Remove arch_timer_get_timecounter

2016-04-04 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 v5 7/9] KVM: arm/arm64: arch_timer: Rely on the arch timer to parse the firmware tables

2016-04-04 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 v5 6/9] irqchip/gic-v3: Parse and export virtual GIC information

2016-04-04 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 v5: - Remove the alignment check for GICV. It's already done in the

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

2016-04-04 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 v5 5/9] irqchip/gic-v3: Gather all ACPI specific data in a single structure

2016-04-04 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 v5 0/9] arm64: Add support for KVM with ACPI

2016-04-04 Thread Julien Grall
are merged via the clocksource tree Patches #2-#6 are merged via the irqchip tree 2) Patches #7-#8 are merge via the KVM tree 3) Patch #9 is merged via the clocksource tree. For all the changes see in each patch. Regards, Cc: daniel.lezc...@linaro.org Julien Grall (9): clocksource

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

2016-04-04 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 v5 2/9] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ

2016-04-04 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 v5 3/9] irqchip/gic-v2: Gather ACPI specific data in a single structure

2016-04-04 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

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

2016-04-04 Thread Julien Grall
Hi Christoffer, On 01/04/2016 11:13, Christoffer Dall wrote: On Thu, Mar 24, 2016 at 05:53:40PM +, Julien Grall wrote: diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 50e87e6..b5ed8be 100644 --- a/drivers/irqchip/irq-gic-v3.c +++ b/drivers/irqchip/irq-gic-v3

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

[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 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 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 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 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 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 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 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 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

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

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

2016-03-15 Thread Julien Grall
Hi Christoffer, On 09/03/16 05:39, Christoffer Dall wrote: On Tue, Mar 08, 2016 at 11:29:29AM +, Julien Grall wrote: Even though all the variables aren't marked with __initdata, they are only used during initialization. So the structure is marked with __initdata. Not sure I under

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: [PATCH v3 3/9] irqchip/gic-v2: Gather ACPI specific data in a single structure

2016-03-08 Thread Julien Grall
Hi Christoffer, On 09/03/2016 12:47, Christoffer Dall wrote: On Tue, Mar 08, 2016 at 11:29:27AM +, Julien Grall wrote: For now, there is only one member. More member will be added later. questionable commit message What about: "The ACPI code requires to use global variables in

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

2016-03-08 Thread Julien Grall
Hi Christoffer, On 09/03/2016 10:27, Christoffer Dall wrote: On Tue, Mar 08, 2016 at 11:29:26AM +, Julien Grall wrote: diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index b7ab588..d8887f3 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b

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

2016-03-08 Thread Julien Grall
Hi Christoffer, On 09/03/2016 10:23, Christoffer Dall wrote: On Tue, Mar 08, 2016 at 11:29:25AM +, Julien Grall wrote: -static struct timecounter timecounter; +static struct arch_timer_kvm_info arch_timer_kvm_info; + +struct arch_timer_kvm_info *arch_timer_get_kvm_info(void) borderline

[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 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 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 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 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 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 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 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 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

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; Cheer

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

2016-02-19 Thread Julien Grall
On 19/02/16 10:53, Julien Grall wrote: -- Julien Grall IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person

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

2016-02-19 Thread Julien Grall
Hello Wei, On 19/02/16 07:24, Wei Huang wrote: On 02/11/2016 09:33 AM, Julien Grall wrote: [...] This is also dropping arch_timer_get_timecounter as it was only used by the KVM code. Furthermore, a stub for the new helper hasn't been introduced because KVM is requiring the arch time

[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 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

<    1   2   3   >