Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Roger Pau Monné
On Mon, Jul 08, 2024 at 07:41:19PM +0800, Jiqian Chen wrote: > If run Xen with PVH dom0 and hvm domU, hvm will map a pirq for > a passthrough device by using gsi, see qemu code > xen_pt_realize->xc_physdev_map_pirq and libxl code > pci_add_dm_done->xc_physdev_map_pirq. Then xc_physdev_map_pirq > wi

Re: [PATCH v3] x86/altcall: further refine clang workaround

2024-07-31 Thread Roger Pau Monné
On Wed, Jul 31, 2024 at 08:26:02AM +0200, Jan Beulich wrote: > On 30.07.2024 17:53, Roger Pau Monne wrote: > > The current code in ALT_CALL_ARG() won't successfully workaround the clang > > code-generation issue if the arg parameter has a size that's not a power of > > 2. > > While there are no su

[xen-4.19-testing test] 187063: regressions - FAIL

2024-07-31 Thread osstest service owner
flight 187063 xen-4.19-testing real [real] flight 187072 xen-4.19-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/187063/ http://logs.test-lab.xenproject.org/osstest/logs/187072/ Regressions :-( Tests which did not succeed and are blocking, including tests which could

Re: [PATCH v2 1/2] x86/dom0: fix restoring %cr3 and the mapcache override on PV build error

2024-07-31 Thread Roger Pau Monné
On Wed, Jul 31, 2024 at 08:32:03AM +0200, Jan Beulich wrote: > On 30.07.2024 17:28, Roger Pau Monne wrote: > > One of the error paths in the PV dom0 builder section that runs on the guest > > page-tables wasn't restoring the Xen value of %cr3, neither removing the > > mapcache override. > > s/neit

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Jan Beulich
On 31.07.2024 09:50, Roger Pau Monné wrote: > On Mon, Jul 08, 2024 at 07:41:19PM +0800, Jiqian Chen wrote: >> --- a/xen/arch/x86/physdev.c >> +++ b/xen/arch/x86/physdev.c >> @@ -323,7 +323,11 @@ ret_t do_physdev_op(int cmd, >> XEN_GUEST_HANDLE_PARAM(void) arg) >> if ( !d ) >>

Re: [PATCH v2 1/2] x86/dom0: fix restoring %cr3 and the mapcache override on PV build error

2024-07-31 Thread Jan Beulich
On 31.07.2024 09:57, Roger Pau Monné wrote: > On Wed, Jul 31, 2024 at 08:32:03AM +0200, Jan Beulich wrote: >> On 30.07.2024 17:28, Roger Pau Monne wrote: >>> --- a/xen/arch/x86/pv/dom0_build.c >>> +++ b/xen/arch/x86/pv/dom0_build.c >>> @@ -825,6 +825,8 @@ int __init dom0_construct_pv(struct domain

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Roger Pau Monné
On Wed, Jul 31, 2024 at 09:58:28AM +0200, Jan Beulich wrote: > On 31.07.2024 09:50, Roger Pau Monné wrote: > > On Mon, Jul 08, 2024 at 07:41:19PM +0800, Jiqian Chen wrote: > >> --- a/xen/arch/x86/physdev.c > >> +++ b/xen/arch/x86/physdev.c > >> @@ -323,7 +323,11 @@ ret_t do_physdev_op(int cmd, > >

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Chen, Jiqian
On 2024/7/30 21:09, Andrew Cooper wrote: > On 08/07/2024 12:41 pm, Jiqian Chen wrote: >> If run Xen with PVH dom0 and hvm domU, hvm will map a pirq for >> a passthrough device by using gsi, see qemu code >> xen_pt_realize->xc_physdev_map_pirq and libxl code >> pci_add_dm_done->xc_physdev_map_pirq.

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Chen, Jiqian
On 2024/7/31 15:50, Roger Pau Monné wrote: > On Mon, Jul 08, 2024 at 07:41:19PM +0800, Jiqian Chen wrote: >> If run Xen with PVH dom0 and hvm domU, hvm will map a pirq for >> a passthrough device by using gsi, see qemu code >> xen_pt_realize->xc_physdev_map_pirq and libxl code >> pci_add_dm_done->x

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Jan Beulich
On 31.07.2024 10:24, Roger Pau Monné wrote: > On Wed, Jul 31, 2024 at 09:58:28AM +0200, Jan Beulich wrote: >> On 31.07.2024 09:50, Roger Pau Monné wrote: >>> On Mon, Jul 08, 2024 at 07:41:19PM +0800, Jiqian Chen wrote: --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -323

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Jan Beulich
On 31.07.2024 10:31, Chen, Jiqian wrote: > On 2024/7/30 21:09, Andrew Cooper wrote: >> On 08/07/2024 12:41 pm, Jiqian Chen wrote: >>> If run Xen with PVH dom0 and hvm domU, hvm will map a pirq for >>> a passthrough device by using gsi, see qemu code >>> xen_pt_realize->xc_physdev_map_pirq and libxl

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Roger Pau Monné
On Wed, Jul 31, 2024 at 10:40:46AM +0200, Jan Beulich wrote: > On 31.07.2024 10:24, Roger Pau Monné wrote: > > On Wed, Jul 31, 2024 at 09:58:28AM +0200, Jan Beulich wrote: > >> On 31.07.2024 09:50, Roger Pau Monné wrote: > >>> On Mon, Jul 08, 2024 at 07:41:19PM +0800, Jiqian Chen wrote: > ---

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Jan Beulich
On 31.07.2024 10:51, Roger Pau Monné wrote: > On Wed, Jul 31, 2024 at 10:40:46AM +0200, Jan Beulich wrote: >> On 31.07.2024 10:24, Roger Pau Monné wrote: >>> On Wed, Jul 31, 2024 at 09:58:28AM +0200, Jan Beulich wrote: On 31.07.2024 09:50, Roger Pau Monné wrote: > On Mon, Jul 08, 2024 at 0

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Roger Pau Monné
On Wed, Jul 31, 2024 at 11:02:01AM +0200, Jan Beulich wrote: > On 31.07.2024 10:51, Roger Pau Monné wrote: > > I agree with (a), but I don't think enabling PVH dom0 usage of the > > hypercalls should be gated on this. As said a PV dom0 is already > > capable of issuing PHYSDEVOP_{,un}map_pirq oper

Re: [PATCH v3 4/9] xen/riscv: setup fixmap mapping

2024-07-31 Thread oleksii . kurochko
On Tue, 2024-07-30 at 14:11 +0200, Jan Beulich wrote: > On 30.07.2024 13:25, oleksii.kuroc...@gmail.com wrote: > > On Tue, 2024-07-30 at 09:49 +0200, Jan Beulich wrote: > > > On 29.07.2024 18:11, oleksii.kuroc...@gmail.com wrote: > > > > On Mon, 2024-07-29 at 15:35 +0200, Jan Beulich wrote: > > > >

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Jan Beulich
On 31.07.2024 11:37, Roger Pau Monné wrote: > On Wed, Jul 31, 2024 at 11:02:01AM +0200, Jan Beulich wrote: >> On 31.07.2024 10:51, Roger Pau Monné wrote: >>> I agree with (a), but I don't think enabling PVH dom0 usage of the >>> hypercalls should be gated on this. As said a PV dom0 is already >>>

Re: [PATCH v3 5/9] xen/riscv: introduce asm/pmap.h header

2024-07-31 Thread oleksii . kurochko
On Tue, 2024-07-30 at 14:15 +0200, Jan Beulich wrote: > On 30.07.2024 13:39, oleksii.kuroc...@gmail.com wrote: > > On Tue, 2024-07-30 at 09:56 +0200, Jan Beulich wrote: > > > On 29.07.2024 18:22, oleksii.kuroc...@gmail.com wrote: > > > > On Mon, 2024-07-29 at 16:29 +0200, Jan Beulich wrote: > > > >

Re: [PATCH 2/4] x86/domain: Implement arch_init_idle_domain()

2024-07-31 Thread Andrew Cooper
On 31/07/2024 12:44 am, Stefano Stabellini wrote: > On Thu, 18 Jul 2024, Andrew Cooper wrote: >> The idle domain needs d->arch.ctxt_switch initialised on x86. Implement the >> new arch_init_idle_domain() in order to do this. >> >> Right now this double-initalises the ctxt_switch pointer, but it's

init-dom0less: Weird use of cpupool in xl dominfo

2024-07-31 Thread Amneesh Singh
Hello, I was going through the source code for init-dom0less as I was facing some issue after applying this patchset. Feel free to ignore it however, as it seems unrelated to the issue I am encountering. https://lists.xenproject.org/archives/html/xen-devel/2024-05/msg01825.html One peculiar thing

Re: init-dom0less: Weird use of cpupool in xl dominfo

2024-07-31 Thread Andrew Cooper
On 31/07/2024 11:03 am, Amneesh Singh wrote: > Hello, I was going through the source code for init-dom0less as I was > facing some issue after applying this patchset. Feel free to ignore it > however, as it seems unrelated to the issue I am encountering. > > https://lists.xenproject.org/archives/ht

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Roger Pau Monné
On Wed, Jul 31, 2024 at 11:55:35AM +0200, Jan Beulich wrote: > On 31.07.2024 11:37, Roger Pau Monné wrote: > > On Wed, Jul 31, 2024 at 11:02:01AM +0200, Jan Beulich wrote: > >> On 31.07.2024 10:51, Roger Pau Monné wrote: > >>> I agree with (a), but I don't think enabling PVH dom0 usage of the > >>>

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Jan Beulich
On 31.07.2024 13:29, Roger Pau Monné wrote: > On Wed, Jul 31, 2024 at 11:55:35AM +0200, Jan Beulich wrote: >> On 31.07.2024 11:37, Roger Pau Monné wrote: >>> On Wed, Jul 31, 2024 at 11:02:01AM +0200, Jan Beulich wrote: On 31.07.2024 10:51, Roger Pau Monné wrote: > I agree with (a), but I d

[ovmf test] 187074: all pass - PUSHED

2024-07-31 Thread osstest service owner
flight 187074 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/187074/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 03f49e44096fc25c33f96a11b3da93abc93dad34 baseline version: ovmf 9df400fd4d75831e02428

Re: init-dom0less: Weird use of cpupool in xl dominfo

2024-07-31 Thread Jürgen Groß
On 31.07.24 12:08, Andrew Cooper wrote: On 31/07/2024 11:03 am, Amneesh Singh wrote: Hello, I was going through the source code for init-dom0less as I was facing some issue after applying this patchset. Feel free to ignore it however, as it seems unrelated to the issue I am encountering. https:

[PATCH] xen/domain: Factor domlist_{insert,remove}() out of domain_{create,destroy}()

2024-07-31 Thread Andrew Cooper
These are opencoded linked list and hashtable manipulations. Factor them out into static inline helpers, and discuss the consequence for the domain. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall Calling domain_hash a hash is r

Re: [PATCH] xen/domain: Factor domlist_{insert,remove}() out of domain_{create,destroy}()

2024-07-31 Thread Jan Beulich
On 31.07.2024 14:04, Andrew Cooper wrote: > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -64,6 +64,57 @@ DEFINE_RCU_READ_LOCK(domlist_read_lock); > static struct domain *domain_hash[DOMAIN_HASH_SIZE]; > struct domain *domain_list; > > +/* > + * Insert a domain into the domlist/has

Re: [XEN PATCH v5 09/13] x86/vmx: guard access to cpu_has_vmx_* in common code

2024-07-31 Thread Jan Beulich
On 30.07.2024 12:33, Sergiy Kibrik wrote: > There're several places in common code, outside of arch/x86/hvm/vmx, > where cpu_has_vmx_* get accessed without checking whether VMX supported first. > These macros rely on global variables defined in vmx code, so when VMX support > is disabled accesses t

Re: [XEN PATCH v5 10/13] x86/vpmu: guard calls to vmx/svm functions

2024-07-31 Thread Jan Beulich
On 30.07.2024 12:35, Sergiy Kibrik wrote: > @@ -266,10 +268,10 @@ static inline void __core2_vpmu_save(struct vcpu *v) > rdmsrl(MSR_P6_EVNTSEL(i), xen_pmu_cntr_pair[i].control); > } > > -if ( !is_hvm_vcpu(v) ) > +if ( !is_vmx_vcpu(v) ) With this ... > rdmsrl(MSR_C

Re: [XEN PATCH v5 11/13] ioreq: do not build arch_vcpu_ioreq_completion() for non-VMX configurations

2024-07-31 Thread Jan Beulich
On 30.07.2024 12:37, Sergiy Kibrik wrote: > From: Xenia Ragiadakou > > VIO_realmode_completion is specific to vmx realmode and thus the function > arch_vcpu_ioreq_completion() has actual handling work only in VMX-enabled > build, > as for the rest x86 and ARM build configurations it is basically

[XEN PATCH] automation/eclair_analysis: add Rule 18.6 to the clean guidelines

2024-07-31 Thread Nicola Vetrini
MISRA C Rule 18.6 states: "The address of an object with automatic storage shall not be copied to another object that persists after the first object has ceased to exist." The rule is set as monitored and tagged clean, in order to block the CI on any violations that may arise, allowing the presenc

[PATCH 0/3] mini-os: mm: use a generic page table walker

2024-07-31 Thread Juergen Gross
Instead of open coding a page table walk multiple times, use a generic page table walker instead. This new page table walker will be used later for kexec support, too. Juergen Gross (3): mini-os: mm: introduce generic page table walk function mini-os: mm: switch need_pgt() to use walk_pt()

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

2024-07-31 Thread osstest service owner
flight 187067 xen-unstable real [real] flight 187078 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/187067/ http://logs.test-lab.xenproject.org/osstest/logs/187078/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armh

[PATCH 2/3] mini-os: mm: switch need_pgt() to use walk_pt()

2024-07-31 Thread Juergen Gross
Instead of open coding a page table walk, use walk_pt() in need_pgt(). Signed-off-by: Juergen Gross --- arch/x86/mm.c | 66 +++ 1 file changed, 24 insertions(+), 42 deletions(-) diff --git a/arch/x86/mm.c b/arch/x86/mm.c index cc4d41e9..accde291 1

[PATCH 3/3] mini-os: mm: convert set_readonly() to use walk_pt()

2024-07-31 Thread Juergen Gross
Instead of having another copy of a page table walk in set_readonly(), just use walk_pt(). As it will be needed later anyway, split out the TLB flushing into a dedicated function. Signed-off-by: Juergen Gross --- arch/x86/mm.c | 119 +- 1 file cha

[PATCH 1/3] mini-os: mm: introduce generic page table walk function

2024-07-31 Thread Juergen Gross
In x86 mm code there are multiple instances of page table walks for different purposes. Introduce a generic page table walker being able to cover the current use cases. It will be used for other cases in future, too. The page table walker needs some per-level data, so add a table for that data. M

Re: [XEN PATCH v12 2/7] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-07-31 Thread Roger Pau Monné
On Wed, Jul 31, 2024 at 01:39:40PM +0200, Jan Beulich wrote: > On 31.07.2024 13:29, Roger Pau Monné wrote: > > On Wed, Jul 31, 2024 at 11:55:35AM +0200, Jan Beulich wrote: > >> On 31.07.2024 11:37, Roger Pau Monné wrote: > >>> On Wed, Jul 31, 2024 at 11:02:01AM +0200, Jan Beulich wrote: > On 3

Re: [PATCH v2 2/2] x86/dom0: only disable SMAP for the PV dom0 build

2024-07-31 Thread Roger Pau Monné
On Wed, Jul 31, 2024 at 08:44:46AM +0200, Jan Beulich wrote: > On 30.07.2024 17:28, Roger Pau Monne wrote: > > The PVH dom0 builder doesn't switch page tables and has no need to run with > > SMAP disabled. > > > > Use stac() and clac(), as that's safe to use even if events would hit in the > > mid

Re: [PATCH v2 2/2] x86/dom0: only disable SMAP for the PV dom0 build

2024-07-31 Thread Jan Beulich
On 31.07.2024 15:25, Roger Pau Monné wrote: > On Wed, Jul 31, 2024 at 08:44:46AM +0200, Jan Beulich wrote: >> On 30.07.2024 17:28, Roger Pau Monne wrote: >>> The PVH dom0 builder doesn't switch page tables and has no need to run with >>> SMAP disabled. >>> >>> Use stac() and clac(), as that's safe

Xen Project Releases Version 4.19

2024-07-31 Thread oleksii . kurochko
Hello everyone, It's with great pleasure that I announce our 4.19 PR release. I want to thank the whole community for their efforts in getting this release published! *Please find the PR article attached here

Re: [PATCH] xen/domain: Factor domlist_{insert,remove}() out of domain_{create,destroy}()

2024-07-31 Thread Andrew Cooper
On 31/07/2024 1:14 pm, Jan Beulich wrote: > On 31.07.2024 14:04, Andrew Cooper wrote: >> --- a/xen/common/domain.c >> +++ b/xen/common/domain.c >> @@ -64,6 +64,57 @@ DEFINE_RCU_READ_LOCK(domlist_read_lock); >> static struct domain *domain_hash[DOMAIN_HASH_SIZE]; >> struct domain *domain_list; >>

Re: [PATCH WIP 07/14] xen/hvm: Don't skip MSR_READ trace record

2024-07-31 Thread Jan Beulich
On 26.06.2024 15:38, George Dunlap wrote: > Commit 37f074a3383 ("x86/msr: introduce guest_rdmsr()") introduced a > function to combine the MSR_READ handling between PV and HVM. > Unfortunately, by returning directly, it skipped the trace generation, > leading to gaps in the trace record, as well as

Re: [OSSTEST PATCH] preseed_base: Use "keep" NIC NamePolicy when "force-mac-address"

2024-07-31 Thread Anthony PERARD
On Tue, Jun 18, 2024 at 12:04:05PM +0100, Andrew Cooper wrote: > On 18/06/2024 10:44 am, Anthony PERARD wrote: > > On Mon, Jun 17, 2024 at 04:34:09PM +0100, Andrew Cooper wrote: > >> On 17/06/2024 3:40 pm, Anthony PERARD wrote: > >>> diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm > >>> index 35

Re: [PATCH v2 2/2] x86/dom0: only disable SMAP for the PV dom0 build

2024-07-31 Thread Roger Pau Monné
On Wed, Jul 31, 2024 at 03:39:35PM +0200, Jan Beulich wrote: > On 31.07.2024 15:25, Roger Pau Monné wrote: > > On Wed, Jul 31, 2024 at 08:44:46AM +0200, Jan Beulich wrote: > >> On 30.07.2024 17:28, Roger Pau Monne wrote: > >>> The PVH dom0 builder doesn't switch page tables and has no need to run

Re: [PATCH] xen/domain: Factor domlist_{insert,remove}() out of domain_{create,destroy}()

2024-07-31 Thread Jan Beulich
On 31.07.2024 16:07, Andrew Cooper wrote: > On 31/07/2024 1:14 pm, Jan Beulich wrote: >> On 31.07.2024 14:04, Andrew Cooper wrote: >>> --- a/xen/common/domain.c >>> +++ b/xen/common/domain.c >>> @@ -64,6 +64,57 @@ DEFINE_RCU_READ_LOCK(domlist_read_lock); >>> static struct domain *domain_hash[DOMAI

[ovmf test] 187079: all pass - PUSHED

2024-07-31 Thread osstest service owner
flight 187079 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/187079/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 02f7ecbbb2da356585f5c4df4a5e7aa64a6b985d baseline version: ovmf 03f49e44096fc25c33f96

[PATCH v2] xen/domain: Factor domlist_{insert,remove}() out of domain_{create,destroy}()

2024-07-31 Thread Andrew Cooper
These are opencoded linked list and hashtable manipulations. Factor them out into static inline helpers, and discuss the consequence for the domain. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall v2:

[PATCH] tools/xenstored: switch stubdom live update to use file for state

2024-07-31 Thread Juergen Gross
With the introduction of 9pfs for Xenstore-stubdom it is now possible to use a file for saving the state when doing live update. This allows to move some environment specific actions back to the common source file lu.c. Signed-off-by: Juergen Gross --- tools/xenstored/lu.c| 75 +

[PATCH v2] SUPPORT.md: split XSM from Flask

2024-07-31 Thread Jan Beulich
XSM is a generic framework, which in particular is also used by SILO. With this it can't really be experimental: Arm mandates SILO for having a security supported configuration. Signed-off-by: Jan Beulich --- v2: Terminology adjustments. Stronger description. --- a/SUPPORT.md +++ b/SUPPORT.md @@

Re: [PATCH v2] SUPPORT.md: split XSM from Flask

2024-07-31 Thread Andrew Cooper
On 31/07/2024 3:28 pm, Jan Beulich wrote: > XSM is a generic framework, which in particular is also used by SILO. > With this it can't really be experimental: Arm mandates SILO for having > a security supported configuration. > > Signed-off-by: Jan Beulich > --- > v2: Terminology adjustments. Stro

[PATCH] xen/riscv: fix build issue for bullseye-riscv64 container

2024-07-31 Thread Oleksii Kurochko
Address compilation error on bullseye-riscv64 container: undefined reference to `guest_physmap_remove_page` Since there is no current implementation of `guest_physmap_remove_page()`, a stub function has been added. Signed-off-by: Oleksii Kurochko Reported-by: Andrew Cooper --- xen/arch/risc

Re: [PATCH v2] SUPPORT.md: split XSM from Flask

2024-07-31 Thread Jan Beulich
On 31.07.2024 16:59, Andrew Cooper wrote: > On 31/07/2024 3:28 pm, Jan Beulich wrote: >> XSM is a generic framework, which in particular is also used by SILO. >> With this it can't really be experimental: Arm mandates SILO for having >> a security supported configuration. >> >> Signed-off-by: Jan B

Re: [PATCH] xen/riscv: fix build issue for bullseye-riscv64 container

2024-07-31 Thread Jan Beulich
On 31.07.2024 17:07, Oleksii Kurochko wrote: > Address compilation error on bullseye-riscv64 container: >undefined reference to `guest_physmap_remove_page` > > Since there is no current implementation of `guest_physmap_remove_page()`, > a stub function has been added. > > Signed-off-by: Oleks

Re: [PATCH] xen/riscv: fix build issue for bullseye-riscv64 container

2024-07-31 Thread Andrew Cooper
On 31/07/2024 4:07 pm, Oleksii Kurochko wrote: > Address compilation error on bullseye-riscv64 container: >undefined reference to `guest_physmap_remove_page` > > Since there is no current implementation of `guest_physmap_remove_page()`, > a stub function has been added. > > Signed-off-by: Oleks

Re: [PATCH] xen/riscv: fix build issue for bullseye-riscv64 container

2024-07-31 Thread Jan Beulich
On 31.07.2024 17:37, Andrew Cooper wrote: > On 31/07/2024 4:07 pm, Oleksii Kurochko wrote: >> Address compilation error on bullseye-riscv64 container: >>undefined reference to `guest_physmap_remove_page` >> >> Since there is no current implementation of `guest_physmap_remove_page()`, >> a stub

Re: [XEN PATCH v12 1/7] xen/pci: Add hypercall to support reset of pcidev

2024-07-31 Thread Roger Pau Monné
On Mon, Jul 08, 2024 at 07:41:18PM +0800, Jiqian Chen wrote: > When a device has been reset on dom0 side, the Xen hypervisor > doesn't get notification, so the cached state in vpci is all > out of date compare with the real device state. > > To solve that problem, add a new hypercall to support th

Re: [XEN PATCH v12 1/7] xen/pci: Add hypercall to support reset of pcidev

2024-07-31 Thread Jan Beulich
On 31.07.2024 17:55, Roger Pau Monné wrote: > On Mon, Jul 08, 2024 at 07:41:18PM +0800, Jiqian Chen wrote: >> --- a/xen/drivers/vpci/vpci.c >> +++ b/xen/drivers/vpci/vpci.c >> @@ -172,6 +172,16 @@ int vpci_assign_device(struct pci_dev *pdev) >> >> return rc; >> } >> + >> +int vpci_reset_dev

Re: [PATCH v2] SUPPORT.md: split XSM from Flask

2024-07-31 Thread Andrew Cooper
On 31/07/2024 4:14 pm, Jan Beulich wrote: > On 31.07.2024 16:59, Andrew Cooper wrote: >> On 31/07/2024 3:28 pm, Jan Beulich wrote: >>> XSM is a generic framework, which in particular is also used by SILO. >>> With this it can't really be experimental: Arm mandates SILO for having >>> a security sup

Re: [XEN PATCH v12 1/7] xen/pci: Add hypercall to support reset of pcidev

2024-07-31 Thread Roger Pau Monné
On Wed, Jul 31, 2024 at 05:58:54PM +0200, Jan Beulich wrote: > On 31.07.2024 17:55, Roger Pau Monné wrote: > > On Mon, Jul 08, 2024 at 07:41:18PM +0800, Jiqian Chen wrote: > >> --- a/xen/drivers/vpci/vpci.c > >> +++ b/xen/drivers/vpci/vpci.c > >> @@ -172,6 +172,16 @@ int vpci_assign_device(struct p

[ovmf test] 187085: all pass - PUSHED

2024-07-31 Thread osstest service owner
flight 187085 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/187085/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 1fc55a3933b0d17430c2857629ee54abefaad7eb baseline version: ovmf 02f7ecbbb2da356585f5c

[XEN PATCH v7] tools/lsevtchn: Use errno macro to handle hypercall error cases

2024-07-31 Thread Matthew Barnes
Currently, lsevtchn aborts its event channel enumeration when it hits an event channel that is owned by Xen. lsevtchn does not distinguish between different hypercall errors, which results in lsevtchn missing potential relevant event channels with higher port numbers. Use the errno macro to disti

[xen-unstable-smoke test] 187075: regressions - FAIL

2024-07-31 Thread osstest service owner
flight 187075 xen-unstable-smoke real [real] flight 187086 xen-unstable-smoke real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/187075/ http://logs.test-lab.xenproject.org/osstest/logs/187086/ Regressions :-( Tests which did not succeed and are blocking, including tests which co

[PATCH 0/2] Introduce functional safety related documents

2024-07-31 Thread Ayan Kumar Halder
Hi, In the Xen summit, we presented an update on Xen Functional Safety. For details, please refer to https://youtu.be/eFRTHSGDMfQ?si=sYOdYfDI7qsgkcjE ("Xen Functional Safety - an Update - Ayan Kumar Halder & Michal Orzel, AMD") We wish to start with upstreaming the requirements. This patches

[PATCH 2/2] docs: fusa : reqs: Added a sample of requirements [DO_NOT_MERGE]

2024-07-31 Thread Ayan Kumar Halder
Added a sample of market, product and design requirements. This is to help explain how we are writing the requirements and understand the context of the first patch. We will be sending these requirements for review in the subsequent patches. Please do not merge this patch. Signed-off-by: Ayan Kum

[PATCH 1/2] docs: Introduce Fusa Requirement and define maintainers

2024-07-31 Thread Ayan Kumar Halder
The FUSA folder is expected to contain requirements and other documents to enable safety certification of Xen hypervisor. Added a README to explain how the requirements are categorized, written and their supported status. Added maintainers for the same. Signed-off-by: Ayan Kumar Halder --- MAIN

Re: [PATCH v2 2/2] x86/dom0: only disable SMAP for the PV dom0 build

2024-07-31 Thread Andrew Cooper
On 30/07/2024 4:28 pm, Roger Pau Monne wrote: > The PVH dom0 builder doesn't switch page tables and has no need to run with > SMAP disabled. > > Use stac() and clac(), as that's safe to use even if events would hit in the > middle of the region with SMAP disabled. Nesting stac() and clac() calls i

[linux-linus test] 187069: regressions - FAIL

2024-07-31 Thread osstest service owner
flight 187069 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/187069/ 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. 186827 test-arm64-arm64-xl

[libvirt test] 187071: tolerable all pass - PUSHED

2024-07-31 Thread osstest service owner
flight 187071 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/187071/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 187050 test-amd64-amd64-libvirt-xsm 15 migrate-s

[PATCH] x86/domain: Fix domlist_insert() updating the domain hash

2024-07-31 Thread Andrew Cooper
A last minute review request was to dedup the expression calculating the domain hash bucket. While the code reads correctly, it is buggy because rcu_assign_pointer() is a criminally stupid API assigning by name not value, and - contrary to it's name - does not hide an indirection. Therefore, rcu_

[xen-unstable-smoke test] 187088: regressions - FAIL

2024-07-31 Thread osstest service owner
flight 187088 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/187088/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-debianhvm-amd64 8 xen-bootfail REGR. vs. 187068 test-amd64-a

Re: [PATCH 2/3] mini-os: mm: switch need_pgt() to use walk_pt()

2024-07-31 Thread Samuel Thibault
Hello, Juergen Gross, le mer. 31 juil. 2024 15:00:25 +0200, a ecrit: > -pgentry_t *need_pgt(unsigned long va) > +static int need_pgt_func(unsigned long va, unsigned int lvl, bool is_leaf, > + pgentry_t *pte, void *par) > { [...] > +if ( lvl == L1_FRAME || (*pte & _PAGE

Re: [PATCH 1/3] mini-os: mm: introduce generic page table walk function

2024-07-31 Thread Samuel Thibault
Juergen Gross, le mer. 31 juil. 2024 15:00:24 +0200, a ecrit: > +ptindex[lvl] = (va >> ptdata[lvl].shift) & > + (ptdata[lvl].entries - 1); It seems that this kind of va+lvl-to-index computation happens several times? It's probably worth making it a macro. Sam

Re: [PATCH 3/3] mini-os: mm: convert set_readonly() to use walk_pt()

2024-07-31 Thread Samuel Thibault
Juergen Gross, le mer. 31 juil. 2024 15:00:26 +0200, a ecrit: > +static int set_readonly_func(unsigned long va, unsigned int lvl, bool > is_leaf, > + pgentry_t *pte, void *par) > +{ > +struct set_readonly_par *ro = par; > > +mmu_updates[ro->count].ptr = virt_t

[ovmf test] 187090: all pass - PUSHED

2024-07-31 Thread osstest service owner
flight 187090 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/187090/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf a9158fe9a670cebbb9d361a1b7fc3075fdf33393 baseline version: ovmf 1fc55a3933b0d17430c28

Re: [PATCH] x86/domain: Fix domlist_insert() updating the domain hash

2024-07-31 Thread Stefano Stabellini
On Wed, 31 Jul 2024, Andrew Cooper wrote: > A last minute review request was to dedup the expression calculating the > domain hash bucket. > > While the code reads correctly, it is buggy because rcu_assign_pointer() is a > criminally stupid API assigning by name not value, and - contrary to it's n

Re: [XEN PATCH] automation/eclair_analysis: add Rule 18.6 to the clean guidelines

2024-07-31 Thread Stefano Stabellini
On Wed, 31 Jul 2024, Nicola Vetrini wrote: > MISRA C Rule 18.6 states: "The address of an object with automatic > storage shall not be copied to another object that persists after > the first object has ceased to exist." > > The rule is set as monitored and tagged clean, in order to block > the CI

Re: [PATCH 2/3] xen/event: address violation of MISRA C Rule 13.6

2024-07-31 Thread Stefano Stabellini
On Wed, 31 Jul 2024, Jan Beulich wrote: > On 01.07.2024 10:16, Jan Beulich wrote: > > On 25.06.2024 12:14, Alessandro Zucchelli wrote: > >> --- a/xen/include/xen/event.h > >> +++ b/xen/include/xen/event.h > >> @@ -183,13 +183,14 @@ static bool evtchn_usable(const struct evtchn > >> *evtchn) > >>

Re: [PATCH 1/2] docs: Introduce Fusa Requirement and define maintainers

2024-07-31 Thread Stefano Stabellini
On Wed, 31 Jul 2024, Ayan Kumar Halder wrote: > The FUSA folder is expected to contain requirements and other documents > to enable safety certification of Xen hypervisor. > Added a README to explain how the requirements are categorized, written > and their supported status. > > Added maintainers

Re: [PATCH] docs/misra: add R13.2 and R18.2 to rules.rst

2024-07-31 Thread Stefano Stabellini
On Wed, 31 Jul 2024, Jan Beulich wrote: > On 31.07.2024 01:30, Stefano Stabellini wrote: > > --- a/docs/misra/rules.rst > > +++ b/docs/misra/rules.rst > > @@ -462,6 +462,15 @@ maintainers if you want to suggest a change. > > - Initializer lists shall not contain persistent side effects > >

[PATCH v2] docs/misra: add R13.2 and R18.2 to rules.rst

2024-07-31 Thread Stefano Stabellini
Add MISRA C rules 13.2 and 18.2 to rules.rst. Both rules have zero violations reported by Eclair but they have some cautions. We accept both rules and for now we'll enable scanning for them in Eclair but only violations will cause the Gitlab CI job to fail (cautions will not.) Signed-off-by: Stefa

[ovmf test] 187093: all pass - PUSHED

2024-07-31 Thread osstest service owner
flight 187093 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/187093/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf eed43245dfdd6d616f7a7d72ba4ca52de3d59584 baseline version: ovmf a9158fe9a670cebbb9d36

[xen-unstable-smoke test] 187092: regressions - FAIL

2024-07-31 Thread osstest service owner
flight 187092 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/187092/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-debianhvm-amd64 8 xen-bootfail REGR. vs. 187068 test-amd64-a

[xen-4.19-testing test] 187073: regressions - FAIL

2024-07-31 Thread osstest service owner
flight 187073 xen-4.19-testing real [real] flight 187094 xen-4.19-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/187073/ http://logs.test-lab.xenproject.org/osstest/logs/187094/ Regressions :-( Tests which did not succeed and are blocking, including tests which could

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

2024-07-31 Thread osstest service owner
flight 187096 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/187096/ 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 2/3] mini-os: mm: switch need_pgt() to use walk_pt()

2024-07-31 Thread Jürgen Groß
On 31.07.24 23:27, Samuel Thibault wrote: Hello, Juergen Gross, le mer. 31 juil. 2024 15:00:25 +0200, a ecrit: -pgentry_t *need_pgt(unsigned long va) +static int need_pgt_func(unsigned long va, unsigned int lvl, bool is_leaf, + pgentry_t *pte, void *par) { [...] +

Re: [PATCH 1/3] mini-os: mm: introduce generic page table walk function

2024-07-31 Thread Jürgen Groß
On 31.07.24 23:33, Samuel Thibault wrote: Juergen Gross, le mer. 31 juil. 2024 15:00:24 +0200, a ecrit: +ptindex[lvl] = (va >> ptdata[lvl].shift) & + (ptdata[lvl].entries - 1); It seems that this kind of va+lvl-to-index computation happens several times? I

Re: [PATCH 3/3] mini-os: mm: convert set_readonly() to use walk_pt()

2024-07-31 Thread Jürgen Groß
On 31.07.24 23:37, Samuel Thibault wrote: Juergen Gross, le mer. 31 juil. 2024 15:00:26 +0200, a ecrit: +static int set_readonly_func(unsigned long va, unsigned int lvl, bool is_leaf, + pgentry_t *pte, void *par) +{ +struct set_readonly_par *ro = par; +mmu_

[PATCH v4] mm: introduce xvmalloc() et al and use for grant table allocations

2024-07-31 Thread Jan Beulich
All of the array allocations in grant_table_init() can exceed a page's worth of memory, which xmalloc()-based interfaces aren't really suitable for after boot. We also don't need any of these allocations to be physically contiguous. Introduce interfaces dynamically switching between xmalloc() et al

Re: [PATCH] docs/misra: add R13.2 and R18.2 to rules.rst

2024-07-31 Thread Bertrand Marquis
Hi Stefano, > On 1 Aug 2024, at 01:50, Stefano Stabellini wrote: > > On Wed, 31 Jul 2024, Jan Beulich wrote: >> On 31.07.2024 01:30, Stefano Stabellini wrote: >>> --- a/docs/misra/rules.rst >>> +++ b/docs/misra/rules.rst >>> @@ -462,6 +462,15 @@ maintainers if you want to suggest a change. >>>

Re: [XEN PATCH v12 1/7] xen/pci: Add hypercall to support reset of pcidev

2024-07-31 Thread Jan Beulich
On 31.07.2024 18:13, Roger Pau Monné wrote: > On Wed, Jul 31, 2024 at 05:58:54PM +0200, Jan Beulich wrote: >> On 31.07.2024 17:55, Roger Pau Monné wrote: >>> On Mon, Jul 08, 2024 at 07:41:18PM +0800, Jiqian Chen wrote: --- a/xen/drivers/vpci/vpci.c +++ b/xen/drivers/vpci/vpci.c @@ -1

Re: [PATCH] docs/misra: add R13.2 and R18.2 to rules.rst

2024-07-31 Thread Jan Beulich
On 01.08.2024 01:50, Stefano Stabellini wrote: > On Wed, 31 Jul 2024, Jan Beulich wrote: >> On 31.07.2024 01:30, Stefano Stabellini wrote: >>> --- a/docs/misra/rules.rst >>> +++ b/docs/misra/rules.rst >>> @@ -462,6 +462,15 @@ maintainers if you want to suggest a change. >>> - Initializer list