Re: [PATCH 15/20] tools/xenstore: make domain_is_unprivileged() an inline function

2022-12-12 Thread Juergen Gross
On 01.12.22 23:05, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: clang is complaining about a NULL dereference for constructs like:    domain_is_unprivileged(conn) ? conn->in : NULL I have just build xenstored with clang 11 and didn't get a complain. So can you

Re: [PATCH 13/20] tools/xenstore: don't allow creating too many nodes in a transaction

2022-12-12 Thread Juergen Gross
On 01.12.22 20:25, Julien Grall wrote: Hi Juergen, On 08/11/2022 08:09, Juergen Gross wrote: On 07.11.22 19:37, Julien Grall wrote: On 07/11/2022 08:34, Juergen Gross wrote: On 06.11.22 23:00, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: The accounting for the

Re: [PATCH linux-next v2] x86/xen/time: prefer tsc as clocksource when it is invariant

2022-12-12 Thread Jan Beulich
On 12.12.2022 23:05, Krister Johansen wrote: > On Mon, Dec 12, 2022 at 05:46:29PM +0100, Jan Beulich wrote: >> On 12.12.2022 17:05, Krister Johansen wrote: >>> Both the Intel SDM[4] and the Xen tsc documentation explain that marking >>> a tsc as invariant means that it should be considered stable

Need help with xen boot time

2022-12-12 Thread Talabattula, Viswa Krishna Raveendra
[AMD Official Use Only - General] Hi All, I am Raveendra .Currently I am working on xen hypervisor with Ubuntu 22.04 .Compared to Native ubuntu kernel ,dom0 with xen is taking around 1.8s more to boot. I used system-analyze tool for calculating boot time. Can any body publish the boot time of

Re: [PATCH] Relocate the ESRT when booting via multiboot2

2022-12-12 Thread Jan Beulich
On 12.12.2022 23:58, Demi Marie Obenour wrote: > On Mon, Dec 12, 2022 at 04:19:21PM +0100, Jan Beulich wrote: >> On 09.12.2022 01:52, Demi Marie Obenour wrote: >>> This was missed in the initial patchset. >>> >>> Signed-off-by: Demi Marie Obenour >> >> It looks as if, besides ... >> >>> ---

Re: [PATCH 11/20] tools/xenstore: move changed domain handling

2022-12-12 Thread Juergen Gross
On 13.12.22 07:53, Juergen Gross wrote: On 01.12.22 22:58, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote:   static bool check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) @@ -492,8 +504,12 @@ static struct domain *find_or_alloc_existing_domain(unsigned

Re: [PATCH 11/20] tools/xenstore: move changed domain handling

2022-12-12 Thread Juergen Gross
On 01.12.22 22:58, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote:   static bool check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) @@ -492,8 +504,12 @@ static struct domain *find_or_alloc_existing_domain(unsigned int domid)   xc_dominfo_t dominfo;    

Re: [PATCH 10/20] tools/xenstore: replace watch->relative_path with a prefix length

2022-12-12 Thread Juergen Gross
On 01.12.22 22:51, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: @@ -324,8 +312,7 @@ const char *dump_state_watches(FILE *fp, struct connection *conn,   head.length = sizeof(sw);   sw.conn_id = conn_id; -    path = get_watch_path(watch,

[xen-4.16-testing test] 175155: tolerable FAIL - PUSHED

2022-12-12 Thread osstest service owner
flight 175155 xen-4.16-testing real [real] flight 175160 xen-4.16-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/175155/ http://logs.test-lab.xenproject.org/osstest/logs/175160/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

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

2022-12-12 Thread osstest service owner
flight 175156 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175156/ 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: [PATCH v3 18/18] xen/arm64: mm: Rework switch_ttbr()

2022-12-12 Thread Stefano Stabellini
On Mon, 12 Dec 2022, Julien Grall wrote: > From: Julien Grall > > At the moment, switch_ttbr() is switching the TTBR whilst the MMU is > still on. > > Switching TTBR is like replacing existing mappings with new ones. So > we need to follow the break-before-make sequence. > > In this case, it

Re: [PATCH v3 17/18] xen/arm: linker: The identitymap check should cover the whole .text.header

2022-12-12 Thread Stefano Stabellini
On Mon, 12 Dec 2022, Julien Grall wrote: > From: Julien Grall > > At the moment, we are only checking that only some part of .text.header > is part of the identity mapping. However, this doesn't take into account > the litteral pool which will be located at the end of the section. ^

Re: [PATCH v3 16/18] xen/arm: linker: Indent correctly _stext

2022-12-12 Thread Stefano Stabellini
On Mon, 12 Dec 2022, Julien Grall wrote: > From: Julien Grall > > _stext is indented by one space more compare to the lines. This doesn't > seem warrant, so delete the extra space. > > Signed-off: Julien Grall Acked-by: Stefano Stabellini > --- > Changes in v3: > - Patch added

Re: [PATCH v3 15/18] xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping

2022-12-12 Thread Stefano Stabellini
On Mon, 12 Dec 2022, Julien Grall wrote: > From: Julien Grall > > In follow-up patches we will need to have part of Xen identity mapped in > order to safely switch the TTBR. > > On some platform, the identity mapping may have to start at 0. If we always > keep the identity region mapped, NULL

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

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

Re: [PATCH v3 14/18] xen/arm: mm: Allow dump_hyp_walk() to work on the current root table

2022-12-12 Thread Stefano Stabellini
On Mon, 12 Dec 2022, Julien Grall wrote: > From: Julien Grall > > dump_hyp_walk() is used to print the tables walk in case of the data or > instruction abort. > > Those abort are not limited to the runtime and could happen at early > boot. However, the current implementation of dump_hyp_walk()

Re: [PATCH v3 13/18] xen/arm: mm: Allow xen_pt_update() to work with the current root table

2022-12-12 Thread Stefano Stabellini
On Mon, 12 Dec 2022, Julien Grall wrote: > From: Julien Grall > > At the moment, xen_pt_update() will only work on the runtime page tables. > In follow-up patches, we will also want to use the helper to update > the boot page tables. > > All the existing callers of xen_pt_update() expects to

Re: [PATCH v3 12/18] xen/arm64: Rework the memory layout

2022-12-12 Thread Stefano Stabellini
On Mon, 12 Dec 2022, Julien Grall wrote: > From: Julien Grall > > Xen is currently not fully compliant with the Arm Arm because it will > switch the TTBR with the MMU on. > > In order to be compliant, we need to disable the MMU before > switching the TTBR. The implication is the page-tables

[xen-unstable test] 175154: regressions - FAIL

2022-12-12 Thread osstest service owner
flight 175154 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/175154/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-livepatch 8 xen-boot fail REGR. vs. 175144

Re: [PATCH v3 11/18] xen/arm: Enable use of dump_pt_walk() early during boot

2022-12-12 Thread Stefano Stabellini
On Mon, 12 Dec 2022, Julien Grall wrote: > From: Julien Grall > > At the moment, dump_pt_walk() is using map_domain_page() to map > the page tables. > > map_domain_page() is only usuable after init_domheap_mappings() is called > (arm32) or the xenheap has been initialized (arm64). > > This

Re: [PATCH v3 07/18] xen/arm32: head: Jump to the runtime mapping in enable_mmu()

2022-12-12 Thread Stefano Stabellini
On Mon, 12 Dec 2022, Julien Grall wrote: > From: Julien Grall > > At the moment, enable_mmu() will return to an address in the 1:1 mapping > and each path is responsible to switch to the runtime mapping. > > In a follow-up patch, the behavior to switch to the runtime mapping > will become more

Re: [PATCH v3 06/18] xen/arm32: head: Replace "ldr rX, =" with "mov_w rX, "

2022-12-12 Thread Stefano Stabellini
On Mon, 12 Dec 2022, Julien Grall wrote: > From: Julien Grall > > "ldr rX, =" is used to load a value from the literal pool. This > implies a memory access. > > This can be avoided by using the macro mov_w which encode the value in > the immediate of two instructions. > > So replace all "ldr

[linux-linus test] 175153: regressions - FAIL

2022-12-12 Thread osstest service owner
flight 175153 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/175153/ 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

Re: [PATCH] Relocate the ESRT when booting via multiboot2

2022-12-12 Thread Demi Marie Obenour
On Mon, Dec 12, 2022 at 04:19:21PM +0100, Jan Beulich wrote: > On 09.12.2022 01:52, Demi Marie Obenour wrote: > > This was missed in the initial patchset. > > > > Signed-off-by: Demi Marie Obenour > > It looks as if, besides ... > > > --- a/xen/arch/x86/efi/efi-boot.h > > +++

Re: Porting Xen in raspberry pi4B

2022-12-12 Thread Stefano Stabellini
Hi Vipul, I am online on IRC OFTC #xendevel (https://www.oftc.net/, you need a registered nickname to join #xendevel). For development and debugging I find that it is a lot easier to crosscompile the kernel "by hand", and do a monolithic build, rather than going through Yocto. For instance the

Re: [PATCH linux-next v2] x86/xen/time: prefer tsc as clocksource when it is invariant

2022-12-12 Thread Krister Johansen
On Mon, Dec 12, 2022 at 01:48:24PM -0500, Boris Ostrovsky wrote: > > On 12/12/22 11:05 AM, Krister Johansen wrote: > > > > diff --git a/arch/x86/include/asm/xen/cpuid.h > > b/arch/x86/include/asm/xen/cpuid.h > > index 6daa9b0c8d11..d9d7432481e9 100644 > > --- a/arch/x86/include/asm/xen/cpuid.h

Re: [PATCH linux-next v2] x86/xen/time: prefer tsc as clocksource when it is invariant

2022-12-12 Thread Krister Johansen
On Mon, Dec 12, 2022 at 05:46:29PM +0100, Jan Beulich wrote: > On 12.12.2022 17:05, Krister Johansen wrote: > > Both the Intel SDM[4] and the Xen tsc documentation explain that marking > > a tsc as invariant means that it should be considered stable by the OS > > and is elibile to be used as a

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

2022-12-12 Thread Stefano Stabellini
On Sat, 10 Dec 2022, Henry Wang wrote: > Hi both, > > I was lurking around to see how the discussion would go. Thanks for the > discussions/inputs in this thread :) > > > -Original Message- > > From: Stefano Stabellini > > Subject: Re: [PATCH 1/3] xen/arm: Add memory overlap check for

Re: [GIT PULL] xen: branch for v6.2-rc1

2022-12-12 Thread pr-tracker-bot
The pull request you sent on Mon, 12 Dec 2022 07:24:30 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git > for-linus-6.2-rc1-tag has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/e6b160bc4daa1227695ef807e11097a3e9934d66 Thank you! -- Deet-doot-dot, I

Re: [XEN v1] xen/Arm: Probe the entry point address of an uImage correctly

2022-12-12 Thread Julien Grall
On 12/12/2022 19:04, Ayan Kumar Halder wrote: On 09/12/2022 19:19, Julien Grall wrote: Hi Ayan, Hi Julien, Hi, I checked with the Zephyr mantainers. Their response is provided [1]. Thanks for checking. On 09/12/2022 19:10, Ayan Kumar Halder wrote: zImage and Image are image

Re: [XEN v1] xen/Arm: Probe the entry point address of an uImage correctly

2022-12-12 Thread Ayan Kumar Halder
On 09/12/2022 19:19, Julien Grall wrote: Hi Ayan, Hi Julien, I checked with the Zephyr mantainers. Their response is provided [1]. On 09/12/2022 19:10, Ayan Kumar Halder wrote: zImage and Image are image protocols, uImage is not. It is just a legacy u-boot header (no requirements \wrt

Re: [PATCH linux-next v2] x86/xen/time: prefer tsc as clocksource when it is invariant

2022-12-12 Thread Boris Ostrovsky
On 12/12/22 11:05 AM, Krister Johansen wrote: diff --git a/arch/x86/include/asm/xen/cpuid.h b/arch/x86/include/asm/xen/cpuid.h index 6daa9b0c8d11..d9d7432481e9 100644 --- a/arch/x86/include/asm/xen/cpuid.h +++ b/arch/x86/include/asm/xen/cpuid.h @@ -88,6 +88,12 @@ * EDX: shift

[PATCH v2] drivers/xen/hypervisor: Expose Xen SIF flags to userspace

2022-12-12 Thread Per Bilse
/proc/xen is a legacy pseudo filesystem which predates Xen support getting merged into Linux. It has largely been replaced with more normal locations for data (/sys/hypervisor/ for info, /dev/xen/ for user devices). We want to compile xenfs support out of the dom0 kernel. There is one item

Re: [PATCH 3/3] x86/pci: Fix racy accesses to MSI-X Control register

2022-12-12 Thread Jan Beulich
On 10.11.2022 17:59, David Vrabel wrote: > Concurrent access the the MSI-X control register are not serialized > with a suitable lock. For example, in msix_capability_init() access > use the pcidevs_lock() but some calls to msi_set_mask_bit() use the > interrupt descriptor lock. > > This can lead

Re: [PATCH linux-next v2] x86/xen/time: prefer tsc as clocksource when it is invariant

2022-12-12 Thread Jan Beulich
On 12.12.2022 17:05, Krister Johansen wrote: > Kvm elects to use tsc instead of kvm-clock when it can detect that the > TSC is invariant. > > (As of commit 7539b174aef4 ("x86: kvmguest: use TSC clocksource if > invariant TSC is exposed")). > > Notable cloud vendors[1] and performance

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

2022-12-12 Thread Oleksandr Tyshchenko
On Mon, Dec 12, 2022 at 12:10 PM Viresh Kumar wrote: Hello Viresh [sorry for the possible format issues] 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

Re: [PATCH 2/2] x86/ucode: load microcode earlier on boot CPU

2022-12-12 Thread Jan Beulich
On 08.12.2022 14:26, Sergey Dyasli wrote: > --- a/xen/arch/x86/cpu/microcode/core.c > +++ b/xen/arch/x86/cpu/microcode/core.c > @@ -198,7 +198,7 @@ void __init microcode_scan_module( > bootstrap_map(NULL); > } > } > -void __init microcode_grab_module( > +static void __init

Re: [PATCH] xen/arm: smmuv3: remove unused function

2022-12-12 Thread Rahul Singh
Hi Julien, > On 12 Dec 2022, at 4:07 pm, Julien Grall wrote: > > Hi Stewart, > > On 12/12/2022 16:00, Stewart Hildebrand wrote: >> When building with clang 12 and CONFIG_ARM_SMMU_V3=y, we observe the >> following build error: >> drivers/passthrough/arm/smmu-v3.c:1408:20: error: unused function

Re: [PATCH] xen/arm: smmuv3: remove unused function

2022-12-12 Thread Julien Grall
Hi Stewart, On 12/12/2022 16:00, Stewart Hildebrand wrote: When building with clang 12 and CONFIG_ARM_SMMU_V3=y, we observe the following build error: drivers/passthrough/arm/smmu-v3.c:1408:20: error: unused function 'arm_smmu_disable_pasid' [-Werror,-Wunused-function] static inline void

[PATCH linux-next v2] x86/xen/time: prefer tsc as clocksource when it is invariant

2022-12-12 Thread Krister Johansen
Kvm elects to use tsc instead of kvm-clock when it can detect that the TSC is invariant. (As of commit 7539b174aef4 ("x86: kvmguest: use TSC clocksource if invariant TSC is exposed")). Notable cloud vendors[1] and performance engineers[2] recommend that Xen users preferentially select tsc over

Re: [PATCH 1/2] x86/ucode: allow cpu_request_microcode() to skip memory allocation

2022-12-12 Thread Jan Beulich
On 12.12.2022 16:18, Andrew Cooper wrote: > On 12/12/2022 14:59, Jan Beulich wrote: >> On 12.12.2022 15:27, Sergey Dyasli wrote: >>> On Thu, Dec 8, 2022 at 3:34 PM Jan Beulich wrote: On 08.12.2022 14:59, Andrew Cooper wrote: > On 08/12/2022 13:26, Sergey Dyasli wrote: >> @@ -240,20

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

2022-12-12 Thread Anthony PERARD
On Mon, Dec 12, 2022 at 03:35:55PM +0530, Viresh Kumar wrote: > This patch updates xl.cfg man page with details of generic Virtio device > related information. > > Signed-off-by: Viresh Kumar Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

[PATCH] xen/arm: smmuv3: remove unused function

2022-12-12 Thread Stewart Hildebrand
When building with clang 12 and CONFIG_ARM_SMMU_V3=y, we observe the following build error: drivers/passthrough/arm/smmu-v3.c:1408:20: error: unused function 'arm_smmu_disable_pasid' [-Werror,-Wunused-function] static inline void arm_smmu_disable_pasid(struct arm_smmu_master *master) { }

Re: [PATCH linux-next] x86/xen/time: prefer tsc as clocksource when it is invariant

2022-12-12 Thread Krister Johansen
On Fri, Dec 09, 2022 at 02:32:15PM -0500, Boris Ostrovsky wrote: > > On 12/8/22 11:36 AM, Krister Johansen wrote: > > + /* > > +* As Dom0 is never moved, no penalty on using TSC there. > > +* > > +* If the guest has invariant tsc, then set xen_clocksource rating > > +* below

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

2022-12-12 Thread Anthony PERARD
On Mon, Dec 12, 2022 at 03:35:54PM +0530, Viresh Kumar wrote: > diff --git a/tools/ocaml/libs/xl/genwrap.py b/tools/ocaml/libs/xl/genwrap.py > index 7bf26bdcd831..b188104299b1 100644 > --- a/tools/ocaml/libs/xl/genwrap.py > +++ b/tools/ocaml/libs/xl/genwrap.py > @@ -36,6 +36,7 @@ DEVICE_LIST =

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

2022-12-12 Thread Anthony PERARD
On Mon, Dec 12, 2022 at 03:35:53PM +0530, Viresh Kumar wrote: > 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 =

Re: [PATCH 1/2] x86/ucode: allow cpu_request_microcode() to skip memory allocation

2022-12-12 Thread Jan Beulich
On 08.12.2022 14:26, Sergey Dyasli wrote: > @@ -648,7 +648,7 @@ static long cf_check microcode_update_helper(void *data) > * this requirement can be relaxed in the future. Right now, this is > * conservative and good. > */ > -ret = stop_machine_run(do_microcode_update,

Re: [PATCH] Relocate the ESRT when booting via multiboot2

2022-12-12 Thread Jan Beulich
On 09.12.2022 01:52, Demi Marie Obenour wrote: > This was missed in the initial patchset. > > Signed-off-by: Demi Marie Obenour It looks as if, besides ... > --- a/xen/arch/x86/efi/efi-boot.h > +++ b/xen/arch/x86/efi/efi-boot.h > @@ -818,6 +818,8 @@ void __init efi_multiboot2(EFI_HANDLE

Re: [PATCH 1/2] x86/ucode: allow cpu_request_microcode() to skip memory allocation

2022-12-12 Thread Andrew Cooper
On 12/12/2022 14:59, Jan Beulich wrote: > On 12.12.2022 15:27, Sergey Dyasli wrote: >> On Thu, Dec 8, 2022 at 3:34 PM Jan Beulich wrote: >>> On 08.12.2022 14:59, Andrew Cooper wrote: On 08/12/2022 13:26, Sergey Dyasli wrote: > @@ -240,20 +240,20 @@ static const struct microcode_patch

Re: [PATCH 1/2] x86/ucode: allow cpu_request_microcode() to skip memory allocation

2022-12-12 Thread Jan Beulich
On 12.12.2022 15:27, Sergey Dyasli wrote: > On Thu, Dec 8, 2022 at 3:34 PM Jan Beulich wrote: >> On 08.12.2022 14:59, Andrew Cooper wrote: >>> On 08/12/2022 13:26, Sergey Dyasli wrote: @@ -240,20 +240,20 @@ static const struct microcode_patch *nmi_patch = ZERO_BLOCK_PTR; * patch

Re: [PATCH 1/2] x86/ucode: allow cpu_request_microcode() to skip memory allocation

2022-12-12 Thread Sergey Dyasli
On Thu, Dec 8, 2022 at 3:34 PM Jan Beulich wrote: > > On 08.12.2022 14:59, Andrew Cooper wrote: > > On 08/12/2022 13:26, Sergey Dyasli wrote: > >> @@ -240,20 +240,20 @@ static const struct microcode_patch *nmi_patch = > >> ZERO_BLOCK_PTR; > >> * patch is found and an error occurs during the

Re: [PATCH 2/8] docs/process: branching-checklist: Remove reference to qemu-ijw.git

2022-12-12 Thread Ian Jackson
Julien Grall writes ("[PATCH 2/8] docs/process: branching-checklist: Remove reference to qemu-ijw.git"): > From: Julien Grall > > Per [1], qemu-iwj.git was a clone of QEMU traditional on Ian's computer > for tagging QEMU trad. > > The next section will provide tag for the official tree. So

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

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

[linux-linus test] 175150: regressions - FAIL

2022-12-12 Thread osstest service owner
flight 175150 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/175150/ 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

Re: [PATCH] drivers/xen/hypervisor: Expose Xen SIF flags to userspace

2022-12-12 Thread Per Bilse
On 09/12/2022 09:04, Juergen Gross wrote: > On 02.12.22 19:22, Per Bilse wrote: >> +Description:    If running under Xen: >> +    All bits in Xen's start-flags are represented as >> +    boolean files, returning '1' if set, '0' otherwise. > > I think at least the files which want to be

Re: [PATCH v2] hvc/xen: prevent concurrent accesses to the shared ring

2022-12-12 Thread Roger Pau Monné
Hello, Gentle ping regarding the locking question below. Thanks, Roger. On Fri, Dec 02, 2022 at 12:40:05PM +0100, Roger Pau Monné wrote: > On Wed, Nov 30, 2022 at 05:08:06PM -0800, Stefano Stabellini wrote: > > On Wed, 30 Nov 2022, Roger Pau Monne wrote: > > > The hvc machinery registers both a

Re: [PATCH 7/8] docs/proces: branching-checklist: Update the section "add to patchbot"

2022-12-12 Thread George Dunlap
On Mon, Dec 12, 2022 at 9:34 AM Julien Grall wrote: > From: Julien Grall > > Make clear the patchbot is accessible from the user "xen" on xenbits. > > Signed-off-by: Julien Grall > Acked-by: George Dunlap

Re: [PATCH 6/8] docs/process: branching-checklist: Remove section about the cambridge colo

2022-12-12 Thread George Dunlap
On Mon, Dec 12, 2022 at 9:34 AM Julien Grall wrote: > From: Julien Grall > > The cambridge colo was internal to Citrix (now Cloud) and hasn't been used > by the community for a while. > > So remove the section. > > Signed-off-by: Julien Grall > Acked-by: George Dunlap

Re: [PATCH 5/8] docs/process: branching-checklist: Reword the section about Config.mk

2022-12-12 Thread George Dunlap
On Mon, Dec 12, 2022 at 9:34 AM Julien Grall wrote: > From: Julien Grall > > Since at least Xen 4.12, the revision for external trees don't contain > the word "unstable". So explicitely list the *_REVISION variables that > need to be updated as part of the branching process. > > Signed-off-by:

Re: [PATCH 08/20] tools/xenstore: add hashlist for finding struct domain by domid

2022-12-12 Thread Juergen Gross
On 01.12.22 22:34, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: @@ -341,49 +339,56 @@ static bool get_domain_info(unsigned int domid, xc_dominfo_t *dominfo) dominfo->domid == domid;   } -void check_domains(void) +static int check_domain(void *k, void

Re: [PATCH 08/20] tools/xenstore: add hashlist for finding struct domain by domid

2022-12-12 Thread Julien Grall
Hi Juergen, On 12/12/2022 12:08, Juergen Gross wrote: On 01.12.22 22:34, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: @@ -341,49 +339,56 @@ static bool get_domain_info(unsigned int domid, xc_dominfo_t *dominfo) dominfo->domid == domid;   } -void

Re: [PATCH 3/8] docs/process: branching-checklist: Remove reference to root

2022-12-12 Thread George Dunlap
On Mon, Dec 12, 2022 at 9:34 AM Julien Grall wrote: > From: Julien Grall > > The steps to generate the documentation for the new branch requires > to ssh as root and then su to run with the user xendocs. > > The release technician may not (and should not) have access to root. > So update the

Re: [PATCH 2/8] docs/process: branching-checklist: Remove reference to qemu-ijw.git

2022-12-12 Thread George Dunlap
On Mon, Dec 12, 2022 at 9:34 AM Julien Grall wrote: > From: Julien Grall > > Per [1], qemu-iwj.git was a clone of QEMU traditional on Ian's computer > for tagging QEMU trad. > > The next section will provide tag for the official tree. So remove > the section about qemu-ijw.git. > > [1]

Re: [PATCH 08/20] tools/xenstore: add hashlist for finding struct domain by domid

2022-12-12 Thread Juergen Gross
On 01.12.22 22:34, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: @@ -341,49 +339,56 @@ static bool get_domain_info(unsigned int domid, xc_dominfo_t *dominfo) dominfo->domid == domid;   } -void check_domains(void) +static int check_domain(void *k, void

Re: [PATCH 1/8] docs/process: branching-checklist: Use consistent indentation

2022-12-12 Thread George Dunlap
On Mon, Dec 12, 2022 at 9:34 AM Julien Grall wrote: > From: Julien Grall > > At the moment, branch-checklist.txt is using a mix of soft and hard > tab. They are both meant to be represented using 8 characters. > > In Xen we tend to use 4-space softtab represented with 4 characters. So > to

Re: [PATCH] libxl: abort on memory allocation errors

2022-12-12 Thread Anthony PERARD
On Sun, Dec 11, 2022 at 06:59:49PM +0100, Marek Marczykowski-Górecki wrote: > Use abort() instead of just _exit() in libxl__alloc_failed(). This > is more friendly for debugging, as it will trap into debugger, > systemd-coredump will collect coredump/backtrace etc. It's much more > useful than

Re: [PATCH] xsm/flask: mkflash.sh: Use const when generating initial_sid_to_string[]

2022-12-12 Thread Daniel P. Smith
On 12/12/22 04:36, Julien Grall wrote: From: Julien Grall The array initial_sid_to_string is storing pointer to literal strings and is not meant to be modified. So change the type of the variable to "const char * const ...[]". Signed-off-by: Julien Grall --- xen/xsm/flask/policy/mkflask.sh

RE: [PATCH] xen/arm: Reduce redundant clear root pages when teardown p2m

2022-12-12 Thread Henry Wang
Hi Julien, > -Original Message- > From: Julien Grall > Subject: Re: [PATCH] xen/arm: Reduce redundant clear root pages when > teardown p2m > > Hi Henry, > > > PROGRESS(p2m): > > +/* > > + * We are about to free the intermediate page-tables, so clear the > > +

Re: [PATCH] xen/arm: Reduce redundant clear root pages when teardown p2m

2022-12-12 Thread Julien Grall
Hi Henry, On 12/12/2022 06:41, Henry Wang wrote: Currently, p2m for a domain will be teardown from two paths: (1) The normal path when a domain is destroyed. (2) The arch_domain_destroy() in the failure path of domain creation. When tearing down p2m from (1), the part to clear and clean the

Re: [PATCH] x86/SVM: restrict hardware SSBD update upon guest VIRT_SPEC_CTRL write

2022-12-12 Thread Roger Pau Monné
On Fri, Dec 09, 2022 at 11:11:29AM +0100, Jan Beulich wrote: > On 09.12.2022 10:59, Roger Pau Monné wrote: > > On Thu, Dec 08, 2022 at 12:24:54PM +0100, Jan Beulich wrote: > >> --- a/xen/arch/x86/msr.c > >> +++ b/xen/arch/x86/msr.c > >> @@ -699,12 +699,16 @@ int guest_wrmsr(struct vcpu *v,

[PATCH v3 12/18] xen/arm64: Rework the memory layout

2022-12-12 Thread Julien Grall
From: Julien Grall Xen is currently not fully compliant with the Arm Arm because it will switch the TTBR with the MMU on. In order to be compliant, we need to disable the MMU before switching the TTBR. The implication is the page-tables should contain an identity mapping of the code switching

[PATCH v3 14/18] xen/arm: mm: Allow dump_hyp_walk() to work on the current root table

2022-12-12 Thread Julien Grall
From: Julien Grall dump_hyp_walk() is used to print the tables walk in case of the data or instruction abort. Those abort are not limited to the runtime and could happen at early boot. However, the current implementation of dump_hyp_walk() check that the TTBR matches the runtime page tables.

[PATCH v3 15/18] xen/arm64: mm: Introduce helpers to prepare/enable/disable the identity mapping

2022-12-12 Thread Julien Grall
From: Julien Grall In follow-up patches we will need to have part of Xen identity mapped in order to safely switch the TTBR. On some platform, the identity mapping may have to start at 0. If we always keep the identity region mapped, NULL pointer dereference would lead to access to valid

[PATCH v3 17/18] xen/arm: linker: The identitymap check should cover the whole .text.header

2022-12-12 Thread Julien Grall
From: Julien Grall At the moment, we are only checking that only some part of .text.header is part of the identity mapping. However, this doesn't take into account the litteral pool which will be located at the end of the section. While we could try to avoid using a literal pool, in the near

[PATCH v3 11/18] xen/arm: Enable use of dump_pt_walk() early during boot

2022-12-12 Thread Julien Grall
From: Julien Grall At the moment, dump_pt_walk() is using map_domain_page() to map the page tables. map_domain_page() is only usuable after init_domheap_mappings() is called (arm32) or the xenheap has been initialized (arm64). This means it can be hard to diagnose incorrect page-tables during

[PATCH v3 16/18] xen/arm: linker: Indent correctly _stext

2022-12-12 Thread Julien Grall
From: Julien Grall _stext is indented by one space more compare to the lines. This doesn't seem warrant, so delete the extra space. Signed-off: Julien Grall --- Changes in v3: - Patch added --- xen/arch/arm/xen.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v3 18/18] xen/arm64: mm: Rework switch_ttbr()

2022-12-12 Thread Julien Grall
From: Julien Grall At the moment, switch_ttbr() is switching the TTBR whilst the MMU is still on. Switching TTBR is like replacing existing mappings with new ones. So we need to follow the break-before-make sequence. In this case, it means the MMU needs to be switched off while the TTBR is

[PATCH v3 10/18] xen/arm32: head: Widen the use of the temporary mapping

2022-12-12 Thread Julien Grall
From: Julien Grall At the moment, the temporary mapping is only used when the virtual runtime region of Xen is clashing with the physical region. In follow-up patches, we will rework how secondary CPU bring-up works and it will be convenient to use the fixmap area for accessing the root

[PATCH v3 13/18] xen/arm: mm: Allow xen_pt_update() to work with the current root table

2022-12-12 Thread Julien Grall
From: Julien Grall At the moment, xen_pt_update() will only work on the runtime page tables. In follow-up patches, we will also want to use the helper to update the boot page tables. All the existing callers of xen_pt_update() expects to modify the current page-tables. Therefore, we can read

Re: [PATCH v2-ish] x86/boot: Relocate Xen using memcpy() directly

2022-12-12 Thread Jan Beulich
On 09.12.2022 22:42, Andrew Cooper wrote: > We can relocate Xen by reading out of the virtual mapping that we're executing > on, and write directly into the directmap. In fact, this removes one > dependency on Xen being "at 0" (the XEN_IMG_OFFSET passed as src) for > relocation to occur. > >

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

2022-12-12 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/xl/xl_parse.c| 81

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

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

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

2022-12-12 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 | 33 + 1 file changed, 33 insertions(+) diff --git a/docs/man/xl.cfg.5.pod.in b/docs/man/xl.cfg.5.pod.in index

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

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

Re: [PATCH 0/8] docs/process: branching-checklist: Update it

2022-12-12 Thread Jan Beulich
On 12.12.2022 10:49, Henry Wang wrote: >> -Original Message- >> From: Julien Grall >> Subject: [PATCH 0/8] docs/process: branching-checklist: Update it >> >> From: Julien Grall >> >> This is a collection of improvement for the branching checklist. > > Thanks for this work! Since from

[PATCH v3 07/18] xen/arm32: head: Jump to the runtime mapping in enable_mmu()

2022-12-12 Thread Julien Grall
From: Julien Grall At the moment, enable_mmu() will return to an address in the 1:1 mapping and each path is responsible to switch to the runtime mapping. In a follow-up patch, the behavior to switch to the runtime mapping will become more complex. So to avoid more code/comment duplication,

[PATCH v3 09/18] xen/arm32: head: Remove restriction where to load Xen

2022-12-12 Thread Julien Grall
From: Julien Grall At the moment, bootloaders can load Xen anywhere in memory but the region 2MB - 4MB. While I am not aware of any issue, we have no way to tell the bootloader to avoid that region. In addition to that, in the future, Xen may grow over 2MB if we enable feature like UBSAN or

[PATCH v3 05/18] xen/arm: Clean-up the memory layout

2022-12-12 Thread Julien Grall
From: Julien Grall In a follow-up patch, the base address for the common mappings will vary between arm32 and arm64. To avoid any duplication, define every mapping in the common region from the previous one. Take the opportunity to: * add missing *_SIZE for FIXMAP_VIRT_* and XEN_VIRT_*

[PATCH v3 06/18] xen/arm32: head: Replace "ldr rX, =" with "mov_w rX, "

2022-12-12 Thread Julien Grall
From: Julien Grall "ldr rX, =" is used to load a value from the literal pool. This implies a memory access. This can be avoided by using the macro mov_w which encode the value in the immediate of two instructions. So replace all "ldr rX, =" with "mov_w rX, ". No functional changes intended.

[PATCH v3 03/18] xen/arm32: flushtlb: Reduce scope of barrier for local TLB flush

2022-12-12 Thread Julien Grall
From: Julien Grall Per G5-9224 in ARM DDI 0487I.a: "A DSB NSH is sufficient to ensure completion of TLB maintenance instructions that apply to a single PE. A DSB ISH is sufficient to ensure completion of TLB maintenance instructions that apply to PEs in the same Inner Shareable domain. "

[PATCH v3 08/18] xen/arm32: head: Introduce an helper to flush the TLBs

2022-12-12 Thread Julien Grall
From: Julien Grall The sequence for flushing the TLBs is 4 instruction long and often requires an explanation how it works. So create an helper and use it in the boot code (switch_ttbr() is left alone for now). Note that in secondary_switched, we were also flushing the instruction cache and

[PATCH v3 04/18] xen/arm: flushtlb: Reduce scope of barrier for the TLB range flush

2022-12-12 Thread Julien Grall
From: Julien Grall At the moment, flush_xen_tlb_range_va{,_local}() are using system wide memory barrier. This is quite expensive and unnecessary. For the local version, a non-shareable barrier is sufficient. For the SMP version, a inner-shareable barrier is sufficient. Furthermore, the

[PATCH v3 02/18] xen/arm64: flushtlb: Implement the TLBI repeat workaround for TLB flush by VA

2022-12-12 Thread Julien Grall
From: Julien Grall Looking at the Neoverse N1 errata document, it is not clear to me why the TLBI repeat workaround is not applied for TLB flush by VA. The TBL flush by VA helpers are used in flush_xen_tlb_range_va_local() and flush_xen_tlb_range_va(). So if the range size if a fixed size

[PATCH v3 01/18] xen/arm64: flushtlb: Reduce scope of barrier for local TLB flush

2022-12-12 Thread Julien Grall
From: Julien Grall Per D5-4929 in ARM DDI 0487H.a: "A DSB NSH is sufficient to ensure completion of TLB maintenance instructions that apply to a single PE. A DSB ISH is sufficient to ensure completion of TLB maintenance instructions that apply to PEs in the same Inner Shareable domain. "

[PATCH v3 00/18] xen/arm: Don't switch TTBR while the MMU is on

2022-12-12 Thread Julien Grall
From: Julien Grall Hi all, Currently, Xen on Arm will switch TTBR whilst the MMU is on. This is similar to replacing existing mappings with new ones. So we need to follow a break-before-make sequence. When switching the TTBR, we need to temporary disable the MMU before updating the TTBR. This

[PATCH v3 00/18] xen/arm: Don't switch TTBR while the MMU is on

2022-12-12 Thread Julien Grall
From: Julien Grall Hi all, Currently, Xen on Arm will switch TTBR whilst the MMU is on. This is similar to replacing existing mappings with new ones. So we need to follow a break-before-make sequence. When switching the TTBR, we need to temporary disable the MMU before updating the TTBR. This

RE: [PATCH 0/8] docs/process: branching-checklist: Update it

2022-12-12 Thread Henry Wang
Hi Julien, > -Original Message- > From: Julien Grall > Subject: [PATCH 0/8] docs/process: branching-checklist: Update it > > From: Julien Grall > > Hi all, > > This is a collection of improvement for the branching checklist. Thanks for this work! Since from the docs/process/RUBRIC

[PATCH] xsm/flask: mkflash.sh: Use const when generating initial_sid_to_string[]

2022-12-12 Thread Julien Grall
From: Julien Grall The array initial_sid_to_string is storing pointer to literal strings and is not meant to be modified. So change the type of the variable to "const char * const ...[]". Signed-off-by: Julien Grall --- xen/xsm/flask/policy/mkflask.sh | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 5/8] docs/process: branching-checklist: Reword the section about Config.mk

2022-12-12 Thread Julien Grall
From: Julien Grall Since at least Xen 4.12, the revision for external trees don't contain the word "unstable". So explicitely list the *_REVISION variables that need to be updated as part of the branching process. Signed-off-by: Julien Grall --- docs/process/branching-checklist.txt | 8

[PATCH 8/8] docs/process: branching-checklist: Add a list of accounts at the beginning

2022-12-12 Thread Julien Grall
From: Julien Grall The checklist requires to have access to several accounts on both xenbits and osstest. List those accounts at the beginning of the file so it is easier to check if one has the permissions before starting the branching process. Signed-off-by: Julien Grall ---

  1   2   >