[xen-unstable test] 175987: tolerable FAIL - PUSHED

2023-01-20 Thread osstest service owner
flight 175987 xen-unstable real [real] flight 175993 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/175987/ http://logs.test-lab.xenproject.org/osstest/logs/175993/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd6

[PATCH] tools/symbols: drop asm/types.h inclusion

2023-01-20 Thread Jan Beulich
While this has been there forever, it's not clear to me what it was (thought to be) needed for. In fact, all three instances of the header already exclude their entire bodies when __ASSEMBLY__ was defined. Hence, with no other assembly files including this header, we can at the same time get rid of

[PATCH v2] x86/shadow: make iommu_snoop usage consistent with HAP's

2023-01-20 Thread Jan Beulich
First of all the variable is meaningful only when an IOMMU is in use for a guest. Qualify the check accordingly, like done elsewhere. Furthermore the controlling command line option is supposed to take effect on VT-d only. Since command line parsing happens before we know whether we're going to use

Re: [PATCH v5 4/5] xen/riscv: introduce early_printk basic stuff

2023-01-20 Thread Julien Grall
Hi, On 20/01/2023 00:48, Andrew Cooper wrote: On 19/01/2023 2:07 pm, Oleksii Kurochko wrote: diff --git a/xen/arch/riscv/early_printk.c b/xen/arch/riscv/early_printk.c new file mode 100644 index 00..6f590e712b --- /dev/null +++ b/xen/arch/riscv/early_printk.c @@ -0,0 +1,45 @@ +/* SPDX-L

Re: [PATCH v4 00/17] tools/xenstore: do some cleanup and fixes

2023-01-20 Thread Julien Grall
Hi Juergen, On 18/01/2023 09:49, Juergen Gross wrote: This is a first run of post-XSA patches which piled up during the development phase of all the recent Xenstore related XSA patches. This is a mixture of small fixes, enhancements and cleanups. Changes in V4: - reordered the patches a little

Re: [XEN v2 02/11] xen/arm: Use the correct format specifier

2023-01-20 Thread Julien Grall
Hi, On 19/01/2023 22:54, Stefano Stabellini wrote: On Tue, 17 Jan 2023, Ayan Kumar Halder wrote: 1. One should use 'PRIpaddr' to display 'paddr_t' variables. 2. One should use 'PRIx64' to display 'u64' in hex format. The current use of 'PRIpaddr' for printing PTE is buggy as this is not a physi

Re: [PATCH v2] x86/shadow: make iommu_snoop usage consistent with HAP's

2023-01-20 Thread Xenia Ragiadakou
On 1/20/23 10:44, Jan Beulich wrote: First of all the variable is meaningful only when an IOMMU is in use for a guest. Qualify the check accordingly, like done elsewhere. Furthermore the controlling command line option is supposed to take effect on VT-d only. Since command line parsing happens

Re: [PATCH v4 00/17] tools/xenstore: do some cleanup and fixes

2023-01-20 Thread Juergen Gross
On 20.01.23 10:25, Julien Grall wrote: Hi Juergen, On 18/01/2023 09:49, Juergen Gross wrote: This is a first run of post-XSA patches which piled up during the development phase of all the recent Xenstore related XSA patches. This is a mixture of small fixes, enhancements and cleanups. Changes

Re: [PATCH 1/3] xen/arm: Reduce redundant clear root pages when teardown p2m

2023-01-20 Thread Michal Orzel
Hi Henry, On 16/01/2023 02:58, Henry Wang wrote: > > > Currently, p2m for a domain will be teardown from two paths: > (1) The normal path when a domain is destroyed. > (2) The arch_domain_destroy() in the failure path of domain creation. > > When tearing down p2m from (1), the part to clear and

Re: [XEN v2 03/11] xen/arm: domain_build: Replace use of paddr_t in find_domU_holes()

2023-01-20 Thread Julien Grall
Hi, On 19/01/2023 23:02, Stefano Stabellini wrote: On Tue, 17 Jan 2023, Ayan Kumar Halder wrote: bankbase, banksize and bankend are used to hold values of type 'unsigned long long'. This can be represented as 'uint64_t' instead of 'paddr_t'. This will ensure consistency with allocate_static_mem

Re: [XEN v2 03/11] xen/arm: domain_build: Replace use of paddr_t in find_domU_holes()

2023-01-20 Thread Julien Grall
On 20/01/2023 09:48, Julien Grall wrote: Hi, On 19/01/2023 23:02, Stefano Stabellini wrote: On Tue, 17 Jan 2023, Ayan Kumar Halder wrote: bankbase, banksize and bankend are used to hold values of type 'unsigned long long'. This can be represented as 'uint64_t' instead of 'paddr_t'. This wil

Re: [PATCH 2/3] xen/arm: Defer GICv2 CPU interface mapping until the first access

2023-01-20 Thread Michal Orzel
Hi Henry, On 16/01/2023 02:58, Henry Wang wrote: > > > Currently, the mapping of the GICv2 CPU interface is created in > arch_domain_create(). This causes some troubles in populating and > freeing of the domain P2M pages pool. For example, a default 16 > P2M pages are required in p2m_init() to c

[PATCH v2 00/13] tools/xenstore: rework internal accounting

2023-01-20 Thread Juergen Gross
This series reworks the Xenstore internal accounting to use a uniform generic framework. It is adding some additional useful diagnostic information, like accounting trace and max. per-domain and global quota values seen. Changes in V2: - added patch 1 (leftover from previous series) - rebase Juer

[PATCH v2 01/13] tools/xenstore: don't allow creating too many nodes in a transaction

2023-01-20 Thread Juergen Gross
The accounting for the number of nodes of a domain in an active transaction is not working correctly, as it allows to create arbitrary number of nodes. The transaction will finally fail due to exceeding the number of nodes quota, but before closing the transaction an unprivileged guest could cause

[PATCH v2 02/13] tools/xenstore: manage per-transaction domain accounting data in an array

2023-01-20 Thread Juergen Gross
In order to prepare keeping accounting data in an array instead of using independent fields, switch the struct changed_domain accounting data to that scheme, for now only using an array with one element. In order to be able to extend this scheme add the needed indexing enum to xenstored_domain.h.

[PATCH v2 03/13] tools/xenstore: introduce accounting data array for per-domain values

2023-01-20 Thread Juergen Gross
Introduce the scheme of an accounting data array for per-domain accounting data and use it initially for the number of nodes owned by a domain. Make the accounting data type to be unsigned int, as no data is allowed to be negative at any time. Signed-off-by: Juergen Gross --- tools/xenstore/xen

[PATCH v2 04/13] tools/xenstore: add framework to commit accounting data on success only

2023-01-20 Thread Juergen Gross
Instead of modifying accounting data and undo those modifications in case of an error during further processing, add a framework for collecting the needed changes and commit them only when the whole operation has succeeded. This scheme can reuse large parts of the per transaction accounting. The c

[PATCH v2 06/13] tools/xenstore: add current connection to domain_memory_add() parameters

2023-01-20 Thread Juergen Gross
In order to enable switching memory accounting to the generic array based accounting, add the current connection to the parameters of domain_memory_add(). This requires to add the connection to some other functions, too. Signed-off-by: Juergen Gross --- tools/xenstore/xenstored_core.c | 28 ++

[PATCH v2 05/13] tools/xenstore: use accounting buffering for node accounting

2023-01-20 Thread Juergen Gross
Add the node accounting to the accounting information buffering in order to avoid having to undo it in case of failure. Signed-off-by: Juergen Gross --- tools/xenstore/xenstored_core.c | 21 ++--- tools/xenstore/xenstored_domain.h | 4 ++-- 2 files changed, 4 insertions(+), 21

[PATCH v2 07/13] tools/xenstore: use accounting data array for per-domain values

2023-01-20 Thread Juergen Gross
Add the accounting of per-domain usage of Xenstore memory, watches, and outstanding requests to the array based mechanism. Signed-off-by: Juergen Gross --- tools/xenstore/xenstored_core.c | 8 +-- tools/xenstore/xenstored_domain.c | 111 +++--- tools/xenstore/xenstore

[PATCH v2 12/13] tools/xenstore: use generic accounting for remaining quotas

2023-01-20 Thread Juergen Gross
The maxrequests, node size, number of node permissions, and path length quota are a little bit special, as they are either active in transactions only (maxrequests), or they are just per item instead of count values. Nevertheless being able to know the maximum number of those quota related values p

[PATCH v2 10/13] tools/xenstore: switch transaction accounting to generic accounting

2023-01-20 Thread Juergen Gross
As transaction accounting is active for unprivileged domains only, it can easily be added to the generic per-domain accounting. Signed-off-by: Juergen Gross --- tools/xenstore/xenstored_core.c| 3 +-- tools/xenstore/xenstored_core.h| 1 - tools/xenstore/xenstored_domain.c

[PATCH v2 13/13] tools/xenstore: switch quota management to be table based

2023-01-20 Thread Juergen Gross
Instead of having individual quota variables switch to a table based approach like the generic accounting. Include all the related data in the same table and add accessor functions. This enables to use the command line --quota parameter for setting all possible quota values, keeping the previous p

[PATCH v2 08/13] tools/xenstore: add accounting trace support

2023-01-20 Thread Juergen Gross
Add a new trace switch "acc" and the related trace calls. The "acc" switch is off per default. Signed-off-by: Juergen Gross --- tools/xenstore/xenstored_core.c | 2 +- tools/xenstore/xenstored_core.h | 1 + tools/xenstore/xenstored_domain.c | 10 ++ 3 files changed, 12 insertions(

[PATCH v2 09/13] tools/xenstore: add TDB access trace support

2023-01-20 Thread Juergen Gross
Add a new trace switch "tdb" and the related trace calls. The "tdb" switch is off per default. Signed-off-by: Juergen Gross --- tools/xenstore/xenstored_core.c| 8 +++- tools/xenstore/xenstored_core.h| 6 ++ tools/xenstore/xenstored_transaction.c | 7 ++- 3 files cha

[PATCH v2 11/13] tools/xenstore: remember global and per domain max accounting values

2023-01-20 Thread Juergen Gross
Add saving the maximum values of the different accounting data seen per domain and (for unprivileged domains) globally, and print those values via the xenstore-control quota command. Add a sub-command for resetting the global maximum values seen. This should help for a decision how to set the rela

Re: [XEN v2 04/11] xen/arm: Typecast the DT values into paddr_t

2023-01-20 Thread Julien Grall
Hi, I am answering to multiple e-mails at the same time. On 19/01/2023 23:34, Stefano Stabellini wrote: On Thu, 19 Jan 2023, Stefano Stabellini wrote: On Tue, 17 Jan 2023, Ayan Kumar Halder wrote: In future, we wish to support 32 bit physical address. However, one can only read u64 values fro

Re: [PATCH 3/3] xen/arm: Clean-up in p2m_init() and p2m_final_teardown()

2023-01-20 Thread Michal Orzel
Hi Henry, On 16/01/2023 02:58, Henry Wang wrote: > > > With the change in previous patch, the initial 16 pages in the P2M > pool is not necessary anymore. Drop them for code simplification. > > Also the call to p2m_teardown() from arch_domain_destroy() is not > necessary anymore since the movem

Re: [XEN v2 05/11] xen/arm: Use paddr_t instead of u64 for address/size

2023-01-20 Thread Julien Grall
Hi, On 17/01/2023 17:43, Ayan Kumar Halder wrote: One should now be able to use 'paddr_t' to represent address and size. Consequently, one should use 'PRIpaddr' as a format specifier for paddr_t. Signed-off-by: Ayan Kumar Halder --- Changes from - v1 - 1. Rebased the patch. xen/arch/arm/d

Re: [XEN v2 08/11] xen/arm: guest_walk: LPAE specific bits should be enclosed within "ifndef CONFIG_ARM_PA_32"

2023-01-20 Thread Julien Grall
Hi Stefano, On 19/01/2023 23:43, Stefano Stabellini wrote: On Tue, 17 Jan 2023, Ayan Kumar Halder wrote: In the subsequent patch, we introduce "CONFIG_ARM_PA_32" to support 32 bit physical addresses. Thus, the code specific to "Large Page Address Extension" (ie LPAE) should be enclosed within "

Re: [XEN v2 10/11] xen/arm: Restrict zeroeth_table_offset for ARM_64

2023-01-20 Thread Julien Grall
Hi, Title: For me "restrict" means that the code macro cannot be used if !ARM_64. But this is not the case here. On 20/01/2023 00:19, Stefano Stabellini wrote: On Tue, 17 Jan 2023, Ayan Kumar Halder wrote: zeroeth_table_offset is not accessed by ARM_32. I don't quite understand this senten

Re: [XEN v2 11/11] xen/arm: p2m: Enable support for 32bit IPA

2023-01-20 Thread Julien Grall
Hi Ayan, On 17/01/2023 17:43, Ayan Kumar Halder wrote: VTCR.T0SZ should be set as 0x20 to support 32bit IPA. Refer ARM DDI 0487I.a ID081822, G8-9824, G8.2.171, VTCR, "Virtualization Translation Control Register" for the bit descriptions. Signed-off-by: Ayan Kumar Halder --- Changes from - v1

Re: [XEN v2 02/11] xen/arm: Use the correct format specifier

2023-01-20 Thread Ayan Kumar Halder
On 20/01/2023 09:32, Julien Grall wrote: Hi, Hi Julien, On 19/01/2023 22:54, Stefano Stabellini wrote: On Tue, 17 Jan 2023, Ayan Kumar Halder wrote: 1. One should use 'PRIpaddr' to display 'paddr_t' variables. 2. One should use 'PRIx64' to display 'u64' in hex format. The current use of 'P

Re: [PATCH] tools/symbols: drop asm/types.h inclusion

2023-01-20 Thread Andrew Cooper
On 20/01/2023 8:40 am, Jan Beulich wrote: > While this has been there forever, it's not clear to me what it was > (thought to be) needed for. In fact, all three instances of the header > already exclude their entire bodies when __ASSEMBLY__ was defined. > Hence, with no other assembly files includi

Re: [PATCH] tools/symbols: drop asm/types.h inclusion

2023-01-20 Thread Julien Grall
Hi Jan, On 20/01/2023 08:40, Jan Beulich wrote: While this has been there forever, it's not clear to me what it was (thought to be) needed for. asm/types.h used to be directly included in assembly x86 file. This was dropped by commit 3f76e83c4cf6 "x86/entry: drop unused header inclusions".

[SeaBIOS PATCH] xen: require Xen info structure at 0x1000 to detect Xen

2023-01-20 Thread David Woodhouse
From: David Woodhouse When running under Xen, hvmloader places a table at 0x1000 with the e820 information and BIOS tables. If this isn't present, SeaBIOS will currently panic. We now have support for running Xen guests natively in QEMU/KVM, which boots SeaBIOS directly instead of via hvmloader

[PATCH] x86/shadow: Drop dubious lastpage diagnostic

2023-01-20 Thread Andrew Cooper
This is a global variable (actually 3, one per GUEST_PAGING_LEVEL), operated on using atomics only (with no regard to what else shares the same cacheline), which emits a diagnostic (in debug builds only) without changing any program behaviour. Based on read-only p2m types including logdirty, this

Re: [PATCH v5 1/5] xen/include: Change to

2023-01-20 Thread Oleksii
On Thu, 2023-01-19 at 16:43 +0100, Jan Beulich wrote: > On 19.01.2023 15:29, Jan Beulich wrote: > > On 19.01.2023 15:07, Oleksii Kurochko wrote: > > > In the patch "include/types: move stddef.h-kind types to common > > > header" [1] size_t was moved from to > > > so early_printk should be updated

Re: [PATCH 0/6] tools: Switch to non-truncating XENVER_* ops

2023-01-20 Thread Andrew Cooper
On 19/01/2023 6:20 am, Juergen Gross wrote: > On 17.01.23 14:53, Andrew Cooper wrote: >> This is the tools side of the Xen series posted previously. >> >> With this, a Xen built with long strings can be retrieved: >> >>    # xl info >>    ... >>    xen_version    : 4.18-unstable+REALLY LONG

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

2023-01-20 Thread osstest service owner
flight 175995 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175995/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Re: [XEN][RFC PATCH v4 01/16] xen/arm/device: Remove __init from function type

2023-01-20 Thread Michal Orzel
Hi Vikram, On 07/12/2022 07:15, Vikram Garhwal wrote: > > > Change function type of following function to access during runtime: > 1. map_irq_to_domain() > 2. handle_device_interrupt() > 3. map_range_to_domain() > 4. unflatten_dt_node() > 5. unflatten_device_tree() If you do

Re: [XEN][RFC PATCH v4 02/16] xen/arm: Add CONFIG_OVERLAY_DTB

2023-01-20 Thread Michal Orzel
Hi Vikram, On 07/12/2022 07:15, Vikram Garhwal wrote: > > > Introduce a config option where the user can enable support for > adding/removing > device tree nodes using a device tree binary overlay. > > Signed-off-by: Vikram Garhwal > --- > xen/arch/arm/Kconfig | 5 + > 1 file changed, 5

Re: [XEN][RFC PATCH v4 04/16] libfdt: overlay: change overlay_get_target()

2023-01-20 Thread Michal Orzel
Hi Vikram, On 07/12/2022 07:15, Vikram Garhwal wrote: > > > Rename overlay_get_target() to fdt_overlay_target_offset() and remove static > function type. > > This is done to get the target path for the overlay nodes which is very useful > in many cases. For example, Xen hypervisor needs it when

Re: [XEN][RFC PATCH v4 05/16] xen/device-tree: Add _dt_find_node_by_path() to find nodes in device tree

2023-01-20 Thread Michal Orzel
Hi Vikram, On 07/12/2022 07:15, Vikram Garhwal wrote: > > > Add _dt_find_by_path() to find a matching node with path for a dt_device_node. Here and in commit title you say _dt_find_by_path but you introduce device_tree_find_node_by_path. Also, it would be beneficial to state why such change is

Re: [PATCH] x86/shadow: Drop dubious lastpage diagnostic

2023-01-20 Thread Jan Beulich
On 20.01.2023 12:45, Andrew Cooper wrote: > This is a global variable (actually 3, one per GUEST_PAGING_LEVEL), operated > on using atomics only (with no regard to what else shares the same cacheline), > which emits a diagnostic (in debug builds only) without changing any program > behaviour. > >

Re: [PATCH] tools/symbols: drop asm/types.h inclusion

2023-01-20 Thread Jan Beulich
On 20.01.2023 12:24, Julien Grall wrote: > On 20/01/2023 08:40, Jan Beulich wrote: >> While this has been there forever, it's not clear to me what it was >> (thought to be) needed for. > > asm/types.h used to be directly included in assembly x86 file. This was > dropped by commit 3f76e83c4cf6 "x8

Re: [PATCH v2 2/7] x86/boot: Delay sev_verify_cbit() a bit

2023-01-20 Thread Jörg Rödel
On Thu, Jan 19, 2023 at 02:18:47PM +0100, Borislav Petkov wrote: > So, can we do that C-bit verification once on the BSP, *in C* which would be a > lot easier, and be done with it? > > Once it is verified there, the bit is the same on all APs so all good. Yes, I think this is safe to do. The page

[qemu-mainline test] 175991: regressions - FAIL

2023-01-20 Thread osstest service owner
flight 175991 qemu-mainline real [real] flight 175996 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/175991/ http://logs.test-lab.xenproject.org/osstest/logs/175996/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

[XEN PATCH] build: fix building flask headers before descending in flask/ss/

2023-01-20 Thread Anthony PERARD
Unfortunatly, adding prerequisite to "$(obj)/ss/built_in.o" doesn't work because we have "$(obj)/%/built_in.o: $(obj)/% ;" in Rules.mk. So, make is allow to try to build objects in "xsm/flask/ss/" before generating the headers. Adding a prerequisite on "$(obj)/ss" instead will fix the issue has th

Re: [PATCH] tools/symbols: drop asm/types.h inclusion

2023-01-20 Thread Julien Grall
On 20/01/2023 13:19, Jan Beulich wrote: On 20.01.2023 12:24, Julien Grall wrote: On 20/01/2023 08:40, Jan Beulich wrote: While this has been there forever, it's not clear to me what it was (thought to be) needed for. asm/types.h used to be directly included in assembly x86 file. This was d

Re: [PATCH v2 0/3] xen/arm: Frametable hardening and config.h cleanup

2023-01-20 Thread Julien Grall
Hi, On 17/01/2023 11:43, Michal Orzel wrote: The first patch fixes a bug due to incorrect DIRECTMAP_SIZE calculation. The second patch removes unused macro FRAMETABLE_VIRT_END. The third patch hardens the setup_frametable_mappings by adding a sanity check for the size of struct page_info and c

Re: [PATCH v2] x86/hotplug: Do not put offline vCPUs in mwait idle state

2023-01-20 Thread Srivatsa S. Bhat
Hi Igor and Thomas, Thank you for your review! On 1/19/23 1:12 PM, Thomas Gleixner wrote: > On Mon, Jan 16 2023 at 15:55, Igor Mammedov wrote: >> "Srivatsa S. Bhat" wrote: >>> Fix this by preventing the use of mwait idle state in the vCPU offline >>> play_dead() path for any hypervisor, even i

Re: [PATCH] x86/shadow: Drop dubious lastpage diagnostic

2023-01-20 Thread Andrew Cooper
On 20/01/2023 1:10 pm, Jan Beulich wrote: > On 20.01.2023 12:45, Andrew Cooper wrote: >> This is a global variable (actually 3, one per GUEST_PAGING_LEVEL), operated >> on using atomics only (with no regard to what else shares the same >> cacheline), >> which emits a diagnostic (in debug builds on

Re: [XEN PATCH] build: fix building flask headers before descending in flask/ss/

2023-01-20 Thread Daniel P. Smith
On 1/20/23 08:36, Anthony PERARD wrote: Unfortunatly, adding prerequisite to "$(obj)/ss/built_in.o" doesn't work because we have "$(obj)/%/built_in.o: $(obj)/% ;" in Rules.mk. So, make is allow to try to build objects in "xsm/flask/ss/" before generating the headers. Adding a prerequisite on "$(

Re: [XEN PATCH] build: fix building flask headers before descending in flask/ss/

2023-01-20 Thread Jan Beulich
On 20.01.2023 14:36, Anthony PERARD wrote: > Unfortunatly, adding prerequisite to "$(obj)/ss/built_in.o" doesn't > work because we have "$(obj)/%/built_in.o: $(obj)/% ;" in Rules.mk. > So, make is allow to try to build objects in "xsm/flask/ss/" before > generating the headers. > > Adding a prereq

Re: [PATCH] x86/shadow: Drop dubious lastpage diagnostic

2023-01-20 Thread Jan Beulich
On 20.01.2023 15:10, Andrew Cooper wrote: > On 20/01/2023 1:10 pm, Jan Beulich wrote: >> On 20.01.2023 12:45, Andrew Cooper wrote: >>> This is a global variable (actually 3, one per GUEST_PAGING_LEVEL), operated >>> on using atomics only (with no regard to what else shares the same >>> cacheline),

Re: [XEN PATCH] build: fix building flask headers before descending in flask/ss/

2023-01-20 Thread Anthony PERARD
On Fri, Jan 20, 2023 at 03:16:51PM +0100, Jan Beulich wrote: > On 20.01.2023 14:36, Anthony PERARD wrote: > > Unfortunatly, adding prerequisite to "$(obj)/ss/built_in.o" doesn't > > work because we have "$(obj)/%/built_in.o: $(obj)/% ;" in Rules.mk. > > So, make is allow to try to build objects in

Re: [PATCH] x86/shadow: Drop dubious lastpage diagnostic

2023-01-20 Thread Andrew Cooper
On 20/01/2023 2:20 pm, Jan Beulich wrote: > On 20.01.2023 15:10, Andrew Cooper wrote: >> On 20/01/2023 1:10 pm, Jan Beulich wrote: >>> On 20.01.2023 12:45, Andrew Cooper wrote: This is a global variable (actually 3, one per GUEST_PAGING_LEVEL), operated on using atomics only (with n

Re: [XEN v2 02/11] xen/arm: Use the correct format specifier

2023-01-20 Thread Michal Orzel
Hello, On 20/01/2023 10:32, Julien Grall wrote: > > > Hi, > > On 19/01/2023 22:54, Stefano Stabellini wrote: >> On Tue, 17 Jan 2023, Ayan Kumar Halder wrote: >>> 1. One should use 'PRIpaddr' to display 'paddr_t' variables. >>> 2. One should use 'PRIx64' to display 'u64' in hex format. The curre

Re: [PATCH] x86/shadow: Drop dubious lastpage diagnostic

2023-01-20 Thread Andrew Cooper
On 20/01/2023 2:39 pm, Andrew Cooper wrote: > On 20/01/2023 2:20 pm, Jan Beulich wrote: >> On 20.01.2023 15:10, Andrew Cooper wrote: >>> On 20/01/2023 1:10 pm, Jan Beulich wrote: On 20.01.2023 12:45, Andrew Cooper wrote: > This is a global variable (actually 3, one per GUEST_PAGING_LEVEL),

[PATCH v1 00/14] RISCV basic exception handling implementation

2023-01-20 Thread Oleksii Kurochko
The patch series is based on another one [Basic early_printk and smoke test implementation] which hasn't been commited yet. The patch series provides a basic implementation of exception handling. It can do only basic things such as decode a cause of an exception, save/restore registers and execute

[PATCH v1 02/14] xen/riscv: add header

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/asm.h | 54 1 file changed, 54 insertions(+) create mode 100644 xen/arch/riscv/include/asm/asm.h diff --git a/xen/arch/riscv/include/asm/asm.h b/xen/arch/riscv/include/asm/asm.h new file mode 100644

[PATCH v1 03/14] xen/riscv: add

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/riscv_encoding.h | 945 1 file changed, 945 insertions(+) create mode 100644 xen/arch/riscv/include/asm/riscv_encoding.h diff --git a/xen/arch/riscv/include/asm/riscv_encoding.h b/xen/arch/riscv/include/asm/ris

[PATCH v1 08/14] xen/riscv: introduce decode_cause() stuff

2023-01-20 Thread Oleksii Kurochko
The patch introduces stuff needed to decode a reason of an exception. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/traps.c | 88 ++ 1 file changed, 88 insertions(+) diff --git a/xen/arch/riscv/traps.c b/xen/arch/riscv/traps.c index 3201b851ef..dd64f

[PATCH v1 05/14] xen/riscv: add early_printk_hnum() function

2023-01-20 Thread Oleksii Kurochko
Add ability to print hex number. It might be useful to print register value as debug information in BUG(), WARN(), etc... Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/early_printk.c | 39 +++ xen/arch/riscv/include/asm/early_printk.h | 2 ++ 2 files changed

[PATCH v1 13/14] xen/riscv: test basic handling stuff

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/setup.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 174e134c93..35ab9d25c6 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -1,6 +

[PATCH v1 01/14] xen/riscv: add _zicsr to CFLAGS

2023-01-20 Thread Oleksii Kurochko
Work with some registers requires csr command which is part of Zicsr. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/arch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index 012dc677c3..95b41d9f3e 100644 --- a/xen/arch/

[PATCH v1 09/14] xen/riscv: introduce do_unexpected_trap()

2023-01-20 Thread Oleksii Kurochko
The patch introduces the function the purpose of which is to print a cause of an exception and call "wfi" instruction. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/traps.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/xen/arch/riscv/traps.c b/xen/arch/r

[PATCH v1 06/14] xen/riscv: introduce exception context

2023-01-20 Thread Oleksii Kurochko
The patch introduces a set of registers which should be saved to and restored from a stack after an exception occurs and a set of defines which will be used during exception context saving/restoring. Originally header was introduced in the patch series from Bobby so mostly it was re-used and remo

[PATCH v1 07/14] xen/riscv: introduce exception handlers implementation

2023-01-20 Thread Oleksii Kurochko
The patch introduces an implementation of basic exception handlers: - to save/restore context - to handle an exception itself. The handler calls wait_for_interrupt now, nothing more. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/Makefile| 2 + xen/arch/riscv/entry.S

[PATCH v1 04/14] xen/riscv: add header

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/csr.h | 82 1 file changed, 82 insertions(+) create mode 100644 xen/arch/riscv/include/asm/csr.h diff --git a/xen/arch/riscv/include/asm/csr.h b/xen/arch/riscv/include/asm/csr.h new file mode 100644

[PATCH v1 12/14] xen/riscv: introduce an implementation of macros from

2023-01-20 Thread Oleksii Kurochko
The patch introduces macros: BUG(), WARN(), run_in_exception(), assert_failed. The implementation uses "ebreak" instruction in combination with diffrent bug frame tables (for each type) which contains useful information. Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/include/asm/bug.h | 120

[PATCH v1 10/14] xen/riscv: mask all interrupts

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/riscv64/head.S | 5 + 1 file changed, 5 insertions(+) diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S index d444dd8aad..ffd95f9f89 100644 --- a/xen/arch/riscv/riscv64/head.S +++ b/xen/arch/riscv/riscv64/head.S @@ -

[PATCH v1 11/14] xen/riscv: introduce setup_trap_handler()

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- xen/arch/riscv/setup.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index d09ffe1454..174e134c93 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -1,16 +1,27 @@ #include #

[PATCH v1 14/14] automation: add smoke test to verify macros from bug.h

2023-01-20 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- automation/scripts/qemu-smoke-riscv64.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automation/scripts/qemu-smoke-riscv64.sh b/automation/scripts/qemu-smoke-riscv64.sh index e0f06360bc..e7cc7f1442 100755 --- a/automation/scripts/qemu-smoke-riscv64.s

Re: [XEN v2 02/11] xen/arm: Use the correct format specifier

2023-01-20 Thread Julien Grall
On 20/01/2023 14:40, Michal Orzel wrote: Hello, Hi, On 20/01/2023 10:32, Julien Grall wrote: Hi, On 19/01/2023 22:54, Stefano Stabellini wrote: On Tue, 17 Jan 2023, Ayan Kumar Halder wrote: 1. One should use 'PRIpaddr' to display 'paddr_t' variables. 2. One should use 'PRIx64' to di

Re: [PATCH 2/2] x86/shadow: mark more of sh_page_fault() HVM-only

2023-01-20 Thread Andrew Cooper
On 19/01/2023 1:19 pm, Jan Beulich wrote: > Neither p2m_mmio_dm nor the types p2m_is_readonly() checks for are > applicable to PV; specifically get_gfn() won't ever return such a type > for PV domains. Adjacent to those checks is yet another is_hvm_...() > one. With that block made conditional, ano

Re: [PATCH v1 01/14] xen/riscv: add _zicsr to CFLAGS

2023-01-20 Thread Andrew Cooper
On 20/01/2023 2:59 pm, Oleksii Kurochko wrote: > Work with some registers requires csr command which is part of > Zicsr. > > Signed-off-by: Oleksii Kurochko > --- > xen/arch/riscv/arch.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/arch/riscv/arch.mk b/xen/arch/ri

Re: [PATCH v1 02/14] xen/riscv: add header

2023-01-20 Thread Andrew Cooper
On 20/01/2023 2:59 pm, Oleksii Kurochko wrote: > Signed-off-by: Oleksii Kurochko There's some stuff in here which is not RISCV-specific.  We really want to dedup with the other architectures and move into common. ~Andrew

Re: [PATCH v2] x86/hotplug: Do not put offline vCPUs in mwait idle state

2023-01-20 Thread Igor Mammedov
On Fri, 20 Jan 2023 05:55:11 -0800 "Srivatsa S. Bhat" wrote: > Hi Igor and Thomas, > > Thank you for your review! > > On 1/19/23 1:12 PM, Thomas Gleixner wrote: > > On Mon, Jan 16 2023 at 15:55, Igor Mammedov wrote: > >> "Srivatsa S. Bhat" wrote: > >>> Fix this by preventing the use of mwa

Re: [PATCH v1 05/14] xen/riscv: add early_printk_hnum() function

2023-01-20 Thread Andrew Cooper
On 20/01/2023 2:59 pm, Oleksii Kurochko wrote: > Add ability to print hex number. > It might be useful to print register value as debug information > in BUG(), WARN(), etc... > > Signed-off-by: Oleksii Kurochko I think it would be better to get s(n)printf() working than to take these.  We're goin

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

2023-01-20 Thread osstest service owner
flight 175997 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175997/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Re: [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-20 Thread Igor Mammedov
On Tue, 17 Jan 2023 09:43:52 -0500 Chuck Zmudzinski wrote: > On 1/17/2023 5:35 AM, Igor Mammedov wrote: > > On Mon, 16 Jan 2023 13:00:53 -0500 > > Chuck Zmudzinski wrote: > > > > > On 1/16/23 10:33, Igor Mammedov wrote: > > > > On Fri, 13 Jan 2023 16:31:26 -0500 > > > > Chuck Zmudzinski wro

Re: [PATCH v1 06/14] xen/riscv: introduce exception context

2023-01-20 Thread Andrew Cooper
On 20/01/2023 2:59 pm, Oleksii Kurochko wrote: > diff --git a/xen/arch/riscv/include/asm/processor.h > b/xen/arch/riscv/include/asm/processor.h > new file mode 100644 > index 00..5898a09ce6 > --- /dev/null > +++ b/xen/arch/riscv/include/asm/processor.h > @@ -0,0 +1,114 @@ > +/* SPDX-Licens

[linux-linus test] 175992: regressions - FAIL

2023-01-20 Thread osstest service owner
flight 175992 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/175992/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-examine 8 reboot fail REGR. vs. 173462 test-arm64-arm64-xl

Re: [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-20 Thread Igor Mammedov
On Tue, 17 Jan 2023 09:50:23 -0500 Chuck Zmudzinski wrote: > On 1/17/2023 5:35 AM, Igor Mammedov wrote: > > On Mon, 16 Jan 2023 13:00:53 -0500 > > Chuck Zmudzinski wrote: > > > > > On 1/16/23 10:33, Igor Mammedov wrote: > > > > On Fri, 13 Jan 2023 16:31:26 -0500 > > > > Chuck Zmudzinski wro

Re: [XEN v2 02/11] xen/arm: Use the correct format specifier

2023-01-20 Thread Michal Orzel
Hi Julien, On 20/01/2023 16:09, Julien Grall wrote: > > > On 20/01/2023 14:40, Michal Orzel wrote: >> Hello, > > Hi, > >> >> On 20/01/2023 10:32, Julien Grall wrote: >>> >>> >>> Hi, >>> >>> On 19/01/2023 22:54, Stefano Stabellini wrote: On Tue, 17 Jan 2023, Ayan Kumar Halder wrote: >

Re: [XEN v2 10/11] xen/arm: Restrict zeroeth_table_offset for ARM_64

2023-01-20 Thread Stefano Stabellini
On Fri, 20 Jan 2023, Julien Grall wrote: > > > #define zeroeth_table_offset(va) > > > TABLE_OFFSET(zeroeth_linear_offset(va)) > > > +#else > > > +#define zeroeth_table_offset(va) 0 > > > > Rather than 0 it might be better to have 32, hence zeroing the input > > address > I don't understand why

Re: [PATCH v8] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-20 Thread Stefano Stabellini
On Tue, 17 Jan 2023, Chuck Zmudzinski wrote: > On 1/17/2023 6:04 AM, Igor Mammedov wrote: > > On Mon, 16 Jan 2023 13:00:53 -0500 > > Chuck Zmudzinski wrote: > > > > > On 1/16/23 10:33, Igor Mammedov wrote: > > > > On Fri, 13 Jan 2023 16:31:26 -0500 > > > > Chuck Zmudzinski wrote: > > > > > > >

Re: [PATCH v2 1/9] x86/shadow: replace sh_reset_l3_up_pointers()

2023-01-20 Thread George Dunlap
On Wed, Jan 11, 2023 at 1:52 PM Jan Beulich wrote: > Rather than doing a separate hash walk (and then even using the vCPU > variant, which is to go away), do the up-pointer-clearing right in > sh_unpin(), as an alternative to the (now further limited) enlisting on > a "free floating" list fragmen

[ovmf test] 176000: all pass - PUSHED

2023-01-20 Thread osstest service owner
flight 176000 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/176000/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf bf5678b5802685e07583e3c7ec56d883cbdd5da3 baseline version: ovmf 51411435d559c55eaf38c

[xen-unstable test] 175994: tolerable FAIL

2023-01-20 Thread osstest service owner
flight 175994 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/175994/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-libvirt 8 xen-boot fail pass in 175987 test-amd64-amd64-xl-qemuu-debian

Re: [PATCH v2 9/9] x86/shadow: harden shadow_size()

2023-01-20 Thread Andrew Cooper
On 18/01/2023 2:13 pm, Jan Beulich wrote: > On 17.01.2023 20:13, Andrew Cooper wrote: >> On 12/01/2023 10:42 am, Jan Beulich wrote: >>> On 12.01.2023 11:31, Andrew Cooper wrote: On 12/01/2023 9:47 am, Jan Beulich wrote: > On 12.01.2023 00:15, Andrew Cooper wrote: >> On 11/01/2023 1:57

Re: [PATCH RFC 07/10] domain: map/unmap GADDR based shared guest areas

2023-01-20 Thread Andrew Cooper
On 18/01/2023 9:59 am, Jan Beulich wrote: > On 17.01.2023 23:20, Andrew Cooper wrote: >> On 24/11/2022 9:29 pm, Julien Grall wrote: >>> On 19/10/2022 09:43, Jan Beulich wrote: The registration by virtual/linear address has downsides: At least on x86 the access is expensive for HVM/PVH dom

Re: [XEN v2 02/11] xen/arm: Use the correct format specifier

2023-01-20 Thread Julien Grall
On 20/01/2023 16:03, Michal Orzel wrote: Hi Julien, Hi Michal, On 20/01/2023 16:09, Julien Grall wrote: On 20/01/2023 14:40, Michal Orzel wrote: Hello, Hi, On 20/01/2023 10:32, Julien Grall wrote: Hi, On 19/01/2023 22:54, Stefano Stabellini wrote: On Tue, 17 Jan 2023, Ayan K

Re: [XEN v2 02/11] xen/arm: Use the correct format specifier

2023-01-20 Thread Ayan Kumar Halder
Hi Julien/Michal, On 20/01/2023 17:49, Julien Grall wrote: On 20/01/2023 16:03, Michal Orzel wrote: Hi Julien, Hi Michal, On 20/01/2023 16:09, Julien Grall wrote: On 20/01/2023 14:40, Michal Orzel wrote: Hello, Hi, On 20/01/2023 10:32, Julien Grall wrote: Hi, On 19/01/2023 2

Re: [PATCH RFC 07/10] domain: map/unmap GADDR based shared guest areas

2023-01-20 Thread Andrew Cooper
On 18/01/2023 9:55 am, Jan Beulich wrote: > On 17.01.2023 23:04, Andrew Cooper wrote: >> On 19/10/2022 8:43 am, Jan Beulich wrote: >>> The registration by virtual/linear address has downsides: At least on >>> x86 the access is expensive for HVM/PVH domains. Furthermore for 64-bit >>> PV domains the

Re: [XEN PATCH v4 1/3] build: include/compat, remove typedefs handling

2023-01-20 Thread Andrew Cooper
On 19/01/2023 3:22 pm, Anthony PERARD wrote: > Partial revert of c93bd0e6ea2a ("tmem: fix 32-on-64 support") > Since c492e19fdd05 ("xen: remove tmem from hypervisor"), this code > isn't used anymore. > > Signed-off-by: Anthony PERARD Acked-by: Andrew Cooper

Re: [XEN PATCH v4 2/3] build: replace get-fields.sh by a python script

2023-01-20 Thread Andrew Cooper
On 19/01/2023 3:22 pm, Anthony PERARD wrote: > The get-fields.sh which generate all the include/compat/.xlat/*.h > headers is quite slow. It takes for example nearly 3 seconds to > generate platform.h on a recent machine, or 2.3 seconds for memory.h. > > Rewriting the mix of shell/sed/python into a

Re: [XEN PATCH v4 3/3] build: compat-xlat-header.py: optimisation to search for just '{' instead of [{}]

2023-01-20 Thread Andrew Cooper
On 19/01/2023 3:22 pm, Anthony PERARD wrote: > `fields` and `extrafields` always all the parts of a sub-struct, so > when there is '}', there is always a '{' before it. Also, both are > lists. > > Signed-off-by: Anthony PERARD > --- > xen/tools/compat-xlat-header.py | 4 ++-- > 1 file changed, 2

  1   2   >