[ovmf test] 170501: regressions - FAIL

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

Re: [PATCH v2 2/2] xen/arm: gnttab: modify macros to evaluate all arguments and only once

2022-05-17 Thread Michal Orzel
Hi Julien, On 16.05.2022 12:19, Julien Grall wrote: > Hi Michal, > > On 06/05/2022 10:42, Michal Orzel wrote: >> Modify macros to evaluate all the arguments and make sure the arguments >> are evaluated only once. Introduce following intermediate macros: >> gnttab_status_gfn_, gnttab_shared_gfn_ t

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

2022-05-17 Thread Penny Zheng
Hi Julien > -Original Message- > From: Julien Grall > Sent: Tuesday, May 17, 2022 2:01 AM > To: Penny Zheng ; xen-devel@lists.xenproject.org > Cc: Wei Chen ; Andrew Cooper > ; George Dunlap ; > Jan Beulich ; Stefano Stabellini ; > Wei Liu > Subject: Re: [PATCH v4 1/6] xen: do not free re

Re: [PATCH v2] xen/arm: gic-v3-lpi: Allocate the pending table while preparing the CPU

2022-05-17 Thread Julien Grall
On 17/05/2022 07:47, Michal Orzel wrote: Hi Julien, Hi Michal, On 16.05.2022 19:02, Julien Grall wrote: +static int cpu_callback(struct notifier_block *nfb, unsigned long action, +void *hcpu) +{ +unsigned long cpu = (unsigned long)hcpu; As cpu does not change

[ovmf test] 170504: regressions - FAIL

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

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

2022-05-17 Thread Julien Grall
On 17/05/2022 07:24, Penny Zheng wrote: Hi Julien Hi Penny, +if ( unlikely(!page) ) +return INVALID_MFN; + +smfn = page_to_mfn(page); + +if ( acquire_domstatic_pages(d, smfn, 1, memflags) ) I am OK if we call acquire_domstatic_pages() for now. But long term, I think w

Re: [PATCH v2] xen/arm: gic-v3-lpi: Allocate the pending table while preparing the CPU

2022-05-17 Thread Michal Orzel
On 17.05.2022 10:34, Julien Grall wrote: > > > On 17/05/2022 07:47, Michal Orzel wrote: >> Hi Julien, > > Hi Michal, > >> >> On 16.05.2022 19:02, Julien Grall wrote: >>> +static int cpu_callback(struct notifier_block *nfb, unsigned long action, >>> +    void *hcpu) >>> +{

Re: [PATCH v2] xen/arm: gic-v3-lpi: Allocate the pending table while preparing the CPU

2022-05-17 Thread Bertrand Marquis
Hi Julien, > On 16 May 2022, at 18:02, Julien Grall wrote: > > From: Julien Grall > > Commit 88a037e2cfe1 "page_alloc: assert IRQs are enabled in heap > alloc/free" extended the checks in the buddy allocator to catch any > use of the helpers from context with interrupts disabled. > > Unfortun

[libvirt test] 170500: regressions - FAIL

2022-05-17 Thread osstest service owner
flight 170500 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/170500/ 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

[PATCH v4 1/8] xen/arm: introduce static shared memory

2022-05-17 Thread Penny Zheng
From: Penny Zheng This patch serie introduces a new feature: setting up static shared memory on a dom0less system, through device tree configuration. This commit parses shared memory node at boot-time, and reserve it in bootinfo.reserved_mem to avoid other use. This commits proposes a new Kconf

[PATCH v4 0/8] static shared memory on dom0less system

2022-05-17 Thread Penny Zheng
In safety-critical environment, it is not considered safe to dynamically change important configurations at runtime. Everything should be statically defined and statically verified. In this case, if the system configuration knows a priori that there are only 2 VMs and they need to communicate over

[PATCH v4 2/8] xen/arm: allocate static shared memory to the default owner dom_io

2022-05-17 Thread Penny Zheng
From: Penny Zheng This commit introduces process_shm to cope with static shared memory in domain construction. DOMID_IO will be the default owner of memory pre-shared among multiple domains at boot time, when no explicit owner is specified. This commit only considers allocating static shared me

[PATCH v4 3/8] xen/arm: allocate static shared memory to a specific owner domain

2022-05-17 Thread Penny Zheng
If owner property is defined, then owner domain of a static shared memory region is not the default dom_io anymore, but a specific domain. This commit implements allocating static shared memory to a specific domain when owner property is defined. Coding flow for dealing borrower domain will be in

[PATCH v4 4/8] xen/arm: introduce put_page_nr and get_page_nr

2022-05-17 Thread Penny Zheng
Later, we need to add the right amount of references, which should be the number of borrower domains, to the owner domain. Since we only have get_page() to increment the page reference by 1, a loop is needed per page, which is inefficient and time-consuming. To save the loop time, this commit intr

[PATCH v4 5/8] xen/arm: Add additional reference to owner domain when the owner is allocated

2022-05-17 Thread Penny Zheng
Borrower domain will fail to get a page ref using the owner domain during allocation, when the owner is created after borrower. So here, we decide to get and add the right amount of reference, which is the number of borrowers, when the owner is allocated. Signed-off-by: Penny Zheng --- v4 change

[PATCH v4 7/8] xen/arm: create shared memory nodes in guest device tree

2022-05-17 Thread Penny Zheng
We expose the shared memory to the domU using the "xen,shared-memory-v1" reserved-memory binding. See Documentation/devicetree/bindings/reserved-memory/xen,shared-memory.txt in Linux for the corresponding device tree binding. To save the cost of re-parsing shared memory device tree configuration w

[PATCH v4 6/8] xen/arm: set up shared memory foreign mapping for borrower domain

2022-05-17 Thread Penny Zheng
This commit sets up shared memory foreign mapping for borrower domain. If owner domain is the default dom_io, all shared domain are treated as borrower domain. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- v4 changes: - no change --- v3 change: - use map_regions_p2mt instead --

[PATCH v4 8/8] xen/arm: enable statically shared memory on Dom0

2022-05-17 Thread Penny Zheng
From: Penny Zheng To add statically shared memory nodes in Dom0, user shall put according static shared memory configuration under /chosen node. This commit adds shm-processing function process_shm in construct_dom0 to enable statically shared memory on Dom0. Signed-off-by: Penny Zheng Reviewe

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

2022-05-17 Thread Julien Grall
Hi, On 17/05/2022 09:21, Penny Zheng wrote: Yes, I remembered that asynchronous is still on the to-do list for static memory. If it doesn't bother too much to you, I would like to ask some help on this issue, ;). I only knew basic knowledge on the scrubbing, My kwnoledge on the scrubbing c

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

2022-05-17 Thread osstest service owner
flight 170499 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/170499/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stopfail like 170489 test-armhf-armhf-libvirt 16 sav

[ovmf test] 170505: regressions - FAIL

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

Re: [PATCH 05/30] misc/pvpanic: Convert regular spinlock into trylock on panic path

2022-05-17 Thread Petr Mladek
On Tue 2022-05-10 10:00:58, Guilherme G. Piccoli wrote: > On 10/05/2022 09:14, Petr Mladek wrote: > > [...] > >> With that said, it's dangerous to use regular spinlocks in such path, > >> as introduced by commit b3c0f8774668 ("misc/pvpanic: probe multiple > >> instances"). > >> This patch fixes th

Re: [PATCH v5 2/3] amd/msr: allow passthrough of VIRT_SPEC_CTRL for HVM guests

2022-05-17 Thread Jan Beulich
On 09.05.2022 12:23, Roger Pau Monné wrote: > On Fri, May 06, 2022 at 02:15:47PM +0200, Jan Beulich wrote: >> On 03.05.2022 10:26, Roger Pau Monne wrote: >>> --- a/xen/arch/x86/cpuid.c >>> +++ b/xen/arch/x86/cpuid.c >>> @@ -541,6 +541,9 @@ static void __init calculate_hvm_max_policy(void) >>>

Re: [PATCH] build/xen: fix symbol generation with LLVM LD

2022-05-17 Thread Jan Beulich
On 16.05.2022 10:01, Roger Pau Monné wrote: > On Sun, May 08, 2022 at 10:34:43AM +0200, Jan Beulich wrote: >> On 06.05.2022 17:35, Roger Pau Monné wrote: >>> On Fri, May 06, 2022 at 03:31:12PM +0200, Roger Pau Monné wrote: On Fri, May 06, 2022 at 02:56:56PM +0200, Jan Beulich wrote: > On 0

[ovmf test] 170506: regressions - FAIL

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

[REGRESSION] Re: [PATCH v8 6/7] arm/dom0less: assign dom0less guests to cpupools

2022-05-17 Thread Andrew Cooper
On 06/05/2022 13:00, Luca Fancellu wrote: > Introduce domain-cpupool property of a xen,domain device tree node, > that specifies the cpupool device tree handle of a xen,cpupool node > that identifies a cpupool created at boot time where the guest will > be assigned on creation. > > Add member to th

Re: [PATCH 05/30] misc/pvpanic: Convert regular spinlock into trylock on panic path

2022-05-17 Thread Guilherme G. Piccoli
On 17/05/2022 07:58, Petr Mladek wrote: > [...] >> Thanks for the review Petr. Patch was already merged - my goal was to be >> concise, i.e., a patch per driver / module, so the patch kinda fixes >> whatever I think is wrong with the driver with regards panic handling. >> >> Do you think it worth t

Re: [REGRESSION] Re: [PATCH v8 6/7] arm/dom0less: assign dom0less guests to cpupools

2022-05-17 Thread Juergen Gross
On 17.05.22 15:01, Andrew Cooper wrote: On 06/05/2022 13:00, Luca Fancellu wrote: Introduce domain-cpupool property of a xen,domain device tree node, that specifies the cpupool device tree handle of a xen,cpupool node that identifies a cpupool created at boot time where the guest will be assigne

Re: [REGRESSION] Re: [PATCH v8 6/7] arm/dom0less: assign dom0less guests to cpupools

2022-05-17 Thread Andrew Cooper
On 17/05/2022 14:01, Andrew Cooper wrote: > On 06/05/2022 13:00, Luca Fancellu wrote: >> Introduce domain-cpupool property of a xen,domain device tree node, >> that specifies the cpupool device tree handle of a xen,cpupool node >> that identifies a cpupool created at boot time where the guest will

Re: [PATCH 14/30] panic: Properly identify the panic event to the notifiers' callbacks

2022-05-17 Thread Petr Mladek
On Tue 2022-05-10 13:16:54, Guilherme G. Piccoli wrote: > On 10/05/2022 12:16, Petr Mladek wrote: > > [...] > > Hmm, this looks like a hack. PANIC_UNUSED will never be used. > > All notifiers will be always called with PANIC_NOTIFIER. > > > > The @val parameter is normally used when the same notif

Re: [REGRESSION] [PATCH v8 6/7] arm/dom0less: assign dom0less guests to cpupools

2022-05-17 Thread Luca Fancellu
Hi Andrew, > On 17 May 2022, at 14:01, Andrew Cooper wrote: > > On 06/05/2022 13:00, Luca Fancellu wrote: >> Introduce domain-cpupool property of a xen,domain device tree node, >> that specifies the cpupool device tree handle of a xen,cpupool node >> that identifies a cpupool created at boot tim

[ovmf test] 170507: regressions - FAIL

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

Re: [PATCH v4] Preserve the EFI System Resource Table for dom0

2022-05-17 Thread Jan Beulich
On 07.05.2022 06:26, Demi Marie Obenour wrote: > On Fri, May 06, 2022 at 12:59:05PM +0200, Jan Beulich wrote: >> On 05.05.2022 07:38, Demi Marie Obenour wrote: >>> @@ -1077,6 +1110,35 @@ static void __init efi_exit_boot(EFI_HANDLE >>> ImageHandle, EFI_SYSTEM_TABLE *Syste >>> if ( EFI_ERRO

Re: [PATCH v2 1/2] xen/arm: gnttab: use static inlines for gnttab_{release_}host_mapping*

2022-05-17 Thread Jan Beulich
On 10.05.2022 08:52, Michal Orzel wrote: > Do you have any remarks related to the second patch in this series? No, I have no further comments there. Jan

[PATCH 0/2] x86/vmx: implement Bus Lock and VM Notify

2022-05-17 Thread Roger Pau Monne
Hello, Following series implements support for bus lock and VM notify. Patches are not really dependent, but I've developed them together by virtue of both features being in Intel Instructions Set Extensions PR Chapter 9. Thanks, Roger. Roger Pau Monne (2): x86/vmx: implement Bus Lock detecti

[PATCH 1/2] x86/vmx: implement Bus Lock detection

2022-05-17 Thread Roger Pau Monne
Add support for enabling Bus Lock Detection on Intel systems. Such detection works by triggering a vmexit, which is enough of a pause to prevent a guest from abusing of the Bus Lock. Add an extra perf counter to track the number of Bus Locks detected. This is done because Bus Locks can also be re

[PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-17 Thread Roger Pau Monne
Under certain conditions guests can get the CPU stuck in an infinite loop without the possibility of an interrupt window to occur. This was the case with the scenarios described in XSA-156. Make use of the Notify VM Exit mechanism, that will trigger a VM Exit if no interrupt window occurs for a s

[PATCH v2] x86/hvm: Widen condition for is_hvm_pv_evtchn_vcpu()

2022-05-17 Thread Jane Malalane
Have is_hvm_pv_evtchn_vcpu() return true for vector callbacks for evtchn delivery set up on a per-vCPU basis via HVMOP_set_evtchn_upcall_vector. is_hvm_pv_evtchn_vcpu() returning true is a condition for setting up physical IRQ to event channel mappings. The naming of the CPUID bit is quite generi

Re: [PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-05-17 Thread Petr Mladek
On Mon 2022-05-16 09:02:10, Evan Green wrote: > On Mon, May 16, 2022 at 8:07 AM Guilherme G. Piccoli > wrote: > > > > Thanks for the review! > > > > I agree with the blinking stuff, I can rework and add all LED/blinking > > stuff into the loop list, it does make sense. I'll comment a bit in the >

Re: [PATCH v5 2/3] amd/msr: allow passthrough of VIRT_SPEC_CTRL for HVM guests

2022-05-17 Thread Roger Pau Monné
On Tue, May 17, 2022 at 02:10:29PM +0200, Jan Beulich wrote: > On 09.05.2022 12:23, Roger Pau Monné wrote: > > On Fri, May 06, 2022 at 02:15:47PM +0200, Jan Beulich wrote: > >> On 03.05.2022 10:26, Roger Pau Monne wrote: > >>> --- a/xen/arch/x86/cpuid.c > >>> +++ b/xen/arch/x86/cpuid.c > >>> @@ -54

Re: [PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-05-17 Thread Petr Mladek
On Mon 2022-05-16 12:06:17, Guilherme G. Piccoli wrote: > Thanks for the review! > > I agree with the blinking stuff, I can rework and add all LED/blinking > stuff into the loop list, it does make sense. I'll comment a bit in the > others below... > > On 16/05/2022 11:01, Petr Mladek wrote: > >>

Re: [PATCH 21/30] panic: Introduce the panic pre-reboot notifier list

2022-05-17 Thread Petr Mladek
On Mon 2022-05-16 13:33:51, Guilherme G. Piccoli wrote: > On 16/05/2022 13:18, Luck, Tony wrote: > >> [...] > > Would it be possible to have some global "kdump is configured + enabled" > > flag? > > > > Then notifiers could make an informed choice on whether to deep dive to > > get all the possib

[xen-unstable test] 170503: tolerable FAIL

2022-05-17 Thread osstest service owner
flight 170503 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/170503/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-xl-qemuu-win7-amd64 12 windows-install fail in 170492 pass in 170503 test-amd64-i386-xl-qemuu

[ovmf test] 170508: regressions - FAIL

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

Re: [PATCH] x86/mwait-idle: add missing newline

2022-05-17 Thread Jan Beulich
On 16.05.2022 12:36, Roger Pau Monne wrote: > Fixes: 5a211704e8 ('mwait-idle: prevent SKL-H boot failure when C8+C9+C10 > enabled') > Signed-off-by: Roger Pau Monné Thanks for spotting. I wonder whether we shouldn't mention the Linux commit (654d08a42a56) which did this as a "side effect". Obvio

[RFC PATCH 2/2] tools/misc: Add xen-stats tool

2022-05-17 Thread Matias Ezequiel Vara Larsen
Add a demostration tool that uses the stats_table resource to query vcpu time for a DomU. Signed-off-by: Matias Ezequiel Vara Larsen --- tools/misc/Makefile| 5 +++ tools/misc/xen-stats.c | 83 ++ 2 files changed, 88 insertions(+) create mode 100644

[RFC PATCH 0/2] Add a new acquire resource to query vcpu statistics

2022-05-17 Thread Matias Ezequiel Vara Larsen
Hello all, The purpose of this RFC is to get feedback about a new acquire resource that exposes vcpu statistics for a given domain. The current mechanism to get those statistics is by querying the hypervisor. This mechanism relies on a hypercall and holds the domctl spinlock during its execution.

[RFC PATCH 1/2] xen/memory : Add stats_table resource type

2022-05-17 Thread Matias Ezequiel Vara Larsen
Allow to map vcpu stats using acquire_resource(). Signed-off-by: Matias Ezequiel Vara Larsen --- xen/common/domain.c | 42 + xen/common/memory.c | 29 + xen/common/sched/core.c | 5 + xen/include/public/memory.h

Re: [PATCH v5 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff

2022-05-17 Thread Jan Beulich
On 11.05.2022 16:30, Marek Marczykowski-Górecki wrote: > --- a/xen/drivers/char/ns16550.c > +++ b/xen/drivers/char/ns16550.c > @@ -1238,6 +1238,13 @@ pci_uart_config(struct ns16550 *uart, bool_t skip_amt, > unsigned int idx) > pci_conf_read8(PCI_SBDF(0, b, d, f), >

Re: [PATCH v5 2/3] amd/msr: allow passthrough of VIRT_SPEC_CTRL for HVM guests

2022-05-17 Thread Jan Beulich
On 17.05.2022 15:45, Roger Pau Monné wrote: > On Tue, May 17, 2022 at 02:10:29PM +0200, Jan Beulich wrote: >> On 09.05.2022 12:23, Roger Pau Monné wrote: >>> On Fri, May 06, 2022 at 02:15:47PM +0200, Jan Beulich wrote: On 03.05.2022 10:26, Roger Pau Monne wrote: > --- a/xen/arch/x86/cpuid.

Re: [PATCH v5 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff

2022-05-17 Thread Roger Pau Monné
On Tue, May 17, 2022 at 04:41:31PM +0200, Jan Beulich wrote: > On 11.05.2022 16:30, Marek Marczykowski-Górecki wrote: > > --- a/xen/drivers/char/ns16550.c > > +++ b/xen/drivers/char/ns16550.c > > @@ -1238,6 +1238,13 @@ pci_uart_config(struct ns16550 *uart, bool_t > > skip_amt, unsigned int idx) >

Re: [PATCH 2/2] x86/vmx: implement Notify VM Exit

2022-05-17 Thread Roger Pau Monné
On Tue, May 17, 2022 at 03:21:30PM +0200, Roger Pau Monne wrote: > Under certain conditions guests can get the CPU stuck in an infinite > loop without the possibility of an interrupt window to occur. This > was the case with the scenarios described in XSA-156. > > Make use of the Notify VM Exit m

Re: [PATCH v3 4/6] xen: Switch to byteswap

2022-05-17 Thread Jan Beulich
On 11.05.2022 16:21, Bertrand Marquis wrote: >> On 11 May 2022, at 13:11, George Dunlap wrote: >>> On May 11, 2022, at 9:34 AM, Julien Grall wrote: >>> On 11/05/2022 07:30, Lin Liu (刘林) wrote: On 10/05/2022 11:15, Lin Liu wrote: > static inline void put_unaligned_be16(uint16_t val, void

Re: [PATCH v3 6/6] tools: Remove unnecessary header

2022-05-17 Thread Jan Beulich
On 10.05.2022 12:15, Lin Liu wrote: > --- a/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c > +++ b/tools/libs/guest/xg_dom_decompress_unsafe_zstd.c > @@ -31,7 +31,6 @@ typedef uint64_t __be64; > > #define __BYTEORDER_HAS_U64__ > #define __TYPES_H__ /* xen/types.h guard */ > -#include "../../x

Re: ECLAIR Xen x86 results and progress

2022-05-17 Thread Jan Beulich
On 09.05.2022 21:55, Stefano Stabellini wrote: > # Rule 8.6 " An identifier with external linkage shall have exactly one > external definition" > > This one is meant to catch cases where there are 2 definitions for 1 > declaration: > > header.h: > extern int hello; > > file1.c: > int hello; >

Re: [PATCH v5 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff

2022-05-17 Thread Jan Beulich
On 17.05.2022 16:48, Roger Pau Monné wrote: > On Tue, May 17, 2022 at 04:41:31PM +0200, Jan Beulich wrote: >> On 11.05.2022 16:30, Marek Marczykowski-Górecki wrote: >>> --- a/xen/drivers/char/ns16550.c >>> +++ b/xen/drivers/char/ns16550.c >>> @@ -1238,6 +1238,13 @@ pci_uart_config(struct ns16550 *u

Re: [PATCH 14/30] panic: Properly identify the panic event to the notifiers' callbacks

2022-05-17 Thread Guilherme G. Piccoli
On 17/05/2022 10:11, Petr Mladek wrote: > [...] >> You mentioned 2 cases: >> >> (a) Same notifier_list used in different situations; >> >> (b) Same *notifier callback* used in different lists; >> >> Mine is case (b), right? Can you show me an example of case (a)? > > There are many examples of cas

Re: Process for cherry-picking patches from other projects

2022-05-17 Thread Jan Beulich
On 13.05.2022 16:33, George Dunlap wrote: > Starting a new thread to make it clear that we’re discussing a wider policy > here. > > This question is aimed at Jan and Andy in particular, as I think they’ve > probably done the most of this; so I’m looking to them to find out what our > “standard

[ovmf test] 170509: regressions - FAIL

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

[PATCH v6 3/3] amd/msr: implement VIRT_SPEC_CTRL for HVM guests using legacy SSBD

2022-05-17 Thread Roger Pau Monne
Expose VIRT_SSBD to guests if the hardware supports setting SSBD in the LS_CFG MSR (a.k.a. non-architectural way). Different AMD CPU families use different bits in LS_CFG, so exposing VIRT_SPEC_CTRL.SSBD allows for an unified way of exposing SSBD support to guests on AMD hardware that's compatible

[PATCH v6 1/3] amd/msr: implement VIRT_SPEC_CTRL for HVM guests on top of SPEC_CTRL

2022-05-17 Thread Roger Pau Monne
Use the logic to set shadow SPEC_CTRL values in order to implement support for VIRT_SPEC_CTRL (signaled by VIRT_SSBD CPUID flag) for HVM guests. This includes using the spec_ctrl vCPU MSR variable to store the guest set value of VIRT_SPEC_CTRL.SSBD, which will be OR'ed with any SPEC_CTRL values bei

[PATCH v6 0/3] amd/msr: implement MSR_VIRT_SPEC_CTRL for HVM guests

2022-05-17 Thread Roger Pau Monne
Hello, The following series implements support for MSR_VIRT_SPEC_CTRL (VIRT_SSBD) on different AMD CPU families. Note that the support is added backwards, starting with the newer CPUs that support MSR_SPEC_CTRL and moving to the older ones either using MSR_VIRT_SPEC_CTRL or the SSBD bit in LS_CFG

[PATCH v6 2/3] amd/msr: allow passthrough of VIRT_SPEC_CTRL for HVM guests

2022-05-17 Thread Roger Pau Monne
Allow HVM guests access to MSR_VIRT_SPEC_CTRL if the platform Xen is running on has support for it. This requires adding logic in the vm{entry,exit} paths for SVM in order to context switch between the hypervisor value and the guest one. The added handlers for context switch will also be used for

Re: [PATCH v6 2/3] amd/msr: allow passthrough of VIRT_SPEC_CTRL for HVM guests

2022-05-17 Thread Jan Beulich
On 17.05.2022 17:31, Roger Pau Monne wrote: > Allow HVM guests access to MSR_VIRT_SPEC_CTRL if the platform Xen is > running on has support for it. This requires adding logic in the > vm{entry,exit} paths for SVM in order to context switch between the > hypervisor value and the guest one. The add

Re: [PATCH 15/30] bus: brcmstb_gisb: Clean-up panic/die notifiers

2022-05-17 Thread Guilherme G. Piccoli
On 10/05/2022 12:28, Petr Mladek wrote: > [...] > IMHO, the check of the @self parameter was the proper solution. > > "gisb_die_notifier" list uses @val from enum die_val. > "gisb_panic_notifier" list uses @val from enum panic_notifier_val. > > These are unrelated types. It might easily break whe

Re: [PATCH 17/30] tracing: Improve panic/die notifiers

2022-05-17 Thread Guilherme G. Piccoli
On 11/05/2022 08:45, Petr Mladek wrote: > [...] > DIE_OOPS and PANIC_NOTIFIER are from different enum. > It feels like comparing apples with oranges here. > > IMHO, the proper way to unify the two notifiers is > a check of the @self parameter. Something like: > > static int trace_die_panic_handle

Re: [PATCH 1/3] x86/p2m.h: Add include guards

2022-05-17 Thread Jan Beulich
On 09.05.2022 14:24, Andrew Cooper wrote: > Spotted by Eclair MISRA scanner. I'm sorry, but what exactly was it that the scanner spotted? It was actually deliberate to introduce this file without guards. I'm of the general opinion that (private) headers not to be included by other headers (but onl

Re: [PATCH 3/3] common/spinlock: Drop inline from _spin_lock_cb()

2022-05-17 Thread Jan Beulich
On 09.05.2022 15:53, Roger Pau Monné wrote: > On Mon, May 09, 2022 at 01:24:09PM +0100, Andrew Cooper wrote: >> This is undefined behaviour, because there is no _spin_lock_cb() in a >> separate >> translation unit (C11 6.7.4.11). >> >> Moreover, MISRA prohibits this construct because, in the case

Re: [PATCH v4] Preserve the EFI System Resource Table for dom0

2022-05-17 Thread Demi Marie Obenour
On Tue, May 17, 2022 at 03:16:55PM +0200, Jan Beulich wrote: > On 07.05.2022 06:26, Demi Marie Obenour wrote: > > This would mean the allocation would need to be unconditional. Right > > now, I avoid the allocation if it is not necessary. > > Hmm, I guess I don't see (taking into account also my

Re: [PATCH v5 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff

2022-05-17 Thread Roger Pau Monné
On Tue, May 17, 2022 at 05:13:46PM +0200, Jan Beulich wrote: > On 17.05.2022 16:48, Roger Pau Monné wrote: > > On Tue, May 17, 2022 at 04:41:31PM +0200, Jan Beulich wrote: > >> On 11.05.2022 16:30, Marek Marczykowski-Górecki wrote: > >>> --- a/xen/drivers/char/ns16550.c > >>> +++ b/xen/drivers/char

Re: [PATCH v5 1/2] ns16550: use poll mode if INTERRUPT_LINE is 0xff

2022-05-17 Thread Jan Beulich
On 17.05.2022 17:43, Roger Pau Monné wrote: > On Tue, May 17, 2022 at 05:13:46PM +0200, Jan Beulich wrote: >> On 17.05.2022 16:48, Roger Pau Monné wrote: >>> On Tue, May 17, 2022 at 04:41:31PM +0200, Jan Beulich wrote: On 11.05.2022 16:30, Marek Marczykowski-Górecki wrote: > --- a/xen/driv

[ovmf test] 170510: regressions - FAIL

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

Re: [PATCH v4 2/8] xen/arm: allocate static shared memory to the default owner dom_io

2022-05-17 Thread Jan Beulich
On 17.05.2022 11:05, Penny Zheng wrote: > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -780,6 +780,11 @@ void __init setup_system_domains(void) > * This domain owns I/O pages that are within the range of the page_info > * array. Mappings occur at the priv of the caller. >

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

2022-05-17 Thread Jan Beulich
On 17.05.2022 11:28, Julien Grall wrote: > On 17/05/2022 09:21, Penny Zheng wrote: @@ -2653,7 +2657,8 @@ void __init free_staticmem_pages(struct page_info >>> *pg, unsigned long nr_mfns, } /* In case initializing page of static memory, mark it PGC_res

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

2022-05-17 Thread Jan Beulich
On 10.05.2022 04:27, Penny Zheng wrote: > @@ -2762,6 +2767,12 @@ int __init acquire_domstatic_pages(struct domain *d, > mfn_t smfn, > > return 0; > } > +#else > +void free_staticmem_pages(struct page_info *pg, unsigned long nr_mfns, > + bool need_scrub) > +{ > +

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

2022-05-17 Thread Jan Beulich
On 10.05.2022 04:27, Penny Zheng wrote: > @@ -2769,12 +2769,43 @@ int __init acquire_domstatic_pages(struct domain *d, > mfn_t smfn, > > return 0; > } > + > +/* > + * Acquire a page from reserved page list(resv_page_list), when populating > + * memory for static domain on runtime. > + */ >

[ovmf test] 170511: regressions - FAIL

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

[PATCH] x86: xen: remove STACK_FRAME_NON_STANDARD from xen_cpuid

2022-05-17 Thread Maximilian Heyne
Since commit 4d65adfcd119 ("x86: xen: insn: Decode Xen and KVM emulate-prefix signature"), objtool is able to correctly parse the prefixed instruction in xen_cpuid and emit correct orc unwind information. Hence, marking the function as STACKFRAME_NON_STANDARD is no longer needed. This commit is ba

Re: [PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-05-17 Thread Guilherme G. Piccoli
On 17/05/2022 10:28, Petr Mladek wrote: > [...] >>> Disagree here. I'm looping Google maintainers, so they can comment. >>> (CCed Evan, David, Julius) >>> >>> This notifier is clearly a hypervisor notification mechanism. I've fixed >>> a locking stuff there (in previous patch), I feel it's low-risk

Re: [PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-05-17 Thread Guilherme G. Piccoli
On 17/05/2022 10:57, Petr Mladek wrote: > [...] --- a/drivers/misc/bcm-vk/bcm_vk_dev.c +++ b/drivers/misc/bcm-vk/bcm_vk_dev.c @@ -1446,7 +1446,7 @@ static int bcm_vk_probe(struct pci_dev *pdev, const struct pci_device_id *ent) >>> [... snip ...] >>> It seems to reset some hardw

Re: [PATCH 21/30] panic: Introduce the panic pre-reboot notifier list

2022-05-17 Thread Guilherme G. Piccoli
On 17/05/2022 11:11, Petr Mladek wrote: > [...] >>> Then notifiers could make an informed choice on whether to deep dive to >>> get all the possible details (when there is no kdump) or just skim the high >>> level stuff (to maximize chance of getting a successful kdump). >>> >>> -Tony >> >> Good id

RE: [PATCH 21/30] panic: Introduce the panic pre-reboot notifier list

2022-05-17 Thread Luck, Tony
> Tony / Dinh - can I just *skip* this notifier *if kdump* is set or else > we run the code as-is? Does that make sense to you? The "skip" option sounds like it needs some special flag associated with an entry on the notifier chain. But there are other notifier chains ... so that sounds messy to m

[PATCH v5] Preserve the EFI System Resource Table for dom0

2022-05-17 Thread Demi Marie Obenour
The EFI System Resource Table (ESRT) is necessary for fwupd to identify firmware updates to install. According to the UEFI specification §23.4, the ESRT shall be stored in memory of type EfiBootServicesData. However, memory of type EfiBootServicesData is considered general-purpose memory by Xen,

Re: [PATCH v2] xen/arm: gic-v3-lpi: Allocate the pending table while preparing the CPU

2022-05-17 Thread Julien Grall
Hi, On 17/05/2022 09:58, Bertrand Marquis wrote: On 16 May 2022, at 18:02, Julien Grall wrote: From: Julien Grall Commit 88a037e2cfe1 "page_alloc: assert IRQs are enabled in heap alloc/free" extended the checks in the buddy allocator to catch any use of the helpers from context with interrup

Re: [PATCH v2 2/2] xen/arm: gnttab: modify macros to evaluate all arguments and only once

2022-05-17 Thread Julien Grall
Hi Michal, On 17/05/2022 08:14, Michal Orzel wrote: On 16.05.2022 12:19, Julien Grall wrote: Hi Michal, On 06/05/2022 10:42, Michal Orzel wrote: Modify macros to evaluate all the arguments and make sure the arguments are evaluated only once. Introduce following intermediate macros: gnttab_sta

[ovmf test] 170512: regressions - FAIL

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

Re: [XEN][RFC PATCH v3 03/14] libfdt: Keep fdt functions after init for CONFIG_OVERLAY_DTB.

2022-05-17 Thread Julien Grall
Hi Vikram, On 08/03/2022 19:46, Vikram Garhwal wrote: This is done to access fdt library function which are required for adding device tree overlay nodes for dynamic programming of nodes. Acked-by: Julien Grall Signed-off-by: Vikram Garhwal The tags usually are usually ordered chronogically

Re: [XEN][RFC PATCH v3 04/14] libfdt: overlay: change overlay_get_target()

2022-05-17 Thread Julien Grall
Hi Vikram, On 08/03/2022 19:46, Vikram Garhwal wrote: Rename overlay_get_target() to fdt_overlay_target_offset() and remove static function type. This is done to get the target path for the overlay nodes which is very useful in many cases. For example, Xen hypervisor needs it when applying over

[ovmf test] 170513: regressions - FAIL

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

[RFC PATCH 0/2] Ability to allocate DMAable pages using unpopulated-alloc

2022-05-17 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Hello all. The purpose of this RFC patch series is to get feedback about supporting the allocation of DMAable pages by Linux's unpopulated-alloc. The unpopulated-alloc feature has been enabled on Arm since the extended-regions support reached upstream. With that (if

[RFC PATCH 2/2] xen/grant-table: Use unpopulated DMAable pages instead of real RAM ones

2022-05-17 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Depends on CONFIG_XEN_UNPOPULATED_ALLOC. If enabled then unpopulated DMAable (contiguous) pages will be allocated for grant mapping into instead of ballooning out real RAM pages. TODO: Fallback to real RAM pages if xen_alloc_unpopulated_dma_pages() fails. Signed-off-b

[RFC PATCH 1/2] xen/unpopulated-alloc: Introduce helpers for DMA allocations

2022-05-17 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Add ability to allocate unpopulated DMAable (contiguous) pages suitable for grant mapping into. This is going to be used by gnttab code (see gnttab_dma_alloc_pages()). TODO: There is a code duplication in fill_dma_pool(). Also pool oparations likely need to be protecte

Re: [PATCH 21/30] panic: Introduce the panic pre-reboot notifier list

2022-05-17 Thread Guilherme G. Piccoli
On 17/05/2022 14:02, Luck, Tony wrote: >> Tony / Dinh - can I just *skip* this notifier *if kdump* is set or else >> we run the code as-is? Does that make sense to you? > > The "skip" option sounds like it needs some special flag associated with > an entry on the notifier chain. But there are othe

Re: [XEN][RFC PATCH v3 07/14] xen/iommu: Move spin_lock from iommu_dt_device_is_assigned to caller

2022-05-17 Thread Julien Grall
Hi, On 08/03/2022 19:46, Vikram Garhwal wrote: Rename iommu_dt_device_is_assigned() to iommu_dt_device_is_assigned_lock(). Moving spin_lock to caller was done to prevent the concurrent access to iommu_dt_device_is_assigned while doing add/remove/assign/deassign. Signed-off-by: Vikram Garhwal

Re: [PATCH 1/3] x86/p2m.h: Add include guards

2022-05-17 Thread Roberto Bagnara
On 17/05/22 17:38, Jan Beulich wrote: On 09.05.2022 14:24, Andrew Cooper wrote: Spotted by Eclair MISRA scanner. I'm sorry, but what exactly was it that the scanner spotted? It was actually deliberate to introduce this file without guards. I'm of the general opinion that (private) headers not

[ovmf test] 170515: regressions - FAIL

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

RE: [PATCH 21/30] panic: Introduce the panic pre-reboot notifier list

2022-05-17 Thread Luck, Tony
> What I'm planning to do in the altera_edac notifier is: > > if (kdump_is_set) > return; Yes. That's what I think should happen. -Tony

[PATCH 2/2] tools/ocaml: Fix stubs the introduction of domain_create.cpupool_id

2022-05-17 Thread Andrew Cooper
Sadly, cpupool IDs are chosen by the caller, not assigned sequentially, so this does need to have a full 32 bits of range. Also leave a BUILD_BUG_ON() to catch more obvious ABI changes in the future. Fixes: 92ea9c54fc81 ("arm/dom0less: assign dom0less guests to cpupools") Signed-off-by: Andrew Co

[PATCH 0/2] Fix some problems with "arm/dom0less: assign dom0less guests to cpupools"

2022-05-17 Thread Andrew Cooper
ARM folks: Please be rather more careful when exposing hypervisor internals to arbitrary user input. Being domain_create, the fallout is unlikely to be an security issue if it had gotten into a release, but Xen will definitely have an unhappy time with unexpected scheduler state. George/Nick: The

[PATCH 1/2] xen/cpupool: Reject attempts to add a domain to CPUPOOLID_NONE

2022-05-17 Thread Andrew Cooper
c/s cfc52148444f ("xen/domain: Reduce the quantity of initialisation for system domains") removed the path in domain_create() which called sched_init_domain() with CPUPOOLID_NONE for system domains. Arguably, that changeset should have cleaned up this path too. However, c/s 92ea9c54fc81 ("arm/dom

  1   2   >