[PATCH] xen/netback: fix build warning

2022-12-06 Thread Juergen Gross
Commit ad7f402ae4f4 ("xen/netback: Ensure protocol headers don't fall in the non-linear area") introduced a (valid) build warning. Fix it. Fixes: ad7f402ae4f4 ("xen/netback: Ensure protocol headers don't fall in the non-linear area") Signed-off-by: Juergen Gross --- drivers/net/xen-netback/net

Re: [PATCH 2/3] x86/pv-shim: don't even allow enabling GRANT_TABLE

2022-12-06 Thread Jan Beulich
On 06.12.2022 21:26, Andrew Cooper wrote: > On 06/12/2022 14:30, Jan Beulich wrote: >> Grant table code is unused in shim mode, so there's no point in >> building it in the first place for shim-exclusive mode. >> >> Signed-off-by: Jan Beulich > > nack. > > This is bogus, as is every other "depen

[PATCH V7 0/3] toolstack support for generic virtio devices on Arm

2022-12-06 Thread Viresh Kumar
Hello, This patchset adds toolstack support for I2C, GPIO and generic virtio devices. This is inspired from the work done by Oleksandr for the Disk device. This is developed as part of Linaro's Project Stratos, where we are working towards Hypervisor agnostic Rust based backends [1]. This is bas

[PATCH V7 2/3] xl: Add support to parse generic virtio device

2022-12-06 Thread Viresh Kumar
This patch adds basic support for parsing generic Virtio backend. An example of domain configuration for mmio based Virtio I2C device is: virtio = ["type=virtio,device22,transport=mmio"] Signed-off-by: Viresh Kumar --- tools/ocaml/libs/xl/genwrap.py | 1 + tools/ocaml/libs/xl/xenlight_st

[PATCH V7 3/3] docs: Add documentation for generic virtio devices

2022-12-06 Thread Viresh Kumar
This patch updates xl.cfg man page with details of generic Virtio device related information. Signed-off-by: Viresh Kumar --- docs/man/xl.cfg.5.pod.in | 28 1 file changed, 28 insertions(+) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in index ec444

[PATCH V7 1/3] libxl: Add support for generic virtio device

2022-12-06 Thread Viresh Kumar
This patch adds basic support for configuring and assisting generic Virtio backends, which could run in any domain. An example of domain configuration for mmio based Virtio I2C device is: virtio = ["type=virtio,device22,transport=mmio"] To make this work on Arm, allocate Virtio MMIO params (IRQ a

[XEN][RFC PATCH v4 05/16] xen/device-tree: Add _dt_find_node_by_path() to find nodes in device tree

2022-12-06 Thread Vikram Garhwal
Add _dt_find_by_path() to find a matching node with path for a dt_device_node. Signed-off-by: Vikram Garhwal --- xen/common/device_tree.c | 5 +++-- xen/include/xen/device_tree.h | 16 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/xen/common/device_tree.c

[XEN][RFC PATCH v4 13/16] xen/arm: Implement device tree node addition functionalities

2022-12-06 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 is

[XEN][RFC PATCH v4 14/16] tools/libs/ctrl: Implement new xc interfaces for dt overlay

2022-12-06 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 --- tools/include/xenctrl.h | 3 ++ tools/libs/ctrl/Makefile.common | 1 + tools/libs/ctrl/xc_dt_overlay.c | 51 ++

[XEN][RFC PATCH v4 15/16] tools/libs/light: Implement new libxl functions for device tree overlay ops

2022-12-06 Thread Vikram Garhwal
Signed-off-by: Vikram Garhwal Reviewed-by: Luca Fancellu --- tools/include/libxl.h | 8 tools/libs/light/Makefile | 3 ++ tools/libs/light/libxl_dt_overlay.c | 72 + 3 files changed, 83 insertions(+) create mode 100644 tools/libs/light/

[XEN][RFC PATCH v4 16/16] tools/xl: Add new xl command overlay for device tree overlay support

2022-12-06 Thread Vikram Garhwal
Signed-off-by: Vikram Garhwal --- tools/xl/xl.h | 1 + tools/xl/xl_cmdtable.c | 6 ++ tools/xl/xl_vmcontrol.c | 48 + 3 files changed, 55 insertions(+) diff --git a/tools/xl/xl.h b/tools/xl/xl.h index 7c9aff6ad7..6e95dfe6ea 100644 --- a/to

[XEN][RFC PATCH v4 11/16] common/device_tree: Add rwlock for dt_host

2022-12-06 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, adding rwlock for browsing the dt_host. Signed-off-by: Vikram Garhwal --- xen/common/device_tree.c | 27 +++

[XEN][RFC PATCH v4 10/16] asm/smp.h: move cpu related function to asm/cpu.h

2022-12-06 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, adding rwlock for browsing the dt_host. But adding rwlock in device_tree.h causes following circular dependency: device_tree.h->rwlock

[XEN][RFC PATCH v4 12/16] xen/arm: Implement device tree node removal functionalities

2022-12-06 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 en

[XEN][RFC PATCH v4 09/16] xen/iommu: Introduce iommu_remove_dt_device()

2022-12-06 Thread Vikram Garhwal
Remove master device from the IOMMU. Signed-off-by: Vikram Garhwal --- xen/drivers/passthrough/device_tree.c | 38 +++ xen/include/xen/iommu.h | 2 ++ 2 files changed, 40 insertions(+) diff --git a/xen/drivers/passthrough/device_tree.c b/xen/drivers/passt

[XEN][RFC PATCH v4 08/16] xen/iommu: protect iommu_add_dt_device() with dtdevs_lock

2022-12-06 Thread Vikram Garhwal
Protect iommu_add_dt_device() with dtdevs_lock to prevent concurrent access add. Signed-off-by: Vikram Garhwal Reviewed-by: Luca Fancellu --- xen/drivers/passthrough/device_tree.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/device_tree.c

[XEN][RFC PATCH v4 07/16] xen/iommu: Move spin_lock from iommu_dt_device_is_assigned to caller

2022-12-06 Thread Vikram Garhwal
Rename iommu_dt_device_is_assigned() to iommu_dt_device_is_assigned_lock(). Moving spin_lock to caller was done to prevent the concurrent access to iommu_dt_device_is_assigned while doing add/remove/assign/deassign. Signed-off-by: Vikram Garhwal Reviewed-by: Luca Fancellu --- xen/drivers/passt

[XEN][RFC PATCH v4 06/16] xen/smmu: Add remove_device callback for smmu_iommu ops

2022-12-06 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. Remove the SMMU master Signed-off-by: Vikram Garhwal Reviewed-by: Luca Fancellu --- xen/drivers/passthrough/arm/smmu.c | 56

[XEN][RFC PATCH v4 04/16] libfdt: overlay: change overlay_get_target()

2022-12-06 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 ov

[XEN][RFC PATCH v4 03/16] libfdt: Keep fdt functions after init for CONFIG_OVERLAY_DTB.

2022-12-06 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. Acked-by: Julien Grall Signed-off-by: Vikram Garhwal --- xen/common/libfdt/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/xen/common/libfdt/Mak

[XEN][RFC PATCH v4 02/16] xen/arm: Add CONFIG_OVERLAY_DTB

2022-12-06 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. Signed-off-by: Vikram Garhwal --- xen/arch/arm/Kconfig | 5 + 1 file changed, 5 insertions(+) diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index

[XEN][RFC PATCH v4 01/16] xen/arm/device: Remove __init from function type

2022-12-06 Thread Vikram Garhwal
Change function type of following function to access during runtime: 1. map_irq_to_domain() 2. handle_device_interrupt() 3. map_range_to_domain() 4. unflatten_dt_node() 5. unflatten_device_tree() Move map_irq_to_domain(), handle_device_interrupt() and map_range_to_domain() to d

[XEN][RFC PATCH v4 00/16] dynamic node programming using overlay dtbo

2022-12-06 Thread Vikram Garhwal
Hi, This RFC 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 fd

Re: [XEN][RFC PATCH v3 09/14] xen/iommu: Introduce iommu_remove_dt_device()

2022-12-06 Thread Vikram Garhwal
Hi Luca, On 3/14/22 10:50 AM, Luca Fancellu wrote: +int iommu_remove_dt_device(struct dt_device_node *np) +{ +const struct iommu_ops *ops = iommu_get_ops(); +struct device *dev = dt_to_dev(np); +int rc; + +if ( !ops ) +return -EOPNOTSUPP; Here we have that the counterpar

[BUG]SMMU-V3 queue need no-cache memory

2022-12-06 Thread sisyphean
Hi,     I try to run XEN on my ARM board(Sorry, for some commercial reasons, I can't tell you     on which platform I run XEN)  and enable SMMU-V3, but all cmds in cmdq failed when XEN started.     After using the debugger to track debugging, the reason for this problem is that     the queue

Re: [PATCH V6 3/3] docs: Add documentation for generic virtio devices

2022-12-06 Thread Viresh Kumar
On 06-12-22, 17:53, Oleksandr Tyshchenko wrote: > On 05.12.22 11:11, Viresh Kumar wrote: > > Maybe we can add these fields and a config param, once someone wants > > to reuse this stuff for QEMU ? > > > I don't know what to suggest here, sorry. > > On the one hand, it is an extra work for you tr

Re: Virtio-disk updates for latest Xen ?

2022-12-06 Thread Viresh Kumar
On 07-12-22, 05:51, Viresh Kumar wrote: > I am not sure how to get this working, as there is no finalizing event > for the directory. Maybe our design is broken from the start and we > need to do it properly in some recommended way ? For now this is what I have done to make it work: diff --git a/

Re: [PATCH v2] Use EfiACPIReclaimMemory for ESRT

2022-12-06 Thread Demi Marie Obenour
On Wed, Dec 07, 2022 at 02:44:11AM +, Henry Wang wrote: > Hi Demi, > > (+Julien for his info since I am replying below about the 4.17 stuff) > > > -Original Message- > > From: Demi Marie Obenour > > Subject: [PATCH v2] Use EfiACPIReclaimMemory for ESRT > > > > A previous patch tried

RE: [PATCH v2] Use EfiACPIReclaimMemory for ESRT

2022-12-06 Thread Henry Wang
Hi Demi, (+Julien for his info since I am replying below about the 4.17 stuff) > -Original Message- > From: Demi Marie Obenour > Subject: [PATCH v2] Use EfiACPIReclaimMemory for ESRT > > A previous patch tried to get Linux to use the ESRT under Xen if it is > in memory of type EfiRuntim

[PATCH] xsm: misra rule 8.4 fix

2022-12-06 Thread Stefano Stabellini
Fix two MISRA Issues Rule 8.4 ("A compatible declaration shall be visible when an object or function with external linkage is defined") found by cppcheck affecting xen/xsm/flask/ss/services.c. Fix the first issue by making policydb_loaded_version static and the second issue by declaring ss_initial

Re: [PATCH 1/3] xen/arm: Add memory overlap check for bootinfo.reserved_mem

2022-12-06 Thread Stefano Stabellini
On Mon, 5 Dec 2022, Henry Wang wrote: > As we are having more and more types of static region, and all of > these static regions are defined in bootinfo.reserved_mem, it is > necessary to add the overlap check of reserved memory regions in Xen, > because such check will help user to identify the mi

Re: [XEN][RFC PATCH v3 10/14] xen/arm: Implement device tree node removal functionalities

2022-12-06 Thread Vikram Garhwal
Hi Julien & Luca, Sorry for so long delay on the this patch series. I was stuck with internal work and then had to go on a long leave. I prepared v4 and will send it shortly. Addressed all the feedback. I have few comments. Please see them inline below. On 5/18/22 11:31 AM, Julien Grall wro

Re: preparations for 4.16.3

2022-12-06 Thread Stefano Stabellini
Done, and thanks for the ping On Tue, 6 Dec 2022, Julien Grall wrote: > @Stefano, gentle ping. Jan said he wanted to have 4.16 cut before the > holidays. > > On 01/12/2022 15:19, Julien Grall wrote: > > Hi Jan & Stefano, > > > > On 28/11/2022 10:50, Jan Beulich wrote: > > > All, > > > > > > the

Re: Virtio-disk updates for latest Xen ?

2022-12-06 Thread Viresh Kumar
+list On 06-12-22, 13:40, Oleksandr Tyshchenko wrote: > On Tue, Dec 6, 2022 at 1:15 PM Viresh Kumar wrote: > > Hi Oleksandr, > Hello Viresh > > > > I found that my rust counterpart [1] of virtio-disk repository broke > > with this commit: > > > > commit 3a96013a3e17 ("tools/xenstore: reduce numbe

[PATCH] Validate EFI memory descriptors

2022-12-06 Thread Demi Marie Obenour
It turns out that these can be invalid in various ways. Based on code Ard Biesheuvel contributed for Linux. Co-developed-by: Ard Biesheuvel Signed-off-by: Demi Marie Obenour Signed-off-by: Ard Biesheuvel --- xen/common/efi/boot.c| 11 +-- xen/common/efi/efi.h | 14

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

2022-12-06 Thread osstest service owner
flight 175062 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/175062/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 175058 test-amd64-i386-xl-qemuu-win7-amd64

[PATCH v2] Use EfiACPIReclaimMemory for ESRT

2022-12-06 Thread Demi Marie Obenour
A previous patch tried to get Linux to use the ESRT under Xen if it is in memory of type EfiRuntimeServicesData. However, this turns out to be a bad idea. Ard Biesheuvel pointed out that EfiRuntimeServices* memory winds up fragmenting both the EFI page tables and the direct map, and that EfiACPIR

Re: [PATCH v2 6/6] efi: Apply allowlist to EFI configuration tables when running under Xen

2022-12-06 Thread Demi Marie Obenour
On Mon, Oct 03, 2022 at 01:26:25PM +0200, Ard Biesheuvel wrote: > As it turns out, Xen does not guarantee that EFI bootservices data > regions in memory are preserved, which means that EFI configuration > tables pointing into such memory regions may be corrupted before the > dom0 OS has had a chanc

[linux-linus test] 175061: regressions - FAIL

2022-12-06 Thread osstest service owner
flight 175061 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/175061/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-examine 8 reboot fail REGR. vs. 173462 test-arm64-arm64-xl

Re: [PATCH 6/8] x86: Derive XEN_MSR_PAT from its individual entries

2022-12-06 Thread Demi Marie Obenour
On Tue, Dec 06, 2022 at 11:32:16AM +, Andrew Cooper wrote: > On 06/12/2022 04:33, Demi Marie Obenour wrote: > > This avoids it being a magic constant that is difficult for humans to > > decode. Use a _Static_assert to check that the old and new values are > > identical. > > > > Signed-off-by:

[ovmf test] 175064: all pass - PUSHED

2022-12-06 Thread osstest service owner
flight 175064 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/175064/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf ca33daafc630a7952de482813dccd5202f005dbf baseline version: ovmf a639248bd0dd1f1ea0b02

Re: [PATCH 18/19] timers: Don't migrate timers during suspend

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: Migrating timers during suspend causes Dom0 to freeze after resume. This wants a bit more details such as why dom0 will freeze. But looking at upstream, there might be some patches that (e.g. 37f82facd62f "xen/sched: migrate timers to correct cp

Re: [PATCH 19/19] Fix misleading indentation gcc warning

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Oleksandr Andrushchenko percpu.c: In function 'cpu_percpu_callback': percpu.c:61:7: error: this 'if' clause does not guard... [-Werror=misleading-indentation] if ( system_state != SYS_STATE_resume ) ^~ percpu.c:63:9: note: .

Re: [PATCH 16/19] xen/arm: Suspend/resume console on Xen suspend/resume

2022-12-06 Thread Julien Grall
On 06/12/2022 22:12, Julien Grall wrote: Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Mirela Simonovic This is done using generic console_suspend/resume functions that cause uart driver specific suspend/resume handlers to be called for each initialized port (if the port has suspend

Re: [PATCH 16/19] xen/arm: Suspend/resume console on Xen suspend/resume

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Mirela Simonovic This is done using generic console_suspend/resume functions that cause uart driver specific suspend/resume handlers to be called for each initialized port (if the port has suspend/resume driver handlers implemented). Looki

Re: [PATCH 14/19] xen/arm: Save/restore context on suspend/resume

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Mirela Simonovic The context of CPU general purpose and system control registers has to be saved on suspend and restored on resume. This is implemented in hyp_suspend and before the return from hyp_resume function. The hyp_suspend is invoked

Re: [PATCH 13/19] xen/arm: Resume memory management on Xen resume

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Mirela Simonovic The MMU needs to be enabled in the resume flow before the context can be restored (we need to be able to access the context data by virtual address in order to restore it). The configuration of system registers prior to bran

Re: [PATCH 12/19] xen/arm: Implement PSCI SYSTEM_SUSPEND call (physical interface)

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Mirela Simonovic PSCI system suspend function shall be invoked to finalize Xen suspend procedure. Resume entry point, which needs to be passed via 1st argument of PSCI system suspend call to the EL3, is hyp_resume. For now, hyp_resume is jus

Re: [PATCH 11/19] xen/arm: Suspend/resume timer interrupt generation

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Mirela Simonovic Timer interrupts have to be disabled while the system is in suspend. Otherwise, a timer interrupt would fire and wake-up the system. Suspending the timer interrupts consists of disabling physical EL1 and EL2 timers. The resu

Re: [PATCH 00/19] xen/arm64: Suspend to RAM support for Xen

2022-12-06 Thread Julien Grall
On 06/12/2022 20:32, Julien Grall wrote: Hi, On 07/10/2022 14:08, Mykyta Poturai wrote: This is a series from Mirela Simonovic. Ported to 4.16 and with added changes suggested here https://lore.kernel.org/all/CAKPH-NjmaZENb8gT=+fobraycrf01_--6gura2ck9di5wiu...@mail.gmail.com This series con

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

2022-12-06 Thread osstest service owner
flight 175063 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175063/ 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: [PATCH 10/19] xen/arm: Suspend/resume GIC on system suspend/resume

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Mirela Simonovic GIC state is saved on system suspend by calling gic_suspend (this function does not change current state of the GIC but only saves the values of configuration registers). The state of GIC has to be restored by calling gic_re

Re: [PATCH 09/19] xen/arm: Implement GIC suspend/resume functions (gicv2 only)

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Mirela Simonovic System suspend may lead to a state where GIC would be powered down. Therefore, Xen should save/restore the context of GIC on suspend/resume. Note that the context consists of states of registers which are controlled by the h

Re: [PATCH 07/19] xen/arm: Disable/enable non-boot physical CPUs on suspend/resume

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Mirela Simonovic Non-boot CPUs have to be disabled on suspend and enabled on resume (hotplug-based mechanism). Disabling non-boot CPUs will lead to PSCI CPU_OFF to be called by each non-boot CPU. Depending on the underlying platform capabili

Re: [RFC PATCH 8/8] Use Linux's PAT

2022-12-06 Thread Marek Marczykowski-Górecki
On Tue, Dec 06, 2022 at 02:47:42PM -0500, Demi Marie Obenour wrote: > On Tue, Dec 06, 2022 at 07:12:06PM +0100, Marek Marczykowski-Górecki wrote: > > On Tue, Dec 06, 2022 at 01:01:41PM -0500, Demi Marie Obenour wrote: > > > On Tue, Dec 06, 2022 at 11:38:03AM +, Andrew Cooper wrote: > > > > 2) T

Re: [PATCH 06/19] xen/arm: Freeze domains on suspend and thaw them on resume

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Mirela Simonovic Freeze and thaw of domains is reused as implemented for x86. In addition, system_state variable is updated to represent the actual state of the system. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi Your

Re: [PATCH 05/19] xen/x86: Move freeze/thaw_domains into common files

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 11:32, Mykyta Poturai wrote: From: Mirela Simonovic These functions will be reused by suspend/resume support for ARM. Signed-off-by: Mirela Simonovic Signed-off-by: Saeed Nowshadi Your Signed-off-by is missing. --- xen/common/domain.c | 29 +++

Re: [PATCH 00/19] xen/arm64: Suspend to RAM support for Xen

2022-12-06 Thread Julien Grall
Hi, On 07/10/2022 14:08, Mykyta Poturai wrote: This is a series from Mirela Simonovic. Ported to 4.16 and with added changes suggested here https://lore.kernel.org/all/CAKPH-NjmaZENb8gT=+fobraycrf01_--6gura2ck9di5wiu...@mail.gmail.com This series contains support for suspend to RAM (in the foll

Re: [PATCH 2/3] x86/pv-shim: don't even allow enabling GRANT_TABLE

2022-12-06 Thread Andrew Cooper
On 06/12/2022 14:30, Jan Beulich wrote: > Grant table code is unused in shim mode, so there's no point in > building it in the first place for shim-exclusive mode. > > Signed-off-by: Jan Beulich nack. This is bogus, as is every other "depends on !PV_SHIM_EXCLUSIVE". The only reason I haven't re

Re: [RFC PATCH 8/8] Use Linux's PAT

2022-12-06 Thread Demi Marie Obenour
On Tue, Dec 06, 2022 at 07:12:06PM +0100, Marek Marczykowski-Górecki wrote: > On Tue, Dec 06, 2022 at 01:01:41PM -0500, Demi Marie Obenour wrote: > > On Tue, Dec 06, 2022 at 11:38:03AM +, Andrew Cooper wrote: > > > On 06/12/2022 04:33, Demi Marie Obenour wrote: > > > > This is purely for testin

Re: [GIT PULL] xen: branch for v6.1-rc9

2022-12-06 Thread pr-tracker-bot
The pull request you sent on Tue, 6 Dec 2022 16:21:22 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git > for-linus-xsa-6.1-rc9-tag has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/b71101d6ae7b1149123b0479ea21e9ad391fdd49 Thank you! -- Deet-doot-dot

Re: [RFC v2 04/12] xen/arm32: head: Remove restriction where to load Xen

2022-12-06 Thread Julien Grall
Hi Luca, On 25/11/2022 15:50, Luca Fancellu wrote: On 17 Nov 2022, at 20:18, Julien Grall wrote: Hi Luca, On 25/10/2022 12:56, Luca Fancellu wrote: On 22 Oct 2022, at 16:04, Julien Grall wrote: From: Julien Grall At the moment, bootloaders can load Xen anywhere in memory but the regio

Re: [PATCH RFC 07/10] domain: map/unmap GADDR based shared guest areas

2022-12-06 Thread Julien Grall
Hi Jan, On 29/11/2022 14:02, Jan Beulich wrote: On 29.11.2022 09:40, Julien Grall wrote: On 28/11/2022 10:01, Jan Beulich wrote: On 24.11.2022 22:29, Julien Grall wrote: On 19/10/2022 09:43, Jan Beulich wrote: --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -1563,7 +1563,82 @@ int map

Re: [PATCH v5 2/2] xen/arm: vpl011: add ASSERT_UNREACHABLE in vpl011_mmio_read

2022-12-06 Thread Julien Grall
Hi, On 05/12/2022 07:26, Jiamei Xie wrote: In vpl011_mmio_read switch block, all cases should have a return. Add ASSERT_UNREACHABLE to catch case where the return is not added. Signed-off-by: Jiamei Xie Acked-by: Julien Grall Cheers, -- Julien Grall

Re: [PATCH v5 1/2] xen/arm: vpl011: emulate non-SBSA registers as WI/RAZ

2022-12-06 Thread Julien Grall
Hi, On 05/12/2022 12:39, Michal Orzel wrote: On 05/12/2022 08:26, Jiamei Xie wrote: When the guest kernel enables DMA engine with "CONFIG_DMA_ENGINE=y", Linux SBSA PL011 driver will access PL011 DMACR register in some functions. As chapter "B Generic UART" in "ARM Server Base System Architect

Re: preparations for 4.16.3

2022-12-06 Thread Julien Grall
Hi, @Stefano, gentle ping. Jan said he wanted to have 4.16 cut before the holidays. On 01/12/2022 15:19, Julien Grall wrote: Hi Jan & Stefano, On 28/11/2022 10:50, Jan Beulich wrote: All, the release is due in a couple of weeks time; ideally we'd get it out before the year end break. Plea

Re: [RFC PATCH 8/8] Use Linux's PAT

2022-12-06 Thread Marek Marczykowski-Górecki
On Tue, Dec 06, 2022 at 01:01:41PM -0500, Demi Marie Obenour wrote: > On Tue, Dec 06, 2022 at 11:38:03AM +, Andrew Cooper wrote: > > On 06/12/2022 04:33, Demi Marie Obenour wrote: > > > This is purely for testing, to see if it works around a bug in i915. It > > > is not intended to be merged.

Re: [RFC PATCH 8/8] Use Linux's PAT

2022-12-06 Thread Demi Marie Obenour
On Tue, Dec 06, 2022 at 11:38:03AM +, Andrew Cooper wrote: > On 06/12/2022 04:33, Demi Marie Obenour wrote: > > This is purely for testing, to see if it works around a bug in i915. It > > is not intended to be merged. > > > > NOT-signed-off-by: DO NOT MERGE > > Following up on Marek's report

Re: [PATCH v2] ioreq_broadcast(): accept partial broadcast success

2022-12-06 Thread Paul Durrant
On 06/12/2022 17:52, Per Bilse wrote: Avoid incorrectly triggering an error when a broadcast buffered ioreq is not handled by all registered clients, as long as the failure is strictly because the client doesn't handle buffered ioreqs. Signed-off-by: Per Bilse --- v2: Complete rethink with bett

Re: [PATCH 7/8] x86/mm: make code robust to future PAT changes

2022-12-06 Thread Demi Marie Obenour
On Tue, Dec 06, 2022 at 12:06:24PM +, Andrew Cooper wrote: > On 06/12/2022 04:33, Demi Marie Obenour wrote: > > It may be desirable to change Xen's PAT for various reasons. This > > requires changes to several _PAGE_* macros as well. Add static > > assertions to check that XEN_MSR_PAT is cons

[PATCH v2] ioreq_broadcast(): accept partial broadcast success

2022-12-06 Thread Per Bilse
Avoid incorrectly triggering an error when a broadcast buffered ioreq is not handled by all registered clients, as long as the failure is strictly because the client doesn't handle buffered ioreqs. Signed-off-by: Per Bilse --- v2: Complete rethink with better information. A lot of simplicity was

Re: [PATCH 6/8] x86: Derive XEN_MSR_PAT from its individual entries

2022-12-06 Thread Demi Marie Obenour
On Tue, Dec 06, 2022 at 11:32:16AM +, Andrew Cooper wrote: > On 06/12/2022 04:33, Demi Marie Obenour wrote: > > This avoids it being a magic constant that is difficult for humans to > > decode. Use a _Static_assert to check that the old and new values are > > identical. > > > > Signed-off-by:

Re: [PATCH 4/8] efi: Avoid hard-coding the various PAT constants

2022-12-06 Thread Demi Marie Obenour
On Tue, Dec 06, 2022 at 11:17:20AM +, Andrew Cooper wrote: > On 06/12/2022 04:33, Demi Marie Obenour wrote: > > This makes the code much easier to understand, and avoids problems if > > Xen's PAT ever changes in the future. > > > > Signed-off-by: Demi Marie Obenour > > --- > > xen/common/efi/

Re: [PATCH v2 2/5] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-06 Thread Stefano Stabellini
On Tue, 6 Dec 2022, Luca Fancellu wrote: > > On 6 Dec 2022, at 17:06, Stefano Stabellini wrote: > > On Tue, 6 Dec 2022, Luca Fancellu wrote: > >> Hi Stefano, > > +++ b/docs/misra/false-positive-cppcheck.json > @@ -0,0 +1,12 @@ > +{ > +"version": "1.0", > +"co

Re: [PATCH v2 2/5] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-06 Thread Luca Fancellu
> On 6 Dec 2022, at 17:06, Stefano Stabellini wrote: > > On Tue, 6 Dec 2022, Luca Fancellu wrote: >> Hi Stefano, +++ b/docs/misra/false-positive-cppcheck.json @@ -0,0 +1,12 @@ +{ +"version": "1.0", +"content": [ +{ +"id": "SAF

Re: [PATCH v2 2/5] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-06 Thread Stefano Stabellini
On Tue, 6 Dec 2022, Luca Fancellu wrote: > Hi Stefano, > >> > >> +++ b/docs/misra/false-positive-cppcheck.json > >> @@ -0,0 +1,12 @@ > >> +{ > >> +"version": "1.0", > >> +"content": [ > >> +{ > >> +"id": "SAF-0-false-positive-cppcheck", > >> +"violation-id":

Re: [PATCH v2] xen: Remove trigraphs from comments

2022-12-06 Thread Stefano Stabellini
On Tue, 6 Dec 2022, Michal Orzel wrote: > MISRA C rule 4.2 states that trigraphs (sequences of two question marks > followed by a specified third character [=/'()!<>-]) should not be used. > This applies to both code and comments. Thankfully, we do not use them > in the code, but still there are so

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

2022-12-06 Thread osstest service owner
flight 175060 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175060/ 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: [PATCH V6 1/3] libxl: Add support for generic virtio device

2022-12-06 Thread Oleksandr Tyshchenko
On 05.12.22 13:29, Viresh Kumar wrote: Hello Viresh On 05-12-22, 11:45, Viresh Kumar wrote: +rc = libxl__backendpath_parse_domid(gc, be_path, &virtio->backend_domid); +if (rc) goto out; + +rc = libxl__parse_backend_path(gc, be_path, &dev); +if (rc) goto out; The same quest

[xen-unstable test] 175058: tolerable FAIL

2022-12-06 Thread osstest service owner
flight 175058 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/175058/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 175055 test-armhf-armhf-libvirt 16 save

Re: [PATCH V6 3/3] docs: Add documentation for generic virtio devices

2022-12-06 Thread Oleksandr Tyshchenko
On 05.12.22 11:11, Viresh Kumar wrote: Hello Viresh On 04-12-22, 20:52, Oleksandr Tyshchenko wrote: So as I understand current series adds support for two virtio devices (i2c/gpio) that require specific device-tree sub node with specific compatible in it [1]. Those backends are standalone

[GIT PULL] xen: branch for v6.1-rc9

2022-12-06 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-xsa-6.1-rc9-tag xen: 2 0-day security fixes for xen-netback driver It contains 2 zero.day fixes for the xen-netback driver (XSA-423 and XSA-424). Thanks. Juergen drivers/net/xen-

Xen Security Advisory 423 v1 (CVE-2022-3643) - Guests can trigger NIC interface reset/abort/crash via netback

2022-12-06 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2022-3643 / XSA-423 Guests can trigger NIC interface reset/abort/crash via netback ISSUE DESCRIPTION = It is possible for a guest to trigger a NIC interface reset/abort/crash in a Linux bas

Xen Security Advisory 424 v1 (CVE-2022-42328,CVE-2022-42329) - Guests can trigger deadlock in Linux netback driver

2022-12-06 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2022-42328,CVE-2022-42329 / XSA-424 Guests can trigger deadlock in Linux netback driver ISSUE DESCRIPTION = The patch for XSA-392 introduced another issue which might result in a deadlock wh

[linux-linus test] 175057: regressions - trouble: broken/fail/pass

2022-12-06 Thread osstest service owner
flight 175057 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/175057/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-raw broken test-armhf-armhf-libvirt-raw 5 host-insta

[PATCH v2] xen: Remove trigraphs from comments

2022-12-06 Thread Michal Orzel
MISRA C rule 4.2 states that trigraphs (sequences of two question marks followed by a specified third character [=/'()!<>-]) should not be used. This applies to both code and comments. Thankfully, we do not use them in the code, but still there are some comments where they are accidentally used. Fi

Re: [PATCH 0/6] Make remove() of any bus based driver void returned

2022-12-06 Thread Dawei Li
On Mon, Dec 05, 2022 at 05:00:52PM +0100, Greg KH wrote: > On Mon, Dec 05, 2022 at 11:36:38PM +0800, Dawei Li wrote: > > For bus-based driver, device removal is implemented as: > > device_remove() => bus->remove() => driver->remove() > > > > Driver core needs no feedback from bus driver about the

[PATCH 3/3] x86/pv-shim: suppress core-parking logic

2022-12-06 Thread Jan Beulich
This is all dead code in shim-exclusive mode, so there's no point in building it. Signed-off-by: Jan Beulich --- Contextually depends on "core-parking: fix build with gcc12 and NR_CPUS=1" --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -10,7 +10,7 @@ config X86 select ALTERNATIV

[PATCH 2/3] x86/pv-shim: don't even allow enabling GRANT_TABLE

2022-12-06 Thread Jan Beulich
Grant table code is unused in shim mode, so there's no point in building it in the first place for shim-exclusive mode. Signed-off-by: Jan Beulich --- a/xen/arch/x86/configs/pvshim_defconfig +++ b/xen/arch/x86/configs/pvshim_defconfig @@ -9,7 +9,6 @@ CONFIG_EXPERT=y # Disable features not used

[PATCH 1/3] common: reduce PV shim footprint

2022-12-06 Thread Jan Beulich
Having CONFIG_PV_SHIM conditionals in common code isn't really nice. Utilize that we're no longer invoking hypercall handlers via indirect calls through a table of function vectors. With the use of direct calls from the macros defined by hypercall-defs.h, we can simply define overriding macros for

Re: [PATCH V6 2/3] xl: Add support to parse generic virtio device

2022-12-06 Thread Oleksandr Tyshchenko
On 05.12.22 08:20, Viresh Kumar wrote: Hello Viresh On 02-12-22, 19:16, Oleksandr Tyshchenko wrote: Interesting, I see you allow user to configure virtio-mmio params (irq and base), as far as I remember for virtio-disk these are internal only (allocated by tools/libs/light/libxl_arm.c). I

[PATCH 0/3] x86/pv-shim: configuring / building re-arrangements

2022-12-06 Thread Jan Beulich
The first patch, while being the main piece here, and while fixing a bug kind of as a side effect, is partly RFC; see there. The other two changes are really minor adjustments for aspects noticed while putting together the main change. 1: common: reduce PV shim footprint 2: don't even allow enabli

Re: [PATCH 1/6] hyperv: Make remove callback of hyperv driver void returned

2022-12-06 Thread Dawei Li
On Tue, Dec 06, 2022 at 11:37:26AM +, Wei Liu wrote: > On Mon, Dec 05, 2022 at 11:36:39PM +0800, Dawei Li wrote: > > Since commit fc7a6209d571 ("bus: Make remove callback return > > void") forces bus_type::remove be void-returned, it doesn't > > make much sense for any bus based driver implemen

Re: [PATCH v2] x86/HVM: drop stale check from hvm_load_cpu_msrs()

2022-12-06 Thread Andrew Cooper
On 06/12/2022 13:00, Jan Beulich wrote: > Up until f61685a66903 ("x86: remove defunct init/load/save_msr() > hvm_funcs") the check of the _rsvd field served as an error check for > the earlier hvm_funcs.save_msr() invocation. With that invocation gone > the check makes no sense anymore: It is effec

Re: [PATCH 2/5] x86/mm: rename PGC_page_table to PGC_shadowed_pt

2022-12-06 Thread Andrew Cooper
On 06/12/2022 13:53, Jan Beulich wrote: > The original name didn't express the purpose of the flag: It is being > set once a page table page obtains a shadow, and it is removed when the > last shadow of a page was destroyed. > > In set_tlbflush_timestamp() also remove the 2nd half of the condition

Re: [PATCH] xen: Remove trigraphs from comments

2022-12-06 Thread Jan Beulich
On 06.12.2022 15:05, Michal Orzel wrote: > On 06/12/2022 14:46, Jan Beulich wrote: >> On 06.12.2022 14:05, Michal Orzel wrote: >>> Also there is no functional change being made by this patch so it is ok >>> to change Xen and not Linux in this case (which has quite a lot of >>> trigraphs all over t

Re: [PATCH V6 1/3] libxl: Add support for generic virtio device

2022-12-06 Thread Oleksandr Tyshchenko
On 05.12.22 08:15, Viresh Kumar wrote: Hi Oleksandr, Hello Viresh On 02-12-22, 16:52, Oleksandr Tyshchenko wrote: This patch adds basic support for configuring and assisting generic Virtio backend which could run in any domain. An example of domain configuration for mmio based Virtio I

Re: [PATCH] xen: Remove trigraphs from comments

2022-12-06 Thread Michal Orzel
On 06/12/2022 14:46, Jan Beulich wrote: > > > On 06.12.2022 14:05, Michal Orzel wrote: >> On 06/12/2022 13:42, Jan Beulich wrote: >>> On 06.12.2022 11:59, Michal Orzel wrote: --- a/xen/include/xen/pci_regs.h +++ b/xen/include/xen/pci_regs.h @@ -246,13 +246,13 @@ #define P

Re: [PATCH 1/5] x86/tboot: drop failed attempt to hash shadow page tables

2022-12-06 Thread Jan Beulich
On 06.12.2022 14:53, Jan Beulich wrote: > While plausible to do what was intended based on the name of the flag > (PGC_page_table), that name was misleading and is going to be changed. > It marks page tables pages _having_ a shadow, not shadows of page table > pages. The attempt also didn't cover t

[PATCH 5/5] x86/tboot: actually wipe contexts

2022-12-06 Thread Jan Beulich
Especially with our use of __builtin_memset() to implement memset() the compiler is free to eliminate instances when it can prove that the affected object is dead. Introduce a small helper function accompanying the memset() with a construct forcing the compiler to retain the clearing of (stack) mem

  1   2   >