Re: [PATCH v5 04/11] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-12-11 Thread Michal Orzel
Hi Julien, On 08/12/2023 16:09, Julien Grall wrote: > > > Hi, > > On 07/12/2023 09:38, Michal Orzel wrote: >> Hi Penny, >> >> On 06/12/2023 10:06, Penny Zheng wrote: >>> >>> >>> We split the code of allocate_bank_memory into two parts, >>> allocate_domheap_memory and guest_physmap_memory. >>> >

[XEN PATCH v2] automation/eclair_analysis: file exclusion automation

2023-12-11 Thread Nicola Vetrini
The file exclude-list.json contains files that are classified as adopted code for MISRA compliance. Therefore, this file is used to automatically generate a suitable .ecl configuration for ECLAIR. As such, many entries in out_of_scope.ecl can be removed, as they would be duplicates. Signed-off-by

[XEN PATCH v3 0/3] address some violations of MISRA C Rule 8.4

2023-12-11 Thread Nicola Vetrini
MISRA C:2012 Rule 8.4 states: "A compatible declaration shall be visible when an object or function with external linkage is defined". Changes from v1: - Patch 1/7 has been committed; - Patch 2/7 has been dropped, as the fix is already part of [1]; - Patch 3/7 drops the addition of asmlinkage on v

[XEN PATCH v3 1/3] xen/x86: add missing instances of asmlinkage attributes

2023-12-11 Thread Nicola Vetrini
No functional change. Signed-off-by: Nicola Vetrini --- xen/arch/x86/efi/efi-boot.h | 5 +++-- xen/arch/x86/smpboot.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h index 86467da301e5..8ea64e31cdc2 100644 ---

[XEN PATCH v3 2/3] x86/viridian: make build_assertions static

2023-12-11 Thread Nicola Vetrini
This is consistent with other instances of the same function and also resolves a violation of MISRA C:2012 Rule 8.4. No functional change. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- xen/arch/x86/hvm/viridian/synic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[XEN PATCH v3 3/3] xen/mm: add declaration for first_valid_mfn

2023-12-11 Thread Nicola Vetrini
Such declaration is needed because a compatible declaration is not visible in xen/common/page_alloc.c, where the variable is defined. That variable can't yet be static because of the lack of support from ARM and PPC for NUMA. On the occasion, use drop a use of u8. No functional change. Signed-of

Re: [XEN PATCH v3 2/3] x86/viridian: make build_assertions static

2023-12-11 Thread Durrant, Paul
On 11/12/2023 09:14, Nicola Vetrini wrote: This is consistent with other instances of the same function and also resolves a violation of MISRA C:2012 Rule 8.4. No functional change. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- xen/arch/x86/hvm/viridian/synic.c | 2 +-

Re: [BUG]i2c_hid_acpi broken with 4.17.2 on Framework Laptop 13 AMD

2023-12-11 Thread Sébastien Chaumat
> On 05.12.2023 21:31, Sébastien Chaumat wrote: > >> [2.464598] amd_gpio AMDI0030:00: failed to enable wake-up interrupt > > > > Is it expected that IRQ7 goes from fasteoi (kernel 6.6.4 ) to > > ioapic-edge and IRQ9 to ioapic-level ? > > > > IR-IO-APIC7-fasteoi pinctrl_amd > > IR-IO-APIC

[xen-unstable test] 184085: regressions - FAIL

2023-12-11 Thread osstest service owner
flight 184085 xen-unstable real [real] flight 184088 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/184085/ http://logs.test-lab.xenproject.org/osstest/logs/184088/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be r

Re: [RFC PATCH] xen/arm: Add emulation of Debug Data Transfer Registers

2023-12-11 Thread Julien Grall
Hi, On 07/12/2023 21:41, Stefano Stabellini wrote: On Thu, 7 Dec 2023, Julien Grall wrote: Hi Stefano, On 05/12/2023 23:21, Stefano Stabellini wrote: On Tue, 5 Dec 2023, Julien Grall wrote: I agree that crashing a guest is bad, but is lying to the domain really better? The consequence here i

Re: [PATCH v6 4/5] [FUTURE] xen/arm: enable vPCI for domUs

2023-12-11 Thread Roger Pau Monné
On Tue, Dec 05, 2023 at 02:01:46PM -0500, Stewart Hildebrand wrote: > On 12/5/23 06:08, Roger Pau Monné wrote: > > On Mon, Dec 04, 2023 at 02:07:51PM -0800, Stefano Stabellini wrote: > >> On Mon, 4 Dec 2023, Roger Pau Monné wrote: > >>> On Fri, Dec 01, 2023 at 06:56:32PM -0800, Stefano Stabellini w

Re: [PATCH] MAINTAINERS: Hand over the release manager role to Oleksii Kurochko

2023-12-11 Thread Bertrand Marquis
> On 8 Dec 2023, at 12:04, Wei Chen wrote: > > Hi Henry, > > On 2023/12/8 00:20, Henry Wang wrote: >> I've finished the opportunity to do two releases (4.17 and 4.18) >> and Oleksii Kurochko has volunteered to be the next release manager. >> Hand over the role to him by changing the maintaine

Re: [PATCH v5 04/11] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-12-11 Thread Julien Grall
Hi Michal, On 11/12/2023 08:31, Michal Orzel wrote: On 08/12/2023 16:09, Julien Grall wrote: Hi, On 07/12/2023 09:38, Michal Orzel wrote: Hi Penny, On 06/12/2023 10:06, Penny Zheng wrote: We split the code of allocate_bank_memory into two parts, allocate_domheap_memory and guest_physmap

Re: [PATCH v5 04/11] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-12-11 Thread Michal Orzel
On 11/12/2023 11:01, Julien Grall wrote: > > > Hi Michal, > > On 11/12/2023 08:31, Michal Orzel wrote: >> On 08/12/2023 16:09, Julien Grall wrote: >>> >>> >>> Hi, >>> >>> On 07/12/2023 09:38, Michal Orzel wrote: Hi Penny, On 06/12/2023 10:06, Penny Zheng wrote: > >

[XEN PATCH 5/7] xen/arm: traps: add ASSERT_UNREACHABLE() where needed

2023-12-11 Thread Nicola Vetrini
The branches of the switch after a call to 'do_unexpected_trap' cannot return, but there is one path that may return, hence only some clauses are marked with ASSERT_UNREACHABLE(). Signed-off-by: Nicola Vetrini --- xen/arch/arm/traps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[XEN PATCH 7/7] x86/xstate: move BUILD_BUG_ON to address MISRA C:2012 Rule 2.1

2023-12-11 Thread Nicola Vetrini
The string literal inside the expansion of BUILD_BUG_ON is considered unreachable code; however, such statement can be moved earlier with no functional change. Signed-off-by: Nicola Vetrini --- The motivation for this code movement is that keeping it inside the switch statement matches MISRA's de

[XEN PATCH 1/7] xen/shutdown: address MISRA C:2012 Rule 2.1

2023-12-11 Thread Nicola Vetrini
Given that 'hwdom_shutdown' is a noreturn function, unreachable breaks can be eliminated to resolve violations of Rule 2.1. On the occasion, the type of its parameter is changed to uint8_t. No functional change. Signed-off-by: Nicola Vetrini --- xen/common/shutdown.c | 11 ++- xen/

[XEN PATCH 2/7] x86/mm: address MISRA C:2012 Rule 2.1

2023-12-11 Thread Nicola Vetrini
The "return 0" after the swich statement in 'xen/arch/x86/mm.c' is unreachable because all switch clauses end with returns. However, some of them can be substituted with "break"s to allow the "return 0" outside the switch to be reachable. No functional changes. Signed-off-by: Nicola Vetrini ---

[XEN PATCH 6/7] x86/platform: removed break to address MISRA C:2012 Rule 2.1

2023-12-11 Thread Nicola Vetrini
The break statement is redundant, hence it can be removed. Signed-off-by: Nicola Vetrini --- xen/arch/x86/platform_hypercall.c | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c index 4dde71db275c..7556c6e6cd0c 100644 --- a/x

[XEN PATCH 3/7] xen/arm: address MISRA C:2012 Rule 2.1

2023-12-11 Thread Nicola Vetrini
The "return 1;" statements at the end of some cases in the switch of function 'vgic_v3_its_mmio_write' in 'vcig-v3-its.c' cause the unreachability of the "return 1;" statement after the switch, thus violating MISRA C:2012 Rule 2.1: "A project shall not contain unreachable code". The same is true f

[XEN PATCH 0/7] address violations of MISRA C:2012 Rule 2.1

2023-12-11 Thread Nicola Vetrini
MISRA C:2012 Rule 2.1 states: "A project shall not contain unreachable code". As such, this series eliminates various instances of unreachable code found in Xen, by providing equivalent compliant constructs. This series is loosely based on my earlier series [1], but the overall approach has change

Re: [XEN PATCH] automation/eclair: add deviations for MISRA C:2012 Rule 16.3

2023-12-11 Thread Federico Serafini
On 08/12/23 01:30, Stefano Stabellini wrote: On Thu, 7 Dec 2023, Julien Grall wrote: Hi Federico, On 07/12/2023 09:08, Federico Serafini wrote: MISRA C:2012 Rule 16.3 states that an unconditional break statement shall terminate every switch-clause. Update ECLAIR configuration to take into acc

[XEN PATCH 4/7] xen/sched: address MISRA C:2012 Rule 2.1

2023-12-11 Thread Nicola Vetrini
The break statement after the return statement is definitely unreachable and can be removed with no functional change. Signed-off-by: Nicola Vetrini --- xen/common/sched/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index f6ac1e5af8bd

Re: [PATCH v6 4/5] [FUTURE] xen/arm: enable vPCI for domUs

2023-12-11 Thread Roger Pau Monné
On Tue, Dec 05, 2023 at 06:34:35PM -0800, Stefano Stabellini wrote: > On Tue, 5 Dec 2023, Roger Pau Monné wrote: > > > > > I don't think we should enable IOREQ servers to handle PCI passthrough > > > > > for PVH guests and/or guests with vPCI. If the domain has vPCI, PCI > > > > > Passthrough can b

Re: [PATCH] livepatch-build-tools: allow livepatching version.c

2023-12-11 Thread Roger Pau Monné
On Wed, Dec 06, 2023 at 12:11:39PM +, Ross Lagerwall wrote: > On Tue, Dec 5, 2023 at 2:57 PM Roger Pau Monné wrote: > > > > On Tue, Dec 05, 2023 at 02:15:05PM +, Andrew Cooper wrote: > > > On 05/12/2023 12:34 pm, Roger Pau Monne wrote: > > > > Currently version.o is explicitly ignored as t

Re: [PATCH v3 2/6] x86/HVM: split restore state checking from state loading

2023-12-11 Thread Roger Pau Monné
On Wed, Dec 06, 2023 at 08:27:59AM +0100, Jan Beulich wrote: > On 05.12.2023 16:55, Roger Pau Monné wrote: > > On Tue, Dec 05, 2023 at 03:59:13PM +0100, Jan Beulich wrote: > >> On 05.12.2023 15:29, Roger Pau Monné wrote: > >>> On Tue, Dec 05, 2023 at 09:52:31AM +0100, Jan Beulich wrote: > On 0

Re: [PATCH v2] docs/misra/rules.rst: add more rules

2023-12-11 Thread Andrew Cooper
On 08/12/2023 12:09 am, Stefano Stabellini wrote: > Add the rules accepted in the last three MISRA C working group meetings. > > Signed-off-by: Stefano Stabellini > --- > Changes in v2: > - remove 17.1 for now, to be a separate patch > - add a clarification comment for 17.7 > --- > docs/misra/rul

Re: [BUG]i2c_hid_acpi broken with 4.17.2 on Framework Laptop 13 AMD

2023-12-11 Thread Sébastien Chaumat
Le lun. 11 déc. 2023 à 10:18, Sébastien Chaumat a écrit : > > > On 05.12.2023 21:31, Sébastien Chaumat wrote: > > >> [2.464598] amd_gpio AMDI0030:00: failed to enable wake-up interrupt > > > > > > Is it expected that IRQ7 goes from fasteoi (kernel 6.6.4 ) to > > > ioapic-edge and IRQ9 to ioapi

Re: [PATCH v2] docs/misra/rules.rst: add more rules

2023-12-11 Thread Jan Beulich
On 11.12.2023 11:53, Andrew Cooper wrote: > On 08/12/2023 12:09 am, Stefano Stabellini wrote: >> Add the rules accepted in the last three MISRA C working group meetings. >> >> Signed-off-by: Stefano Stabellini >> --- >> Changes in v2: >> - remove 17.1 for now, to be a separate patch >> - add a cla

Re: [BUG]i2c_hid_acpi broken with 4.17.2 on Framework Laptop 13 AMD

2023-12-11 Thread Jan Beulich
On 11.12.2023 12:09, Sébastien Chaumat wrote: > Le lun. 11 déc. 2023 à 10:18, Sébastien Chaumat a écrit : >> >>> On 05.12.2023 21:31, Sébastien Chaumat wrote: > [2.464598] amd_gpio AMDI0030:00: failed to enable wake-up interrupt Is it expected that IRQ7 goes from fasteoi (kernel

Re: [PATCH v3 2/6] x86/HVM: split restore state checking from state loading

2023-12-11 Thread Jan Beulich
On 11.12.2023 11:46, Roger Pau Monné wrote: > On Wed, Dec 06, 2023 at 08:27:59AM +0100, Jan Beulich wrote: >> On 05.12.2023 16:55, Roger Pau Monné wrote: >>> On Tue, Dec 05, 2023 at 03:59:13PM +0100, Jan Beulich wrote: On 05.12.2023 15:29, Roger Pau Monné wrote: > On Tue, Dec 05, 2023 at 0

[linux-linus test] 184086: regressions - FAIL

2023-12-11 Thread osstest service owner
flight 184086 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/184086/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-pvops 6 kernel-build fail REGR. vs. 183973 Tests which did not

xen | Successful pipeline for staging | 14031315

2023-12-11 Thread GitLab
Pipeline #1102441845 has passed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: 14031315 ( https://gitlab.com/xen-project/xen/-/commit/1403131596fa77663708f6baa0fee8bf7b95eb5a ) Commit Message: x86/viridian:

[PATCH v2 1/2] xen/x86: io_apic: Introduce a command line option to skip timer check

2023-12-11 Thread Julien Grall
From: Julien Grall Currently, Xen will spend ~100ms to check if the timer works. If the Admin knows their platform have a working timer, then it would be handy to be able to bypass the check. Introduce a command line option 'pit-irq-works' for this purpose. Signed-off-by: Julien Grall --- Ch

[PATCH v2 2/2] xen/x86: ioapic: Bail out from timer_irq_works() as soon as possible

2023-12-11 Thread Julien Grall
From: Julien Grall Currently timer_irq_works() will wait the full 100ms before checking that pit0_ticks has been incremented at least 4 times. However, the bulk of the BIOS/platform should not have a buggy timer. So waiting for the full 100ms is a bit harsh. Rework the logic to only wait until

[PATCH v2 0/2] xen/x86: Optimize timer_irq_works()

2023-12-11 Thread Julien Grall
From: Julien Grall Hi all, At the moment timer_irq_works() will always wait 100ms even with enough ticks elapsed. This is a bit wasteful when most of the HW should not be buggy. The admin may also know that their HW is not buggy so they could decide to skip the full 100ms. Also, looking at Linu

Re: [XEN PATCH 3/7] xen/arm: address MISRA C:2012 Rule 2.1

2023-12-11 Thread Julien Grall
Hi, On 11/12/2023 10:30, Nicola Vetrini wrote: The "return 1;" statements at the end of some cases in the switch of function 'vgic_v3_its_mmio_write' in 'vcig-v3-its.c' cause the unreachability of the "return 1;" statement after the switch, thus violating MISRA C:2012 Rule 2.1: "A project shall

Re: [XEN PATCH 5/7] xen/arm: traps: add ASSERT_UNREACHABLE() where needed

2023-12-11 Thread Julien Grall
Hi, On 11/12/2023 10:30, Nicola Vetrini wrote: The branches of the switch after a call to 'do_unexpected_trap' cannot return, but there is one path that may return, hence only some clauses are marked with ASSERT_UNREACHABLE(). I don't understand why this is necessary. The code should never be r

Re: [XEN PATCH] automation/eclair: add deviations for MISRA C:2012 Rule 16.3

2023-12-11 Thread Julien Grall
Hi Stefano, On 08/12/2023 00:30, Stefano Stabellini wrote: On Thu, 7 Dec 2023, Julien Grall wrote: Hi Federico, On 07/12/2023 09:08, Federico Serafini wrote: MISRA C:2012 Rule 16.3 states that an unconditional break statement shall terminate every switch-clause. Update ECLAIR configuration t

Re: [RFC PATCH] xen/arm: Add emulation of Debug Data Transfer Registers

2023-12-11 Thread Ayan Kumar Halder
On 11/12/2023 09:33, Julien Grall wrote: Hi, Hi Julien/Stefano/Bertrand/Michal, It is a great discussion, thanks for your suggestions. I think we have an agreement. :-) On 07/12/2023 21:41, Stefano Stabellini wrote: On Thu, 7 Dec 2023, Julien Grall wrote: Hi Stefano, On 05/12/2023 23:

Re: [PATCH v3 2/6] x86/HVM: split restore state checking from state loading

2023-12-11 Thread Roger Pau Monné
On Mon, Dec 11, 2023 at 12:31:11PM +0100, Jan Beulich wrote: > On 11.12.2023 11:46, Roger Pau Monné wrote: > > On Wed, Dec 06, 2023 at 08:27:59AM +0100, Jan Beulich wrote: > >> On 05.12.2023 16:55, Roger Pau Monné wrote: > >>> On Tue, Dec 05, 2023 at 03:59:13PM +0100, Jan Beulich wrote: > On 0

Re: [XEN PATCH 3/7] xen/arm: address MISRA C:2012 Rule 2.1

2023-12-11 Thread Michal Orzel
On 11/12/2023 13:29, Julien Grall wrote: > > > Hi, > > On 11/12/2023 10:30, Nicola Vetrini wrote: >> The "return 1;" statements at the end of some cases in the switch >> of function 'vgic_v3_its_mmio_write' in 'vcig-v3-its.c' cause the >> unreachability of the "return 1;" statement after the

Re: [PATCH v3 2/6] x86/HVM: split restore state checking from state loading

2023-12-11 Thread Jan Beulich
On 11.12.2023 13:43, Roger Pau Monné wrote: > On Mon, Dec 11, 2023 at 12:31:11PM +0100, Jan Beulich wrote: >> On 11.12.2023 11:46, Roger Pau Monné wrote: >>> On Wed, Dec 06, 2023 at 08:27:59AM +0100, Jan Beulich wrote: On 05.12.2023 16:55, Roger Pau Monné wrote: > On Tue, Dec 05, 2023 at 0

[PATCH v3 0/3] xen: have a more generic unaligned.h header

2023-12-11 Thread Juergen Gross
Update Xen's unaligned.h header to support all architectures, allowing to remove the architecture specific variants (x86 only until now). Changes in V2: - new patch 1 (Julien Grall) - adjusted patch 2 (Jan Beulich) Changes in V3: - adjusted patch 2 (Andrew Cooper) Juergen Gross (3): xen/arm: s

[PATCH v3 2/3] xen: make include/xen/unaligned.h usable on all architectures

2023-12-11 Thread Juergen Gross
Instead of defining get_unaligned() and put_unaligned() in a way that is only supporting architectures allowing unaligned accesses, use the same approach as the Linux kernel and let the compiler do the decision how to generate the code for probably unaligned data accesses. Update include/xen/unali

[PATCH v3 1/3] xen/arm: set -mno-unaligned-access compiler option for Arm32

2023-12-11 Thread Juergen Gross
As the hypervisor is disabling unaligned accesses for Arm32, set the -mno-unaligned-access compiler option for building. This will prohibit unaligned accesses when e.g. accessing 2- or 4-byte data items in packed data structures. Backport: 4.15+ Signed-off-by: Juergen Gross Acked-by: Julien Grall

[PATCH v3 3/3] xen: remove asm/unaligned.h

2023-12-11 Thread Juergen Gross
With include/xen/unaligned.h now dealing properly with unaligned accesses for all architectures, asm/unaligned.h can be removed and users can be switched to include xen/unaligned.h instead. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- xen/arch/x86/include/asm/unaligned.h | 6 --

Re: [XEN PATCH v2 2/5] xen/acpi: address violations of MISRA C:2012 Rule 8.2

2023-12-11 Thread Jan Beulich
On 08.12.2023 01:43, Stefano Stabellini wrote: > On Thu, 7 Dec 2023, Federico Serafini wrote: >> Add missing parameter names. No functional change. >> >> Signed-off-by: Federico Serafini > > Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich

Re: [XEN PATCH v2 3/5] x86/mm: remove compat_subarch_memory_op()

2023-12-11 Thread Jan Beulich
On 08.12.2023 01:34, Stefano Stabellini wrote: > On Thu, 7 Dec 2023, Federico Serafini wrote: >> Remove remove compat_subarch_memory_op() declaration: there is no >> definition and there are no calls to such function in the XEN project. >> >> Signed-off-by: Federico Serafini > > Reviewed-by: Stef

Re: [XEN PATCH v2 4/5] x86/mm: address violations of MISRA C:2012 Rule 8.2

2023-12-11 Thread Jan Beulich
On 08.12.2023 01:40, Stefano Stabellini wrote: > On Thu, 7 Dec 2023, Federico Serafini wrote: >> Add missing parameter names. No functional change. >> >> Signed-off-by: Federico Serafini > > Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich

Re: [RFC 00/41] qom-topo: Abstract Everything about CPU Topology

2023-12-11 Thread Zhao Liu
Hi maintainers, Just a ping. Welcome your feedbacks! We wonder if the current RFC is an appropriate attempt towards the final hybrid topology. Thanks, Zhao On Thu, Nov 30, 2023 at 10:41:22PM +0800, Zhao Liu wrote: > Date: Thu, 30 Nov 2023 22:41:22 +0800 > From: Zhao Liu > Subject: [RFC 00/41]

Re: [XEN PATCH v2 5/5] AMD/IOMMU: address violations of MISRA C:2012 Rule 8.2

2023-12-11 Thread Jan Beulich
On 08.12.2023 01:39, Stefano Stabellini wrote: > On Thu, 7 Dec 2023, Federico Serafini wrote: >> Add missing parameter names to address violations of MISRA C:2012 >> Rule 8.2. Remove trailing spaces and use C standard types to comply >> with XEN coding style. No functional change. >> >> Signed-off-

[ovmf test] 184090: all pass - PUSHED

2023-12-11 Thread osstest service owner
flight 184090 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/184090/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 5b5481526fc9b89e5f3843d9bb3d6c4f5ce41060 baseline version: ovmf bb13a4adabcf0e5a16085

Re: [XEN PATCH 4/7] xen/sched: address MISRA C:2012 Rule 2.1

2023-12-11 Thread George Dunlap
On Mon, Dec 11, 2023 at 10:30 AM Nicola Vetrini wrote: > > The break statement after the return statement is definitely unreachable > and can be removed with no functional change. > > Signed-off-by: Nicola Vetrini Acked-by: George Dunlap

[PATCH 0/3] Mini-OS: fix and cleanup of event handling

2023-12-11 Thread Juergen Gross
Patch 1 fixes an issue when running as PVH guest Patches 2 + 3 are cleanups Juergen Gross (3): Mini-OS: call event handlers always with interrupts off Mini-OS: drop in_callback variable Mini-OS: cleanup hypervisor.c hypervisor.c | 94 +++- in

[PATCH 2/3] Mini-OS: drop in_callback variable

2023-12-11 Thread Juergen Gross
Now that do_hypervisor_callback() is always called with interrupts off the in_callback variable meant to handle recursive calls of do_hypervisor_callback() can be dropped. As a precaution add a test to do_hypervisor_callback() that interrupts are really disabled and crash in case this is not true.

[PATCH 1/3] Mini-OS: call event handlers always with interrupts off

2023-12-11 Thread Juergen Gross
When unmasking an event channel the associated event handler can be called with interrupts enabled when not running as a PV guest. This can result in hard to debug races in case e.g. a handler is registered for multiple events or when the handler is not using a lock as it assumes to have interrupt

[PATCH 3/3] Mini-OS: cleanup hypervisor.c

2023-12-11 Thread Juergen Gross
Do the following cleanups in hypervisor.c: - Let hypervisor.c conform to the coding style. - Drop the bogus "inline" attributes of exported functions. - Replace a always zero cpu variable with smp_processor_id() as elsewhere in the code. - Replace "if () BUG()" with BUG_ON() in case the conditio

xc_dom_guest_type: image not capable of booting inside a HV M container: Invalid kernel

2023-12-11 Thread Mario Marietto
Hello. Finally I tried to recompile the FreeBSD kernel using the @Elliott Mitchell code because I want to boot FreeBSD as domU with Xen installed on my Arm 32 bit Chromebook. Unfortunately it didn't work at all. Maybe I've missed something / I haven't understood well what to do. Please give me so

[PATCH RFC v2 for-6.8/block 00/18] block: don't access bd_inode directly from other modules

2023-12-11 Thread Yu Kuai
From: Yu Kuai Changes in v2: - remove some bdev apis that is not necessary; - pass in offset for bdev_read_folio() and __bdev_get_folio(); - remove bdev_gfp_constraint() and add a new helper in fs/buffer.c to prevent access bd_indoe() directly from mapping_gfp_constraint() in ext4.(patch 15,

[PATCH RFC v2 for-6.8/block 04/18] mtd: block2mtd: use bdev apis

2023-12-11 Thread Yu Kuai
From: Yu Kuai On the one hand covert to use folio while reading bdev inode, on the other hand prevent to access bd_inode directly. Signed-off-by: Yu Kuai --- drivers/mtd/devices/block2mtd.c | 81 +++-- 1 file changed, 36 insertions(+), 45 deletions(-) diff --git a/

[PATCH RFC v2 for-6.8/block 01/18] block: add some bdev apis

2023-12-11 Thread Yu Kuai
From: Yu Kuai Those apis will be used for other modules, so that bd_inode won't be accessed directly from other modules. Signed-off-by: Yu Kuai --- block/bdev.c | 70 ++ block/blk.h| 2 -- include/linux/blkdev.h | 17 ++ 3

[PATCH RFC v2 for-6.8/block 07/18] bcachefs: remove dead function bdev_sectors()

2023-12-11 Thread Yu Kuai
From: Yu Kuai bdev_sectors() is not used hence remove it. Signed-off-by: Yu Kuai --- fs/bcachefs/util.h | 5 - 1 file changed, 5 deletions(-) diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 2984b57b2958..22a0acc1704f 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -

[PATCH RFC v2 for-6.8/block 08/18] bio: export bio_add_folio_nofail()

2023-12-11 Thread Yu Kuai
From: Yu Kuai Currently btrfs is using __bio_add_page() in write_dev_supers(). In order to convert to use folio for bdev in btrfs, export bio_add_folio_nofail() so that it can replace __bio_add_page(). Signed-off-by: Yu Kuai --- block/bio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/b

[PATCH RFC v2 for-6.8/block 06/18] scsicam: use bdev api in scsi_bios_ptable()

2023-12-11 Thread Yu Kuai
From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_devcie. Signed-off-by: Yu Kuai --- drivers/scsi/scsicam.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/scsicam.c b/drivers/scsi/scsicam.c index e2c7d8ef205f..9617d70c0e

[PATCH RFC v2 for-6.8/block 02/18] xen/blkback: use bdev api in xen_update_blkif_status()

2023-12-11 Thread Yu Kuai
From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_devcie. Signed-off-by: Yu Kuai --- drivers/block/xen-blkback/xenbus.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xen

[PATCH RFC v2 for-6.8/block 10/18] cramfs: use bdev apis in cramfs_blkdev_read()

2023-12-11 Thread Yu Kuai
From: Yu Kuai On the one hand covert to use folio while reading bdev inode, on the other hand prevent to access bd_inode directly. Also do some cleanup that there is no need for two for loop, and remove local array pages. Signed-off-by: Yu Kuai --- fs/cramfs/inode.c | 36 +

[PATCH RFC v2 for-6.8/block 05/18] s390/dasd: use bdev api in dasd_format()

2023-12-11 Thread Yu Kuai
From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_devcie. Signed-off-by: Yu Kuai --- drivers/s390/block/dasd_ioctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c i

[PATCH RFC v2 for-6.8/block 03/18] bcache: use bdev api in read_super()

2023-12-11 Thread Yu Kuai
From: Yu Kuai On the one hand covert to use folio while reading bdev inode, on the other hand prevent to access bd_inode directly. Signed-off-by: Yu Kuai --- drivers/md/bcache/super.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/md/bcache/super.c b/dr

[PATCH RFC v2 for-6.8/block 09/18] btrfs: use bdev apis

2023-12-11 Thread Yu Kuai
From: Yu Kuai On the one hand covert to use folio while reading bdev inode, on the other hand prevent to access bd_inode directly. Signed-off-by: Yu Kuai --- fs/btrfs/disk-io.c | 71 +- fs/btrfs/volumes.c | 17 ++- fs/btrfs/zoned.c | 15 +++

[PATCH RFC v2 for-6.8/block 11/18] erofs: use bdev api

2023-12-11 Thread Yu Kuai
From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_devcie. Signed-off-by: Yu Kuai --- fs/erofs/data.c | 18 -- fs/erofs/internal.h | 2 ++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/fs/erofs/data.c b/fs/erofs/data.c

Re: INFORMAL VOTE REQUIRED - DOCUMENTATION WORDING

2023-12-11 Thread Kelly Choi
Hi all, As we haven't yet reached a consensus, let's see what the informal vote looks like in the community by the end of the week. Since the scope and context have changed slightly, anonymous voting is permitted and I will be counting all votes made after Dec 4th. Please only vote once. Should y

[PATCH RFC v2 for-6.8/block 13/18] nilfs2: use bdev api in nilfs_attach_log_writer()

2023-12-11 Thread Yu Kuai
From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_devcie. Signed-off-by: Yu Kuai --- fs/nilfs2/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 55e31cc903d1..a1130e384937 100644 --

[PATCH RFC v2 for-6.8/block 14/18] jbd2: use bdev apis

2023-12-11 Thread Yu Kuai
From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_devcie. Signed-off-by: Yu Kuai --- fs/jbd2/journal.c | 3 +-- fs/jbd2/recovery.c | 6 ++ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index ed5318

[PATCH RFC v2 for-6.8/block 12/18] gfs2: use bdev api

2023-12-11 Thread Yu Kuai
From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_devcie. Signed-off-by: Yu Kuai --- fs/gfs2/glock.c | 2 +- fs/gfs2/ops_fstype.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index d6bf1f8c25d

[PATCH RFC v2 for-6.8/block 15/18] buffer: add a new helper to read sb block

2023-12-11 Thread Yu Kuai
From: Yu Kuai Unlike __bread_gfp(), ext4 has special handing while reading sb block: 1) __GFP_NOFAIL is not set, and memory allocation can fail; 2) If buffer write failed before, set buffer uptodate and don't read block from disk; 3) REQ_META is set for all IO, and REQ_PRIO is set for reading

[PATCH RFC v2 for-6.8/block 16/18] ext4: use new helper to read sb block

2023-12-11 Thread Yu Kuai
From: Yu Kuai Remove __ext4_sb_bread_gfp() and ext4_buffer_uptodate() that is defined by ext4, and convert to use common helper __bread_gfp2() and buffer_uptodate_or_error(). Signed-off-by: Yu Kuai --- fs/ext4/ext4.h| 13 - fs/ext4/inode.c | 8 fs/ext4/super.c | 4

[PATCH RFC v2 for-6.8/block 17/18] ext4: remove block_device_ejected()

2023-12-11 Thread Yu Kuai
From: Yu Kuai block_device_ejected() is added by commit bdfe0cbd746a ("Revert "ext4: remove block_device_ejected"") in 2015. At that time 'bdi->wb' is destroyed synchronized from del_gendisk(), hence if ext4 is still mounted, and then mark_buffer_dirty() will reference destroyed 'wb'. However, su

Re: [XEN PATCH 3/7] xen/arm: address MISRA C:2012 Rule 2.1

2023-12-11 Thread Julien Grall
On 11/12/2023 13:06, Michal Orzel wrote: On 11/12/2023 13:29, Julien Grall wrote: Hi, On 11/12/2023 10:30, Nicola Vetrini wrote: The "return 1;" statements at the end of some cases in the switch of function 'vgic_v3_its_mmio_write' in 'vcig-v3-its.c' cause the unreachability of the "ret

Re: [BUG]i2c_hid_acpi broken with 4.17.2 on Framework Laptop 13 AMD

2023-12-11 Thread Sébastien Chaumat
Le lun. 11 déc. 2023 à 12:27, Jan Beulich a écrit : > > On 11.12.2023 12:09, Sébastien Chaumat wrote: > > Le lun. 11 déc. 2023 à 10:18, Sébastien Chaumat a > > écrit : > >> > >>> On 05.12.2023 21:31, Sébastien Chaumat wrote: > > [2.464598] amd_gpio AMDI0030:00: failed to enable wake-up i

[PATCH RFC v2 for-6.8/block 18/18] ext4: use bdev apis

2023-12-11 Thread Yu Kuai
From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_devcie. Signed-off-by: Yu Kuai --- fs/ext4/dir.c | 6 ++ fs/ext4/ext4_jbd2.c | 6 +++--- fs/ext4/super.c | 3 +-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/fs/ext4/dir.c b/

Re: [BUG]i2c_hid_acpi broken with 4.17.2 on Framework Laptop 13 AMD

2023-12-11 Thread Sébastien Chaumat
> > Information coming from AML is required to be handed down by Dom0 to Xen. > > May want checking that (a) Dom0 properly does so and (b) Xen doesn't screw > > up in consuming that data. See PHYSDEVOP_setup_gsi. I wonder if this is > > specific to it being IRQ7 which GPIO uses, as at the (master)

Re: [PATCH v5 5/7] xen: ifdef inclusion of in

2023-12-11 Thread Oleksii
On Mon, 2023-12-04 at 11:39 +0100, Jan Beulich wrote: > On 04.12.2023 11:34, Oleksii wrote: > > If you ( or anyone else ) don't mind, I'll update the patch with an > > introduction of HAS_GRANT_TABLE. > > I won't NAK such a patch, but unless convincing arguments appear I > also > won't ACK it. I a

Re: [XEN PATCH 3/7] xen/arm: address MISRA C:2012 Rule 2.1

2023-12-11 Thread Nicola Vetrini
On 2023-12-11 15:14, Julien Grall wrote: On 11/12/2023 13:06, Michal Orzel wrote: On 11/12/2023 13:29, Julien Grall wrote: Hi, On 11/12/2023 10:30, Nicola Vetrini wrote: The "return 1;" statements at the end of some cases in the switch of function 'vgic_v3_its_mmio_write' in 'vcig-v3-its.

Re: [XEN PATCH 5/7] xen/arm: traps: add ASSERT_UNREACHABLE() where needed

2023-12-11 Thread Nicola Vetrini
On 2023-12-11 13:32, Julien Grall wrote: Hi, On 11/12/2023 10:30, Nicola Vetrini wrote: The branches of the switch after a call to 'do_unexpected_trap' cannot return, but there is one path that may return, hence only some clauses are marked with ASSERT_UNREACHABLE(). I don't understand why this

[XEN PATCH] xen/arm: smmu: move phys_addr_t definition to linux-compat.h

2023-12-11 Thread Federico Serafini
Both smmu and smmu-v3 (ported from Linux) define the typedef name "phys_addr_t": move the type definition to the common header linux-compat.h to address violations of MISRA C:2012 Rule 5.6 ("A typedef name shall be a unique identifier"). No functional change. Suggested-by: Jan Beulich Suggested-b

[PATCH] xen/pci: fix phantom error path in assign_device()

2023-12-11 Thread Stewart Hildebrand
Currently if an iommu_call() for a phantom function fails, there is no indication of the failure. Propagate (but don't return) the error code from the most recently failed iommu_call() and emit a warning. While here, add a comment to clarify that the loop keeps iterating even when failure is encoun

[xen-unstable-smoke test] 184091: tolerable all pass - PUSHED

2023-12-11 Thread osstest service owner
flight 184091 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/184091/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

Re: [RFC XEN PATCH v3 1/3] xen/vpci: Clear all vpci status of device

2023-12-11 Thread Roger Pau Monné
On Mon, Dec 11, 2023 at 12:40:07AM +0800, Jiqian Chen wrote: > When a device has been reset on dom0 side, the vpci on Xen > side won't get notification, so the cached state in vpci is > all out of date compare with the real device state. > To solve that problem, add a new hypercall to clear all vpc

Re: [RFC XEN PATCH v3 2/3] x86/pvh: Add (un)map_pirq and setup_gsi for PVH dom0

2023-12-11 Thread Roger Pau Monné
On Mon, Dec 11, 2023 at 12:40:08AM +0800, Jiqian Chen wrote: > If run Xen with PVH dom0 and hvm domU, hvm will map a pirq for > a passthrough device by using gsi, see > xen_pt_realize->xc_physdev_map_pirq and > pci_add_dm_done->xc_physdev_map_pirq. Then xc_physdev_map_pirq > will call into Xen, but

Re: [RFC QEMU PATCH v3 1/1] xen: Use gsi instead of irq for mapping pirq

2023-12-11 Thread Roger Pau Monné
On Mon, Dec 11, 2023 at 12:52:40AM +0800, Jiqian Chen wrote: > In PVH dom0, it uses the linux local interrupt mechanism, > when it allocs irq for a gsi, it is dynamic, and follow > the principle of applying first, distributing first. And > the irq number is alloced from small to large, but the > ap

Re: [RFC KERNEL PATCH v2 2/3] xen/pvh: Unmask irq for passthrough device in PVH dom0

2023-12-11 Thread Roger Pau Monné
On Wed, Dec 06, 2023 at 06:07:26AM +, Chen, Jiqian wrote: > On 2023/12/5 18:32, Jan Beulich wrote: > > On 05.12.2023 10:19, Roger Pau Monné wrote: > >> On Mon, Dec 04, 2023 at 02:19:33PM -0800, Stefano Stabellini wrote: > >>> On Mon, 4 Dec 2023, Roger Pau Monné wrote: > On Fri, Dec 01, 202

Re: [RFC XEN PATCH v3 3/3] libxl: Use gsi instead of irq for mapping pirq

2023-12-11 Thread Roger Pau Monné
On Mon, Dec 11, 2023 at 12:40:09AM +0800, Jiqian Chen wrote: > In PVH dom0, it uses the linux local interrupt mechanism, > when it allocs irq for a gsi, it is dynamic, and follow > the principle of applying first, distributing first. And > the irq number is alloced from small to large, but the > ap

Re: [RFC PATCH v1 1/1] xen/Makefile: introduce ARCH_FIXED_CONFIG for randconfig

2023-12-11 Thread Jan Beulich
On 07.12.2023 21:17, Andrew Cooper wrote: > On 07/12/2023 5:03 pm, Oleksii Kurochko wrote: >> ARCH_FIXED_CONFIG is required in the case of randconfig >> and CI for configs that aren't ready or are not >> supposed to be implemented for specific architecture. >> These configs should always be disable

Re: [XEN PATCH 5/7] xen/arm: traps: add ASSERT_UNREACHABLE() where needed

2023-12-11 Thread Julien Grall
Hi Nicola, On 11/12/2023 14:54, Nicola Vetrini wrote: On 2023-12-11 13:32, Julien Grall wrote: Hi, On 11/12/2023 10:30, Nicola Vetrini wrote: The branches of the switch after a call to 'do_unexpected_trap' cannot return, but there is one path that may return, hence only some clauses are marke

Re: [PATCH v5 5/7] xen: ifdef inclusion of in

2023-12-11 Thread Jan Beulich
On 11.12.2023 15:43, Oleksii wrote: > On Mon, 2023-12-04 at 11:39 +0100, Jan Beulich wrote: >> On 04.12.2023 11:34, Oleksii wrote: >>> If you ( or anyone else ) don't mind, I'll update the patch with an >>> introduction of HAS_GRANT_TABLE. >> >> I won't NAK such a patch, but unless convincing argum

Re: [XEN PATCH 5/7] xen/arm: traps: add ASSERT_UNREACHABLE() where needed

2023-12-11 Thread Julien Grall
On 11/12/2023 15:59, Julien Grall wrote: Hi Nicola, On 11/12/2023 14:54, Nicola Vetrini wrote: On 2023-12-11 13:32, Julien Grall wrote: Hi, On 11/12/2023 10:30, Nicola Vetrini wrote: The branches of the switch after a call to 'do_unexpected_trap' cannot return, but there is one path that

Re: [XEN PATCH] xen/arm: smmu: move phys_addr_t definition to linux-compat.h

2023-12-11 Thread Jan Beulich
On 11.12.2023 15:54, Federico Serafini wrote: > --- a/xen/include/xen/linux-compat.h > +++ b/xen/include/xen/linux-compat.h > @@ -16,5 +16,6 @@ typedef uint8_t __u8; > typedef int16_t __s16; > typedef int32_t __s32; > typedef int64_t __s64; > +typedef paddr_t phys_addr_t; Nit: Wants a blank lin

Re: [PATCH] xen/pci: fix phantom error path in assign_device()

2023-12-11 Thread Jan Beulich
On 11.12.2023 16:05, Stewart Hildebrand wrote: > Currently if an iommu_call() for a phantom function fails, there is no > indication of the failure. Propagate (but don't return) the error code > from the most recently failed iommu_call() and emit a warning. While > here, add a comment to clarify th

Re: [PATCH RFC v2 for-6.8/block 01/18] block: add some bdev apis

2023-12-11 Thread Jan Kara
On Mon 11-12-23 22:05:35, Yu Kuai wrote: > From: Yu Kuai > > Those apis will be used for other modules, so that bd_inode won't be > accessed directly from other modules. > > Signed-off-by: Yu Kuai ... > +void bdev_associated_mapping(struct block_device *bdev, > + stru

  1   2   >