Re: [XEN][PATCH v10 02/20] common/device_tree.c: unflatten_device_tree() propagate errors

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > This will be useful in dynamic node programming when new dt nodes are > unflattend > during runtime. Invalid device tree node related errors should be propagated > back to the caller. > > Signed-off-by: Vikram Garhwal Reviewed-by: Michal Orzel ~M

Re: [XEN][PATCH v10 03/20] xen/arm/device: Remove __init from function type

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > Remove __init from following function to access during runtime: > 1. map_irq_to_domain() > 2. handle_device_interrupts() > 3. map_range_to_domain() > 4. unflatten_dt_node() > 5. handle_device() > 6. map_device_children() >

Re: [XEN][PATCH v10 05/20] xen/arm: Add CONFIG_OVERLAY_DTB

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > > > Introduce a config option where the user can enable support for > adding/removing > device tree nodes using a device tree binary overlay. > > Update SUPPORT.md and CHANGELOG.md to state the Device Tree Overlays support > for > Arm. > > Signe

Re: [XEN][PATCH v10 08/20] xen/device-tree: Add device_tree_find_node_by_path() to find nodes in device tree

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > > > Add device_tree_find_node_by_path() to find a matching node with path for a You renamed it in v8 so both here and in commit title: s/device_tree_find_node_by_path/dt_find_node_by_path_from/ > dt_device_node. > > Reason behind this function: >

Re: [XEN][PATCH v10 09/20] xen/iommu: Move spin_lock from iommu_dt_device_is_assigned to caller

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > Rename iommu_dt_device_is_assigned() to iommu_dt_device_is_assigned_locked(). > > Moving spin_lock to caller was done to prevent the concurrent access to > iommu_dt_device_is_assigned while doing add/remove/assign/deassign. Follow-up > patches in thi

Re: [XEN][PATCH v10 11/20] xen/iommu: Introduce iommu_remove_dt_device()

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > Remove master device from the IOMMU. This will be helpful when removing the > overlay nodes using dynamic programming during run time. > > Signed-off-by: Vikram Garhwal > Acked-by: Jan Beulich You don't seem to handle Julien remarks for this patch

[linux-linus test] 182544: regressions - FAIL

2023-08-29 Thread osstest service owner
flight 182544 linux-linus real [real] flight 182552 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/182544/ http://logs.test-lab.xenproject.org/osstest/logs/182552/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run

Re: [XEN][PATCH v10 12/20] xen/smmu: Add remove_device callback for smmu_iommu ops

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > > > Add remove_device callback for removing the device entry from smmu-master > using > following steps: > 1. Find if SMMU master exists for the device node. > 2. Check if device is currently in use. Since you removed a call to iommu_dt_device_is_a

[ovmf test] 182551: all pass - PUSHED

2023-08-29 Thread osstest service owner
flight 182551 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/182551/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 020cc9e2e7053bb62247b0babbbe80cb855592e5 baseline version: ovmf a107fcb618934ae18f296

Re: [XEN][PATCH v10 14/20] common/device_tree: Add rwlock for dt_host

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > > > Dynamic programming ops will modify the dt_host and there might be other > functions which are browsing the dt_host at the same time. To avoid the race > conditions, adding rwlock for browsing the dt_host during runtime. dt_host > writer will be

Re: [PATCH v1 01/23] pc/xen: Xen Q35 support: provide IRQ handling for PCI devices

2023-08-29 Thread David Woodhouse
On Tue, 2023-06-20 at 13:24 -0400, Joel Upham wrote: > The primary difference in PCI device IRQ management between Xen HVM and > QEMU is that Xen PCI IRQs are "device-centric" while QEMU PCI IRQs are > "chipset-centric". Namely, Xen uses PCI device BDF and INTx as coordinates > to assert IRQ while

[PATCH] x86emul/test: fold AVX512VL scatter/gather test blobs with AVX512F ones

2023-08-29 Thread Jan Beulich
Everywhere else the VL tests are grouped with the basic ones, distinguished simply by the "form" specifiers. No change to the generated test blobs, and hence no functional change. Signed-off-by: Jan Beulich --- a/tools/tests/x86_emulator/Makefile +++ b/tools/tests/x86_emulator/Makefile @@ -18,7

Re: [PATCH v3 0/29] block: Make blkdev_get_by_*() return handle

2023-08-29 Thread Christian Brauner
> replacement) I think we can go ahead with the series as is. As you said > there will be some conflicts in btrfs and I've learned about f2fs conflicts > as well so I can rebase & repost the series on top of rc1 to make life > easier for you. That is be much appreciated. Thank you!

Re: Fwd: UBSAN: index 1 is out of range for type 'xen_netif_rx_sring_entry [1]'

2023-08-29 Thread Linux regression tracking #update (Thorsten Leemhuis)
[TLDR: This mail in primarily relevant for Linux kernel regression tracking. See link in footer if these mails annoy you.] On 26.07.23 07:06, Kees Cook wrote: > On Tue, Jul 25, 2023 at 03:34:26PM +0200, Juergen Gross wrote: >> On 25.07.23 15:24, Juergen Gross wrote: >>> On 23.07.23 02:06, Nathan C

[PATCH 0/2] x86/cpu-policy: minor adjustments

2023-08-29 Thread Jan Beulich
Two minor oddities I noticed while moving the XSA-435 prereqs back to 4.11 (a 3rd one is mentioned in a remark in patch 1). 1: add (another) size check of deep_features[] 2: drop NR_DEEP_DEPS Jan

Re: [PATCH v1 2/2] xen: move arm/include/asm/vm_event.h to stubs

2023-08-29 Thread Oleksii
On Mon, 2023-08-28 at 18:05 +0200, Jan Beulich wrote: > On 28.08.2023 17:57, Oleksii Kurochko wrote: > > asm/vm_event.h is common for ARM and RISC-V so it will be moved to > > stubs dir. > > > > Original asm/vm_event.h from ARM was updated: > >  * use SPDX-License-Identifier. > >  * update comment

[PATCH 1/2] x86/cpu-policy: add (another) size check of deep_features[]

2023-08-29 Thread Jan Beulich
Having this check in library code guarantees that the tool stack use(s) will also be covered. Signed-off-by: Jan Beulich --- Dropping the check from arch/x86/cpu-policy.c:build_assertions() in exchange may be an option. While there checking is against FSCAPINTS, the difference is only on the surf

Re: [XEN][PATCH v10 15/20] arm/asm/setup.h: Update struct map_range_data to add rangeset.

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > Add rangesets for IRQs and IOMEMs. This was done to accommodate dynamic > overlay > node addition/removal operations. With overlay operations, new IRQs and IOMEMs > are added in dt_host and routed. While removing overlay nodes, nodes are > remove s/

[PATCH 2/2] x86/cpu-policy: drop NR_DEEP_DEPS

2023-08-29 Thread Jan Beulich
The constant is solely used in a build time check of the array size of x86_cpu_policy_lookup_deep_deps():deep_deps[], thus merely proving that Python got its internal calculations right. There's no real dependency on this constant expressing the number of elements in INIT_DEEP_DEPS. Signed-off-by:

Re: [PATCH v1 2/2] xen: move arm/include/asm/vm_event.h to stubs

2023-08-29 Thread Jan Beulich
On 29.08.2023 14:14, Oleksii wrote: > On Mon, 2023-08-28 at 18:05 +0200, Jan Beulich wrote: >> On 28.08.2023 17:57, Oleksii Kurochko wrote: >>> +static inline void vm_event_cleanup_domain(struct domain *d) >>> +{ >>> +    memset(&d->monitor, 0, sizeof(d->monitor)); >> >> This looks to be the sole r

[PATCH 0/2] xen: privcmd: Add ioeventfd support

2023-08-29 Thread Viresh Kumar
Hello, Now that irqfd support (backend to guest interrupt) is already merged, this series solves the other part of the problem, i.e. ioeventfd (guest to backend interrupt). More details inside the commits. -- Viresh Viresh Kumar (2): xen: evtchn: Allow shared registration of IRQ handers xen

[PATCH 1/2] xen: evtchn: Allow shared registration of IRQ handers

2023-08-29 Thread Viresh Kumar
Currently the handling of events is supported either in the kernel or userspace, but not both. In order to support fast delivery of interrupts from the guest to the backend, we need to handle the Queue notify part of Virtio protocol in kernel and the rest in userspace. Update the interrupt handle

[PATCH 2/2] xen: privcmd: Add support for ioeventfd

2023-08-29 Thread Viresh Kumar
Virtio guests send VIRTIO_MMIO_QUEUE_NOTIFY notification when they need to notify the backend of an update to the status of the virtqueue. The backend or another entity, polls the MMIO address for updates to know when the notification is sent. It works well if the backend does this polling by itse

Re: [XEN PATCH v5 4/4] xen/x86: address violations of MISRA C:2012 Rule 7.2

2023-08-29 Thread Jan Beulich
On 28.08.2023 13:03, Simone Ballarin wrote: > --- a/xen/arch/x86/hvm/stdvga.c > +++ b/xen/arch/x86/hvm/stdvga.c > @@ -39,34 +39,35 @@ > > #define PAT(x) (x) > static const uint32_t mask16[16] = { > -PAT(0x), > -PAT(0x00ff), > -PAT(0xff00), > -PAT(0x), > -

[xen-unstable test] 182548: tolerable FAIL

2023-08-29 Thread osstest service owner
flight 182548 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/182548/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-qemut-rhel6hvm-amd 7 xen-install fail in 182542 pass in 182548 test-amd64-i386-pair 11 xen-

Re: [XEN PATCH 04/13] xen/x86: address violations of MISRA C:2012 Directive 4.10

2023-08-29 Thread Jan Beulich
On 28.08.2023 15:20, Simone Ballarin wrote: > Add or move inclusion guards to address violations of > MISRA C:2012 Directive 4.10 ("Precautions shall be taken in order > to prevent the contents of a header file being included more than > once"). > > Inclusion guards must appear at the beginning of

Re: [XEN PATCH 06/13] x86/EFI: address violations of MISRA C:2012 Directive 4.10

2023-08-29 Thread Jan Beulich
On 28.08.2023 15:20, Simone Ballarin wrote: > Add inclusion guards to address violations of > MISRA C:2012 Directive 4.10 ("Precautions shall be taken in order > to prevent the contents of a header file being included more than > once"). > > Mechanical change. > > Signed-off-by: Simone Ballarin

Re: [PATCH v2 2/8] xen/ppc: Add public/arch-ppc.h

2023-08-29 Thread Jan Beulich
On 23.08.2023 22:07, Shawn Anastasio wrote: > Signed-off-by: Shawn Anastasio Acked-by: Jan Beulich > --- /dev/null > +++ b/xen/include/public/arch-ppc.h > @@ -0,0 +1,110 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later */ > +/* > + * Copyright (C) IBM Corp. 2005, 2006 > + * Copyright (C) Rapt

[PATCH 0/3] x86: Debug Regs fixes, part 1

2023-08-29 Thread Andrew Cooper
This is the rework of "x86: Fix calculation of %dr6/dr7 reserved bits", accounting for things which have changed in the past 5 years, and new discoveries. In particular, it was buggy to take Roger's R-by. The logic was correct when he reviewed it, and was not correct in the forward-port presented

[PATCH 1/3] x86: Reject bad %dr6/%dr7 values when loading guest state

2023-08-29 Thread Andrew Cooper
Right now, bad PV state is silently dropped and zeroed, while bad HVM state is passed directly to hardware and can trigger VMEntry/VMRUN failures. e.g. (XEN) d12v0 vmentry failure (reason 0x8021): Invalid guest state (0) ... (XEN) RFLAGS=0x0002 (0x0002) DR7 = 0x4001

[PATCH 2/3] x86: Introduce new debug.c for debug register infrastructure

2023-08-29 Thread Andrew Cooper
Broken out of the subsequent patch for clarity. Add stub x86_adj_dr{6,7}_rsvd() functions which will be extended in the following patch to fix bugs, and adjust debugreg.h to compile with a more minimal set of includes. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: We

[PATCH 3/3] x86: Fix calculation of %dr6/dr7 reserved bits

2023-08-29 Thread Andrew Cooper
RTM debugging and BusLock Detect have both introduced conditional behaviour into the %dr6/7 calculations which Xen's existing logic doesn't account for. Introduce the CPUID bit for BusLock Detect, so we can get the %dr6 behaviour correct from the outset. Implement x86_adj_dr{6,7}_rsvd() fully, an

Re: [PATCH v2 3/8] xen/ppc: Implement atomic.h

2023-08-29 Thread Jan Beulich
On 23.08.2023 22:07, Shawn Anastasio wrote: > --- /dev/null > +++ b/xen/arch/ppc/include/asm/atomic.h > @@ -0,0 +1,390 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later */ > +/* > + * PowerPC64 atomic operations > + * > + * Copyright (C) 2001 Paul Mackerras , IBM > + * Copyright (C) 2001 Anton Bla

Re: [PATCH v2 4/8] xen/ppc: Implement bitops.h

2023-08-29 Thread Jan Beulich
On 23.08.2023 22:07, Shawn Anastasio wrote: > Implement bitops.h, based on Linux's implementation as of commit > 5321d1b1afb9a17302c6cec79f0cbf823eb0d3fc. Though it is based off of > Linux's implementation, this code diverges significantly in a number of > ways: > - Bitmap entries changed to 32-b

Re: [PATCH 1/3] x86: Reject bad %dr6/%dr7 values when loading guest state

2023-08-29 Thread Jan Beulich
On 29.08.2023 15:43, Andrew Cooper wrote: > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -1074,8 +1074,27 @@ int arch_set_info_guest( > #endif > flags = c(flags); > > +if ( !compat ) > +{ > +if ( c(debugreg[6]) != (uint32_t)c(debugreg[6]) || > +

Re: [PATCH 2/3] x86: Introduce new debug.c for debug register infrastructure

2023-08-29 Thread Jan Beulich
On 29.08.2023 15:43, Andrew Cooper wrote: > Broken out of the subsequent patch for clarity. > > Add stub x86_adj_dr{6,7}_rsvd() functions which will be extended in the > following patch to fix bugs, and adjust debugreg.h to compile with a more > minimal set of includes. > > Signed-off-by: Andrew

Re: [PATCH v1 01/23] pc/xen: Xen Q35 support: provide IRQ handling for PCI devices

2023-08-29 Thread David Woodhouse
On Tue, 2023-06-20 at 13:24 -0400, Joel Upham wrote: > The primary difference in PCI device IRQ management between Xen HVM and > QEMU is that Xen PCI IRQs are "device-centric" while QEMU PCI IRQs are > "chipset-centric". Namely, Xen uses PCI device BDF and INTx as coordinates > to assert IRQ while

Re: [PATCH 3/3] x86: Fix calculation of %dr6/dr7 reserved bits

2023-08-29 Thread Jan Beulich
On 29.08.2023 15:43, Andrew Cooper wrote: > --- a/xen/arch/x86/include/asm/debugreg.h > +++ b/xen/arch/x86/include/asm/debugreg.h > @@ -1,6 +1,7 @@ > #ifndef _X86_DEBUGREG_H > #define _X86_DEBUGREG_H > > +#include > > /* Indicate the register numbers for a number of the specific > debug

Re: [XEN PATCH] x86/ACPI: Ignore entries with invalid APIC IDs when parsing MADT

2023-08-29 Thread Roger Pau Monné
On Sun, Aug 27, 2023 at 05:44:15PM +0200, Thomas Gleixner wrote: > On Wed, Aug 23 2023 at 14:56, Jan Beulich wrote: > > On 23.08.2023 11:21, Andrew Cooper wrote: > >> In the spec, exactly where you'd expect to find them... > >> > >> "OSPM does not expect the information provided in this table to b

Re: [PATCH 2/3] x86: Introduce new debug.c for debug register infrastructure

2023-08-29 Thread Andrew Cooper
On 29/08/2023 3:10 pm, Jan Beulich wrote: > On 29.08.2023 15:43, Andrew Cooper wrote: >> Broken out of the subsequent patch for clarity. >> >> Add stub x86_adj_dr{6,7}_rsvd() functions which will be extended in the >> following patch to fix bugs, and adjust debugreg.h to compile with a more >> mini

Re: [PATCH 3/3] x86: Fix calculation of %dr6/dr7 reserved bits

2023-08-29 Thread Andrew Cooper
On 29/08/2023 3:21 pm, Jan Beulich wrote: > On 29.08.2023 15:43, Andrew Cooper wrote: >> --- a/xen/arch/x86/include/asm/debugreg.h >> +++ b/xen/arch/x86/include/asm/debugreg.h >> @@ -1,6 +1,7 @@ >> #ifndef _X86_DEBUGREG_H >> #define _X86_DEBUGREG_H >> >> +#include >> >> /* Indicate the regi

[PATCH v2 0/2] introduce stub directory to storing empty/stub headers

2023-08-29 Thread Oleksii Kurochko
A lot of empty/stub headers should be introduced during the early steps of adding support of new architecture. An example can be found here: 1. https://lore.kernel.org/xen-devel/cover.1692181079.git.oleksii.kuroc...@gmail.com/ 2. https://lore.kernel.org/xen-devel/a92f99e8f697da99d77bfde562a549d

[PATCH v2 2/2] xen: move arm/include/asm/vm_event.h to stubs

2023-08-29 Thread Oleksii Kurochko
asm/vm_event.h is common for ARM and RISC-V so it will be moved to stubs dir. Original asm/vm_event.h from ARM was updated: * use SPDX-License-Identifier. * update comment messages of stubs. * update #ifdef. * change public/domctl.h to public/vm_event.h. Signed-off-by: Oleksii Kurochko --- C

[PATCH v2 1/2] xen: add stubs dir to include path

2023-08-29 Thread Oleksii Kurochko
stubs dir will contain empty/stubs generic for all architectures headers. Signed-off-by: Oleksii Kurochko --- Changes in V2: - Nothing changed. --- xen/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/Makefile b/xen/Makefile index f57e5a596c..64c3542c84 100644 --- a/xen/Makefile

[ovmf test] 182554: all pass - PUSHED

2023-08-29 Thread osstest service owner
flight 182554 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/182554/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 14bf2cb411cae5306fd9efa864e8cf9ecc19 baseline version: ovmf 020cc9e2e7053bb62247b

[libvirt test] 182550: tolerable all pass - PUSHED

2023-08-29 Thread osstest service owner
flight 182550 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/182550/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 182523 test-armhf-armhf-libvirt-qcow2 15 saveres

[PATCH] x86/APIC: Remove esr_disable

2023-08-29 Thread Andrew Cooper
It is unconditionally 0 in Xen, and was deleted in Linux somewhere between 2.5 and 2.6. Remove it in Xen too. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu I got bored waiting for `git log` to tell where it was disabled in Linux... --- xen/arch/x86/apic.c

Re: [PATCH 3/3] x86: Fix calculation of %dr6/dr7 reserved bits

2023-08-29 Thread Jan Beulich
On 29.08.2023 16:29, Andrew Cooper wrote: > On 29/08/2023 3:21 pm, Jan Beulich wrote: >> On 29.08.2023 15:43, Andrew Cooper wrote: >>> --- a/xen/arch/x86/include/asm/x86-defns.h >>> +++ b/xen/arch/x86/include/asm/x86-defns.h >>> @@ -102,13 +102,30 @@ >>> >>> /* >>> * Debug status flags in DR6.

Re: [PATCH] x86/APIC: Remove esr_disable

2023-08-29 Thread Jan Beulich
On 29.08.2023 17:46, Andrew Cooper wrote: > It is unconditionally 0 in Xen, and was deleted in Linux somewhere between 2.5 > and 2.6. > > Remove it in Xen too. > > Signed-off-by: Andrew Cooper Acked-by: Jan Beulich

Re: [PATCH] x86/APIC: Remove esr_disable

2023-08-29 Thread Roger Pau Monné
On Tue, Aug 29, 2023 at 04:46:21PM +0100, Andrew Cooper wrote: > It is unconditionally 0 in Xen, and was deleted in Linux somewhere between 2.5 > and 2.6. > > Remove it in Xen too. > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC: Roger Pau Monné > CC: Wei Liu > > I got bored wa

Re: [PATCH] x86/APIC: Remove esr_disable

2023-08-29 Thread Andrew Cooper
On 29/08/2023 5:00 pm, Roger Pau Monné wrote: > On Tue, Aug 29, 2023 at 04:46:21PM +0100, Andrew Cooper wrote: >> It is unconditionally 0 in Xen, and was deleted in Linux somewhere between >> 2.5 >> and 2.6. >> >> Remove it in Xen too. >> >> Signed-off-by: Andrew Cooper >> --- >> CC: Jan Beulich

xen arm64 low power sleep support

2023-08-29 Thread Anthony Chan
Hi all, My name is Tony and I've been researching/developing using Xen for potential upcoming uses in our embedded systems. I started with Xen using Xilinx tools about a year ago and still have lots to learn about what it can to do in the embedded space. So far, I've managed to integrate Xen

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

2023-08-29 Thread osstest service owner
flight 182556 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/182556/ 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: [ImageBuilder PATCH] uboot-script-gen: use size from arm64 Image header

2023-08-29 Thread Stewart Hildebrand
On 8/24/23 19:19, Stefano Stabellini wrote: > On Thu, 24 Aug 2023, Stewart Hildebrand wrote: >> There is a corner case where the filesizes of the xen and Linux kernel images >> are not sufficient. These binaries likely contain .NOLOAD sections, which are >> not accounted in the filesize. >> >> Chec

Re: xen arm64 low power sleep support

2023-08-29 Thread Stefano Stabellini
On Tue, 29 Aug 2023, Anthony Chan wrote: > Hi all, > > My name is Tony and I've been researching/developing using Xen for potential > upcoming uses in our embedded systems. I started with Xen using Xilinx tools > about a year ago and still have lots to learn about what it can to do in the > em

Re: [XEN][PATCH v10 02/20] common/device_tree.c: unflatten_device_tree() propagate errors

2023-08-29 Thread Stefano Stabellini
On Fri, 25 Aug 2023, Vikram Garhwal wrote: > This will be useful in dynamic node programming when new dt nodes are > unflattend > during runtime. Invalid device tree node related errors should be propagated > back to the caller. > > Signed-off-by: Vikram Garhwal Acked-by: Stefano Stabellini

Re: [XEN][PATCH v10 08/20] xen/device-tree: Add device_tree_find_node_by_path() to find nodes in device tree

2023-08-29 Thread Stefano Stabellini
On Fri, 25 Aug 2023, Vikram Garhwal wrote: > Add device_tree_find_node_by_path() to find a matching node with path for a > dt_device_node. > > Reason behind this function: > Each time overlay nodes are added using .dtbo, a new fdt(memcpy of > device_tree_flattened) is created and updated w

[linux-linus test] 182553: regressions - FAIL

2023-08-29 Thread osstest service owner
flight 182553 linux-linus real [real] flight 182558 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/182553/ http://logs.test-lab.xenproject.org/osstest/logs/182558/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run

Re: [XEN][PATCH v10 12/20] xen/smmu: Add remove_device callback for smmu_iommu ops

2023-08-29 Thread Stefano Stabellini
On Tue, 29 Aug 2023, Michal Orzel wrote: > On 25/08/2023 10:02, Vikram Garhwal wrote: > > Add remove_device callback for removing the device entry from smmu-master > > using > > following steps: > > 1. Find if SMMU master exists for the device node. > > 2. Check if device is currently in use. > Si

Re: [XEN PATCH] x86/ACPI: Ignore entries with invalid APIC IDs when parsing MADT

2023-08-29 Thread Thomas Gleixner
On Tue, Aug 29 2023 at 16:25, Roger Pau Monné wrote: > On Sun, Aug 27, 2023 at 05:44:15PM +0200, Thomas Gleixner wrote: >> The APIC/X2APIC description of MADT specifies flags: >> >> Enabled If this bit is set the processor is ready for use. If >> this bit is clear and the

[PATCH v9 05/16] vpci/header: rework exit path in init_bars

2023-08-29 Thread Volodymyr Babchuk
Introduce "fail" label in init_bars() function to have the centralized error return path. This is the pre-requirement for the future changes in this function. This patch does not introduce functional changes. Signed-off-by: Volodymyr Babchuk Suggested-by: Roger Pau Monné -- Since v9: - New in v

[PATCH v9 03/16] vpci: restrict unhandled read/write operations for guests

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko A guest would be able to read and write those registers which are not emulated and have no respective vPCI handlers, so it will be possible for it to access the hardware directly. In order to prevent a guest from reads and writes from/to the unhandled registers make

[PATCH v9 02/16] vpci: use per-domain PCI lock to protect vpci structure

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko Use a previously introduced per-domain read/write lock to check whether vpci is present, so we are sure there are no accesses to the contents of the vpci struct if not. This lock can be used (and in a few cases is used right away) so that vpci removal can be performe

[PATCH v9 06/16] vpci/header: implement guest BAR register handlers

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko Add relevant vpci register handlers when assigning PCI device to a domain and remove those when de-assigning. This allows having different handlers for different domains, e.g. hwdom and other guests. Emulate guest BAR register values: this allows creating a guest vi

[PATCH v9 08/16] vpci/header: handle p2m range sets per BAR

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko Instead of handling a single range set, that contains all the memory regions of all the BARs and ROM, have them per BAR. As the range sets are now created when a PCI device is added and destroyed when it is removed so make them named and accounted. Note that rangese

[PATCH v9 15/16] xen/arm: vpci: check guest range

2023-08-29 Thread Volodymyr Babchuk
From: Stewart Hildebrand Skip mapping the BAR if it is not in a valid range. Signed-off-by: Stewart Hildebrand --- xen/drivers/vpci/header.c | 9 + 1 file changed, 9 insertions(+) diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c index 1d243eeaf9..dbabdcbed2 100644 --

[PATCH v9 09/16] vpci/header: program p2m with guest BAR view

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko Take into account guest's BAR view and program its p2m accordingly: gfn is guest's view of the BAR and mfn is the physical BAR value. This way hardware domain sees physical BAR values and guest sees emulated ones. Hardware domain continues getting the BARs identity

[PATCH v9 07/16] rangeset: add RANGESETF_no_print flag

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko There are range sets which should not be printed, so introduce a flag which allows marking those as such. Implement relevant logic to skip such entries while printing. While at it also simplify the definition of the flags by directly defining those without helpers.

[PATCH v9 04/16] vpci: add hooks for PCI device assign/de-assign

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko When a PCI device gets assigned/de-assigned we need to initialize/de-initialize vPCI state for the device. Also, rename vpci_add_handlers() to vpci_assign_device() and vpci_remove_device() to vpci_deassign_device() to better reflect role of the functions. Signed-of

[PATCH v9 11/16] vpci/header: reset the command register when adding devices

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko Reset the command register when assigning a PCI device to a guest: according to the PCI spec the PCI_COMMAND register is typically all 0's after reset, but this might not be true for the guest as it needs to respect host's settings. For that reason, do not write 0 to

[PATCH v9 10/16] vpci/header: emulate PCI_COMMAND register for guests

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko Xen and/or Dom0 may have put values in PCI_COMMAND which they expect to remain unaltered. PCI_COMMAND_SERR bit is a good example: while the guest's view of this will want to be zero initially, the host having set it to 1 may not easily be overwritten with 0, or else

[PATCH v9 14/16] xen/arm: account IO handlers for emulated PCI MSI-X

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko At the moment, we always allocate an extra 16 slots for IO handlers (see MAX_IO_HANDLER). So while adding IO trap handlers for the emulated MSI-X registers we need to explicitly tell that we have additional IO handlers, so those are accounted. Signed-off-by: Oleksan

[PATCH v9 01/16] pci: introduce per-domain PCI rwlock

2023-08-29 Thread Volodymyr Babchuk
Add per-domain d->pci_lock that protects access to d->pdev_list. Purpose of this lock is to give guarantees to VPCI code that underlying pdev will not disappear under feet. This is a rw-lock, but this patch adds only write_lock()s. There will be read_lock() users in the next patches. This lock sho

[PATCH v9 00/16] PCI devices passthrough on Arm, part 3

2023-08-29 Thread Volodymyr Babchuk
Hello all, This is next version of vPCI rework. Aim of this series is to prepare ground for introducing PCI support on ARM platform. This vesion includes addressed commentes from a previous one. Also it introduces a couple patches from Stewart. This patches are related to vPCI use on ARM. Patch "

[PATCH v9 12/16] vpci: add initial support for virtual PCI bus topology

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko Assign SBDF to the PCI devices being passed through with bus 0. The resulting topology is where PCIe devices reside on the bus 0 of the root complex itself (embedded endpoints). This implementation is limited to 32 devices which are allowed on a single PCI bus. Plea

[PATCH v9 16/16] xen/arm: vpci: permit access to guest vpci space

2023-08-29 Thread Volodymyr Babchuk
From: Stewart Hildebrand Move iomem_caps initialization earlier (before arch_domain_create()). Signed-off-by: Stewart Hildebrand --- This is sort of a follow-up to: baa6ea700386 ("vpci: add permission checks to map_range()") I don't believe we need a fixes tag since this depends on the vPCI

[PATCH v9 13/16] xen/arm: translate virtual PCI bus topology for guests

2023-08-29 Thread Volodymyr Babchuk
From: Oleksandr Andrushchenko There are three originators for the PCI configuration space access: 1. The domain that owns physical host bridge: MMIO handlers are there so we can update vPCI register handlers with the values written by the hardware domain, e.g. physical view of the registers vs g

Re: [XEN][PATCH v10 17/20] xen/arm: Implement device tree node addition functionalities

2023-08-29 Thread Stefano Stabellini
On Fri, 25 Aug 2023, Vikram Garhwal wrote: > Update sysctl XEN_SYSCTL_dt_overlay to enable support for dtbo nodes addition > using device tree overlay. > > xl dt-overlay add file.dtbo: > Each time overlay nodes are added using .dtbo, a new fdt(memcpy of > device_tree_flattened) is created

Re: [XEN][PATCH v10 16/20] xen/arm: Implement device tree node removal functionalities

2023-08-29 Thread Stefano Stabellini
On Fri, 25 Aug 2023, Vikram Garhwal wrote: > Introduce sysctl XEN_SYSCTL_dt_overlay to remove device-tree nodes added using > device tree overlay. > > xl dt-overlay remove file.dtbo: > Removes all the nodes in a given dtbo. > First, removes IRQ permissions and MMIO accesses. Next, it finds

Re: [PATCH v2 2/2] xen: move arm/include/asm/vm_event.h to stubs

2023-08-29 Thread Stefano Stabellini
On Tue, 29 Aug 2023, Oleksii Kurochko wrote: > asm/vm_event.h is common for ARM and RISC-V so it will be moved to > stubs dir. > > Original asm/vm_event.h from ARM was updated: > * use SPDX-License-Identifier. > * update comment messages of stubs. > * update #ifdef. > * change public/domctl.h

[PATCH] docs/misra: add 14.3 and 14.4

2023-08-29 Thread Stefano Stabellini
From: Stefano Stabellini Add 14.3, with a project-wide deviations on if statements. Add 14.4, clarifying that implicit conversions of integers, chars and pointers to bool are allowed. Also take the opportunity to clarify that parameters of function pointer types are expected to have names (Rule

[qemu-mainline test] 182555: tolerable FAIL - PUSHED

2023-08-29 Thread osstest service owner
flight 182555 qemu-mainline real [real] flight 182561 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/182555/ http://logs.test-lab.xenproject.org/osstest/logs/182561/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-am

[ovmf test] 182560: all pass - PUSHED

2023-08-29 Thread osstest service owner
flight 182560 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/182560/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 9896a9c61836a5afba72c47d7c64f4e24f0805ba baseline version: ovmf 14bf2cb411cae5306fd9e

[xen-unstable test] 182557: tolerable FAIL - PUSHED

2023-08-29 Thread osstest service owner
flight 182557 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/182557/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-xl-qemuu-win7-amd64 19 guest-stop fail like 182548 test-armhf-armhf-libvirt 16 save

Re: [PATCH 1/3] x86: Reject bad %dr6/%dr7 values when loading guest state

2023-08-29 Thread Jan Beulich
On 29.08.2023 15:43, Andrew Cooper wrote: > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -1074,8 +1074,27 @@ int arch_set_info_guest( > #endif > flags = c(flags); > > +if ( !compat ) > +{ > +if ( c(debugreg[6]) != (uint32_t)c(debugreg[6]) || > +