Re: [PATCH] docs: arm: Update where Xen should be loaded in memory

2024-04-11 Thread Luca Fancellu
> On 12 Apr 2024, at 07:16, Michal Orzel wrote: > > Since commit 6cd046c501bc ("xen/arm: Enlarge identity map space to 10TB") > Xen can be loaded below 10 TiB. Update docs accordingly. > > Take the opportunity to update stale links to Linux docs. > > Signed-off-by: Michal Orzel > --- Revie

[PATCH] docs: arm: Update where Xen should be loaded in memory

2024-04-11 Thread Michal Orzel
Since commit 6cd046c501bc ("xen/arm: Enlarge identity map space to 10TB") Xen can be loaded below 10 TiB. Update docs accordingly. Take the opportunity to update stale links to Linux docs. Signed-off-by: Michal Orzel --- docs/misc/arm/booting.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 d

[linux-linus test] 185306: tolerable FAIL - PUSHED

2024-04-11 Thread osstest service owner
flight 185306 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/185306/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 185290 test-amd64-amd64-xl-qemuu-win7-amd64

[PATCH v4 1/6] xen/ppc: Introduce stub asm/static-shmem.h

2024-04-11 Thread Shawn Anastasio
Required for bootfdt.c to build. Signed-off-by: Shawn Anastasio --- Changes in v4: none xen/arch/ppc/include/asm/static-shmem.h | 12 1 file changed, 12 insertions(+) create mode 100644 xen/arch/ppc/include/asm/static-shmem.h diff --git a/xen/arch/ppc/include/asm/static-shmem.h

[PATCH v4 6/6] xen/ppc: mm-radix: Allocate all paging structures at runtime

2024-04-11 Thread Shawn Anastasio
In the initial mm-radix implementation, the in-memory partition and process tables required to configure the MMU, as well as the page tables themselves were all allocated statically since the boot allocator was not yet available. Now that it is, allocate these structures at runtime and bump the si

[PATCH v4 4/6] xen/ppc: Enable bootfdt and boot allocator

2024-04-11 Thread Shawn Anastasio
Enable usage of bootfdt for populating the boot info struct from the firmware-provided device tree. Also enable the Xen boot page allocator. Additionally, modify bootfdt.c's boot_fdt_info() to tolerate the scenario in which the FDT overlaps a reserved memory region, as is the case on PPC when boo

[PATCH v4 2/6] xen/device-tree: Move Arm's setup.c bootinfo functions to common

2024-04-11 Thread Shawn Anastasio
Arm's setup.c contains a collection of functions for parsing memory map and other boot information from a device tree. Since these routines are generally useful on any architecture that supports device tree booting, move them into xen/common/device-tree. Suggested-by: Julien Grall Signed-off-by:

[PATCH v4 0/6] Early Boot Allocation on Power

2024-04-11 Thread Shawn Anastasio
Hello all, This series enables the Xen boot time allocator on Power by parsing the available memory regions from the firmware-provided device tree. Thanks, Shawn Shawn Anastasio (6): xen/ppc: Introduce stub asm/static-shmem.h xen/device-tree: Move Arm's setup.c bootinfo functions to common

[PATCH v4 3/6] xen/common: Move Arm's bootfdt.c to common

2024-04-11 Thread Shawn Anastasio
Move Arm's bootfdt.c to xen/common so that it can be used by other device tree architectures like PPC and RISCV. Suggested-by: Julien Grall Signed-off-by: Shawn Anastasio Acked-by: Julien Grall --- Changes in v4: - move function prototypes to patch 2's xen/include/bootfdt.h - clean up #incl

[PATCH v4 5/6] xen/ppc: mm-radix: Replace debug printing code with printk

2024-04-11 Thread Shawn Anastasio
Now that we have common code building, there's no need to keep the old itoa64+debug print function in mm-radix.c Signed-off-by: Shawn Anastasio Reviewed-by: Jan Beulich --- Changes in v4: none xen/arch/ppc/mm-radix.c | 58 + 1 file changed, 12 insertions

Re: [PATCH v3 9/9] xen/ppc: mm-radix: Allocate all paging structures at runtime

2024-04-11 Thread Shawn Anastasio
Hi Jan, On 3/25/24 10:39 AM, Jan Beulich wrote: > On 14.03.2024 23:15, Shawn Anastasio wrote: >> --- a/xen/arch/ppc/mm-radix.c >> +++ b/xen/arch/ppc/mm-radix.c >> @@ -21,69 +21,101 @@ void enable_mmu(void); >> #define radix_dprintk(...) >> #endif >> >> -#define INITIAL_LVL1_PD_COUNT 1 >> -#

Re: [PATCH v3 5/9] xen/device-tree: Move Arm's setup.c bootinfo functions to common

2024-04-11 Thread Shawn Anastasio
Hi Julien, On 3/21/24 12:53 PM, Julien Grall wrote: > Hi, > > On 14/03/2024 22:15, Shawn Anastasio wrote: >> diff --git a/xen/common/device-tree/Makefile >> b/xen/common/device-tree/Makefile >> new file mode 100644 >> index 00..c97b2bd88c >> --- /dev/null >> +++ b/xen/common/device-tree/M

Re: [PATCH v3 6/9] xen/common: Move Arm's bootfdt.c to common

2024-04-11 Thread Shawn Anastasio
Hi Julien, On 3/21/24 12:50 PM, Julien Grall wrote: > Hi Shawn, > > On 14/03/2024 22:15, Shawn Anastasio wrote: >> Move Arm's bootfdt.c to xen/common so that it can be used by other >> device tree architectures like PPC and RISCV. >> >> Suggested-by: Julien Grall >> Signed-off-by: Shawn Anastasi

Re: [PATCH v3 8/9] xen/ppc: mm-radix: Replace debug printing code with printk

2024-04-11 Thread Shawn Anastasio
Hi Jan, On 3/25/24 10:29 AM, Jan Beulich wrote: > On 14.03.2024 23:15, Shawn Anastasio wrote: >> Now that we have common code building, there's no need to keep the old >> itoa64+debug print function in mm-radix.c >> >> Signed-off-by: Shawn Anastasio > > Reviewed-by: Jan Beulich > > Just to cla

Re: [PATCH v3 5/9] xen/device-tree: Move Arm's setup.c bootinfo functions to common

2024-04-11 Thread Shawn Anastasio
Hi Julien, On 3/21/24 12:47 PM, Julien Grall wrote: > Hi Shawn, > > On 14/03/2024 22:15, Shawn Anastasio wrote: >> Arm's setup.c contains a collection of functions for parsing memory map >> and other boot information from a device tree. Since these routines are >> generally useful on any architec

[xen-4.18-testing test] 185303: regressions - FAIL

2024-04-11 Thread osstest service owner
flight 185303 xen-4.18-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/185303/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-coresched-amd64-xl 22 guest-start/debian.repeat fail REGR. vs. 185285 build-arm64

Re: [XEN PATCH v2 0/3] x86/iommu: Drop IOMMU support when cx16 isn't supported

2024-04-11 Thread Marek Marczykowski-Górecki
On Thu, Apr 11, 2024 at 09:05:08PM +0100, Andrew Cooper wrote: > Sorry, but you've sent out two copies of each patch in this series, and > it's not clear if they're identical or not. FWIW I've got just one copy. -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab signature.asc De

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

2024-04-11 Thread osstest service owner
flight 185326 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/185326/ 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 v2 1/4] docs: add xen_ulong_t to the documented integers sizes/alignments

2024-04-11 Thread Stefano Stabellini
On Wed, 10 Apr 2024, Julien Grall wrote: > On Wed, 10 Apr 2024 at 19:47, Stefano Stabellini > wrote: > xen_ulong_t is widely used in public headers. > > Signed-off-by: Stefano Stabellini > --- > > Given that xen_ulong_t is used in public headers there could be a better

Re: [VirtIO] Support for various devices in Xen

2024-04-11 Thread Stefano Stabellini
-Vikram +Edgar On Thu, 11 Apr 2024, Andrei Cherechesu wrote: > Hi Stefano, Vikram, Viresh, > > Thank you for your answers and support, and sorry for my late reply. > > > On 12/01/2024 02:56, Vikram Garhwal wrote: > > Hi Andrei & Stefano, > > > > Actually, QEMU patches are already upstreamed for

Re: [PATCH] docs/hypercall-abi: State that the hypercall page is optional

2024-04-11 Thread Stefano Stabellini
On Thu, 10 Apr 2024, Andrew Cooper wrote: > Xen doesn't care (and indeed, cannot feasibly tell) whether a hypercall was > initiated from inside or outside a hypercall page. > > For SEV-SNP/TDX encrypted VMs, use of a hypercall page would violate the > integrity properties wanted. > > Explicitly s

Re: [XEN PATCH v2 1/9] x86/vlapic: tidy switch statement and address MISRA violation

2024-04-11 Thread Nicola Vetrini
On 2024-04-11 14:03, Andrew Cooper wrote: On 09/04/2024 8:45 pm, Nicola Vetrini wrote: On 2024-04-08 09:32, Jan Beulich wrote: On 05.04.2024 11:14, Nicola Vetrini wrote: Remove unneded blank lines between switch clauses. "Unneeded" based on what? We're carefully trying to improve readability

Re: [XEN PATCH v2 0/3] x86/iommu: Drop IOMMU support when cx16 isn't supported

2024-04-11 Thread Andrew Cooper
On 08/04/2024 2:02 pm, Teddy Astie wrote: > All hardware that supports VT-d/AMD-Vi that exists also supports cx16 (aside > specifically crafted virtual machines). > > Some IOMMU code paths in Xen consider cases where VT-d/AMD-Vi is supported > while cx16 isn't, those paths may be bugged and are bar

Re: [PATCH 5/5] gzip: move huffman code table tracking into gzip state

2024-04-11 Thread Andrew Cooper
On 11/04/2024 4:25 pm, Daniel P. Smith wrote: > Signed-off-by: Daniel P. Smith > --- > xen/common/gzip/gunzip.c | 2 ++ > xen/common/gzip/inflate.c | 26 -- > 2 files changed, 14 insertions(+), 14 deletions(-) > > diff --git a/xen/common/gzip/gunzip.c b/xen/common/gzip/g

Re: [PATCH 4/5] gzip: move crc state into consilidated gzip state

2024-04-11 Thread Andrew Cooper
On 11/04/2024 4:25 pm, Daniel P. Smith wrote: > diff --git a/xen/common/gzip/inflate.c b/xen/common/gzip/inflate.c > index c8dd35962abb..6c8c7452a31f 100644 > --- a/xen/common/gzip/inflate.c > +++ b/xen/common/gzip/inflate.c > @@ -1125,16 +1125,14 @@ static int __init inflate(struct gzip_data *gd)

Re: [PATCH 1/5] gzip: colocate gunzip code files

2024-04-11 Thread Luca Fancellu
>>> create mode 100644 xen/common/gzip/Makefile >>> rename xen/common/{ => gzip}/gunzip.c (100%) >>> rename xen/common/{ => gzip}/inflate.c (100%) >> For inflate.c you will need to update also docs/misra/exclude-list.json > > Something like this? > > diff --git a/docs/misra/exclude-list.json b/

Re: [PATCH 3/5] gzip: refactor state tracking

2024-04-11 Thread Andrew Cooper
On 11/04/2024 4:25 pm, Daniel P. Smith wrote: > diff --git a/xen/common/gzip/gunzip.c b/xen/common/gzip/gunzip.c > index 1bcb007395ba..9b4891731b8b 100644 > --- a/xen/common/gzip/gunzip.c > +++ b/xen/common/gzip/gunzip.c > @@ -102,12 +109,13 @@ __init int gzip_check(char *image, unsigned long > im

Re: [PATCH 2/5] gzip: clean up comments and fix code alignment

2024-04-11 Thread Andrew Cooper
On 11/04/2024 4:25 pm, Daniel P. Smith wrote: > This commit cleans up the comments and fixes the code alignment using Xen > coding style. This is done to make the code more legible before refactoring. > > Signed-off-by: Daniel P. Smith I've found two more minor adjustments: diff --git a/xen/comm

[linux-6.1 test] 185299: tolerable FAIL - PUSHED

2024-04-11 Thread osstest service owner
flight 185299 linux-6.1 real [real] http://logs.test-lab.xenproject.org/osstest/logs/185299/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 185231 test-amd64-amd64-xl-qemuu-win7-amd64 19

Re: [PATCH 1/5] gzip: colocate gunzip code files

2024-04-11 Thread Andrew Cooper
On 11/04/2024 5:00 pm, Luca Fancellu wrote: >> On 11 Apr 2024, at 16:25, Daniel P. Smith >> wrote: >> >> This patch moves the gunzip code files to common/gzip. Makefiles are adjusted >> accordingly. >> >> Signed-off-by: Daniel P. Smith >> --- >> xen/common/Makefile | 2 +- >> xen/comm

Re: [PATCH v1 2/2] Implemented Amd Secure Processor device driver

2024-04-11 Thread Andrew Cooper
On 10/04/2024 4:36 pm, Andrei Semenov wrote: > Signed-off-by: Andrei Semenov > --- > xen/arch/x86/include/asm/psp-sev.h | 655 +++ > xen/drivers/Kconfig| 2 + > xen/drivers/Makefile | 1 + > xen/drivers/crypto/Kconfig | 10 + > xen/dr

Re: [PATCH v1 1/2] Implemented AMD SEV discovery and enabling.

2024-04-11 Thread Andrew Cooper
On 10/04/2024 4:36 pm, Andrei Semenov wrote: > diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c > index ab92333673..a5903613f0 100644 > --- a/xen/arch/x86/cpu/amd.c > +++ b/xen/arch/x86/cpu/amd.c > @@ -1030,6 +1031,54 @@ static void amd_check_erratum_1485(void) > wrmsrl(MSR_AMD64_

[PATCH v3 3/4] tools/misc: Add xenwatchdogd.c copyright notice

2024-04-11 Thread leigh
From: Leigh Brown Add copyright notice and description of the program. Signed-off-by: Leigh Brown --- tools/misc/xenwatchdogd.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tools/misc/xenwatchdogd.c b/tools/misc/xenwatchdogd.c index a16d1efc13..2884ca6ca9 100644 --- a/tools/

[PATCH v3 2/4] tools/misc: xenwatchdogd enhancements

2024-04-11 Thread leigh
From: Leigh Brown Add usage() function, the ability to run in the foreground, and the ability to disarm the watchdog timer when exiting. Add enhanced parameter parsing and validation, making use of getopt_long(). Check the number of parameters are correct, the timeout is at least two seconds (t

[PATCH v3 1/4] tools/misc: xenwatchdogd: add parse_secs()

2024-04-11 Thread leigh
From: Leigh Brown Create a new parse_secs() function to parse the timeout and sleep parameters. This ensures that non-numeric parameters are not accidentally treated as numbers. Signed-off-by: Leigh Brown --- tools/misc/xenwatchdogd.c | 23 +++ 1 file changed, 15 insertions

[PATCH v3 4/4] docs/man: Add xenwatchdog manual page

2024-04-11 Thread leigh
From: Leigh Brown Add a manual page for xenwatchdogd. Signed-off-by: Leigh Brown --- docs/man/xenwatchdogd.8.pod | 55 + 1 file changed, 55 insertions(+) create mode 100644 docs/man/xenwatchdogd.8.pod diff --git a/docs/man/xenwatchdogd.8.pod b/docs/man/xen

[PATCH v3 0/4] xenwatchdogd bugfixes and enhancements

2024-04-11 Thread leigh
From: Leigh Brown The primary intention of this patch series is to replace the pathologically bad behaviour of rebooting the domain if you run "xenwatchdogd -h". To that end, I have implemented comprehensive argument validation. This validation ensures you can't pass arguments that instantly rebo

Re: [PATCH 2/5] x86/pvh: Make PVH entrypoint PIC for x86-64

2024-04-11 Thread Brian Gerst
On Thu, Apr 11, 2024 at 11:26 AM Jason Andryuk wrote: > > On 2024-04-10 17:00, Brian Gerst wrote: > > On Wed, Apr 10, 2024 at 3:50 PM Jason Andryuk wrote: > > >> /* 64-bit entry point. */ > >> .code64 > >> 1: > >> + UNWIND_HINT_END_OF_STACK > >> + > >> /* Set ba

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

2024-04-11 Thread osstest service owner
flight 185317 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/185317/ 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

[xen-4.16-testing test] 185297: regressions - FAIL

2024-04-11 Thread osstest service owner
flight 185297 xen-4.16-testing real [real] flight 185316 xen-4.16-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/185297/ http://logs.test-lab.xenproject.org/osstest/logs/185316/ Regressions :-( Tests which did not succeed and are blocking, including tests which could

Re: [PATCH v2] altcall: fix __alt_call_maybe_initdata so it's safe for livepatch

2024-04-11 Thread Andrew Cooper
On 11/04/2024 5:08 pm, Roger Pau Monne wrote: > Setting alternative call variables as __init is not safe for use with > livepatch, as livepatches can rightfully introduce new alternative calls to > structures marked as __alt_call_maybe_initdata (possibly just indirectly due > to > replacing existi

Re: [PATCH RFC v3 for-6.8/block 07/17] bcachefs: remove dead function bdev_sectors()

2024-04-11 Thread Kent Overstreet
On Thu, Dec 21, 2023 at 04:57:02PM +0800, Yu Kuai wrote: > From: Yu Kuai > > bdev_sectors() is not used hence remove it. > > Signed-off-by: Yu Kuai Acked-by: Kent Overstreet > --- > fs/bcachefs/util.h | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/fs/bcachefs/util.h b/fs/bcac

[PATCH v2] altcall: fix __alt_call_maybe_initdata so it's safe for livepatch

2024-04-11 Thread Roger Pau Monne
Setting alternative call variables as __init is not safe for use with livepatch, as livepatches can rightfully introduce new alternative calls to structures marked as __alt_call_maybe_initdata (possibly just indirectly due to replacing existing functions that use those). Attempting to resolve thos

Re: [PATCH 1/5] gzip: colocate gunzip code files

2024-04-11 Thread Luca Fancellu
> On 11 Apr 2024, at 16:25, Daniel P. Smith > wrote: > > This patch moves the gunzip code files to common/gzip. Makefiles are adjusted > accordingly. > > Signed-off-by: Daniel P. Smith > --- > xen/common/Makefile | 2 +- > xen/common/gzip/Makefile| 1 + > xen/common/{ => g

Re: [PATCH v2 2/6] tools/misc: rework xenwatchdogd signal handling

2024-04-11 Thread Leigh Brown
Hi Andrew, On 2024-04-11 13:12, Andrew Cooper wrote: On 29/03/2024 11:10 am, le...@solinno.co.uk wrote: diff --git a/tools/misc/xenwatchdogd.c b/tools/misc/xenwatchdogd.c index 2f7c822d61..35a0df655a 100644 --- a/tools/misc/xenwatchdogd.c +++ b/tools/misc/xenwatchdogd.c @@ -9,9 +9,11 @@ #inclu

[PATCH] altcall: fix __alt_call_maybe_initdata so it's safe for livepatch

2024-04-11 Thread Roger Pau Monne
Setting alternative call variables as __init is not safe for use with livepatch, as livepatches can rightfully introduce new alternative calls to structures marked as __alt_call_maybe_initdata (possibly just indirectly due to replacing existing functions that use those). Attempting to resolve thos

[PATCH 5/5] gzip: move huffman code table tracking into gzip state

2024-04-11 Thread Daniel P. Smith
Signed-off-by: Daniel P. Smith --- xen/common/gzip/gunzip.c | 2 ++ xen/common/gzip/inflate.c | 26 -- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/xen/common/gzip/gunzip.c b/xen/common/gzip/gunzip.c index a1b516b925c9..79a641263597 100644 --- a/xen/c

[PATCH 4/5] gzip: move crc state into consilidated gzip state

2024-04-11 Thread Daniel P. Smith
Signed-off-by: Daniel P. Smith --- xen/common/gzip/gunzip.c | 11 +++ xen/common/gzip/inflate.c | 12 +--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/xen/common/gzip/gunzip.c b/xen/common/gzip/gunzip.c index 9b4891731b8b..a1b516b925c9 100644 --- a/xen/common

Re: [PATCH 2/5] x86/pvh: Make PVH entrypoint PIC for x86-64

2024-04-11 Thread Jason Andryuk
On 2024-04-10 17:00, Brian Gerst wrote: On Wed, Apr 10, 2024 at 3:50 PM Jason Andryuk wrote: /* 64-bit entry point. */ .code64 1: + UNWIND_HINT_END_OF_STACK + /* Set base address in stack canary descriptor. */ mov $MSR_GS_BASE,%ecx - mov $_pa(

[PATCH 3/5] gzip: refactor state tracking

2024-04-11 Thread Daniel P. Smith
Move the core state into struct gzip_data to allow a per decompression instance. Signed-off-by: Daniel P. Smith --- xen/common/gzip/gunzip.c | 50 ++- xen/common/gzip/inflate.c | 174 +++--- 2 files changed, 116 insertions(+), 108 deletions(-) diff --gi

[PATCH 2/5] gzip: clean up comments and fix code alignment

2024-04-11 Thread Daniel P. Smith
This commit cleans up the comments and fixes the code alignment using Xen coding style. This is done to make the code more legible before refactoring. Signed-off-by: Daniel P. Smith --- xen/common/gzip/gunzip.c | 10 +- xen/common/gzip/inflate.c | 748 +++--- 2

[PATCH 1/5] gzip: colocate gunzip code files

2024-04-11 Thread Daniel P. Smith
This patch moves the gunzip code files to common/gzip. Makefiles are adjusted accordingly. Signed-off-by: Daniel P. Smith --- xen/common/Makefile | 2 +- xen/common/gzip/Makefile| 1 + xen/common/{ => gzip}/gunzip.c | 0 xen/common/{ => gzip}/inflate.c | 0 4 files changed,

[PATCH 0/5] Clean up of gzip decompressor

2024-04-11 Thread Daniel P. Smith
An issue ran into by hyperlaunch was the need to use the gzip decompressor multiple times. The current implementation fails when reused due to tainting of decompressor state from a previous usage. This series seeks to colocate the gzip unit files under a single directory similar to the other decomp

[XEN PATCH 2/2] tools/lsevtchn: Use evtchn port upper bound for evtchn enumeration

2024-04-11 Thread Matthew Barnes
lsevtchn terminates the loop when the hypercall returns an error, even if there are still event channels with higher port numbers to be enumerated over. Use the highest allocated event channel port number for a given domain to bound the loop so that all relevant event channels can be enumerated ov

[XEN PATCH 0/2] Enumerate all allocated evtchns in lsevtchn

2024-04-11 Thread Matthew Barnes
Currently, lsevtchn aborts its event channel enumeration when it hits its first hypercall error, namely: * When an event channel doesn't exist at the specified port * When the event channel is owned by Xen This results in lsevtchn missing potential relevant event channels with higher port numbers.

[XEN PATCH 1/2] xen/domctl: Add highest allocated evtchn port to getdomaininfo

2024-04-11 Thread Matthew Barnes
For tools such as lsevtchn to enumerate through event channels, they need an upper bound on the port number. Add the highest allocated event channel port number for a domain in the xen_domctl_getdomaininfo struct, and populate it. The field is added above the padding to avoid implicit padding. S

[PATCH] x86/emul: Simplify segment override prefix decoding

2024-04-11 Thread Andrew Cooper
x86_seg_* uses architectural encodings. Therefore, we can fold the prefix handling cases together and derive the segment from the prefix byte itself. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné This makes a marginal saving of 47 bytes, indicatin

[PATCH] docs/hypercall-abi: State that the hypercall page is optional

2024-04-11 Thread Andrew Cooper
Xen doesn't care (and indeed, cannot feasibly tell) whether a hypercall was initiated from inside or outside a hypercall page. For SEV-SNP/TDX encrypted VMs, use of a hypercall page would violate the integrity properties wanted. Explicitly state that the hypercall page is optional. Signed-off-by

Re: [PATCH v7 02/19] xen/riscv: disable unnecessary configs

2024-04-11 Thread Oleksii
On Wed, 2024-04-03 at 13:53 +0200, Jan Beulich wrote: > On 03.04.2024 12:54, Oleksii wrote: > > On Wed, 2024-04-03 at 12:28 +0200, Jan Beulich wrote: > > > On 03.04.2024 12:19, Oleksii Kurochko wrote: > > > > This patch disables unnecessary configs for two cases: > > > > 1. By utilizing EXTRA_FIXED

[xen-4.17-testing test] 185300: regressions - FAIL

2024-04-11 Thread osstest service owner
flight 185300 xen-4.17-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/185300/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qcow212 debian-di-installfail REGR. vs. 185284 test-amd64-amd

Re: [PATCH] locking/x86/xen: Use try_cmpxchg() in xen_alloc_p2m_entry()

2024-04-11 Thread Jürgen Groß
On 05.04.24 10:32, Uros Bizjak wrote: Use try_cmpxchg() instead of cmpxchg(*ptr, old, new) == old. The x86 CMPXCHG instruction returns success in the ZF flag, so this change saves a compare after CMPXCHG. Also, try_cmpxchg() implicitly assigns old *ptr value to "old" when CMPXCHG fails. There i

Re: [PATCH v2 12/13] xen/device_tree: Introduce function to merge overlapping intervals

2024-04-11 Thread Luca Fancellu
> > I’ve just spotted an issue with the algorithm, the fix is this one: > > diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c > index 24914a80d03b..262385a041a8 100644 > --- a/xen/common/device_tree.c > +++ b/xen/common/device_tree.c > @@ -2360,6 +2360,10 @@ int __init > dt_merge_

Re: [PATCH] xen/include: move definition of ASM_INT() to xen/linkage.h

2024-04-11 Thread Michal Orzel
On 03/04/2024 14:03, Juergen Gross wrote: > > > ASM_INT() is defined in arch/[arm|x86]/include/asm/asm_defns.h in > exactly the same way. Instead of replicating this definition for riscv > and ppc, move it to include/xen/linkage.h, where other arch agnostic > definitions for assembler code are

Re: [PATCH] xen/acpi: Allow xen/acpi.h to be included on non-ACPI archs

2024-04-11 Thread Henry Wang
Hi Andrew, On 4/11/2024 9:15 PM, Andrew Cooper wrote: On 05/04/2024 7:20 pm, Shawn Anastasio wrote: Conditionalize xen/acpi.h's inclusion of acpi/acpi.h and asm/acpi.h on CONFIG_ACPI and import ARM's !CONFIG_ACPI stub for acpi_disabled() so that the header can be included on architectures witho

Re: [PATCH] xen/acpi: Allow xen/acpi.h to be included on non-ACPI archs

2024-04-11 Thread Andrew Cooper
On 05/04/2024 7:20 pm, Shawn Anastasio wrote: > Conditionalize xen/acpi.h's inclusion of acpi/acpi.h and asm/acpi.h on > CONFIG_ACPI and import ARM's !CONFIG_ACPI stub for acpi_disabled() so > that the header can be included on architectures without ACPI support, > like ppc. > > This change reveale

[RFC PATCH v2 2/2] libs/light: expand device model start timeout use

2024-04-11 Thread Manos Pitsidianakis
Various timeout values that depend on the device model should also respect the device model start timeout setting. This commit adds the __libxl_device_model_start_timeout() value to those time outs without changing their default values. Signed-off-by: Manos Pitsidianakis --- tools/libs/light/lib

Re: [PATCH] xen/include: move definition of ASM_INT() to xen/linkage.h

2024-04-11 Thread Andrew Cooper
On 03/04/2024 3:22 pm, Jan Beulich wrote: > On 03.04.2024 15:59, Andrew Cooper wrote: >> On 03/04/2024 1:51 pm, Jan Beulich wrote: >>> On 03.04.2024 14:03, Juergen Gross wrote: ASM_INT() is defined in arch/[arm|x86]/include/asm/asm_defns.h in exactly the same way. Instead of replicating t

[RFC PATCH v2 0/2] convert LIBXL_DEVICE_MODEL_START_TIMEOUT to env var

2024-04-11 Thread Manos Pitsidianakis
This patch series proposes converting the compile-time define LIBXL_DEVICE_MODEL_START_TIMEOUT value to an optionally overridden by environment variable value, just like the current behavior for LIBXL_BOOTLOADER_TIMEOUT is. v1 -> v2 changes: - version 1 had no a/ b/ prefixes in patches due to

[RFC PATCH v2 1/2] libs/light: add device model start timeout env var

2024-04-11 Thread Manos Pitsidianakis
When debugging QEMU, the need to run it under Valgrind and asan meant the compile-time define LIBXL_DEVICE_MODEL_START_TIMEOUT must be changed to allow for `xl` to wait longer while the instrumented QEMU initializes. This commit adds support for reading the environment variable LIBXL_DEVICE_MODEL_

Re: [RFC PATCH v1 0/2] convert LIBXL_DEVICE_MODEL_START_TIMEOUT to env var

2024-04-11 Thread Manos Pitsidianakis
On Thu, 11 Apr 2024 at 14:24, Anthony PERARD wrote: > > On Thu, Apr 11, 2024 at 01:23:07PM +0300, Manos Pitsidianakis wrote: > > Hello Anthony, > > > > I do know about that, in fact I used it and it did not output your > > email. Here's what the `get_maintainer.pl` outputs: (same output for > > al

Re: [PATCH v2 2/6] tools/misc: rework xenwatchdogd signal handling

2024-04-11 Thread Andrew Cooper
On 29/03/2024 11:10 am, le...@solinno.co.uk wrote: > diff --git a/tools/misc/xenwatchdogd.c b/tools/misc/xenwatchdogd.c > index 2f7c822d61..35a0df655a 100644 > --- a/tools/misc/xenwatchdogd.c > +++ b/tools/misc/xenwatchdogd.c > @@ -9,9 +9,11 @@ > #include > #include > #include > +#include >

Re: [PATCH] xen/acpi: Allow xen/acpi.h to be included on non-ACPI archs

2024-04-11 Thread Andrew Cooper
On 09/04/2024 11:16 pm, Shawn Anastasio wrote: > On 4/8/24 1:54 AM, Jan Beulich wrote: >> On 05.04.2024 20:20, Shawn Anastasio wrote: >>> Conditionalize xen/acpi.h's inclusion of acpi/acpi.h and asm/acpi.h on >>> CONFIG_ACPI and import ARM's !CONFIG_ACPI stub for acpi_disabled() so >>> that the hea

Re: [XEN PATCH v2 1/9] x86/vlapic: tidy switch statement and address MISRA violation

2024-04-11 Thread Andrew Cooper
On 09/04/2024 8:45 pm, Nicola Vetrini wrote: > On 2024-04-08 09:32, Jan Beulich wrote: >> On 05.04.2024 11:14, Nicola Vetrini wrote: >>> Remove unneded blank lines between switch clauses. >> >> "Unneeded" based on what? We're carefully trying to improve >> readability of >> large switch() statement

[xen-4.15-testing test] 185296: regressions - FAIL

2024-04-11 Thread osstest service owner
flight 185296 xen-4.15-testing real [real] flight 185312 xen-4.15-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/185296/ http://logs.test-lab.xenproject.org/osstest/logs/185312/ Regressions :-( Tests which did not succeed and are blocking, including tests which could

Re: [RFC PATCH v1 0/2] convert LIBXL_DEVICE_MODEL_START_TIMEOUT to env var

2024-04-11 Thread Anthony PERARD
On Thu, Apr 11, 2024 at 01:23:07PM +0300, Manos Pitsidianakis wrote: > Hello Anthony, > > I do know about that, in fact I used it and it did not output your > email. Here's what the `get_maintainer.pl` outputs: (same output for > all patches): > > $ ./scripts/get_maintainer.pl --no-l > ../../patc

Re: [PATCH] xen/vPCI: Remove shadowed variable

2024-04-11 Thread Roger Pau Monné
On Wed, Apr 10, 2024 at 08:33:48PM +0100, Andrew Cooper wrote: > Resolves a MISRA R5.3 violation. > > Fixes: 622bdd962822 ("vpci/header: handle p2m range sets per BAR") > Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné Thanks!

Re: [PATCH v2 3/4] xen/virtual-region: Link the list build time

2024-04-11 Thread Andrew Cooper
On 11/04/2024 7:34 am, Michal Orzel wrote: > Hi Andrew, > > On 10/04/2024 20:42, Andrew Cooper wrote: >> diff --git a/xen/common/virtual_region.c b/xen/common/virtual_region.c >> index 7d8bdeb61282..db3e0dc9fe74 100644 >> --- a/xen/common/virtual_region.c >> +++ b/xen/common/virtual_region.c >> @@

Re: [PATCH v2 2/4] xen/virtual-region: Rework how bugframe linkage works

2024-04-11 Thread Andrew Cooper
On 11/04/2024 7:20 am, Michal Orzel wrote: > Hi Andrew, > > On 10/04/2024 20:42, Andrew Cooper wrote: >> >> The start/stop1/etc linkage scheme predates struct virtual_region, and as >> setup_virtual_regions() shows, it's awkward to express in the new scheme. >> >> Change the linker to provide expli

Re: [RFC PATCH v1 0/2] convert LIBXL_DEVICE_MODEL_START_TIMEOUT to env var

2024-04-11 Thread Manos Pitsidianakis
On Wed, 10 Apr 2024 at 18:53, Anthony PERARD wrote: > > On Wed, Apr 10, 2024 at 02:43:13PM +0300, Manos Pitsidianakis wrote: > > This patch series proposes converting the compile-time define > > LIBXL_DEVICE_MODEL_START_TIMEOUT value to an optionally overridden by > > environment variable value, j

[ovmf test] 185309: all pass - PUSHED

2024-04-11 Thread osstest service owner
flight 185309 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/185309/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 98f150a954b35cc74bd87ae355cf35d8c9e1580d baseline version: ovmf 963671d3801a6992d1aa0

Re: [PATCH v2 12/13] xen/device_tree: Introduce function to merge overlapping intervals

2024-04-11 Thread Luca Fancellu
> On 9 Apr 2024, at 12:45, Luca Fancellu wrote: > > Introduce a function that given an array of cells containing > (address,size) intervals, merges the overlapping ones, returning > an array with no overlapping intervals. > > The algorithm needs to sort the intervals by ascending order > addre

[xen-unstable test] 185294: regressions - FAIL

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

Re: [PATCH v1 0/2] Starting AMD SEV work

2024-04-11 Thread Andrei Semenov
Yes, actually a PSP device and all its interfaces come as unique PCI device (one BDF). So, yes we will need to export other interfaces as a paravirtualized operations for dom0. Actual PSP design feet very well for KVM, but for "type 1" hypervisors it oblige to export all other potential PSP inter

Re: [XEN PATCH v1 4/5] xen/arm: allow dynamically assigned SGI handlers

2024-04-11 Thread Jens Wiklander
Hi Michal, On Thu, Apr 11, 2024 at 8:44 AM Michal Orzel wrote: > > Hi Jens, > > On 11/04/2024 08:12, Jens Wiklander wrote: > > > > > > Hi Michal, > > > > On Wed, Apr 10, 2024 at 3:24 PM Michal Orzel wrote: > >> > >> Hi Jens, > >> > >> On 09/04/2024 17:36, Jens Wiklander wrote: > >>> > >>> > >>>