[xen-4.14-testing test] 164888: tolerable FAIL - PUSHED

2021-09-08 Thread osstest service owner
flight 164888 xen-4.14-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/164888/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-xl-rtds 20 guest-localmigrate/x10 fail REGR. vs. 163750 test-armhf-armhf-xl-rtd

Introduction of stable interface between Xenstore and hypervisor

2021-09-08 Thread Juergen Gross
Today Xenstore is using one unstable interface to retrieve the state of a domain (existing, dying). In order to decouple Xenstore further from the hypervisor, a stable interface should be established. This new interface should cover the following functionality: - get the needed state of a domain

Re: [PATCH 7/9] vpci/header: program p2m with guest BAR view

2021-09-08 Thread Oleksandr Andrushchenko
On 06.09.21 17:51, Jan Beulich wrote: > On 03.09.2021 12:08, Oleksandr Andrushchenko wrote: >> @@ -37,12 +41,28 @@ static int map_range(unsigned long s, unsigned long e, >> void *data, >>unsigned long *c) >> { >> const struct map_data *map = data; >> +gfn_t sta

Re: [PATCH 6/9] vpci/header: Handle p2m range sets per BAR

2021-09-08 Thread Oleksandr Andrushchenko
On 08.09.21 18:00, Jan Beulich wrote: > On 08.09.2021 16:31, Oleksandr Andrushchenko wrote: >> On 06.09.21 17:47, Jan Beulich wrote: >>> On 03.09.2021 12:08, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Instead of handling a single range set, that contains all the m

[xen-4.13-testing test] 164887: regressions - FAIL

2021-09-08 Thread osstest service owner
flight 164887 xen-4.13-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/164887/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 163761 build-amd64-xs

[xen-4.12-testing test] 164886: regressions - FAIL

2021-09-08 Thread osstest service owner
flight 164886 xen-4.12-testing real [real] flight 164894 xen-4.12-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/164886/ http://logs.test-lab.xenproject.org/osstest/logs/164894/ Regressions :-( Tests which did not succeed and are blocking, including tests which could

Re: [PATCH 9/9] vpci/header: Use pdev's domain instead of vCPU

2021-09-08 Thread Oleksandr Andrushchenko
On 06.09.21 17:57, Jan Beulich wrote: > On 03.09.2021 12:08, Oleksandr Andrushchenko wrote: >> From: Rahul Singh >> >> Fixes: 9c244fdef7e7 ("vpci: add header handlers") > In which way is that original change broken? After consulting with Arm we decided that this patch can be dropped. If we face

RE: [XEN RFC PATCH 23/40] xen/arm: introduce a helper to parse device tree memory node

2021-09-08 Thread Wei Chen
Hi Stefano, > -Original Message- > From: Stefano Stabellini > Sent: 2021年9月9日 6:32 > To: Wei Chen > Cc: Julien Grall ; Stefano Stabellini > ; xen-devel@lists.xenproject.org; Bertrand Marquis > ; Jan Beulich > Subject: RE: [XEN RFC PATCH 23/40] xen/arm: introduce a helper to parse > devi

RE: [PATCH v6 5/7] xen: re-define assign_pages and introduce a new function assign_page

2021-09-08 Thread Penny Zheng
Hi Jan > -Original Message- > From: Stefano Stabellini > Sent: Thursday, September 9, 2021 7:58 AM > To: Penny Zheng > Cc: xen-devel@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org; > Bertrand Marquis ; Wei Chen > ; jbeul...@suse.com > Subject: Re: [PATCH v6 5/7] xen: re-def

[qemu-mainline test] 164884: tolerable FAIL - PUSHED

2021-09-08 Thread osstest service owner
flight 164884 qemu-mainline real [real] flight 164893 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/164884/ http://logs.test-lab.xenproject.org/osstest/logs/164893/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-ar

Re: [PATCH v1 04/14] xen/arm: Add support for PCI init to initialize the PCI driver.

2021-09-08 Thread Stefano Stabellini
On Thu, 19 Aug 2021, Rahul Singh wrote: > pci_init(..) will be called during xen startup to initialize and probe > the PCI host-bridge driver. > > Signed-off-by: Rahul Singh > --- > xen/arch/arm/pci/pci.c | 54 > xen/include/asm-arm/device.h | 1 + > 2

Re: [PATCH v1 03/14] xen/pci: solve compilation error on ARM with ACPI && HAS_PCI

2021-09-08 Thread Stefano Stabellini
On Fri, 20 Aug 2021, Jan Beulich wrote: > On 20.08.2021 13:41, Rahul Singh wrote: > > Hi Jan > > > >> On 20 Aug 2021, at 8:06 am, Jan Beulich wrote: > >> > >> On 19.08.2021 14:02, Rahul Singh wrote: > >>> Compilation error is observed when ACPI and HAS_PCI is enabled for ARM > >>> architecture. M

Re: [PATCH v6 7/7] xen/arm: introduce allocate_static_memory

2021-09-08 Thread Stefano Stabellini
On Wed, 8 Sep 2021, Penny Zheng wrote: > This commit introduces a new function allocate_static_memory to allocate > static memory as guest RAM for Domain on Static Allocation. ^ for domains. > It uses acquire_domstatic_pages to acquire pre-configured static memory > fo

Re: [PATCH v6 6/7] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

2021-09-08 Thread Stefano Stabellini
On Wed, 8 Sep 2021, Penny Zheng wrote: > New function acquire_staticmem_pages aims to acquire nr_mfns contiguous pages > of static memory, starting at #smfn. And it is the equivalent of > alloc_heap_pages for static memory. > > For each page, it shall check if the page is reserved(PGC_reserved) >

Re: [PATCH v6 5/7] xen: re-define assign_pages and introduce a new function assign_page

2021-09-08 Thread Stefano Stabellini
On Wed, 8 Sep 2021, Penny Zheng wrote: > In order to deal with the trouble of count-to-order conversion when page > number > is not in a power-of-two, this commit re-define assign_pages for nr pages and > introduces a new helper assign_page for original page with a single order. > > Signed-off-by

Re: [PATCH v6 2/7] xen/arm: introduce domain on Static Allocation

2021-09-08 Thread Stefano Stabellini
On Wed, 8 Sep 2021, Penny Zheng wrote: > Static Allocation refers to system or sub-system(domains) for which memory > areas are pre-defined by configuration using physical address ranges. > > Those pre-defined memory, -- Static Memory, as parts of RAM reserved in the > beginning, shall never go to

Re: [PATCH v6 4/7] xen/arm: static memory initialization

2021-09-08 Thread Stefano Stabellini
On Wed, 8 Sep 2021, Penny Zheng wrote: > This patch introduces static memory initialization, during system boot-up. > > The new function init_staticmem_pages is responsible for static memory > initialization. > > Helper free_staticmem_pages is the equivalent of free_heap_pages, to free > nr_mfns

Re: [PATCH v6 1/7] xen/arm: introduce new helper device_tree_get_meminfo

2021-09-08 Thread Stefano Stabellini
On Wed, 8 Sep 2021, Penny Zheng wrote: > This commit creates a new helper device_tree_get_meminfo to iterate over a > device tree property to get memory info, like "reg". > > Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini > --- > xen/arch/arm/bootfdt.c | 83 ++

[RFC PATCH 10/10] hw/sd: Mark sdhci-pci device as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/sd/sdhci-pci.c b/hw/sd/sdhci-pci.c index c737c8b930e..7a36f88fd87 100644 --- a/hw/sd/sdhci-pci.c +++ b/hw/sd/sdhci-pci.c @@ -64,6 +64,7 @@ static void sdhci_pci_class_init(ObjectClas

[RFC PATCH 09/10] hw/net: Mark Tulip device as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/net/tulip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/tulip.c b/hw/net/tulip.c index ca69f7ea5e1..eaad3266212 100644 --- a/hw/net/tulip.c +++ b/hw/net/tulip.c @@ -1025,6 +1025,7 @@ static void tulip_class_init(ObjectClass *klass, void

[RFC PATCH 08/10] hw/misc: Mark testdev devices as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/hyperv/hyperv_testdev.c | 1 + hw/misc/pc-testdev.c | 1 + hw/misc/pci-testdev.c | 1 + 3 files changed, 3 insertions(+) diff --git a/hw/hyperv/hyperv_testdev.c b/hw/hyperv/hyperv_testdev.c index 9a56ddf83fe..6a75c350389 100644 --- a/hw/hyp

[RFC PATCH 06/10] qdev: Use qemu_security_policy_taint() API

2021-09-08 Thread Philippe Mathieu-Daudé
Add DeviceClass::taints_security_policy field to allow an unsafe device to eventually taint the global security policy in DeviceRealize(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/qdev-core.h | 6 ++ hw/core/qdev.c | 11 +++ 2 files changed, 17 insertions(+) dif

[RFC PATCH 07/10] hw/display: Mark ATI and Artist devices as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/display/artist.c | 1 + hw/display/ati.c| 1 + 2 files changed, 2 insertions(+) diff --git a/hw/display/artist.c b/hw/display/artist.c index 21b7fd1b440..067a4b2cb59 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -1482,6 +1482,7 @@

[RFC PATCH 05/10] block/null: Mark 'read-zeroes=off' option as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
See commit b317006a3f1 ("docs/secure-coding-practices: Describe how to use 'null-co' block driver") for rationale. Signed-off-by: Philippe Mathieu-Daudé --- block/null.c | 8 1 file changed, 8 insertions(+) diff --git a/block/null.c b/block/null.c index cc9b1d4ea72..11e428f3cc2 100644

[RFC PATCH 04/10] block/vvfat: Mark the driver as unsafe

2021-09-08 Thread Philippe Mathieu-Daudé
While being listed as 'supported' in MAINTAINERS, this driver does not have many reviewers and contains various /* TODO */ unattended since various years. Not safe enough for production environment, so have it taint the global security policy. Signed-off-by: Philippe Mathieu-Daudé --- block/vvfa

[RFC PATCH 03/10] block: Use qemu_security_policy_taint() API

2021-09-08 Thread Philippe Mathieu-Daudé
Add the BlockDriver::bdrv_taints_security_policy() handler. Drivers implementing it might taint the global QEMU security policy. Signed-off-by: Philippe Mathieu-Daudé --- include/block/block_int.h | 6 +- block.c | 6 ++ 2 files changed, 11 insertions(+), 1 deletion(-)

[RFC PATCH 02/10] accel: Use qemu_security_policy_taint(), mark KVM and Xen as safe

2021-09-08 Thread Philippe Mathieu-Daudé
Add the AccelClass::secure_policy_supported field to classify safe (within security boundary) vs unsafe accelerators. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 5 + accel/kvm/kvm-all.c | 1 + accel/xen/xen-all.c | 1 + softmmu/vl.c | 3 +++ 4 files changed, 1

[RFC PATCH 00/10] security: Introduce qemu_security_policy_taint() API

2021-09-08 Thread Philippe Mathieu-Daudé
Hi, This series is experimental! The goal is to better limit the boundary of what code is considerated security critical, and what is less critical (but still important!). This approach was quickly discussed few months ago with Markus then Daniel. Instead of classifying the code on a file path ba

[RFC PATCH 01/10] sysemu: Introduce qemu_security_policy_taint() API

2021-09-08 Thread Philippe Mathieu-Daudé
Introduce qemu_security_policy_taint() which allows unsafe (read "not very maintained") code to 'taint' QEMU security policy. The "security policy" is the @SecurityPolicy QAPI enum, composed of: - "none" (no policy, current behavior) - "warn" (display a warning when the policy is tainted, keep

RE: [XEN RFC PATCH 23/40] xen/arm: introduce a helper to parse device tree memory node

2021-09-08 Thread Stefano Stabellini
On Wed, 8 Sep 2021, Wei Chen wrote: > > > >>> @@ -55,6 +57,79 @@ static int __init > > > >> dtb_numa_processor_affinity_init(nodeid_t node) > > > >>> return 0; > > > >>> } > > > >>> > > > >>> +/* Callback for parsing of the memory regions affinity */ > > > >>> +static int __init dtb_numa_me

[xen-unstable test] 164883: tolerable FAIL

2021-09-08 Thread osstest service owner
flight 164883 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/164883/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 164877 test-armhf-armhf-libvirt 16 save

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

2021-09-08 Thread osstest service owner
flight 164891 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/164891/ 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] x86/spec-ctrl: Print all AMD speculative hints/features

2021-09-08 Thread Andrew Cooper
We already print Intel features that aren't yet implemented/used, so be consistent on AMD too. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu For reference, here are the bit layouts on different generations of AMD CPUs. Fam15, and Zen1: (XEN) Hardware hi

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

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

[PATCH] x86/svm: Intercept and terminate RDPRU with #UD

2021-09-08 Thread Andrew Cooper
The RDPRU instruction isn't supported at all (and it is unclear how this can ever be offered safely to guests). However, a guest which ignores CPUID and blindly executes RDPRU will find that it functions. Use the intercept and terminate with #UD. While at it, fold SKINIT into the same "unconditi

Re: [PATCH] xen/balloon: use a kernel thread instead a workqueue

2021-09-08 Thread Boris Ostrovsky
On 9/8/21 11:11 AM, Juergen Gross wrote: > On 08.09.21 16:47, Boris Ostrovsky wrote: >> >> >> Given that wait_event_interruptible_timeout() is a bunch of nested macros do >> we need to worry here about overly aggressive compiler optimizing out >> 'credit = current_credit()'? > > I don't think s

Re: [PATCH] x86/amd: Introduce and use X86_BUG_NULL_SEG

2021-09-08 Thread Andrew Cooper
On 08/09/2021 16:06, Jan Beulich wrote: > On 08.09.2021 15:59, Andrew Cooper wrote: >> AMD/Hygon processors before the Zen2 microarchitecture don't clear the base >> or >> limit fields when loading a NULL segment. >> >> Express the logic in terms of cpu_bug_null_seg, and adjust the workaround in >

[libvirt test] 164880: regressions - FAIL

2021-09-08 Thread osstest service owner
flight 164880 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/164880/ 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

Re: [PATCH for-4.13] x86/PVH: Fix build following XSA-378 bugfix

2021-09-08 Thread Jan Beulich
On 08.09.2021 17:17, Andrew Cooper wrote: > Fixes: 8d8b4bde3e1c ("x86/PVH: de-duplicate mappings for first Mb of Dom0 > memory") > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich And in it goes. Jan

Re: [PATCH 5/9] vpci/header: Implement guest BAR register handlers

2021-09-08 Thread Oleksandr Andrushchenko
On 08.09.21 18:29, Jan Beulich wrote: > On 08.09.2021 17:14, Oleksandr Andrushchenko wrote: >> On 08.09.21 17:46, Jan Beulich wrote: >>> On 08.09.2021 15:33, Oleksandr Andrushchenko wrote: static void guest_bar_write(const struct pci_dev *pdev, unsigned int reg,   

Re: [PATCH 5/9] vpci/header: Implement guest BAR register handlers

2021-09-08 Thread Jan Beulich
On 08.09.2021 17:14, Oleksandr Andrushchenko wrote: > On 08.09.21 17:46, Jan Beulich wrote: >> On 08.09.2021 15:33, Oleksandr Andrushchenko wrote: >>> static void guest_bar_write(const struct pci_dev *pdev, unsigned int reg, >>>     uint32_t val, void *data) >>> { >>>   

Re: [PATCH 00/12] swiotlb-xen: fixes and adjustments

2021-09-08 Thread Juergen Gross
On 07.09.21 14:03, Jan Beulich wrote: The primary intention really was the last patch, there you go ... 01: swiotlb-xen: avoid double free 02: swiotlb-xen: fix late init retry 03: swiotlb-xen: maintain slab count properly 04: swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests 05:

[PATCH for-4.13] x86/PVH: Fix build following XSA-378 bugfix

2021-09-08 Thread Andrew Cooper
Fixes: 8d8b4bde3e1c ("x86/PVH: de-duplicate mappings for first Mb of Dom0 memory") Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu --- xen/arch/x86/hvm/dom0_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/dom0_build

Re: [PATCH 5/9] vpci/header: Implement guest BAR register handlers

2021-09-08 Thread Oleksandr Andrushchenko
On 08.09.21 17:46, Jan Beulich wrote: > On 08.09.2021 15:33, Oleksandr Andrushchenko wrote: >> On 08.09.21 13:03, Jan Beulich wrote: >>> On 08.09.2021 11:43, Oleksandr Andrushchenko wrote: On 08.09.21 12:27, Jan Beulich wrote: > On 07.09.2021 19:39, Oleksandr Andrushchenko wrote: >> O

Re: [PATCH] xen/balloon: use a kernel thread instead a workqueue

2021-09-08 Thread Juergen Gross
On 08.09.21 16:47, Boris Ostrovsky wrote: On 8/27/21 8:32 AM, Juergen Gross wrote: +static bool balloon_thread_cond(enum bp_state state, long credit) +{ + if (state != BP_EAGAIN) + credit = 0; + + return current_credit() != credit || kthread_should_stop(); +} + +/* + *

Re: [PATCH] x86/amd: Introduce and use X86_BUG_NULL_SEG

2021-09-08 Thread Jan Beulich
On 08.09.2021 15:59, Andrew Cooper wrote: > AMD/Hygon processors before the Zen2 microarchitecture don't clear the base or > limit fields when loading a NULL segment. > > Express the logic in terms of cpu_bug_null_seg, and adjust the workaround in > do_set_segment_base(). > > Signed-off-by: Andre

Re: [PATCH 6/9] vpci/header: Handle p2m range sets per BAR

2021-09-08 Thread Jan Beulich
On 08.09.2021 16:31, Oleksandr Andrushchenko wrote: > > On 06.09.21 17:47, Jan Beulich wrote: >> On 03.09.2021 12:08, Oleksandr Andrushchenko wrote: >>> From: Oleksandr Andrushchenko >>> >>> Instead of handling a single range set, that contains all the memory >>> regions of all the BARs and ROM,

Re: [PATCH 2/2] xen: reset legacy rtc flag for PV domU

2021-09-08 Thread Boris Ostrovsky
On 9/3/21 4:49 AM, Juergen Gross wrote: > A Xen PV guest doesn't have a legacy RTC device, so reset the legacy > RTC flag. Otherwise the following WARN splat will occur at boot: > > [1.333404] WARNING: CPU: 1 PID: 1 at > /home/gross/linux/head/drivers/rtc/rtc-mc146818-lib.c:25 > mc146818_ge

Re: [PATCH] xen: fix usage of pmd/pud_poplulate in mremap for pv guests

2021-09-08 Thread Juergen Gross
On 08.09.21 16:28, Jan Beulich wrote: On 08.09.2021 15:32, Juergen Gross wrote: On 08.09.21 13:07, Jan Beulich wrote: On 08.09.2021 09:36, Juergen Gross wrote: Commit 0881ace292b662 ("mm/mremap: use pmd/pud_poplulate to update page table entries") introduced a regression when running as Xen PV

Re: [PATCH] xen/balloon: use a kernel thread instead a workqueue

2021-09-08 Thread Boris Ostrovsky
On 8/27/21 8:32 AM, Juergen Gross wrote: > +static bool balloon_thread_cond(enum bp_state state, long credit) > +{ > + if (state != BP_EAGAIN) > + credit = 0; > + > + return current_credit() != credit || kthread_should_stop(); > +} > + > +/* > + * As this is a kthread it is gu

Re: [PATCH 5/9] vpci/header: Implement guest BAR register handlers

2021-09-08 Thread Jan Beulich
On 08.09.2021 15:33, Oleksandr Andrushchenko wrote: > > On 08.09.21 13:03, Jan Beulich wrote: >> On 08.09.2021 11:43, Oleksandr Andrushchenko wrote: >>> On 08.09.21 12:27, Jan Beulich wrote: On 07.09.2021 19:39, Oleksandr Andrushchenko wrote: > On 07.09.21 19:30, Jan Beulich wrote: >>

Re: [PATCH 3/3] x86/boot: fold branches in video handling code

2021-09-08 Thread Jan Beulich
On 08.09.2021 15:49, Andrew Cooper wrote: > On 08/09/2021 14:24, Jan Beulich wrote: >> Using Jcc to branch around a JMP is necessary only in pre-386 code, >> where Jcc is limited to disp8. Use the opposite Jcc directly in two >> places. Since it's adjacent, also convert an ORB to TESTB. >> >> Signe

Re: [PATCH 6/9] vpci/header: Handle p2m range sets per BAR

2021-09-08 Thread Oleksandr Andrushchenko
On 06.09.21 17:47, Jan Beulich wrote: > On 03.09.2021 12:08, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko >> >> Instead of handling a single range set, that contains all the memory >> regions of all the BARs and ROM, have them per BAR. > Without looking at how you carry out thi

Re: [PATCH] xen: fix usage of pmd/pud_poplulate in mremap for pv guests

2021-09-08 Thread Jan Beulich
On 08.09.2021 15:32, Juergen Gross wrote: > On 08.09.21 13:07, Jan Beulich wrote: >> On 08.09.2021 09:36, Juergen Gross wrote: >>> Commit 0881ace292b662 ("mm/mremap: use pmd/pud_poplulate to update page >>> table entries") introduced a regression when running as Xen PV guest. >> >> The description

Re: [PATCH] xen: remove stray preempt_disable() from PV AP startup code

2021-09-08 Thread Boris Ostrovsky
On 8/25/21 7:31 AM, Juergen Gross wrote: > In cpu_bringup() there is a call of preempt_disable() without a paired > preempt_enable(). This is not needed as interrupts are off initially. > Additionally this will result in early boot messages like: > > BUG: scheduling while atomic: swapper/1/0/0x00

Re: [linux-linus test] 152672: regressions - FAIL

2021-09-08 Thread Juergen Gross
On 23.08.20 07:52, Jürgen Groß wrote: On 23.08.20 07:24, osstest service owner wrote: flight 152672 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/152672/ Regressions :-( With 32-bit pv support now removed from the kernel the associated tests should be removed for th

[PATCH] x86/amd: Introduce and use X86_BUG_NULL_SEG

2021-09-08 Thread Andrew Cooper
AMD/Hygon processors before the Zen2 microarchitecture don't clear the base or limit fields when loading a NULL segment. Express the logic in terms of cpu_bug_null_seg, and adjust the workaround in do_set_segment_base(). Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pa

Re: [PATCH 3/3] x86/boot: fold branches in video handling code

2021-09-08 Thread Andrew Cooper
On 08/09/2021 14:24, Jan Beulich wrote: > Using Jcc to branch around a JMP is necessary only in pre-386 code, > where Jcc is limited to disp8. Use the opposite Jcc directly in two > places. Since it's adjacent, also convert an ORB to TESTB. > > Signed-off-by: Jan Beulich > --- > This is an easy ch

[linux-linus test] 164879: regressions - FAIL

2021-09-08 Thread osstest service owner
flight 164879 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/164879/ 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-

Re: [PATCH 5/9] vpci/header: Implement guest BAR register handlers

2021-09-08 Thread Oleksandr Andrushchenko
On 08.09.21 13:03, Jan Beulich wrote: > On 08.09.2021 11:43, Oleksandr Andrushchenko wrote: >> On 08.09.21 12:27, Jan Beulich wrote: >>> On 07.09.2021 19:39, Oleksandr Andrushchenko wrote: On 07.09.21 19:30, Jan Beulich wrote: > On 07.09.2021 15:33, Oleksandr Andrushchenko wrote: >> O

Re: [PATCH] xen: fix usage of pmd/pud_poplulate in mremap for pv guests

2021-09-08 Thread Juergen Gross
On 08.09.21 13:07, Jan Beulich wrote: On 08.09.2021 09:36, Juergen Gross wrote: Commit 0881ace292b662 ("mm/mremap: use pmd/pud_poplulate to update page table entries") introduced a regression when running as Xen PV guest. The description of that change starts with "pmd/pud_populate is the righ

[PATCH 3/3] x86/boot: fold branches in video handling code

2021-09-08 Thread Jan Beulich
Using Jcc to branch around a JMP is necessary only in pre-386 code, where Jcc is limited to disp8. Use the opposite Jcc directly in two places. Since it's adjacent, also convert an ORB to TESTB. Signed-off-by: Jan Beulich --- This is an easy change reducing the overall trampoline size a little. W

[PATCH 2/3] x86/boot: simplify mode_table

2021-09-08 Thread Jan Beulich
There's no point in writing 80x25 text mode information via multiple insns all storing immediate values. The data can simply be included first thing in the vga_modes table, allowing the already present REP MOVSB to take care of everything in one go. While touching this also correct a related but s

[PATCH 1/3] x86/boot: make "vga=current" work with graphics modes

2021-09-08 Thread Jan Beulich
GrUB2 can be told to leave the screen in the graphics mode it has been using (or any other one), via "set gfxpayload=keep" (or suitable variants thereof). In this case we can avoid doing another mode switch ourselves. This in particular avoids possibly setting the screen to a less desirable mode: O

[PATCH 0/3] x86/boot: small video mode handling adjustments

2021-09-08 Thread Jan Beulich
1: make "vga=current" work with graphics modes 2: simplify mode_table 3: fold branches in video handling code Jan

[PATCH v2] xen/sched: fix sched_move_domain() for domain without vcpus

2021-09-08 Thread Juergen Gross
In case a domain is created with a cpupool other than Pool-0 specified it will be moved to that cpupool before any vcpus are allocated. This will lead to a NULL pointer dereference in sched_move_domain(). Fix that by tolerating vcpus not being allocated yet. Fixes: 70fadc41635b9b6 ("xen/cpupool:

Re: [PATCH] tools/libs: fix build of stubdoms

2021-09-08 Thread Andrew Cooper
On 08/09/2021 13:43, Juergen Gross wrote: > In case abi-dumper is available the stubdom builds will fail due to a > false dependency on dynamic loadable libraries. Fix that. > > Fixes: d7c9f7a7a3959913b4 ("tools/libs: Write out an ABI analysis when > abi-dumper is available") > Signed-off-by: Juer

[PATCH v2] Config: use Mini-OS commit 9f09744aa3e5982 for xen-unstable

2021-09-08 Thread Juergen Gross
Switch the used Mini-OS commit to 9f09744aa3e5982 in xen-unstable. Signed-off-by: Juergen Gross --- V2: - use a specific commit instead of master (Ian Jackson, Jan Beulich) --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index 4d723eec1d..e

[PATCH] tools/libs: fix build of stubdoms

2021-09-08 Thread Juergen Gross
In case abi-dumper is available the stubdom builds will fail due to a false dependency on dynamic loadable libraries. Fix that. Fixes: d7c9f7a7a3959913b4 ("tools/libs: Write out an ABI analysis when abi-dumper is available") Signed-off-by: Juergen Gross --- tools/libs/libs.mk | 2 ++ 1 file cha

Re: [PATCH] domain: try to address Coverity pointing out a missing "break" in domain_teardown()

2021-09-08 Thread Jan Beulich
On 08.09.2021 12:32, Jan Beulich wrote: > On 01.09.2021 10:45, Jan Beulich wrote: >> Commit 806448806264 ("xen/domain: Fix label position in >> domain_teardown()" has caused Coverity to report a _new_ supposedly >> un-annotated fall-through in a switch(). I find this (once again) >> puzzling; I'm h

Re: [PATCH v2 2/2] x86/cpuid: Detect null segment behaviour on Zen2 CPUs

2021-09-08 Thread Andrew Cooper
On 08/09/2021 13:08, Jan Beulich wrote: > On 08.09.2021 10:19, Jane Malalane wrote: >> Zen2 CPUs actually have this behaviour, but the CPUID bit couldn't be >> introduced into Zen2 due to a lack of leaves. So, it was added in a >> new leaf in Zen3. Nonetheless, hypervisors can synthesize the CPUID

Xen Security Advisory 384 v3 (CVE-2021-28701) - Another race in XENMAPSPACE_grant_table handling

2021-09-08 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2021-28701 / XSA-384 version 3 Another race in XENMAPSPACE_grant_table handling UPDATES IN VERSION 3 Public release. ISSUE DESCRIPTION =

Re: [XEN PATCH 2/2] build: add --full to version.sh to guess $(XEN_FULLVERSION)

2021-09-08 Thread Jan Beulich
On 08.09.2021 11:54, Anthony PERARD wrote: > --- a/tools/flask/policy/Makefile.common > +++ b/tools/flask/policy/Makefile.common > @@ -35,7 +35,7 @@ OUTPUT_POLICY ?= $(BEST_POLICY_VER) > # > > > -POLICY_FILENAME = $(FLASK_BUILD_DIR)/xenpolicy-$(shell $(M

Re: [XEN PATCH 1/2] build: set policy filename on make command line

2021-09-08 Thread Jan Beulich
On 08.09.2021 11:54, Anthony PERARD wrote: > In order to avoid flask/Makefile.common calling `make xenversion`, we > override POLICY_FILENAME with the value we are going to use anyway. > > Signed-off-by: Anthony PERARD Acked-by: Jan Beulich > --- a/xen/xsm/flask/Makefile > +++ b/xen/xsm/flask/

Re: [PATCH v2 2/2] x86/cpuid: Detect null segment behaviour on Zen2 CPUs

2021-09-08 Thread Jan Beulich
On 08.09.2021 10:19, Jane Malalane wrote: > Zen2 CPUs actually have this behaviour, but the CPUID bit couldn't be > introduced into Zen2 due to a lack of leaves. So, it was added in a > new leaf in Zen3. Nonetheless, hypervisors can synthesize the CPUID > bit in software. Considering the prior mod

Re: [XEN PATCH v7 05/51] x86/mm: avoid building multiple .o from a single .c file

2021-09-08 Thread Jan Beulich
On 08.09.2021 13:14, Anthony PERARD wrote: > On Tue, Sep 07, 2021 at 08:14:14AM +0200, Jan Beulich wrote: >> On 24.08.2021 12:49, Anthony PERARD wrote: >>> This replace the use of a single .c file use for multiple .o file by >>> creating multiple .c file including the first one. >>> >>> There's qui

[qemu-mainline test] 164878: tolerable FAIL - PUSHED

2021-09-08 Thread osstest service owner
flight 164878 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/164878/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds18 guest-start/debian.repeat fail REGR. vs. 164874 Tests which did not succee

Re: [XEN PATCH v7 05/51] x86/mm: avoid building multiple .o from a single .c file

2021-09-08 Thread Ian Jackson
Anthony PERARD writes ("Re: [XEN PATCH v7 05/51] x86/mm: avoid building multiple .o from a single .c file"): > On Tue, Sep 07, 2021 at 08:14:14AM +0200, Jan Beulich wrote: > > Hmm, when replying to 00/51 I didn't recall I gave an R-b for this one > > already. I'd like to restrict it some: It shoul

Re: [PATCH v2 3/3] x86/amd: Use newer SSBD mechanisms if they exist

2021-09-08 Thread Andrew Cooper
On 08/09/2021 11:43, Jan Beulich wrote: > On 07.09.2021 18:19, Andrew Cooper wrote: >> The opencoded legacy Memory Disambiguation logic in init_amd() neglected >> Fam19h for the Zen3 microarchitecture. In practice, all Zen2 based system >> have the architectural MSR_SPEC_CTRL and the SSBD bit with

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

2021-09-08 Thread Anthony PERARD
This will help prevent the CI loop from having build failures when `checkpolicy` isn't available when doing "randconfig" jobs. To prevent "randconfig" from selecting XSM_FLASK_POLICY when `checkpolicy` isn't available, we will actually override the config output with the use of KCONFIG_ALLCONFIG.

Re: [XEN PATCH v7 05/51] x86/mm: avoid building multiple .o from a single .c file

2021-09-08 Thread Anthony PERARD
On Tue, Sep 07, 2021 at 08:14:14AM +0200, Jan Beulich wrote: > On 24.08.2021 12:49, Anthony PERARD wrote: > > This replace the use of a single .c file use for multiple .o file by > > creating multiple .c file including the first one. > > > > There's quite a few issues with trying to build more tha

Re: [PATCH] xen: fix usage of pmd/pud_poplulate in mremap for pv guests

2021-09-08 Thread Jan Beulich
On 08.09.2021 09:36, Juergen Gross wrote: > Commit 0881ace292b662 ("mm/mremap: use pmd/pud_poplulate to update page > table entries") introduced a regression when running as Xen PV guest. The description of that change starts with "pmd/pud_populate is the right interface to be used to set the resp

Re: Xen Booting Problem on ARM Machine

2021-09-08 Thread Luca Fancellu
> On 8 Sep 2021, at 11:46, Sai Kiran wrote: > > > > Hello, > > I have Xen-4.15.0 on an ARM Machine, with Debian 11 installed on it. I am > able to do “make world” and “make install”, after “./configure”, as specified > in README file. When I reboot the system, I get the following message

Xen Booting Problem on ARM Machine

2021-09-08 Thread Sai Kiran
Hello, I have Xen-4.15.0 on an ARM Machine, with Debian 11 installed on it. I am able to do “make world” and “make install”, after “./configure”, as specified in README file. When I reboot the system, I get the following message: Warning: All 128 bootinfo mem banks exhausted. Warning: All 128 booti

Re: [PATCH v2 3/3] x86/amd: Use newer SSBD mechanisms if they exist

2021-09-08 Thread Jan Beulich
On 07.09.2021 18:19, Andrew Cooper wrote: > The opencoded legacy Memory Disambiguation logic in init_amd() neglected > Fam19h for the Zen3 microarchitecture. In practice, all Zen2 based system > have the architectural MSR_SPEC_CTRL and the SSBD bit within it. Don't you mean Zen3 in the 2nd senten

Re: [PATCH] domain: try to address Coverity pointing out a missing "break" in domain_teardown()

2021-09-08 Thread Jan Beulich
On 01.09.2021 10:45, Jan Beulich wrote: > Commit 806448806264 ("xen/domain: Fix label position in > domain_teardown()" has caused Coverity to report a _new_ supposedly > un-annotated fall-through in a switch(). I find this (once again) > puzzling; I'm having an increasingly hard time figuring what

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

2021-09-08 Thread osstest service owner
flight 164877 xen-unstable real [real] flight 164881 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/164877/ http://logs.test-lab.xenproject.org/osstest/logs/164881/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd6

Re: [PATCH 5/9] vpci/header: Implement guest BAR register handlers

2021-09-08 Thread Jan Beulich
On 08.09.2021 11:43, Oleksandr Andrushchenko wrote: > > On 08.09.21 12:27, Jan Beulich wrote: >> On 07.09.2021 19:39, Oleksandr Andrushchenko wrote: >>> On 07.09.21 19:30, Jan Beulich wrote: On 07.09.2021 15:33, Oleksandr Andrushchenko wrote: > On 06.09.21 17:31, Jan Beulich wrote: >>

[PATCH v6 5/7] xen: re-define assign_pages and introduce a new function assign_page

2021-09-08 Thread Penny Zheng
In order to deal with the trouble of count-to-order conversion when page number is not in a power-of-two, this commit re-define assign_pages for nr pages and introduces a new helper assign_page for original page with a single order. Signed-off-by: Penny Zheng --- xen/arch/x86/pv/dom0_build.c |

[PATCH v6 2/7] xen/arm: introduce domain on Static Allocation

2021-09-08 Thread Penny Zheng
Static Allocation refers to system or sub-system(domains) for which memory areas are pre-defined by configuration using physical address ranges. Those pre-defined memory, -- Static Memory, as parts of RAM reserved in the beginning, shall never go to heap allocator or boot allocator for any use. M

[PATCH v6 7/7] xen/arm: introduce allocate_static_memory

2021-09-08 Thread Penny Zheng
This commit introduces a new function allocate_static_memory to allocate static memory as guest RAM for Domain on Static Allocation. It uses acquire_domstatic_pages to acquire pre-configured static memory for this domain, and uses guest_physmap_add_pages to set up P2M table. These pre-defined stat

[PATCH v6 4/7] xen/arm: static memory initialization

2021-09-08 Thread Penny Zheng
This patch introduces static memory initialization, during system boot-up. The new function init_staticmem_pages is responsible for static memory initialization. Helper free_staticmem_pages is the equivalent of free_heap_pages, to free nr_mfns pages of static memory. This commit also introduces

[XEN PATCH 2/2] build: add --full to version.sh to guess $(XEN_FULLVERSION)

2021-09-08 Thread Anthony PERARD
Running $(MAKE) like that in a $(shell ) while parsing the Makefile doesn't work reliably. In some case, make will complain with "jobserver unavailable: using -j1. Add '+' to parent make rule.", which will be part of "$(make xenversion)" output. It isn't possible to distinguish between the output

[PATCH v6 6/7] xen/arm: introduce acquire_staticmem_pages and acquire_domstatic_pages

2021-09-08 Thread Penny Zheng
New function acquire_staticmem_pages aims to acquire nr_mfns contiguous pages of static memory, starting at #smfn. And it is the equivalent of alloc_heap_pages for static memory. For each page, it shall check if the page is reserved(PGC_reserved) and free. It shall also do a set of necessary initi

[XEN PATCH 1/2] build: set policy filename on make command line

2021-09-08 Thread Anthony PERARD
In order to avoid flask/Makefile.common calling `make xenversion`, we override POLICY_FILENAME with the value we are going to use anyway. Signed-off-by: Anthony PERARD --- xen/xsm/flask/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/xsm/flask/Makefile b/xen/xsm/

[XEN PATCH 0/2] build: attempt to "fix" GitLab CI job "debian-unstable-gcc-arm64"

2021-09-08 Thread Anthony PERARD
Patch series available in this git branch: https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.fix-flask-policy.mk-v1 Well, that job fails with weird failure: make[6]: Entering directory '/builds/xen-project/xen/tools/flask/policy' make[6]: warning: jobserver unavailable:

[PATCH v6 3/7] xen: introduce mark_page_free

2021-09-08 Thread Penny Zheng
This commit defines a new helper mark_page_free to extract common code, like following the same cache/TLB coherency policy, between free_heap_pages and the new function free_staticmem_pages, which will be introduced later. The PDX compression makes that conversion between the MFN and the page can

[PATCH v6 0/7] Domain on Static Allocation

2021-09-08 Thread Penny Zheng
Static Allocation refers to system or sub-system(domains) for which memory areas are pre-defined by configuration using physical address ranges. Those pre-defined memory, -- Static Memory, as parts of RAM reserved in the beginning, shall never go to heap allocator or boot allocator for any use. M

[PATCH v6 1/7] xen/arm: introduce new helper device_tree_get_meminfo

2021-09-08 Thread Penny Zheng
This commit creates a new helper device_tree_get_meminfo to iterate over a device tree property to get memory info, like "reg". Signed-off-by: Penny Zheng --- xen/arch/arm/bootfdt.c | 83 -- 1 file changed, 47 insertions(+), 36 deletions(-) diff --git a/x

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

2021-09-08 Thread osstest service owner
flight 164882 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/164882/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen e70a9a043a5ce6d4025420f729bc473f711bf5d1 baseline version: xen 2d49

  1   2   >