Re: [xen-unstable-smoke test] 171511: regressions - FAIL

2022-07-05 Thread Demi Marie Obenour
> > commit 8d410ac2c178e1dd1001cadddbe9ca75a9738c95 > > Author: Demi Marie Obenour > > Date: Tue Jul 5 13:10:46 2022 +0200 > > > > EFI: preserve the System Resource Table for dom0 > > > > The EFI System Resource Table (ESRT) is necessary for fwupd to identify > > firmware updat

Re: [PATCH] livepatch: create-diff-object: Check that the section has a secsym

2022-07-05 Thread Jan Beulich
On 06.07.2022 04:18, Sarah Newman wrote: > A STT_SECTION symbol is not needed if if it is not used as a relocation > target. Therefore, a section, in this case a debug section, may not have > a secsym associated with it. > > This is a livepatch backport of kpatch upstream commit [1]: > create-diff

Re: [xen-unstable-smoke test] 171511: regressions - FAIL

2022-07-05 Thread Jan Beulich
On 06.07.2022 05:39, osstest service owner wrote: > flight 171511 xen-unstable-smoke real [real] > flight 171517 xen-unstable-smoke real-retest [real] > http://logs.test-lab.xenproject.org/osstest/logs/171511/ > http://logs.test-lab.xenproject.org/osstest/logs/171517/ > > Regressions :-( > > Test

Re: PCI pass-through problem for SN570 NVME SSD

2022-07-05 Thread Jan Beulich
On 06.07.2022 08:25, G.R. wrote: > On Tue, Jul 5, 2022 at 7:59 PM Jan Beulich wrote: >> Nothing useful in there. Yet independent of that I guess we need to >> separate the issues you're seeing. Otherwise it'll be impossible to >> know what piece of data belongs where. > Yep, I think I'm seeing sev

Re: PCI pass-through problem for SN570 NVME SSD

2022-07-05 Thread G.R.
On Tue, Jul 5, 2022 at 7:59 PM Jan Beulich wrote: > Nothing useful in there. Yet independent of that I guess we need to > separate the issues you're seeing. Otherwise it'll be impossible to > know what piece of data belongs where. Yep, I think I'm seeing several different issues here: 1. The FLR r

Re: [PATCH] x86/PAT: have pat_enabled() properly reflect state when running on e.g. Xen

2022-07-05 Thread Jan Beulich
On 05.07.2022 18:14, Borislav Petkov wrote: > On Tue, Jul 05, 2022 at 05:56:36PM +0200, Jan Beulich wrote: >> Re-using pat_disabled like you do in your suggestion below won't >> work, because mtrr_bp_init() calls pat_disable() when MTRRs >> appear to be disabled (from the kernel's view). The goal i

RE: [PATCH] EFI: strip xen.efi when putting it on the EFI partition

2022-07-05 Thread Henry Wang
Hi Jan, > -Original Message- > Subject: Re: [PATCH] EFI: strip xen.efi when putting it on the EFI partition > > On 09.06.2022 17:52, Jan Beulich wrote: > > With debug info retained, xen.efi can be quite large. Unlike for xen.gz > > there's no intermediate step (mkelf32 there) involved whi

Re: xen domU access UART I2C

2022-07-05 Thread A Sudheer
Hi All, < Posting my query again , added a few more details > On Xen-4.16 with Ubuntu-22.04 Dom0 and Ubuntu-22.04 HVM DomU, i need to access IO devices like UART and I2C. I am able to access them in Dom0. Can someone let me know how to access them in DomU. What are the cfg options to be provided

[xen-unstable-smoke test] 171511: regressions - FAIL

2022-07-05 Thread osstest service owner
flight 171511 xen-unstable-smoke real [real] flight 171517 xen-unstable-smoke real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/171511/ http://logs.test-lab.xenproject.org/osstest/logs/171517/ Regressions :-( Tests which did not succeed and are blocking, including tests which co

[PATCH] livepatch: create-diff-object: Check that the section has a secsym

2022-07-05 Thread Sarah Newman
A STT_SECTION symbol is not needed if if it is not used as a relocation target. Therefore, a section, in this case a debug section, may not have a secsym associated with it. This is a livepatch backport of kpatch upstream commit [1]: create-diff-object: Check that the section has a secsym ba3defa

access uart, i2c IO devices in DomU

2022-07-05 Thread A Sudheer
Hi All, On Xen-4.16 with Ubuntu-22.04 Dom0 and Ubuntu-22.04 HVM DomU, i need to access IO devices like UART and I2C. I am able to access them in Dom0. Can someone let me know how to access them in DomU. What are the cfg options to be provided ? Thanks Sudheer

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

2022-07-05 Thread Stefano Stabellini
On Tue, 5 Jul 2022, Julien Grall wrote: > On 04/07/2022 08:45, Penny Zheng wrote: > > Hi Stefano and Julien > > Hi Penny, > > > > -Original Message- > > > From: Stefano Stabellini > > > > > +res = fdt_property_cell(fdt, "xen,id", shm_id); > > > > > > > > Looking at the Linux bin

[linux-linus test] 171503: regressions - FAIL

2022-07-05 Thread osstest service owner
flight 171503 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/171503/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-credit1 8 xen-boot fail REGR. vs. 171277 test-amd64-amd64-li

Re: [PATCH 1/4] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violations

2022-07-05 Thread Xenia Ragiadakou
Hi Julien, On 7/6/22 00:56, Julien Grall wrote: On 05/07/2022 22:49, Xenia Ragiadakou wrote: On 7/6/22 00:28, Julien Grall wrote: Hi Xenia, On 05/07/2022 22:02, Xenia Ragiadakou wrote: Add the function prototypes of the functions below in header file so that they are visible before the func

Re: [PATCH 1/4] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violations

2022-07-05 Thread Stefano Stabellini
On Tue, 5 Jul 2022, Julien Grall wrote: > Hi Xenia, > > On 05/07/2022 22:49, Xenia Ragiadakou wrote: > > On 7/6/22 00:28, Julien Grall wrote: > > > Hi Xenia, > > > > > > On 05/07/2022 22:02, Xenia Ragiadakou wrote: > > > > Add the function prototypes of the functions below in > > > > header > >

Re: [PATCH v3] xen/arm: avoid overflow when setting vtimer in context switch

2022-07-05 Thread Julien Grall
Hi Jiamei, On 30/06/2022 02:53, Jiamei Xie wrote: virt_vtimer_save is calculating the new time for the vtimer in: "v->arch.virt_timer.cval + v->domain->arch.virt_timer_base.offset - boot_count". In this formula, "cval + offset" might cause uint64_t overflow. Changing it to "ticks_to_ns(v->domain

Re: [PATCH v3] xen/arm: avoid overflow when setting vtimer in context switch

2022-07-05 Thread Julien Grall
On 30/06/2022 06:20, Jiamei Xie wrote: Hi, Hi Jiamei, -Original Message- From: Jiamei Xie Sent: 2022年6月30日 9:54 To: xen-devel@lists.xenproject.org Cc: Jiamei Xie ; Stefano Stabellini ; Julien Grall ; Bertrand Marquis ; Volodymyr Babchuk ; Wei Chen Subject: [PATCH v3] xen/arm: avo

Re: [PATCH 4/4] xen/char: pv_console: Fix MISRA C 2012 Rule 8.4 violation

2022-07-05 Thread Xenia Ragiadakou
Hi Julien, On 7/6/22 00:38, Julien Grall wrote: Hi Xenia, On 05/07/2022 22:02, Xenia Ragiadakou wrote: The function pv_console_evtchn() is defined in the header . If the header happens to be included by multiple files, this can result in linker errors due to multiple definitions, So, it is m

Re: [PATCH] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violation

2022-07-05 Thread Julien Grall
Hi Xenia, On 05/07/2022 13:21, Xenia Ragiadakou wrote: Add the function prototype of show_stack() in header file so that it is visible before its definition in traps.c. Although show_stack() is referenced only in traps.c, it is declared with external linkage because, during development, it is

Re: [PATCH 1/4] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violations

2022-07-05 Thread Julien Grall
Hi Xenia, On 05/07/2022 22:49, Xenia Ragiadakou wrote: On 7/6/22 00:28, Julien Grall wrote: Hi Xenia, On 05/07/2022 22:02, Xenia Ragiadakou wrote: Add the function prototypes of the functions below in header file so that they are visible before the function definitions in traps.c. enter_hy

Re: [PATCH] EFI: strip xen.efi when putting it on the EFI partition

2022-07-05 Thread Julien Grall
Hi Jan, On 05/07/2022 17:03, Jan Beulich wrote: On 09.06.2022 17:52, Jan Beulich wrote: With debug info retained, xen.efi can be quite large. Unlike for xen.gz there's no intermediate step (mkelf32 there) involved which would strip debug info kind of as a side effect. While the installing of xe

Re: [PATCH 1/4] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violations

2022-07-05 Thread Xenia Ragiadakou
Hi Julien, On 7/6/22 00:28, Julien Grall wrote: Hi Xenia, On 05/07/2022 22:02, Xenia Ragiadakou wrote: Add the function prototypes of the functions below in header file so that they are visible before the function definitions in traps.c. enter_hypervisor_from_guest_preirq() enter_hypervisor_

Re: [PATCH v1.1] evtchn: add early-out to evtchn_move_pirqs()

2022-07-05 Thread Julien Grall
Hi Jan, On 05/07/2022 17:10, Jan Beulich wrote: On 26.04.2022 12:44, Julien Grall wrote: On 26/04/2022 11:33, Jan Beulich wrote: See the code comment. The higher the rate of vCPU-s migrating across pCPU-s, the less useful this attempted optimization actually is. With credit2 the migration rate

Re: [PATCH 4/4] xen/char: pv_console: Fix MISRA C 2012 Rule 8.4 violation

2022-07-05 Thread Julien Grall
Hi Xenia, On 05/07/2022 22:02, Xenia Ragiadakou wrote: The function pv_console_evtchn() is defined in the header . If the header happens to be included by multiple files, this can result in linker errors due to multiple definitions, So, it is more appropriate to resolve this MISRA C 2012 Rule 8.

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

2022-07-05 Thread osstest service owner
flight 171502 qemu-mainline real [real] flight 171509 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/171502/ http://logs.test-lab.xenproject.org/osstest/logs/171509/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-am

Re: [PATCH 3/4] xen/arm: domain: Fix MISRA C 2012 Rule 8.7 violation

2022-07-05 Thread Julien Grall
Hi Xenia, On 05/07/2022 22:02, Xenia Ragiadakou wrote: The function idle_loop() is referenced only in domain.c. Change its linkage from external to internal by adding the storage-class specifier static to its definitions. Since idle_loop() is referenced only in inline assembly, add the 'used' a

Re: [PATCH 2/4] xen/common: time: Fix MISRA C 2012 Rule 8.7 violation

2022-07-05 Thread Julien Grall
Hi Xenia, On 05/07/2022 22:02, Xenia Ragiadakou wrote: The variable __mon_lengths is referenced only in time.c. Change its linkage from external to internal by adding the storage-class specifier static to its definitions. Also, this patch resolves indirectly a MISRA C 2012 Rule 8.4 violation wa

Re: [PATCH 1/4] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violations

2022-07-05 Thread Julien Grall
Hi Xenia, On 05/07/2022 22:02, Xenia Ragiadakou wrote: Add the function prototypes of the functions below in header file so that they are visible before the function definitions in traps.c. enter_hypervisor_from_guest_preirq() enter_hypervisor_from_guest() do_trap_hyp_sync() do_trap_guest_sync(

[xen-unstable-smoke test] 171506: regressions - FAIL

2022-07-05 Thread osstest service owner
flight 171506 xen-unstable-smoke real [real] flight 171508 xen-unstable-smoke real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/171506/ http://logs.test-lab.xenproject.org/osstest/logs/171508/ Regressions :-( Tests which did not succeed and are blocking, including tests which co

[PATCH 3/4] xen/arm: domain: Fix MISRA C 2012 Rule 8.7 violation

2022-07-05 Thread Xenia Ragiadakou
The function idle_loop() is referenced only in domain.c. Change its linkage from external to internal by adding the storage-class specifier static to its definitions. Since idle_loop() is referenced only in inline assembly, add the 'used' attribute to suppress unused-function compiler warning. Al

[PATCH 4/4] xen/char: pv_console: Fix MISRA C 2012 Rule 8.4 violation

2022-07-05 Thread Xenia Ragiadakou
The function pv_console_evtchn() is defined in the header . If the header happens to be included by multiple files, this can result in linker errors due to multiple definitions, So, it is more appropriate to resolve this MISRA C 2012 Rule 8.4 violation warning by making pv_console_evtchn() inline w

[PATCH 2/4] xen/common: time: Fix MISRA C 2012 Rule 8.7 violation

2022-07-05 Thread Xenia Ragiadakou
The variable __mon_lengths is referenced only in time.c. Change its linkage from external to internal by adding the storage-class specifier static to its definitions. Also, this patch resolves indirectly a MISRA C 2012 Rule 8.4 violation warning. Signed-off-by: Xenia Ragiadakou --- xen/common/t

[PATCH 0/4] Fix MISRA C 2012 violations

2022-07-05 Thread Xenia Ragiadakou
Resolve MISRA C 2012 Rule 8.4 violation warnings. Xenia Ragiadakou (4): xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violations xen/common: time: Fix MISRA C 2012 Rule 8.7 violation xen/arm: domain: Fix MISRA C 2012 Rule 8.7 violation xen/char: pv_console: Fix MISRA C 2012 Rule 8.4 violation

[PATCH 1/4] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violations

2022-07-05 Thread Xenia Ragiadakou
Add the function prototypes of the functions below in header file so that they are visible before the function definitions in traps.c. enter_hypervisor_from_guest_preirq() enter_hypervisor_from_guest() do_trap_hyp_sync() do_trap_guest_sync() do_trap_irq() do_trap_fiq() leave_hypervisor_to_guest()

Re: [PATCH v9 3/3] xsm: refactor flask sid alloc and domain check

2022-07-05 Thread Daniel P. Smith
On 7/5/22 09:03, Jason Andryuk wrote: > On Wed, Jun 29, 2022 at 10:22 PM Daniel P. Smith > wrote: >> >> The function flask_domain_alloc_security() is where a default sid should be >> assigned to a domain under construction. For reasons unknown, the initial >> domain would be assigned unlabeled_t a

Re: PCI pass-through problem for SN570 NVME SSD

2022-07-05 Thread Jason Andryuk
On Mon, Jul 4, 2022 at 11:57 AM Roger Pau Monné wrote: > > On Mon, Jul 04, 2022 at 11:44:14PM +0800, G.R. wrote: > > On Mon, Jul 4, 2022 at 11:33 PM Roger Pau Monné > > wrote: > > > > > > Right, so hvmloader attempts to place a BAR from 05:00.0 and a BAR > > > from 00:17.0 into the same page, wh

[xen-unstable-smoke test] 171501: regressions - FAIL

2022-07-05 Thread osstest service owner
flight 171501 xen-unstable-smoke real [real] flight 171504 xen-unstable-smoke real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/171501/ http://logs.test-lab.xenproject.org/osstest/logs/171504/ Regressions :-( Tests which did not succeed and are blocking, including tests which co

Ping²: [PATCH] x86: enable interrupts around dump_execstate()

2022-07-05 Thread Jan Beulich
On 11.01.2022 11:08, Jan Beulich wrote: > On 16.12.2021 14:33, Jan Beulich wrote: >> On 16.12.2021 12:54, Andrew Cooper wrote: >>> On 13/12/2021 15:12, Jan Beulich wrote: show_hvm_stack() requires interrupts to be enabled to avoids triggering the consistency check in check_lock() for the

Re: [PATCH] x86/PAT: have pat_enabled() properly reflect state when running on e.g. Xen

2022-07-05 Thread Borislav Petkov
On Tue, Jul 05, 2022 at 05:56:36PM +0200, Jan Beulich wrote: > Re-using pat_disabled like you do in your suggestion below won't > work, because mtrr_bp_init() calls pat_disable() when MTRRs > appear to be disabled (from the kernel's view). The goal is to > honor "nopat" without honoring any other c

Re: [PATCH v1.1] evtchn: add early-out to evtchn_move_pirqs()

2022-07-05 Thread Jan Beulich
On 26.04.2022 12:44, Julien Grall wrote: > On 26/04/2022 11:33, Jan Beulich wrote: >> See the code comment. The higher the rate of vCPU-s migrating across >> pCPU-s, the less useful this attempted optimization actually is. With >> credit2 the migration rate looks to be unduly high even on mostly id

Re: [PATCH] EFI: strip xen.efi when putting it on the EFI partition

2022-07-05 Thread Jan Beulich
On 09.06.2022 17:52, Jan Beulich wrote: > With debug info retained, xen.efi can be quite large. Unlike for xen.gz > there's no intermediate step (mkelf32 there) involved which would strip > debug info kind of as a side effect. While the installing of xen.efi on > the EFI partition is an optional st

Re: [PATCH] x86/PAT: have pat_enabled() properly reflect state when running on e.g. Xen

2022-07-05 Thread Jan Beulich
On 05.07.2022 17:04, Borislav Petkov wrote: > On Thu, Apr 28, 2022 at 04:50:29PM +0200, Jan Beulich wrote: >> --- a/arch/x86/mm/pat/memtype.c >> +++ b/arch/x86/mm/pat/memtype.c >> @@ -62,6 +62,7 @@ >> >> static bool __read_mostly pat_bp_initialized; >> static bool __read_mostly pat_disabled = !

Re: [PATCH 3/8] xen/evtchn: modify evtchn_bind_interdomain to allocate specified port

2022-07-05 Thread Jan Beulich
On 05.07.2022 17:22, Julien Grall wrote: > Hi Jan, > > On 05/07/2022 16:11, Jan Beulich wrote: >> On 22.06.2022 16:38, Rahul Singh wrote: >>> @@ -387,8 +392,19 @@ int evtchn_bind_interdomain(evtchn_bind_interdomain_t >>> *bind) >>> spin_lock(&ld->event_lock); >>> } >>> >>> -

Re: [PATCH 5/8] xen/evtchn: don't close the static event channel.

2022-07-05 Thread Jan Beulich
On 05.07.2022 17:26, Jan Beulich wrote: > On 22.06.2022 16:38, Rahul Singh wrote: >> --- a/xen/include/xen/event.h >> +++ b/xen/include/xen/event.h >> @@ -73,12 +73,12 @@ int evtchn_allocate_port(struct domain *d, unsigned int >> port); >> >> /* Allocate a new event channel */ >> int __must_ch

Re: [PATCH 5/8] xen/evtchn: don't close the static event channel.

2022-07-05 Thread Jan Beulich
On 22.06.2022 16:38, Rahul Singh wrote: > --- a/xen/include/xen/event.h > +++ b/xen/include/xen/event.h > @@ -73,12 +73,12 @@ int evtchn_allocate_port(struct domain *d, unsigned int > port); > > /* Allocate a new event channel */ > int __must_check evtchn_alloc_unbound(evtchn_alloc_unbound_t *

Re: [PATCH 6/8] xen/evtchn: don't set notification in evtchn_bind_interdomain()

2022-07-05 Thread Jan Beulich
On 22.06.2022 16:38, Rahul Singh wrote: > evtchn_bind_interdomain() sets the notification on the local port to > handle the lost notification on remote unbound port. > > Static event-channel will be created during domain creation, there is no > need to set the notification as remote domain is not

Re: [PATCH 3/8] xen/evtchn: modify evtchn_bind_interdomain to allocate specified port

2022-07-05 Thread Julien Grall
Hi Jan, On 05/07/2022 16:11, Jan Beulich wrote: On 22.06.2022 16:38, Rahul Singh wrote: @@ -387,8 +392,19 @@ int evtchn_bind_interdomain(evtchn_bind_interdomain_t *bind) spin_lock(&ld->event_lock); } -if ( (lport = get_free_port(ld)) < 0 ) -ERROR_EXIT(lport); +

Re: [PATCH 5/8] xen/evtchn: don't close the static event channel.

2022-07-05 Thread Jan Beulich
On 22.06.2022 16:38, Rahul Singh wrote: > --- a/xen/include/xen/sched.h > +++ b/xen/include/xen/sched.h > @@ -119,6 +119,7 @@ struct evtchn > unsigned char priority;/* FIFO event channels only. */ > unsigned short notify_vcpu_id; /* VCPU for local delivery notification */ > u

Re: [PATCH 4/8] xen/evtchn: modify evtchn_bind_interdomain to pass domain as argument

2022-07-05 Thread Jan Beulich
On 22.06.2022 16:38, Rahul Singh wrote: > evtchn_bind_interdomain() finds the local domain from "current->domain" > pointer. > > evtchn_bind_interdomain() will be called from the XEN to support static > event channel during domain creation. "current" pointer is not valid at > that time, therefore

Re: [PATCH 3/8] xen/evtchn: modify evtchn_bind_interdomain to allocate specified port

2022-07-05 Thread Jan Beulich
On 22.06.2022 16:38, Rahul Singh wrote: > @@ -387,8 +392,19 @@ int evtchn_bind_interdomain(evtchn_bind_interdomain_t > *bind) > spin_lock(&ld->event_lock); > } > > -if ( (lport = get_free_port(ld)) < 0 ) > -ERROR_EXIT(lport); > +if ( lport != 0 ) > +{ > +

Re: [PATCH 2/8] xen/evtchn: modify evtchn_alloc_unbound to allocate specified port

2022-07-05 Thread Jan Beulich
On 22.06.2022 16:51, Julien Grall wrote: > On 22/06/2022 15:37, Rahul Singh wrote: >> evtchn_alloc_unbound() always allocates the next available port. Static >> event channel support for dom0less domains requires allocating a >> specified port. >> >> Modify the evtchn_alloc_unbound() to accept the

Re: [PATCH 1/8] xen/evtchn: make evtchn_bind_interdomain global

2022-07-05 Thread Jan Beulich
On 22.06.2022 16:37, Rahul Singh wrote: > Event channel support will be added for dom0less domains to allocate > static event channel. It is necessary to have access to the > evtchn_bind_interdomain function to do that, so make > evtchn_bind_interdomain global and also make it __must_check. > > Si

Re: [PATCH RFC 6/6] x86/ioapic: mask entry while updating

2022-07-05 Thread Jan Beulich
On 21.04.2022 15:21, Roger Pau Monne wrote: > --- a/xen/arch/x86/io_apic.c > +++ b/xen/arch/x86/io_apic.c > @@ -267,12 +267,47 @@ void __ioapic_write_entry( > unsigned int apic, unsigned int pin, bool raw, > struct IO_APIC_route_entry e) > { > -union entry_union eu = { .entry = e };

Re: [PATCH RFC 5/6] amd/iommu: atomically update remapping entries when possible

2022-07-05 Thread Jan Beulich
On 21.04.2022 15:21, Roger Pau Monne wrote: > @@ -366,8 +383,11 @@ void cf_check amd_iommu_ioapic_update_ire( > fresh = true; > } > > -/* mask the interrupt while we change the intremap table */ > -if ( !saved_mask ) > +/* > + * Mask the interrupt while we change the

Re: [PATCH v2 6/6] x86/irq: do not set nr_irqs based on nr_irqs_gsi in APIC mode

2022-07-05 Thread Jan Beulich
On 30.06.2022 10:54, Roger Pau Monne wrote: > When using an APIC do not set nr_irqs based on a factor of nr_irqs_gsi > (currently x8), and instead do so exclusively based on the amount of > available vectors on the system. > > There's no point in setting nr_irqs to a value higher than the > availa

Re: [PATCH v2 5/6] x86/irq: print nr_irqs as limit on the number of MSI(-X) interrupts

2022-07-05 Thread Jan Beulich
On 30.06.2022 10:54, Roger Pau Monne wrote: > Using nr_irqs minus nr_irqs_gsi is misleading, as GSI interrupts are > not allocated unless requested by the hardware domain, so a hardware > domain could not use any GSI (or just one for the ACPI SCI), and hence > (almost) all nr_irqs will be available

Re: Issue with check-endbr.sh during Xen build

2022-07-05 Thread Andrew Cooper
On 05/07/2022 14:56, Luca Fancellu wrote: > After spending a bit of time to understand what the script does, I’ve checked > the awk version > and seems that the script is failing in the Docker container because there is > mawk there: > # awk -W version > mawk 1.3.4 20200120 > Copyright 2008-2019,

Re: [PATCH v2 4/6] x86/irq: fix setting irq limits

2022-07-05 Thread Jan Beulich
On 30.06.2022 10:54, Roger Pau Monne wrote: > Current code to calculate nr_irqs assumes the APIC destination mode to > be physical, so all vectors on each possible CPU is available for use > by a different interrupt source. This is not true when using Logical > (Cluster) destination mode, where CPU

Re: [PATCH v3 1/8] irqchip/mips-gic: Only register IPI domain when SMP is enabled

2022-07-05 Thread Serge Semin
Hi Samuel On Fri, Jul 01, 2022 at 03:00:49PM -0500, Samuel Holland wrote: > The MIPS GIC irqchip driver may be selected in a uniprocessor > configuration, but it unconditionally registers an IPI domain. > > Limit the part of the driver dealing with IPIs to only be compiled when > GENERIC_IRQ_IPI

Issue with check-endbr.sh during Xen build

2022-07-05 Thread Luca Fancellu
Hi all, I’ve encountered an issue building Xen for x86_64, basically the script check-endbr.sh was returning an error: “Error: More valid-addrs than all-addrs”. I have found a solution but I’m writing anyway to you to make you aware of the issue. In my setup I’m using a docker container with b

Re: [PATCH 5/8] xen/evtchn: don't close the static event channel.

2022-07-05 Thread Julien Grall
On 05/07/2022 14:28, Rahul Singh wrote: Hi Julien, Hi Rahul, On 28 Jun 2022, at 4:18 pm, Julien Grall wrote: a new driver in linux kernel, etc where right now we just need to introduce an extra IOCTL in linux to support this feature. I don't understand why would need a new driver, etc

[linux-linus test] 171498: regressions - FAIL

2022-07-05 Thread osstest service owner
flight 171498 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/171498/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-credit1 8 xen-boot fail REGR. vs. 171277 test-amd64-amd64-li

Re: Ping: [PATCH] x86/PAT: have pat_enabled() properly reflect state when running on e.g. Xen

2022-07-05 Thread Juergen Gross
On 05.07.22 15:36, Borislav Petkov wrote: On Tue, Jul 05, 2022 at 12:57:18PM +0200, Thorsten Leemhuis wrote: Side note: Juergen Gross recently posted related patches in this code area to fix some other problems (regressions?), but his efforts look stalled, too: https://lore.kernel.org/all/ddb0cc

Re: [PATCH v2 3/6] x86/setup: init nr_irqs after having detected x2APIC support

2022-07-05 Thread Jan Beulich
On 30.06.2022 10:54, Roger Pau Monne wrote: > Logic in ioapic_init() that sets the number of available vectors for > external interrupts requires knowing the x2APIC Destination Mode. As > such move the call after x2APIC BSP setup. "requires" reads as if this was the case already, which I don't th

Re: [XEN PATCH v3 17/25] libs/libs.mk: Rework target headers.chk dependencies

2022-07-05 Thread Bertrand Marquis
Hi Anthony, > On 24 Jun 2022, at 17:04, Anthony PERARD wrote: > > There is no need to call the "headers.chk" target when it isn't > wanted, so it never need to be .PHONY. > > Also, there is no more reason to separate the prerequisites from the > recipe. > > Signed-off-by: Anthony PERARD Revi

Re: [PATCH 5/8] xen/evtchn: don't close the static event channel.

2022-07-05 Thread Rahul Singh
Hi Julien, > On 28 Jun 2022, at 4:18 pm, Julien Grall wrote: > > > > On 28/06/2022 15:52, Bertrand Marquis wrote: >> Hi Julien, >>> On 28 Jun 2022, at 15:26, Julien Grall wrote: >>> >>> >>> >>> On 28/06/2022 14:53, Rahul Singh wrote: Hi Julien >>> >>> Hi Rahul, >>> > On 23 Jun

Re: [XEN PATCH v3 16/25] libs/libs.mk: Remove the need for $(PKG_CONFIG_INST)

2022-07-05 Thread Bertrand Marquis
Hi Anthony, > On 24 Jun 2022, at 17:04, Anthony PERARD wrote: > > We can simply use $(PKG_CONFIG) to set the parameters, and add it to > $(TARGETS) as necessary. > > Signed-off-by: Anthony PERARD Reviewed-by: Bertrand Marquis Cheers Bertrand > --- > tools/libs/libs.mk | 11 +-- > 1

Re: [PATCH v2 1/6] x86/Kconfig: add option for default x2APIC destination mode

2022-07-05 Thread Jan Beulich
On 30.06.2022 10:54, Roger Pau Monne wrote: > Allow setting the default x2APIC destination mode from Kconfig to > Physical. > > Note the default destination mode is still Logical (Cluster) mode. > > Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich

Re: [XEN PATCH v3 15/25] libs/libs.mk: Rename $(LIB) to $(TARGETS)

2022-07-05 Thread Bertrand Marquis
HI Anthony, > On 24 Jun 2022, at 17:04, Anthony PERARD wrote: > > Signed-off-by: Anthony PERARD Reviewed-by: Bertrand Marquis Cheers Bertrand > --- > tools/libs/libs.mk | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk >

Re: [XEN PATCH v3 13/25] tools/libs/util: cleanup Makefile

2022-07-05 Thread Bertrand Marquis
Hi Anthony, > On 24 Jun 2022, at 17:04, Anthony PERARD wrote: > > Remove -I. from CFLAGS, it isn't necessary. > > Removed $(AUTOSRCS), it isn't used. > > Signed-off-by: Anthony PERARD Reviewed-by: Bertrand Marquis Cheers Bertrand > --- > tools/libs/util/Makefile | 3 +-- > 1 file changed,

Re: [XEN PATCH v3 12/25] .gitignore: Cleanup ignores of tools/libs/*/{headers.chk,*.pc}

2022-07-05 Thread Bertrand Marquis
Hi Anthony, > On 24 Jun 2022, at 17:04, Anthony PERARD wrote: > > Signed-off-by: Anthony PERARD Reviewed-by: Bertrand Marquis Cheers Bertrand > --- > > Notes: >v2: >- move new .gitignore entries to the one in tools/libs/ > > .gitignore| 26 -- >

Re: [PATCH v9 3/3] xsm: refactor flask sid alloc and domain check

2022-07-05 Thread Jason Andryuk
On Wed, Jun 29, 2022 at 10:22 PM Daniel P. Smith wrote: > > The function flask_domain_alloc_security() is where a default sid should be > assigned to a domain under construction. For reasons unknown, the initial > domain would be assigned unlabeled_t and then fixed up under > flask_domain_create()

[PATCH v7 11/14] AMD/IOMMU: replace all-contiguous page tables by superpage mappings

2022-07-05 Thread Jan Beulich
When a page table ends up with all contiguous entries (including all identical attributes), it can be replaced by a superpage entry at the next higher level. The page table itself can then be scheduled for freeing. Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné --- Unlike the freeing of

Re: [PATCH v7 00/14] IOMMU: superpage support when not sharing pagetables

2022-07-05 Thread Jan Beulich
On 05.07.2022 14:41, Jan Beulich wrote: > For a long time we've been rather inefficient with IOMMU page table > management when not sharing page tables, i.e. in particular for PV (and > further specifically also for PV Dom0) and AMD (where nowadays we never > share page tables). While up to about 3

Re: [PATCH 3/7] xen/common: Use unsigned int instead of plain unsigned

2022-07-05 Thread Julien Grall
On 05/07/2022 13:07, Bertrand Marquis wrote: Hi Julien, Hi Bertrand, On 29 Jun 2022, at 11:52, Julien Grall wrote: Hi, On 29/06/2022 11:46, Michal Orzel wrote: On 27.06.2022 15:15, Michal Orzel wrote: This is just for the style and consistency reasons as the former is being used more oft

[PATCH v7 14/14] VT-d: fold dma_pte_clear_one() into its only caller

2022-07-05 Thread Jan Beulich
This way intel_iommu_unmap_page() ends up quite a bit more similar to intel_iommu_map_page(). No functional change intended. Signed-off-by: Jan Beulich Reviewed-by: Kevin Tian Reviewed-by: Roger Pau Monné --- v5: Re-base of changes earlier in the series. v4: New. --- a/xen/drivers/passthrough

[PATCH v7 13/14] IOMMU/x86: add perf counters for page table splitting / coalescing

2022-07-05 Thread Jan Beulich
Signed-off-by: Jan Beulich Reviewed-by: Kevin tian Reviewed-by: Roger Pau Monné --- v3: New. --- a/xen/arch/x86/include/asm/perfc_defn.h +++ b/xen/arch/x86/include/asm/perfc_defn.h @@ -125,4 +125,7 @@ PERFCOUNTER(realmode_exits, "vmexit PERFCOUNTER(pauseloop_exits, "vmexits from Pause-L

[PATCH v7 12/14] VT-d: replace all-contiguous page tables by superpage mappings

2022-07-05 Thread Jan Beulich
When a page table ends up with all contiguous entries (including all identical attributes), it can be replaced by a superpage entry at the next higher level. The page table itself can then be scheduled for freeing. The adjustment to LEVEL_MASK is merely to avoid leaving a latent trap for whenever

[PATCH v7 10/14] VT-d: free all-empty page tables

2022-07-05 Thread Jan Beulich
When a page table ends up with no present entries left, it can be replaced by a non-present entry at the next higher level. The page table itself can then be scheduled for freeing. Note that while its output isn't used there yet, pt_update_contig_markers() right away needs to be called in all plac

[PATCH v7 06/14] VT-d: allow use of superpage mappings

2022-07-05 Thread Jan Beulich
... depending on feature availability (and absence of quirks). Also make the page table dumping function aware of superpages. Signed-off-by: Jan Beulich Reviewed-by: Kevin Tian Reviewed-by: Roger Pau Monné --- v6: Re-base over addition of "iommu=no-superpages" command line option. v5: In intel

[PATCH v7 08/14] IOMMU/x86: prefill newly allocate page tables

2022-07-05 Thread Jan Beulich
Page tables are used for two purposes after allocation: They either start out all empty, or they are filled to replace a superpage. Subsequently, to replace all empty or fully contiguous page tables, contiguous sub-regions will be recorded within individual page tables. Install the initial set of m

[PATCH v7 09/14] AMD/IOMMU: free all-empty page tables

2022-07-05 Thread Jan Beulich
When a page table ends up with no present entries left, it can be replaced by a non-present entry at the next higher level. The page table itself can then be scheduled for freeing. Note that while its output isn't used there yet, pt_update_contig_markers() right away needs to be called in all plac

[PATCH v7 07/14] x86: introduce helper for recording degree of contiguity in page tables

2022-07-05 Thread Jan Beulich
This is a re-usable helper (kind of a template) which gets introduced without users so that the individual subsequent patches introducing such users can get committed independently of one another. See the comment at the top of the new file. To demonstrate the effect, if a page table had just 16 en

[PATCH v7 05/14] AMD/IOMMU: allow use of superpage mappings

2022-07-05 Thread Jan Beulich
No separate feature flags exist which would control availability of these; the only restriction is HATS (establishing the maximum number of page table levels in general), and even that has a lower bound of 4. Thus we can unconditionally announce 2M and 1G mappings. (Via non- default page sizes the

[PATCH v7 04/14] IOMMU/x86: new command line option to suppress use of superpage mappings

2022-07-05 Thread Jan Beulich
Before actually enabling their use, provide a means to suppress it in case of problems. Note that using the option can also affect the sharing of page tables in the VT-d / EPT combination: If EPT would use large page mappings but the option is in effect, page table sharing would be suppressed (to p

[PATCH v7 03/14] IOMMU/x86: support freeing of pagetables

2022-07-05 Thread Jan Beulich
For vendor specific code to support superpages we need to be able to deal with a superpage mapping replacing an intermediate page table (or hierarchy thereof). Consequently an iommu_alloc_pgtable() counterpart is needed to free individual page tables while a domain is still alive. Since the freeing

[PATCH v7 02/14] IOMMU/x86: perform PV Dom0 mappings in batches

2022-07-05 Thread Jan Beulich
For large page mappings to be easily usable (i.e. in particular without un-shattering of smaller page mappings) and for mapping operations to then also be more efficient, pass batches of Dom0 memory to iommu_map(). In dom0_construct_pv() and its helpers (covering strict mode) this additionally requ

[PATCH v7 01/14] iommu: add preemption support to iommu_{un,}map()

2022-07-05 Thread Jan Beulich
From: Roger Pau Monné The loop in iommu_{,un}map() can be arbitrary large, and as such it needs to handle preemption. Introduce a new flag that signals whether the function should do preemption checks, returning the number of pages that have been processed in case a need for preemption was actua

[PATCH v7 00/14] IOMMU: superpage support when not sharing pagetables

2022-07-05 Thread Jan Beulich
For a long time we've been rather inefficient with IOMMU page table management when not sharing page tables, i.e. in particular for PV (and further specifically also for PV Dom0) and AMD (where nowadays we never share page tables). While up to about 3.5 years ago AMD code had logic to un-shatter pa

Re: [PATCH] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violation

2022-07-05 Thread Bertrand Marquis
Hi Xenia, > On 5 Jul 2022, at 13:21, Xenia Ragiadakou wrote: > > Add the function prototype of show_stack() in header file > so that it is visible before its definition in traps.c. > > Although show_stack() is referenced only in traps.c, it is declared with > external linkage because, during d

[PATCH] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violation

2022-07-05 Thread Xenia Ragiadakou
Add the function prototype of show_stack() in header file so that it is visible before its definition in traps.c. Although show_stack() is referenced only in traps.c, it is declared with external linkage because, during development, it is often called also by other files for debugging purposes. D

Re: [PATCH 3/7] xen/common: Use unsigned int instead of plain unsigned

2022-07-05 Thread Bertrand Marquis
Hi Julien, > On 29 Jun 2022, at 11:52, Julien Grall wrote: > > Hi, > > On 29/06/2022 11:46, Michal Orzel wrote: >> On 27.06.2022 15:15, Michal Orzel wrote: >>> This is just for the style and consistency reasons as the former is >>> being used more often than the latter. >>> >>> Signed-off-by:

Xen Security Advisory 405 v3 (CVE-2022-33743) - network backend may cause Linux netfront to use freed SKBs

2022-07-05 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2022-33743 / XSA-405 version 3 network backend may cause Linux netfront to use freed SKBs UPDATES IN VERSION 3 Public release. ISSUE DESCRIPTION

Xen Security Advisory 403 v3 (CVE-2022-26365,CVE-2022-33740,CVE-2022-33741,CVE-2022-33742) - Linux disk/nic frontends data leaks

2022-07-05 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2022-26365,CVE-2022-33740,CVE-2022-33741,CVE-2022-33742 / XSA-403 version 3 Linux disk/nic frontends data leaks UPDATES IN VERSION 3 Publi

Xen Security Advisory 406 v3 (CVE-2022-33744) - Arm guests can cause Dom0 DoS via PV devices

2022-07-05 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2022-33744 / XSA-406 version 3 Arm guests can cause Dom0 DoS via PV devices UPDATES IN VERSION 3 Public release. ISSUE DESCRIPTION

Re: PCI pass-through problem for SN570 NVME SSD

2022-07-05 Thread Jan Beulich
On 05.07.2022 13:31, G.R. wrote: > On Tue, Jul 5, 2022 at 5:04 PM Jan Beulich wrote: >> >> On 04.07.2022 18:31, G.R. wrote: >>> On Tue, Jul 5, 2022 at 12:21 AM Roger Pau Monné >>> wrote: > I retried with the following: > pci=['05:00.0,permissive=1,msitranslate=1'] > Those extra optio

Re: PCI pass-through problem for SN570 NVME SSD

2022-07-05 Thread G.R.
On Tue, Jul 5, 2022 at 5:04 PM Jan Beulich wrote: > > On 04.07.2022 18:31, G.R. wrote: > > On Tue, Jul 5, 2022 at 12:21 AM Roger Pau Monné > > wrote: > >>> I retried with the following: > >>> pci=['05:00.0,permissive=1,msitranslate=1'] > >>> Those extra options suppressed some error logging, but

Re: [PATCH v3 0/3] virtio: support requiring restricted access per device

2022-07-05 Thread Juergen Gross
On 22.06.22 08:38, Juergen Gross wrote: Instead of an all or nothing approach add support for requiring restricted memory access per device. Changes in V3: - new patches 1 + 2 - basically complete rework of patch 3 Juergen Gross (3): virtio: replace restricted mem access flag with callback

Re: Ping: [PATCH] x86/PAT: have pat_enabled() properly reflect state when running on e.g. Xen

2022-07-05 Thread Jan Beulich
On 05.07.2022 12:57, Thorsten Leemhuis wrote: > [CCing tglx, mingo, Boris and Juergen] > > On 04.07.22 14:26, Jan Beulich wrote: >> On 04.07.2022 13:58, Thorsten Leemhuis wrote: >>> On 25.05.22 10:55, Jan Beulich wrote: On 28.04.2022 16:50, Jan Beulich wrote: > The latest with commit bdd8

Re: Ping: [PATCH] x86/PAT: have pat_enabled() properly reflect state when running on e.g. Xen

2022-07-05 Thread Thorsten Leemhuis
[CCing tglx, mingo, Boris and Juergen] On 04.07.22 14:26, Jan Beulich wrote: > On 04.07.2022 13:58, Thorsten Leemhuis wrote: >> On 25.05.22 10:55, Jan Beulich wrote: >>> On 28.04.2022 16:50, Jan Beulich wrote: The latest with commit bdd8b6c98239 ("drm/i915: replace X86_FEATURE_PAT with p

  1   2   >