[PATCH] automation: fix race condition in adl-suspend test

2023-10-27 Thread Marek Marczykowski-Górecki
If system suspends too quickly, the message for the test controller to wake up the system may be not sent to the console before suspending. This will cause the test to timeout. Fix this by waiting a bit after printing the message. The test controller then resumes the system 30s after the message,

[qemu-upstream-4.18-testing baseline test] 183557: tolerable FAIL

2023-10-27 Thread osstest service owner
"Old" tested version had not actually been tested; therefore in this flight we test it, rather than a new candidate. The baseline, if any, is the most recent actually tested revision. flight 183557 qemu-upstream-4.18-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/183557/ Fa

[ovmf test] 183565: all pass - PUSHED

2023-10-27 Thread osstest service owner
flight 183565 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183565/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 7ff6ab2b3e09ee7ec0d698398001295b7867b08c baseline version: ovmf 7e08d17a4a535a7abfa58

[xen-4.18-testing baseline test] 183555: tolerable FAIL

2023-10-27 Thread osstest service owner
"Old" tested version had not actually been tested; therefore in this flight we test it, rather than a new candidate. The baseline, if any, is the most recent actually tested revision. flight 183555 xen-4.18-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/183555/ Failures :-/

[linux-linus test] 183551: tolerable FAIL - PUSHED

2023-10-27 Thread osstest service owner
flight 183551 linux-linus real [real] flight 183561 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/183551/ http://logs.test-lab.xenproject.org/osstest/logs/183561/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-

Re: [RFC 1/4] x86/ioemul: address MISRA C:2012 Rule 9.3

2023-10-27 Thread Stefano Stabellini
On Thu, 26 Oct 2023, Jan Beulich wrote: > On 26.10.2023 14:32, Nicola Vetrini wrote: > > On 25/10/2023 09:56, Jan Beulich wrote: > >> On 24.10.2023 22:27, Stefano Stabellini wrote: > >>> On Tue, 24 Oct 2023, Jan Beulich wrote: > On 24.10.2023 16:31, Nicola Vetrini wrote: > > Partially expl

Re: [XEN PATCH][for-4.19 v5] xen: Add deviations for MISRA C:2012 Rule 7.1

2023-10-27 Thread Stefano Stabellini
On Fri, 27 Oct 2023, Nicola Vetrini wrote: > As specified in rules.rst, these constants can be used > in the code. > > Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini

Re: [XEN PATCH][for-4.19 v4 6/8] x86/mce: Move MC_NCLASSES into the enum mctelem_class

2023-10-27 Thread Stefano Stabellini
On Fri, 27 Oct 2023, Nicola Vetrini wrote: > The definition of MC_NCLASSES contained a violation of MISRA C:2012 > Rule 10.1, therefore by moving it as an enumeration constant resolves the > violation and makes it more resilient to possible additions to that enum. > > Signed-off-by: Nicola Vetrini

Re: [XEN PATCH][for-4.19 v4 1/8] xen/include: add macro ISOLATE_LOW_BIT

2023-10-27 Thread Stefano Stabellini
On Fri, 26 Oct 2023, Nicola Vetrini wrote: > The purpose of this macro is to encapsulate the well-known expression > 'x & -x' that in 2's complement architectures on unsigned integers will > give a mask where only the least significant nonzero bit of 'x' is set, > or 0 if none are set. > > A devia

[PATCH v2.5 2/2] x86/Kconfig: Introduce CONFIG_{AMD,INTEL} and conditionalise ucode

2023-10-27 Thread Andrew Cooper
We eventually want to be able to build a stripped down Xen for a single platform. Make a start with CONFIG_{AMD,INTEL} (hidden behind EXPERT, but available to randconfig), and adjust the microcode logic. No practical change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné

Re: [PATCH v2 2/2] x86/Kconfig: Introduce CONFIG_{AMD,INTEL} and conditionalise ucode

2023-10-27 Thread Andrew Cooper
On 27/10/2023 2:47 pm, Roger Pau Monné wrote: > On Fri, Oct 27, 2023 at 09:12:40AM +0200, Jan Beulich wrote: >> On 26.10.2023 22:55, Andrew Cooper wrote: >>> We eventually want to be able to build a stripped down Xen for a single >>> platform. Make a start with CONFIG_{AMD,INTEL} (hidden behind EX

Re: [PATCH] acpi_idle: use raw_safe_halt() from acpi_idle_play_dead()

2023-10-27 Thread Peter Zijlstra
On Fri, Oct 27, 2023 at 07:36:51PM +0100, David Woodhouse wrote: > From: David Woodhouse > > Xen HVM guests were observed taking triple-faults when attempting to > online a previously offlined vCPU. > > Investigation showed that the fault was coming from a failing call > to lockdep_assert_irqs_d

[PATCH] acpi_idle: use raw_safe_halt() from acpi_idle_play_dead()

2023-10-27 Thread David Woodhouse
From: David Woodhouse Xen HVM guests were observed taking triple-faults when attempting to online a previously offlined vCPU. Investigation showed that the fault was coming from a failing call to lockdep_assert_irqs_disabled(), in load_current_idt() which was too early in the CPU bringup to actu

[XEN v3] xen/arm32: head: Replace load_paddr with adr_l when they are equivalent

2023-10-27 Thread Ayan Kumar Halder
Before the MMU is turned on, PC uses physical address. Thus, one can use adr_l instead of load_paddr to obtain the physical address of a symbol. The only exception (for this replacement) is create_table_entry() which is called before and after MMU is turned on. Also, in lookup_processor_type() "r

[XEN PATCH][for-4.19 v5] xen: Add deviations for MISRA C:2012 Rule 7.1

2023-10-27 Thread Nicola Vetrini
As specified in rules.rst, these constants can be used in the code. Signed-off-by: Nicola Vetrini --- Changes in v2: - replace some SAF deviations with configurations Changes in v3: - refine configurations and justifications Changes in v4: - updated deviation record comment. Changes in v5: - use

Re: [PATCH] security-process.pandoc: Statement on issuing XSAs for older versions of Xen

2023-10-27 Thread George Dunlap
On Fri, Oct 27, 2023 at 3:26 PM George Dunlap wrote: > > We recently had a situation where a security issue was discovered > which only affected versions of Xen out of security support from an > upstream perspective. However, many downstreams (including XenServer > and SUSE) still had supported p

[PATCH] security-process.pandoc: Statement on issuing XSAs for older versions of Xen

2023-10-27 Thread George Dunlap
We recently had a situation where a security issue was discovered which only affected versions of Xen out of security support from an upstream perspective. However, many downstreams (including XenServer and SUSE) still had supported products based on the versions affected. Specify what the securi

Re: [XEN PATCH] xen/set_{c,p}x_pminfo: address violations od MISRA C:2012 Rule 8.3

2023-10-27 Thread Federico Serafini
On 27/10/23 15:57, Jan Beulich wrote: On 26.10.2023 14:09, Federico Serafini wrote: --- a/xen/drivers/cpufreq/cpufreq.c +++ b/xen/drivers/cpufreq/cpufreq.c @@ -457,14 +457,14 @@ static void print_PPC(unsigned int platform_limit) printk("\t_PPC: %d\n", platform_limit); } -int set_px_pm

Re: [XEN PATCH][for-4.19 v4] xen: Add deviations for MISRA C:2012 Rule 7.1

2023-10-27 Thread Nicola Vetrini
On 26/10/2023 10:38, Jan Beulich wrote: On 26.10.2023 10:18, Nicola Vetrini wrote: --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -85,10 +85,12 @@ conform to the directive." # Series 7. # --doc_begin="Usage of the following con

Re: [XEN PATCH] xen/set_{c,p}x_pminfo: address violations od MISRA C:2012 Rule 8.3

2023-10-27 Thread Jan Beulich
On 26.10.2023 14:09, Federico Serafini wrote: > --- a/xen/drivers/cpufreq/cpufreq.c > +++ b/xen/drivers/cpufreq/cpufreq.c > @@ -457,14 +457,14 @@ static void print_PPC(unsigned int platform_limit) > printk("\t_PPC: %d\n", platform_limit); > } > > -int set_px_pminfo(uint32_t acpi_id, struct

Re: [PATCH v2 2/2] x86/Kconfig: Introduce CONFIG_{AMD,INTEL} and conditionalise ucode

2023-10-27 Thread Roger Pau Monné
On Fri, Oct 27, 2023 at 09:12:40AM +0200, Jan Beulich wrote: > On 26.10.2023 22:55, Andrew Cooper wrote: > > We eventually want to be able to build a stripped down Xen for a single > > platform. Make a start with CONFIG_{AMD,INTEL} (hidden behind EXPERT, but > > available to randconfig), and adjus

[libvirt test] 183549: regressions - FAIL

2023-10-27 Thread osstest service owner
flight 183549 libvirt real [real] flight 183556 libvirt real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/183549/ http://logs.test-lab.xenproject.org/osstest/logs/183556/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-

[XEN PATCH][for-4.19 v2 1/2] xen/vmap: use ISOLATE_LOW_BIT to wrap a violation of Rule 10.1

2023-10-27 Thread Nicola Vetrini
No functional change. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- Changes in v2: - Changed macro name --- xen/common/vmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/vmap.c b/xen/common/vmap.c index 4fd6b3067ec1..1e498a6e525b 100644 ---

[XEN PATCH][for-4.19 v2 0/2] use the macro ISOLATE_LOW_BIT where appropriate

2023-10-27 Thread Nicola Vetrini
This series replaces two instances of the pattern (x & -x) with the macro ISOLATE_LOW_BIT, introduced by the series [1]. Therefore, these patches should be applied on top of that series. [1] https://marc.info/?l=xen-devel&m=169841347803987&w=2 Changes in v2: - s/LOWEST_BIT/ISOLATE_LOW_BIT/ Nico

[XEN PATCH][for-4.19 v2 2/2] xen/iommu: use ISOLATE_LOW_BIT to wrap a violation of Rule 10.1

2023-10-27 Thread Nicola Vetrini
No functional change. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- Changes in v2: - Changed macro name --- xen/drivers/passthrough/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c i

[XEN PATCH][for-4.19 v4 7/8] xen/types: address Rule 10.1 for DECLARE_BITMAP use

2023-10-27 Thread Nicola Vetrini
Given its use in the declaration 'DECLARE_BITMAP(features, IOMMU_FEAT_count)' the argument 'bits' has essential type 'enum iommu_feature', which is not allowed by the Rule as an operand to the addition operator in macro 'BITS_TO_LONGS'. This construct is deviated with a deviation comment. Signed-

[XEN PATCH][for-4.19 v4 0/8] address violations of MISRA C:2012 Rule 10.1

2023-10-27 Thread Nicola Vetrini
The widely-used construct (x & -x), where x is an unsigned integer quantity represented in 2's complement, does yield the expected result. Since all architectures that are targets for compliance do fulfill such requirements, the construct is deemed safe and deviated. The use of 'DECLARE_BITMAP(fea

[XEN PATCH][for-4.19 v4 5/8] x86/io_apic: address violation of MISRA C:2012 Rule 10.1

2023-10-27 Thread Nicola Vetrini
The definition of IO_APIC_BASE contains a sum of an essentially enum value (FIX_IO_APIC_BASE_0) that is positive with an index that, in all instances, is unsigned, therefore the former is cast to unsigned, so that the operands are of the same essential type. No functional change. Signed-off-by: N

[XEN PATCH][for-4.19 v4 1/8] xen/include: add macro ISOLATE_LOW_BIT

2023-10-27 Thread Nicola Vetrini
The purpose of this macro is to encapsulate the well-known expression 'x & -x' that in 2's complement architectures on unsigned integers will give a mask where only the least significant nonzero bit of 'x' is set, or 0 if none are set. A deviation for ECLAIR is also introduced. Signed-off-by: Nic

[XEN PATCH][for-4.19 v4 6/8] x86/mce: Move MC_NCLASSES into the enum mctelem_class

2023-10-27 Thread Nicola Vetrini
The definition of MC_NCLASSES contained a violation of MISRA C:2012 Rule 10.1, therefore by moving it as an enumeration constant resolves the violation and makes it more resilient to possible additions to that enum. Signed-off-by: Nicola Vetrini --- This patch has already been picked up in Andrew

[XEN PATCH][for-4.19 v4 8/8] xen/compat: use BUILD_BUG_ON in CHECK_SIZE macros

2023-10-27 Thread Nicola Vetrini
BUILD_BUG_ON is the preferred way to induce a build error upon statically determined incorrect conditions. This also fixes a MISRA C:2012 Rule 10.1 violation in the previous formulation. Signed-off-by: Nicola Vetrini Acked-by: Jan Beulich --- Changes in v2: - replace the construct with a BUILD_

[XEN PATCH][for-4.19 v4 4/8] x86_64/mm: express macro CNT using ISOLATE_LOW_BIT

2023-10-27 Thread Nicola Vetrini
The various definitions of macro CNT (and the related BUILD_BUG_ON) can be rewritten using ISOLATE_LOW_BIT, encapsulating a violation of MISRA C:2012 Rule 10.1. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- Changes in v4: - Changed macro name --- xen/arch/x86/x86_64/mm.c | 1

[XEN PATCH][for-4.19 v4 3/8] xen/pdx: amend definition of PDX_GROUP_COUNT

2023-10-27 Thread Nicola Vetrini
The definition of PDX_GROUP_COUNT causes violations of MISRA C:2012 Rule 10.1, therefore the problematic part now uses the ISOLATE_LOW_BIT macro, which encapsulates the pattern. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- Changes in v4: -CChanged macro name. --- xen/includ

[XEN PATCH][for-4.19 v4 2/8] arm/bitops: encapsulate violation of MISRA C:2012 Rule 10.1

2023-10-27 Thread Nicola Vetrini
The definitions of ffs{l}? violate Rule 10.1, by using the well-known pattern (x & -x); its usage is wrapped by the ISOLATE_LOW_BIT macro. No functional change. Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini Changes in v4: - Changed macro name. --- xen/arch/arm/include/asm/bitop

Re: [PATCH 18/45] hw/sh4/r2d: use pci_init_nic_devices()

2023-10-27 Thread Yoshinori Sato
On Mon, 23 Oct 2023 00:51:33 +0900, David Woodhouse wrote: > > From: David Woodhouse > > Previously, the first PCI NIC would be assigned to slot 2 even if the > user override the model and made it something other than an rtl8139 > which is the default. Everything else would be dynamically assign

Re: [PATCH v2 2/2] x86/Kconfig: Introduce CONFIG_{AMD,INTEL} and conditionalise ucode

2023-10-27 Thread Andrew Cooper
On 27/10/2023 8:12 am, Jan Beulich wrote: > On 26.10.2023 22:55, Andrew Cooper wrote: >> v2: >> * Tweak text > What about the indentation issues mentioned in reply to v1? Bah, slipped my mind.  Sorry. Fixed up locally. ~Andrew

Re: [PATCH v3 13/28] hw/xen: automatically assign device index to block devices

2023-10-27 Thread David Woodhouse
On Fri, 2023-10-27 at 11:32 +0100, Durrant, Paul wrote: > On 27/10/2023 11:25, David Woodhouse wrote: > > On Fri, 2023-10-27 at 10:01 +0100, Durrant, Paul wrote: > > > > > > This code is allocating a name automatically so I think the onus is on > > > it not create a needless clash which is likely

Re: [PATCH] x86/hvm/dom0: fix PVH initrd and metadata placement

2023-10-27 Thread Jan Beulich
On 27.10.2023 13:18, Xenia Ragiadakou wrote: > > On 27/10/23 09:37, Jan Beulich wrote: >> On 26.10.2023 18:55, Xenia Ragiadakou wrote: >>> >>> >>> On 26/10/23 17:55, Jan Beulich wrote: On 26.10.2023 15:58, Xenia Ragiadakou wrote: > > On 26/10/23 15:37, Jan Beulich wrote: >> On 26.

[xen-unstable test] 183547: tolerable FAIL

2023-10-27 Thread osstest service owner
flight 183547 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/183547/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm 7 xen-install fail in 183534 pass in 183547 test-armhf-ar

Re: [PATCH] x86/hvm/dom0: fix PVH initrd and metadata placement

2023-10-27 Thread Xenia Ragiadakou
On 27/10/23 09:37, Jan Beulich wrote: On 26.10.2023 18:55, Xenia Ragiadakou wrote: On 26/10/23 17:55, Jan Beulich wrote: On 26.10.2023 15:58, Xenia Ragiadakou wrote: On 26/10/23 15:37, Jan Beulich wrote: On 26.10.2023 14:35, Xenia Ragiadakou wrote: On 26/10/23 14:51, Jan Beulich wrote

Re: [PATCH v3 13/28] hw/xen: automatically assign device index to block devices

2023-10-27 Thread Durrant, Paul
On 27/10/2023 11:25, David Woodhouse wrote: On Fri, 2023-10-27 at 10:01 +0100, Durrant, Paul wrote: This code is allocating a name automatically so I think the onus is on it not create a needless clash which is likely to have unpredictable results depending on what the guest is. Just avoid any

Re: [PATCH v3 13/28] hw/xen: automatically assign device index to block devices

2023-10-27 Thread David Woodhouse
On Fri, 2023-10-27 at 10:01 +0100, Durrant, Paul wrote: > > This code is allocating a name automatically so I think the onus is on > it not create a needless clash which is likely to have unpredictable > results depending on what the guest is. Just avoid any aliasing in the > first place and th

Re: [PATCH v3 27/28] hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse When instantiating XenBus itself, for each NIC which is configured with either the model unspecified, or set to to "xen" or "xen-net-device", create a corresponding xen-net-device for it. Now we can launch emulated Xen guests wi

Re: [PATCH v3 26/28] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse Eliminate direct access to nd_table[] and nb_nics by processing the the ISA NICs first and then calling pci_init_nic_devices() for the test. It's important to do this *before* the subsequent patch which registers the Xen PV netw

Re: [PATCH v3 25/28] hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse The loop over nd_table[] to add PCI NICs is repeated in quite a few places. Add a helper function to do it. Some platforms also try to instantiate a specific model in a specific slot, to match the real hardware. Add pci_init_nic

Re: [PATCH v3 24/28] net: add qemu_create_nic_bus_devices()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse This will instantiate any NICs which live on a given bus type. Each bus is allowed *one* substitution (for PCI it's virtio → virtio-net-pci, for Xen it's xen → xen-net-device; no point in overengineering it unless we actually wan

Re: [PATCH v3 23/28] net: report list of available models according to platform

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse By noting the models for which a configuration was requested, we can give the user an accurate list of which NIC models were actually available on the platform/configuration that was otherwise chosen. Signed-off-by: David Woodho

Re: [PATCH v3 22/28] net: add qemu_{configure,create}_nic_device(), qemu_find_nic_info()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse Most code which directly accesses nd_table[] and nb_nics uses them for one of two things. Either "I have created a NIC device and I'd like a configuration for it", or "I will create a NIC device *if* there is a configuration for

Re: [PATCH v3 21/28] xen-platform: unplug AHCI disks

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse To support Xen guests using the Q35 chipset, the unplug protocol needs to also remove AHCI disks. Make pci_xen_ide_unplug() more generic, iterating over the children of the PCI device and destroying the "ide-hd" devices. That wo

Re: [PATCH v3 13/28] hw/xen: automatically assign device index to block devices

2023-10-27 Thread Durrant, Paul
On 27/10/2023 09:45, David Woodhouse wrote: On Fri, 2023-10-27 at 08:30 +0100, Durrant, Paul wrote: +    if (blockdev->props.vdev.type == XEN_BLOCK_VDEV_TYPE_INVALID) { +    XenBus *xenbus = XEN_BUS(qdev_get_parent_bus(DEVICE(xendev))); +    char fe_path[XENSTORE_ABS_PATH_MAX + 1]; +  

Re: [PATCH v3 13/28] hw/xen: automatically assign device index to block devices

2023-10-27 Thread David Woodhouse
On Fri, 2023-10-27 at 08:30 +0100, Durrant, Paul wrote: > > > +    if (blockdev->props.vdev.type == XEN_BLOCK_VDEV_TYPE_INVALID) { > > +    XenBus *xenbus = XEN_BUS(qdev_get_parent_bus(DEVICE(xendev))); > > +    char fe_path[XENSTORE_ABS_PATH_MAX + 1]; > > +    char *value; > > +  

Re: [PATCH v3 20/28] net: do not delete nics in net_cleanup()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse In net_cleanup() we only need to delete the netdevs, as those may have state which outlives Qemu when it exits, and thus may actually need to be cleaned up on exit. The nics, on the other hand, are owned by the device which crea

Re: [PATCH v3 19/28] hw/xen: update Xen PV NIC to XenDevice model

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse This allows us to use Xen PV networking with emulated Xen guests, and to add them on the command line or hotplug. Signed-off-by: David Woodhouse --- hw/net/meson.build| 2 +- hw/net/trace-events | 11 + hw/

Re: [PATCH v3 18/28] hw/xen: only remove peers of PCI NICs on unplug

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse When the Xen guest asks to unplug *emulated* NICs, it's kind of unhelpful also to unplug the peer of the *Xen* PV NIC. Signed-off-by: David Woodhouse --- hw/i386/xen/xen_platform.c | 9 +++-- 1 file changed, 7 insertions

Re: [PATCH v3 17/28] hw/xen: add support for Xen primary console in emulated mode

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse The primary console is special because the toolstack maps a page into the guest for its ring, and also allocates the guest-side event channel. The guest's grant table is even primed to export that page using a known grant ref#. A

Re: [XEN PATCH v2 00/10] address violations of MISRA C:2012 Directive 4.10

2023-10-27 Thread Simone Ballarin
On 27/10/23 00:50, Stefano Stabellini wrote: On Thu, 26 Oct 2023, Jan Beulich wrote: On 25.10.2023 23:12, Stefano Stabellini wrote: On Wed, 25 Oct 2023, Julien Grall wrote: On 25/10/2023 17:01, Jan Beulich wrote: On 25.10.2023 17:58, Julien Grall wrote: On 25/10/2023 09:18, Jan Beulich wrote

Re: [PATCH v3 14/28] hw/xen: add get_frontend_path() method to XenDeviceClass

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse The primary Xen console is special. The guest's side is set up for it by the toolstack automatically and not by the standard PV init sequence. Accordingly, its *frontend* doesn't appear in …/device/console/0 either; instead it a

Re: [PATCH v3 13/28] hw/xen: automatically assign device index to block devices

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse There's no need to force the user to assign a vdev. We can automatically assign one, starting at xvda and searching until we find the first disk name that's unused. This means we can now allow '-drive if=xen,file=xxx' to work wi

Re: [PATCH v3 08/28] i386/xen: Ignore VCPU_SSHOTTMR_future flag in set_singleshot_timer()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse Upstream Xen now ignores this flag¹, since the only guest kernel ever to use it was buggy. ¹ https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=19c6cbd909 Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- t

Re: [XEN PATCH] xen/set_{c,p}x_pminfo: address violations od MISRA C:2012 Rule 8.3

2023-10-27 Thread Federico Serafini
On 27/10/23 09:07, Jan Beulich wrote: On 27.10.2023 01:00, Stefano Stabellini wrote: On Thu, 26 Oct 2023, Federico Serafini wrote: @@ -675,16 +673,16 @@ static int __init cpufreq_cmdline_parse(const char *s, const char *e) static int cf_check cpu_callback( struct notifier_block *nfb

Re: [PATCH v3 07/28] hw/xen: use correct default protocol for xen-block on x86

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse Even on x86_64 the default protocol is the x86-32 one if the guest doesn't specifically ask for x86-64. Fixes: b6af8926fb85 ("xen: add implementations of xen-block connect and disconnect functions...") Signed-off-by: David Wood

Re: [PATCH v3 06/28] hw/xen: take iothread mutex in xen_evtchn_reset_op()

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse The xen_evtchn_soft_reset() function requires the iothread mutex, but is also called for the EVTCHNOP_reset hypercall. Ensure the mutex is taken in that case. Fixes: a15b10978fe6 ("hw/xen: Implement EVTCHNOP_reset") Signed-off-b

Re: [PATCH v3 05/28] hw/xen: fix XenStore watch delivery to guest

2023-10-27 Thread Durrant, Paul
On 25/10/2023 15:50, David Woodhouse wrote: From: David Woodhouse When fire_watch_cb() found the response buffer empty, it would call deliver_watch() to generate the XS_WATCH_EVENT message in the response buffer and send an event channel notification to the guest… without actually *copying* the

Re: [PATCH v2 2/2] x86/Kconfig: Introduce CONFIG_{AMD,INTEL} and conditionalise ucode

2023-10-27 Thread Jan Beulich
On 26.10.2023 22:55, Andrew Cooper wrote: > We eventually want to be able to build a stripped down Xen for a single > platform. Make a start with CONFIG_{AMD,INTEL} (hidden behind EXPERT, but > available to randconfig), and adjust the microcode logic. > > No practical change. > > Signed-off-by:

Re: [XEN PATCH] xen/set_{c,p}x_pminfo: address violations od MISRA C:2012 Rule 8.3

2023-10-27 Thread Jan Beulich
On 27.10.2023 01:00, Stefano Stabellini wrote: > On Thu, 26 Oct 2023, Federico Serafini wrote: >> @@ -675,16 +673,16 @@ static int __init cpufreq_cmdline_parse(const char *s, >> const char *e) >> static int cf_check cpu_callback( >> struct notifier_block *nfb, unsigned long action, void *hcp