Re: [PATCH v2 18/18] tools/xenstore: add nocopy flag to node read functions

2023-07-18 Thread Juergen Gross
On 18.07.23 23:35, Julien Grall wrote: Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: Today when reading a node from the data base through read_node(), the node data is copied in order to avoid modifying the data base when preparing a node update, as otherwise an error might result in an

Re: [PATCH v3 1/8] common: move a few macros out of xen/lib.h

2023-07-18 Thread Jan Beulich
On 18.07.2023 21:49, Shawn Anastasio wrote: > On 7/10/23 3:51 AM, Jan Beulich wrote: >> --- /dev/null >> +++ b/xen/include/xen/macros.h >> @@ -0,0 +1,34 @@ > > Should there be an SPDX header here? Probably, but I wouldn't know which version to use, since lib.h doesn't have one either. Not putting

Re: [PATCH] docs/xen-tscmode: remove mention of numeric tsc_mode= values

2023-07-18 Thread Jan Beulich
On 18.07.2023 22:58, Elliott Mitchell wrote: > On Fri, Jul 14, 2023 at 09:21:59AM +0200, Jan Beulich wrote: >> On 14.07.2023 05:44, Elliott Mitchell wrote: >>> On Fri, Jul 14, 2023 at 03:24:59AM +0200, Marek Marczykowski-Górecki wrote: On Thu, Jul 13, 2023 at 05:16:40PM -0700, Elliott Mitchell

Re: [XEN PATCH] x86/msr: Allow hardware domain to read package C-state residency counters

2023-07-18 Thread Jan Beulich
On 19.07.2023 01:27, Simon Gaiser wrote: > Andrew Cooper: >> On 18/07/2023 2:17 pm, Simon Gaiser wrote: >>> Since it's limited to the hardware domain it should be safe and it's >>> very useful to have access to this directly in dom0 when debugging power >>> related things for example S0ix. >> >> Yo

Re: [XEN PATCH] x86/msr: Allow hardware domain to read package C-state residency counters

2023-07-18 Thread Jan Beulich
On 19.07.2023 03:17, Marek Marczykowski-Górecki wrote: > On Wed, Jul 19, 2023 at 12:38:39AM +0200, Simon Gaiser wrote: >> Jan Beulich: >>> On 18.07.2023 15:17, Simon Gaiser wrote: --- a/xen/arch/x86/pv/emul-priv-op.c +++ b/xen/arch/x86/pv/emul-priv-op.c @@ -965,6 +965,20 @@ static in

Re: [PATCH v3 3/3] x86: Add Kconfig option to require NX bit support

2023-07-18 Thread Jan Beulich
On 18.07.2023 15:19, Jan Beulich wrote: > On 29.06.2023 14:17, Alejandro Vallejo wrote: >> --- a/xen/arch/x86/boot/head.S >> +++ b/xen/arch/x86/boot/head.S >> @@ -123,6 +123,7 @@ multiboot2_header: >> .Lbad_ldr_nih: .asciz "ERR: EFI ImageHandle is not provided by bootloader!" >> .Lbad_efi_msg: .a

Re: [PATCH v2 14/18] tools/xenstore: move copying of node data out of db_fetch()

2023-07-18 Thread Juergen Gross
On 18.07.23 23:10, Julien Grall wrote: Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: Today the node data is copied in db_fetch() on each data base read in order to avoid accidental data base modifications when working on a node. read_node() is the only caller of db_fetch() which isn't

Re: [PATCH v2 11/18] tools/xenstore: drop use of tdb

2023-07-18 Thread Juergen Gross
On 18.07.23 23:00, Julien Grall wrote: Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: -    return (struct xs_tdb_record_hdr *)data.dptr; +    *size = sizeof(*hdr) + hdr->num_perms * sizeof(hdr->perms[0]) + +    hdr->datalen + hdr->childlen; + +    p = talloc_size(NULL, *size); +    i

Re: [PATCH v2 10/18] tools/xenstore: add hashtable_replace() function

2023-07-18 Thread Juergen Gross
On 18.07.23 22:50, Julien Grall wrote: Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: For an effective way to replace a hashtable entry add a new function hashtable_replace(). While at it let hashtable_add() fail if an entry with the specified key does already exist. This seems to be

[libvirt test] 181868: tolerable all pass - PUSHED

2023-07-18 Thread osstest service owner
flight 181868 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/181868/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 181836 test-armhf-armhf-libvirt-qcow2 15 saveres

Re: [XEN PATCH] x86/msr: Allow hardware domain to read package C-state residency counters

2023-07-18 Thread Marek Marczykowski-Górecki
On Wed, Jul 19, 2023 at 12:38:39AM +0200, Simon Gaiser wrote: > Jan Beulich: > > On 18.07.2023 15:17, Simon Gaiser wrote: > >> --- a/xen/arch/x86/pv/emul-priv-op.c > >> +++ b/xen/arch/x86/pv/emul-priv-op.c > >> @@ -965,6 +965,20 @@ static int cf_check read_msr( > >> *val = 0; > >>

Re: [PATCH v3 1/3] xen/riscv: add SPDX tag to config.h

2023-07-18 Thread Alistair Francis
On Tue, Jul 18, 2023 at 12:41 AM Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko Reviewed-by: Alistair Francis Alistair > --- > Changes in V3: > - new patch > --- > xen/arch/riscv/include/asm/config.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/xen/arch/riscv/incl

[qemu-upstream-4.17-testing test] 181865: regressions - FAIL

2023-07-18 Thread osstest service owner
flight 181865 qemu-upstream-4.17-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/181865/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ws16-amd64 7 xen-install fail REGR. vs. 175008 buil

Re: [XEN PATCH] x86/msr: Allow hardware domain to read package C-state residency counters

2023-07-18 Thread Simon Gaiser
Andrew Cooper: > On 18/07/2023 2:17 pm, Simon Gaiser wrote: >> Since it's limited to the hardware domain it should be safe and it's >> very useful to have access to this directly in dom0 when debugging power >> related things for example S0ix. > > You need a SoB. Yeah, sorry. > But, this is an a

Re: [XEN PATCH] x86/msr: Allow hardware domain to read package C-state residency counters

2023-07-18 Thread Simon Gaiser
Jan Beulich: > On 18.07.2023 15:17, Simon Gaiser wrote: >> --- a/xen/arch/x86/pv/emul-priv-op.c >> +++ b/xen/arch/x86/pv/emul-priv-op.c >> @@ -965,6 +965,20 @@ static int cf_check read_msr( >> *val = 0; >> return X86EMUL_OKAY; >> >> +case MSR_PKG_C2_RESIDENCY: >> +case M

Re: U-Boot on XEN - dcache off

2023-07-18 Thread Julien Grall
Hi, On 17/07/2023 16:31, Ayan Kumar Halder wrote: + xen-devel (Since the question is related to Xen on Arm in general). On 14/07/2023 15:14, Michal Simek wrote: +xen On 7/14/23 16:11, Michal Simek wrote: Hi Stefano, I am playing with running u-boot on the top of xen (xenguest_arm64_defconfi

[linux-linus test] 181857: regressions - FAIL

2023-07-18 Thread osstest service owner
flight 181857 linux-linus real [real] flight 181885 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/181857/ http://logs.test-lab.xenproject.org/osstest/logs/181885/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run

Re: [XEN PATCH] x86/hpet: Disable legacy replacement mode after IRQ test if not needed

2023-07-18 Thread Simon Gaiser
Roger Pau Monné: > On Tue, Jul 18, 2023 at 02:26:03PM +0200, Simon Gaiser wrote: >> As far as I understand the HPET legacy mode is not required on systems >> with ARAT after the timer IRQ test. > > What's the relation with ARAT here? > > It would seem to me that keeping legacy replacement enabled

Re: [PATCH v2 18/18] tools/xenstore: add nocopy flag to node read functions

2023-07-18 Thread Julien Grall
Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: Today when reading a node from the data base through read_node(), the node data is copied in order to avoid modifying the data base when preparing a node update, as otherwise an error might result in an inconsistent state. There are, however

Re: [PATCH v2 14/18] tools/xenstore: move copying of node data out of db_fetch()

2023-07-18 Thread Julien Grall
Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: Today the node data is copied in db_fetch() on each data base read in order to avoid accidental data base modifications when working on a node. read_node() is the only caller of db_fetch() which isn't freeing the returned data area immediate

Re: [PATCH v2 13/18] tools/xenstore: let db_delete() return void

2023-07-18 Thread Julien Grall
Hi JUergen, On 10/07/2023 07:59, Juergen Gross wrote: db_delete() only ever is returning 0. Switch it to return void and remove all the error handling dealing wit a non-zero return value. Suggested-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Cheers, -- Julien

Re: [PATCH v2 11/18] tools/xenstore: drop use of tdb

2023-07-18 Thread Julien Grall
Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: - return (struct xs_tdb_record_hdr *)data.dptr; + *size = sizeof(*hdr) + hdr->num_perms * sizeof(hdr->perms[0]) + + hdr->datalen + hdr->childlen; + + p = talloc_size(NULL, *size); + if (!p) { +

Re: [PATCH] docs/xen-tscmode: remove mention of numeric tsc_mode= values

2023-07-18 Thread Elliott Mitchell
On Fri, Jul 14, 2023 at 09:21:59AM +0200, Jan Beulich wrote: > On 14.07.2023 05:44, Elliott Mitchell wrote: > > On Fri, Jul 14, 2023 at 03:24:59AM +0200, Marek Marczykowski-Górecki wrote: > >> On Thu, Jul 13, 2023 at 05:16:40PM -0700, Elliott Mitchell wrote: > >>> The better to encourage moving to

Re: [PATCH v2 10/18] tools/xenstore: add hashtable_replace() function

2023-07-18 Thread Julien Grall
Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: For an effective way to replace a hashtable entry add a new function hashtable_replace(). While at it let hashtable_add() fail if an entry with the specified key does already exist. This seems to be a left-over from the previous version.

Re: [PATCH v2 09/18] tools/xenstore: let hashtable_add() fail in case of existing entry

2023-07-18 Thread Julien Grall
Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: Silently adding another entry with the same key to a hashtable is a perfect receipt for later failure with hard to diagnose symptoms. Let hashtable_add() fail in case another entry with the same key is already existing. Signed-off-by: Juerg

Re: [PATCH v2 07/18] tools/xenstore: add wrapper for tdb_fetch()

2023-07-18 Thread Julien Grall
Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: Add a wrapper function for tdb_fetch taking the name of the node in the data base as a parameter. Let it return a data pointer and the length of the data via a length pointer provided as additional parameter. Move logging of the TDB access f

Re: [PATCH v2 05/18] tools/xenstore: rename do_tdb_write() and change parameter type

2023-07-18 Thread Julien Grall
Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: Rename do_tdb_write() to db_write() and replace the key parameter with db_name specifying the name of the node in the data base, and the data parameter with a data pointer and a length. Do the same key parameter type change for write_node_ra

[PATCH v4 2/4] xen/ppc: Set up a basic C environment

2023-07-18 Thread Shawn Anastasio
Update ppc64/head.S to set up an initial boot stack, zero the .bss section, and jump to C. Also refactor the endian fixup trampoline into its own macro, since it will need to be used in multiple places, including every time we make a call into firmware (see next commit). Signed-off-by: Shawn Anas

[PATCH v4 4/4] automation: Add smoke test for ppc64le

2023-07-18 Thread Shawn Anastasio
Add an initial smoke test that boots xen on a ppc64/pseries machine and checks for a magic string. Based on the riscv smoke test. Eventually the powernv9 (POWER9 bare metal) machine type will want to be tested as well, but for now we only boot on pseries. Signed-off-by: Shawn Anastasio Reviewed-

[PATCH v4 1/4] common: Move a few more standalone macros from xen/lib.h to xen/macros.h

2023-07-18 Thread Shawn Anastasio
Move a few more macros which have no dependencies on other headers from xen/lib.h to xen/macros.h. Notably, this includes BUILD_BUG_ON* and ARRAY_SIZE. --- xen/include/xen/lib.h| 28 xen/include/xen/macros.h | 32 2 files changed, 3

[PATCH v4 3/4] xen/ppc: Implement early serial printk on pseries

2023-07-18 Thread Shawn Anastasio
On typical Power VMs (e.g. QEMU's -M pseries), a variety of services including an early serial console are provided by Open Firmware. Implement the required interfaces to call into Open Firmware and write to the serial console. Since Open Firmware runs in 32-bit Big Endian mode and Xen runs in 64-

[PATCH v4 0/4] Early serial on Power

2023-07-18 Thread Shawn Anastasio
Hello all, This series adds support for early serial printing on Power, as well as a simple CI smoke test modeled after the riscv one. The first patch is responsible for setting up a basic C environment with an initial stack while the second sets up an Open Firmware serial console and primitive e

Re: [PATCH 2/4] x86/idle: Get PC{8..10} counters for Tiger and Alder Lake

2023-07-18 Thread Simon Gaiser
Jan Beulich: > On 18.07.2023 15:46, Simon Gaiser wrote: >> Jan Beulich: >>> On 18.07.2023 15:23, Simon Gaiser wrote: --- xen/arch/x86/acpi/cpu_idle.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) >>> >>> This lacks both S-o-b and a proper description. The latter in

Re: [PATCH v3 1/8] common: move a few macros out of xen/lib.h

2023-07-18 Thread Shawn Anastasio
On 7/10/23 3:51 AM, Jan Beulich wrote: > Introduce xen/macros.h for this purpose. For now xen/lib.h simply > includes xen/macro.h, until consumers can be suitable cleaned up. > > Signed-off-by: Jan Beulich > --- > v3: New. > > --- a/xen/include/xen/lib.h > +++ b/xen/include/xen/lib.h > @@ -1,26

Re: [PATCH v2 1/3] xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option

2023-07-18 Thread Stewart Hildebrand
On 7/13/23 14:40, Julien Grall wrote: > Hi Stewart, > > On 07/07/2023 02:47, Stewart Hildebrand wrote: >> From: Rahul Singh >> >> Setting CONFIG_PCI_PASSTHROUGH=y will enable PCI passthrough on ARM, even >> though >> the feature is not yet complete in the current upstream codebase. The >> purpo

Re: [PATCH v2 2/3] xen/arm: make has_vpci depend on CONFIG_HAS_VPCI

2023-07-18 Thread Stewart Hildebrand
On 7/7/23 02:59, Jan Beulich wrote: > On 07.07.2023 03:47, Stewart Hildebrand wrote: >> --- a/xen/arch/arm/include/asm/domain.h >> +++ b/xen/arch/arm/include/asm/domain.h >> @@ -298,8 +298,7 @@ static inline void arch_vcpu_block(struct vcpu *v) {} >> >> #define arch_vm_assist_valid_mask(d) (1UL <<

Re: [PATCH v2 1/5] x86/ioapic: add a raw field to RTE struct

2023-07-18 Thread Jan Beulich
On 18.07.2023 14:43, Roger Pau Monne wrote: > Further changes will require access to the full RTE as a single value > in order to pass it to IOMMU interrupt remapping handlers. > > No functional change intended. > > Signed-off-by: Roger Pau Monné As indicated for v1, I'm fine in principle, so A

Re: [PATCH v3 1/8] common: move a few macros out of xen/lib.h

2023-07-18 Thread Oleksii
On Mon, 2023-07-10 at 10:51 +0200, Jan Beulich wrote: > Introduce xen/macros.h for this purpose. For now xen/lib.h simply > includes xen/macro.h, until consumers can be suitable cleaned up. > > Signed-off-by: Jan Beulich > --- > v3: New. > > --- a/xen/include/xen/lib.h > +++ b/xen/include/xen/li

Re: [PATCH v2 2/5] x86/ioapic: RTE modifications must use ioapic_write_entry

2023-07-18 Thread Jan Beulich
On 18.07.2023 14:43, Roger Pau Monne wrote: > --- a/xen/arch/x86/io_apic.c > +++ b/xen/arch/x86/io_apic.c > @@ -269,15 +269,15 @@ void __ioapic_write_entry( > { > union entry_union eu = { .entry = e }; > > -if ( raw ) > +if ( raw || !iommu_intremap ) > { > __io_apic_wr

Re: [PATCH v2] ns16550: add support for polling mode when device tree is used

2023-07-18 Thread Oleksii
On Tue, 2023-07-18 at 16:40 +0200, Jan Beulich wrote: > On 18.07.2023 16:13, Oleksii Kurochko wrote: > > --- a/xen/drivers/char/ns16550.c > > +++ b/xen/drivers/char/ns16550.c > > @@ -40,6 +40,8 @@ > >  #include > >  #endif > >   > > +#define NO_IRQ_POLL 0 > > Do you really need this? I ask becaus

Re: [RFC XEN PATCH] x86/mwait-idle: Use ACPI for CPUs without hardcoded C-state table

2023-07-18 Thread Jan Beulich
On 18.07.2023 13:04, Simon Gaiser wrote: > mwait-idle includes a hardcoded config for many CPUs. But some are > missing, for example Tiger Lake. Linux' driver reads the config from > ACPI in those cases. This adds this to Xen's implementation. > > The Linux driver also has a feature to combine the

Re: [PATCH v2] ns16550: add support for polling mode when device tree is used

2023-07-18 Thread Julien Grall
Hi, On 18/07/2023 16:00, Oleksii wrote: On Tue, 2023-07-18 at 15:23 +0100, Julien Grall wrote: On 18/07/2023 15:13, Oleksii Kurochko wrote: RISC-V doesn't support interrupts for the time being, so it would be nice to have polling mode. The patch assumes that polling mode will be used if the

Re: [PATCH v3 3/3] xen/riscv: introduce identity mapping

2023-07-18 Thread Jan Beulich
On 17.07.2023 16:40, Oleksii Kurochko wrote: > The way how switch to virtual address was implemented in the > commit e66003e7be ("xen/riscv: introduce setup_initial_pages") > isn't safe enough as: > * enable_mmu() depends on hooking all exceptions > and pagefault. > * Any exception other than pag

Re: [PATCH v2] ns16550: add support for polling mode when device tree is used

2023-07-18 Thread Oleksii
On Tue, 2023-07-18 at 15:23 +0100, Julien Grall wrote: > > > On 18/07/2023 15:13, Oleksii Kurochko wrote: > > RISC-V doesn't support interrupts for the time being, so it would > > be nice to > > have polling mode. > > > > The patch assumes that polling mode will be used if there is no > > interr

Re: [PATCH v3] xen/evtchn: Introduce new IOCTL to bind static evtchn

2023-07-18 Thread Oleksandr Tyshchenko
On 18.07.23 14:31, Rahul Singh wrote: Hello Rahul > Xen 4.17 supports the creation of static evtchns. To allow user space > application to bind static evtchns introduce new ioctl > "IOCTL_EVTCHN_BIND_STATIC". Existing IOCTL doing more than binding > that’s why we need to introduce the new IOC

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

2023-07-18 Thread osstest service owner
flight 181874 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/181874/ 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] ns16550: add support for polling mode when device tree is used

2023-07-18 Thread Jan Beulich
On 18.07.2023 16:13, Oleksii Kurochko wrote: > --- a/xen/drivers/char/ns16550.c > +++ b/xen/drivers/char/ns16550.c > @@ -40,6 +40,8 @@ > #include > #endif > > +#define NO_IRQ_POLL 0 Do you really need this? I ask because ... > @@ -595,7 +603,9 @@ static void __init cf_check ns16550_endboot(s

[xen-4.16-testing test] 181851: tolerable FAIL - PUSHED

2023-07-18 Thread osstest service owner
flight 181851 xen-4.16-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/181851/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 180918 test-amd64-amd64-xl-qemuu-win7-a

Re: [XEN PATCH v10 16/24] xen/arm: ffa: add defines for sharing memory

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:20, Jens Wiklander wrote: > > According to DEN0077A version 1.1 REL0 > - Section 10.9.2 Memory region handle, page 167 > - Table 10.18 at page 175 > - Table 10.15 at page 168 > - Section 10.11.4 Flags usage, page 184-187 > add defines needed for sharing using the

Re: [PATCH v2] ns16550: add support for polling mode when device tree is used

2023-07-18 Thread Julien Grall
On 18/07/2023 15:13, Oleksii Kurochko wrote: RISC-V doesn't support interrupts for the time being, so it would be nice to have polling mode. The patch assumes that polling mode will be used if there is no interrupt property As I asked in v1, please explain that this is allowed by the bindi

Re: [PATCH v3 2/3] xen/riscv: introduce function for physical offset calculation

2023-07-18 Thread Oleksii
On Mon, 2023-07-17 at 16:58 +0200, Jan Beulich wrote: > On 17.07.2023 16:40, Oleksii Kurochko wrote: > > The function was introduced to calculate and save physical > > offset before MMU is enabled because access to start() is > > PC-relative and in case of linker_addr != load_addr it will > > resul

[PATCH v2] ns16550: add support for polling mode when device tree is used

2023-07-18 Thread Oleksii Kurochko
RISC-V doesn't support interrupts for the time being, so it would be nice to have polling mode. The patch assumes that polling mode will be used if there is no interrupt property or the interrupt is equal to some unused UART interrupt number ( look at the definition of NO_IRQ_POLL in ns16550.c ).

Re: [PATCH 0.5/3] build: make cc-option properly deal with unrecognized sub-options

2023-07-18 Thread Jan Beulich
On 12.07.2023 16:26, Jan Beulich wrote: > --- a/Config.mk > +++ b/Config.mk > @@ -90,9 +90,14 @@ PYTHON_PREFIX_ARG ?= --prefix="$(prefix) > # of which would indicate an "unrecognized command-line option" > warning/error. > # > # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march

Re: [PATCH 2/4] x86/idle: Get PC{8..10} counters for Tiger and Alder Lake

2023-07-18 Thread Jan Beulich
On 18.07.2023 15:46, Simon Gaiser wrote: > Jan Beulich: >> On 18.07.2023 15:23, Simon Gaiser wrote: >>> --- >>> xen/arch/x86/acpi/cpu_idle.c | 9 ++--- >>> 1 file changed, 6 insertions(+), 3 deletions(-) >> >> This lacks both S-o-b and a proper description. The latter in >> particular because

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-18 Thread Nicola Vetrini
On 17/07/23 17:46, Jan Beulich wrote: On 17.07.2023 17:28, Nicola Vetrini wrote: On 17/07/23 15:59, Jan Beulich wrote: On 14.07.2023 16:20, Luca Fancellu wrote: On 14 Jul 2023, at 12:49, Nicola Vetrini wrote: The macro 'testop' expands to a function that declares the local variable '

Re: [PATCH 2/4] x86/idle: Get PC{8..10} counters for Tiger and Alder Lake

2023-07-18 Thread Simon Gaiser
Jan Beulich: > On 18.07.2023 15:23, Simon Gaiser wrote: >> --- >> xen/arch/x86/acpi/cpu_idle.c | 9 ++--- >> 1 file changed, 6 insertions(+), 3 deletions(-) > > This lacks both S-o-b and a proper description. The latter in > particular because you ... Yeah, I also noticed in the meantime, so

Re: [XEN PATCH v10 18/24] xen/arm: ffa: support sharing memory

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:21, Jens Wiklander wrote: > > Adds support for a guest to share memory with an SP using FFA_MEM_SHARE. > Only memory regions small enough to be shared with a single call to > FFA_MEM_SHARE are supported. > > With this commit we have a FF-A version 1.1 [1] mediat

Re: [PATCH 0/8] Make PDX compression optional

2023-07-18 Thread Alejandro Vallejo
On Tue, Jul 18, 2023 at 03:06:26PM +0200, Jan Beulich wrote: > On 18.07.2023 14:58, Alejandro Vallejo wrote: > > I believe the burden of proof is reversed. Features bring complexity, and > > complexity increases the chances of introducing bugs. It's the presence of > > a feature that ought to be ba

Re: [PATCH 4/8] build: Remove CONFIG_HAS_PDX

2023-07-18 Thread Alejandro Vallejo
On Tue, Jul 18, 2023 at 11:38:14AM +0200, Jan Beulich wrote: > On 18.07.2023 11:35, Andrew Cooper wrote: > > On 18/07/2023 10:19 am, Jan Beulich wrote: > >> On 17.07.2023 18:03, Alejandro Vallejo wrote: > >>> It's set everywhere and can't be turned off because it's presence is > >>> assumed in seve

Re: [PATCH 2/4] x86/idle: Get PC{8..10} counters for Tiger and Alder Lake

2023-07-18 Thread Jan Beulich
On 18.07.2023 15:23, Simon Gaiser wrote: > --- > xen/arch/x86/acpi/cpu_idle.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) This lacks both S-o-b and a proper description. The latter in particular because you ... > --- a/xen/arch/x86/acpi/cpu_idle.c > +++ b/xen/arch/x86/acpi/c

Re: [XEN PATCH] x86/msr: Allow hardware domain to read package C-state residency counters

2023-07-18 Thread Jan Beulich
On 18.07.2023 15:17, Simon Gaiser wrote: > --- a/xen/arch/x86/pv/emul-priv-op.c > +++ b/xen/arch/x86/pv/emul-priv-op.c > @@ -965,6 +965,20 @@ static int cf_check read_msr( > *val = 0; > return X86EMUL_OKAY; > > +case MSR_PKG_C2_RESIDENCY: > +case MSR_PKG_C3_RESIDENCY: >

[XEN PATCH] x86: change parameter name of hvm_monitor_msr() declaration

2023-07-18 Thread Federico Serafini
Change the parameter name of hvm_monitor_msr() declaration from 'value' to 'new_value' to match the corresponding defintion. This fixes a violation of MISRA C:2012 Rule 8.3 ("All declarations of an object or function shall use the same names and type qualifiers"). Signed-off-by: Federico Serafini

Re: [PATCH 2/4] x86/idle: Get PC{8..10} counters for Tiger and Alder Lake

2023-07-18 Thread Simon Gaiser
Please excuse the wrong subject prefix. It should have been [XEN PATCH]. This is a single patch. Simon OpenPGP_signature Description: OpenPGP digital signature

Re: [XEN PATCH] x86/msr: Allow hardware domain to read package C-state residency counters

2023-07-18 Thread Andrew Cooper
On 18/07/2023 2:17 pm, Simon Gaiser wrote: > Since it's limited to the hardware domain it should be safe and it's > very useful to have access to this directly in dom0 when debugging power > related things for example S0ix. You need a SoB. But, this is an area there things are subtly broken.  For

[PATCH 2/4] x86/idle: Get PC{8..10} counters for Tiger and Alder Lake

2023-07-18 Thread Simon Gaiser
--- xen/arch/x86/acpi/cpu_idle.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index 557bc6ef86..a6d3175156 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -155,6 +155,12 @@ s

Re: [PATCH v3 3/3] x86: Add Kconfig option to require NX bit support

2023-07-18 Thread Jan Beulich
On 29.06.2023 14:17, Alejandro Vallejo wrote: > --- a/xen/arch/x86/boot/head.S > +++ b/xen/arch/x86/boot/head.S > @@ -123,6 +123,7 @@ multiboot2_header: > .Lbad_ldr_nih: .asciz "ERR: EFI ImageHandle is not provided by bootloader!" > .Lbad_efi_msg: .asciz "ERR: EFI IA-32 platforms are not supporte

[XEN PATCH] x86/msr: Allow hardware domain to read package C-state residency counters

2023-07-18 Thread Simon Gaiser
Since it's limited to the hardware domain it should be safe and it's very useful to have access to this directly in dom0 when debugging power related things for example S0ix. --- xen/arch/x86/include/asm/msr-index.h | 9 + xen/arch/x86/pv/emul-priv-op.c | 14 ++ 2 files

Re: [XEN PATCH v10 16/24] xen/arm: ffa: add defines for sharing memory

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:20, Jens Wiklander wrote: > > According to DEN0077A version 1.1 REL0 > - Section 10.9.2 Memory region handle, page 167 > - Table 10.18 at page 175 > - Table 10.15 at page 168 > - Section 10.11.4 Flags usage, page 184-187 > add defines needed for sharing using the

Re: [PATCH 0/8] Make PDX compression optional

2023-07-18 Thread Jan Beulich
On 18.07.2023 14:58, Alejandro Vallejo wrote: > I believe the burden of proof is reversed. Features bring complexity, and > complexity increases the chances of introducing bugs. It's the presence of > a feature that ought to be backed by a proof-of-requirement, not its > absence. The feature was i

[xen-4.17-testing test] 181861: tolerable trouble: fail/pass/starved - PUSHED

2023-07-18 Thread osstest service owner
flight 181861 xen-4.17-testing real [real] flight 181873 xen-4.17-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/181861/ http://logs.test-lab.xenproject.org/osstest/logs/181873/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): t

Re: [PATCH 0/8] Make PDX compression optional

2023-07-18 Thread Alejandro Vallejo
On Tue, Jul 18, 2023 at 11:33:03AM +0200, Jan Beulich wrote: > On 17.07.2023 18:03, Alejandro Vallejo wrote: > > Currently there's a CONFIG_HAS_PDX Kconfig option, but it's impossible to > > disable it because the whole codebase performs unconditional > > compression/decompression operations on add

Re: [XEN PATCH] x86/hpet: Disable legacy replacement mode after IRQ test if not needed

2023-07-18 Thread Roger Pau Monné
On Tue, Jul 18, 2023 at 02:26:03PM +0200, Simon Gaiser wrote: > As far as I understand the HPET legacy mode is not required on systems > with ARAT after the timer IRQ test. What's the relation with ARAT here? It would seem to me that keeping legacy replacement enabled should only be done when opt

[PATCH v2 4/5] x86/iommu: pass full IO-APIC RTE for remapping table update

2023-07-18 Thread Roger Pau Monne
So that the remapping entry can be updated atomically when possible. Doing such update atomically will avoid Xen having to mask the IO-APIC pin prior to performing any interrupt movements (ie: changing the destination and vector fields), as the interrupt remapping entry is always consistent. This

[PATCH v2 5/5] amd/iommu: force atomic updates of remapping entries

2023-07-18 Thread Roger Pau Monne
Disable XT (x2APIC) support and thus 128 IRTE entries if cmpxchg16b is not available, do so in order to avoid having to disable the IRTE (and possibly loose interrupts) when updating the entry. Note this also removes the usage of a while loop in order to disable the entry, since RemapEn is no long

[PATCH v2 1/5] x86/ioapic: add a raw field to RTE struct

2023-07-18 Thread Roger Pau Monne
Further changes will require access to the full RTE as a single value in order to pass it to IOMMU interrupt remapping handlers. No functional change intended. Signed-off-by: Roger Pau Monné --- Changes since v1: - Fix initializers. --- Tested on gitlab CI, builds on all compilers used there. -

[PATCH v2 3/5] iommu/vtd: rename io_apic_read_remap_rte() local variable

2023-07-18 Thread Roger Pau Monne
Preparatory change to unify the IO-APIC pin variable name between io_apic_read_remap_rte() and amd_iommu_ioapic_update_ire(), so that the local variable can be made a function parameter with the same name across vendors. Signed-off-by: Roger Pau Monné --- Changes since v1: - New in this version.

[PATCH v2 2/5] x86/ioapic: RTE modifications must use ioapic_write_entry

2023-07-18 Thread Roger Pau Monne
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. This is in preparation for passing the full contents of the RTE to the IOMMU interrupt remapping handlers, so remapping entries for IO-APIC RTEs can be updated at

[PATCH v2 0/5] x86/ioapic: fix edge triggered interrupt migration

2023-07-18 Thread Roger Pau Monne
Hello, Following series attempts to solve the issue with IO-APIC edge triggered interrupts seeing an inconsistent IRTE when injected while being migrated. It's been simplified a bit from the original RFC, and does make the logic in the IOMMU RTE update handlers cleaner, as those get passed the fu

Re: [PATCH v3 9/8] common: honor CONFIG_CC_SPLIT_SECTIONS also for assembly functions

2023-07-18 Thread Jan Beulich
On 17.07.2023 16:18, Jan Beulich wrote: > Leverage the new infrastructure in xen/linkage.h to also switch to per- > function sections (when configured), deriving the specific name from the > "base" section in use at the time FUNC() is invoked. > > Signed-off-by: Jan Beulich This additional chang

[XEN PATCH] docs/misc: fix document typo

2023-07-18 Thread yang.xu
From: Yang Xu Fix document typo for more accurate meaning Signed-off-by: Yang Xu --- docs/misc/xen-makefiles/makefiles.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/misc/xen-makefiles/makefiles.rst b/docs/misc/xen-makefiles/makefiles.rst index 04bc72601c..bc2f93

[XEN PATCH] x86/hpet: Disable legacy replacement mode after IRQ test if not needed

2023-07-18 Thread Simon Gaiser
As far as I understand the HPET legacy mode is not required on systems with ARAT after the timer IRQ test. For previous discussion see [1]. Keeping it enabled prevents reaching S0ix residency. Link: https://lore.kernel.org/xen-devel/cb408368-077d-edb5-b4ad-f80086db4...@invisiblethingslab.com/ #

[PATCH v3] xen/evtchn: Introduce new IOCTL to bind static evtchn

2023-07-18 Thread Rahul Singh
Xen 4.17 supports the creation of static evtchns. To allow user space application to bind static evtchns introduce new ioctl "IOCTL_EVTCHN_BIND_STATIC". Existing IOCTL doing more than binding that’s why we need to introduce the new IOCTL to only bind the static event channels. Static evtchns to be

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

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

Re: [PATCH v2 6/6] libxl: add support for parsing MSR features

2023-07-18 Thread Anthony PERARD
On Mon, Jul 17, 2023 at 04:46:25PM +0200, Roger Pau Monné wrote: > On Thu, Jul 13, 2023 at 11:39:53AM +0100, Anthony PERARD wrote: > > On Tue, Jul 11, 2023 at 11:22:30AM +0200, Roger Pau Monne wrote: > > > diff --git a/tools/libs/light/libxl_cpuid.c > > > b/tools/libs/light/libxl_cpuid.c > > > ind

Re: [PATCH v2 3/6] libxl: introduce MSR data in libxl_cpuid_policy

2023-07-18 Thread Anthony PERARD
On Mon, Jul 17, 2023 at 04:36:11PM +0200, Roger Pau Monné wrote: > On Wed, Jul 12, 2023 at 05:39:01PM +0100, Anthony PERARD wrote: > > On Tue, Jul 11, 2023 at 11:22:27AM +0200, Roger Pau Monne wrote: > > > Add a new array field to libxl_cpuid_policy in order to store the MSR > > > policies. > > >

[RFC XEN PATCH] x86/mwait-idle: Use ACPI for CPUs without hardcoded C-state table

2023-07-18 Thread Simon Gaiser
mwait-idle includes a hardcoded config for many CPUs. But some are missing, for example Tiger Lake. Linux' driver reads the config from ACPI in those cases. This adds this to Xen's implementation. The Linux driver also has a feature to combine the internal table with the infos from ACPI. This is n

Re: [XEN PATCH v10 14/24] xen/arm: ffa: support guest FFA_PARTITION_INFO_GET

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:20, Jens Wiklander wrote: > > Adds support in the mediator to handle FFA_PARTITION_INFO_GET requests > from a guest. The requests are forwarded to the SPMC and the response is > translated according to the FF-A version in use by the guest. > > Using FFA_PARTITIO

Re: [XEN PATCH v10 13/24] xen/arm: ffa: support mapping guest RX/TX buffers

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:20, Jens Wiklander wrote: > > Adds support in the mediator to map and unmap the RX and TX buffers > provided by the guest using the two FF-A functions FFA_RXTX_MAP and > FFA_RXTX_UNMAP. > > These buffer are later used to transmit data that cannot be passed in >

Re: [XEN PATCH v10 12/24] xen/arm: ffa: send guest events to Secure Partitions

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:20, Jens Wiklander wrote: > > The FF-A specification defines framework messages sent as direct > requests when certain events occurs. For instance when a VM (guest) is > created or destroyed. Only SPs which have subscribed to these events > will receive them. An

Re: Experiments with clang-format and exclude-list.json

2023-07-18 Thread Jan Beulich
On 18.07.2023 11:13, Luca Fancellu wrote: > I’ve done some experiment with clang-format and the hypervisor code > (xen/xen/**), I had the need to exclude some files from the tool > and I thought to use the exclude-list.json, but since it was intended for > MISRA, I’m now asking your feedback abou

Re: [XEN PATCH v10 11/24] xen/arm: ffa: map SPMC rx/tx buffers

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:20, Jens Wiklander wrote: > > When initializing the FF-A mediator map the RX and TX buffers shared with > the SPMC. > > These buffer are later used to to transmit data that cannot be passed in > registers only. > > Adds a check that the SP supports the needed F

Re: [XEN PATCH v10 10/24] xen/arm: ffa: add direct request support

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:20, Jens Wiklander wrote: > > Adds support for sending a FF-A direct request. Checks that the SP also > supports handling a 32-bit direct request. 64-bit direct requests are > not used by the mediator itself so there is not need to check for that. > > Signed-off

Re: [PATCH 4/8] build: Remove CONFIG_HAS_PDX

2023-07-18 Thread Jan Beulich
On 18.07.2023 11:35, Andrew Cooper wrote: > On 18/07/2023 10:19 am, Jan Beulich wrote: >> On 17.07.2023 18:03, Alejandro Vallejo wrote: >>> It's set everywhere and can't be turned off because it's presence is >>> assumed in several parts of the codebase. This is an initial patch towards >>> adding

Re: [PATCH 4/8] build: Remove CONFIG_HAS_PDX

2023-07-18 Thread Andrew Cooper
On 18/07/2023 10:19 am, Jan Beulich wrote: > On 17.07.2023 18:03, Alejandro Vallejo wrote: >> It's set everywhere and can't be turned off because it's presence is >> assumed in several parts of the codebase. This is an initial patch towards >> adding a more fine-grained CONFIG_HAS_PDX_COMPRESSION t

Re: [XEN PATCH v10 09/24] xen/arm: ffa: add support for FFA_ID_GET

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:20, Jens Wiklander wrote: > > Adds support for the FF-A function FFA_ID_GET to return the ID of the > calling client. > > Signed-off-by: Jens Wiklander Reviewed-by: Bertrand Marquis Cheers Bertrand > --- > xen/arch/arm/tee/ffa.c | 21 + >

Re: [XEN PATCH v10 07/24] xen/arm: ffa: add defines for framework direct request/response messages

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:20, Jens Wiklander wrote: > > According to DEN0077A version 1.1 REL0, section 18.3, Table 18.{21, 25, > 26, 27, 28}, add defines for framework direct request/response messages. > > Signed-off-by: Jens Wiklander > Reviewed-by: Henry Wang Reviewed-by: Bertrand

Re: [PATCH 0/8] Make PDX compression optional

2023-07-18 Thread Jan Beulich
On 17.07.2023 18:03, Alejandro Vallejo wrote: > Currently there's a CONFIG_HAS_PDX Kconfig option, but it's impossible to > disable it because the whole codebase performs unconditional > compression/decompression operations on addresses. This has the > unfortunate side effect that systems without a

Re: [XEN PATCH v10 06/24] xen/arm: ffa: add flags for FFA_PARTITION_INFO_GET

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:20, Jens Wiklander wrote: > > According to DEN0077A version 1.1 REL0, section 13.8, defines > flags used for the function FFA_PARTITION_INFO_GET. > > Signed-off-by: Jens Wiklander > Reviewed-by: Henry Wang Reviewed-by: Bertrand Marquis Cheers Bertrand > --

Re: [XEN PATCH v10 04/24] xen/arm: tee: add a primitive FF-A mediator

2023-07-18 Thread Bertrand Marquis
Hi Jens, > On 17 Jul 2023, at 09:20, Jens Wiklander wrote: > > Adds a FF-A version 1.1 [1] mediator to communicate with a Secure > Partition in secure world. > > This commit brings in only the parts needed to negotiate FF-A version > number with guest and SPMC. > > [1] https://developer.arm.co

[PATCH 1/2] xen/misra: diff-report.py: Fix UnifiedFormatParser change line registration

2023-07-18 Thread Luca Fancellu
Fix the line number on the registration of a 'remove' change type when consecutive 'remove' changes are registered. Currently the algorithm registers consecutive 'remove' changes at the same line it encounter the first one, 'add' changes type are not affected by the bug. Fixes: 1d7c45f895b6 ("xen

  1   2   >