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

2023-07-06 Thread Jan Beulich
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 << > VMASST_TYPE_runstate_update_flag) >

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

2023-07-06 Thread Jan Beulich
On 07.07.2023 03:47, Stewart Hildebrand wrote: > --- a/xen/arch/arm/Kconfig > +++ b/xen/arch/arm/Kconfig > @@ -190,6 +190,15 @@ config STATIC_SHM > help > This option enables statically shared memory on a dom0less system. > > +config PCI_PASSTHROUGH > + bool "PCI passthrough" if

Re: [PATCH] docs/misra: add Rule 7.4 and 9.4

2023-07-06 Thread Jan Beulich
On 07.07.2023 00:46, Stefano Stabellini wrote: > --- a/docs/misra/rules.rst > +++ b/docs/misra/rules.rst > @@ -203,6 +203,13 @@ maintainers if you want to suggest a change. > - The lowercase character l shall not be used in a literal suffix > - > > + * - `Rule 7.4 >

Re: [XEN PATCH v2 12/13] xen/x86: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Simone Ballarin
Il giorno gio 6 lug 2023 alle ore 18:22 Jan Beulich ha scritto: > On 06.07.2023 18:08, Simone Ballarin wrote: > > Il giorno gio 6 lug 2023 alle ore 10:26 Jan Beulich > ha > > scritto: > > > >> On 05.07.2023 17:26, Simone Ballarin wrote: > >>> --- a/xen/arch/x86/apic.c > >>> +++ b/xen/arch/x86/ap

Re: [XEN PATCH v2 07/13] x86/vmx: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 07.07.2023 00:17, Stefano Stabellini wrote: > On Thu, 6 Jul 2023, Jan Beulich wrote: >> On 05.07.2023 17:26, Simone Ballarin wrote: >>> --- a/xen/arch/x86/include/asm/hvm/vmx/vmcs.h >>> +++ b/xen/arch/x86/include/asm/hvm/vmx/vmcs.h >>> @@ -207,7 +207,7 @@ void vmx_vmcs_reload(struct vcpu *v); >>

Re: [XEN PATCH v2] x86: make function declarations consistent with definitions

2023-07-06 Thread Jan Beulich
On 07.07.2023 00:29, Stefano Stabellini wrote: > On Thu, 6 Jul 2023, Jan Beulich wrote: >> On 06.07.2023 01:22, Stefano Stabellini wrote: >>> On Tue, 4 Jul 2023, Jan Beulich wrote: On 04.07.2023 12:23, Federico Serafini wrote: > Change mechanically the parameter names and types of function

Re: [XEN PATCH 4/5] x86/x86_emulate: change parameter name from 's' to 'state'

2023-07-06 Thread Jan Beulich
On 07.07.2023 00:05, Stefano Stabellini wrote: > On Thu, 6 Jul 2023, Jan Beulich wrote: >> On 06.07.2023 00:49, Stefano Stabellini wrote: >>> On Tue, 4 Jul 2023, Jan Beulich wrote: On 29.06.2023 21:31, Stefano Stabellini wrote: > On Thu, 29 Jun 2023, Federico Serafini wrote: >> Change

Re: [PATCH v7 01/12] vpci: introduce per-domain lock to protect vpci structure

2023-07-06 Thread Jan Beulich
On 07.07.2023 04:02, Volodymyr Babchuk wrote: > > Hi Jan, > > Jan Beulich writes: > >> On 05.07.2023 10:59, Roger Pau Monné wrote: >>> On Wed, Jul 05, 2023 at 09:11:10AM +0200, Jan Beulich wrote: On 04.07.2023 23:03, Volodymyr Babchuk wrote: > I am currently implementing your proposal

Re: [PATCH 2/2] xen/virtio: Avoid use of the dom0 backend in dom0

2023-07-06 Thread Juergen Gross
On 06.07.23 23:49, Stefano Stabellini wrote: On Thu, 6 Jul 2023, Roger Pau Monné wrote: On Wed, Jul 05, 2023 at 03:41:10PM -0700, Stefano Stabellini wrote: On Wed, 5 Jul 2023, Roger Pau Monné wrote: On Tue, Jul 04, 2023 at 08:14:59PM +0300, Oleksandr Tyshchenko wrote: ** Part 1 (intr

Re: [PATCH v4 1/7] xen/arm: Improve readability of check for registered devices

2023-07-06 Thread Stewart Hildebrand
On 6/29/23 17:47, Julien Grall wrote: > Hi, > > Sorry for the late answer. > > On 07/06/2023 14:41, Stewart Hildebrand wrote: >> On 6/7/23 03:27, Julien Grall wrote: >>> Hi Stewart, >>> >>> On 07/06/2023 04:02, Stewart Hildebrand wrote: From: Oleksandr Tyshchenko Improve readabili

Re: [PATCH v7 01/12] vpci: introduce per-domain lock to protect vpci structure

2023-07-06 Thread Volodymyr Babchuk
Hi Jan, Jan Beulich writes: > On 05.07.2023 10:59, Roger Pau Monné wrote: >> On Wed, Jul 05, 2023 at 09:11:10AM +0200, Jan Beulich wrote: >>> On 04.07.2023 23:03, Volodymyr Babchuk wrote: I am currently implementing your proposal (along with Jan's suggestions), but I am facing ABBA de

[PATCH v2 3/3] [FUTURE] xen/arm: enable vPCI for domUs

2023-07-06 Thread Stewart Hildebrand
Remove is_hardware_domain check in has_vpci, and select HAS_VPCI_GUEST_SUPPORT in Kconfig. [1] https://lists.xenproject.org/archives/html/xen-devel/2023-06/msg00863.html Signed-off-by: Stewart Hildebrand --- As the tag implies, this patch is not intended to be merged (yet). Note that CONFIG_HAS

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

2023-07-06 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko VPCI is disabled on ARM. Make it depend on CONFIG_HAS_VPCI to test the PCI passthrough support. Also make it depend on is_hardware_domain for now. The is_hardware_domain check should be removed when vPCI is upstreamed. While here, remove the comment on the preceding

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

2023-07-06 Thread Stewart Hildebrand
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 purpose of this is to make it easier to enable the necessary configs (HAS_PCI, HAS_VPCI) for testing and development of PCI pas

[PATCH v2 0/3] Kconfig for PCI passthrough on ARM

2023-07-06 Thread Stewart Hildebrand
There are multiple series in development/review [1], [2] that will benefit from having a Kconfig option for PCI passthrough on ARM. Hence I have sent this series independent from any other series. [1] https://lists.xenproject.org/archives/html/xen-devel/2023-06/msg00863.html [2] https://lists.xenp

Re: [PATCH v1 2/2] xen/arm: Make has_vpci depend on CONFIG_HAS_VPCI

2023-07-06 Thread Stewart Hildebrand
On 6/25/23 08:45, Julien Grall wrote: > Hi, > > On 20/06/2023 16:29, Stewart Hildebrand wrote: >> From: Oleksandr Andrushchenko >> >> VPCI is disabled on ARM. Make it depend on CONFIG_HAS_VPCI to test the PCI >> passthrough support. >> >> While here, remove the comment on the preceding line. >> >

Re: [PATCH v1 1/2] xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option

2023-07-06 Thread Stewart Hildebrand
On 6/25/23 08:51, Julien Grall wrote: > Hi, > > On 20/06/2023 16:29, 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 >> purpose of >>

[linux-linus test] 181721: regressions - trouble: broken/fail/pass

2023-07-06 Thread osstest service owner
flight 181721 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/181721/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-pairbroken test-amd64-amd64-pair 7 host-install

[PATCH] docs/misra: add Rule 7.4 and 9.4

2023-07-06 Thread Stefano Stabellini
From: Stefano Stabellini Rule 9.4 is non-controversial and we have no violations. Rule 7.4 is considered a good idea with the caveat that assigning a string literal to const void is allowed. I added a note to specify it. Signed-off-by: Stefano Stabellini --- docs/misra/rules.rst | 12

Re: [XEN PATCH v2] x86: make function declarations consistent with definitions

2023-07-06 Thread Stefano Stabellini
On Thu, 6 Jul 2023, Jan Beulich wrote: > On 06.07.2023 01:22, Stefano Stabellini wrote: > > On Tue, 4 Jul 2023, Jan Beulich wrote: > >> On 04.07.2023 12:23, Federico Serafini wrote: > >>> Change mechanically the parameter names and types of function > >>> declarations to be consistent with the ones

Re: [XEN PATCH v2 07/13] x86/vmx: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Stefano Stabellini
On Thu, 6 Jul 2023, Jan Beulich wrote: > On 05.07.2023 17:26, Simone Ballarin wrote: > > --- a/xen/arch/x86/hvm/vmx/vvmx.c > > +++ b/xen/arch/x86/hvm/vmx/vvmx.c > > @@ -257,14 +257,14 @@ uint64_t get_vvmcs_virtual(void *vvmcs, uint32_t > > vmcs_encoding) > > > > switch ( enc.width ) { > >

Re: [XEN PATCH v2 06/13] xen/efi: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Stefano Stabellini
On Thu, 6 Jul 2023, Jan Beulich wrote: > On 06.07.2023 01:37, Stefano Stabellini wrote: > > On Wed, 5 Jul 2023, Simone Ballarin wrote: > >> --- a/xen/common/efi/boot.c > >> +++ b/xen/common/efi/boot.c > >> @@ -34,13 +34,13 @@ > >> #define EFI_REVISION(major, minor) (((major) << 16) | (minor)) > >>

Re: [XEN PATCH 4/5] x86/x86_emulate: change parameter name from 's' to 'state'

2023-07-06 Thread Stefano Stabellini
On Thu, 6 Jul 2023, Jan Beulich wrote: > On 06.07.2023 00:49, Stefano Stabellini wrote: > > On Tue, 4 Jul 2023, Jan Beulich wrote: > >> On 29.06.2023 21:31, Stefano Stabellini wrote: > >>> On Thu, 29 Jun 2023, Federico Serafini wrote: > Change parameter name from 's' to 'state' in function def

Re: [PATCH 2/2] xen/virtio: Avoid use of the dom0 backend in dom0

2023-07-06 Thread Stefano Stabellini
On Thu, 6 Jul 2023, Roger Pau Monné wrote: > On Wed, Jul 05, 2023 at 03:41:10PM -0700, Stefano Stabellini wrote: > > On Wed, 5 Jul 2023, Roger Pau Monné wrote: > > > On Tue, Jul 04, 2023 at 08:14:59PM +0300, Oleksandr Tyshchenko wrote: > > > > ** > > > > > > > > Part 1 (intro): > > > > >

Re: [RFC PATCH] xen/arm: Rebranding dom0less feature

2023-07-06 Thread Stefano Stabellini
On Thu, 6 Jul 2023, George Dunlap wrote: > On Wed, Jul 5, 2023 at 11:14 PM Stefano Stabellini > wrote: > On Wed, 5 Jul 2023, George Dunlap wrote: > > On Mon, Jul 3, 2023 at 9:55 PM P S wrote: > >       > On Jul 3, 2023, at 15:45, Luca Fancellu > wrote: > >       > >

Re: [RFC PATCH] xen/arm: Rebranding dom0less feature

2023-07-06 Thread Julien Grall
Hi, On 06/07/2023 14:04, Luca Fancellu wrote: The "start VMs from Xen on boot" functionality is the *only* thing that a big chunk of the users of this functionality want; referring to it as "Hyperlaunch Lite" or "Hyperlaunch -1" will undermine the value of the functionality. What if we us

[xen-unstable test] 181719: regressions - FAIL

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

[PATCH v3 2/3] xen/ppc: Implement early serial printk on pseries

2023-07-06 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 v3 0/3] Early serial on Power

2023-07-06 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

[PATCH v3 1/3] xen/ppc: Set up a basic C environment

2023-07-06 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 v3 3/3] automation: Add smoke test for ppc64le

2023-07-06 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 v5 14/15] xenpm: Add set-cpufreq-cppc subcommand

2023-07-06 Thread Jason Andryuk
set-cpufreq-cppc allows setting the Hardware P-State (HWP) parameters. It can be run on all or just a single cpu. There are presets of balance, powersave & performance. Those can be further tweaked by param:val arguments as explained in the usage description. Parameter names are just checked to

[PATCH v5 13/15] libxc: Add xc_set_cpufreq_cppc

2023-07-06 Thread Jason Andryuk
Add xc_set_cpufreq_cppc to allow calling xen_systctl_pm_op SET_CPUFREQ_CPPC. Signed-off-by: Jason Andryuk Acked-by: Anthony PERARD --- v2: Mark xc_set_hwp_para_t const v4: s/hwp/cppc/ Add Anthony's Ack v5: Remove const and copy back result --- tools/include/xenctrl.h | 4 tools/libs/ctr

[PATCH v5 15/15] CHANGELOG: Add Intel HWP entry

2023-07-06 Thread Jason Andryuk
Signed-off-by: Jason Andryuk Acked-by: Henry Wang --- v3: Position under existing Added section Add Henry's Ack v2: Add blank line --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d7e0590f8..8d6e6c3088 100644 --- a/CHANGELOG

[PATCH v5 12/15] xen: Add SET_CPUFREQ_HWP xen_sysctl_pm_op

2023-07-06 Thread Jason Andryuk
Add SET_CPUFREQ_HWP xen_sysctl_pm_op to set HWP parameters. The sysctl supports setting multiple values simultaneously as indicated by the set_params bits. This allows atomically applying new HWP configuration via a single wrmsr. XEN_SYSCTL_HWP_SET_PRESET_BALANCE/PERFORMANCE/POWERSAVE provide th

[PATCH v5 10/15] libxc: Include cppc_para in definitions

2023-07-06 Thread Jason Andryuk
Expose the cppc_para fields through libxc. Signed-off-by: Jason Andryuk Acked-by: Anthony PERARD --- v4: Rename hwp to cppc Add Anthony's Ack --- tools/include/xenctrl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/xenctrl.h b/tools/include/xenctrl.h index 8aedb952a0..209

[PATCH v5 11/15] xenpm: Print HWP/CPPC parameters

2023-07-06 Thread Jason Andryuk
Print HWP-specific parameters. Some are always present, but others depend on hardware support. Signed-off-by: Jason Andryuk Reviewed-by: Jan Beulich --- v2: Style fixes Declare i outside loop Replace repearted hardware/configured limits with spaces Fixup for hw_ removal Use XEN_HWP_GOVERNOR Use

[PATCH v5 09/15] cpufreq: Export HWP parameters to userspace as CPPC

2023-07-06 Thread Jason Andryuk
Extend xen_get_cpufreq_para to return hwp parameters. HWP is an implementation of ACPI CPPC (Collaborative Processor Performance Control). Use the CPPC name since that might be useful in the future for AMD P-state. We need the features bitmask to indicate fields supported by the actual hardware

[PATCH v5 08/15] xenpm: Change get-cpufreq-para output for hwp

2023-07-06 Thread Jason Andryuk
When using HWP, some of the returned data is not applicable. In that case, we should just omit it to avoid confusing the user. So switch to printing the base and max frequencies since those are relevant to HWP. Similarly, stop printing the CPU frequencies since those do not apply. The scaling fie

[PATCH v5 07/15] xen/x86: Tweak PDC bits when using HWP

2023-07-06 Thread Jason Andryuk
Qubes testing of HWP support had a report of a laptop, Thinkpad X1 Carbon Gen 4 with a Skylake processor, locking up during boot when HWP is enabled. A user found a kernel bug that seems to be the same issue: https://bugzilla.kernel.org/show_bug.cgi?id=110941. That bug was fixed by Linux commit a

[PATCH v5 06/15] cpufreq: Add Hardware P-State (HWP) driver

2023-07-06 Thread Jason Andryuk
>From the Intel SDM: "Hardware-Controlled Performance States (HWP), which autonomously selects performance states while utilizing OS supplied performance guidance hints." Enable HWP to run in autonomous mode by poking the correct MSRs. HWP is disabled by default, and cpufreq=hwp enables it. cpuf

[PATCH v5 05/15] pmstat&xenpm: Re-arrage for cpufreq union

2023-07-06 Thread Jason Andryuk
Rearrange code now that xen_sysctl_pm_op's get_para fields has the nested union and struct. In particular, the scaling governor information like scaling_available_governors is inside the union, so it is not always available. Move those fields (op->u.get_para.u.s.u.*) together as well as the commo

[PATCH v5 03/15] cpufreq: Export intel_feature_detect

2023-07-06 Thread Jason Andryuk
Export feature_detect as intel_feature_detect so it can be re-used by HWP. Signed-off-by: Jason Andryuk Acked-by: Jan Beulich --- v4: Add Jan's Ack v3: Remove void * cast when calling intel_feature_detect v2: export intel_feature_detect with typed pointer Move intel_feature_detect to acpi/cpuf

[PATCH v5 04/15] xen/sysctl: Nest cpufreq scaling options

2023-07-06 Thread Jason Andryuk
Add a union and struct so that most of the scaling variables of struct xen_get_cpufreq_para are within in a binary-compatible layout. This allows cppc_para to live in the larger union and use uint32_ts - struct xen_cppc_para will be 10 uint32_t's. The new scaling struct is 3 * uint32_t + 16 bytes

[PATCH v5 02/15] cpufreq: Add perf_freq to cpuinfo

2023-07-06 Thread Jason Andryuk
acpi-cpufreq scales the aperf/mperf measurements by max_freq, but HWP needs to scale by base frequency. Settings max_freq to base_freq "works" but the code is not obvious, and returning values to userspace is tricky. Add an additonal perf_freq member which is used for scaling aperf/mperf measurem

[PATCH v5 01/15] cpufreq: Allow restricting to internal governors only

2023-07-06 Thread Jason Andryuk
For hwp, the standard governors are not usable, and only the internal one is applicable. Add the cpufreq_governor_internal boolean to indicate when an internal governor, like hwp, will be used. This is set during presmp_initcall, and governor registration can be skipped when called during initcal

[PATCH v5 00/15] Intel Hardware P-States (HWP) support

2023-07-06 Thread Jason Andryuk
Hi, This patch series adds Hardware-Controlled Performance States (HWP) for Intel processors to Xen. v2 was only partially reviewed, so v3 is mostly a reposting of v2. In v2 & v3, I think I addressed all comments for v1. I kept patch 11 "xenpm: Factor out a non-fatal cpuid_parse variant", with

[ovmf test] 181724: all pass - PUSHED

2023-07-06 Thread osstest service owner
flight 181724 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/181724/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 96d691166f07b7ed422f9536832edadc0aea35c9 baseline version: ovmf 60475162a66a73426cd97

[libvirt test] 181717: tolerable FAIL - PUSHED

2023-07-06 Thread osstest service owner
flight 181717 libvirt real [real] flight 181723 libvirt real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/181717/ http://logs.test-lab.xenproject.org/osstest/logs/181723/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-li

Re: [PATCH] xen-block: Avoid leaks on new error path

2023-07-06 Thread Paul Durrant
On 04/07/2023 18:18, Anthony PERARD wrote: From: Anthony PERARD Commit 189829399070 ("xen-block: Use specific blockdev driver") introduced a new error path, without taking care of allocated resources. So only allocate the qdicts after the error check, and free both `filename` and `driver` when

Re: [XEN PATCH v2 12/13] xen/x86: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 06.07.2023 18:08, Simone Ballarin wrote: > Il giorno gio 6 lug 2023 alle ore 10:26 Jan Beulich ha > scritto: > >> On 05.07.2023 17:26, Simone Ballarin wrote: >>> --- a/xen/arch/x86/apic.c >>> +++ b/xen/arch/x86/apic.c >>> @@ -1211,7 +1211,7 @@ static void __init calibrate_APIC_clock(void) >>>

Re: [XEN PATCH v2 12/13] xen/x86: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 06.07.2023 18:08, Simone Ballarin wrote: > Il giorno gio 6 lug 2023 alle ore 10:26 Jan Beulich ha > scritto: > >> On 05.07.2023 17:26, Simone Ballarin wrote: >>> --- a/xen/arch/x86/apic.c >>> +++ b/xen/arch/x86/apic.c >>> @@ -1211,7 +1211,7 @@ static void __init calibrate_APIC_clock(void) >>>

[ovmf test] 181722: all pass - PUSHED

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

Re: [XEN PATCH v2 12/13] xen/x86: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Simone Ballarin
Il giorno gio 6 lug 2023 alle ore 10:26 Jan Beulich ha scritto: > On 05.07.2023 17:26, Simone Ballarin wrote: > > --- a/xen/arch/x86/apic.c > > +++ b/xen/arch/x86/apic.c > > @@ -1211,7 +1211,7 @@ static void __init calibrate_APIC_clock(void) > > * Setup the APIC counter to maximum. There is

Re: Detecting whether dom0 is in a VM

2023-07-06 Thread Yann Dirson
On 7/6/23 17:35, zithro wrote: > On 06 Jul 2023 09:02, Jan Beulich wrote: >> On 05.07.2023 18:20, zithro wrote: >>> So I'm wondering, isn't that path enough for correct detection ? >>> I mean, if "/sys/class/dmi/id/sys_vendor" reports Xen (or KVM, or any >>> other known hypervisor), it's nested,

Re: [PATCH v2 1/3] xen/ppc: Set up a basic C environment

2023-07-06 Thread Shawn Anastasio
On 6/22/23 8:26 PM, Shawn Anastasio wrote: > On 6/22/23 5:49 PM, Andrew Cooper wrote: >> On 22/06/2023 9:57 pm, Shawn Anastasio wrote: >>> 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 ma

Re: [PATCH 01/32] block: Provide blkdev_get_handle_* functions

2023-07-06 Thread Christoph Hellwig
On Tue, Jul 04, 2023 at 02:21:28PM +0200, Jan Kara wrote: > Create struct bdev_handle that contains all parameters that need to be > passed to blkdev_put() and provide blkdev_get_handle_* functions that > return this structure instead of plain bdev pointer. This will > eventually allow us to pass o

Re: Detecting whether dom0 is in a VM

2023-07-06 Thread zithro
On 06 Jul 2023 09:02, Jan Beulich wrote: On 05.07.2023 18:20, zithro wrote: So I'm wondering, isn't that path enough for correct detection ? I mean, if "/sys/class/dmi/id/sys_vendor" reports Xen (or KVM, or any other known hypervisor), it's nested, otherwise it's on hardware ? Is that really ma

Re: [PATCH RFC 0/32] block: Make blkdev_get_by_*() return handle

2023-07-06 Thread Christoph Hellwig
On Tue, Jul 04, 2023 at 02:21:27PM +0200, Jan Kara wrote: > Hello, > > this patch series implements the idea of blkdev_get_by_*() calls returning > bdev_handle which is then passed to blkdev_put() [1]. This makes the get > and put calls for bdevs more obviously matching and allows us to propagate

RE: [PATCH v3 4/7] swiotlb: if swiotlb is full, fall back to a transient memory pool

2023-07-06 Thread Michael Kelley (LINUX)
From: Greg Kroah-Hartman Sent: Thursday, July 6, 2023 1:07 AM > > On Thu, Jul 06, 2023 at 03:50:55AM +, Michael Kelley (LINUX) wrote: > > From: Petr Tesarik Sent: Tuesday, June 27, > > 2023 > 2:54 AM > > > > > > Try to allocate a transient memory pool if no suitable slots can be found, > >

Re: [RFC PATCH] xen/arm: Rebranding dom0less feature

2023-07-06 Thread Luca Fancellu
The "start VMs from Xen on boot" functionality is the *only* thing that a big chunk of the users of this functionality want; referring to it as "Hyperlaunch Lite" or "Hyperlaunch -1" will undermine the value of the functionality. What if we use "Measured Hyp

Re: [RFC PATCH] xen/arm: Rebranding dom0less feature

2023-07-06 Thread Julien Grall
On 06/07/2023 13:31, Luca Fancellu wrote: On 6 Jul 2023, at 11:01, George Dunlap wrote: On Wed, Jul 5, 2023 at 11:14 PM Stefano Stabellini wrote: On Wed, 5 Jul 2023, George Dunlap wrote: On Mon, Jul 3, 2023 at 9:55 PM P S wrote: > On Jul 3, 2023, at 15:45, Luca Fancellu wrot

Re: [RFC PATCH] xen/arm: Rebranding dom0less feature

2023-07-06 Thread Luca Fancellu
> On 6 Jul 2023, at 11:01, George Dunlap wrote: > > > > On Wed, Jul 5, 2023 at 11:14 PM Stefano Stabellini > wrote: > On Wed, 5 Jul 2023, George Dunlap wrote: > > On Mon, Jul 3, 2023 at 9:55 PM P S wrote: > > > On Jul 3, 2023, at 15:45, Luca Fancellu > > wrote: > > > > >

[linux-linus test] 181716: regressions - FAIL

2023-07-06 Thread osstest service owner
flight 181716 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/181716/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm 8 xen-boot fail REGR. vs. 180278 test-amd64

Re: [PATCH v2 4/6] xen/riscv: introduce identity mapping

2023-07-06 Thread Jan Beulich
On 19.06.2023 15:34, Oleksii Kurochko wrote: > Since it is not easy to keep track where the identity map was mapped, > so we will look for the top-level entry exclusive to the identity > map and remove it. I think you mean "top-most" or some such, as it's not necessarily the top-level entry you za

Re: [PATCH v2 3/6] xen/riscv: introduce function for physical offset calculation

2023-07-06 Thread Jan Beulich
On 19.06.2023 15:34, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/riscv64/head.S > +++ b/xen/arch/riscv/riscv64/head.S > @@ -29,6 +29,8 @@ ENTRY(start) > > jal reset_stack > > +jal calc_phys_offset > + > tailstart_xen > > .section .text, "ax",

Re: [PATCH v2 2/6] xen/riscv: introduce reset_stack() function

2023-07-06 Thread Jan Beulich
On 19.06.2023 15:34, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/riscv64/head.S > +++ b/xen/arch/riscv/riscv64/head.S > @@ -27,8 +27,16 @@ ENTRY(start) > add t3, t3, __SIZEOF_POINTER__ > bltut3, t4, .L_clear_bss > > +jal reset_stack > + > +tail

Re: [PATCH 11/13] libxl: split logic to parse user provided CPUID features

2023-07-06 Thread Jan Beulich
On 16.06.2023 15:10, Roger Pau Monne wrote: > --- a/tools/libs/light/libxl_cpuid.c > +++ b/tools/libs/light/libxl_cpuid.c > @@ -88,6 +88,66 @@ static struct xc_xend_cpuid > *cpuid_find_match(libxl_cpuid_policy *policy, > return *list + i; > } > > +static int cpuid_add(libxl_cpuid_policy *p

Re: [RFC PATCH] xen/arm: Rebranding dom0less feature

2023-07-06 Thread Julien Grall
Hi Stefano, On 05/07/2023 23:14, Stefano Stabellini wrote: > I think we should use "hyperlaunch" as it was intended: the overarching name to refer to "start VMs from Xen on boot". And we should use "hyperlaunch x86" and "hyperlaunch ARM" to distiguish between the two implementations. From my

Re: [PATCH 08/13] libs/guest: introduce support for setting guest MSRs

2023-07-06 Thread Jan Beulich
On 16.06.2023 15:10, Roger Pau Monne wrote: > --- a/tools/libs/guest/xg_cpuid_x86.c > +++ b/tools/libs/guest/xg_cpuid_x86.c > @@ -331,10 +331,74 @@ int xc_cpu_policy_apply_cpuid(xc_interface *xch, > xc_cpu_policy_t *policy, > return 0; > } > > +int xc_cpu_policy_apply_msr(xc_interface *xch

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

2023-07-06 Thread osstest service owner
flight 181720 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/181720/ 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 v4 3/3] cmdline: parse multiple instances of the vga option

2023-07-06 Thread Jan Beulich
On 05.07.2023 13:47, Roger Pau Monne wrote: > Parse all instances of the vga= option on the command line, in order > to always enforce the last selection on the command line. > > Note that it's not safe to parse just the last occurrence of the vga= > option, as then a command line with `vga=curren

Re: [PATCH v4 1/3] multiboot2: parse vga= option when setting GOP mode

2023-07-06 Thread Jan Beulich
On 05.07.2023 13:47, Roger Pau Monne wrote: > --- a/xen/arch/x86/efi/efi-boot.h > +++ b/xen/arch/x86/efi/efi-boot.h > @@ -795,7 +795,30 @@ static bool __init > efi_arch_use_config_file(EFI_SYSTEM_TABLE *SystemTable) > > static void __init efi_arch_flush_dcache_area(const void *vaddr, UINTN size

Re: [RFC PATCH] xen/arm: Rebranding dom0less feature

2023-07-06 Thread George Dunlap
On Wed, Jul 5, 2023 at 11:14 PM Stefano Stabellini < stefano.stabell...@amd.com> wrote: > On Wed, 5 Jul 2023, George Dunlap wrote: > > On Mon, Jul 3, 2023 at 9:55 PM P S wrote: > > > On Jul 3, 2023, at 15:45, Luca Fancellu > wrote: > > > > > >> On 3 Jul 2023, at 18:48, Stefano

Re: [PATCH v2] mm/pdx: Add comments throughout the codebase for pdx

2023-07-06 Thread Jan Beulich
On 22.06.2023 16:02, Alejandro Vallejo wrote: > @@ -57,9 +100,25 @@ uint64_t __init pdx_init_mask(uint64_t base_addr) > (uint64_t)1 << (MAX_ORDER + PAGE_SHIFT)) - 1); > } > > -u64 __init pdx_region_mask(u64 base, u64 len) > +uint64_t __init pdx_region_mask(uint64_t base

[PATCH] xen/blkback: Convert to use time_after_eq macro

2023-07-06 Thread Zehao Zhang
Use time_after_eq macro instead of opening it for readability. Signed-off-by: Zehao Zhang --- drivers/block/xen-blkback/blkback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index c362f4ad80ab

Re: [XEN PATCH v2 09/13] xen/public: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Juergen Gross
On 06.07.23 10:43, Jan Beulich wrote: On 06.07.2023 09:57, Juergen Gross wrote: On 06.07.23 09:43, Jan Beulich wrote: On 05.07.2023 17:33, Juergen Gross wrote: On 05.07.23 17:26, Simone Ballarin wrote: From: Gianluca Luparini The xen sources contains violations of MISRA C:2012 Rule 7.2 whos

Re: Backport request (was: [PATCH v2] tools: convert bitfields to unsigned type)

2023-07-06 Thread Jan Beulich
On 04.07.2023 18:16, Jan Beulich wrote: > On 04.07.2023 18:10, Roger Pau Monné wrote: >> On Tue, Jul 04, 2023 at 06:04:36PM +0200, Jan Beulich wrote: >>> On 04.07.2023 17:55, Roger Pau Monné wrote: On Tue, Jul 04, 2023 at 05:42:33PM +0200, Jan Beulich wrote: > Plus is the mentioned > "

Re: [XEN PATCH v3 3/3] xen: fix violations of MISRA C:2012 Rule 3.1

2023-07-06 Thread Jan Beulich
On 06.07.2023 10:23, Nicola Vetrini wrote: > On 04/07/23 17:57, Jan Beulich wrote: >> On 29.06.2023 21:20, Stefano Stabellini wrote: >>> On Thu, 29 Jun 2023, Luca Fancellu wrote: > On 29 Jun 2023, at 11:06, Nicola Vetrini > wrote: > --- a/xen/common/xmalloc_tlsf.c > +++ b/xen/comm

Re: [XEN PATCH v2 09/13] xen/public: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 06.07.2023 09:57, Juergen Gross wrote: > On 06.07.23 09:43, Jan Beulich wrote: >> On 05.07.2023 17:33, Juergen Gross wrote: >>> On 05.07.23 17:26, Simone Ballarin wrote: From: Gianluca Luparini The xen sources contains violations of MISRA C:2012 Rule 7.2 whose headline state

Re: [XEN PATCH v2 13/13] xen: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 05.07.2023 17:26, Simone Ballarin wrote: > @@ -80,36 +80,36 @@ static inline uint64_t cper_next_record_id(void) > * Corrected Machine Check > */ > #define CPER_NOTIFY_CMC > \ > - UUID_LE(0x2DCE8BB1, 0xBDD7, 0x450e, 0xB9, 0xAD, 0x9C,

Re: [XEN PATCH v2 13/13] xen: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 06.07.2023 01:49, Stefano Stabellini wrote: >> --- a/xen/include/xen/bitops.h >> +++ b/xen/include/xen/bitops.h >> @@ -227,11 +227,11 @@ static inline __u32 ror32(__u32 word, unsigned int >> shift) >> } >> >> /* base-2 logarithm */ >> -#define __L2(_x) (((_x) & 0x0002) ? 1 : 0) >> -#

Re: [XEN PATCH v2 13/13] xen: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 05.07.2023 21:32, Simone Ballarin wrote: > Rethinking about it, probably Jan's hint was to add the cast and remove the > &. Indeed. > I will fix it in the next patch. Thanks. Jan

Re: [XEN PATCH v2 12/13] xen/x86: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 05.07.2023 17:26, Simone Ballarin wrote: > --- a/xen/arch/x86/apic.c > +++ b/xen/arch/x86/apic.c > @@ -1211,7 +1211,7 @@ static void __init calibrate_APIC_clock(void) > * Setup the APIC counter to maximum. There is no way the lapic > * can underflow in the 100ms detection time frame.

Re: [XEN PATCH v3 3/3] xen: fix violations of MISRA C:2012 Rule 3.1

2023-07-06 Thread Nicola Vetrini
On 04/07/23 17:57, Jan Beulich wrote: On 29.06.2023 21:20, Stefano Stabellini wrote: On Thu, 29 Jun 2023, Luca Fancellu wrote: On 29 Jun 2023, at 11:06, Nicola Vetrini wrote: --- a/xen/common/xmalloc_tlsf.c +++ b/xen/common/xmalloc_tlsf.c @@ -140,9 +140,7 @@ static inline void MAPPING_SEARC

Re: [PATCH 2/2] xen/virtio: Avoid use of the dom0 backend in dom0

2023-07-06 Thread Roger Pau Monné
On Wed, Jul 05, 2023 at 03:41:10PM -0700, Stefano Stabellini wrote: > On Wed, 5 Jul 2023, Roger Pau Monné wrote: > > On Tue, Jul 04, 2023 at 08:14:59PM +0300, Oleksandr Tyshchenko wrote: > > > ** > > > > > > Part 1 (intro): > > > > > > We could reuse a PCI config space register to expose

Re: [PATCH v3 10/52] xen/arm: Move MMU related definitions from config.h to mmu/layout.h

2023-07-06 Thread Julien Grall
Hi Penny, On 06/07/2023 08:36, Penny Zheng wrote: Hi Julien On 2023/7/5 18:30, Julien Grall wrote: Hi Penny, On 05/07/2023 07:51, Penny Zheng wrote: On 2023/7/5 05:54, Julien Grall wrote: Hi Penny, On 26/06/2023 04:34, Penny Zheng wrote: From: Wei Chen Xen defines some global configurat

Re: [XEN PATCH v2 11/13] xen/vpci: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 05.07.2023 17:26, Simone Ballarin wrote: > --- a/xen/drivers/vpci/msi.c > +++ b/xen/drivers/vpci/msi.c > @@ -124,7 +124,7 @@ static void cf_check address_hi_write( > struct vpci_msi *msi = data; > > /* Clear and update high part. */ > -msi->address &= 0x; > +msi->addr

Re: [PATCH v3 4/7] swiotlb: if swiotlb is full, fall back to a transient memory pool

2023-07-06 Thread Greg Kroah-Hartman
On Thu, Jul 06, 2023 at 03:50:55AM +, Michael Kelley (LINUX) wrote: > From: Petr Tesarik Sent: Tuesday, June 27, 2023 > 2:54 AM > > > > Try to allocate a transient memory pool if no suitable slots can be found, > > except when allocating from a restricted pool. The transient pool is just > >

Re: [XEN PATCH v2 08/13] xen/pci: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 05.07.2023 17:26, Simone Ballarin wrote: > From: Gianluca Luparini > > The xen sources contains violations of MISRA C:2012 Rule 7.2 whose > headline states: > "A 'u' or 'U' suffix shall be applied to all integer constants > that are represented in an unsigned type". > > Add the 'U' suffix to

Re: [XEN PATCH v2 07/13] x86/vmx: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 05.07.2023 17:26, Simone Ballarin wrote: > --- a/xen/arch/x86/hvm/vmx/vvmx.c > +++ b/xen/arch/x86/hvm/vmx/vvmx.c > @@ -257,14 +257,14 @@ uint64_t get_vvmcs_virtual(void *vvmcs, uint32_t > vmcs_encoding) > > switch ( enc.width ) { > case VVMCS_WIDTH_16: > -res &= 0x; > +

Re: [PATCH v3 12/52] xen/mmu: extract early uart mapping from setup_fixmap

2023-07-06 Thread Penny Zheng
Hi Julien On 2023/7/5 18:35, Julien Grall wrote: Hi Penny, On 05/07/2023 10:03, Penny Zheng wrote: On 2023/7/5 06:25, Julien Grall wrote: Hi Penny, Title: You want to clarify that this change is arm64 only. So: xen/arm64: mmu: ... On 26/06/2023 04:34, Penny Zheng wrote: Original setup_fixm

Re: [XEN PATCH v2 05/13] xen/device-tree: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Julien Grall
Hi, On 05/07/2023 16:26, Simone Ballarin wrote: From: Gianluca Luparini This suggest the author is Gianluca but... The xen sources contains violations of MISRA C:2012 Rule 7.2 whose headline states: "A 'u' or 'U' suffix shall be applied to all integer constants that are represented in an un

Re: [PATCH v3 11/52] xen/arm: mmu: fold FIXMAP into MMU system

2023-07-06 Thread Penny Zheng
Hi Julien On 2023/7/5 18:31, Julien Grall wrote: Hi Penny, On 05/07/2023 09:19, Penny Zheng wrote: On 2023/7/5 06:12, Julien Grall wrote: On 26/06/2023 04:34, Penny Zheng wrote: diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig index fb77392b82..22b28b8ba2 100644 --- a/xen/arch/arm/Kc

Re: [XEN PATCH v2 09/13] xen/public: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Juergen Gross
On 06.07.23 09:43, Jan Beulich wrote: On 05.07.2023 17:33, Juergen Gross wrote: On 05.07.23 17:26, Simone Ballarin wrote: From: Gianluca Luparini The xen sources contains violations of MISRA C:2012 Rule 7.2 whose headline states: "A 'u' or 'U' suffix shall be applied to all integer constants

Re: [XEN PATCH v2 06/13] xen/efi: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 06.07.2023 01:37, Stefano Stabellini wrote: > On Wed, 5 Jul 2023, Simone Ballarin wrote: >> --- a/xen/common/efi/boot.c >> +++ b/xen/common/efi/boot.c >> @@ -34,13 +34,13 @@ >> #define EFI_REVISION(major, minor) (((major) << 16) | (minor)) >> >> #define SMBIOS3_TABLE_GUID \ >> - { 0xf2fd154

Re: [XEN PATCH v2 03/13] x86/svm: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 05.07.2023 17:26, Simone Ballarin wrote: > From: Gianluca Luparini > > The xen sources contains violations of MISRA C:2012 Rule 7.2 whose > headline states: > "A 'u' or 'U' suffix shall be applied to all integer constants > that are represented in an unsigned type". > > Add the 'U' suffix to

Re: [XEN PATCH v2 02/13] AMD/IOMMU: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 06.07.2023 01:31, Stefano Stabellini wrote: > On Wed, 5 Jul 2023, Simone Ballarin wrote: >> From: Gianluca Luparini >> >> The xen sources contains violations of MISRA C:2012 Rule 7.2 whose >> headline states: >> "A 'u' or 'U' suffix shall be applied to all integer constants >> that are represen

Re: [XEN PATCH v2 01/13] x86/cpufreq: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 06.07.2023 01:29, Stefano Stabellini wrote: > On Wed, 5 Jul 2023, Simone Ballarin wrote: >> From: Gianluca Luparini >> >> The xen sources contains violations of MISRA C:2012 Rule 7.2 whose >> headline states: >> "A 'u' or 'U' suffix shall be applied to all integer constants >> that are represen

Re: [XEN PATCH v2 09/13] xen/public: fix violations of MISRA C:2012 Rule 7.2

2023-07-06 Thread Jan Beulich
On 05.07.2023 17:33, Juergen Gross wrote: > On 05.07.23 17:26, Simone Ballarin wrote: >> From: Gianluca Luparini >> >> The xen sources contains violations of MISRA C:2012 Rule 7.2 whose >> headline states: >> "A 'u' or 'U' suffix shall be applied to all integer constants >> that are represented in

  1   2   >