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

2023-05-02 Thread osstest service owner
flight 180507 qemu-mainline real [real] flight 180512 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/180507/ http://logs.test-lab.xenproject.org/osstest/logs/180512/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: [PATCH v4 07/13] tools/xenstore: use accounting data array for per-domain values

2023-05-02 Thread Juergen Gross
On 02.05.23 21:09, Julien Grall wrote: Hi Juergen, On 05/04/2023 08:03, Juergen Gross wrote: diff --git a/tools/xenstore/xenstored_domain.h b/tools/xenstore/xenstored_domain.h index 5cfd730cf6..0d61bf4344 100644 --- a/tools/xenstore/xenstored_domain.h +++ b/tools/xenstore/xenstored_domain.h

Re: [PATCH v4 05/13] tools/xenstore: use accounting buffering for node accounting

2023-05-02 Thread Juergen Gross
On 02.05.23 20:55, Julien Grall wrote: Hi Juergen, On 05/04/2023 08:03, Juergen Gross wrote: Add the node accounting to the accounting information buffering in order to avoid having to undo it in case of failure. Signed-off-by: Juergen Gross ---   tools/xenstore/xenstored_core.c   | 21

RE: [PATCH v6 00/16] x86/mtrr: fix handling with PAT but without MTRR

2023-05-02 Thread Michael Kelley (LINUX)
From: Juergen Gross Sent: Tuesday, May 2, 2023 5:09 AM > > This series tries to fix the rather special case of PAT being available > without having MTRRs (either due to CONFIG_MTRR being not set, or > because the feature has been disabled e.g. by a hypervisor). > > The main use cases are Xen PV

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

2023-05-02 Thread osstest service owner
flight 180506 xen-unstable real [real] flight 180510 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/180506/ http://logs.test-lab.xenproject.org/osstest/logs/180510/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: [RFC PATCH] xen/arm: arm32: Enable smpboot on Arm32 based systems

2023-05-02 Thread Stefano Stabellini
On Tue, 2 May 2023, Ayan Kumar Halder wrote: > On some of the Arm32 based systems (eg Cortex-R52), smpboot is supported. > In these systems PSCI may not always be supported. In case of Cortex-R52, > there > is no EL3 or secure mode. Thus, PSCI is not supported as it requires EL3. > > Thus, we

[XEN][PATCH v6 17/19] tools/libs/ctrl: Implement new xc interfaces for dt overlay

2023-05-02 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 | 5 tools/libs/ctrl/Makefile.common | 1 + tools/libs/ctrl/xc_dt_overlay.c | 48

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

2023-05-02 Thread Vikram Garhwal
Signed-off-by: Vikram Garhwal --- 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 72538d6a81..a923daccd3 100644 ---

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

2023-05-02 Thread Vikram Garhwal
Signed-off-by: Vikram Garhwal --- 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 tools/libs/light/libxl_dt_overlay.c diff

[XEN][PATCH v6 15/19] xen/arm: Implement device tree node removal functionalities

2023-05-02 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 v6 10/19] xen/iommu: protect iommu_add_dt_device() with dtdevs_lock

2023-05-02 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 Reviewed-by: Michal Orzel --- xen/drivers/passthrough/device_tree.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

[XEN][PATCH v6 16/19] xen/arm: Implement device tree node addition functionalities

2023-05-02 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 v6 13/19] asm/smp.h: Fix circular dependency for device_tree.h and rwlock.h

2023-05-02 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:

[XEN][PATCH v6 11/19] xen/iommu: Introduce iommu_remove_dt_device()

2023-05-02 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 Reviewed-by: Michal Orzel --- xen/drivers/passthrough/device_tree.c | 41 +++ xen/include/xen/iommu.h

[XEN][PATCH v6 14/19] common/device_tree: Add rwlock for dt_host

2023-05-02 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 during runtime. Signed-off-by: Vikram Garhwal --- xen/common/device_tree.c | 4

[XEN][PATCH v6 12/19] xen/smmu: Add remove_device callback for smmu_iommu ops

2023-05-02 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 Reviewed-by: Luca Fancellu Reviewed-by: Michal

[XEN][PATCH v6 07/19] libfdt: overlay: change overlay_get_target()

2023-05-02 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

[XEN][PATCH v6 08/19] xen/device-tree: Add device_tree_find_node_by_path() to find nodes in device tree

2023-05-02 Thread Vikram Garhwal
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 with overlay nodes. This updated fdt is further

[XEN][PATCH v6 09/19] xen/iommu: Move spin_lock from iommu_dt_device_is_assigned to caller

2023-05-02 Thread Vikram Garhwal
Rename iommu_dt_device_is_assigned() to iommu_dt_device_is_assigned_locked(). Remove static type so this can also be used by SMMU drivers to check if the device is being used before removing. Moving spin_lock to caller was done to prevent the concurrent access to iommu_dt_device_is_assigned while

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

2023-05-02 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 v6 04/19] common/device_tree.c: unflatten_device_tree() propagate errors

2023-05-02 Thread Vikram Garhwal
This will be useful in dynamic node programming when new dt nodes are unflatten during runtime. Invalid device tree node related errors should be propagated back to the caller. Signed-off-by: Vikram Garhwal --- xen/common/device_tree.c | 15 +-- 1 file changed, 13 insertions(+), 2

[XEN][PATCH v6 03/19] common/device_tree: change __unflatten_device_tree() type

2023-05-02 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. Signed-off-by: Vikram Garhwal --- xen/common/device_tree.c | 9 - xen/include/xen/device_tree.h | 5 +

[XEN][PATCH v6 05/19] xen/arm: Add CONFIG_OVERLAY_DTB

2023-05-02 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 --- SUPPORT.md | 6 ++ xen/arch/arm/Kconfig | 5 + 2 files changed, 11 insertions(+) diff --git a/SUPPORT.md

[XEN][PATCH v6 02/19] common/device_tree: handle memory allocation failure in __unflatten_device_tree()

2023-05-02 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. Signed-off-by: Vikram Garhwal --- xen/common/device_tree.c | 13 ++--- 1 file changed, 10

[XEN][PATCH v6 01/19] xen/arm/device: Remove __init from function type

2023-05-02 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() Move map_irq_to_domain() prototype from domain_build.h to setup.h. To avoid breaking the build, following changes

[XEN][PATCH v6 00/19] dynamic node programming using overlay dtbo

2023-05-02 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

Re: [PATCH v3 2/2] acpi: Add TPM2 interface definition.

2023-05-02 Thread Jennifer Herbert
On 02/05/2023 14:41, Jan Beulich wrote: On 25.04.2023 19:47, Jennifer Herbert wrote: --- a/tools/libacpi/acpi2_0.h +++ b/tools/libacpi/acpi2_0.h @@ -121,6 +121,36 @@ struct acpi_20_tcpa { }; #define ACPI_2_0_TCPA_LAML_SIZE (64*1024) +/* + * TPM2 + */ Nit: While I'm willing to accept

Re: [PATCH v3 1/2] acpi: Make TPM version configurable.

2023-05-02 Thread Jennifer Herbert
On 02/05/2023 12:54, Jan Beulich wrote: On 25.04.2023 19:47, Jennifer Herbert wrote: This patch makes the TPM version, for which the ACPI libary probes, configurable. If acpi_config.tpm_verison is set to 1, it indicates that 1.2 (TCPA) should be probed. I have also added to hvmloader an

[PATCH v1] tools: drop bogus and obsolete ptyfuncs.m4

2023-05-02 Thread Olaf Hering
According to openpty(3) it is required to include to get the prototypes for openpty() and login_tty(). But this is not what the function AX_CHECK_PTYFUNCS actually does. It makes no attempt to include the required header. The two source files which call openpty() and login_tty() already contain

Re: [PATCH v2] ns16550: enable memory decoding on MMIO-based PCI console card

2023-05-02 Thread Marek Marczykowski-Górecki
On Tue, May 02, 2023 at 12:53:15PM +0200, Jan Beulich wrote: > On 25.04.2023 16:39, Marek Marczykowski-Górecki wrote: > > pci_serial_early_init() enables PCI_COMMAND_IO for IO-based UART > > devices, add setting PCI_COMMAND_MEMORY for MMIO-based UART devices too. > > This sentence is odd, as by

[ovmf test] 180508: all pass - PUSHED

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

[PATCH v1] automation: provide example for downloading an existing container

2023-05-02 Thread Olaf Hering
Signed-off-by: Olaf Hering --- automation/build/README.md | 6 ++ 1 file changed, 6 insertions(+) diff --git a/automation/build/README.md b/automation/build/README.md index 2d07cafe0e..8ad89a259a 100644 --- a/automation/build/README.md +++ b/automation/build/README.md @@ -12,6 +12,12 @@ can

Re: [PATCH v4 10/20] block: drain from main loop thread in bdrv_co_yield_to_drain()

2023-05-02 Thread Stefan Hajnoczi
On Tue, May 02, 2023 at 06:21:20PM +0200, Kevin Wolf wrote: > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > > For simplicity, always run BlockDevOps .drained_begin/end/poll() > > callbacks in the main loop thread. This makes it easier to implement the > > callbacks and avoids extra

Re: [PATCH v4 07/20] block/export: stop using is_external in vhost-user-blk server

2023-05-02 Thread Stefan Hajnoczi
On Tue, May 02, 2023 at 06:04:24PM +0200, Kevin Wolf wrote: > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > > vhost-user activity must be suspended during bdrv_drained_begin/end(). > > This prevents new requests from interfering with whatever is happening > > in the drained section. >

[PATCH v1] automation: remove python2 from opensuse images

2023-05-02 Thread Olaf Hering
The upcoming Leap 15.5 will come without a binary named 'python'. Prepare the suse images for that change. Starting with Xen 4.14 python3 can be used for build. Signed-off-by: Olaf Hering --- automation/build/suse/opensuse-leap.dockerfile | 2 --

Re: [PATCH v4 04/20] virtio-scsi: stop using aio_disable_external() during unplug

2023-05-02 Thread Stefan Hajnoczi
On Tue, May 02, 2023 at 03:19:52PM +0200, Kevin Wolf wrote: > Am 01.05.2023 um 17:09 hat Stefan Hajnoczi geschrieben: > > On Fri, Apr 28, 2023 at 04:22:55PM +0200, Kevin Wolf wrote: > > > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > > > > This patch is part of an effort to remove the

Re: [PATCH v6 10/12] xen/tools: add sve parameter in XL configuration

2023-05-02 Thread Luca Fancellu
Hi Anthony, Thank you for your review. > On 2 May 2023, at 18:06, Anthony PERARD wrote: > > On Mon, Apr 24, 2023 at 07:02:46AM +0100, Luca Fancellu wrote: >> diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c >> index ddc7b2a15975..1e69dac2c4fa 100644 >> ---

Re: [PATCH v4 06/20] block/export: wait for vhost-user-blk requests when draining

2023-05-02 Thread Stefan Hajnoczi
On Tue, May 02, 2023 at 05:42:51PM +0200, Kevin Wolf wrote: > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > > Each vhost-user-blk request runs in a coroutine. When the BlockBackend > > enters a drained section we need to enter a quiescent state. Currently > > any in-flight requests

Re: [PATCH v4 10/13] tools/xenstore: switch transaction accounting to generic accounting

2023-05-02 Thread Julien Grall
Hi, On 05/04/2023 08:03, Juergen Gross wrote: As transaction accounting is active for unprivileged domains only, it can easily be added to the generic per-domain accounting. Signed-off-by: Juergen Gross --- tools/xenstore/xenstored_core.c| 3 +-- tools/xenstore/xenstored_core.h

Re: [PATCH v4 07/13] tools/xenstore: use accounting data array for per-domain values

2023-05-02 Thread Julien Grall
Hi Juergen, On 05/04/2023 08:03, Juergen Gross wrote: diff --git a/tools/xenstore/xenstored_domain.h b/tools/xenstore/xenstored_domain.h index 5cfd730cf6..0d61bf4344 100644 --- a/tools/xenstore/xenstored_domain.h +++ b/tools/xenstore/xenstored_domain.h @@ -28,7 +28,10 @@ enum accitem {

Re: [PATCH v4 06/13] tools/xenstore: add current connection to domain_memory_add() parameters

2023-05-02 Thread Julien Grall
Hi Juergen, On 05/04/2023 08:03, Juergen Gross wrote: In order to enable switching memory accounting to the generic array based accounting, add the current connection to the parameters of domain_memory_add(). This requires to add the connection to some other functions, too. Signed-off-by:

Re: [PATCH v4 03/20] virtio-scsi: avoid race between unplug and transport event

2023-05-02 Thread Stefan Hajnoczi
On Tue, May 02, 2023 at 05:19:46PM +0200, Kevin Wolf wrote: > Am 25.04.2023 um 19:26 hat Stefan Hajnoczi geschrieben: > > Only report a transport reset event to the guest after the SCSIDevice > > has been unrealized by qdev_simple_device_unplug_cb(). > > > > qdev_simple_device_unplug_cb() sets

Re: [PATCH v4 05/13] tools/xenstore: use accounting buffering for node accounting

2023-05-02 Thread Julien Grall
Hi Juergen, On 05/04/2023 08:03, Juergen Gross wrote: Add the node accounting to the accounting information buffering in order to avoid having to undo it in case of failure. Signed-off-by: Juergen Gross --- tools/xenstore/xenstored_core.c | 21 ++---

[linux-linus test] 180504: regressions - FAIL

2023-05-02 Thread osstest service owner
flight 180504 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/180504/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit1 8 xen-boot fail REGR. vs. 180278 Tests which are

Re: [PULL 05/27] hw/xen: Watches on XenStore transactions

2023-05-02 Thread Peter Maydell
On Tue, 7 Mar 2023 at 18:27, David Woodhouse wrote: > > From: David Woodhouse > > Firing watches on the nodes that still exist is relatively easy; just > walk the tree and look at the nodes with refcount of one. > > Firing watches on *deleted* nodes is more fun. We add 'modified_in_tx' > and

Re: [PATCH v6 10/12] xen/tools: add sve parameter in XL configuration

2023-05-02 Thread Anthony PERARD
On Mon, Apr 24, 2023 at 07:02:46AM +0100, Luca Fancellu wrote: > diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c > index ddc7b2a15975..1e69dac2c4fa 100644 > --- a/tools/libs/light/libxl_arm.c > +++ b/tools/libs/light/libxl_arm.c > @@ -211,6 +213,12 @@ int

Re: [PATCH] xen/blkfront: Only check REQ_FUA for writes

2023-05-02 Thread Ross Lagerwall
> From: Roger Pau Monne > Sent: Tuesday, May 2, 2023 4:57 PM > To: Ross Lagerwall > Cc: xen-devel@lists.xenproject.org ; > jgr...@suse.com ; sstabell...@kernel.org > ; oleksandr_tyshche...@epam.com > ; ax...@kernel.dk > Subject: Re: [PATCH] xen/blkfront: Only check REQ_FUA for writes >   >

Re: [PATCH v4 10/20] block: drain from main loop thread in bdrv_co_yield_to_drain()

2023-05-02 Thread Kevin Wolf
Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > For simplicity, always run BlockDevOps .drained_begin/end/poll() > callbacks in the main loop thread. This makes it easier to implement the > callbacks and avoids extra locks. > > Move the function pointer declarations from the I/O Code

Re: [PATCH v6 09/12] tools: add physinfo arch_capabilities handling for Arm

2023-05-02 Thread Anthony PERARD
On Mon, Apr 24, 2023 at 07:02:45AM +0100, Luca Fancellu wrote: > diff --git a/tools/include/xen-tools/arm-arch-capabilities.h > b/tools/include/xen-tools/arm-arch-capabilities.h > new file mode 100644 > index ..ac44c8b14344 > --- /dev/null > +++

Re: [PATCH v4 07/20] block/export: stop using is_external in vhost-user-blk server

2023-05-02 Thread Kevin Wolf
Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > vhost-user activity must be suspended during bdrv_drained_begin/end(). > This prevents new requests from interfering with whatever is happening > in the drained section. > > Previously this was done using aio_set_fd_handler()'s is_external

Re: [PATCH] xen/blkfront: Only check REQ_FUA for writes

2023-05-02 Thread Roger Pau Monné
On Wed, Apr 26, 2023 at 05:40:05PM +0100, Ross Lagerwall wrote: > The existing code silently converts read operations with the > REQ_FUA bit set into write-barrier operations. This results in data > loss as the backend scribbles zeroes over the data instead of returning > it. > > While the

Re: [PATCH v4 06/20] block/export: wait for vhost-user-blk requests when draining

2023-05-02 Thread Kevin Wolf
Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > Each vhost-user-blk request runs in a coroutine. When the BlockBackend > enters a drained section we need to enter a quiescent state. Currently > any in-flight requests race with bdrv_drained_begin() because it is > unaware of

Re: [PATCH v4 03/20] virtio-scsi: avoid race between unplug and transport event

2023-05-02 Thread Kevin Wolf
Am 25.04.2023 um 19:26 hat Stefan Hajnoczi geschrieben: > Only report a transport reset event to the guest after the SCSIDevice > has been unrealized by qdev_simple_device_unplug_cb(). > > qdev_simple_device_unplug_cb() sets the SCSIDevice's qdev.realized field > to false so that

Re: HAS_CC_CET_IBT misdetected

2023-05-02 Thread Olaf Hering
Tue, 2 May 2023 14:41:25 +0100 Andrew Cooper : > Does this improve things for you? ./checker: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by ./checker) make[2]: *** [Makefile:24: check-headers] Error 1 I think as soon as tools/ or stubdom/ is built, more issues like that will

Re: [PATCH v3 2/4] tools/xendevicemodel: Introduce ..._get_ioreq_server_info_ext

2023-05-02 Thread Anthony PERARD
On Thu, Apr 06, 2023 at 08:05:04AM +0200, Juergen Gross wrote: > On 06.04.23 05:57, Marek Marczykowski-Górecki wrote: > > Add xendevicemodel_get_ioreq_server_info_ext() which additionally > > returns output flags that XEN_DMOP_get_ioreq_server_info can now return. > > Do not change signature of

[PATCH v2 0/2] x86: init improvements

2023-05-02 Thread Roger Pau Monne
Hello, The following series contain two minor improvements for early boot: the first one is an alignment check when building the initial page tables, the second is a consistency fix for the GDT used by the BSP for the trampoline code. Both are a result of some debugging work done on a system

[PATCH v2 2/2] x86/trampoline: load the GDT located in the trampoline page

2023-05-02 Thread Roger Pau Monne
When booting the BSP the portion of the code executed from the trampoline page will be using the GDT located in the hypervisor .text.head section rather than the GDT located in the relocated trampoline page. If skip_realmode is not set the GDT located in the trampoline page will be loaded after

[PATCH v2 1/2] x86/head: check base address alignment

2023-05-02 Thread Roger Pau Monne
Ensure that the base address is 2M aligned, or else the page table entries created would be corrupt as reserved bits on the PDE end up set. We have encountered a broken firmware where grub2 would end up loading Xen at a non 2M aligned region when using the multiboot2 protocol, and that caused a

Re: [PATCH] xen/evtchn: Introduce new IOCTL to bind static evtchn

2023-05-02 Thread Rahul Singh
Hi Ayan, On 28 Apr 2023, at 2:30 pm, Ayan Kumar Halder wrote: Hi Rahul, On 28/04/2023 13:36, Rahul Singh 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. Xen

Re: [PATCH] libxl: arm: Allow grant mappings for backends running on Dom0

2023-05-02 Thread Anthony PERARD
On Thu, Mar 30, 2023 at 02:13:08PM +0530, Viresh Kumar wrote: > diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in > index 10f37990be57..4879f136aab8 100644 > --- a/docs/man/xl.cfg.5.pod.in > +++ b/docs/man/xl.cfg.5.pod.in > @@ -1616,6 +1616,10 @@ properties in the Device Tree, the

[PATCH] 9pfs/xen: Fix segfault on shutdown

2023-05-02 Thread Jason Andryuk
xen_9pfs_free can't use gnttabdev since it is already closed and NULL-ed out when free is called. Do the teardown in _disconnect(). This matches the setup done in _connect(). trace-events are also added for the XenDevOps functions. Signed-off-by: Jason Andryuk --- hw/9pfs/trace-events |

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

2023-05-02 Thread osstest service owner
flight 180505 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/180505/ 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

Re: HAS_CC_CET_IBT misdetected

2023-05-02 Thread Olaf Hering
Tue, 2 May 2023 15:44:41 +0200 Jan Beulich : > How would an out-of-tree build help (which for the hypervisor we now > have support for)? An incremental build there will hit exactly the same > issue afaict. Each container target will use a separate output directory. The Leap container will only

[xen-unstable test] 180501: tolerable FAIL

2023-05-02 Thread osstest service owner
flight 180501 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/180501/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-xl-qemut-debianhvm-i386-xsm 12 debian-hvm-install fail in 180496 pass in 180501

Re: HAS_CC_CET_IBT misdetected

2023-05-02 Thread Jan Beulich
On 02.05.2023 15:36, Olaf Hering wrote: > Tue, 2 May 2023 15:29:19 +0200 Jan Beulich : > >> Getting this to work automatically is a continued subject of discussion. > > I think the only real solution is an out-of-tree build. Essentially every > single component needs to detect a toolchain

Re: [PATCH] xen/sysctl: fix XEN_SYSCTL_getdomaininfolist handling with XSM

2023-05-02 Thread Daniel P. Smith
On 5/2/23 09:30, Juergen Gross wrote: On 02.05.23 15:23, Daniel P. Smith wrote: On 5/2/23 09:13, Juergen Gross wrote: On 02.05.23 15:03, Daniel P. Smith wrote: On 4/30/23 10:46, Juergen Gross wrote: In case XSM is active, the handling of XEN_SYSCTL_getdomaininfolist can fail if the last

Re: HAS_CC_CET_IBT misdetected

2023-05-02 Thread Andrew Cooper
On 02/05/2023 1:04 pm, Olaf Hering wrote: > Tue, 2 May 2023 13:33:13 +0200 Olaf Hering : > >> I will investigate why it failed to build for me. > This happens if one builds first with the Tumbleweed container, and later > with the Leap container, without a 'git clean -dffx' in between. > > Is

Re: [PATCH v3 2/2] acpi: Add TPM2 interface definition.

2023-05-02 Thread Jan Beulich
On 25.04.2023 19:47, Jennifer Herbert wrote: > --- a/tools/libacpi/acpi2_0.h > +++ b/tools/libacpi/acpi2_0.h > @@ -121,6 +121,36 @@ struct acpi_20_tcpa { > }; > #define ACPI_2_0_TCPA_LAML_SIZE (64*1024) > > +/* > + * TPM2 > + */ Nit: While I'm willing to accept the comment style violation

Re: HAS_CC_CET_IBT misdetected

2023-05-02 Thread Olaf Hering
Tue, 2 May 2023 15:29:19 +0200 Jan Beulich : > Getting this to work automatically is a continued subject of discussion. I think the only real solution is an out-of-tree build. Essentially every single component needs to detect a toolchain change. This is unrealistic. Olaf pgpjSDzLmeFs3.pgp

Re: [PATCH] xen/sysctl: fix XEN_SYSCTL_getdomaininfolist handling with XSM

2023-05-02 Thread Juergen Gross
On 02.05.23 15:23, Daniel P. Smith wrote: On 5/2/23 09:13, Juergen Gross wrote: On 02.05.23 15:03, Daniel P. Smith wrote: On 4/30/23 10:46, Juergen Gross wrote: In case XSM is active, the handling of XEN_SYSCTL_getdomaininfolist can fail if the last domain scanned isn't allowed to be accessed

Re: HAS_CC_CET_IBT misdetected

2023-05-02 Thread Jan Beulich
On 02.05.2023 14:04, Olaf Hering wrote: > Tue, 2 May 2023 13:33:13 +0200 Olaf Hering : > >> I will investigate why it failed to build for me. > > This happens if one builds first with the Tumbleweed container, and later > with the Leap container, without a 'git clean -dffx' in between. > > Is

Re: [PATCH] xen/sysctl: fix XEN_SYSCTL_getdomaininfolist handling with XSM

2023-05-02 Thread Daniel P. Smith
On 5/2/23 09:23, Daniel P. Smith wrote: On 5/2/23 09:13, Juergen Gross wrote: On 02.05.23 15:03, Daniel P. Smith wrote: On 4/30/23 10:46, Juergen Gross wrote: In case XSM is active, the handling of XEN_SYSCTL_getdomaininfolist can fail if the last domain scanned isn't allowed to be accessed

Re: [PATCH 1/2] x86/head: check base address alignment

2023-05-02 Thread Jan Beulich
On 02.05.2023 15:02, Roger Pau Monné wrote: > On Tue, May 02, 2023 at 01:11:12PM +0200, Jan Beulich wrote: >> On 02.05.2023 13:05, Jan Beulich wrote: >>> On 02.05.2023 12:51, Roger Pau Monné wrote: On Tue, May 02, 2023 at 12:28:55PM +0200, Jan Beulich wrote: > On 02.05.2023 11:54, Andrew

Re: [PATCH] xen/sysctl: fix XEN_SYSCTL_getdomaininfolist handling with XSM

2023-05-02 Thread Daniel P. Smith
On 5/2/23 09:13, Juergen Gross wrote: On 02.05.23 15:03, Daniel P. Smith wrote: On 4/30/23 10:46, Juergen Gross wrote: In case XSM is active, the handling of XEN_SYSCTL_getdomaininfolist can fail if the last domain scanned isn't allowed to be accessed by the calling domain (i.e.

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Jan Beulich
On 02.05.2023 15:13, Daniel P. Smith wrote: > On 5/2/23 07:00, Roger Pau Monné wrote: >> On Tue, May 02, 2023 at 06:43:33AM -0400, Daniel P. Smith wrote: >>> On 5/2/23 03:17, Jan Beulich wrote: Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to cause the operation to

Re: [PATCH v4 04/20] virtio-scsi: stop using aio_disable_external() during unplug

2023-05-02 Thread Kevin Wolf
Am 01.05.2023 um 17:09 hat Stefan Hajnoczi geschrieben: > On Fri, Apr 28, 2023 at 04:22:55PM +0200, Kevin Wolf wrote: > > Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > > > This patch is part of an effort to remove the aio_disable_external() > > > API because it does not fit in a

Re: [PATCH] xen/sysctl: fix XEN_SYSCTL_getdomaininfolist handling with XSM

2023-05-02 Thread Daniel P. Smith
On 5/2/23 09:10, Roger Pau Monné wrote: On Tue, May 02, 2023 at 09:03:00AM -0400, Daniel P. Smith wrote: On 4/30/23 10:46, Juergen Gross wrote: In case XSM is active, the handling of XEN_SYSCTL_getdomaininfolist can fail if the last domain scanned isn't allowed to be accessed by the calling

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Jan Beulich
On 02.05.2023 14:54, Daniel P. Smith wrote: > On 5/2/23 06:59, Jan Beulich wrote: >> On 02.05.2023 12:43, Daniel P. Smith wrote: >>> On 5/2/23 03:17, Jan Beulich wrote: Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to cause the operation to fail, in the loop here

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Daniel P. Smith
On 5/2/23 07:00, Roger Pau Monné wrote: On Tue, May 02, 2023 at 06:43:33AM -0400, Daniel P. Smith wrote: On 5/2/23 03:17, Jan Beulich wrote: Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to cause the operation to fail, in the loop here it ought to merely determine

Re: [PATCH] xen/sysctl: fix XEN_SYSCTL_getdomaininfolist handling with XSM

2023-05-02 Thread Juergen Gross
On 02.05.23 15:03, Daniel P. Smith wrote: On 4/30/23 10:46, Juergen Gross wrote: In case XSM is active, the handling of XEN_SYSCTL_getdomaininfolist can fail if the last domain scanned isn't allowed to be accessed by the calling domain (i.e. xsm_getdomaininfo(XSM_HOOK, d) is failing). Fix that

Re: [PATCH] xen/sysctl: fix XEN_SYSCTL_getdomaininfolist handling with XSM

2023-05-02 Thread Roger Pau Monné
On Tue, May 02, 2023 at 09:03:00AM -0400, Daniel P. Smith wrote: > On 4/30/23 10:46, Juergen Gross wrote: > > In case XSM is active, the handling of XEN_SYSCTL_getdomaininfolist > > can fail if the last domain scanned isn't allowed to be accessed by > > the calling domain (i.e.

Re: [PATCH 1/2] x86/head: check base address alignment

2023-05-02 Thread Roger Pau Monné
On Tue, May 02, 2023 at 01:11:12PM +0200, Jan Beulich wrote: > On 02.05.2023 13:05, Jan Beulich wrote: > > On 02.05.2023 12:51, Roger Pau Monné wrote: > >> On Tue, May 02, 2023 at 12:28:55PM +0200, Jan Beulich wrote: > >>> On 02.05.2023 11:54, Andrew Cooper wrote: > On 02/05/2023 10:22 am,

Re: [PATCH] xen/sysctl: fix XEN_SYSCTL_getdomaininfolist handling with XSM

2023-05-02 Thread Daniel P. Smith
On 4/30/23 10:46, Juergen Gross wrote: In case XSM is active, the handling of XEN_SYSCTL_getdomaininfolist can fail if the last domain scanned isn't allowed to be accessed by the calling domain (i.e. xsm_getdomaininfo(XSM_HOOK, d) is failing). Fix that by just ignoring scanned domains where

Re: [PATCH v3 2/3] tools: Use new xc function for some xc_domain_getinfo() calls

2023-05-02 Thread Andrew Cooper
On 02/05/2023 12:18 pm, Alejandro Vallejo wrote: > On Tue, May 02, 2023 at 12:13:37PM +0100, Alejandro Vallejo wrote: >> Move calls that require a information about a single precisely identified >> domain to the new xc_domain_getinfo_single(). >> >> Signed-off-by: Alejandro Vallejo >>

Re: [PATCH] sysctl: XSM hook should not cause XEN_SYSCTL_getdomaininfolist to (appear to) fail

2023-05-02 Thread Daniel P. Smith
On 5/2/23 06:59, Jan Beulich wrote: On 02.05.2023 12:43, Daniel P. Smith wrote: On 5/2/23 03:17, Jan Beulich wrote: Unlike for XEN_DOMCTL_getdomaininfo, where the XSM check is intended to cause the operation to fail, in the loop here it ought to merely determine whether information for the

Re: [PATCH v3 1/3] tools: Modify single-domid callers of xc_domain_getinfolist()

2023-05-02 Thread Christian Lindig
> On 2 May 2023, at 12:13, Alejandro Vallejo > wrote: > > xc_domain_getinfolist() internally relies on a sysctl that performs > a linear search for the domids. Many callers of xc_domain_getinfolist() > who require information about a precise domid are much better off calling >

[PATCH v6 05/16] x86/xen: set MTRR state when running as Xen PV initial domain

2023-05-02 Thread Juergen Gross
When running as Xen PV initial domain (aka dom0), MTRRs are disabled by the hypervisor, but the system should nevertheless use correct cache memory types. This has always kind of worked, as disabled MTRRs resulted in disabled PAT, too, so that the kernel avoided code paths resulting in

[PATCH v6 00/16] x86/mtrr: fix handling with PAT but without MTRR

2023-05-02 Thread Juergen Gross
This series tries to fix the rather special case of PAT being available without having MTRRs (either due to CONFIG_MTRR being not set, or because the feature has been disabled e.g. by a hypervisor). The main use cases are Xen PV guests and SEV-SNP guests running under Hyper-V. Instead of trying

Re: HAS_CC_CET_IBT misdetected

2023-05-02 Thread Olaf Hering
Tue, 2 May 2023 13:33:13 +0200 Olaf Hering : > I will investigate why it failed to build for me. This happens if one builds first with the Tumbleweed container, and later with the Leap container, without a 'git clean -dffx' in between. Is there a way to invalidate everything if the toolchain

Re: HAS_CC_CET_IBT misdetected

2023-05-02 Thread Andrew Cooper
On 02/05/2023 12:33 pm, Olaf Hering wrote: > Tue, 2 May 2023 09:31:56 +0200 Jan Beulich : > >> How does 2.37 vs 2.39 matter? CET-IBT support is present in gas as of 2.29. > I have no idea. It turned out, the previous Leap image was based on 15.3, > while the current one will be 15.4. > > If I run

Re: [PATCH v3 1/2] acpi: Make TPM version configurable.

2023-05-02 Thread Jan Beulich
On 25.04.2023 19:47, Jennifer Herbert wrote: > This patch makes the TPM version, for which the ACPI libary probes, > configurable. > If acpi_config.tpm_verison is set to 1, it indicates that 1.2 (TCPA) should > be probed. > I have also added to hvmloader an option to allow setting this new

Re: HAS_CC_CET_IBT misdetected

2023-05-02 Thread Olaf Hering
Tue, 2 May 2023 09:31:56 +0200 Jan Beulich : > How does 2.37 vs 2.39 matter? CET-IBT support is present in gas as of 2.29. I have no idea. It turned out, the previous Leap image was based on 15.3, while the current one will be 15.4. If I run this manually, it appears the error is produced

Re: [PATCH RFC] SUPPORT.md: Make all security support explicit

2023-05-02 Thread Jan Beulich
On 28.04.2023 10:14, George Dunlap wrote: > On Fri, Apr 28, 2023 at 9:12 AM George Dunlap wrote: > It occurred to me that in many (most? all?) cases it would be more > effective to define the security support parameters in the > documentation itself. I think I agree; the alternative of needing

Re: [PATCH RFC] SUPPORT.md: Make all security support explicit

2023-05-02 Thread Jan Beulich
On 28.04.2023 10:12, George Dunlap wrote: > --- a/SUPPORT.md > +++ b/SUPPORT.md > @@ -17,6 +17,36 @@ for the definitions of the support status levels etc. > Release Notes > : href="https://wiki.xenproject.org/wiki/Xen_Project_X.YY_Release_Notes;>RN > > +# General security support > + > +An

Re: [PATCH v3 2/3] tools: Use new xc function for some xc_domain_getinfo() calls

2023-05-02 Thread Alejandro Vallejo
On Tue, May 02, 2023 at 12:13:37PM +0100, Alejandro Vallejo wrote: > Move calls that require a information about a single precisely identified > domain to the new xc_domain_getinfo_single(). > > Signed-off-by: Alejandro Vallejo > Reviewed-by: Andrew Cooper > > --- > Cc: Andrew Cooper > Cc:

Re: [PATCH v3 1/3] tools: Modify single-domid callers of xc_domain_getinfolist()

2023-05-02 Thread Alejandro Vallejo
On Tue, May 02, 2023 at 12:13:36PM +0100, Alejandro Vallejo wrote: > xc_domain_getinfolist() internally relies on a sysctl that performs > a linear search for the domids. Many callers of xc_domain_getinfolist() > who require information about a precise domid are much better off calling >

[PATCH v3 2/3] tools: Use new xc function for some xc_domain_getinfo() calls

2023-05-02 Thread Alejandro Vallejo
Move calls that require a information about a single precisely identified domain to the new xc_domain_getinfo_single(). Signed-off-by: Alejandro Vallejo Reviewed-by: Andrew Cooper --- Cc: Andrew Cooper Cc: Wei Liu Cc: Anthony PERARD Cc: Tim Deegan Cc: George Dunlap Cc: Juergen Gross v3:

[PATCH v3 3/3] domctl: Modify XEN_DOMCTL_getdomaininfo to fail if domid is not found

2023-05-02 Thread Alejandro Vallejo
It previously mimicked the getdomaininfo sysctl semantics by returning the first domid higher than the requested domid that does exist. This unintuitive behaviour causes quite a few mistakes and makes the call needlessly slow in its error path. This patch removes the fallback search, returning

[PATCH v3 0/3] Rationalize usage of xc_domain_getinfo{,list}()

2023-05-02 Thread Alejandro Vallejo
The first 4 patches of v2 already made it to staging. This is a corrected repost of the 3 remaining ones. Original cover letter: xc_domain_getinfo() returns the list of domains with domid >= first_domid. It does so by repeatedly invoking XEN_DOMCTL_getdomaininfo, which leads to unintuitive

[PATCH v3 1/3] tools: Modify single-domid callers of xc_domain_getinfolist()

2023-05-02 Thread Alejandro Vallejo
xc_domain_getinfolist() internally relies on a sysctl that performs a linear search for the domids. Many callers of xc_domain_getinfolist() who require information about a precise domid are much better off calling xc_domain_getinfo_single() instead, that will use the getdomaininfo domctl instead

  1   2   >