Re: [PATCH v3] xen: add support for automatic debug key actions in case of crash

2020-12-10 Thread Jürgen Groß
On 11.12.20 08:24, Jan Beulich wrote: On 11.12.2020 08:02, Jürgen Groß wrote: On 10.12.20 21:51, Julien Grall wrote: Hi Jan, On 09/12/2020 14:29, Jan Beulich wrote: On 09.12.2020 13:11, Julien Grall wrote: On 26/11/2020 11:20, Jan Beulich wrote: On 26.11.2020 09:03, Juergen Gross wrote: Wh

Re: [PATCH v3] xen: add support for automatic debug key actions in case of crash

2020-12-10 Thread Jan Beulich
On 11.12.2020 08:02, Jürgen Groß wrote: > On 10.12.20 21:51, Julien Grall wrote: >> Hi Jan, >> >> On 09/12/2020 14:29, Jan Beulich wrote: >>> On 09.12.2020 13:11, Julien Grall wrote: On 26/11/2020 11:20, Jan Beulich wrote: > On 26.11.2020 09:03, Juergen Gross wrote: >> When the host cr

[ovmf test] 157410: regressions - FAIL

2020-12-10 Thread osstest service owner
flight 157410 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/157410/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 157345 build-i386

Re: [PATCH v3] xen: add support for automatic debug key actions in case of crash

2020-12-10 Thread Jürgen Groß
On 10.12.20 21:51, Julien Grall wrote: Hi Jan, On 09/12/2020 14:29, Jan Beulich wrote: On 09.12.2020 13:11, Julien Grall wrote: On 26/11/2020 11:20, Jan Beulich wrote: On 26.11.2020 09:03, Juergen Gross wrote: When the host crashes it would sometimes be nice to have additional debug data ava

[qemu-mainline test] 157392: regressions - FAIL

2020-12-10 Thread osstest service owner
flight 157392 qemu-mainline real [real] flight 157405 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/157392/ http://logs.test-lab.xenproject.org/osstest/logs/157405/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

Re: [patch 27/30] xen/events: Only force affinity mask for percpu interrupts

2020-12-10 Thread Jürgen Groß
On 11.12.20 00:20, boris.ostrov...@oracle.com wrote: On 12/10/20 2:26 PM, Thomas Gleixner wrote: All event channel setups bind the interrupt on CPU0 or the target CPU for percpu interrupts and overwrite the affinity mask with the corresponding cpumask. That does not make sense. The XEN impleme

[ovmf test] 157406: regressions - FAIL

2020-12-10 Thread osstest service owner
flight 157406 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/157406/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 157345 build-i386

Re: x86/ioapic: Cleanup the timer_works() irqflags mess

2020-12-10 Thread Jürgen Groß
On 10.12.20 21:15, Thomas Gleixner wrote: Mark tripped over the creative irqflags handling in the IO-APIC timer delivery check which ends up doing: local_irq_save(flags); local_irq_enable(); local_irq_restore(flags); which triggered a new consistency check he's working

Re: [Intel-gfx] [patch 13/30] drm/i915/lpe_audio: Remove pointless irq_to_desc() usage

2020-12-10 Thread Ville Syrjälä
On Thu, Dec 10, 2020 at 08:25:49PM +0100, Thomas Gleixner wrote: > Nothing uses the result and nothing should ever use it in driver code. > > Signed-off-by: Thomas Gleixner > Cc: Jani Nikula > Cc: Joonas Lahtinen > Cc: Rodrigo Vivi > Cc: David Airlie > Cc: Daniel Vetter > Cc: Pankaj Bharadiy

Re: [patch 12/30] s390/irq: Use irq_desc_kstat_cpu() in show_msi_interrupt()

2020-12-10 Thread Heiko Carstens
On Thu, Dec 10, 2020 at 08:25:48PM +0100, Thomas Gleixner wrote: > The irq descriptor is already there, no need to look it up again. > > Signed-off-by: Thomas Gleixner > Cc: Christian Borntraeger > Cc: Heiko Carstens > Cc: linux-s...@vger.kernel.org > --- > arch/s390/kernel/irq.c |2 +- >

[ovmf test] 157402: regressions - FAIL

2020-12-10 Thread osstest service owner
flight 157402 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/157402/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 157345 build-i386

[ovmf test] 157399: regressions - FAIL

2020-12-10 Thread osstest service owner
flight 157399 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/157399/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 157345 build-i386

[ovmf test] 157394: regressions - FAIL

2020-12-10 Thread osstest service owner
flight 157394 ovmf real [real] flight 157397 ovmf real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/157394/ http://logs.test-lab.xenproject.org/osstest/logs/157397/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-

Re: [PATCH] xen/arm: Add workaround for Cortex-A53 erratum #843419

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Luca Fancellu wrote: > On the Cortex A53, when executing in AArch64 state, a load or store > instruction > which uses the result of an ADRP instruction as a base register, or which uses > a base register written by an instruction immediately after an ADRP to the > same registe

Re: [PATCH v3 6/8] xen/arm: Remove Linux specific code that is not usable in XEN

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Rahul Singh wrote: > Remove code that is related to below functionality : > 1. struct io_pgtable_ops > 2. struct io_pgtable_cfg > 3. struct iommu_flush_ops, > 4. struct iommu_ops > 5. module_param_named, MODULE_PARM_DESC, module_platform_driver, > MODULE_* > 6. IOMMU

Re: [PATCH v3 8/8] xen/arm: smmuv3: Remove linux compatibility functions.

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Rahul Singh wrote: > Replace all Linux compatible device tree handling function with the XEN > functions. > > Replace all Linux ktime function with the XEN time functions. > > Signed-off-by: Rahul Singh Reviewed-by: Stefano Stabellini > --- > Changes in v3: > - This pat

Re: [PATCH v3 7/8] xen/arm: Add support for SMMUv3 driver

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Rahul Singh wrote: > Add support for ARM architected SMMUv3 implementation. It is based on > the Linux SMMUv3 driver. > > Driver is currently supported as Tech Preview. > > Major differences with regard to Linux driver are as follows: > 2. Only Stage-2 translation is supporte

Re: [PATCH v3 5/8] xen/device-tree: Add dt_property_match_string helper

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Rahul Singh wrote: > Import the Linux helper of_property_match_string. This function searches > a string list property and returns the index of a specific string value. > > Signed-off-by: Rahul Singh Reviewed-by: Stefano Stabellini > --- > Changes in v3: > - This patch i

Re: [PATCH v3 4/8] xen/arm: Remove support for Stage-1 translation on SMMUv3.

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Rahul Singh wrote: > @@ -2087,29 +1693,8 @@ static int arm_smmu_domain_finalise(struct > iommu_domain *domain, > } > > /* Restrict the stage to what we can actually support */ > - if (!(smmu->features & ARM_SMMU_FEAT_TRANS_S1)) > - smmu_domain->st

Re: [PATCH v3 3/8] xen/arm: revert patch related to XArray

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Rahul Singh wrote: > XArray is not implemented in XEN revert the patch that introduce the > XArray code in SMMUv3 driver. > > XArray is added in preparation for sharing some ASIDs with the CPU, > > As XEN support only Stage-2 translation, ASID is used for Stage-1 > translatio

Re: [PATCH v3 1/8] xen/arm: Import the SMMUv3 driver from Linux

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Rahul Singh wrote: > Based on tag Linux 5.8.18 commit ab435ce49bd1d02e33dfec24f76955dc1196970b > > Directory structure change for the SMMUv3 driver starting from > Linux 5.9, to revert the patches smoothly using the "git revert" command > we decided to choose Linux 5.8.18. >

Re: [PATCH v3 2/8] xen/arm: revert atomic operation related command-queue insertion patch

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Rahul Singh wrote: > Linux SMMUv3 code implements the commands-queue insertion based on > atomic operations implemented in Linux. Atomic functions used by the > commands-queue insertion are not implemented in XEN therefore revert the > patch that implemented the commands-queue

Re: [PATCH V3 21/23] xen/arm: Add mapcache invalidation handling

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Julien Grall wrote: > On 10/12/2020 02:30, Stefano Stabellini wrote: > > On Mon, 30 Nov 2020, Oleksandr Tyshchenko wrote: > > > From: Oleksandr Tyshchenko > > > > > > We need to send mapcache invalidation request to qemu/demu everytime > > > the page gets removed from a guest

Re: [patch 27/30] xen/events: Only force affinity mask for percpu interrupts

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 18:20, boris ostrovsky wrote: > On 12/10/20 2:26 PM, Thomas Gleixner wrote: >> All event channel setups bind the interrupt on CPU0 or the target CPU for >> percpu interrupts and overwrite the affinity mask with the corresponding >> cpumask. That does not make sense. >> >> The

Re: [patch 24/30] xen/events: Remove unused bind_evtchn_to_irq_lateeoi()

2020-12-10 Thread Thomas Gleixner
On Thu, Dec 10 2020 at 18:19, boris ostrovsky wrote: > On 12/10/20 2:26 PM, Thomas Gleixner wrote: >> -EXPORT_SYMBOL_GPL(bind_evtchn_to_irq_lateeoi); > > include/xen/events.h also needs to be updated (and in the next patch for > xen_set_affinity_evtchn() as well). Darn, I lost that.

Re: [patch 27/30] xen/events: Only force affinity mask for percpu interrupts

2020-12-10 Thread boris . ostrovsky
On 12/10/20 2:26 PM, Thomas Gleixner wrote: > All event channel setups bind the interrupt on CPU0 or the target CPU for > percpu interrupts and overwrite the affinity mask with the corresponding > cpumask. That does not make sense. > > The XEN implementation of irqchip::irq_set_affinity() already

Re: [patch 24/30] xen/events: Remove unused bind_evtchn_to_irq_lateeoi()

2020-12-10 Thread boris . ostrovsky
On 12/10/20 2:26 PM, Thomas Gleixner wrote: > Signed-off-by: Thomas Gleixner > Cc: Boris Ostrovsky > Cc: Juergen Gross > Cc: Stefano Stabellini > Cc: xen-devel@lists.xenproject.org > --- > drivers/xen/events/events_base.c |6 -- > 1 file changed, 6 deletions(-) > > --- a/drivers/xen/

Re: [patch 19/30] PCI: mobiveil: Use irq_data_get_irq_chip_data()

2020-12-10 Thread Rob Herring
On Thu, Dec 10, 2020 at 1:42 PM Thomas Gleixner wrote: > > Going through a full irq descriptor lookup instead of just using the proper > helper function which provides direct access is suboptimal. > > In fact it _is_ wrong because the chip callback needs to get the chip data > which is relevant fo

Re: [patch 18/30] PCI: xilinx-nwl: Use irq_data_get_irq_chip_data()

2020-12-10 Thread Rob Herring
On Thu, Dec 10, 2020 at 1:42 PM Thomas Gleixner wrote: > > Going through a full irq descriptor lookup instead of just using the proper > helper function which provides direct access is suboptimal. > > In fact it _is_ wrong because the chip callback needs to get the chip data > which is relevant fo

Re: [PATCH v3 5/7] xen/arm: Add handler for cp15 ID registers

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Bertrand Marquis wrote: > > On 9 Dec 2020, at 19:54, Stefano Stabellini wrote: > > > > On Wed, 9 Dec 2020, Bertrand Marquis wrote: > >> Add support for emulation of cp15 based ID registers (on arm32 or when > >> running a 32bit guest on arm64). > >> The handlers are returning

Re: [PATCH v3 4/7] xen/arm: Add handler for ID registers on arm64

2020-12-10 Thread Stefano Stabellini
On Thu, 10 Dec 2020, Bertrand Marquis wrote: > Hi Stefano, > > > On 9 Dec 2020, at 19:38, Stefano Stabellini wrote: > > > > On Wed, 9 Dec 2020, Bertrand Marquis wrote: > >> Add vsysreg emulation for registers trapped when TID3 bit is activated > >> in HSR. > >> The emulation is returning the val

[linux-linus test] 157386: regressions - FAIL

2020-12-10 Thread osstest service owner
flight 157386 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/157386/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ws16-amd64 7 xen-install fail REGR. vs. 152332 test-amd64-i386-qem

[ovmf test] 157390: regressions - FAIL

2020-12-10 Thread osstest service owner
flight 157390 ovmf real [real] flight 157393 ovmf real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/157390/ http://logs.test-lab.xenproject.org/osstest/logs/157393/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-

gitlab-docker-machine-oyster failure, Was: [PATCH v6 00/25] xl / libxl: named PCI pass-through devices

2020-12-10 Thread Stefano Stabellini
Hi Doug, After chatting with Wei on IRC, it became obvious that the issue is that gitlab-docker-machine-oyster failed, see its grey status here under "Runners": https://gitlab.com/xen-project/patchew/xen/-/settings/ci_cd Maybe it is just a matter of rebooting the VM? Doug, could you give it a tr

Re: dom0 PV looping on search_pre_exception_table()

2020-12-10 Thread Andrew Cooper
On 10/12/2020 17:35, Manuel Bouyer wrote: > On Thu, Dec 10, 2020 at 05:18:39PM +, Andrew Cooper wrote: >> However, Xen finds the mapping not-present when trying to demand-map it, >> hence why the #PF is forwarded to the kernel. >> >> The way we pull guest virtual addresses was altered by XSA-28

Re: [PATCH v3] xen: add support for automatic debug key actions in case of crash

2020-12-10 Thread Julien Grall
Hi Jan, On 09/12/2020 14:29, Jan Beulich wrote: On 09.12.2020 13:11, Julien Grall wrote: On 26/11/2020 11:20, Jan Beulich wrote: On 26.11.2020 09:03, Juergen Gross wrote: When the host crashes it would sometimes be nice to have additional debug data available which could be produced via debug

x86/ioapic: Cleanup the timer_works() irqflags mess

2020-12-10 Thread Thomas Gleixner
Mark tripped over the creative irqflags handling in the IO-APIC timer delivery check which ends up doing: local_irq_save(flags); local_irq_enable(); local_irq_restore(flags); which triggered a new consistency check he's working on required for replacing the POPF based rest

[qemu-mainline test] 157376: regressions - FAIL

2020-12-10 Thread osstest service owner
flight 157376 qemu-mainline real [real] flight 157389 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/157376/ http://logs.test-lab.xenproject.org/osstest/logs/157389/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

[patch 20/30] net/mlx4: Replace irq_to_desc() abuse

2020-12-10 Thread Thomas Gleixner
No driver has any business with the internals of an interrupt descriptor. Storing a pointer to it just to use yet another helper at the actual usage site to retrieve the affinity mask is creative at best. Just because C does not allow encapsulation does not mean that the kernel has no limits. Retr

[patch 25/30] xen/events: Remove disfunct affinity spreading

2020-12-10 Thread Thomas Gleixner
This function can only ever work when the event channels: - are already established - interrupts assigned to them - the affinity has been set by user space already because any newly set up event channel is forced to be bound to CPU0 and the affinity mask of the interrupt is forced to contai

[patch 19/30] PCI: mobiveil: Use irq_data_get_irq_chip_data()

2020-12-10 Thread Thomas Gleixner
Going through a full irq descriptor lookup instead of just using the proper helper function which provides direct access is suboptimal. In fact it _is_ wrong because the chip callback needs to get the chip data which is relevant for the chip while using the irq descriptor variant returns the irq c

[patch 30/30] genirq: Remove export of irq_to_desc()

2020-12-10 Thread Thomas Gleixner
No more (ab)use in modules finally. Remove the export so there won't come new ones. Signed-off-by: Thomas Gleixner --- kernel/irq/irqdesc.c |1 - 1 file changed, 1 deletion(-) --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -352,7 +352,6 @@ struct irq_desc *irq_to_desc(unsigned in

[patch 15/30] pinctrl: nomadik: Use irq_has_action()

2020-12-10 Thread Thomas Gleixner
Let the core code do the fiddling with irq_desc. Signed-off-by: Thomas Gleixner Cc: Linus Walleij Cc: linux-arm-ker...@lists.infradead.org Cc: linux-g...@vger.kernel.org --- drivers/pinctrl/nomadik/pinctrl-nomadik.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/pinct

[patch 17/30] NTB/msi: Use irq_has_action()

2020-12-10 Thread Thomas Gleixner
Use the proper core function. Signed-off-by: Thomas Gleixner Cc: Jon Mason Cc: Dave Jiang Cc: Allen Hubbe Cc: linux-...@googlegroups.com --- drivers/ntb/msi.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/ntb/msi.c +++ b/drivers/ntb/msi.c @@ -282,15 +282,13 @@ int

[patch 26/30] xen/events: Use immediate affinity setting

2020-12-10 Thread Thomas Gleixner
There is absolutely no reason to mimic the x86 deferred affinity setting. This mechanism is required to handle the hardware induced issues of IO/APIC and MSI and is not in use when the interrupts are remapped. XEN does not need this and can simply change the affinity from the calling context. The

[patch 29/30] xen/events: Implement irq distribution

2020-12-10 Thread Thomas Gleixner
Keep track of the assignments of event channels to CPUs and select the online CPU with the least assigned channels in the affinity mask which is handed to irq_chip::irq_set_affinity() from the core code. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini

[patch 21/30] net/mlx4: Use effective interrupt affinity

2020-12-10 Thread Thomas Gleixner
Using the interrupt affinity mask for checking locality is not really working well on architectures which support effective affinity masks. The affinity mask is either the system wide default or set by user space, but the architecture can or even must reduce the mask to the effective set, which me

[patch 23/30] net/mlx5: Use effective interrupt affinity

2020-12-10 Thread Thomas Gleixner
Using the interrupt affinity mask for checking locality is not really working well on architectures which support effective affinity masks. The affinity mask is either the system wide default or set by user space, but the architecture can or even must reduce the mask to the effective set, which me

[patch 18/30] PCI: xilinx-nwl: Use irq_data_get_irq_chip_data()

2020-12-10 Thread Thomas Gleixner
Going through a full irq descriptor lookup instead of just using the proper helper function which provides direct access is suboptimal. In fact it _is_ wrong because the chip callback needs to get the chip data which is relevant for the chip while using the irq descriptor variant returns the irq c

[patch 22/30] net/mlx5: Replace irq_to_desc() abuse

2020-12-10 Thread Thomas Gleixner
No driver has any business with the internals of an interrupt descriptor. Storing a pointer to it just to use yet another helper at the actual usage site to retrieve the affinity mask is creative at best. Just because C does not allow encapsulation does not mean that the kernel has no limits. Retr

[patch 28/30] xen/events: Reduce irq_info::spurious_cnt storage size

2020-12-10 Thread Thomas Gleixner
To prepare for interrupt spreading reduce the storage size of irq_info::spurious_cnt to u8 so the required flag for the spreading logic will not increase the storage size. Protect the usage site against overruns. Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano

[patch 24/30] xen/events: Remove unused bind_evtchn_to_irq_lateeoi()

2020-12-10 Thread Thomas Gleixner
Signed-off-by: Thomas Gleixner Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-devel@lists.xenproject.org --- drivers/xen/events/events_base.c |6 -- 1 file changed, 6 deletions(-) --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c @@ -1

[patch 27/30] xen/events: Only force affinity mask for percpu interrupts

2020-12-10 Thread Thomas Gleixner
All event channel setups bind the interrupt on CPU0 or the target CPU for percpu interrupts and overwrite the affinity mask with the corresponding cpumask. That does not make sense. The XEN implementation of irqchip::irq_set_affinity() already picks a single target CPU out of the affinity mask and

[patch 13/30] drm/i915/lpe_audio: Remove pointless irq_to_desc() usage

2020-12-10 Thread Thomas Gleixner
Nothing uses the result and nothing should ever use it in driver code. Signed-off-by: Thomas Gleixner Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: David Airlie Cc: Daniel Vetter Cc: Pankaj Bharadiya Cc: Chris Wilson Cc: Wambui Karuga Cc: intel-...@lists.freedesktop.org Cc: dri

[patch 12/30] s390/irq: Use irq_desc_kstat_cpu() in show_msi_interrupt()

2020-12-10 Thread Thomas Gleixner
The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Cc: Christian Borntraeger Cc: Heiko Carstens Cc: linux-s...@vger.kernel.org --- arch/s390/kernel/irq.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kernel/irq.c +++ b/a

[patch 07/30] genirq: Make kstat_irqs() static

2020-12-10 Thread Thomas Gleixner
No more users outside the core code. Signed-off-by: Thomas Gleixner --- include/linux/kernel_stat.h |1 - kernel/irq/irqdesc.c| 19 ++- 2 files changed, 6 insertions(+), 14 deletions(-) --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -67,7 +6

[patch 14/30] drm/i915/pmu: Replace open coded kstat_irqs() copy

2020-12-10 Thread Thomas Gleixner
Driver code has no business with the internals of the irq descriptor. Aside of that the count is per interrupt line and therefore takes interrupts from other devices into account which share the interrupt line and are not handled by the graphics driver. Replace it with a pmu private count which o

[patch 16/30] mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc

2020-12-10 Thread Thomas Gleixner
First of all drivers have absolutely no business to dig into the internals of an irq descriptor. That's core code and subject to change. All of this information is readily available to /proc/interrupts in a safe and race free way. Remove the inspection code which is a blatant violation of subsyste

[patch 09/30] ARM: smp: Use irq_desc_kstat_cpu() in show_ipi_list()

2020-12-10 Thread Thomas Gleixner
The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Cc: Marc Zyngier Cc: Russell King Cc: linux-arm-ker...@lists.infradead.org --- arch/arm/kernel/smp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm/kernel/smp.c +++ b/arch

[patch 01/30] genirq: Move irq_has_action() into core code

2020-12-10 Thread Thomas Gleixner
This function uses irq_to_desc() and is going to be used by modules to replace the open coded irq_to_desc() (ab)usage. The final goal is to remove the export of irq_to_desc() so driver cannot fiddle with it anymore. Move it into the core code and fixup the usage sites to include the proper header.

[patch 11/30] parisc/irq: Use irq_desc_kstat_cpu() in show_interrupts()

2020-12-10 Thread Thomas Gleixner
The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: afzal mohammed Cc: linux-par...@vger.kernel.org --- arch/parisc/kernel/irq.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/pa

[patch 03/30] genirq: Move irq_set_lockdep_class() to core

2020-12-10 Thread Thomas Gleixner
irq_set_lockdep_class() is used from modules and requires irq_to_desc() to be exported. Move it into the core code which lifts another requirement for the export. Signed-off-by: Thomas Gleixner --- include/linux/irqdesc.h | 10 -- kernel/irq/irqdesc.c| 14 ++ 2 files

[patch 00/30] genirq: Treewide hunt for irq descriptor abuse and assorted fixes

2020-12-10 Thread Thomas Gleixner
A recent request to export kstat_irqs() pointed to a copy of the same in the i915 code, which made me look for further usage of irq descriptors in drivers. The usage in drivers ranges from creative to broken in all colours. irqdesc.h clearly says that this is core functionality and the fact C doe

[patch 05/30] genirq: Annotate irq stats data races

2020-12-10 Thread Thomas Gleixner
Both the per cpu stats and the accumulated count are accessed lockless and can be concurrently modified. That's intentional and the stats are a rough estimate anyway. Annotate them with data_race(). Signed-off-by: Thomas Gleixner --- kernel/irq/irqdesc.c |4 ++-- kernel/irq/proc.c|5

[patch 06/30] parisc/irq: Simplify irq count output for /proc/interrupts

2020-12-10 Thread Thomas Gleixner
The SMP variant works perfectly fine on UP as well. Signed-off-by: Thomas Gleixner Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: afzal mohammed Cc: linux-par...@vger.kernel.org --- arch/parisc/kernel/irq.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) --- a/arch/parisc/kerne

[patch 10/30] arm64/smp: Use irq_desc_kstat_cpu() in arch_show_interrupts()

2020-12-10 Thread Thomas Gleixner
The irq descriptor is already there, no need to look it up again. Signed-off-by: Thomas Gleixner Cc: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: linux-arm-ker...@lists.infradead.org --- arch/arm64/kernel/smp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[patch 04/30] genirq: Provide irq_get_effective_affinity()

2020-12-10 Thread Thomas Gleixner
Provide an accessor to the effective interrupt affinity mask. Going to be used to replace open coded fiddling with the irq descriptor. Signed-off-by: Thomas Gleixner --- include/linux/irq.h |7 +++ 1 file changed, 7 insertions(+) --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -9

[patch 08/30] genirq: Provide kstat_irqdesc_cpu()

2020-12-10 Thread Thomas Gleixner
Most users of kstat_irqs_cpu() have the irq descriptor already. No point in calling into the core code and looking it up once more. Use it in per_cpu_count_show() to start with. Signed-off-by: Thomas Gleixner --- include/linux/irqdesc.h |6 ++ kernel/irq/irqdesc.c|4 ++-- 2 file

[patch 02/30] genirq: Move status flag checks to core

2020-12-10 Thread Thomas Gleixner
These checks are used by modules and prevent the removal of the export of irq_to_desc(). Move the accessor into the core. Signed-off-by: Thomas Gleixner --- include/linux/irqdesc.h | 17 + kernel/irq/manage.c | 17 + 2 files changed, 22 insertions(+), 12 d

Re: [PATCH V3 21/23] xen/arm: Add mapcache invalidation handling

2020-12-10 Thread Julien Grall
Hi Stefano, On 10/12/2020 02:30, Stefano Stabellini wrote: On Mon, 30 Nov 2020, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko We need to send mapcache invalidation request to qemu/demu everytime the page gets removed from a guest. At the moment, the Arm code doesn't explicitely remo

[ovmf test] 157383: regressions - FAIL

2020-12-10 Thread osstest service owner
flight 157383 ovmf real [real] flight 157387 ovmf real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/157383/ http://logs.test-lab.xenproject.org/osstest/logs/157387/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-

Re: [PATCH v2 07/12] x86: add new features for paravirt patching

2020-12-10 Thread Borislav Petkov
On Wed, Dec 09, 2020 at 01:22:24PM +0100, Jürgen Groß wrote: > Lets take the spin_unlock() case. With patch 11 of the series this is > > PVOP_ALT_VCALLEE1(lock.queued_spin_unlock, lock, > "movb $0, (%%" _ASM_ARG1 ");", > X86_FEATURE_NO_PVUNLOCK); > > which boil

Re: dom0 PV looping on search_pre_exception_table()

2020-12-10 Thread Manuel Bouyer
On Thu, Dec 10, 2020 at 05:18:39PM +, Andrew Cooper wrote: > The debugging earlier shows that MMUEXT_SET_LDT has indeed been called.  > Presumably 0xbd00a000 is a plausible virtual address for NetBSD > to position the LDT? Yes, it is. > > However, Xen finds the mapping not-present w

Re: dom0 PV looping on search_pre_exception_table()

2020-12-10 Thread Andrew Cooper
On 10/12/2020 17:03, Manuel Bouyer wrote: > On Thu, Dec 10, 2020 at 03:51:46PM +, Andrew Cooper wrote: >>> [ 7.6617663] cs 0x47 ds 0x23 es 0x23 fs gs ss 0x3f >>> [ 7.7345663] fsbase 00 gsbase 00 >>> >>> so it looks like something resets %fs to

Re: dom0 PV looping on search_pre_exception_table()

2020-12-10 Thread Manuel Bouyer
On Thu, Dec 10, 2020 at 03:51:46PM +, Andrew Cooper wrote: > > [ 7.6617663] cs 0x47 ds 0x23 es 0x23 fs gs ss 0x3f > > [ 7.7345663] fsbase 00 gsbase 00 > > > > so it looks like something resets %fs to 0 ... > > > > Anyway the fault address 0xfff

[PATCH v3 7/8] xen/arm: Add support for SMMUv3 driver

2020-12-10 Thread Rahul Singh
Add support for ARM architected SMMUv3 implementation. It is based on the Linux SMMUv3 driver. Driver is currently supported as Tech Preview. Major differences with regard to Linux driver are as follows: 2. Only Stage-2 translation is supported as compared to the Linux driver that supports bot

[PATCH v3 8/8] xen/arm: smmuv3: Remove linux compatibility functions.

2020-12-10 Thread Rahul Singh
Replace all Linux compatible device tree handling function with the XEN functions. Replace all Linux ktime function with the XEN time functions. Signed-off-by: Rahul Singh --- Changes in v3: - This patch is introduce in this version. --- xen/drivers/passthrough/arm/smmu-v3.c | 32 +++-

[PATCH v3 6/8] xen/arm: Remove Linux specific code that is not usable in XEN

2020-12-10 Thread Rahul Singh
Remove code that is related to below functionality : 1. struct io_pgtable_ops 2. struct io_pgtable_cfg 3. struct iommu_flush_ops, 4. struct iommu_ops 5. module_param_named, MODULE_PARM_DESC, module_platform_driver, MODULE_* 6. IOMMU domain-types 7. arm_smmu_set_bus_ops 8. iommu_device_s

[PATCH v3 5/8] xen/device-tree: Add dt_property_match_string helper

2020-12-10 Thread Rahul Singh
Import the Linux helper of_property_match_string. This function searches a string list property and returns the index of a specific string value. Signed-off-by: Rahul Singh --- Changes in v3: - This patch is introduce in this verison. --- xen/common/device_tree.c | 27

[PATCH v3 4/8] xen/arm: Remove support for Stage-1 translation on SMMUv3.

2020-12-10 Thread Rahul Singh
Linux SMMUv3 driver supports both Stage-1 and Stage-2 translations. As of now only Stage-2 translation support has been tested. Once Stage-1 translation support is tested this patch can be added. Signed-off-by: Rahul Singh --- Changes in v3: - No change from previous version. --- xen/drivers/

[PATCH v3 3/8] xen/arm: revert patch related to XArray

2020-12-10 Thread Rahul Singh
XArray is not implemented in XEN revert the patch that introduce the XArray code in SMMUv3 driver. XArray is added in preparation for sharing some ASIDs with the CPU, As XEN support only Stage-2 translation, ASID is used for Stage-1 translation there is no consequences of reverting this patch for

[PATCH v3 2/8] xen/arm: revert atomic operation related command-queue insertion patch

2020-12-10 Thread Rahul Singh
Linux SMMUv3 code implements the commands-queue insertion based on atomic operations implemented in Linux. Atomic functions used by the commands-queue insertion are not implemented in XEN therefore revert the patch that implemented the commands-queue insertion based on atomic operations. Reverted

[PATCH v3 1/8] xen/arm: Import the SMMUv3 driver from Linux

2020-12-10 Thread Rahul Singh
Based on tag Linux 5.8.18 commit ab435ce49bd1d02e33dfec24f76955dc1196970b Directory structure change for the SMMUv3 driver starting from Linux 5.9, to revert the patches smoothly using the "git revert" command we decided to choose Linux 5.8.18. Only difference between latest stable Linux 5.9.12 a

Re: [PATCH V3 17/23] xen/ioreq: Introduce domain_has_ioreq_server()

2020-12-10 Thread Oleksandr
On 10.12.20 10:38, Paul Durrant wrote: Hi Paul. -Original Message- From: Oleksandr Sent: 09 December 2020 20:36 To: p...@xen.org Cc: 'Jan Beulich' ; 'Oleksandr Tyshchenko' ; 'Stefano Stabellini' ; 'Julien Grall' ; 'Volodymyr Babchuk' ; 'Andrew Cooper' ; 'George Dunlap' ; 'Ian Jack

[PATCH v3 0/8] xen/arm: Add support for SMMUv3 driver

2020-12-10 Thread Rahul Singh
This patch series is v3 of the work to add support for the SMMUv3 driver. Approach taken is to first merge the Linux copy of the SMMUv3 driver (tag v5.8.18) and then modify the driver to build on XEN. MSI and PCI ATS functionality are not supported. Code is not tested and compiled. Code is guarde

Re: [PATCH] xen/arm: Add workaround for Cortex-A53 erratum #843419

2020-12-10 Thread Bertrand Marquis
Hi Luca, > On 10 Dec 2020, at 10:42, Luca Fancellu wrote: > > On the Cortex A53, when executing in AArch64 state, a load or store > instruction > which uses the result of an ADRP instruction as a base register, or which uses > a base register written by an instruction immediately after an ADRP

Re: [PATCH v3 3/7] xen/arm: create a cpuinfo structure for guest

2020-12-10 Thread Bertrand Marquis
Hi Julien, > On 10 Dec 2020, at 16:30, Julien Grall wrote: > > > > On 10/12/2020 16:17, Bertrand Marquis wrote: >> Hi Julien, > > Hi Bertrand, > >>> On 10 Dec 2020, at 16:05, Julien Grall wrote: >>> >>> >>> >>> On 10/12/2020 15:48, Bertrand Marquis wrote: Hi Julien, > On 9 Dec 2

Re: [PATCH v3 3/7] xen/arm: create a cpuinfo structure for guest

2020-12-10 Thread Julien Grall
On 10/12/2020 16:17, Bertrand Marquis wrote: Hi Julien, Hi Bertrand, On 10 Dec 2020, at 16:05, Julien Grall wrote: On 10/12/2020 15:48, Bertrand Marquis wrote: Hi Julien, On 9 Dec 2020, at 23:09, Julien Grall wrote: Hi Bertand, On 09/12/2020 16:30, Bertrand Marquis wrote: Create

Re: [PATCH v3 3/7] xen/arm: create a cpuinfo structure for guest

2020-12-10 Thread Bertrand Marquis
Hi Julien, > On 10 Dec 2020, at 16:05, Julien Grall wrote: > > > > On 10/12/2020 15:48, Bertrand Marquis wrote: >> Hi Julien, >>> On 9 Dec 2020, at 23:09, Julien Grall wrote: >>> >>> Hi Bertand, >>> >>> On 09/12/2020 16:30, Bertrand Marquis wrote: Create a cpuinfo structure for guest a

Re: [PATCH v3 3/7] xen/arm: create a cpuinfo structure for guest

2020-12-10 Thread Julien Grall
On 10/12/2020 15:48, Bertrand Marquis wrote: Hi Julien, On 9 Dec 2020, at 23:09, Julien Grall wrote: Hi Bertand, On 09/12/2020 16:30, Bertrand Marquis wrote: Create a cpuinfo structure for guest and mask into it the features that we do not support in Xen or that we do not want to publish

Re: [PATCH v3 2/7] xen/arm: Add arm64 ID registers definitions

2020-12-10 Thread Bertrand Marquis
Hi, > On 10 Dec 2020, at 15:46, Julien Grall wrote: > > > > On 10/12/2020 02:30, Stefano Stabellini wrote: >> On Wed, 9 Dec 2020, Julien Grall wrote: >>> Hi Bertrand, >>> >>> On 09/12/2020 16:30, Bertrand Marquis wrote: Add coprocessor registers definitions for all ID registers trapped >

Re: [PATCH v3 1/7] xen/arm: Add ID registers and complete cpuinfo

2020-12-10 Thread Bertrand Marquis
Hi, > On 10 Dec 2020, at 15:45, Julien Grall wrote: > > Hi Bertrand, > > On 10/12/2020 15:14, Bertrand Marquis wrote: >> Hi Julien, >>> On 9 Dec 2020, at 23:03, Julien Grall wrote: >>> >>> Hi Bertrand, >>> >>> On 09/12/2020 16:30, Bertrand Marquis wrote: Add definition and entries in cp

Re: [PATCH v6 00/25] xl / libxl: named PCI pass-through devices

2020-12-10 Thread Wei Liu
On Wed, Dec 09, 2020 at 06:41:03PM -0800, Stefano Stabellini wrote: > On Wed, 9 Dec 2020, Stefano Stabellini wrote: > > On Wed, 9 Dec 2020, Wei Liu wrote: > > > On Tue, Dec 08, 2020 at 05:02:50PM -0800, Stefano Stabellini wrote: > > > > The pipeline failed because the "fedora-gcc-debug" build faile

Re: [PATCH] x86/HVM: refine when to send mapcache invalidation request to qemu

2020-12-10 Thread Hongyan Xia
On Thu, 2020-12-10 at 14:37 +0100, Jan Beulich wrote: > On 10.12.2020 14:09, Hongyan Xia wrote: > > On Mon, 2020-09-28 at 12:44 +0200, Jan Beulich wrote: > > > Plus finally there's no point sending the request for the local > > > domain > > > when the domain acted upon is a different one. If anythi

Re: dom0 PV looping on search_pre_exception_table()

2020-12-10 Thread Andrew Cooper
On 10/12/2020 09:51, Manuel Bouyer wrote: > On Wed, Dec 09, 2020 at 07:08:41PM +, Andrew Cooper wrote: >> Oh of course - we don't follow the exit-to-guest path on the way out here. >> >> As a gross hack to check that we've at least diagnosed the issue >> appropriately, could you modify NetBSD t

Re: [PATCH v3 3/7] xen/arm: create a cpuinfo structure for guest

2020-12-10 Thread Bertrand Marquis
Hi, > On 9 Dec 2020, at 23:22, Julien Grall wrote: > > Hi, > > On 09/12/2020 16:30, Bertrand Marquis wrote: >> +/* Disable MPAM as xen does not support it */ > > I am going to be picky :). I think we want to say "hide" rather than > "disable" because the latter is done differently via the

Re: [PATCH v3 3/7] xen/arm: create a cpuinfo structure for guest

2020-12-10 Thread Bertrand Marquis
Hi Julien, > On 9 Dec 2020, at 23:09, Julien Grall wrote: > > Hi Bertand, > > On 09/12/2020 16:30, Bertrand Marquis wrote: >> Create a cpuinfo structure for guest and mask into it the features that >> we do not support in Xen or that we do not want to publish to guests. >> Modify some values in

Re: [PATCH v3 2/7] xen/arm: Add arm64 ID registers definitions

2020-12-10 Thread Julien Grall
On 10/12/2020 02:30, Stefano Stabellini wrote: On Wed, 9 Dec 2020, Julien Grall wrote: Hi Bertrand, On 09/12/2020 16:30, Bertrand Marquis wrote: Add coprocessor registers definitions for all ID registers trapped through the TID3 bit of HSR. Those are the one that will be emulated in Xen to

Re: [PATCH v3 1/7] xen/arm: Add ID registers and complete cpuinfo

2020-12-10 Thread Julien Grall
Hi Bertrand, On 10/12/2020 15:14, Bertrand Marquis wrote: Hi Julien, On 9 Dec 2020, at 23:03, Julien Grall wrote: Hi Bertrand, On 09/12/2020 16:30, Bertrand Marquis wrote: Add definition and entries in cpuinfo for ID registers introduced in newer Arm Architecture reference manual: - ID_PFR

Re: [PATCH v3 7/7] xen/arm: Activate TID3 in HCR_EL2

2020-12-10 Thread Bertrand Marquis
Hi Julien, > On 9 Dec 2020, at 23:17, Julien Grall wrote: > > Hi Bertrand, > > On 09/12/2020 16:31, Bertrand Marquis wrote: >> Activate TID3 bit in HSR register when starting a guest. > > s/HSR/HCR/ > Right, I did it a lot thanks for the review. I will fix that in V4. >> This will trap all

  1   2   >