Re: [PATCH 0/2] Xen FF-A mediator

2022-06-07 Thread Jens Wiklander
Hi Stefano, On Tue, Jun 7, 2022 at 11:55 PM Stefano Stabellini wrote: > > On Tue, 7 Jun 2022, Jens Wiklander wrote: > > Hi, > > > > This patch sets add a FF-A [1] mediator modeled after the TEE mediator > > already present in Xen. The FF-A mediator implements the subset of the FF-A > > 1.1

Re: [PATCH] xen: unexport __init-annotated xen_xlate_map_ballooned_pages()

2022-06-07 Thread Juergen Gross
On 06.06.22 06:59, Masahiro Yamada wrote: EXPORT_SYMBOL and __init is a bad combination because the .init.text section is freed up after the initialization. Hence, modules cannot use symbols annotated __init. The access to a freed symbol may end up with kernel panic. modpost used to detect it,

Re: [PATCH V4 0/8] virtio: Solution to restrict memory access under Xen using xen-grant DMA-mapping layer

2022-06-07 Thread Juergen Gross
On 02.06.22 21:23, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Hello all. The purpose of this patch series is to add support for restricting memory access under Xen using specific grant table [1] based DMA-mapping layer. Patch series is based on Juergen Gross’ initial work [2]

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

2022-06-07 Thread osstest service owner
flight 170879 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/170879/ 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

[xen-4.15-testing test] 170870: tolerable FAIL - PUSHED

2022-06-07 Thread osstest service owner
flight 170870 xen-4.15-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/170870/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds18 guest-start/debian.repeat fail REGR. vs. 169237 Tests which did not

[PATCH Resend] xen/netback: do some code cleanup

2022-06-07 Thread Juergen Gross
Remove some unused macros and functions, make local functions static. Signed-off-by: Juergen Gross Acked-by: Wei Liu --- drivers/net/xen-netback/common.h| 12 drivers/net/xen-netback/interface.c | 16 +--- drivers/net/xen-netback/netback.c | 4 +++-

RE: [PATCH v2 3/3] x86/vmx: implement Notify VM Exit

2022-06-07 Thread Tian, Kevin
> From: Roger Pau Monné > Sent: Tuesday, June 7, 2022 6:06 PM > > On Tue, Jun 07, 2022 at 09:43:25AM +0200, Jan Beulich wrote: > > On 03.06.2022 16:46, Roger Pau Monné wrote: > > > On Fri, Jun 03, 2022 at 02:49:54PM +0200, Jan Beulich wrote: > > >> On 26.05.2022 13:11, Roger Pau Monne wrote: > >

Re: [PATCH 16/16] xen/arm: mm: Re-implement setup_frame_table_mappings() with map_pages_to_xen()

2022-06-07 Thread Stefano Stabellini
On Fri, 20 May 2022, Julien Grall wrote: > From: Julien Grall > > Now that map_pages_to_xen() has been extended to support 2MB mappings, > we can replace the create_mappings() call by map_pages_to_xen() call. > > This has the advantage to remove the differences between 32-bit and > 64-bit code.

Re: [PATCH 09/16] xen/arm: Move fixmap definitions in a separate header

2022-06-07 Thread Stefano Stabellini
On Fri, 20 May 2022, Julien Grall wrote: > From: Julien Grall > > To use properly the fixmap definitions, their user would need > also new to include . This is not very great when > the user itself is not meant to directly use ACPI definitions. > > Including in is not option because > the

Re: [PATCH 10/16] xen/arm: add Persistent Map (PMAP) infrastructure

2022-06-07 Thread Stefano Stabellini
On Fri, 20 May 2022, Julien Grall wrote: > From: Wei Liu > > The basic idea is like Persistent Kernel Map (PKMAP) in Linux. We > pre-populate all the relevant page tables before the system is fully > set up. > > We will need it on Arm in order to rework the arm64 version of >

[linux-linus test] 170868: regressions - FAIL

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

Re: [PATCH Resend] xen/netback: do some code cleanup

2022-06-07 Thread Jakub Kicinski
On Tue, 7 Jun 2022 07:28:38 +0200 Juergen Gross wrote: > Remove some unused macros and functions, make local functions static. > --- a/drivers/net/xen-netback/rx.c > +++ b/drivers/net/xen-netback/rx.c > @@ -486,7 +486,7 @@ static void xenvif_rx_skb(struct xenvif_queue *queue) >#define

Re: [PATCH 0/2] Xen FF-A mediator

2022-06-07 Thread Stefano Stabellini
On Tue, 7 Jun 2022, Stefano Stabellini wrote: > On Tue, 7 Jun 2022, Jens Wiklander wrote: > > Hi, > > > > This patch sets add a FF-A [1] mediator modeled after the TEE mediator > > already present in Xen. The FF-A mediator implements the subset of the FF-A > > 1.1 specification needed to

[xen-unstable test] 170865: regressions - FAIL

2022-06-07 Thread osstest service owner
flight 170865 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/170865/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-freebsd10-amd64 7 xen-install fail REGR. vs. 170840 Tests which are

Re: [PATCH 0/2] Xen FF-A mediator

2022-06-07 Thread Stefano Stabellini
On Tue, 7 Jun 2022, Jens Wiklander wrote: > Hi, > > This patch sets add a FF-A [1] mediator modeled after the TEE mediator > already present in Xen. The FF-A mediator implements the subset of the FF-A > 1.1 specification needed to communicate with OP-TEE using FF-A as transport > mechanism

[linux-5.4 test] 170860: regressions - FAIL

2022-06-07 Thread osstest service owner
flight 170860 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/170860/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit1 14 guest-start fail REGR. vs. 170736 Tests which are

Re: memory overcomittment with sr-iov device assighment

2022-06-07 Thread Alex Nln
--- Original Message --- On Tuesday, June 7th, 2022 at 3:04 AM, Andrew Cooper wrote: > But IOMMU violations are not restartable. We can't just take an IOMMU > fault, and shuffle the guests memory, because the PCIe protocol has > timeouts. These aren't generally long enough to even send

[qemu-mainline test] 170858: trouble: broken/fail/pass

2022-06-07 Thread osstest service owner
flight 170858 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/170858/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-debianhvm-amd64-shadowbroken

Re: [PATCH v1 00/10] Add Xue - console over USB 3 Debug Capability

2022-06-07 Thread Tamas K Lengyel
On Tue, Jun 7, 2022 at 10:31 AM Marek Marczykowski-Górecki wrote: > > This is integration of https://github.com/connojd/xue into mainline Xen. > This patch series includes several patches that I made in the process, some > are > very loosely related. > > The driver developed by Connor supports

[libvirt test] 170857: regressions - FAIL

2022-06-07 Thread osstest service owner
flight 170857 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/170857/ 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 v1 10/10] xue: allow driving the rest of XHCI by a domain while Xen uses DbC

2022-06-07 Thread Marek Marczykowski-Górecki
That's possible, because the capability was designed specifically to allow separate driver handle it, in parallel to unmodified xhci driver (separate set of registers, pretending the port is "disconnected" for the main xhci driver etc). It works with Linux dom0, although requires an awful hack -

[PATCH v1 05/10] console: support multiple serial console simultaneously

2022-06-07 Thread Marek Marczykowski-Górecki
Previously only one serial console was supported at the same time. Using console=com1,dbgp,vga silently ignored all but last serial console (in this case: only dbgp and vga were active). Fix this by storing not a single sercon_handle, but an array of them, up to MAX_SERCONS entries. The value of

[PATCH v1 07/10] IOMMU/VT-d: wire common device reserved memory API

2022-06-07 Thread Marek Marczykowski-Górecki
Re-use rmrr= parameter handling code to handle common device reserved memory. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers/passthrough/vtd/dmar.c | 201 +- 1 file changed, 119 insertions(+), 82 deletions(-) diff --git

[PATCH v1 08/10] IOMMU/AMD: wire common device reserved memory API

2022-06-07 Thread Marek Marczykowski-Górecki
Register common device reserved memory similar to how ivmd= parameter is handled. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers/passthrough/amd/iommu_acpi.c | 16 1 file changed, 16 insertions(+) diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c

[PATCH v1 03/10] xue: add support for selecting specific xhci

2022-06-07 Thread Marek Marczykowski-Górecki
Handle parameters similar to dbgp=ehci. Implement this by not resettting xhc_cf8 again in xue_init_xhc(), but using a value found there if non-zero. Additionally, add xue->xhc_num to select n-th controller. Signed-off-by: Marek Marczykowski-Górecki --- docs/misc/xen-command-line.pandoc | 5

[PATCH v1 01/10] drivers/char: Add support for Xue USB3 debugger

2022-06-07 Thread Marek Marczykowski-Górecki
From: Connor Davis [Connor] Xue is a cross-platform USB 3 debugger that drives the Debug Capability (DbC) of xHCI-compliant host controllers. This patch implements the operations needed for xue to initialize the host controller's DbC and communicate with it. It also implements a struct

[PATCH v1 02/10] xue: reset XHCI ports when initializing dbc

2022-06-07 Thread Marek Marczykowski-Górecki
Reset ports, to force host system to re-enumerate devices. Otheriwse it will require the cable to be re-plugged, or will wait in the "configuring" state indefinitely. Trick and code copied from Linux: drivers/usb/early/xhci-dbc.c:xdbc_start()->xdbc_reset_debug_port() Signed-off-by: Marek

[PATCH v1 04/10] ehci-dbgp: fix selecting n-th ehci controller

2022-06-07 Thread Marek Marczykowski-Górecki
The ehci number was parsed but ignored. Signed-off-by: Marek Marczykowski-Górecki --- xen/drivers/char/ehci-dbgp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/char/ehci-dbgp.c b/xen/drivers/char/ehci-dbgp.c index 16c8ff394d5c..92c588ec0aa3 100644 ---

[PATCH v1 00/10] Add Xue - console over USB 3 Debug Capability

2022-06-07 Thread Marek Marczykowski-Górecki
This is integration of https://github.com/connojd/xue into mainline Xen. This patch series includes several patches that I made in the process, some are very loosely related. The driver developed by Connor supports output-only console via USB3 debug capability. The capability is designed to

[PATCH v1 09/10] xue: mark DMA buffers as reserved for the device

2022-06-07 Thread Marek Marczykowski-Górecki
The important part is to include those buffers in IOMMU page table relevant for the USB controller. Otherwise, DbC will stop working as soon as IOMMU is enabled, regardless of to which domain device assigned (be it xen or dom0). If the device is passed through to dom0 or other domain (see later

[PATCH v1 06/10] IOMMU: add common API for device reserved memory

2022-06-07 Thread Marek Marczykowski-Górecki
Add API similar to rmrr= and ivmd= arguments, but in a common code. This will allow drivers to register reserved memory regardless of the IOMMU vendor. The direct reason for this API is xhci-dbc console driver (aka xue), that needs to use DMA. But future change may unify command line arguments for

Re: [PATCH v4 2/3] xsm: consolidate loading the policy buffer

2022-06-07 Thread Jason Andryuk
On Tue, Jun 7, 2022 at 9:16 AM Daniel P. Smith wrote: > Unfortunately the scope of what this series started out to solve, not to > walk all the boot modules when no policy file is needed, and what the > reviewers have been requesting be addressed is continually diverging. You only need patch 1/3

Re: [PATCH v4 2/3] xsm: consolidate loading the policy buffer

2022-06-07 Thread Jan Beulich
On 07.06.2022 16:10, Daniel P. Smith wrote: > On 6/7/22 09:58, Jan Beulich wrote: >> On 07.06.2022 15:47, Daniel P. Smith wrote: >>> >>> On 6/2/22 05:47, Jan Beulich wrote: On 31.05.2022 20:20, Daniel P. Smith wrote: > Previously, initializing the policy buffer was split between two

Re: [PATCH v4 2/3] xsm: consolidate loading the policy buffer

2022-06-07 Thread Daniel P. Smith
On 6/7/22 09:58, Jan Beulich wrote: > On 07.06.2022 15:47, Daniel P. Smith wrote: >> >> On 6/2/22 05:47, Jan Beulich wrote: >>> On 31.05.2022 20:20, Daniel P. Smith wrote: Previously, initializing the policy buffer was split between two functions, xsm_{multiboot,dt}_policy_init() and

Re: [PATCH v4 2/3] xsm: consolidate loading the policy buffer

2022-06-07 Thread Jan Beulich
On 07.06.2022 15:47, Daniel P. Smith wrote: > > On 6/2/22 05:47, Jan Beulich wrote: >> On 31.05.2022 20:20, Daniel P. Smith wrote: >>> Previously, initializing the policy buffer was split between two functions, >>> xsm_{multiboot,dt}_policy_init() and xsm_core_init(). The latter for loading >>>

Re: [PATCH v4 3/3] xsm: properly handle error from XSM init

2022-06-07 Thread Daniel P. Smith
On 6/1/22 02:49, Jan Beulich wrote: > On 31.05.2022 21:18, Andrew Cooper wrote: >> On 31/05/2022 19:20, Daniel P. Smith wrote: >>> diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c >>> index 53a73010e0..ed67b50c9d 100644 >>> --- a/xen/arch/x86/setup.c >>> +++ b/xen/arch/x86/setup.c >>> @@

Re: [PATCH v4 3/3] xsm: properly handle error from XSM init

2022-06-07 Thread Daniel P. Smith
On 5/31/22 15:18, Andrew Cooper wrote: > On 31/05/2022 19:20, Daniel P. Smith wrote: >> diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c >> index 53a73010e0..ed67b50c9d 100644 >> --- a/xen/arch/x86/setup.c >> +++ b/xen/arch/x86/setup.c >> @@ -1700,7 +1701,11 @@ void __init noreturn

Re: [PATCH v4 2/3] xsm: consolidate loading the policy buffer

2022-06-07 Thread Daniel P. Smith
On 6/2/22 05:47, Jan Beulich wrote: > On 31.05.2022 20:20, Daniel P. Smith wrote: >> Previously, initializing the policy buffer was split between two functions, >> xsm_{multiboot,dt}_policy_init() and xsm_core_init(). The latter for loading >> the policy from boot modules and the former for

[ovmf test] 170867: all pass - PUSHED

2022-06-07 Thread osstest service owner
flight 170867 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170867/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf a81a650da1dc40ec2b2825d1878cdf2778b4be14 baseline version: ovmf

Re: [PATCH v3 3/3] xsm: properly handle error from XSM init

2022-06-07 Thread Jan Beulich
On 07.06.2022 14:14, Daniel P. Smith wrote: > On 6/1/22 02:14, Jan Beulich wrote: >> Now that return values are checked, I think that in addition to what >> you already do the two function declarations may want decorating with >> __must_check. > > Understood but likely not necessary based on

Re: [PATCH v4 2/3] xsm: consolidate loading the policy buffer

2022-06-07 Thread Daniel P. Smith
On 5/31/22 15:07, Andrew Cooper wrote: > On 31/05/2022 19:20, Daniel P. Smith wrote: >> diff --git a/xen/xsm/xsm_policy.c b/xen/xsm/xsm_policy.c >> index 8dafbc9381..690fd23e9f 100644 >> --- a/xen/xsm/xsm_policy.c >> +++ b/xen/xsm/xsm_policy.c >> @@ -8,7 +8,7 @@ >> * Contributors: >> *

Re: [PATCH v3 3/3] xsm: properly handle error from XSM init

2022-06-07 Thread Daniel P. Smith
On 6/1/22 02:14, Jan Beulich wrote: > On 31.05.2022 17:08, Daniel P. Smith wrote: >> @@ -1690,7 +1691,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) >> >> open_softirq(NEW_TLBFLUSH_CLOCK_PERIOD_SOFTIRQ, >> new_tlbflush_clock_period); >> >> -if ( opt_watchdog ) >> +if

Re: [PATCH v3 1/3] xsm: only search for a policy file when needed

2022-06-07 Thread Daniel P. Smith
On 6/1/22 02:08, Jan Beulich wrote: > On 31.05.2022 17:08, Daniel P. Smith wrote: >> It is possible to select a few different build configurations that results in >> the unnecessary walking of the boot module list looking for a policy module. >> This specifically occurs when the flask policy is

Re: [PATCH v3 1/3] xsm: only search for a policy file when needed

2022-06-07 Thread Daniel P. Smith
On 6/1/22 02:04, Jan Beulich wrote: > On 31.05.2022 18:15, Daniel P. Smith wrote: >> >> On 5/31/22 11:51, Jan Beulich wrote: >>> On 31.05.2022 17:08, Daniel P. Smith wrote: It is possible to select a few different build configurations that results in the unnecessary walking of the

[linux-linus test] 170853: regressions - FAIL

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

Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules

2022-06-07 Thread Julien Grall
Hi, On 02/06/2022 09:49, Jan Beulich wrote: On 01.06.2022 19:35, Julien Grall wrote: On 31/05/2022 11:53, Daniel P. Smith wrote: On 5/31/22 05:25, Julien Grall wrote: Hi, On 31/05/2022 03:41, Daniel P. Smith wrote: diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig index

Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules

2022-06-07 Thread Julien Grall
On 01/06/2022 10:06, Roger Pau Monné wrote: On Wed, Jun 01, 2022 at 07:40:12AM +, George Dunlap wrote: The down side of this is that you can’t use “automatically remove trailing whitespace on save” features of some editors. Without such automation, I introduce loads of trailing

[xen-unstable test] 170852: regressions - FAIL

2022-06-07 Thread osstest service owner
flight 170852 xen-unstable real [real] flight 170862 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/170852/ http://logs.test-lab.xenproject.org/osstest/logs/170862/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

[PATCH 2/2] xen/arm: add FF-A mediator

2022-06-07 Thread Jens Wiklander
Adds a FF-A version 1.1 [1] mediator to communicate with a Secure Partition in secure world. The implementation is the bare minimum to be able to communicate with OP-TEE running as an SPMC at S-EL1. This is loosely based on the TEE mediator framework and the OP-TEE mediator. [1]

[PATCH 0/2] Xen FF-A mediator

2022-06-07 Thread Jens Wiklander
Hi, This patch sets add a FF-A [1] mediator modeled after the TEE mediator already present in Xen. The FF-A mediator implements the subset of the FF-A 1.1 specification needed to communicate with OP-TEE using FF-A as transport mechanism instead of SMC/HVC as with the TEE mediator. It allows a

[PATCH 1/2] xen/arm: smccc: add support for SMCCCv1.2 extended input/output registers

2022-06-07 Thread Jens Wiklander
SMCCC v1.2 AArch64 allows x0-x17 to be used as both parameter registers and result registers for the SMC and HVC instructions. Arm Firmware Framework for Armv8-A specification makes use of x0-x7 as parameter and result registers. Let us add new interface to support this extended set of

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

2022-06-07 Thread Roger Pau Monné
On Tue, Jun 07, 2022 at 09:43:25AM +0200, Jan Beulich wrote: > On 03.06.2022 16:46, Roger Pau Monné wrote: > > On Fri, Jun 03, 2022 at 02:49:54PM +0200, Jan Beulich wrote: > >> On 26.05.2022 13:11, Roger Pau Monne wrote: > >>> --- a/xen/arch/x86/hvm/vmx/vmx.c > >>> +++ b/xen/arch/x86/hvm/vmx/vmx.c

Re: [PATCH v2 1/3] x86/vmx: implement Bus Lock detection

2022-06-07 Thread Roger Pau Monné
On Tue, Jun 07, 2022 at 08:54:15AM +0200, Jan Beulich wrote: > On 06.06.2022 15:27, Andrew Cooper wrote: > > On 26/05/2022 12:11, Roger Pau Monne wrote: > >> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c > >> index f08a00dcbb..476ab72463 100644 > >> ---

Re: [PATCH v6 7/9] xen/arm: unpopulate memory when domain is static

2022-06-07 Thread Julien Grall
Hi Penny, On 07/06/2022 08:30, Penny Zheng wrote: Today when a domain unpopulates the memory on runtime, they will always hand the memory back to the heap allocator. And it will be a problem if domain is static. Pages as guest RAM for static domain shall be reserved to only this domain and not

Re: [PATCH v6 2/9] xen: do not free reserved memory into heap

2022-06-07 Thread Julien Grall
Hi Penny, On 07/06/2022 08:30, Penny Zheng wrote: Pages used as guest RAM for static domain, shall be reserved to this domain only. So in case reserved pages being used for other purpose, users shall not free them back to heap, even when last ref gets dropped. free_staticmem_pages will be

Re: [PATCH v6 1/9] xen/arm: rename PGC_reserved to PGC_static

2022-06-07 Thread Julien Grall
Hi, On 07/06/2022 08:30, Penny Zheng wrote: PGC_reserved could be ambiguous, and we have to tell what the pages are reserved for, so this commit intends to rename PGC_reserved to PGC_static, which clearly indicates the page is reserved for static memory. Signed-off-by: Penny Zheng Acked-by:

Re: [PATCH RFC 3/6] x86/ioapic: RTE modifications must use ioapic_write_entry

2022-06-07 Thread Jan Beulich
On 03.06.2022 17:01, Roger Pau Monné wrote: > On Fri, Jun 03, 2022 at 03:34:33PM +0200, Jan Beulich wrote: >> On 21.04.2022 15:21, Roger Pau Monne wrote: >>> Do not allow to write to RTE registers using io_apic_write and instead >>> require changes to RTE to be performed using ioapic_write_entry.

Re: [PATCH RFC 1/6] x86/ioapic: set disable hook for masking edge interrupts

2022-06-07 Thread Jan Beulich
On 03.06.2022 16:53, Roger Pau Monné wrote: > On Fri, Jun 03, 2022 at 03:19:34PM +0200, Jan Beulich wrote: >> On 21.04.2022 15:21, Roger Pau Monne wrote: >>> Allow disabling (masking) IO-APIC pins set to edge trigger mode. This >>> is required in order to safely migrate such interrupts between

Re: [PATCH v6 9/9] xen: retrieve reserved pages on populate_physmap

2022-06-07 Thread Jan Beulich
On 07.06.2022 09:30, Penny Zheng wrote: > +/* > + * Acquire a page from reserved page list(resv_page_list), when populating > + * memory for static domain on runtime. > + */ > +mfn_t acquire_reserved_page(struct domain *d, unsigned int memflags) > +{ > +struct page_info *page; > + > +

Re: [PATCH v6 6/9] xen/arm: introduce CDF_staticmem

2022-06-07 Thread Jan Beulich
On 07.06.2022 09:30, Penny Zheng wrote: > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -3287,9 +3287,12 @@ void __init create_domUs(void) > if ( !dt_device_is_compatible(node, "xen,domain") ) > continue; > > +if ( dt_find_property(node,

Re: [PATCH v6 2/9] xen: do not free reserved memory into heap

2022-06-07 Thread Jan Beulich
On 07.06.2022 09:30, Penny Zheng wrote: > Pages used as guest RAM for static domain, shall be reserved to this > domain only. > So in case reserved pages being used for other purpose, users > shall not free them back to heap, even when last ref gets dropped. > > free_staticmem_pages will be

Re: [PATCH v6 1/9] xen/arm: rename PGC_reserved to PGC_static

2022-06-07 Thread Jan Beulich
On 07.06.2022 09:30, Penny Zheng wrote: > PGC_reserved could be ambiguous, and we have to tell what the pages are > reserved for, so this commit intends to rename PGC_reserved to > PGC_static, which clearly indicates the page is reserved for static > memory. > > Signed-off-by: Penny Zheng

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

2022-06-07 Thread Jan Beulich
On 03.06.2022 16:46, Roger Pau Monné wrote: > On Fri, Jun 03, 2022 at 02:49:54PM +0200, Jan Beulich wrote: >> On 26.05.2022 13:11, Roger Pau Monne wrote: >>> --- a/xen/arch/x86/hvm/vmx/vmx.c >>> +++ b/xen/arch/x86/hvm/vmx/vmx.c >>> @@ -1419,10 +1419,19 @@ static void cf_check

[PATCH v6 8/9] xen: introduce prepare_staticmem_pages

2022-06-07 Thread Penny Zheng
Later, we want to use acquire_domstatic_pages() for populating memory for static domain on runtime, however, there are a lot of pointless work (checking mfn_valid(), scrubbing the free part, cleaning the cache...) considering we know the page is valid and belong to the guest. This commit splits

[PATCH v6 7/9] xen/arm: unpopulate memory when domain is static

2022-06-07 Thread Penny Zheng
Today when a domain unpopulates the memory on runtime, they will always hand the memory back to the heap allocator. And it will be a problem if domain is static. Pages as guest RAM for static domain shall be reserved to only this domain and not be used for any other purposes, so they shall never

[PATCH v6 9/9] xen: retrieve reserved pages on populate_physmap

2022-06-07 Thread Penny Zheng
When a static domain populates memory through populate_physmap at runtime, it shall retrieve reserved pages from resv_page_list to make sure that guest RAM is still restricted in statically configured memory regions. This commit also introduces a new helper acquire_reserved_page to make it work.

[PATCH v6 6/9] xen/arm: introduce CDF_staticmem

2022-06-07 Thread Penny Zheng
In order to have an easy and quick way to find out whether this domain memory is statically configured, this commit introduces a new flag CDF_staticmem and a new helper is_domain_using_staticmem() to tell. Signed-off-by: Penny Zheng --- v6 changes: - move non-zero is_domain_using_staticmem()

[PATCH v6 5/9] xen: add field "flags" to cover all internal CDF_XXX

2022-06-07 Thread Penny Zheng
With more and more CDF_xxx internal flags in and to save the space, this commit introduces a new field "flags" in struct domain to store CDF_* internal flags directly. Another new CDF_xxx will be introduced in the next patch. Signed-off-by: Penny Zheng Acked-by: Julien Grall --- v6 changes: -

[PATCH v6 4/9] xen: do not merge reserved pages in free_heap_pages()

2022-06-07 Thread Penny Zheng
The code in free_heap_pages() will try to merge pages with the successor/predecessor if pages are suitably aligned. So if the pages reserved are right next to the pages given to the heap allocator, free_heap_pages() will merge them, and give the reserved pages to heap allocator accidently as a

[PATCH v6 3/9] xen: update SUPPORT.md for static allocation

2022-06-07 Thread Penny Zheng
SUPPORT.md doesn't seem to explicitly say whether static memory is supported, so this commit updates SUPPORT.md to add feature static allocation tech preview for now. Signed-off-by: Penny Zheng Reviewed-by: Stefano Stabellini --- v6 changes: - use domain instead of sub-systems --- v5 changes: -

[PATCH v6 1/9] xen/arm: rename PGC_reserved to PGC_static

2022-06-07 Thread Penny Zheng
PGC_reserved could be ambiguous, and we have to tell what the pages are reserved for, so this commit intends to rename PGC_reserved to PGC_static, which clearly indicates the page is reserved for static memory. Signed-off-by: Penny Zheng --- v6 changes: - rename PGC_staticmem to PGC_static ---

[PATCH v6 2/9] xen: do not free reserved memory into heap

2022-06-07 Thread Penny Zheng
Pages used as guest RAM for static domain, shall be reserved to this domain only. So in case reserved pages being used for other purpose, users shall not free them back to heap, even when last ref gets dropped. free_staticmem_pages will be called by free_heap_pages in runtime for static domain

[PATCH v6 0/9] populate/unpopulate memory when domain on static allocation

2022-06-07 Thread Penny Zheng
Today when a domain unpopulates the memory on runtime, they will always hand the memory over to the heap allocator. And it will be a problem if it is a static domain. Pages used as guest RAM for static domain shall always be reserved to this domain only, and not be used for any other purposes, so

Re: [PATCH v2 1/3] x86/vmx: implement Bus Lock detection

2022-06-07 Thread Jan Beulich
On 03.06.2022 16:29, Roger Pau Monné wrote: > On Fri, Jun 03, 2022 at 02:16:47PM +0200, Jan Beulich wrote: >> On 26.05.2022 13:11, Roger Pau Monne wrote: >>> Add support for enabling Bus Lock Detection on Intel systems. Such >>> detection works by triggering a vmexit, which ought to be enough of

Re: memory overcomittment with sr-iov device assighment

2022-06-07 Thread Jan Beulich
On 07.06.2022 05:59, alex.nln...@proton.me wrote: > I looked into Xen documentation and also Xen wiki and I could't find a > definitive answer if Xen supports memory over-commitment when VMs use SR-IOV > device assignment (passthrough). Memory over-commitment I mean giving VMs > more RAM than

Re: [PATCH v2 1/3] x86/vmx: implement Bus Lock detection

2022-06-07 Thread Jan Beulich
On 06.06.2022 15:27, Andrew Cooper wrote: > On 26/05/2022 12:11, Roger Pau Monne wrote: >> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c >> index f08a00dcbb..476ab72463 100644 >> --- a/xen/arch/x86/hvm/vmx/vmx.c >> +++ b/xen/arch/x86/hvm/vmx/vmx.c >> @@ -4065,6 +4065,16 @@

Re: [XEN PATCH 1/4] build: xen/include: use if_changed

2022-06-07 Thread Jan Beulich
On 06.06.2022 15:39, Anthony PERARD wrote: > On Thu, Jun 02, 2022 at 11:11:15AM +0200, Jan Beulich wrote: >> On 01.06.2022 18:59, Anthony PERARD wrote: >>> Use "define" for the headers*_chk commands as otherwise the "#" >>> is interpreted as a comment and make can't find the end of >>>

Re: MOVING COMMUNITY CALL Call for agenda items for 9 June Community Call @ 1500 UTC

2022-06-07 Thread Jan Beulich
On 07.06.2022 04:17, Stefano Stabellini wrote: > # Rule 9.4 "An element of an object shall not be initialized more than once" > > Andrew was noting that "There's one pattern using range syntax to set a > default where this rule would be violated, but the code is far cleaner > to read." I'm