[linux-linus test] 165185: regressions - FAIL

2021-09-24 Thread osstest service owner
flight 165185 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/165185/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-pvshim 17 guest-saverestorefail REGR. vs. 152332 test-amd64-amd64-do

[PATCH 0/1] x86: centralize default APIC id definition

2021-09-24 Thread Alex Olson
I am interested in making the x86 topology seen by guests more flexible. This patch keeps the original functionality but allows the APIC identifier seen by guests for each vCPU to be altered more easily in future revisions. Since the same mapping of vcpu_id to vlapic id is currently preserved, the

[PATCH 1/1] x86: centralize default APIC id definition

2021-09-24 Thread Alex Olson
Inspired by an earlier attempt by Chao Gao , this revision aims to put the hypervisor in control of x86 APIC identifier definition instead of hard-coding a formula in multiple places (libxl, hvmloader, hypervisor). This is intended as a first step toward exposing/altering CPU topology seen by gues

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

2021-09-24 Thread Julien Grall
Hi Roger, On 24/09/2021 21:10, Roger Pau Monné wrote: On Fri, Sep 24, 2021 at 07:52:24PM +0500, Julien Grall wrote: Hi Roger, On 24/09/2021 13:41, Roger Pau Monné wrote: On Thu, Sep 23, 2021 at 09:59:26PM +0100, Andrew Cooper wrote: On 23/09/2021 20:32, Oleksandr Tyshchenko wrote: Suggested

Re: [PATCH v2 11/11] xen/arm: Process pending vPCI map/unmap operations

2021-09-24 Thread Stefano Stabellini
+ x86 maintainers On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > vPCI may map and unmap PCI device memory (BARs) being passed through which > may take a lot of time. For this those operations may be deferred to be > performed later, so that they can be sa

[xen-unstable test] 165183: regressions - FAIL

2021-09-24 Thread osstest service owner
flight 165183 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/165183/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-prev 6 xen-buildfail REGR. vs. 164945 test-amd64-amd64-x

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

2021-09-24 Thread Stefano Stabellini
On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > PCI host bridges are special devices in terms of implementing PCI > passthrough. According to [1] the current implementation depends on > Domain-0 to perform the initialization of the relevant PCI host > bridg

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

2021-09-24 Thread Stefano Stabellini
On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > In order for vPCI to work it needs to maintain guest and hardware > domain's views on the configuration space. For example, BARs and ^ of > COMMAND registers require emulation for guests and

Re: [PATCH v2 08/11] libxl: Only map legacy PCI IRQs if they are supported

2021-09-24 Thread Stefano Stabellini
On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Arm's PCI passthrough implementation doesn't support legacy interrupts, > but MSI/MSI-X. This can be the case for other platforms too. > For that reason introduce a new CONFIG_PCI_SUPP_LEGACY_IRQ and add > it

Re: [PATCH v2 07/11] libxl: Allow removing PCI devices for all types of domains

2021-09-24 Thread Stefano Stabellini
+x86 maintainers On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > The PCI device remove path may now be used by PVH on ARM, so the > assert is no longer valid. > > Signed-off-by: Oleksandr Andrushchenko > Cc: Ian Jackson > Cc: Juergen Gross > > --- > t

Re: Xen Rust VirtIO demos work breakdown for Project Stratos

2021-09-24 Thread Marek Marczykowski-Górecki
On Fri, Sep 24, 2021 at 05:02:46PM +0100, Alex Bennée wrote: > Hi, Hi, > 2.1 Stable ABI for foreignmemory mapping to non-dom0 ([STR-57]) > ─── > > Currently the foreign memory mapping support only works for dom0 due > to reference c

Re: [PATCH v2 06/11] xen/domain: Call pci_release_devices() when releasing domain resources

2021-09-24 Thread Stefano Stabellini
On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > From: Oleksandr Tyshchenko > > This is the very same that we already do for DT devices. Moreover, x86 > already calls pci_release_devices(). > > Signed-off-by: Oleksandr Tyshchenko Reviewed-by: Stefano Stabellini > --- > Since v1: > - r

Re: [PATCH v2 05/11] xen/arm: Mark device as PCI while creating one

2021-09-24 Thread Stefano Stabellini
On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > While adding a PCI device mark it as such, so other frameworks > can distinguish it form DT devices. ^ from > Signed-off-by: Oleksandr Andrushchenko Reviewed-by: Stefano Stabellini >

Re: [PATCH v2 04/11] xen/device-tree: Make dt_find_node_by_phandle global

2021-09-24 Thread Stefano Stabellini
On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Make dt_find_node_by_phandle globally visible, so it can be re-used by > other frameworks. > > Signed-off-by: Oleksandr Andrushchenko Reviewed-by: Stefano Stabellini > --- > xen/common/device_tree.c

Re: [PATCH v2 03/11] xen/arm: Introduce pci_find_host_bridge_node helper

2021-09-24 Thread Stefano Stabellini
On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Get host bridge node given a PCI device attached to it. > > This helper will be re-used for adding PCI devices by the subsequent > patches. > > Signed-off-by: Oleksandr Andrushchenko > Signed-off-by: Oleksa

Re: [PATCH v2 02/11] xen/arm: Add new device type for PCI

2021-09-24 Thread Stefano Stabellini
On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Add new device type (DEV_PCI) to distinguish PCI devices from platform > DT devices, so some drivers, like IOMMU, can handle PCI devices > differently. > > Also add a helper which is when given a struct devic

Re: [PATCH v2 01/11] xen/arm: Fix dev_is_dt macro definition

2021-09-24 Thread Stefano Stabellini
On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > This macro is not currently used, but still has an error in it: > a missing parenthesis. Fix this, so the macro is properly defined. > > Fixes: 6c5d3075d97e ("xen/arm: Introduce a generic way to describe devi

Re: [PATCH v2 11/17] xen/arm: PCI host bridge discovery within XEN on ARM

2021-09-24 Thread Stefano Stabellini
On Fri, 24 Sep 2021, Stefano Stabellini wrote: > On Fri, 24 Sep 2021, Rahul Singh wrote: > > Hi Stefano, > > > > > On 23 Sep 2021, at 8:12 pm, Stefano Stabellini > > > wrote: > > > > > > On Thu, 23 Sep 2021, Rahul Singh wrote: > > +goto err_exit; > > +} > > >>> > > >>

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

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

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

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

[qemu-mainline test] 165179: regressions - FAIL

2021-09-24 Thread osstest service owner
flight 165179 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/165179/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-libvirt-raw 17 guest-start/debian.repeat fail REGR. vs. 164950 Tests which are

Re: [PATCH v2 11/17] xen/arm: PCI host bridge discovery within XEN on ARM

2021-09-24 Thread Stefano Stabellini
On Fri, 24 Sep 2021, Rahul Singh wrote: > Hi Stefano, > > > On 23 Sep 2021, at 8:12 pm, Stefano Stabellini > > wrote: > > > > On Thu, 23 Sep 2021, Rahul Singh wrote: > +goto err_exit; > +} > >>> > >>> This is unnecessary at the moment, right? Can we get rid of ops->in

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

2021-09-24 Thread Stefano Stabellini
On Fri, 24 Sep 2021, Luca Fancellu wrote: > > On 23 Sep 2021, at 17:59, Stefano Stabellini wrote: > > > > On Thu, 23 Sep 2021, Luca Fancellu wrote: > +/* > + * Binaries will be translated into bootmodules, the maximum number for > them is > + * MAX_MODULES where we should rem

Re: [PATCH v3 2/2] xen-pciback: allow compiling on other archs than x86

2021-09-24 Thread Stefano Stabellini
On Fri, 24 Sep 2021, Oleksandr Andrushchenko wrote: > On 24.09.21 08:46, Oleksandr Andrushchenko wrote: > > On 23.09.21 23:00, Stefano Stabellini wrote: > >> On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: > >>> From: Oleksandr Andrushchenko > >>> > >>> Xen-pciback driver was designed to be bu

RE: [PATCH 08/37] xen/x86: add detection of discontinous node memory range

2021-09-24 Thread Stefano Stabellini
On Fri, 24 Sep 2021, Wei Chen wrote: > > -Original Message- > > From: Stefano Stabellini > > Sent: 2021年9月24日 8:26 > > To: Wei Chen > > Cc: xen-devel@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org; > > Bertrand Marquis ; jbeul...@suse.com; > > andrew.coop...@citrix.com; roge

RE: [PATCH 32/37] xen/arm: unified entry to parse all NUMA data from device tree

2021-09-24 Thread Stefano Stabellini
On Fri, 24 Sep 2021, Wei Chen wrote: > > -Original Message- > > From: Stefano Stabellini > > Sent: 2021年9月24日 11:17 > > To: Wei Chen > > Cc: xen-devel@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org; > > Bertrand Marquis > > Subject: Re: [PATCH 32/37] xen/arm: unified entry

Re: [PATCH 36/37] xen/arm: Provide Kconfig options for Arm to enable NUMA

2021-09-24 Thread Stefano Stabellini
On Fri, 24 Sep 2021, Wei Chen wrote: > Hi Stefano, > > On 2021/9/24 11:31, Stefano Stabellini wrote: > > On Thu, 23 Sep 2021, Wei Chen wrote: > > > Arm platforms support both ACPI and device tree. We don't > > > want users to select device tree NUMA or ACPI NUMA manually. > > > We hope usrs can ju

RE: [PATCH 23/37] xen/arm: implement node distance helpers for Arm

2021-09-24 Thread Stefano Stabellini
On Fri, 24 Sep 2021, Wei Chen wrote: > > -Original Message- > > From: Stefano Stabellini > > Sent: 2021年9月24日 9:47 > > To: Wei Chen > > Cc: xen-devel@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org; > > Bertrand Marquis > > Subject: Re: [PATCH 23/37] xen/arm: implement node

Re: [PATCH 25/37] xen/arm: implement bad_srat for Arm NUMA initialization

2021-09-24 Thread Stefano Stabellini
On Fri, 24 Sep 2021, Jan Beulich wrote: > On 24.09.2021 04:09, Stefano Stabellini wrote: > > On Thu, 23 Sep 2021, Wei Chen wrote: > >> NUMA initialization will parse information from firmware provided > >> static resource affinity table (ACPI SRAT or DTB). bad_srat if a > >> function that will be u

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

2021-09-24 Thread osstest service owner
flight 165181 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/165181/ 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

[linux-linus test] 165176: regressions - FAIL

2021-09-24 Thread osstest service owner
flight 165176 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/165176/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-pvshim 17 guest-saverestorefail REGR. vs. 152332 test-amd64-amd64-do

Re: [PATCH v2 08/12] xen/sched: Clean up trace handling

2021-09-24 Thread Dario Faggioli
On Mon, 2021-09-20 at 18:25 +0100, Andrew Cooper wrote: > There is no need for bitfields anywhere - use more sensible types.  > There is > also no need to cast 'd' to (unsigned char *) before passing it to a > function > taking void *. > > No functional change. > > Signed-off-by: Andrew Cooper >

Re: [PATCH v2 07/12] xen/rt: Clean up trace handling

2021-09-24 Thread Dario Faggioli
On Mon, 2021-09-20 at 18:25 +0100, Andrew Cooper wrote: > Most uses of bitfields and __packed are unnecessary.  There is also > no need to > cast 'd' to (unsigned char *) before passing it to a function taking > void *. > > No functional change. > > Signed-off-by: Andrew Cooper > Reviewed-by: Da

Re: [PATCH v2 06/12] xen/credit2: Clean up trace handling

2021-09-24 Thread Dario Faggioli
On Mon, 2021-09-20 at 18:25 +0100, Andrew Cooper wrote: > There is no need for bitfields anywhere - use more sensible types.  > There is > also no need to cast 'd' to (unsigned char *) before passing it to a > function > taking void *. > > No functional change. > > Signed-off-by: Andrew Cooper >

Re: [PATCH v2 03/12] xen/credit2: Remove tail padding from TRC_CSCHED2_* records

2021-09-24 Thread Dario Faggioli
On Mon, 2021-09-20 at 18:25 +0100, Andrew Cooper wrote: > All three of these records have tail padding, leaking stack rubble > into the > trace buffer.  Introduce an explicit _pad field and have the compiler > zero the > padding automatically. > > Signed-off-by: Andrew Cooper > Reviewed-by: Jan B

Re: [PATCH v2 02/12] xen/memory: Remove tail padding from TRC_MEM_* records

2021-09-24 Thread Dario Faggioli
On Mon, 2021-09-20 at 18:25 +0100, Andrew Cooper wrote: > Four TRC_MEM_* records supply custom structures with tail padding, > leaking > stack rubble into the trace buffer.  Three of the records were fine > in 32-bit > builds of Xen, due to the relaxed alignment of 64-bit integers, but > POD_SUPERP

Xen Rust VirtIO demos work breakdown for Project Stratos

2021-09-24 Thread Alex Bennée
Hi, The following is a breakdown (as best I can figure) of the work needed to demonstrate VirtIO backends in Rust on the Xen hypervisor. It requires work across a number of projects but notably core rust and virtio enabling in the Xen project (building on the work EPAM has already done) and the

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

2021-09-24 Thread Roger Pau Monné
On Fri, Sep 24, 2021 at 07:52:24PM +0500, Julien Grall wrote: > Hi Roger, > > On 24/09/2021 13:41, Roger Pau Monné wrote: > > On Thu, Sep 23, 2021 at 09:59:26PM +0100, Andrew Cooper wrote: > > > On 23/09/2021 20:32, Oleksandr Tyshchenko wrote: > > > > Suggested-by: Julien Grall > > > > Signed-off

[libvirt test] 165177: regressions - FAIL

2021-09-24 Thread osstest service owner
flight 165177 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/165177/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-libvirt 6 libvirt-buildfail REGR. vs. 151777 build-i386-libvirt

[ovmf test] 165175: all pass - PUSHED

2021-09-24 Thread osstest service owner
flight 165175 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/165175/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf d60915b7516c87ec49ad579a1cb8ff9226d85928 baseline version: ovmf 7ea7f9c07757b9445c24b

Re: [PATCH v2.1 14/12] xen: Switch to new TRACE() API

2021-09-24 Thread Dario Faggioli
On Mon, 2021-09-20 at 20:32 +0100, Andrew Cooper wrote: > (Almost) no functional change. > > irq_move_cleanup_interrupt() changes two smp_processor_id() calls to > the 'me' > local variable which manifests as a minor code improvement.  All > other > differences in the compiled binary are to do wit

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

2021-09-24 Thread Luca Fancellu
> On 24 Sep 2021, at 15:02, Jan Beulich wrote: > > On 22.09.2021 16:13, Luca Fancellu wrote: >> +static unsigned int __init allocate_dom0less_file(EFI_FILE_HANDLE >> dir_handle, >> + const char *name, >> +

Re: [PATCH v2 09/12] xen/trace: Minor code cleanup

2021-09-24 Thread Dario Faggioli
On Tue, 2021-09-21 at 13:03 +0200, Jan Beulich wrote: > On 20.09.2021 19:25, Andrew Cooper wrote: > > > > Signed-off-by: Andrew Cooper > > Like for v1: Largely > Reviewed-by: Jan Beulich > Reviewed-by: Dario Faggioli > One remark: > > > @@ -717,9 +713,6 @@ void __trace_var(u32 event, bool_t

[PATCH 1/2] include/public: add possible status values to usbif.h

2021-09-24 Thread Juergen Gross
The interface definition of PV USB devices is lacking the specification of possible values of the status filed in a response. Those are negative errno values as used in Linux, so they might differ in other OS's. Specify them via appropriate defines. Signed-off-by: Juergen Gross --- xen/include/p

[PATCH 2/2] include/public: add better interface description to usbif.h

2021-09-24 Thread Juergen Gross
The PV USB protocol is poorly described. Add a more detailed description to the usbif.h header file. Signed-off-by: Juergen Gross --- xen/include/public/io/usbif.h | 164 ++ 1 file changed, 164 insertions(+) diff --git a/xen/include/public/io/usbif.h b/xen/includ

[PATCH 0/2] include/public: update usbif.h

2021-09-24 Thread Juergen Gross
Add some missing defines and documentation to the pvUSB header file. Juergen Gross (2): include/public: add possible status values to usbif.h include/public: add better interface description to usbif.h xen/include/public/io/usbif.h | 171 ++ 1 file changed, 17

[xen-unstable test] 165174: regressions - FAIL

2021-09-24 Thread osstest service owner
flight 165174 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/165174/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i386-prev 6 xen-buildfail REGR. vs. 164945 build-amd64-prev

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

2021-09-24 Thread Julien Grall
Hi Roger, On 24/09/2021 13:41, Roger Pau Monné wrote: On Thu, Sep 23, 2021 at 09:59:26PM +0100, Andrew Cooper wrote: On 23/09/2021 20:32, Oleksandr Tyshchenko wrote: Suggested-by: Julien Grall Signed-off-by: Oleksandr Tyshchenko --- You can find the related discussions at: https://lore.kerne

Re: [PATCH v2 01/12] xen/trace: Don't over-read trace objects

2021-09-24 Thread Dario Faggioli
On Mon, 2021-09-20 at 18:25 +0100, Andrew Cooper wrote: > There is one buggy race record, TRC_RTDS_BUDGET_BURN.  As it must > remain > __packed (as cur_budget is misaligned), change bool has_extratime to > uint32_t > to compensate. > Mmm... maybe my understanding of data alignment inside structs

Re: [PATCH v2 02/18] VT-d: have callers specify the target level for page table walks

2021-09-24 Thread Roger Pau Monné
On Fri, Sep 24, 2021 at 11:42:13AM +0200, Jan Beulich wrote: > In order to be able to insert/remove super-pages we need to allow > callers of the walking function to specify at which point to stop the > walk. > > For intel_iommu_lookup_page() integrate the last level access into > the main walking

Re: [PATCH v2 01/12] xen/trace: Don't over-read trace objects

2021-09-24 Thread Dario Faggioli
On Wed, 2021-09-22 at 13:58 +0100, Andrew Cooper wrote: > On 22/09/2021 08:01, Jan Beulich wrote: > > > > > Agreed. Whether the truncation is an issue in practice is > > questionable, > > as I wouldn't expect budget to be consumed in multiple-second > > individual > > steps. But I didn't check wh

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

2021-09-24 Thread Jan Beulich
On 22.09.2021 16:13, Luca Fancellu wrote: > +static unsigned int __init allocate_dom0less_file(EFI_FILE_HANDLE dir_handle, > + const char *name, > + unsigned int name_len) > +{ > +dom0less_module_n

Re: [PATCH v2.1 14/12] xen: Switch to new TRACE() API

2021-09-24 Thread Jan Beulich
On 20.09.2021 21:32, Andrew Cooper wrote: > (Almost) no functional change. > > irq_move_cleanup_interrupt() changes two smp_processor_id() calls to the 'me' > local variable which manifests as a minor code improvement. All other > differences in the compiled binary are to do with line numbers cha

Re: [PATCH v2.1 15/12] xen/trace: Drop old trace macros

2021-09-24 Thread Jan Beulich
On 20.09.2021 21:33, Andrew Cooper wrote: > With all users updated to the new API, drop the old API. This includes all of > asm/hvm/trace.h, which allows us to drop some includes. > > Signed-off-by: Andrew Cooper Acked-by: Jan Beulich albeit I'd like to note that ... > --- a/xen/include/asm-x

Re: [PATCH v2.1 13/12] xen/trace: Introduce new API

2021-09-24 Thread Jan Beulich
On 20.09.2021 21:29, Andrew Cooper wrote: > --- a/xen/include/xen/trace.h > +++ b/xen/include/xen/trace.h > @@ -74,6 +74,30 @@ static inline void __trace_hypercall(uint32_t event, > unsigned long op, > const xen_ulong_t *args) {} > #endif /* CONFIG_TRACEBUFFE

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

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

Re: [PATCH v2 11/17] xen/arm: PCI host bridge discovery within XEN on ARM

2021-09-24 Thread Rahul Singh
Hi Stefano, > On 23 Sep 2021, at 8:12 pm, Stefano Stabellini wrote: > > On Thu, 23 Sep 2021, Rahul Singh wrote: +goto err_exit; +} >>> >>> This is unnecessary at the moment, right? Can we get rid of ops->init ? >> >> No this is required for N1SDP board. Please check b

Re: [PATCH v3 3/9] x86/PVH: permit more physdevop-s to be used by Dom0

2021-09-24 Thread Jan Beulich
On 22.09.2021 16:22, Roger Pau Monné wrote: > On Tue, Sep 21, 2021 at 09:17:37AM +0200, Jan Beulich wrote: >> Certain notifications of Dom0 to Xen are independent of the mode Dom0 is >> running in. Permit further PCI related ones (only their modern forms). >> Also include the USB2 debug port operat

Re: [PATCH] tools/libxl: Remove page_size and page_shift from struct libxl_acpi_ctxt

2021-09-24 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH] tools/libxl: Remove page_size and page_shift from struct libxl_acpi_ctxt"): > On 24.09.2021 13:05, Kevin Stefanov wrote: > > As a result of recent work, two members of struct libxl_acpi_ctxt were > > left with only one user. Thus, it becomes illogical for them to b

Re: [PATCH v2 01/18] AMD/IOMMU: have callers specify the target level for page table walks

2021-09-24 Thread Jan Beulich
On 24.09.2021 12:58, Roger Pau Monné wrote: > On Fri, Sep 24, 2021 at 11:41:14AM +0200, Jan Beulich wrote: >> --- a/xen/drivers/passthrough/amd/iommu_map.c >> +++ b/xen/drivers/passthrough/amd/iommu_map.c >> @@ -178,7 +178,8 @@ void __init iommu_dte_add_device_entry(s >> * page tables. >> */ >>

Re: [PATCH v3 2/2] xen-pciback: allow compiling on other archs than x86

2021-09-24 Thread Oleksandr Andrushchenko
On 24.09.21 08:46, Oleksandr Andrushchenko wrote: > On 23.09.21 23:00, Stefano Stabellini wrote: >> On Thu, 23 Sep 2021, Oleksandr Andrushchenko wrote: >>> From: Oleksandr Andrushchenko >>> >>> Xen-pciback driver was designed to be built for x86 only. But it >>> can also be used by other architec

Re: [PATCH] tools/libxl: Remove page_size and page_shift from struct libxl_acpi_ctxt

2021-09-24 Thread Jan Beulich
On 24.09.2021 13:05, Kevin Stefanov wrote: > As a result of recent work, two members of struct libxl_acpi_ctxt were > left with only one user. Thus, it becomes illogical for them to be > members of the struct at all. > > Drop the two struct members and instead let the only function using > them ha

sh_unshadow_for_p2m_change() vs p2m_set_entry()

2021-09-24 Thread Jan Beulich
Tim, I'm afraid you're still my best guess to hopefully get an insight on issues like this one. While doing IOMMU superpage work I was, just in the background, considering in how far the superpage re-coalescing to be used there couldn't be re-used for P2M / EPT / NPT. Which got me to think about

[PATCH] tools/libxl: Remove page_size and page_shift from struct libxl_acpi_ctxt

2021-09-24 Thread Kevin Stefanov
As a result of recent work, two members of struct libxl_acpi_ctxt were left with only one user. Thus, it becomes illogical for them to be members of the struct at all. Drop the two struct members and instead let the only function using them have them as local variables. Signed-off-by: Kevin Stefa

Re: [PATCH v2 01/18] AMD/IOMMU: have callers specify the target level for page table walks

2021-09-24 Thread Roger Pau Monné
On Fri, Sep 24, 2021 at 11:41:14AM +0200, Jan Beulich wrote: > In order to be able to insert/remove super-pages we need to allow > callers of the walking function to specify at which point to stop the > walk. (For now at least gcc will instantiate just a variant of the > function with the parameter

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

2021-09-24 Thread Luca Fancellu
> On 23 Sep 2021, at 17:59, Stefano Stabellini wrote: > > On Thu, 23 Sep 2021, Luca Fancellu wrote: +/* + * Binaries will be translated into bootmodules, the maximum number for them is + * MAX_MODULES where we should remove a unit for Xen and one for Xen DTB + */

Re: [PATCH 20/37] xen: introduce CONFIG_EFI to stub API for non-EFI architecture

2021-09-24 Thread Jan Beulich
On 24.09.2021 12:31, Wei Chen wrote: >> From: Jan Beulich >> Sent: 2021年9月24日 15:59 >> >> On 24.09.2021 06:34, Wei Chen wrote: From: Stefano Stabellini Sent: 2021年9月24日 9:15 On Thu, 23 Sep 2021, Wei Chen wrote: > --- a/xen/common/Kconfig > +++ b/xen/common/Kconfig

Re: [PATCH 02/37] xen: introduce a Kconfig option to configure NUMA nodes number

2021-09-24 Thread Jan Beulich
On 24.09.2021 12:33, Wei Chen wrote: >> From: Jan Beulich >> Sent: 2021年9月24日 16:56 >> >> On 23.09.2021 14:02, Wei Chen wrote: >>> --- a/xen/arch/Kconfig >>> +++ b/xen/arch/Kconfig >>> @@ -17,3 +17,14 @@ config NR_CPUS >>> For CPU cores which support Simultaneous Multi-Threading or >> simila

RE: [PATCH 36/37] xen/arm: Provide Kconfig options for Arm to enable NUMA

2021-09-24 Thread Wei Chen
> -Original Message- > From: Jan Beulich > Sent: 2021年9月24日 18:26 > To: Wei Chen > Cc: Bertrand Marquis ; xen- > de...@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 36/37] xen/arm: Provide Kconfig options for Arm to > enable NUMA > > On 23.09.2021 14

RE: [PATCH 03/37] xen/x86: Initialize memnodemapsize while faking NUMA node

2021-09-24 Thread Wei Chen
> -Original Message- > From: Jan Beulich > Sent: 2021年9月24日 16:57 > To: Wei Chen > Cc: Bertrand Marquis ; xen- > de...@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 03/37] xen/x86: Initialize memnodemapsize while faking > NUMA node > > On 23.09.2021

RE: [PATCH 02/37] xen: introduce a Kconfig option to configure NUMA nodes number

2021-09-24 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2021年9月24日 16:56 > To: Wei Chen > Cc: Bertrand Marquis ; xen- > de...@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH 02/37] xen: introduce a Kconfig option to configure > NUMA nodes number > > O

RE: [PATCH 20/37] xen: introduce CONFIG_EFI to stub API for non-EFI architecture

2021-09-24 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2021年9月24日 15:59 > To: Wei Chen > Cc: xen-devel@lists.xenproject.org; jul...@xen.org; Bertrand Marquis > ; Stefano Stabellini > Subject: Re: [PATCH 20/37] xen: introduce CONFIG_EFI to stub API for non- > EFI architecture > > On 2

Re: [PATCH 36/37] xen/arm: Provide Kconfig options for Arm to enable NUMA

2021-09-24 Thread Jan Beulich
On 23.09.2021 14:02, Wei Chen wrote: > --- a/xen/arch/arm/Kconfig > +++ b/xen/arch/arm/Kconfig > @@ -34,6 +34,17 @@ config ACPI > Advanced Configuration and Power Interface (ACPI) support for Xen is > an alternative to device tree on ARM64. > > + config DEVICE_TREE_NUMA > + de

RE: [PATCH 33/37] xen/arm: keep guest still be NUMA unware

2021-09-24 Thread Wei Chen
> -Original Message- > From: Stefano Stabellini > Sent: 2021年9月24日 11:19 > To: Wei Chen > Cc: xen-devel@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org; > Bertrand Marquis > Subject: Re: [PATCH 33/37] xen/arm: keep guest still be NUMA unware > > On Thu, 23 Sep 2021, Wei Ch

RE: [PATCH 06/37] xen/arm: use !CONFIG_NUMA to keep fake NUMA API

2021-09-24 Thread Wei Chen
> -Original Message- > From: Stefano Stabellini > Sent: 2021年9月24日 8:05 > To: Wei Chen > Cc: xen-devel@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org; > Bertrand Marquis > Subject: Re: [PATCH 06/37] xen/arm: use !CONFIG_NUMA to keep fake NUMA API > > On Thu, 23 Sep 2021,

Re: [PATCH 36/37] xen/arm: Provide Kconfig options for Arm to enable NUMA

2021-09-24 Thread Wei Chen
Hi Stefano, On 2021/9/24 11:31, Stefano Stabellini wrote: On Thu, 23 Sep 2021, Wei Chen wrote: Arm platforms support both ACPI and device tree. We don't want users to select device tree NUMA or ACPI NUMA manually. We hope usrs can just enable NUMA for Arm, and device tree ^ users

Re: [PATCH v3] tools/libxl: Correctly align the ACPI tables

2021-09-24 Thread Ian Jackson
Roger Pau Monné writes ("Re: [PATCH v3] tools/libxl: Correctly align the ACPI tables"): > On Wed, Sep 15, 2021 at 03:30:00PM +0100, Kevin Stefanov wrote: > > Fixes: 14c0d328da2b ("libxl/acpi: Build ACPI tables for HVMlite guests") > > Signed-off-by: Kevin Stefanov > > Reviewed-by: Jan Beulich >

Re: [PATCH v2] pci: fix handling of PCI bridges with subordinate bus number 0xff

2021-09-24 Thread Jan Beulich
On 24.09.2021 11:10, Igor Druzhinin wrote: > Bus number 0xff is valid according to the PCI spec. Using u8 typed sub_bus > and assigning 0xff to it will result in the following loop getting stuck. > > for ( ; sec_bus <= sub_bus; sec_bus++ ) {...} > > Just change its type to unsigned int simila

[PATCH v2 18/18] VT-d: free all-empty page tables

2021-09-24 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, update_contig_markers() right away needs to be called in all places

[PATCH v2 17/18] AMD/IOMMU: free all-empty page tables

2021-09-24 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, update_contig_markers() right away needs to be called in all places

[seabios test] 165173: tolerable FAIL - PUSHED

2021-09-24 Thread osstest service owner
flight 165173 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/165173/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stopfail like 163203 test-amd64-amd64-qemuu-nested-amd 20 debi

[PATCH v2 16/18] x86: introduce helper for recording degree of contiguity in page tables

2021-09-24 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 v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-09-24 Thread Jan Beulich
Page table are used for two purposes after allocation: They either start out all empty, or they get 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 v2 14/18] IOMMU: fold flush-all hook into "flush one"

2021-09-24 Thread Jan Beulich
Having a separate flush-all hook has always been puzzling me some. We will want to be able to force a full flush via accumulated flush flags from the map/unmap functions. Introduce a respective new flag and fold all flush handling to use the single remaining hook. Note that because of the respecti

[PATCH v2 13/18] VT-d: allow use of superpage mappings

2021-09-24 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 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -743,18 +743,37 @@ static int __must_check iommu_flush_

RE: [PATCH 34/37] xen/arm: enable device tree based NUMA in system init

2021-09-24 Thread Wei Chen
Hi Stefano, > -Original Message- > From: Stefano Stabellini > Sent: 2021年9月24日 11:28 > To: Wei Chen > Cc: xen-devel@lists.xenproject.org; sstabell...@kernel.org; jul...@xen.org; > Bertrand Marquis > Subject: Re: [PATCH 34/37] xen/arm: enable device tree based NUMA in > system init > >

[PATCH v2 12/18] AMD/IOMMU: allow use of superpage mappings

2021-09-24 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, 1G, and 512G mappings. (Via non-default page size

[PATCH v2 11/18] AMD/IOMMU: return old PTE from {set,clear}_iommu_pte_present()

2021-09-24 Thread Jan Beulich
In order to free intermediate page tables when replacing smaller mappings by a single larger one callers will need to know the full PTE. Flush indicators can be derived from this in the callers (and outside the locked regions). First split set_iommu_pte_present() from set_iommu_ptes_present(): Only

[PATCH v2 10/18] AMD/IOMMU: walk trees upon page fault

2021-09-24 Thread Jan Beulich
This is to aid diagnosing issues and largely matches VT-d's behavior. Since I'm adding permissions output here as well, take the opportunity and also add their displaying to amd_dump_page_table_level(). Signed-off-by: Jan Beulich --- a/xen/drivers/passthrough/amd/iommu.h +++ b/xen/drivers/passth

Re: [PATCH v3] tools/libxl: Correctly align the ACPI tables

2021-09-24 Thread Roger Pau Monné
On Wed, Sep 15, 2021 at 03:30:00PM +0100, Kevin Stefanov wrote: > The memory allocator currently calculates alignment in libxl's virtual > address space, rather than guest physical address space. This results > in the FACS being commonly misaligned. > > Furthermore, the allocator has several other

[PATCH v2 09/18] AMD/IOMMU: drop stray TLB flush

2021-09-24 Thread Jan Beulich
I think this flush was overlooked when flushing was moved out of the core (un)mapping functions. The flush the caller is required to invoke anyway will satisfy the needs resulting from the splitting of a superpage. Signed-off-by: Jan Beulich --- a/xen/drivers/passthrough/amd/iommu_map.c +++ b/xe

[PATCH v2 08/18] IOMMU/x86: support freeing of pagetables

2021-09-24 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 v2 07/18] IOMMU/x86: perform PV Dom0 mappings in batches

2021-09-24 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 v2 06/18] IOMMU/x86: restrict IO-APIC mappings for PV Dom0

2021-09-24 Thread Jan Beulich
While already the case for PVH, there's no reason to treat PV differently here, though of course the addresses get taken from another source in this case. Except that, to match CPU side mappings, by default we permit r/o ones. This then also means we now deal consistently with IO-APICs whose MMIO i

[PATCH v2 05/18] IOMMU: have iommu_{,un}map() split requests into largest possible chunks

2021-09-24 Thread Jan Beulich
Introduce a helper function to determine the largest possible mapping that allows covering a request (or the next part of it that is left to be processed). In order to not add yet more recurring dfn_add() / mfn_add() to the two callers of the new helper, also introduce local variables holding the

[PATCH v2 04/18] IOMMU: add order parameter to ->{,un}map_page() hooks

2021-09-24 Thread Jan Beulich
Or really, in the case of ->map_page(), accommodate it in the existing "flags" parameter. All call sites will pass 0 for now. Signed-off-by: Jan Beulich Reviewed-by: Kevin Tian --- v2: Re-base over change earlier in the series. --- a/xen/drivers/passthrough/amd/iommu.h +++ b/xen/drivers/passthr

[PATCH v2 03/18] IOMMU: have vendor code announce supported page sizes

2021-09-24 Thread Jan Beulich
Generic code will use this information to determine what order values can legitimately be passed to the ->{,un}map_page() hooks. For now all ops structures simply get to announce 4k mappings (as base page size), and there is (and always has been) an assumption that this matches the CPU's MMU base p

[PATCH v2 02/18] VT-d: have callers specify the target level for page table walks

2021-09-24 Thread Jan Beulich
In order to be able to insert/remove super-pages we need to allow callers of the walking function to specify at which point to stop the walk. For intel_iommu_lookup_page() integrate the last level access into the main walking function. dma_pte_clear_one() gets only partly adjusted for now: Error

[PATCH v2 01/18] AMD/IOMMU: have callers specify the target level for page table walks

2021-09-24 Thread Jan Beulich
In order to be able to insert/remove super-pages we need to allow callers of the walking function to specify at which point to stop the walk. (For now at least gcc will instantiate just a variant of the function with the parameter eliminated, so effectively no change to generated code as far as the

[PATCH v2 00/18] IOMMU: superpage support when not sharing pagetables

2021-09-24 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 2.5 years ago AMD code had logic to un-shatter pa

  1   2   >