Re: [RFC PATCH 4/6] virtio: Various updates to xen-virtio DMA ops layer

2022-04-19 Thread Oleksandr
Hello Stefano, Juergen On 19.04.22 09:58, Juergen Gross wrote: On 18.04.22 21:11, Stefano Stabellini wrote: On Sun, 17 Apr 2022, Oleksandr wrote: On 16.04.22 01:02, Stefano Stabellini wrote: On Thu, 14 Apr 2022, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko In the context of cu

[libvirt test] 169531: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169531 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/169531/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-libvirt 6 libvirt-buildfail REGR. vs. 151777 build-i386-libvirt

Re: [PATCH v6 0/9] xen: drop hypercall function tables

2022-04-19 Thread Juergen Gross
On 24.03.22 15:01, Juergen Gross wrote: In order to avoid indirect function calls on the hypercall path as much as possible this series is removing the hypercall function tables and is replacing the hypercall handler calls via the function array by automatically generated call macros. Another by

Re: [PATCH v1 02/13] xen/arm: introduce a special domain DOMID_SHARED

2022-04-19 Thread Jan Beulich
On 15.04.2022 11:52, Penny Zheng wrote: >> From: Jan Beulich >> Sent: Friday, March 18, 2022 4:53 PM >> >> On 11.03.2022 07:11, Penny Zheng wrote: >>> --- a/xen/arch/arm/setup.c >>> +++ b/xen/arch/arm/setup.c >>> @@ -855,6 +855,20 @@ static bool __init is_dom0less_mode(void) >>> return ( !dom

[ovmf test] 169532: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169532 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169532/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

[ovmf test] 169533: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169533 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169533/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

Re: [PATCH v2] include/public: add command result definitions to vscsiif.h

2022-04-19 Thread Juergen Gross
Ping? On 23.03.22 09:58, Juergen Gross wrote: The result field of struct vscsiif_response is lacking a detailed definition. Today the Linux kernel internal scsi definitions are being used, which is not a sane interface for a PV device driver. Add macros to change that by using today's values in

[PATCH v2 09/10] xen/x86: use paddr_t for addresses in NUMA node structure

2022-04-19 Thread Wei Chen
NUMA node structure "struct node" is using u64 as node memory range. In order to make other architectures can reuse this NUMA node relative code, we replace the u64 to paddr_t. And use pfn_to_paddr and paddr_to_pfn to replace explicit shift operations. The relate PRIx64 in print messages have been

Re: [PATCH] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Jan Beulich
On 16.04.2022 15:31, Juergen Gross wrote: > --- a/xen/common/domctl.c > +++ b/xen/common/domctl.c > @@ -308,7 +308,9 @@ long cf_check > do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) > if ( op->domain == DOMID_INVALID ) > { > case XEN_DOMCTL_createdomain: > +#ifdef

Re: [PATCH V2 0/6] populate/unpopulate memory when domain on static

2022-04-19 Thread Jan Beulich
On 18.04.2022 14:22, Penny Zheng wrote: > Today when a domain unpopulates the memory on runtime, they will always > hand the memory over to the heap allocator. And it will be a problem if it > is a static domain. Pages as guest RAM for static domain shall always be > reserved to only this domain an

[ovmf test] 169534: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169534 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169534/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

Re: [PATCH v2 1/6] xen/arm: do not free reserved memory into heap

2022-04-19 Thread Jan Beulich
On 18.04.2022 14:22, Penny Zheng wrote: > Pages as guest RAM for static domain, shall be reserved to this domain only. Is there "used" missing as the 2nd word of the sentence? > So in case reserved pages being used for other purpose, users > shall not free them back to heap, even when last ref ge

Re: [PATCH v2 3/6] xen: add field "flags" to cover all internal CDF_XXX

2022-04-19 Thread Jan Beulich
On 18.04.2022 14:22, Penny Zheng wrote: > --- a/xen/include/xen/sched.h > +++ b/xen/include/xen/sched.h > @@ -591,6 +591,9 @@ struct domain > struct ioreq_server *server[MAX_NR_IOREQ_SERVERS]; > } ioreq_server; > #endif > + > +/* Holding CDF_* constant. Internal flags for dom

Re: [PATCH v2 5/6] xen/arm: unpopulate memory when domain is static

2022-04-19 Thread Jan Beulich
On 18.04.2022 14:22, Penny Zheng wrote: > --- a/xen/arch/arm/include/asm/mm.h > +++ b/xen/arch/arm/include/asm/mm.h > @@ -358,6 +358,23 @@ void clear_and_clean_page(struct page_info *page); > > unsigned int arch_get_dma_bitsize(void); > > +/* > + * Put free pages on the resv page list after ha

RE: [PATCH V2 0/6] populate/unpopulate memory when domain on static

2022-04-19 Thread Penny Zheng
Hi jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, April 19, 2022 4:47 PM > To: Penny Zheng > Cc: Wei Chen ; Andrew Cooper > ; George Dunlap ; > Julien Grall ; Stefano Stabellini ; > Wei > Liu ; Bertrand Marquis ; > Volodymyr Babchuk ; xen- > de...@lists.xenproject.org > S

RE: [PATCH v2 01/10] xen/arm: Print a 64-bit number in hex from early uart

2022-04-19 Thread Jiamei Xie
Hi Wei, > -Original Message- > From: Xen-devel On Behalf Of > Wei Chen > Sent: 2022年4月18日 17:07 > To: --to=xen-devel@lists.xenproject.org; xen-devel@lists.xenproject.org > Cc: nd ; Wei Chen ; Stefano Stabellini > ; Julien Grall ; Bertrand Marquis > ; Volodymyr Babchuk > ; Julien Grall >

Re: [PATCH v2 6/6] xen/arm: retrieve reserved pages on populate_physmap

2022-04-19 Thread Jan Beulich
On 18.04.2022 14:22, Penny Zheng wrote: > --- a/xen/common/memory.c > +++ b/xen/common/memory.c > @@ -35,6 +35,10 @@ > #include > #endif > > +#ifndef is_domain_static > +#define is_domain_static(d) ((void)(d), false) > +#endif I think this might better live in a header. I wonder why you add i

Re: [PATCH] xen: gntalloc.c: Convert kmap() to kmap_local_page()

2022-04-19 Thread Juergen Gross
On 18.04.22 08:19, Alaa Mohamed wrote: The use of kmap() is being deprecated in favor of kmap_local_page() where it is feasible. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. Therefore __del_gref() is a function where the use of kmap_local_page() in place

Re: [PATCH v2 06/10] xen: introduce an arch helper for default dma zone status

2022-04-19 Thread Jan Beulich
On 18.04.2022 11:07, Wei Chen wrote: > --- a/xen/common/page_alloc.c > +++ b/xen/common/page_alloc.c > @@ -1889,7 +1889,7 @@ void __init end_boot_allocator(void) > } > nr_bootmem_regions = 0; > > -if ( !dma_bitsize && (num_online_nodes() > 1) ) > +if ( !dma_bitsize && arch_have_

Re: [PATCH] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Juergen Gross
On 19.04.22 10:42, Jan Beulich wrote: On 16.04.2022 15:31, Juergen Gross wrote: --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -308,7 +308,9 @@ long cf_check do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) if ( op->domain == DOMID_INVALID ) { case XEN_

Re: [PATCH v2] include/public: add command result definitions to vscsiif.h

2022-04-19 Thread Jan Beulich
On 19.04.2022 10:34, Juergen Gross wrote: > Ping? Actually this patch is ready for committing - you have got an R-b already. I merely failed to tag it as such in my respective folder, and hence I've overlooked it during earlier commit swipes. Will include it next time round. Jan

Re: [PATCH] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Jan Beulich
On 19.04.2022 11:22, Juergen Gross wrote: > On 19.04.22 10:42, Jan Beulich wrote: >> On 16.04.2022 15:31, Juergen Gross wrote: >> And finally I think iommu_do_domctl() needs making resilient against d >> coming in as NULL. This isn't just to cover the issue here, but perhaps >> more importantly bec

[xen-unstable test] 169528: tolerable FAIL

2022-04-19 Thread osstest service owner
flight 169528 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/169528/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 169499 test-amd64-amd64-qemuu-nested-amd 20

[ovmf test] 169535: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169535 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169535/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

RE: [PATCH v2 00/10] Device tree based NUMA support for Arm - Part#1

2022-04-19 Thread Wei Chen
Hi, I am sorry, I had added a wrong address--to=xen-devel@lists.xenproject.org in this series' recipient address by mistake. When you reply to this series, please remember to remove it. I'm sorry for the inconvenience again! Cheers, Wei Chen > -Original Message- > From: Wei Chen > Sent:

[PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Jan Beulich
Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX, XEN_DOMCTL_test_assign_device can legitimately end up having NULL passed here, when the domctl was passed DOMID_INVALID. Fixes: 71e617a6b8f6 ("use is_iommu_enabled() where appropriate...") Reported-by: Cheyenne Wills Signed-

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Durrant, Paul
On 19/04/2022 10:39, Jan Beulich wrote: Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX, XEN_DOMCTL_test_assign_device can legitimately end up having NULL passed here, when the domctl was passed DOMID_INVALID. Fixes: 71e617a6b8f6 ("use is_iommu_enabled() where appropriate

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Juergen Gross
On 19.04.22 11:39, Jan Beulich wrote: Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX, XEN_DOMCTL_test_assign_device can legitimately end up having NULL passed here, when the domctl was passed DOMID_INVALID. Fixes: 71e617a6b8f6 ("use is_iommu_enabled() where appropriate..

[ovmf test] 169536: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169536 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169536/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

[PATCH v2] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Juergen Gross
A hypervisor built without CONFIG_GDBSX will crash in case the XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will end up in iommu_do_domctl() with d == NULL: (XEN) CPU:6 (XEN) RIP:e008:[] iommu_do_domctl+0x4/0x30 (XEN) RFLAGS: 00010202 CONTEXT: hypervisor (d0v0)

RE: [PATCH v2 1/6] xen/arm: do not free reserved memory into heap

2022-04-19 Thread Penny Zheng
Hi jan > -Original Message- > From: Jan Beulich > Sent: Tuesday, April 19, 2022 4:59 PM > To: Penny Zheng > Cc: Wei Chen ; Andrew Cooper > ; George Dunlap ; > Julien Grall ; Stefano Stabellini ; > Wei > Liu ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH v2 1/6] xen/arm: do not f

Re: [PATCH v2] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Jan Beulich
On 19.04.2022 12:18, Juergen Gross wrote: > A hypervisor built without CONFIG_GDBSX will crash in case the > XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will > end up in iommu_do_domctl() with d == NULL: > > (XEN) CPU:6 > (XEN) RIP:e008:[] iommu_do_domctl+0x4/0x30 > (XE

Re: [PATCH v2] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Andrew Cooper
On 19/04/2022 11:18, Juergen Gross wrote: > A hypervisor built without CONFIG_GDBSX will crash in case the > XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will > end up in iommu_do_domctl() with d == NULL: > > (XEN) CPU:6 > (XEN) RIP:e008:[] iommu_do_domctl+0x4/0x30 > (XEN

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Andrew Cooper
On 19/04/2022 10:39, Jan Beulich wrote: > Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX, > XEN_DOMCTL_test_assign_device can legitimately end up having NULL passed > here, when the domctl was passed DOMID_INVALID. > > Fixes: 71e617a6b8f6 ("use is_iommu_enabled() where appr

Re: [PATCH v2] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Juergen Gross
On 19.04.22 12:40, Andrew Cooper wrote: On 19/04/2022 11:18, Juergen Gross wrote: A hypervisor built without CONFIG_GDBSX will crash in case the XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will end up in iommu_do_domctl() with d == NULL: (XEN) CPU:6 (XEN) RIP:e008:[]

Re: [PATCH v2] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Jan Beulich
On 19.04.2022 12:40, Andrew Cooper wrote: > On 19/04/2022 11:18, Juergen Gross wrote: >> A hypervisor built without CONFIG_GDBSX will crash in case the >> XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will >> end up in iommu_do_domctl() with d == NULL: >> >> (XEN) CPU:6 >> (XE

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Jan Beulich
On 19.04.2022 12:49, Andrew Cooper wrote: > On 19/04/2022 10:39, Jan Beulich wrote: >> Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX, >> XEN_DOMCTL_test_assign_device can legitimately end up having NULL passed >> here, when the domctl was passed DOMID_INVALID. >> >> Fixes:

[ovmf test] 169538: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169538 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169538/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

Re: [PATCH v2 06/25] x86/xen: Add ANNOTATE_ENDBR to startup_xen()

2022-04-19 Thread Peter Zijlstra
On Tue, Apr 19, 2022 at 11:42:12AM +, Andrew Cooper wrote: > On 18/04/2022 17:50, Josh Poimboeuf wrote: > > The startup_xen() kernel entry point is referenced by the ".note.Xen" > > section, but is presumably not indirect-branched to. > > It's the real entrypoint of the VM.  It's "got to" by s

Re: [PATCH] fix invalid frontend path for set_mtu

2022-04-19 Thread James Dingwall
Hi Anthony, On Tue, Apr 12, 2022 at 02:03:17PM +0100, Anthony PERARD wrote: > Hi James, > > On Tue, Mar 01, 2022 at 09:35:13AM +, James Dingwall wrote: > > The set_mtu() function of xen-network-common.sh currently has this code: > > > > if [ ${type_if} = vif ] > > then > >

Re: [PATCH 08/27] btrfs: use bdev_max_active_zones instead of open coding it

2022-04-19 Thread Anand Jain
On 4/15/22 12:52, Christoph Hellwig wrote: Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Acked-by: David Sterba LGTM. Reviewed-by: Anand Jain --- fs/btrfs/zoned.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zone

Re: [PATCH v2 06/25] x86/xen: Add ANNOTATE_ENDBR to startup_xen()

2022-04-19 Thread Juergen Gross
On 19.04.22 13:57, Peter Zijlstra wrote: On Tue, Apr 19, 2022 at 11:42:12AM +, Andrew Cooper wrote: On 18/04/2022 17:50, Josh Poimboeuf wrote: The startup_xen() kernel entry point is referenced by the ".note.Xen" section, but is presumably not indirect-branched to. It's the real entrypoin

Re: [PATCH v2 06/25] x86/xen: Add ANNOTATE_ENDBR to startup_xen()

2022-04-19 Thread Andrew Cooper
On 19/04/2022 12:57, Peter Zijlstra wrote: > On Tue, Apr 19, 2022 at 11:42:12AM +, Andrew Cooper wrote: >> On 18/04/2022 17:50, Josh Poimboeuf wrote: >>> The startup_xen() kernel entry point is referenced by the ".note.Xen" >>> section, but is presumably not indirect-branched to. >> It's the re

Re: [RFC PATCH 6/6] arm/xen: Assign xen-virtio DMA ops for virtio devices in Xen guests

2022-04-19 Thread Oleksandr
Hello Stefano, Juergen On 18.04.22 22:11, Stefano Stabellini wrote: On Mon, 18 Apr 2022, Oleksandr wrote: On 16.04.22 09:07, Christoph Hellwig wrote: Hello Christoph On Fri, Apr 15, 2022 at 03:02:45PM -0700, Stefano Stabellini wrote: This makes sense overall. Considering that the swiotlb

[ovmf test] 169539: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169539 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169539/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

Re: [RFC PATCH] libxl/arm: Insert "xen,dev-domid" property to virtio-mmio device node

2022-04-19 Thread Oleksandr
On 19.04.22 00:47, Stefano Stabellini wrote: Hello Stefano On Thu, 14 Apr 2022, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This is needed for grant table based DMA ops layer (CONFIG_XEN_VIRTIO) at the guest side to retrieve the ID of Xen domain where the corresponding backend

Re: [PATCH 27/27] direct-io: remove random prefetches

2022-04-19 Thread David Sterba
On Fri, Apr 15, 2022 at 06:52:58AM +0200, Christoph Hellwig wrote: > Randomly poking into block device internals for manual prefetches isn't > exactly a very maintainable thing to do. And none of the performance > criticil direct I/O implementations still use this library function > anyway, so jus

[ovmf test] 169540: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169540 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169540/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

Re: [PATCH v2] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Andrew Cooper
On 19/04/2022 11:51, Juergen Gross wrote: > On 19.04.22 12:40, Andrew Cooper wrote: >> On 19/04/2022 11:18, Juergen Gross wrote: >>> A hypervisor built without CONFIG_GDBSX will crash in case the >>> XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will >>> end up in iommu_do_domctl(

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

2022-04-19 Thread osstest service owner
flight 169537 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/169537/ 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 06/25] x86/xen: Add ANNOTATE_ENDBR to startup_xen()

2022-04-19 Thread Peter Zijlstra
On Tue, Apr 19, 2022 at 01:12:14PM +0100, Andrew Cooper wrote: > > Subject: x86/xen: Add ANNOTATE_ENDBR to startup_xen() > > From: Josh Poimboeuf > > Date: Mon, 18 Apr 2022 09:50:25 -0700 > > > > From: Josh Poimboeuf > > > > The startup_xen() kernel entry point is referenced by the ".note.Xen" >

Re: [PATCH v2] of: of_property_read_string return -ENODATA when !length

2022-04-19 Thread Rob Herring
On Fri, 15 Apr 2022 17:30:28 -0700, Stefano Stabellini wrote: > From: Stefano Stabellini > > When the length of the string is zero of_property_read_string should > return -ENODATA according to the description of the function. > > However, of_property_read_string doesn't check prop->length. If >

[PATCH v3 3/3] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Juergen Gross
Today iommu_do_domctl() is being called from arch_do_domctl() in the "default:" case of a switch statement. This has led already to crashes due to unvalidated parameters. Fix that by moving the call of iommu_do_domctl() to the main switch statement of do_domctl(). Signed-off-by: Juergen Gross --

[PATCH v3 0/3] xen: fix and cleanup domctl handling

2022-04-19 Thread Juergen Gross
A fix of a hypervisor crash in domctl handling and some related cleanup. Juergen Gross (3): xen: fix XEN_DOMCTL_gdbsx_guestmemio crash xen: cleanup gdbsx_guest_mem_io() call xen/iommu: cleanup iommu related domctl handling xen/arch/arm/domctl.c | 11 +-- xen/arch/x86/

[PATCH v3 1/3] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Juergen Gross
A hypervisor built without CONFIG_GDBSX will crash in case the XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will end up in iommu_do_domctl() with d == NULL: (XEN) CPU:6 (XEN) RIP:e008:[] iommu_do_domctl+0x4/0x30 (XEN) RFLAGS: 00010202 CONTEXT: hypervisor (d0v0)

[PATCH v3 2/3] xen: cleanup gdbsx_guest_mem_io() call

2022-04-19 Thread Juergen Gross
Modify the gdbsx_guest_mem_io() interface to take the already known domain pointer as parameter instead of the domid. This enables to remove some more code further down the call tree. Suggested-by: Jan Beulich Signed-off-by: Juergen Gross --- V2: - split off from previous patch (Andrew Cooper) -

Re: [PATCH v2 06/25] x86/xen: Add ANNOTATE_ENDBR to startup_xen()

2022-04-19 Thread Andrew Cooper
On 19/04/2022 14:10, Peter Zijlstra wrote: > On Tue, Apr 19, 2022 at 01:12:14PM +0100, Andrew Cooper wrote: > >>> Subject: x86/xen: Add ANNOTATE_ENDBR to startup_xen() >>> From: Josh Poimboeuf >>> Date: Mon, 18 Apr 2022 09:50:25 -0700 >>> >>> From: Josh Poimboeuf >>> >>> The startup_xen() kernel

Re: [PATCH v2] xen/build: Add cppcheck and cppcheck-html make rules

2022-04-19 Thread Bertrand Marquis
Hi Stefano, > On 16 Apr 2022, at 00:42, Stefano Stabellini wrote: > > On Wed, 13 Apr 2022, Bertrand Marquis wrote: >> cppcheck can be used to check Xen code quality. >> >> To create a report do "make cppcheck" on a built tree adding any options >> you added during the process you used to build

[ovmf test] 169542: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169542 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169542/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

Re: [PATCH v3 1/3] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Jan Beulich
On 19.04.2022 15:52, Juergen Gross wrote: > A hypervisor built without CONFIG_GDBSX will crash in case the > XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will > end up in iommu_do_domctl() with d == NULL: > > (XEN) CPU:6 > (XEN) RIP:e008:[] iommu_do_domctl+0x4/0x30 > (XE

Re: [PATCH v3 2/3] xen: cleanup gdbsx_guest_mem_io() call

2022-04-19 Thread Jan Beulich
On 19.04.2022 15:52, Juergen Gross wrote: > Modify the gdbsx_guest_mem_io() interface to take the already known > domain pointer as parameter instead of the domid. This enables to > remove some more code further down the call tree. > > Suggested-by: Jan Beulich > Signed-off-by: Juergen Gross Re

Re: [PATCH v3 1/3] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Andrew Cooper
On 19/04/2022 14:52, Juergen Gross wrote: > A hypervisor built without CONFIG_GDBSX will crash in case the > XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will > end up in iommu_do_domctl() with d == NULL: > > (XEN) CPU:6 > (XEN) RIP:e008:[] iommu_do_domctl+0x4/0x30 > (XEN

Re: [PATCH v3 3/3] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Jan Beulich
On 19.04.2022 15:52, Juergen Gross wrote: > --- a/xen/common/domctl.c > +++ b/xen/common/domctl.c > @@ -871,6 +871,13 @@ long cf_check > do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) > copyback = 1; > break; > > +case XEN_DOMCTL_assign_device: > +case XEN

Re: [PATCH v3 2/3] xen: cleanup gdbsx_guest_mem_io() call

2022-04-19 Thread Andrew Cooper
On 19/04/2022 14:52, Juergen Gross wrote: > Modify the gdbsx_guest_mem_io() interface to take the already known > domain pointer as parameter instead of the domid. This enables to > remove some more code further down the call tree. > > Suggested-by: Jan Beulich > Signed-off-by: Juergen Gross Rev

Re: [RFC PATCH 6/6] arm/xen: Assign xen-virtio DMA ops for virtio devices in Xen guests

2022-04-19 Thread Juergen Gross
On 19.04.22 14:17, Oleksandr wrote: Hello Stefano, Juergen On 18.04.22 22:11, Stefano Stabellini wrote: On Mon, 18 Apr 2022, Oleksandr wrote: On 16.04.22 09:07, Christoph Hellwig wrote: Hello Christoph On Fri, Apr 15, 2022 at 03:02:45PM -0700, Stefano Stabellini wrote: This makes sense o

Re: [PATCH v3 1/3] xen: fix XEN_DOMCTL_gdbsx_guestmemio crash

2022-04-19 Thread Juergen Gross
On 19.04.22 16:37, Andrew Cooper wrote: On 19/04/2022 14:52, Juergen Gross wrote: A hypervisor built without CONFIG_GDBSX will crash in case the XEN_DOMCTL_gdbsx_guestmemio domctl is being called, as the call will end up in iommu_do_domctl() with d == NULL: (XEN) CPU:6 (XEN) RIP:e008:[]

Re: [PATCH v3 3/3] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Andrew Cooper
On 19/04/2022 14:52, Juergen Gross wrote: > Today iommu_do_domctl() is being called from arch_do_domctl() in the > "default:" case of a switch statement. This has led already to crashes > due to unvalidated parameters. > > Fix that by moving the call of iommu_do_domctl() to the main switch > statem

Re: [PATCH v3 3/3] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Juergen Gross
On 19.04.22 16:51, Andrew Cooper wrote: On 19/04/2022 14:52, Juergen Gross wrote: Today iommu_do_domctl() is being called from arch_do_domctl() in the "default:" case of a switch statement. This has led already to crashes due to unvalidated parameters. Fix that by moving the call of iommu_do_do

[PATCH v1] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-19 Thread David Vrabel
From: David Vrabel Heap pages can only be safely allocated and freed with interuupts enabled as they may require a TLB flush which will send IPIs. Enhance the assertions in alloc_xenheap_pages() and alloc_domheap_pages() to check interrupts are enabled. For consistency the same asserts are used

[PATCH v1] x86/mm: avoid inadvertently degrading a TLB flush to local only

2022-04-19 Thread David Vrabel
From: David Vrabel If the direct map is incorrectly modified with interrupts disabled, the required TLB flushes are degraded to flushing the local CPU only. This could lead to very hard to diagnose problems as different CPUs will end up with different views of memory. Although, no such issues ha

[PATCH v3 0/4] EFI System Resource Table support

2022-04-19 Thread Demi Marie Obenour
This adds support for the EFI System Resource Table. This involves reserving the table in Xen and adding a new hypercall so that dom0 can access it. Changes since v2: - Use the esrt_desc global variable instead of passing it as a function parameter - Add an overflow check for the ESRT size - C

[PATCH v3 1/4] Grab the EFI System Resource Table and check it

2022-04-19 Thread Demi Marie Obenour
The EFI System Resource Table (ESRT) is necessary for fwupd to identify firmware updates to install. According to the UEFI specification §23.4, the table shall be stored in memory of type EfiBootServicesData. Therefore, Xen must avoid reusing that memory for other purposes, so that Linux can acces

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Andrew Cooper
On 19/04/2022 11:59, Jan Beulich wrote: > On 19.04.2022 12:49, Andrew Cooper wrote: >> On 19/04/2022 10:39, Jan Beulich wrote: >> Furthermore, under what circumstances is test_assign_device legitimate >> when passing DOMID_INVALID ?  This has been broken for 3 years now >> without report, so it's c

[ovmf test] 169543: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169543 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169543/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

[PATCH v3 1/4] Grab the EFI System Resource Table and check it

2022-04-19 Thread Demi Marie Obenour
The EFI System Resource Table (ESRT) is necessary for fwupd to identify firmware updates to install. According to the UEFI specification §23.4, the table shall be stored in memory of type EfiBootServicesData. Therefore, Xen must avoid reusing that memory for other purposes, so that Linux can acces

[PATCH v3 2/4] Add a dedicated memory region for the ESRT

2022-04-19 Thread Demi Marie Obenour
This allows the ESRT to be marked as reserved without having to waste a potentially large amount of memory. This patch assumes that Xen can handle memory regions that are not page-aligned. If it cannot, additional code will need to be added to align the regions. --- xen/arch/x86/efi/efi-boot.h

[PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Paran Lee
GCC with "-g -Wall -Wextra" option throws warning message as below: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare] Silence the warning by correcting the integer type. Signed-off-by: Paran Lee --- xen/arch/arm/gic-v3.c | 5 +++-

[PATCH] xen/device_tree: silence ambiguous integer casting warning error

2022-04-19 Thread Paran Lee
GCC with "-g -Wall -Wextra" option throws warning message as below: error: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare] Silence the warning by correcting the integer type. Signed-off-by: Paran Lee --- xen/common/device_tree.c | 31

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Andrew Cooper
On 19/04/2022 10:39, Jan Beulich wrote: > Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX, > XEN_DOMCTL_test_assign_device can legitimately end up having NULL passed > here, when the domctl was passed DOMID_INVALID. > > Fixes: 71e617a6b8f6 ("use is_iommu_enabled() where appr

[PATCH v3 3/4] Add a new hypercall to get the ESRT

2022-04-19 Thread Demi Marie Obenour
This hypercall can be used to get the ESRT from the hypervisor. It returning successfully also indicates that Xen has reserved the ESRT and it can safely be parsed by dom0. --- xen/common/efi/boot.c | 15 ++- xen/common/efi/efi.h | 2 ++ xen/common/efi/runtime.c

Re: [PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Julien Grall
Hi, On Tue, 19 Apr 2022, 15:41 Paran Lee, wrote: > GCC with "-g -Wall -Wextra" option throws warning message as below: Which version of the compiler? Also you specify the exact cflags, did you tweak Xen? > error: comparison of integer expressions of different signedness: > ‘int’ and ‘unsign

[PATCH v3 4/4] Add emacs file-local variables

2022-04-19 Thread Demi Marie Obenour
These were very helpful for me when I was working on the code. --- xen/common/efi/boot.c| 10 ++ xen/common/efi/runtime.c | 10 ++ 2 files changed, 20 insertions(+) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index 01b2409c5e..5415785bef 100644 --- a/xen/common/

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Juergen Gross
On 19.04.22 17:48, Andrew Cooper wrote: On 19/04/2022 10:39, Jan Beulich wrote: Besides the reporter's issue of hitting a NULL deref when !CONFIG_GDBSX, XEN_DOMCTL_test_assign_device can legitimately end up having NULL passed here, when the domctl was passed DOMID_INVALID. Fixes: 71e617a6b8f6 (

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Andrew Cooper
On 19/04/2022 16:52, Juergen Gross wrote: > On 19.04.22 17:48, Andrew Cooper wrote: >> On 19/04/2022 10:39, Jan Beulich wrote: >>> Besides the reporter's issue of hitting a NULL deref when >>> !CONFIG_GDBSX, >>> XEN_DOMCTL_test_assign_device can legitimately end up having NULL >>> passed >>> here,

Re: [PATCH V7 2/2] libxl: Introduce basic virtio-mmio support on Arm

2022-04-19 Thread Oleksandr
On 19.04.22 00:41, Stefano Stabellini wrote: Hello Stefano On Fri, 8 Apr 2022, Oleksandr Tyshchenko wrote: From: Julien Grall This patch introduces helpers to allocate Virtio MMIO params (IRQ and memory region) and create specific device node in the Guest device-tree with allocated params

Re: [PATCH] IOMMU: make domctl handler tolerate NULL domain

2022-04-19 Thread Jan Beulich
On 19.04.2022 17:39, Andrew Cooper wrote: > On 19/04/2022 11:59, Jan Beulich wrote: >> On 19.04.2022 12:49, Andrew Cooper wrote: >>> On 19/04/2022 10:39, Jan Beulich wrote: >>> Furthermore, under what circumstances is test_assign_device legitimate >>> when passing DOMID_INVALID ?  This has been bro

Re: [PATCH v3 3/3] xen/iommu: cleanup iommu related domctl handling

2022-04-19 Thread Jan Beulich
On 19.04.2022 16:56, Juergen Gross wrote: > On 19.04.22 16:51, Andrew Cooper wrote: >> On 19/04/2022 14:52, Juergen Gross wrote: >>> Today iommu_do_domctl() is being called from arch_do_domctl() in the >>> "default:" case of a switch statement. This has led already to crashes >>> due to unvalidated

Re: [PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Paran Lee
Hi, Julien Grall. Thank you for checking it out. I'm sorry I forgot to attach the make log as well. My build configuration (include CFLGAS) export ARCH=arm64 export XEN_TARGET_ARCH=arm64 export $(dpkg-architecture -aarm64); export CROSS_COMPILE=aarch64-linux-gnu- export CFLAGS="-g -Wall -Wextra

Re: [PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Julien Grall
On Tue, 19 Apr 2022, 16:31 Paran Lee, wrote: > Hi, Julien Grall. > > Thank you for checking it out. I'm sorry I forgot to attach the make log > as well. > Thanks for the logs! > My build configuration (include CFLGAS) > > export ARCH=arm64 > export XEN_TARGET_ARCH=arm64 > export $(dpkg-archit

Re: [PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Paran Lee
Debugging with GDB from head.S with QEMU runtime was very convenient for analysis(linux). so I have trying it in Xen. As I built it. Wouldn't it be helpful if I fixed the code little by little? 2022-04-20 오전 1:31에 Paran Lee 이(가) 쓴 글: > Hi, Julien Grall. > > Thank you for checking it out. I'm sor

Re: [RFC PATCH 6/6] arm/xen: Assign xen-virtio DMA ops for virtio devices in Xen guests

2022-04-19 Thread Oleksandr
Hello Stefano, Juergen On 19.04.22 17:48, Juergen Gross wrote: On 19.04.22 14:17, Oleksandr wrote: Hello Stefano, Juergen On 18.04.22 22:11, Stefano Stabellini wrote: On Mon, 18 Apr 2022, Oleksandr wrote: On 16.04.22 09:07, Christoph Hellwig wrote: Hello Christoph On Fri, Apr 15, 202

Re: [PATCH V7 1/2] libxl: Add support for Virtio disk configuration

2022-04-19 Thread Oleksandr
On 19.04.22 00:38, Stefano Stabellini wrote: Hello Stefano From: Oleksandr Tyshchenko This patch adds basic support for configuring and assisting virtio-mmio based virtio-disk backend (emualator) which is intended to run out of ^ emulator ok) -- Regards,

Re: [PATCH] xen/evtchn: Add design for static event channel signaling for domUs..

2022-04-19 Thread Rahul Singh
Hello Stefano, > On 14 Apr 2022, at 2:14 am, Stefano Stabellini wrote: > > On Mon, 11 Apr 2022, Bertrand Marquis wrote: >> What you mention here is actually combining 2 different solutions inside >> Xen to build a custom communication solution. >> My assumption here is that the user will actuall

Re: [PATCH] xen/arm: silence ambiguous integer casting warning error

2022-04-19 Thread Julien Grall
Hi, On Tue, 19 Apr 2022, 17:09 Paran Lee, wrote: > Debugging with GDB from head.S with QEMU runtime was very convenient for > analysis(linux). so I have trying it in Xen. As I built it. > I don't understand how this is related to adding extra cflags. Can you clarify it? > Wouldn't it be helpf

[ovmf test] 169544: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169544 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169544/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

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

2022-04-19 Thread osstest service owner
flight 169541 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/169541/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-debianhvm-i386-xsm 12 debian-hvm-install fail like 169412 test-amd64-amd64-xl-qemut-win7

[ovmf test] 169548: regressions - FAIL

2022-04-19 Thread osstest service owner
flight 169548 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/169548/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

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

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

[PATCH v2] xen: Convert kmap() to kmap_local_page()

2022-04-19 Thread Alaa Mohamed
kmap() is being deprecated and these usages are all local to the thread so there is no reason kmap_local_page() can't be used. Replace kmap() calls with kmap_local_page(). Signed-off-by: Alaa Mohamed --- changes in V2: -edit commit subject -edit commit message --- drivers/xen/gn

Re: [PATCH V7 2/2] libxl: Introduce basic virtio-mmio support on Arm

2022-04-19 Thread Stefano Stabellini
On Tue, 19 Apr 2022, Oleksandr wrote: > On 19.04.22 00:41, Stefano Stabellini wrote: > Hello Stefano > > > On Fri, 8 Apr 2022, Oleksandr Tyshchenko wrote: > > > From: Julien Grall > > > > > > This patch introduces helpers to allocate Virtio MMIO params > > > (IRQ and memory region) and create sp

  1   2   >