Re: [PATCH 05/12] swiotlb-xen: suppress certain init retries

2021-09-08 Thread Christoph Hellwig
On Tue, Sep 07, 2021 at 02:05:54PM +0200, Jan Beulich wrote: > Only on the 2nd of the paths leading to xen_swiotlb_init()'s "error" > label it is useful to retry the allocation; the first one did already > iterate through all possible order values. > > Signed-off-by: Jan Beulich Looks good, Rev

Re: [PATCH 06/12] swiotlb-xen: limit init retries

2021-09-08 Thread Christoph Hellwig
On Tue, Sep 07, 2021 at 02:06:37PM +0200, Jan Beulich wrote: > Due to the use of max(1024, ...) there's no point retrying (and issuing > bogus log messages) when the number of slabs is already no larger than > this minimum value. > > Signed-off-by: Jan Beulich Looks good, Reviewed-by: Christoph

Re: [PATCH 07/12] swiotlb-xen: drop leftover __ref

2021-09-08 Thread Christoph Hellwig
On Tue, Sep 07, 2021 at 02:06:55PM +0200, Jan Beulich wrote: > Commit a98f565462f0 ("xen-swiotlb: split xen_swiotlb_init") should not > only have added __init to the split off function, but also should have > dropped __ref from the one left. > > Signed-off-by: Jan Beulich Looks good, Reviewed-b

Re: [PATCH 08/12] swiotlb-xen: arrange to have buffer info logged

2021-09-08 Thread Christoph Hellwig
On Tue, Sep 07, 2021 at 02:07:21PM +0200, Jan Beulich wrote: > I consider it unhelpful that address and size of the buffer aren't put > in the log file; it makes diagnosing issues needlessly harder. The > majority of callers of swiotlb_init() also passes 1 for the "verbose" > parameter. > > Signe

Re: [PATCH 09/12] swiotlb-xen: drop DEFAULT_NSLABS

2021-09-08 Thread Christoph Hellwig
On Tue, Sep 07, 2021 at 02:07:47PM +0200, Jan Beulich wrote: > It was introduced by 4035b43da6da ("xen-swiotlb: remove xen_set_nslabs") > and then not removed by 2d29960af0be ("swiotlb: dynamically allocate > io_tlb_default_mem"). > > Signed-off-by: Jan Beulich Looks good, Reviewed-by: Christop

Re: [PATCH 11/12] xen/pci-swiotlb: reduce visibility of symbols

2021-09-08 Thread Christoph Hellwig
On Tue, Sep 07, 2021 at 02:11:14PM +0200, Jan Beulich wrote: > xen_swiotlb and pci_xen_swiotlb_init() are only used within the file > defining them, so make them static and remove the stubs. Otoh > pci_xen_swiotlb_detect() has a use (as function pointer) from the main > pci-swiotlb.c file - convert

Re: xen-unstable linux-5.14: 1 of 2 multicall(s) failed: cpu 0

2021-09-08 Thread Sander Eikelenboom
On 07/09/2021 21:52, Sander Eikelenboom wrote: On 07/09/2021 15:53, Juergen Gross wrote: On 06.09.21 23:35, Sander Eikelenboom wrote: L.S., On my AMD box running:     xen-unstable changeset: Fri Sep 3 15:10:43 2021 +0200 git:2d4978ead4     linux kernel: 5.14.1 With this setup I'm encoun

Re: [PATCH 12/12] swiotlb-xen: this is PV-only on x86

2021-09-08 Thread Christoph Hellwig
On Tue, Sep 07, 2021 at 02:13:21PM +0200, Jan Beulich wrote: > The code is unreachable for HVM or PVH, and it also makes little sense > in auto-translated environments. On Arm, with > xen_{create,destroy}_contiguous_region() both being stubs, I have a hard > time seeing what good the Xen specific v

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

2021-09-08 Thread Wei Chen
Hi Julien, Stefano, Jan > -Original Message- > From: Xen-devel On Behalf Of Wei > Chen > Sent: 2021年8月28日 21:58 > To: Julien Grall ; Stefano Stabellini > > Cc: xen-devel@lists.xenproject.org; Bertrand Marquis > ; Jan Beulich > Subject: RE: [XEN RFC PATCH 23/40] xen/arm: introduce a help

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

2021-09-08 Thread Juergen Gross
Commit 0881ace292b662 ("mm/mremap: use pmd/pud_poplulate to update page table entries") introduced a regression when running as Xen PV guest. Today pmd/pud_poplulate() for Xen PV assumes that the PFN inserted is referencing a not yet used page table. In case of move_normal_pmd/pud() this is not tr

Re: NULL scheduler DoS

2021-09-08 Thread Ahmed, Daniele
Hi, sorry for the late reply. Here is the full log from the serial console: https://pastebin.com/raw/g9EFtk3y This still happens on the current unstable as of today. Thank you Daniele On 11/08/2021, 12:09, "Dario Faggioli" wrote: On Mon, 2021-08-09 at 21:38 +0100, Julien Grall wrote:

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

2021-09-08 Thread Jane Malalane
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. So, Xen probes for NSCB (NullSelectorClearsBit) and synthesizes the bit, if

Re: [PATCH 04/12] swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests

2021-09-08 Thread Jan Beulich
On 08.09.2021 08:57, Christoph Hellwig wrote: > On Tue, Sep 07, 2021 at 02:05:32PM +0200, Jan Beulich wrote: >> While the hypervisor hasn't been enforcing this, we would still better >> avoid issuing requests with GFNs not aligned to the requested order. >> >> Signed-off-by: Jan Beulich >> --- >>

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

2021-09-08 Thread Jan Beulich
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: On 03.09.2021 12:08, Oleksandr Andrushchenko wrote: > --- a/xen/drivers/vpci/header.c > +++ b/xen

Re: [PATCH 07/17] IOMMU/x86: restrict IO-APIC mappings for PV Dom0

2021-09-08 Thread Jan Beulich
On 07.09.2021 19:13, Andrew Cooper wrote: > On 26/08/2021 13:55, Jan Beulich wrote: >> On 26.08.2021 13:57, Andrew Cooper wrote: >>> On 24/08/2021 15:21, Jan Beulich wrote: While already the case for PVH, there's no reason to treat PV differently here, though of course the addresses get t

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

2021-09-08 Thread Oleksandr Andrushchenko
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: > On 03.09.2021 12:08, Oleksandr Andrushchenko wrote: >> -

[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

[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

[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 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

[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:

[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/

[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 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 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

[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 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 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 |

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: >>

[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] 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

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

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: 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

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 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

[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: [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

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

[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 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

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 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: [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

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: [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

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

[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

[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

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] 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:

[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 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 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 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

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

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

[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 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

[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: [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

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: [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 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 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 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] 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] 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 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 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] 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] 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 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

[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 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:

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 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 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

[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] 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 >

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

[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

[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/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] 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

[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

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

[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

[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 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 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 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 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 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 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 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 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

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 ++

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

  1   2   >