Re: [PATCH] xen: fix broken tainted value in mark_page_free

2021-09-16 Thread Jan Beulich
On 17.09.2021 04:48, Penny Zheng wrote: > Commit 540a637c3410780b519fc055f432afe271f642f8 defines a new > helper mark_page_free to extract common codes, but it broke the > local variable "tainted", revealed by Coverity ID 1491872. Instead of mentioning the ID here, please ... > This patch let mar

Re: [PATCH] modify acquire_domstatic_pages to take an unsigned int size parameter

2021-09-16 Thread Jan Beulich
On 16.09.2021 22:47, Stefano Stabellini wrote: > acquire_domstatic_pages currently takes an unsigned long nr_mfns > parameter, but actually it cannot handle anything larger than an > unsigned int nr_mfns. That's because acquire_domstatic_pages is based on > assign_pages which also takes an unsigned

Re: [PATCH] xen/x86: fix PV trap handling on secondary processors

2021-09-16 Thread Jan Beulich
On 17.09.2021 08:47, Juergen Gross wrote: > On 17.09.21 08:40, Jan Beulich wrote: >> On 17.09.2021 03:34, Boris Ostrovsky wrote: >>> >>> On 9/16/21 11:04 AM, Jan Beulich wrote: { const struct desc_ptr *desc = this_cpu_ptr(&idt_desc); + unsigned i, count = (desc->size + 1) / siz

Re: [PATCH] xen/x86: fix PV trap handling on secondary processors

2021-09-16 Thread Juergen Gross
On 17.09.21 08:40, Jan Beulich wrote: On 17.09.2021 03:34, Boris Ostrovsky wrote: On 9/16/21 11:04 AM, Jan Beulich wrote: { const struct desc_ptr *desc = this_cpu_ptr(&idt_desc); + unsigned i, count = (desc->size + 1) / sizeof(gate_desc); - xen_convert_trap_info(desc, traps)

Re: [PATCH 2/2] arm/efi: Use dom0less configuration when using EFI boot

2021-09-16 Thread Jan Beulich
On 16.09.2021 22:16, Stefano Stabellini wrote: > On Thu, 16 Sep 2021, Jan Beulich wrote: >> On 16.09.2021 17:07, Luca Fancellu wrote: >>> I explain here my understanding on dom0less, this feature is used to start >>> domUs at >>> Xen boot in parallel, the name is misleading but it doesn’t require

Re: [PATCH] xen/x86: fix PV trap handling on secondary processors

2021-09-16 Thread Jan Beulich
On 17.09.2021 03:34, Boris Ostrovsky wrote: > > On 9/16/21 11:04 AM, Jan Beulich wrote: >> { >> const struct desc_ptr *desc = this_cpu_ptr(&idt_desc); >> +unsigned i, count = (desc->size + 1) / sizeof(gate_desc); >> >> -xen_convert_trap_info(desc, traps); > > > Can you instead ad

[PATCH net][RESEND] xen-netback: correct success/error reporting for the SKB-with-fraglist case

2021-09-16 Thread Jan Beulich
When re-entering the main loop of xenvif_tx_check_gop() a 2nd time, the special considerations for the head of the SKB no longer apply. Don't mistakenly report ERROR to the frontend for the first entry in the list, even if - from all I can tell - this shouldn't matter much as the overall transmit w

Re: Ping²: [PATCH] xen-netback: correct success/error reporting for the SKB-with-fraglist case

2021-09-16 Thread Jan Beulich
On 16.09.2021 23:48, Sander Eikelenboom wrote: > On 16/09/2021 20:34, Paul Durrant wrote: >> On 16/09/2021 16:45, Jan Beulich wrote: >>> On 15.07.2021 10:58, Jan Beulich wrote: On 20.05.2021 13:46, Jan Beulich wrote: > On 25.02.2021 17:23, Paul Durrant wrote: >> On 25/02/2021 14:00, Ja

Re: [PATCH v1] domctl: hold domctl lock while domain is destroyed

2021-09-16 Thread Jan Beulich
On 16.09.2021 19:52, Andrew Cooper wrote: > On 16/09/2021 13:30, Jan Beulich wrote: >> On 16.09.2021 13:10, Dmitry Isaikin wrote: >>> From: Dmitry Isaykin >>> >>> This significantly speeds up concurrent destruction of multiple domains on >>> x86. >> This effectively is a simplistic revert of 228a

Re: [PATCH 09/11] xen/arm: Setup MMIO range trap handlers for hardware domain

2021-09-16 Thread Oleksandr Andrushchenko
Hi, Rahul! On 15.09.21 23:33, Stefano Stabellini wrote: > On Wed, 15 Sep 2021, Rahul Singh wrote: >> Hi Oleksandr, Stefano, >> >>> On 15 Sep 2021, at 6:30 am, Oleksandr Andrushchenko >>> wrote: >>> >>> Hi, Rahul! >>> >>> On 14.09.21 17:24, Oleksandr Andrushchenko wrote: } >>+static

[PATCH] Xen/gntdev: don't ignore kernel unmapping error

2021-09-16 Thread Jan Beulich
While working on XSA-361 and its follow-ups, I failed to spot another place where the kernel mapping part of an operation was not treated the same as the user space part. Detect and propagate errors and add a 2nd pr_debug(). Signed-off-by: Jan Beulich --- It is of course questionable whether zapp

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

2021-09-16 Thread osstest service owner
flight 165018 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/165018/ 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] xen: fix broken tainted value in mark_page_free

2021-09-16 Thread Penny Zheng
Commit 540a637c3410780b519fc055f432afe271f642f8 defines a new helper mark_page_free to extract common codes, but it broke the local variable "tainted", revealed by Coverity ID 1491872. This patch let mark_page_free() return boolean value of variable "tainted" and rename local variable "tainted" to

[linux-5.4 test] 165011: regressions - FAIL

2021-09-16 Thread osstest service owner
flight 165011 linux-5.4 real [real] flight 165020 linux-5.4 real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/165011/ http://logs.test-lab.xenproject.org/osstest/logs/165020/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: t

[ovmf test] 165013: all pass - PUSHED

2021-09-16 Thread osstest service owner
flight 165013 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/165013/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf ac6388add4ade3ae5c4036ea6c2ce9c8d301d057 baseline version: ovmf f4e72cf9d665a8f1a5417

Re: [PATCH] xen/x86: drop redundant zeroing from cpu_initialize_context()

2021-09-16 Thread Boris Ostrovsky
On 9/16/21 11:05 AM, Jan Beulich wrote: > Just after having obtained the pointer from kzalloc() there's no reason > at all to set part of the area to all zero yet another time. Similarly > there's no point explicitly clearing "ldt_ents". > > Signed-off-by: Jan Beulich Reviewed-by: Boris Ostrov

Re: [PATCH] xen/x86: fix PV trap handling on secondary processors

2021-09-16 Thread Boris Ostrovsky
On 9/16/21 11:04 AM, Jan Beulich wrote: > { > const struct desc_ptr *desc = this_cpu_ptr(&idt_desc); > + unsigned i, count = (desc->size + 1) / sizeof(gate_desc); > > - xen_convert_trap_info(desc, traps); Can you instead add a boolean parameter to xen_convert_trap_info() to ind

Re: [PATCH V2 3/3] libxl/arm: Add handling of extended regions for DomU

2021-09-16 Thread Stefano Stabellini
On Fri, 10 Sep 2021, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > The extended region (safe range) is a region of guest physical > address space which is unused and could be safely used to create > grant/foreign mappings instead of wasting real RAM pages from > the domain memory f

Re: [PATCH v2 05/13] perf: Force architectures to opt-in to guest callbacks

2021-09-16 Thread Sean Christopherson
On Sat, Aug 28, 2021, Peter Zijlstra wrote: > On Fri, Aug 27, 2021 at 05:35:50PM -0700, Sean Christopherson wrote: > > diff --git a/init/Kconfig b/init/Kconfig > > index 55f9f7738ebb..9ef51ae53977 100644 > > --- a/init/Kconfig > > +++ b/init/Kconfig > > @@ -1776,6 +1776,9 @@ config HAVE_PERF_EVENTS

[linux-linus test] 165010: regressions - FAIL

2021-09-16 Thread osstest service owner
flight 165010 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/165010/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-xl-xsm 8 xen-boot fail REGR. vs. 152332 test-arm64-arm64-li

Re: Ping²: [PATCH] xen-netback: correct success/error reporting for the SKB-with-fraglist case

2021-09-16 Thread Sander Eikelenboom
On 16/09/2021 20:34, Paul Durrant wrote: On 16/09/2021 16:45, Jan Beulich wrote: On 15.07.2021 10:58, Jan Beulich wrote: On 20.05.2021 13:46, Jan Beulich wrote: On 25.02.2021 17:23, Paul Durrant wrote: On 25/02/2021 14:00, Jan Beulich wrote: On 25.02.2021 13:11, Paul Durrant wrote: On 25/02

Re: [PATCH v2 01/13] perf: Ensure perf_guest_cbs aren't reloaded between !NULL check and deref

2021-09-16 Thread Sean Christopherson
On Sat, Aug 28, 2021, Peter Zijlstra wrote: > On Fri, Aug 27, 2021 at 05:35:46PM -0700, Sean Christopherson wrote: > > diff --git a/kernel/events/core.c b/kernel/events/core.c > > index 464917096e73..2126f6327321 100644 > > --- a/kernel/events/core.c > > +++ b/kernel/events/core.c > > @@ -6491,14 +

Re: [PATCH v2 00/13] perf: KVM: Fix, optimize, and clean up callbacks

2021-09-16 Thread Sean Christopherson
On Sat, Aug 28, 2021, Peter Zijlstra wrote: > On Fri, Aug 27, 2021 at 05:35:45PM -0700, Sean Christopherson wrote: > > Like Xu (2): > > perf/core: Rework guest callbacks to prepare for static_call support > > perf/core: Use static_call to optimize perf_guest_info_callbacks > > > > Sean Christo

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-16 Thread Stefano Stabellini
On Thu, 16 Sep 2021, Oleksandr wrote: > > On Wed, 15 Sep 2021, Oleksandr wrote: > > > > On Fri, 10 Sep 2021, Oleksandr Tyshchenko wrote: > > > > > From: Oleksandr Tyshchenko > > > > > > > > > > The extended region (safe range) is a region of guest physical > > > > > address space which is unused

Re: [PATCH v4 7/7] xen/arm: Sanitize CTR_EL0

2021-09-16 Thread Stefano Stabellini
On Thu, 16 Sep 2021, Bertrand Marquis wrote: > Sanitize CTR_EL0 value between cores and taint Xen if incompatible > values are found. > > In the case of different i-cache types, the sanitize ctr_el0 will have a > sanitize value but this is currently not used or exposed to guest which > are seeing

Re: [PATCH v4 4/7] xen/arm: Sanitize cpuinfo ID registers fields

2021-09-16 Thread Stefano Stabellini
On Thu, 16 Sep 2021, Bertrand Marquis wrote: > Define a sanitize_cpu function to be called on secondary cores to > sanitize the system cpuinfo structure. > > The safest value is taken when possible and the system is marked tainted > if we encounter values which are incompatible with each other. >

Re: [PATCH v4 2/7] xen/arm: Import ID features sanitize from linux

2021-09-16 Thread Stefano Stabellini
On Thu, 16 Sep 2021, Bertrand Marquis wrote: > Import structures declared in Linux file arch/arm64/kernel/cpufeature.c > and the required types from arch/arm64/include/asm/cpufeature.h. > > Current code has been imported from Linux 5.13-rc5 (Commit ID > cd1245d75ce93b8fd206f4b34eb58bcfe156d5e9) an

[qemu-mainline test] 165008: regressions - FAIL

2021-09-16 Thread osstest service owner
flight 165008 qemu-mainline real [real] flight 165016 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/165008/ http://logs.test-lab.xenproject.org/osstest/logs/165016/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

Re: [PATCH V2 2/3] xen/arm: Add handling of extended regions for Dom0

2021-09-16 Thread Oleksandr
On 16.09.21 00:21, Stefano Stabellini wrote: Hi Stefano On Wed, 15 Sep 2021, Oleksandr wrote: On Fri, 10 Sep 2021, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko The extended region (safe range) is a region of guest physical address space which is unused and could be safely used t

[PATCH] modify acquire_domstatic_pages to take an unsigned int size parameter

2021-09-16 Thread Stefano Stabellini
acquire_domstatic_pages currently takes an unsigned long nr_mfns parameter, but actually it cannot handle anything larger than an unsigned int nr_mfns. That's because acquire_domstatic_pages is based on assign_pages which also takes an unsigned int nr parameter. So modify the nr_mfns parameter of

Re: [PATCH v1 11/14] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-09-16 Thread Stefano Stabellini
On Thu, 16 Sep 2021, Rahul Singh wrote: > Hi Stefano, > > > On 10 Sep 2021, at 1:26 am, Stefano Stabellini > > wrote: > > > > On Thu, 19 Aug 2021, Rahul Singh wrote: > >> The existing VPCI support available for X86 is adapted for Arm. > >> When the device is added to XEN via the hyper call > >>

Re: [PATCH 10/11] xen/arm: Do not map PCI ECAM space to Domain-0's p2m

2021-09-16 Thread Stefano Stabellini
On Thu, 16 Sep 2021, Oleksandr Andrushchenko wrote: > On 15.09.21 23:19, Stefano Stabellini wrote: > > On Wed, 15 Sep 2021, Stefano Stabellini wrote: > >> On Wed, 15 Sep 2021, Oleksandr Andrushchenko wrote: > >>> On 15.09.21 03:36, Stefano Stabellini wrote: > On Tue, 14 Sep 2021, Oleksandr And

Re: [PATCH 2/2] arm/efi: Use dom0less configuration when using EFI boot

2021-09-16 Thread Stefano Stabellini
On Thu, 16 Sep 2021, Jan Beulich wrote: > On 16.09.2021 17:07, Luca Fancellu wrote: > > I explain here my understanding on dom0less, this feature is used to start > > domUs at > > Xen boot in parallel, the name is misleading but it doesn’t require dom0 to > > be absent. > > > > So if you have a

Re: Ping²: [PATCH] xen-netback: correct success/error reporting for the SKB-with-fraglist case

2021-09-16 Thread Paul Durrant
On 16/09/2021 16:45, Jan Beulich wrote: On 15.07.2021 10:58, Jan Beulich wrote: On 20.05.2021 13:46, Jan Beulich wrote: On 25.02.2021 17:23, Paul Durrant wrote: On 25/02/2021 14:00, Jan Beulich wrote: On 25.02.2021 13:11, Paul Durrant wrote: On 25/02/2021 07:33, Jan Beulich wrote: On 24.02.

Re: [PATCH v1] domctl: hold domctl lock while domain is destroyed

2021-09-16 Thread Andrew Cooper
On 16/09/2021 13:30, Jan Beulich wrote: > On 16.09.2021 13:10, Dmitry Isaikin wrote: >> From: Dmitry Isaykin >> >> This significantly speeds up concurrent destruction of multiple domains on >> x86. > This effectively is a simplistic revert of 228ab9992ffb ("domctl: > improve locking during domain

Re: [PATCH v1 06/14] xen/arm: Add support for PCI ecam operations

2021-09-16 Thread Rahul Singh
Hi Stefano, > On 15 Sep 2021, at 9:45 pm, Stefano Stabellini wrote: > > On Wed, 15 Sep 2021, Rahul Singh wrote: >>> On 15 Sep 2021, at 12:06 am, Stefano Stabellini >>> wrote: >>> On Tue, 14 Sep 2021, Rahul Singh wrote: >> +return NULL; >> + >> +busn -= cfg->busn_start;

Re: [PATCH v1 14/14] xen/arm: Add linux,pci-domain property for hwdom if not available.

2021-09-16 Thread Rahul Singh
Hi Stefano, > On 10 Sep 2021, at 2:00 am, Stefano Stabellini wrote: > > On Thu, 19 Aug 2021, Rahul Singh wrote: >> If the property is not present in the device tree node for host bridge, >> XEN while creating the dtb for hwdom will create this property and >> assigns the already allocated segmen

Re: [PATCH v1 12/14] arm/libxl: Emulated PCI device tree node in libxl

2021-09-16 Thread Rahul Singh
Hi Stefano, > On 10 Sep 2021, at 1:51 am, Stefano Stabellini wrote: > > On Thu, 19 Aug 2021, Rahul Singh wrote: >> libxl will create an emulated PCI device tree node in the device tree to >> enable the guest OS to discover the virtual PCI during guest boot. >> Emulated PCI device tree node will

[xen-unstable test] 165004: regressions - trouble: broken/fail/pass

2021-09-16 Thread osstest service owner
flight 165004 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/165004/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt broken test-armhf-armhf-libvirt 5 host-inst

Re: [xen-unstable test] 164996: regressions - FAIL

2021-09-16 Thread Jan Beulich
On 16.09.2021 06:06, osstest service owner wrote: > flight 164996 xen-unstable real [real] > flight 165002 xen-unstable real-retest [real] > http://logs.test-lab.xenproject.org/osstest/logs/164996/ > http://logs.test-lab.xenproject.org/osstest/logs/165002/ > > Regressions :-( > > Tests which did

Re: [PATCH v1 12/14] arm/libxl: Emulated PCI device tree node in libxl

2021-09-16 Thread Rahul Singh
Hi Julien, > On 9 Sep 2021, at 2:59 pm, Julien Grall wrote: > > > > On 20/08/2021 17:03, Rahul Singh wrote: >> Hi Julien, > > Hi Rahul, > >>> On 19 Aug 2021, at 2:00 pm, Julien Grall wrote: >>> >>> Hi Rahul, >>> >>> On 19/08/2021 13:02, Rahul Singh wrote: libxl will create an emulate

Re: [PATCH V2 1/3] xen: Introduce "gpaddr_bits" field to XEN_SYSCTL_physinfo

2021-09-16 Thread Oleksandr
On 16.09.21 18:47, Jan Beulich wrote: Hi Jan On 16.09.2021 17:43, Oleksandr wrote: On 16.09.21 17:49, Jan Beulich wrote: On 10.09.2021 20:18, Oleksandr Tyshchenko wrote: @@ -120,6 +120,7 @@ struct xen_sysctl_physinfo { uint64_aligned_t outstanding_pages; uint64_aligned_t max_

Re: [PATCH V2 1/3] xen: Introduce "gpaddr_bits" field to XEN_SYSCTL_physinfo

2021-09-16 Thread Jan Beulich
On 16.09.2021 17:43, Oleksandr wrote: > On 16.09.21 17:49, Jan Beulich wrote: >> On 10.09.2021 20:18, Oleksandr Tyshchenko wrote: >>> @@ -120,6 +120,7 @@ struct xen_sysctl_physinfo { >>> uint64_aligned_t outstanding_pages; >>> uint64_aligned_t max_mfn; /* Largest possible MFN on this ho

Ping²: [PATCH] xen-netback: correct success/error reporting for the SKB-with-fraglist case

2021-09-16 Thread Jan Beulich
On 15.07.2021 10:58, Jan Beulich wrote: > On 20.05.2021 13:46, Jan Beulich wrote: >> On 25.02.2021 17:23, Paul Durrant wrote: >>> On 25/02/2021 14:00, Jan Beulich wrote: On 25.02.2021 13:11, Paul Durrant wrote: > On 25/02/2021 07:33, Jan Beulich wrote: >> On 24.02.2021 17:39, Paul Durr

Re: [PATCH V2 1/3] xen: Introduce "gpaddr_bits" field to XEN_SYSCTL_physinfo

2021-09-16 Thread Oleksandr
On 16.09.21 17:49, Jan Beulich wrote: Hi Jan On 10.09.2021 20:18, Oleksandr Tyshchenko wrote: --- a/tools/include/libxl.h +++ b/tools/include/libxl.h @@ -855,6 +855,13 @@ typedef struct libxl__ctx libxl_ctx; */ #define LIBXL_HAVE_PHYSINFO_MAX_POSSIBLE_MFN 1 + /* + * LIBXL_HAVE_PHYS

Re: [XEN PATCH v3] xen: rework `checkpolicy` detection when using "randconfig"

2021-09-16 Thread Jan Beulich
On 08.09.2021 13:17, Anthony PERARD wrote: > --- a/Config.mk > +++ b/Config.mk > @@ -137,12 +137,6 @@ export XEN_HAS_BUILD_ID=y > build_id_linker := --build-id=sha1 > endif > > -ifndef XEN_HAS_CHECKPOLICY > -CHECKPOLICY ?= checkpolicy > -XEN_HAS_CHECKPOLICY := $(shell $(CHECKPOLICY) -h

Re: [PATCH 2/2] arm/efi: Use dom0less configuration when using EFI boot

2021-09-16 Thread Jan Beulich
On 16.09.2021 17:07, Luca Fancellu wrote: > I explain here my understanding on dom0less, this feature is used to start > domUs at > Xen boot in parallel, the name is misleading but it doesn’t require dom0 to > be absent. > > So if you have a dom0 kernel embed in the image, it's completely fine t

[ovmf test] 165007: all pass - PUSHED

2021-09-16 Thread osstest service owner
flight 165007 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/165007/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf f4e72cf9d665a8f1a54170b0b62739a628823c8b baseline version: ovmf c19d18136ef920e3e84f9

Re: [PATCH 2/2] arm/efi: Use dom0less configuration when using EFI boot

2021-09-16 Thread Luca Fancellu
> On 16 Sep 2021, at 13:15, Jan Beulich wrote: > > On 16.09.2021 13:28, Luca Fancellu wrote: >>> On 16 Sep 2021, at 09:46, Jan Beulich wrote: >>> On 15.09.2021 16:26, Luca Fancellu wrote: --- a/xen/arch/arm/efi/efi-boot.h +++ b/xen/arch/arm/efi/efi-boot.h @@ -8,9 +8,39 @@

[PATCH] xen/x86: drop redundant zeroing from cpu_initialize_context()

2021-09-16 Thread Jan Beulich
Just after having obtained the pointer from kzalloc() there's no reason at all to set part of the area to all zero yet another time. Similarly there's no point explicitly clearing "ldt_ents". Signed-off-by: Jan Beulich --- a/arch/x86/xen/smp_pv.c +++ b/arch/x86/xen/smp_pv.c @@ -290,8 +290,6 @@ c

[PATCH] x86/mem_sharing: don't lock parent during fork reset

2021-09-16 Thread Tamas K Lengyel
During fork reset operation the parent domain doesn't need to be gathered using rcu_lock_live_remote_domain_by_id as the fork reset doesn't modify anything on the parent. The parent is also guaranteed to be paused while forks are active. This patch reduces lock contention when performing resets in

[PATCH] xen/x86: fix PV trap handling on secondary processors

2021-09-16 Thread Jan Beulich
The initial observation was that in PV mode under Xen 32-bit user space didn't work anymore. Attempts of system calls ended in #GP(0x402). All of the sudden the vector 0x80 handler was not in place anymore. As it turns out up to 5.13 redundant initialization did occur: Once from cpu_initialize_cont

Re: [PATCH V2 1/3] xen: Introduce "gpaddr_bits" field to XEN_SYSCTL_physinfo

2021-09-16 Thread Jan Beulich
On 10.09.2021 20:18, Oleksandr Tyshchenko wrote: > --- a/tools/include/libxl.h > +++ b/tools/include/libxl.h > @@ -855,6 +855,13 @@ typedef struct libxl__ctx libxl_ctx; > */ > #define LIBXL_HAVE_PHYSINFO_MAX_POSSIBLE_MFN 1 > > + /* > + * LIBXL_HAVE_PHYSINFO_GPADDR_BITS > + * > + * If this i

[libvirt test] 165005: regressions - FAIL

2021-09-16 Thread osstest service owner
flight 165005 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/165005/ 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 V5 12/12] net: netvsc: Add Isolation VM support for netvsc driver

2021-09-16 Thread Tianyu Lan
On 9/16/2021 12:21 AM, Michael Kelley wrote: I think you are proposing this approach to allocating memory for the send and receive buffers so that you can avoid having two virtual mappings for the memory, per comments from Christop Hellwig. But overall, the approach seems a bit complex and I won

Re: [PATCH v1] domctl: hold domctl lock while domain is destroyed

2021-09-16 Thread Dmitry Isaikin
16:14, 16 сентября 2021 г., "Roger Pau Monné" :On Thu, Sep 16, 2021 at 02:30:39PM +0200, Jan Beulich wrote: On 16.09.2021 13:10, Dmitry Isaikin wrote: > From: Dmitry Isaykin  >  > This significantly speeds up concurrent destruction of multiple domains on x86.  This effecti

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

2021-09-16 Thread osstest service owner
flight 165009 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/165009/ 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 V5 12/12] net: netvsc: Add Isolation VM support for netvsc driver

2021-09-16 Thread Tianyu Lan
On 9/16/2021 12:46 AM, Haiyang Zhang wrote: + memset(vmap_pages, 0, + sizeof(*vmap_pages) * vmap_page_index); + vmap_page_index = 0; + + for (j = 0; j < i; j++) +

Re: [PATCH v1] domctl: hold domctl lock while domain is destroyed

2021-09-16 Thread Roger Pau Monné
On Thu, Sep 16, 2021 at 02:30:39PM +0200, Jan Beulich wrote: > On 16.09.2021 13:10, Dmitry Isaikin wrote: > > From: Dmitry Isaykin > > > > This significantly speeds up concurrent destruction of multiple domains on > > x86. > > This effectively is a simplistic revert of 228ab9992ffb ("domctl: >

Re: [RFC PATCH V2] xen/gnttab: Store frame GFN in struct page_info on Arm

2021-09-16 Thread Oleksandr
On 16.09.21 09:38, Jan Beulich wrote: Hi Jan On 16.09.2021 00:13, Oleksandr wrote: On 15.09.21 13:06, Jan Beulich wrote: On 14.09.2021 22:44, Oleksandr Tyshchenko wrote: --- a/xen/include/asm-arm/mm.h +++ b/xen/include/asm-arm/mm.h @@ -98,9 +98,18 @@ struct page_info #define PGT_writabl

Re: [PATCH v1] domctl: hold domctl lock while domain is destroyed

2021-09-16 Thread Jan Beulich
On 16.09.2021 13:10, Dmitry Isaikin wrote: > From: Dmitry Isaykin > > This significantly speeds up concurrent destruction of multiple domains on > x86. This effectively is a simplistic revert of 228ab9992ffb ("domctl: improve locking during domain destruction"). There it was found to actually i

[PATCH v3] tools/xl: fix autoballoon regex

2021-09-16 Thread Dmitry Isaykin
This regex is used for auto-balloon mode detection based on Xen command line. The case of specifying a negative size was handled incorrectly. >From misc/xen-command-line documentation: dom0_mem (x86) = List of ( min: | max: | ) If a size is positive, it represents an absolute value.

Re: [PATCH 2/2] arm/efi: Use dom0less configuration when using EFI boot

2021-09-16 Thread Jan Beulich
On 16.09.2021 13:28, Luca Fancellu wrote: >> On 16 Sep 2021, at 09:46, Jan Beulich wrote: >> On 15.09.2021 16:26, Luca Fancellu wrote: >>> --- a/xen/arch/arm/efi/efi-boot.h >>> +++ b/xen/arch/arm/efi/efi-boot.h >>> @@ -8,9 +8,39 @@ >>> #include >>> #include >>> >>> +typedef struct { >>> +cha

Re: [PATCH 2/2] arm/efi: Use dom0less configuration when using EFI boot

2021-09-16 Thread Luca Fancellu
> On 16 Sep 2021, at 02:16, Stefano Stabellini wrote: > > On Wed, 15 Sep 2021, Luca Fancellu wrote: >> This patch introduces the support for dom0less configuration >> when using UEFI boot on ARM, it permits the EFI boot to >> continue if no dom0 kernel is specified but at least one domU >> is

Re: [PATCH 1/2] xen/efi: Restrict check for DT boot modules on EFI boot

2021-09-16 Thread Luca Fancellu
> On 16 Sep 2021, at 01:16, Stefano Stabellini wrote: > > Adding Jan for an opinion on the EFI common code changes. See below. > > > On Wed, 15 Sep 2021, Luca Fancellu wrote: >> When Xen is started as EFI application, it is checking >> the presence of multiboot,module in the DT, if any is >>

Re: [PATCH 2/2] arm/efi: Use dom0less configuration when using EFI boot

2021-09-16 Thread Luca Fancellu
> On 16 Sep 2021, at 09:46, Jan Beulich wrote: > > A number of nits, sorry: > > On 15.09.2021 16:26, Luca Fancellu wrote: >> --- a/xen/arch/arm/efi/efi-boot.h >> +++ b/xen/arch/arm/efi/efi-boot.h >> @@ -8,9 +8,39 @@ >> #include >> #include >> >> +typedef struct { >> +char* name; > > M

Re: [PATCH 2/2] arm/efi: Use dom0less configuration when using EFI boot

2021-09-16 Thread Luca Fancellu
> On 16 Sep 2021, at 07:50, Jan Beulich wrote: > > On 16.09.2021 03:16, Stefano Stabellini wrote: >> On Wed, 15 Sep 2021, Luca Fancellu wrote: >>> +static void __init handle_dom0less_domain_node(EFI_FILE_HANDLE dir_handle, >>> + int domain_node, >>

[PATCH v1] domctl: hold domctl lock while domain is destroyed

2021-09-16 Thread Dmitry Isaikin
From: Dmitry Isaykin This significantly speeds up concurrent destruction of multiple domains on x86. I identify the place taking the most time: do_domctl(case XEN_DOMCTL_destroydomain) -> domain_kill() -> domain_relinquish_resources() -> relinquish_memory(d,

Re: [PATCH v1 11/14] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-09-16 Thread Rahul Singh
Hi Stefano, > On 10 Sep 2021, at 1:26 am, Stefano Stabellini wrote: > > On Thu, 19 Aug 2021, Rahul Singh wrote: >> The existing VPCI support available for X86 is adapted for Arm. >> When the device is added to XEN via the hyper call >> “PHYSDEVOP_pci_device_add”, VPCI handler for the config spac

Re: [PATCH V5 09/12] x86/Swiotlb: Add Swiotlb bounce buffer remap function for HV IVM

2021-09-16 Thread Tianyu Lan
On 9/15/2021 11:42 PM, Michael Kelley wrote: @@ -196,13 +199,34 @@ static void swiotlb_init_io_tlb_mem(struct io_tlb_mem *mem, phys_addr_t start, mem->slots[i].orig_addr = INVALID_PHYS_ADDR; mem->slots[i].alloc_size = 0; } + + if (set_memory_decrypte

Re: [PATCH V5 07/12] Drivers: hv: vmbus: Add SNP support for VMbus channel initiate message

2021-09-16 Thread Tianyu Lan
On 9/15/2021 11:41 PM, Michael Kelley wrote: diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 42f3d9d123a1..560cba916d1d 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -240,6 +240,8 @@ struct vmbus_connection { * is child->parent notific

Re: [PATCH v1 11/14] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-09-16 Thread Rahul Singh
Hi Julien, > On 9 Sep 2021, at 2:50 pm, Julien Grall wrote: > > Hi Rahul, > > On 19/08/2021 13:02, Rahul Singh wrote: >> The existing VPCI support available for X86 is adapted for Arm. >> When the device is added to XEN via the hyper call >> “PHYSDEVOP_pci_device_add”, VPCI handler for the conf

Re: [PATCH] x86/setup: call early_reserve_memory() earlier

2021-09-16 Thread Juergen Gross
On 16.09.21 12:29, Borislav Petkov wrote: On Thu, Sep 16, 2021 at 12:09:27PM +0300, Mike Rapoport wrote: I think the first sentence about reserving memory before memblock allocations are possible is important and I think we should keep it. I expanded that comment this way: /*

Re: [PATCH] x86/setup: call early_reserve_memory() earlier

2021-09-16 Thread Borislav Petkov
On Thu, Sep 16, 2021 at 12:09:27PM +0300, Mike Rapoport wrote: > I think the first sentence about reserving memory before memblock > allocations are possible is important and I think we should keep it. I expanded that comment this way: /* * Do some memory reservations *before* me

Re: [PATCH v2] tools/xl: fix autoballoon regex

2021-09-16 Thread Jan Beulich
On 16.09.2021 11:34, Dmitry Isaikin wrote: > --- a/tools/xl/xl.c > +++ b/tools/xl/xl.c > @@ -81,7 +81,7 @@ static int auto_autoballoon(void) > return 1; /* default to on */ > > ret = regcomp(®ex, > - "(^| )dom0_mem=((|min:|max:)[0-9]+[bBkKmMgG]?,?)+($| )", > +

[linux-linus test] 165003: regressions - FAIL

2021-09-16 Thread osstest service owner
flight 165003 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/165003/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-xl-xsm 8 xen-boot fail REGR. vs. 152332 test-arm64-arm64-li

[qemu-mainline test] 165000: regressions - FAIL

2021-09-16 Thread osstest service owner
flight 165000 qemu-mainline real [real] flight 165006 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/165000/ http://logs.test-lab.xenproject.org/osstest/logs/165006/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

Re: [PATCH] swiotlb: set IO TLB segment size via cmdline

2021-09-16 Thread Roman Skakun
Hi Stefano, > Also, Option 1 listed in the webpage seems to be a lot better. Any > reason you can't do that? Because that option both solves the problem > and increases performance. Yes, Option 1 is probably more efficient. But I use another platform under Xen without DMA adjustment functionality

[PATCH v2] tools/xl: fix autoballoon regex

2021-09-16 Thread Dmitry Isaikin
From: Dmitry Isaykin This regex is used for auto-balloon mode detection based on Xen command line. The case of specifying a negative size was handled incorrectly. >From misc/xen-command-line documentation: dom0_mem (x86) = List of ( min: | max: | ) If a size is positive, it repres

Re: [PATCH] x86/setup: call early_reserve_memory() earlier

2021-09-16 Thread Mike Rapoport
On Wed, Sep 15, 2021 at 01:00:20PM +0200, Borislav Petkov wrote: > You forgot to Cc Mike, lemme add him. > > And drop stable@ too. > > On Tue, Sep 14, 2021 at 01:06:22PM +0200, Juergen Gross wrote: > > On 14.09.21 12:03, Jan Beulich wrote: > > > On 14.09.2021 11:41, Juergen Gross wrote: > > > > C

Re: [PATCH 2/2] arm/efi: Use dom0less configuration when using EFI boot

2021-09-16 Thread Jan Beulich
A number of nits, sorry: On 15.09.2021 16:26, Luca Fancellu wrote: > --- a/xen/arch/arm/efi/efi-boot.h > +++ b/xen/arch/arm/efi/efi-boot.h > @@ -8,9 +8,39 @@ > #include > #include > > +typedef struct { > +char* name; Misplaced *. > +int name_len; Surely this can't go negative? (Sa

Re: [PATCH 2/4] VT-d: consider hidden devices when unmapping

2021-09-16 Thread Jan Beulich
On 16.09.2021 10:18, Tian, Kevin wrote: >> @@ -1737,23 +1737,33 @@ static int domain_context_unmap(struct d >> return ret; >> >> /* >> - * if no other devices under the same iommu owned by this domain, >> - * clear iommu in iommu_bitmap and clear domain_id in domid_bitmp >> +

Re: Ping: [PATCH 17/17] IOMMU/x86: drop pointless NULL checks

2021-09-16 Thread Jan Beulich
On 16.09.2021 09:47, Tian, Kevin wrote: >> From: Jan Beulich >> Sent: Wednesday, September 15, 2021 8:42 PM >> >> Kevin, >> >> On 24.08.2021 16:27, Jan Beulich wrote: >>> map_domain_page() et al never fail; no need to check their return values >>> against NULL, and no need to carry dead printk()s.

RE: [PATCH 3/4] VT-d: skip IOMMU bitmap cleanup for phantom devices

2021-09-16 Thread Tian, Kevin
> From: Jan Beulich > Sent: Wednesday, September 15, 2021 5:13 PM > > Doing the cleanup also for phantom devices is at best redundant with > doing it for the corresponding real device. I couldn't force myself into > checking all the code paths whether it really is: It seems better to > explicitly

RE: [PATCH 2/4] VT-d: consider hidden devices when unmapping

2021-09-16 Thread Tian, Kevin
> From: Jan Beulich > Sent: Wednesday, September 15, 2021 5:13 PM > > Whether to clear an IOMMU's bit in the domain's bitmap should depend on > all devices the domain can control. For the hardware domain this > includes hidden devices, which are associated with DomXEN. > > While touching related

RE: [PATCH 1/4] VT-d: defer "no DRHD" check when (un)mapping devices

2021-09-16 Thread Tian, Kevin
> From: Jan Beulich > Sent: Wednesday, September 15, 2021 5:12 PM > > If devices are to be skipped anyway (which is the case in particular for > host bridges), there's no point complaining about a missing DRHD (and > hence a missing association with an IOMMU). > > While there convert assignments

RE: Ping: [PATCH 17/17] IOMMU/x86: drop pointless NULL checks

2021-09-16 Thread Tian, Kevin
> From: Jan Beulich > Sent: Wednesday, September 15, 2021 8:42 PM > > Kevin, > > On 24.08.2021 16:27, Jan Beulich wrote: > > map_domain_page() et al never fail; no need to check their return values > > against NULL, and no need to carry dead printk()s. > > > > Signed-off-by: Jan Beulich > > ma

RE: [PATCH 05/17] IOMMU: add order parameter to ->{,un}map_page() hooks

2021-09-16 Thread Tian, Kevin
> From: Jan Beulich > Sent: Tuesday, August 24, 2021 10:19 PM > > Or really, in the case of ->map_page(), accommodate it in th existing > "flags" parameter. All call sites will pass 0 for now. > > Signed-off-by: Jan Beulich Reviewed-by: Kevin Tian > > --- a/xen/drivers/passthrough/amd/iommu

RE: [PATCH 04/17] IOMMU: have vendor code announce supported page sizes

2021-09-16 Thread Tian, Kevin
> From: Jan Beulich > Sent: Tuesday, August 24, 2021 10:18 PM > > Generic code will use this information to determine what order values > can legitimately be passed to the ->{,un}map_page() hooks. For now all > ops structures simply get to announce 4k mappings (as base page size), > and there is

RE: [PATCH 16/17] VT-d: show permissions during page table walks

2021-09-16 Thread Tian, Kevin
> From: Jan Beulich > Sent: Tuesday, August 24, 2021 10:27 PM > > Besides the addresses this is the next crucial bit of information one > might be after. > > Signed-off-by: Jan Beulich Reviewed-by: Kevin Tian > > --- a/xen/drivers/passthrough/vtd/iommu.c > +++ b/xen/drivers/passthrough/vtd/

RE: [PATCH 15/17] IOMMU: page table dumping adjustments

2021-09-16 Thread Tian, Kevin
> From: Jan Beulich > Sent: Tuesday, August 24, 2021 10:29 PM > > On 24.08.2021 16:26, Jan Beulich wrote: > > For one none of the three IOMMU implementations on Arm specify a > dumping > > hook. Generalize VT-d's "don't dump shared page tables" to cover for > > this. > > > > Further in the past I

RE: [PATCH 17/17] IOMMU/x86: drop pointless NULL checks

2021-09-16 Thread Tian, Kevin
> From: Jan Beulich > Sent: Tuesday, August 24, 2021 10:28 PM > > map_domain_page() et al never fail; no need to check their return values > against NULL, and no need to carry dead printk()s. > > Signed-off-by: Jan Beulich Reviewed-by: Kevin Tian > > --- a/xen/drivers/passthrough/amd/pci_am

Re: [PATCH 10/11] xen/arm: Do not map PCI ECAM space to Domain-0's p2m

2021-09-16 Thread Oleksandr Andrushchenko
Hi, Stefano! On 15.09.21 23:19, Stefano Stabellini wrote: > On Wed, 15 Sep 2021, Stefano Stabellini wrote: >> On Wed, 15 Sep 2021, Oleksandr Andrushchenko wrote: >>> On 15.09.21 03:36, Stefano Stabellini wrote: On Tue, 14 Sep 2021, Oleksandr Andrushchenko wrote: > With the patch above I h