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

2023-08-31 Thread Stewart Hildebrand
On 8/29/23 19:19, Volodymyr Babchuk wrote: > diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c > index e58bbdf68d..e96d7b2b37 100644 > --- a/xen/drivers/vpci/header.c > +++ b/xen/drivers/vpci/header.c > @@ -477,6 +477,72 @@ static void cf_check bar_write( >

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

2023-08-31 Thread Stewart Hildebrand
On 8/29/23 19:19, Volodymyr Babchuk wrote: > diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c > index 1e82217200..e351db4620 100644 > --- a/xen/drivers/vpci/header.c > +++ b/xen/drivers/vpci/header.c > @@ -523,6 +546,14 @@ static void cf_check cmd_write( >

[PATCH v5 5/5] xen/vpci: header: filter PCI capabilities

2023-08-31 Thread Stewart Hildebrand
Currently, Xen vPCI only supports virtualizing the MSI and MSI-X capabilities. Hide all other PCI capabilities (including extended capabilities) from domUs for now, even though there may be certain devices/drivers that depend on being able to discover certain capabilities. We parse the physical

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

2023-08-31 Thread Vikram Garhwal
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 removed from dt_host and their IRQs and IOMEMs routing is also

[XEN][PATCH v11 18/20] tools/libs/ctrl: Implement new xc interfaces for dt overlay

2023-08-31 Thread Vikram Garhwal
xc_dt_overlay() sends the device tree binary overlay, size of .dtbo and overlay operation type i.e. add or remove to xen. Signed-off-by: Vikram Garhwal Reviewed-by: Anthony PERARD --- tools/include/xenctrl.h | 5 tools/libs/ctrl/Makefile.common | 1 +

[XEN][PATCH v11 13/20] asm/smp.h: Fix circular dependency for device_tree.h and rwlock.h

2023-08-31 Thread Vikram Garhwal
Dynamic programming ops will modify the dt_host and there might be other function which are browsing the dt_host at the same time. To avoid the race conditions, we will need to add a rwlock to protect access to the dt_host. However, adding rwlock in device_tree.h causes following circular

[XEN][PATCH v11 19/20] tools/libs/light: Implement new libxl functions for device tree overlay ops

2023-08-31 Thread Vikram Garhwal
Signed-off-by: Vikram Garhwal Reviewed-by: Anthony PERARD --- tools/include/libxl.h | 11 + tools/libs/light/Makefile | 3 ++ tools/libs/light/libxl_dt_overlay.c | 71 + 3 files changed, 85 insertions(+) create mode 100644

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

2023-08-31 Thread Vikram Garhwal
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 --- Changes from v10: Add comment regarding return values of iommu_remove_dt_device(). Add ASSERT to check if is_protected

[XEN][PATCH v11 10/20] xen/iommu: protect iommu_add_dt_device() with dtdevs_lock

2023-08-31 Thread Vikram Garhwal
Protect iommu_add_dt_device() with dtdevs_lock to prevent concurrent access to add/remove/assign/deassign. With addition of dynamic programming feature(follow-up patches in this series), this function can be concurrently accessed by dynamic node add/remove using device tree overlays.

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

2023-08-31 Thread Vikram Garhwal
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 the nodes in dt_host and delete the device node

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

2023-08-31 Thread Vikram Garhwal
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 added in the follow-up patch for device tree overlay

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

2023-08-31 Thread Vikram Garhwal
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 and updated with overlay nodes. This updated fdt

[XEN][PATCH v11 20/20] tools/xl: Add new xl command overlay for device tree overlay support

2023-08-31 Thread Vikram Garhwal
Signed-off-by: Vikram Garhwal Reviewed-by: Anthony PERARD --- tools/xl/xl.h | 1 + tools/xl/xl_cmdtable.c | 6 + tools/xl/xl_vmcontrol.c | 52 + 3 files changed, 59 insertions(+) diff --git a/tools/xl/xl.h b/tools/xl/xl.h index

[XEN][PATCH v11 06/20] libfdt: Keep fdt functions after init for CONFIG_OVERLAY_DTB.

2023-08-31 Thread Vikram Garhwal
This is done to access fdt library function which are required for adding device tree overlay nodes for dynamic programming of nodes. Signed-off-by: Vikram Garhwal Acked-by: Julien Grall --- xen/common/libfdt/Makefile | 4 1 file changed, 4 insertions(+) diff --git

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

2023-08-31 Thread Vikram Garhwal
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 this series introduces node add/remove feature.

[PATCH v5 4/5] xen/vpci: header: status register handler

2023-08-31 Thread Stewart Hildebrand
Introduce a handler for the PCI status register, with ability to mask the capabilities bit. The status register contains reserved bits, read-only bits, and write-1-to-clear bits, so introduce bitmasks to handle these in vPCI. If a bit in the bitmask is set, then the special meaning applies:

[XEN][PATCH v11 08/20] xen/device-tree: Add dt_find_node_by_path_from() to find nodes in device tree

2023-08-31 Thread Vikram Garhwal
Add dt_find_node_by_path_from() 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 with overlay nodes. This updated fdt is further

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

2023-08-31 Thread Vikram Garhwal
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. 3. Remove the SMMU master. Signed-off-by: Vikram Garhwal --- Changes from v9: Remove

[XEN][PATCH v11 07/20] libfdt: overlay: change overlay_get_target()

2023-08-31 Thread Vikram Garhwal
Rename overlay_get_target() to fdt_overlay_target_offset() and remove static function type. This is done to get the target path for the overlay nodes which is very useful in many cases. For example, Xen hypervisor needs it when applying overlays because Xen needs to do further processing of the

[PATCH v5 3/5] xen/pci: update PCI_STATUS_* constants

2023-08-31 Thread Stewart Hildebrand
Interrupt status introduced in PCI 2.3 Immediate readiness introduced in PCIe 4.0 Signed-off-by: Stewart Hildebrand --- v4->v5: * new patch --- xen/include/xen/pci_regs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/include/xen/pci_regs.h b/xen/include/xen/pci_regs.h index

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

2023-08-31 Thread Vikram Garhwal
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() 7. map_dt_irq_to_domain() Move map_irq_to_domain() prototype

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

2023-08-31 Thread Vikram Garhwal
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. Signed-off-by: Vikram Garhwal Acked-by: Henry Wang Reviewed-by: Michal

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

2023-08-31 Thread Vikram Garhwal
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 Acked-by: Stefano Stabellini --- Changes from v9:

[XEN][PATCH v11 04/20] common/device_tree: Export __unflatten_device_tree()

2023-08-31 Thread Vikram Garhwal
Following changes are done to __unflatten_device_tree(): 1. __unflatten_device_tree() is renamed to unflatten_device_tree(). 2. Remove __init and static function type. The changes are done to make this function useable for dynamic node programming where new device tree overlay nodes are

[XEN][PATCH v11 01/20] common/device_tree: handle memory allocation failure in __unflatten_device_tree()

2023-08-31 Thread Vikram Garhwal
Change __unflatten_device_tree() return type to integer so it can propagate memory allocation failure. Add panic() in dt_unflatten_host_device_tree() for memory allocation failure during boot. Fixes: fb97eb614acf ("xen/arm: Create a hierarchical device tree") Signed-off-by: Vikram Garhwal

[XEN][PATCH v11 00/20] dynamic node programming using overlay dtbo

2023-08-31 Thread Vikram Garhwal
Hi, This patch series is for introducing dynamic programming i.e. add/remove the devices during run time. Using "xl dt_overlay" a device can be added/removed with dtbo. For adding a node using dynamic programming: 1. flatten device tree overlay node will be added to a fdt 2. Updated fdt

[PATCH v5 2/5] x86/msi: rearrange read_pci_mem_bar slightly

2023-08-31 Thread Stewart Hildebrand
Use pdev->sbdf instead of the PCI_SBDF macro in calls to pci_* functions where appropriate. Move NULL check earlier. Suggested-by: Jan Beulich Signed-off-by: Stewart Hildebrand Reviewed-by: Jan Beulich --- v4->v5: * add Jan's R-b v3->v4: * new patch Suggested-by tag added based on

[PATCH v5 1/5] xen/pci: convert pci_find_*cap* to pci_sbdf_t

2023-08-31 Thread Stewart Hildebrand
Convert pci_find_*cap* functions and call sites to pci_sbdf_t, and remove some now unused local variables. Also change to more appropriate types on lines that are already being modified as a result of the pci_sbdf_t conversion. Signed-off-by: Stewart Hildebrand Reviewed-by: Jan Beulich --- I

[PATCH v5 0/5] vPCI capabilities filtering

2023-08-31 Thread Stewart Hildebrand
This small series enables vPCI to filter which PCI capabilities we expose to a domU. This series adds vPCI register handlers within xen/drivers/vpci/header.c:init_bars(), along with some supporting functions. Note there are minor rebase conflicts with the in-progress vPCI series [1]. These

Re: [PATCH v4 6/6] xen/vpci: header: filter PCI capabilities

2023-08-31 Thread Stewart Hildebrand
On 8/31/23 08:11, Jan Beulich wrote: > On 28.08.2023 19:56, Stewart Hildebrand wrote: >> Currently, Xen vPCI only supports virtualizing the MSI and MSI-X >> capabilities. >> Hide all other PCI capabilities (including extended capabilities) from domUs >> for >> now, even though there may be

[xen-unstable test] 182581: regressions - FAIL

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

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

2023-08-31 Thread Vikram Garhwal
On Thu, Aug 31, 2023 at 09:32:48AM +0200, Michal Orzel wrote: > > > On 31/08/2023 09:23, Michal Orzel wrote: > > > > > > On 30/08/2023 19:48, Vikram Garhwal wrote: > >> Hi Michal, > >> On Tue, Aug 29, 2023 at 10:23:30AM +0200, Michal Orzel wrote: > >>> > >>> > >>> On 25/08/2023 10:02, Vikram

[qemu-mainline test] 182584: regressions - FAIL

2023-08-31 Thread osstest service owner
flight 182584 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/182584/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvops 6 kernel-build fail REGR. vs. 182570 Tests which did

Re: [PATCH v2 5/8] xen/ppc: Define minimal stub headers required for full build

2023-08-31 Thread Shawn Anastasio
On 8/30/23 5:49 AM, Jan Beulich wrote: > On 23.08.2023 22:07, Shawn Anastasio wrote: >> --- /dev/null >> +++ b/xen/arch/ppc/include/asm/altp2m.h >> @@ -0,0 +1,25 @@ >> +/* SPDX-License-Identifier: GPL-2.0-only */ >> +#ifndef __ASM_PPC_ALTP2M_H__ >> +#define __ASM_PPC_ALTP2M_H__ >> + >> +#include

[ovmf test] 182586: all pass - PUSHED

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

Re: [PATCH v4 4/6] xen/vpci: header: status register handler

2023-08-31 Thread Stewart Hildebrand
On 8/30/23 10:05, Jan Beulich wrote: > On 28.08.2023 19:56, Stewart Hildebrand wrote: >> --- a/xen/drivers/vpci/header.c >> +++ b/xen/drivers/vpci/header.c >> @@ -413,6 +413,18 @@ static void cf_check cmd_write( >> pci_conf_write16(pdev->sbdf, reg, cmd); >> } >> >> +static uint32_t

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

2023-08-31 Thread Volodymyr Babchuk
Hi Jan, Jan Beulich writes: > On 30.08.2023 01:19, Volodymyr Babchuk wrote: >> 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

RE: [EXT] Re: xen arm64 low power sleep support

2023-08-31 Thread Anthony Chan
On Thu, 30 Aug 2023, Stefano Stabellini wrote: > On Wed, 30 Aug 2023, Anthony Chan wrote: > > On Tue, 29 Aug 2023, Stefano Stabellini wrote: > > > On Tue, 29 Aug 2023, Anthony Chan wrote: > > > > Hi all, > > > > > > > > My name is Tony and I've been researching/developing using Xen > > > > for

Re: [PATCH 2/7] migration: Clean up local variable shadowing

2023-08-31 Thread Peter Xu
On Thu, Aug 31, 2023 at 03:25:41PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-08-31 Thread Peter Xu
On Thu, Aug 31, 2023 at 03:25:40PM +0200, Markus Armbruster wrote: > qemu_rdma_save_page() reports polling error with error_report(), then > succeeds anyway. This is because the variable holding the polling > status *shadows* the variable the function returns. The latter > remains zero. > >

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

2023-08-31 Thread Shawn Anastasio
On 8/29/23 8:59 AM, Jan Beulich wrote: > 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

[libvirt test] 182579: tolerable all pass - PUSHED

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

Xens handling of MCE

2023-08-31 Thread Development
We have been trying to find documentation on how to tell Xen to forward MCE information to the linux kernel in Dom0 in order to let a system administrator be able to get notified when his system has bad memory. However from what I can tell this has not been documented anywhere. If anyone

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

2023-08-31 Thread Shawn Anastasio
On 8/31/23 12:47 PM, Shawn Anastasio wrote: > On 8/29/23 8:43 AM, Jan Beulich wrote: >> On 23.08.2023 22:07, Shawn Anastasio wrote: >>> +#define read_atomic(p) >>> \ >>> +({

Re: [PATCH 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-08-31 Thread Stefan Hajnoczi
On Thu, Aug 31, 2023 at 03:25:43PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH 5/7] block/vdi: Clean up local variable shadowing

2023-08-31 Thread Stefan Hajnoczi
On Thu, Aug 31, 2023 at 03:25:44PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH 6/7] block: Clean up local variable shadowing

2023-08-31 Thread Stefan Hajnoczi
On Thu, Aug 31, 2023 at 03:25:45PM +0200, Markus Armbruster wrote: > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH v1 2/2] xen/arm: Enlarge identity map space to 127TiB

2023-08-31 Thread Alexey Klimov
On Thu, 31 Aug 2023 at 12:01, Leo Yan wrote: > > On some platforms, the memory regions could be: > > (XEN) MODULE[0]: 0807f6df - 0807f6f3e000 Xen > (XEN) MODULE[1]: 0807f8054000 - 0807f8056000 Device Tree > (XEN) MODULE[2]: fa834000 - fc5de1d5 Ramdisk >

[linux-linus test] 182576: regressions - FAIL

2023-08-31 Thread osstest service owner
flight 182576 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/182576/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-vhd 8 xen-boot fail REGR. vs. 182531

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

2023-08-31 Thread Shawn Anastasio
On 8/29/23 8:43 AM, Jan Beulich wrote: > 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

Re: [PATCH v3 2/2] xen: move arm/include/asm/vm_event.h to asm-generic

2023-08-31 Thread Jan Beulich
On 31.08.2023 16:02, Oleksii wrote: > On Thu, 2023-08-31 at 11:46 +0200, Jan Beulich wrote: >> On 30.08.2023 18:57, Oleksii Kurochko wrote: >>> --- >>>  xen/arch/arm/include/asm/vm_event.h    | 66 -- >>> >>>  xen/include/asm-generic/asm/vm_event.h | 55

[ovmf test] 182582: all pass - PUSHED

2023-08-31 Thread osstest service owner
flight 182582 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/182582/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 4c8144dd665619731b6c3c19f4f1ae664b69fa4b baseline version: ovmf

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-08-31 Thread Richard Henderson
On 8/31/23 06:25, Markus Armbruster wrote: +#define PASTE(a, b) a##b We already have glue() in qemu/compiler.h. The rest of it looks quite sensible. r~

Re: [QEMU PATCH v4 12/13] virtio-gpu: Initialize Venus

2023-08-31 Thread Dmitry Osipenko
On 8/31/23 13:40, Antonio Caggiano wrote: > Hi Huang, > > Thank you for pushing this forward! > > On 31/08/2023 11:32, Huang Rui wrote: >> From: Antonio Caggiano >> >> Request Venus when initializing VirGL. >> >> Signed-off-by: Antonio Caggiano >> Signed-off-by: Huang Rui >> --- >> >> v1->v2:

Re: [PATCH 3/7] ui: Clean up local variable shadowing

2023-08-31 Thread Peter Maydell
On Thu, 31 Aug 2023 at 14:25, Markus Armbruster wrote: > > Local variables shadowing other local variables or parameters make the > code needlessly hard to understand. Tracked down with -Wshadow=local. > Clean up: delete inner declarations when they are actually redundant, > else rename

Re: [PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-08-31 Thread Eric Blake
On Thu, Aug 31, 2023 at 03:25:46PM +0200, Markus Armbruster wrote: [This paragraph written last: Bear with my stream of consciousness review below, where I end up duplicating some of the conslusions you reached before the point where I saw where the patch was headed] > Variables declared in

[linux-5.4 test] 182575: regressions - FAIL

2023-08-31 Thread osstest service owner
flight 182575 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/182575/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit1 18 guest-start/debian.repeat fail REGR. vs. 182363

Re: [PATCH v3 2/2] xen: move arm/include/asm/vm_event.h to asm-generic

2023-08-31 Thread Oleksii
On Thu, 2023-08-31 at 11:46 +0200, Jan Beulich wrote: > On 30.08.2023 18:57, Oleksii Kurochko wrote: > > asm/vm_event.h is common for ARM and RISC-V so it will be moved to > > asm-generic dir. > > > > Original asm/vm_event.h from ARM was updated: > >  * use SPDX-License-Identifier. > >  * update

Re: [PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-08-31 Thread Eric Blake
On Thu, Aug 31, 2023 at 03:25:40PM +0200, Markus Armbruster wrote: > qemu_rdma_save_page() reports polling error with error_report(), then > succeeds anyway. This is because the variable holding the polling > status *shadows* the variable the function returns. The latter > remains zero. > >

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

2023-08-31 Thread Simone Ballarin
On 31/08/23 15:05, Jan Beulich wrote: On 31.08.2023 14:54, Simone Ballarin wrote: On 31/08/23 13:10, Jan Beulich wrote: On 31.08.2023 12:08, Simone Ballarin wrote: The danger of multi-inclusion also exists for .c files, why do you want to avoid guards for them? Counter question: Why only

[PATCH 6/7] block: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster --- block.c |

[PATCH 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster ---

[PATCH 5/7] block/vdi: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster --- block/vdi.c | 7 +++

[PATCH 0/7] Steps towards enabling -Wshadow=local

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: PATCH 1. Enabling -Wshadow would prevent bugs like this one. But we'd have to clean up all the offenders first. We got a lot of them. Enabling

[PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-08-31 Thread Markus Armbruster
qemu_rdma_save_page() reports polling error with error_report(), then succeeds anyway. This is because the variable holding the polling status *shadows* the variable the function returns. The latter remains zero. Broken since day one, and duplicated more recently. Fixes: 2da776db4846 (rdma:

[PATCH 3/7] ui: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster --- ui/gtk.c |

[PATCH 2/7] migration: Clean up local variable shadowing

2023-08-31 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster --- migration/block.c | 4

[PATCH 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-08-31 Thread Markus Armbruster
Variables declared in macros can shadow other variables. Much of the time, this is harmless, e.g.: #define _FDT(exp) \ do { \ int ret = (exp);

Re: [PATCH v3 2/2] xen: move arm/include/asm/vm_event.h to asm-generic

2023-08-31 Thread Oleksii
On Thu, 2023-08-31 at 11:46 +0200, Jan Beulich wrote: > On 30.08.2023 18:57, Oleksii Kurochko wrote: > > asm/vm_event.h is common for ARM and RISC-V so it will be moved to > > asm-generic dir. > > > > Original asm/vm_event.h from ARM was updated: > >  * use SPDX-License-Identifier. > >  * update

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

2023-08-31 Thread Jan Beulich
On 31.08.2023 14:54, Simone Ballarin wrote: > On 31/08/23 13:10, Jan Beulich wrote: >> On 31.08.2023 12:08, Simone Ballarin wrote: >>> The danger of multi-inclusion also exists for .c files, why do you want >>> to avoid guards for them? >> >> Counter question: Why only add guards to some of them?

[PULL 31/41] hw/usb: spelling fixes

2023-08-31 Thread Philippe Mathieu-Daudé
From: Michael Tokarev Signed-off-by: Michael Tokarev Message-ID: <20230823065335.1919380-14-...@tls.msk.ru> Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/quirks.h | 2 +- hw/usb/ccid-card-emulated.c | 2 +- hw/usb/hcd-ehci.c | 6 +++--- hw/usb/hcd-ohci.c | 2

[PULL 04/41] bulk: Do not declare function prototypes using 'extern' keyword

2023-08-31 Thread Philippe Mathieu-Daudé
By default, C function prototypes declared in headers are visible, so there is no need to declare them as 'extern' functions. Remove this redundancy in a single bulk commit; do not modify: - meson.build (used to check function availability at runtime) - pc-bios/ - libdecnumber/ - tests/

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

2023-08-31 Thread Simone Ballarin
On 31/08/23 13:10, Jan Beulich wrote: On 31.08.2023 12:08, Simone Ballarin wrote: On 29/08/23 08:50, Jan Beulich wrote: 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

Re: [PATCH v7 9/9] swiotlb: search the software IO TLB only if the device makes use of it

2023-08-31 Thread Christoph Hellwig
On Wed, Aug 09, 2023 at 03:20:43PM -0600, Jonathan Corbet wrote: > > spin_unlock_irqrestore(>dma_io_tlb_lock, flags); > > > > - /* Pairs with smp_rmb() in swiotlb_find_pool(). */ > > - smp_wmb(); > > found: > > + dev->dma_uses_io_tlb = true; > > + /* Pairs with smp_rmb() in

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

2023-08-31 Thread Jan Beulich
On 31.08.2023 14:18, Simone Ballarin wrote: > On 29/08/23 00:51, Stefano Stabellini wrote: >> On Mon, 28 Aug 2023, Simone Ballarin wrote: >>> Move or amended inclusion guards to address violations of >>> MISRA C:2012 Directive 4.10 ("Precautions shall be taken in order >>> to prevent the contents

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

2023-08-31 Thread Simone Ballarin
On 29/08/23 00:51, Stefano Stabellini wrote: On Mon, 28 Aug 2023, Simone Ballarin wrote: Move or amended 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").

Re: [PATCH v4 6/6] xen/vpci: header: filter PCI capabilities

2023-08-31 Thread Jan Beulich
On 28.08.2023 19:56, Stewart Hildebrand wrote: > Currently, Xen vPCI only supports virtualizing the MSI and MSI-X capabilities. > Hide all other PCI capabilities (including extended capabilities) from domUs > for > now, even though there may be certain devices/drivers that depend on being > able

Re: [RFC PATCH v4 5/6] xen/vpci: support ro mask

2023-08-31 Thread Jan Beulich
On 28.08.2023 19:56, Stewart Hildebrand wrote: > Add support for a read-only bit mask for vPCI register handlers. > > Signed-off-by: Stewart Hildebrand > --- > v3->v4: > * new patch > > RFC: It seemed like a low-hanging fruit to add support for ro mask. Let me > know > what you think, and

Re: QEMU features useful for Xen development?

2023-08-31 Thread Peter Maydell
On Thu, 31 Aug 2023 at 11:49, Alex Bennée wrote: > Peter Maydell writes: > > All our MPS2/MPS3 boards are M-profile. That means we have the > > device models for all the interesting devices on the board, but > > it would be simpler to write the an536 board model separately. > > (In particular,

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

2023-08-31 Thread Jan Beulich
On 31.08.2023 12:08, Simone Ballarin wrote: > On 29/08/23 08:50, Jan Beulich wrote: >> 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

[PATCH v1 2/2] xen/arm: Enlarge identity map space to 127TiB

2023-08-31 Thread Leo Yan
On some platforms, the memory regions could be: (XEN) MODULE[0]: 0807f6df - 0807f6f3e000 Xen (XEN) MODULE[1]: 0807f8054000 - 0807f8056000 Device Tree (XEN) MODULE[2]: fa834000 - fc5de1d5 Ramdisk (XEN) MODULE[3]: fc5df000 - ffb3f810

[PATCH v1 0/2] xen/arm: Enlarge identity map space

2023-08-31 Thread Leo Yan
The latest Xen fails to boot on ADLink AVA platform. Alexey Klimov root caused the issue is related with the commit 1c78d76b67 ("xen/arm64: mm: Introduce helpers to prepare/enable/disable"). This is because on ADLink AVA platform, it loads Xen hypervisor to the address above 2TB and hence causes

[PATCH v1 1/2] xen/arm: Add macro XEN_VM_MAPPING

2023-08-31 Thread Leo Yan
Xen maps the virtual memory space starting from L0 slot 4, so it's open coded for macros with the offset '4'. For more readable, add a new macro XEN_VM_MAPPING which defines the start slot for Xen virtual memory mapping, and all virtual memory regions are defined based on it. Signed-off-by: Leo

Re: [Xen-devel] [PATCH] x86/HVM: adjust hvm_interrupt_blocked()

2023-08-31 Thread Roger Pau Monné
On Thu, Aug 31, 2023 at 12:42:58PM +0200, Roger Pau Monné wrote: > On Fri, Oct 12, 2018 at 09:58:46AM -0600, Jan Beulich wrote: > > First of all, hvm_intsrc_mce was not considered here at all, yet nothing > > blocks #MC (other than an already in-progress #MC, but dealing with this > > is not the

Re: QEMU features useful for Xen development?

2023-08-31 Thread Alex Bennée
Peter Maydell writes: > On Thu, 31 Aug 2023 at 10:53, Alex Bennée wrote: >> >> >> Peter Maydell writes: >> >> > On Thu, 31 Aug 2023 at 01:57, Stefano Stabellini >> > wrote: >> >> As Xen is gaining R52 and R82 support, it would be great to be able to >> >> use QEMU for development and

Re: [QEMU PATCH v4 11/13] virtio-gpu: Support Venus capset

2023-08-31 Thread Akihiko Odaki
On 2023/08/31 18:32, Huang Rui wrote: From: Antonio Caggiano Add support for the Venus capset, which enables Vulkan support through the Venus Vulkan driver for virtio-gpu. Signed-off-by: Antonio Caggiano Signed-off-by: Huang Rui --- hw/display/virtio-gpu-virgl.c | 21

Re: [Xen-devel] [PATCH] x86/HVM: adjust hvm_interrupt_blocked()

2023-08-31 Thread Roger Pau Monné
On Fri, Oct 12, 2018 at 09:58:46AM -0600, Jan Beulich wrote: > First of all, hvm_intsrc_mce was not considered here at all, yet nothing > blocks #MC (other than an already in-progress #MC, but dealing with this > is not the purpose of this patch). > > Additionally STI-shadow only blocks maskable

Re: [QEMU PATCH v4 12/13] virtio-gpu: Initialize Venus

2023-08-31 Thread Antonio Caggiano
Hi Huang, Thank you for pushing this forward! On 31/08/2023 11:32, Huang Rui wrote: From: Antonio Caggiano Request Venus when initializing VirGL. Signed-off-by: Antonio Caggiano Signed-off-by: Huang Rui --- v1->v2: - Rebase to latest version hw/display/virtio-gpu-virgl.c | 2 ++

Re: [QEMU PATCH v4 10/13] virtio-gpu: Resource UUID

2023-08-31 Thread Akihiko Odaki
On 2023/08/31 18:32, Huang Rui wrote: From: Antonio Caggiano Enable resource UUID feature and implement command resource assign UUID. This is done by introducing a hash table to map resource IDs to their UUIDs. The hash table does not seem to be stored during migration. Signed-off-by:

Re: QEMU features useful for Xen development?

2023-08-31 Thread Ayan Kumar Halder
Hi Peter/Alex, Appreciate your help. :) On 31/08/2023 11:03, Peter Maydell wrote: CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. On Thu, 31 Aug 2023 at 10:53, Alex

[ANNOUNCE] Call for agenda items for 7 September Community Call @ 1500 UTC

2023-08-31 Thread George Dunlap
Hi all, The proposed agenda is in https://cryptpad.fr/pad/#/2/pad/edit/s6D6t2vTjCkpfRIJXo8IVSWf/ and you can edit to add items. Alternatively, you can reply to this mail directly. Agenda items appreciated a few days before the call: please put your name besides items if you edit the document.

Re: [QEMU PATCH v4 09/13] virtio-gpu: Handle resource blob commands

2023-08-31 Thread Akihiko Odaki
On 2023/08/31 18:32, Huang Rui wrote: From: Antonio Caggiano Support BLOB resources creation, mapping and unmapping by calling the new stable virglrenderer 0.10 interface. Only enabled when available and via the blob config. E.g. -device virtio-vga-gl,blob=true Signed-off-by: Antonio Caggiano

Re: [QEMU PATCH v4 07/13] softmmu/memory: enable automatic deallocation of memory regions

2023-08-31 Thread Akihiko Odaki
On 2023/08/31 18:32, Huang Rui wrote: From: Xenia Ragiadakou When the memory region has a different life-cycle from that of her parent, could be automatically released, once has been unparent and once all of her references have gone away, via the object's free callback. However, currently,

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

2023-08-31 Thread Simone Ballarin
On 29/08/23 08:50, Jan Beulich wrote: 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"). Also C files, if included

Re: QEMU features useful for Xen development?

2023-08-31 Thread Peter Maydell
On Thu, 31 Aug 2023 at 10:53, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Thu, 31 Aug 2023 at 01:57, Stefano Stabellini > > wrote: > >> As Xen is gaining R52 and R82 support, it would be great to be able to > >> use QEMU for development and testing there as well, but I don't think

Re: QEMU features useful for Xen development?

2023-08-31 Thread Alex Bennée
Peter Maydell writes: > On Thu, 31 Aug 2023 at 01:57, Stefano Stabellini > wrote: >> As Xen is gaining R52 and R82 support, it would be great to be able to >> use QEMU for development and testing there as well, but I don't think >> QEMU can emulate EL2 properly for the Cortex-R architecture.

Re: [PATCH v3 2/2] xen: move arm/include/asm/vm_event.h to asm-generic

2023-08-31 Thread Jan Beulich
On 30.08.2023 18:57, Oleksii Kurochko wrote: > asm/vm_event.h is common for ARM and RISC-V so it will be moved to > asm-generic dir. > > Original asm/vm_event.h from ARM was updated: > * use SPDX-License-Identifier. > * update comment messages of stubs. > * update #ifdef. > * change

[QEMU PATCH v4 12/13] virtio-gpu: Initialize Venus

2023-08-31 Thread Huang Rui
From: Antonio Caggiano Request Venus when initializing VirGL. Signed-off-by: Antonio Caggiano Signed-off-by: Huang Rui --- v1->v2: - Rebase to latest version hw/display/virtio-gpu-virgl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/display/virtio-gpu-virgl.c

[QEMU PATCH v4 09/13] virtio-gpu: Handle resource blob commands

2023-08-31 Thread Huang Rui
From: Antonio Caggiano Support BLOB resources creation, mapping and unmapping by calling the new stable virglrenderer 0.10 interface. Only enabled when available and via the blob config. E.g. -device virtio-vga-gl,blob=true Signed-off-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko

[QEMU PATCH v4 10/13] virtio-gpu: Resource UUID

2023-08-31 Thread Huang Rui
From: Antonio Caggiano Enable resource UUID feature and implement command resource assign UUID. This is done by introducing a hash table to map resource IDs to their UUIDs. Signed-off-by: Antonio Caggiano Signed-off-by: Huang Rui --- v1->v2: - Separate declarations from code.

  1   2   >