Re: [PATCH 3/3] usb: xhci: Notify xen when DbC is unsafe to use

2021-05-12 Thread Greg Kroah-Hartman
On Tue, May 11, 2021 at 06:18:21PM -0600, Connor Davis wrote: > When running as a dom0 guest on Xen, check if the USB3 debug > capability is enabled before xHCI reset, suspend, and resume. If it > is, call xen_dbgp_reset_prep() to notify Xen that it is unsafe to touch > MMIO registers until the nex

[qemu-mainline test] 161907: regressions - FAIL

2021-05-12 Thread osstest service owner
flight 161907 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/161907/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-qemuu-freebsd11-amd64 16 guest-saverestore fail REGR. vs. 152631 test-amd64-i3

Re: [PATCH 1/2] xen/arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required

2021-05-12 Thread Christoph Hellwig
> -int xen_swiotlb_detect(void) > -{ > - if (!xen_domain()) > - return 0; > - if (xen_feature(XENFEAT_direct_mapped)) > - return 1; > - /* legacy case */ > - if (!xen_feature(XENFEAT_not_direct_mapped) && xen_initial_domain()) > - return 1; > -

Re: [PATCH v5 3/3] docs/doxygen: doxygen documentation for grant_table.h

2021-05-12 Thread Luca Fancellu
> On 11 May 2021, at 22:58, Stefano Stabellini wrote: > > On Thu, 6 May 2021, Jan Beulich wrote: >> An alternative to correcting the (as it seems) v2 related issues, it >> may be worth considering to extract only v1 documentation in this >> initial phase. > > FWIW I agree with Jan that "grant

[xen-unstable-coverity test] 161916: all pass - PUSHED

2021-05-12 Thread osstest service owner
flight 161916 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/161916/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen d4fb5f166c2bfbaf9ba0de69da0d411288f437a9 baseline version: xen a7da

Re: [PATCH v2 00/17] live update and gnttab patches

2021-05-12 Thread Edwin Torok
On Tue, 2021-05-11 at 21:05 +0100, Andrew Cooper wrote: > On 11/05/2021 19:05, Edwin Török wrote: > > These patches have been posted previously. > > The gnttab patches (tools/ocaml/libs/mmap) were not applied at the > > time > > to avoid conflicts with an in-progress XSA. > > The binary format live

[xen-unstable test] 161909: regressions - FAIL

2021-05-12 Thread osstest service owner
flight 161909 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/161909/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvopsbroken in 161904 build-arm64

[libvirt test] 161913: regressions - FAIL

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

[linux-5.4 test] 161910: FAIL

2021-05-12 Thread osstest service owner
flight 161910 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/161910/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64 broken in 161905 build-arm64-

Re: [PATCH v2 00/17] live update and gnttab patches

2021-05-12 Thread Andrew Cooper
On 12/05/2021 11:10, Edwin Torok wrote: > On Tue, 2021-05-11 at 21:05 +0100, Andrew Cooper wrote: >> On 11/05/2021 19:05, Edwin Török wrote: >>> These patches have been posted previously. >>> The gnttab patches (tools/ocaml/libs/mmap) were not applied at the >>> time >>> to avoid conflicts with an

Re: [PATCH v2 17/17] tools/ocaml/libs/mmap: Clean up unused read/write

2021-05-12 Thread Andrew Cooper
On 11/05/2021 19:05, Edwin Török wrote: > diff --git a/tools/ocaml/libs/mmap/xenmmap.ml > b/tools/ocaml/libs/mmap/xenmmap.ml > index af258942a0..e17a62e607 100644 > --- a/tools/ocaml/libs/mmap/xenmmap.ml > +++ b/tools/ocaml/libs/mmap/xenmmap.ml > @@ -24,11 +24,6 @@ type mmap_map_flag = SHARED | PR

Re: [PATCH 2/3] xen: Export dbgp functions when CONFIG_XEN_DOM0 is enabled

2021-05-12 Thread Boris Ostrovsky
On 5/11/21 8:18 PM, Connor Davis wrote: > Export xen_dbgp_reset_prep and xen_dbgp_external_startup > when CONFIG_XEN_DOM0 is defined. This allows use of these symbols > even if CONFIG_EARLY_PRINK_DBGP is defined. > > Signed-off-by: Connor Davis > --- > drivers/xen/dbgp.c | 2 +- Unrelated to y

Re: [PATCH RFCv2 02/15] xen/arm: lpae: Use the generic helpers to defined the Xen PT helpers

2021-05-12 Thread Julien Grall
Hi Stefano, On 11/05/2021 23:26, Stefano Stabellini wrote: On Sun, 25 Apr 2021, Julien Grall wrote: From: Julien Grall Currently, Xen PT helpers are only working with 4KB page granularity and open-code the generic helpers. To allow more flexibility, we can re-use the generic helpers and pass

[ovmf test] 161912: all pass - PUSHED

2021-05-12 Thread osstest service owner
flight 161912 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/161912/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 5531fd48ded1271b8775725355ab83994e4bc77c baseline version: ovmf 4e5ecdbac8bdf235b2072

Re: [PATCH RFCv2 03/15] xen/arm: p2m: Replace level_{orders, masks} arrays with LEVEL_{ORDER, MASK}

2021-05-12 Thread Julien Grall
Hi Stefano, On 11/05/2021 23:33, Stefano Stabellini wrote: On Sun, 25 Apr 2021, Julien Grall wrote: From: Julien Grall The array level_orders and level_masks can be replaced with the recently introduced macros LEVEL_ORDER and LEVEL_MASK. Signed-off-by: Julien Grall So you actually planned

[PATCH v4] tools/libs/store: cleanup libxenstore interface

2021-05-12 Thread Juergen Gross
There are some internals in the libxenstore interface which should be removed. Move those functions into xs_lib.c and the related definitions into xs_lib.h. Remove the functions from the mapfile. Add xs_lib.o to xenstore_client as some of the internal functions are needed there. Bump the libxenst

Re: [PATCH v2] tools: remove unused sysconfig variable XENSTORED_ROOTDIR

2021-05-12 Thread Andrew Cooper
On 06/05/2021 17:49, Andrew Cooper wrote: > On 06/05/2021 16:16, Olaf Hering wrote: >> The sysconfig variable XENSTORED_ROOTDIR is not used anymore. >> It used to point to a directory with tdb files, which is now a tmpfs. >> >> In case the database is not in tmpfs, like on sysv and BSD systems, >>

Re: [PATCH 2/3] xen: Export dbgp functions when CONFIG_XEN_DOM0 is enabled

2021-05-12 Thread Connor Davis
On May 12, 21, Boris Ostrovsky wrote: > > On 5/11/21 8:18 PM, Connor Davis wrote: > > Export xen_dbgp_reset_prep and xen_dbgp_external_startup > > when CONFIG_XEN_DOM0 is defined. This allows use of these symbols > > even if CONFIG_EARLY_PRINK_DBGP is defined. > > > > Signed-off-by: Connor Davis >

Re: [PATCH 3/3] usb: xhci: Notify xen when DbC is unsafe to use

2021-05-12 Thread Connor Davis
On May 12, 21, Greg Kroah-Hartman wrote: > On Tue, May 11, 2021 at 06:18:21PM -0600, Connor Davis wrote: > > When running as a dom0 guest on Xen, check if the USB3 debug > > capability is enabled before xHCI reset, suspend, and resume. If it > > is, call xen_dbgp_reset_prep() to notify Xen that it

Re: [PATCH 2/3] xen: Export dbgp functions when CONFIG_XEN_DOM0 is enabled

2021-05-12 Thread Connor Davis
On May 12, 21, Juergen Gross wrote: > On 12.05.21 02:18, Connor Davis wrote: > > Export xen_dbgp_reset_prep and xen_dbgp_external_startup > > when CONFIG_XEN_DOM0 is defined. This allows use of these symbols > > even if CONFIG_EARLY_PRINK_DBGP is defined. > > > > Signed-off-by: Connor Davis > > Ac

Re: [PATCH v2 00/17] live update and gnttab patches

2021-05-12 Thread Edwin Torok
On Wed, 2021-05-12 at 13:51 +0100, Andrew Cooper wrote: > On 12/05/2021 11:10, Edwin Torok wrote: > > On Tue, 2021-05-11 at 21:05 +0100, Andrew Cooper wrote: > > > > > diff --git a/tools/ocaml/xenstored/disk.ml > > b/tools/ocaml/xenstored/disk.ml > > index 59794324e1..b7678af87f 100644 > > --- a/t

Re: [PATCH v2] tools: remove unused sysconfig variable XENSTORED_ROOTDIR

2021-05-12 Thread Olaf Hering
Am Wed, 12 May 2021 15:52:16 +0100 schrieb Andrew Cooper : > Olaf: View on the above? I'm fine with the additional CHANGELOG.md change. I thought the suggested addition is obvious. Olaf pgp5D6yxfm7Mk.pgp Description: Digitale Signatur von OpenPGP

Re: [PATCH 2/3] xen: Export dbgp functions when CONFIG_XEN_DOM0 is enabled

2021-05-12 Thread Boris Ostrovsky
On 5/12/21 10:58 AM, Connor Davis wrote: > On May 12, 21, Boris Ostrovsky wrote: >> Unrelated to your patch but since you are fixing things around that file --- >> should we return -EPERM in xen_dbgp_op() when !xen_initial_domain()? > Yeah looks like it. That would make patch 3 simpler too. > Do

Re: [PATCH v2] tools: remove unused sysconfig variable XENSTORED_ROOTDIR

2021-05-12 Thread Andrew Cooper
On 12/05/2021 16:07, Olaf Hering wrote: > Am Wed, 12 May 2021 15:52:16 +0100 > schrieb Andrew Cooper : > >> Olaf: View on the above? > I'm fine with the additional CHANGELOG.md change. > I thought the suggested addition is obvious. Thanks, but as I'm folding it into your patch, I shouldn't do it u

[PATCH] include/public: add RING_RESPONSE_PROD_OVERFLOW macro

2021-05-12 Thread Juergen Gross
Add a new RING_RESPONSE_PROD_OVERFLOW() macro for being able to detect an ill-behaved backend tampering with the response producer index. Signed-off-by: Juergen Gross --- xen/include/public/io/ring.h | 4 1 file changed, 4 insertions(+) diff --git a/xen/include/public/io/ring.h b/xen/inclu

[linux-linus test] 161911: regressions - FAIL

2021-05-12 Thread osstest service owner
flight 161911 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/161911/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-debianhvm-amd64 7 xen-install fail REGR. vs. 152332 test-amd64-i386-xl-

[PATCH] xen/arm: gic-v3: Add missing breaks gicv3_read_apr()

2021-05-12 Thread Julien Grall
From: Julien Grall Commit 78e67c99eb3f "arm/gic: Get rid of READ/WRITE_SYSREG32" mistakenly converted all the cases in gicv3_read_apr() to fall-through. Rather than re-instating a return per case, add the missing break and keep a single return at the end of the fucntion. Fixes: 78e67c99eb3f ("a

Re: [PATCH v3 10/10] arm64: Change type of hsr, cpsr, spsr_el1 to uint64_t

2021-05-12 Thread Julien Grall
Hi, On 11/05/2021 07:37, Michal Orzel wrote: On 05.05.2021 10:00, Jan Beulich wrote: On 05.05.2021 09:43, Michal Orzel wrote: --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h @@ -267,10 +267,10 @@ struct vcpu_guest_core_regs /* Return address and mode */

Re: [PATCH v3 10/10] arm64: Change type of hsr, cpsr, spsr_el1 to uint64_t

2021-05-12 Thread Andrew Cooper
On 12/05/2021 18:59, Julien Grall wrote: > Hi, > > On 11/05/2021 07:37, Michal Orzel wrote: >> On 05.05.2021 10:00, Jan Beulich wrote: >>> On 05.05.2021 09:43, Michal Orzel wrote: --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h @@ -267,10 +267,10 @@ struct vcp

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

2021-05-12 Thread osstest service owner
flight 161921 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/161921/ 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 1/2] xen/arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required

2021-05-12 Thread Stefano Stabellini
On Wed, 12 May 2021, Christoph Hellwig wrote: > > -int xen_swiotlb_detect(void) > > -{ > > - if (!xen_domain()) > > - return 0; > > - if (xen_feature(XENFEAT_direct_mapped)) > > - return 1; > > - /* legacy case */ > > - if (!xen_feature(XENFEAT_not_direct_mapped) && xen_

Re: [PATCH 2/2] xen/swiotlb: check if the swiotlb has already been initialized

2021-05-12 Thread Stefano Stabellini
On Tue, 11 May 2021, Boris Ostrovsky wrote: > On 5/11/21 1:41 PM, Stefano Stabellini wrote: > > --- a/drivers/xen/swiotlb-xen.c > > +++ b/drivers/xen/swiotlb-xen.c > > @@ -164,6 +164,11 @@ int __ref xen_swiotlb_init(void) > > int rc = -ENOMEM; > > char *start; > > > > + if (io_tlb_defau

[PATCH v2 0/3] swiotlb-xen init fixes

2021-05-12 Thread Stefano Stabellini
Hi all, This short patch series comes with a preparation patch and 2 unrelated fixes to swiotlb-xen initialization. Christoph Hellwig (1): arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required Stefano Stabellini (2): xen/arm: move xen_swiotlb_detect to arm/swiotlb-xen.h

[PATCH v2 2/3] arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required

2021-05-12 Thread Stefano Stabellini
From: Christoph Hellwig Although SWIOTLB_NO_FORCE is meant to allow later calls to swiotlb_init, today dma_direct_map_page returns error if SWIOTLB_NO_FORCE. For now, without a larger overhaul of SWIOTLB_NO_FORCE, the best we can do is to avoid setting SWIOTLB_NO_FORCE in mem_init when we know t

[PATCH v2 3/3] xen/swiotlb: check if the swiotlb has already been initialized

2021-05-12 Thread Stefano Stabellini
From: Stefano Stabellini xen_swiotlb_init calls swiotlb_late_init_with_tbl, which fails with -ENOMEM if the swiotlb has already been initialized. Add an explicit check io_tlb_default_mem != NULL at the beginning of xen_swiotlb_init. If the swiotlb is already initialized print a warning and retur

[PATCH v2 1/3] xen/arm: move xen_swiotlb_detect to arm/swiotlb-xen.h

2021-05-12 Thread Stefano Stabellini
From: Stefano Stabellini Move xen_swiotlb_detect to a static inline function to make it available to !CONFIG_XEN builds. CC: boris.ostrov...@oracle.com CC: jgr...@suse.com Signed-off-by: Stefano Stabellini --- Changes in v2: - patch split --- arch/arm/xen/mm.c | 12 i

Re: [PATCH] xen/arm: gic-v3: Add missing breaks gicv3_read_apr()

2021-05-12 Thread Stefano Stabellini
On Wed, 12 May 2021, Julien Grall wrote: > From: Julien Grall > > Commit 78e67c99eb3f "arm/gic: Get rid of READ/WRITE_SYSREG32" > mistakenly converted all the cases in gicv3_read_apr() to fall-through. > > Rather than re-instating a return per case, add the missing break and > keep a single retu

Re: [PATCH RFCv2 02/15] xen/arm: lpae: Use the generic helpers to defined the Xen PT helpers

2021-05-12 Thread Stefano Stabellini
On Wed, 12 May 2021, Julien Grall wrote: > Hi Stefano, > > On 11/05/2021 23:26, Stefano Stabellini wrote: > > On Sun, 25 Apr 2021, Julien Grall wrote: > > > From: Julien Grall > > > > > > Currently, Xen PT helpers are only working with 4KB page granularity > > > and open-code the generic helpers

Re: [PATCH RFCv2 07/15] xen/arm: mm: Re-implement early_fdt_map() using map_pages_to_xen()

2021-05-12 Thread Stefano Stabellini
On Sun, 25 Apr 2021, Julien Grall wrote: > From: Julien Grall > > Now that map_pages_to_xen() has been extended to support 2MB mappings, > we can replace the create_mappings() calls by map_pages_to_xen() calls. > > The mapping can also be marked read-only has Xen as no business to > modify the h

Re: [PATCH RFCv2 08/15] xen/arm32: mm: Check if the virtual address is shared before updating it

2021-05-12 Thread Stefano Stabellini
On Sun, 25 Apr 2021, Julien Grall wrote: > From: Julien Grall > > Only the first 2GB of the virtual address space is shared between all > the page-tables on Arm32. > > There is a long outstanding TODO in xen_pt_update() stating that the > function is can only work with shared mapping. Nobody has

Re: [PATCH RFCv2 09/15] xen/arm32: mm: Re-implement setup_xenheap_mappings() using map_pages_to_xen()

2021-05-12 Thread Stefano Stabellini
On Sun, 25 Apr 2021, Julien Grall wrote: > From: Julien Grall > > Now that map_pages_to_xen() has been extended to support 2MB mappings, > we can replace the create_mappings() call by map_pages_to_xen() call. > > Signed-off-by: Julien Grall > > --- > Changes in v2: > - New patch >

Re: [PATCH RFCv2 02/15] xen/arm: lpae: Use the generic helpers to defined the Xen PT helpers

2021-05-12 Thread Julien Grall
Hi Stefano, On 12/05/2021 22:30, Stefano Stabellini wrote: On Wed, 12 May 2021, Julien Grall wrote: +#define LPAE_SHIFT LPAE_SHIFT_GS(PAGE_SHIFT) +#define LPAE_ENTRIESLPAE_ENTRIES_GS(PAGE_SHIFT) +#define LPAE_ENTRY_MASK LPAE_ENTRY_MASK_GS(PAGE_SHIFT) +#define LEVEL_SHIFT(l

Re: [PATCH RFCv2 07/15] xen/arm: mm: Re-implement early_fdt_map() using map_pages_to_xen()

2021-05-12 Thread Julien Grall
Hi Stefano, On 12/05/2021 22:41, Stefano Stabellini wrote: On Sun, 25 Apr 2021, Julien Grall wrote: From: Julien Grall Now that map_pages_to_xen() has been extended to support 2MB mappings, we can replace the create_mappings() calls by map_pages_to_xen() calls. The mapping can also be marked

Re: [PATCH RFCv2 08/15] xen/arm32: mm: Check if the virtual address is shared before updating it

2021-05-12 Thread Julien Grall
Hi Stefano, On 12/05/2021 23:00, Stefano Stabellini wrote: On Sun, 25 Apr 2021, Julien Grall wrote: From: Julien Grall Only the first 2GB of the virtual address space is shared between all the page-tables on Arm32. There is a long outstanding TODO in xen_pt_update() stating that the function

Re: [PATCH RFCv2 10/15] xen/arm: mm: Allocate xen page tables in domheap rather than xenheap

2021-05-12 Thread Stefano Stabellini
On Sun, 25 Apr 2021, Julien Grall wrote: > From: Julien Grall > > xen_{un,}map_table() already uses the helper to map/unmap pages > on-demand (note this is currently a NOP on arm64). So switching to > domheap don't have any disavantage. > > But this as the benefit: > - to keep the page table

[qemu-mainline test] 161915: regressions - FAIL

2021-05-12 Thread osstest service owner
flight 161915 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/161915/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-qemuu-freebsd11-amd64 16 guest-saverestore fail REGR. vs. 152631 test-amd64-i3

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

2021-05-12 Thread osstest service owner
flight 161923 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/161923/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

[xen-unstable test] 161917: regressions - FAIL

2021-05-12 Thread osstest service owner
flight 161917 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/161917/ 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. 161898 test-arm64-arm64-x

Re: [PATCH v2 1/3] xen/arm: move xen_swiotlb_detect to arm/swiotlb-xen.h

2021-05-12 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 3/3] xen/swiotlb: check if the swiotlb has already been initialized

2021-05-12 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig