Re: [XEN PATCH 01/13] xen/x86: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Jan Beulich
On 20.06.2023 22:44, Stefano Stabellini wrote: > On Tue, 20 Jun 2023, Jan Beulich wrote: >> On 20.06.2023 12:34, 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 app

[xen-unstable-smoke test] 181527: trouble: blocked/broken/pass

2023-06-20 Thread osstest service owner
flight 181527 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/181527/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf broken build-armhf

[qemu-mainline test] 181526: regressions - trouble: blocked/broken/fail/pass

2023-06-20 Thread osstest service owner
flight 181526 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/181526/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf broken build-armhf 4 host-ins

[linux-linus test] 181520: trouble: blocked/broken/fail/pass

2023-06-20 Thread osstest service owner
flight 181520 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/181520/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf broken build-armhf

[PATCH] docs/misra: add Rules 8.2, 8.3, 8.14

2023-06-20 Thread Stefano Stabellini
From: Stefano Stabellini Signed-off-by: Stefano Stabellini --- docs/misra/rules.rst | 16 1 file changed, 16 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 11b9c42b70..9caf43968c 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -213

Re: [PATCH] xen/decompress: Drop bool_t and use bool instead

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 2023, Andrew Cooper wrote: > In particular, the libxg wrapper for unxz.c uses char for bool_t which is a > major antipattern. Luckily the code doesn't suffer from truncated values. > > No functional change. > > Signed-off-by: Andrew Cooper FYI I checked patchew and it took the p

Re: [PATCH v2 13/16] xen-blkback: Implement diskseq checks

2023-06-20 Thread Demi Marie Obenour
On Mon, Jun 12, 2023 at 10:09:39AM +0200, Roger Pau Monné wrote: > On Fri, Jun 09, 2023 at 12:55:39PM -0400, Demi Marie Obenour wrote: > > On Fri, Jun 09, 2023 at 05:13:45PM +0200, Roger Pau Monné wrote: > > > On Thu, Jun 08, 2023 at 11:33:26AM -0400, Demi Marie Obenour wrote: > > > > On Thu, Jun 0

Re: [PATCH] build: Drop CONFIG_$ARCH_$(XEN_OS) definitions

2023-06-20 Thread Alistair Francis
On Tue, Jun 20, 2023 at 4:07 AM Andrew Cooper wrote: > > These aren't used, and are not obvious useful either. > > tools/ does have some logic which works on $(XEN_OS) directly, and some on > CONFIG_$(XEN_OS) too, but this isn't how we typically refer to things. > > The only user ever of this sche

Re: [PATCH v4 04/34] pgtable: Create struct ptdesc

2023-06-20 Thread Vishal Moola
On Tue, Jun 20, 2023 at 4:05 PM Jason Gunthorpe wrote: > > On Tue, Jun 20, 2023 at 01:01:39PM -0700, Vishal Moola wrote: > > On Fri, Jun 16, 2023 at 5:38 AM Jason Gunthorpe wrote: > > > > > > On Mon, Jun 12, 2023 at 02:03:53PM -0700, Vishal Moola (Oracle) wrote: > > > > Currently, page table info

Re: [PATCH v4 04/34] pgtable: Create struct ptdesc

2023-06-20 Thread Jason Gunthorpe
On Tue, Jun 20, 2023 at 01:01:39PM -0700, Vishal Moola wrote: > On Fri, Jun 16, 2023 at 5:38 AM Jason Gunthorpe wrote: > > > > On Mon, Jun 12, 2023 at 02:03:53PM -0700, Vishal Moola (Oracle) wrote: > > > Currently, page table information is stored within struct page. As part > > > of simplifying s

Re: [PATCH v5 1/3] xen: Add files needed for minimal ppc64le build

2023-06-20 Thread Andrew Cooper
On 20/06/2023 10:27 pm, Timothy Pearson wrote: >> On 20/06/2023 7:12 pm, Shawn Anastasio wrote: >>> diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch/ppc/xen.lds.S >>> new file mode 100644 >>> index 00..f75d9be4ed >>> --- /dev/null >>> +++ b/xen/arch/ppc/xen.lds.S >>> >>> +/** >>> + * OF's ba

Re: [PATCH v5 1/3] xen: Add files needed for minimal ppc64le build

2023-06-20 Thread Timothy Pearson
- Original Message - > From: "Andrew Cooper" > To: "Shawn Anastasio" , > xen-devel@lists.xenproject.org > Cc: "Timothy Pearson" , "George Dunlap" > , "Jan Beulich" > , "Julien Grall" , "Stefano Stabellini" > , "Wei Liu" > > Sent: Tuesday, June 20, 2023 4:21:22 PM > Subject: Re: [PAT

Re: [PATCH] build: Drop CONFIG_$ARCH_$(XEN_OS) definitions

2023-06-20 Thread Stefano Stabellini
On Mon, 19 Jun 2023, Andrew Cooper wrote: > These aren't used, and are not obvious useful either. > > tools/ does have some logic which works on $(XEN_OS) directly, and some on > CONFIG_$(XEN_OS) too, but this isn't how we typically refer to things. > > The only user ever of this scheme was intro

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

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 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 > represented in an unsigned type". > > I propose to use "U"

Re: [PATCH v5 1/3] xen: Add files needed for minimal ppc64le build

2023-06-20 Thread Andrew Cooper
On 20/06/2023 7:12 pm, Shawn Anastasio wrote: > diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch/ppc/xen.lds.S > new file mode 100644 > index 00..f75d9be4ed > --- /dev/null > +++ b/xen/arch/ppc/xen.lds.S > > +/** > + * OF's base load address is 0x40 (XEN_VIRT_START). > + * By defining se

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

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 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 > represented in an unsigned type". > > I propose to use "U"

Re: [XEN PATCH 10/13] xen/x86: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 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 > represented in an unsigned type". > > I propose to use "U"

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

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 2023, Jan Beulich wrote: > On 20.06.2023 12:35, Simone Ballarin wrote: > > --- a/xen/include/public/io/ring.h > > +++ b/xen/include/public/io/ring.h > > @@ -36,11 +36,11 @@ > > typedef unsigned int RING_IDX; > > > > /* Round a 32-bit unsigned constant down to the nearest power of

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

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 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 > represented in an unsigned type". > > I propose to use "U"

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

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 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 > represented in an unsigned type". > > I propose to use "U"

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

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 2023, Jan Beulich wrote: > On 20.06.2023 12:34, 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 > > repre

Re: [XEN PATCH 03/13] xen/x86: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 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 > represented in an unsigned type". > > I propose to use "U"

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

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 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 > represented in an unsigned type". > > I propose to use "U"

Re: [XEN PATCH 01/13] xen/x86: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 2023, Jan Beulich wrote: > On 20.06.2023 12:34, 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 > > repre

[xen-unstable-smoke test] 181523: trouble: blocked/broken/pass

2023-06-20 Thread osstest service owner
flight 181523 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/181523/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf broken build-armhf

Re: [PATCH v1] xen/arm: arm32: Add support to identify the Cortex-R52 processor

2023-06-20 Thread Julien Grall
Hi Ayan, On 20/06/2023 19:28, Ayan Kumar Halder wrote: On 20/06/2023 17:41, Julien Grall wrote: Hi, Hi Julien, On 20/06/2023 16:17, Ayan Kumar Halder wrote: Add a special configuration (CONFIG_AARCH32_V8R) to setup the Cortex-R52 specifics. Cortex-R52 is an Arm-V8R AArch32 processor. Ref

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

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 2023, Luca Fancellu wrote: > > On 20 Jun 2023, at 13:39, Jan Beulich wrote: > > > > On 20.06.2023 12:34, Simone Ballarin wrote: > >> --- a/xen/drivers/passthrough/amd/iommu-defs.h > >> +++ b/xen/drivers/passthrough/amd/iommu-defs.h > >> @@ -38,49 +38,49 @@ > >> ((uint64_t)(

Re: [XEN PATCH v2] docs/misra: document the C dialect and translation toolchain assumptions.

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 2023, Jan Beulich wrote: > On 20.06.2023 14:10, Roberto Bagnara wrote: > > + * - Non-standard tokens > > + - ARM64, X86_64 > > + - _Static_assert: > > + see Section "2.1 C Language" of GCC_MANUAL. > > + asm, __asm__: > > + see Sections "6.48 Alternat

Re: [XEN PATCH v2] docs/misra: document the C dialect and translation toolchain assumptions.

2023-06-20 Thread Stefano Stabellini
On Tue, 20 Jun 2023, Roberto Bagnara wrote: > This document specifies the C language dialect used by Xen and > the assumptions Xen makes on the translation toolchain. > > Signed-off-by: Roberto Bagnara Hi Roberto, This version of the document is a lot better! I don't have any further comments b

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

2023-06-20 Thread Stewart Hildebrand
On 6/13/23 06:32, Volodymyr Babchuk wrote: ... > diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c > index 652807a4a4..1270174e78 100644 > --- a/xen/drivers/vpci/vpci.c > +++ b/xen/drivers/vpci/vpci.c > @@ -38,20 +38,32 @@ extern vpci_register_init_t *const __end_vpci_array[]; > >

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

2023-06-20 Thread Luca Fancellu
> On 20 Jun 2023, at 13:39, Jan Beulich wrote: > > On 20.06.2023 12:34, Simone Ballarin wrote: >> --- a/xen/drivers/passthrough/amd/iommu-defs.h >> +++ b/xen/drivers/passthrough/amd/iommu-defs.h >> @@ -38,49 +38,49 @@ >> ((uint64_t)(offset) << (12 + (PTE_PER_TABLE_SHIFT * ((level) - 1))

[qemu-mainline test] 181516: regressions - trouble: blocked/broken/fail/pass

2023-06-20 Thread osstest service owner
flight 181516 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/181516/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf broken build-armhf 4 host-ins

Re: [PATCH v4 04/34] pgtable: Create struct ptdesc

2023-06-20 Thread Vishal Moola
On Fri, Jun 16, 2023 at 5:38 AM Jason Gunthorpe wrote: > > On Mon, Jun 12, 2023 at 02:03:53PM -0700, Vishal Moola (Oracle) wrote: > > Currently, page table information is stored within struct page. As part > > of simplifying struct page, create struct ptdesc for page table > > information. > > > >

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

2023-06-20 Thread Luca Fancellu
> On 20 Jun 2023, at 14:59, Simone Ballarin wrote: > > Hi, > > Il giorno mar 20 giu 2023 alle ore 15:20 Jan Beulich ha > scritto: > On 20.06.2023 12:35, Simone Ballarin wrote: > > --- a/xen/common/gunzip.c > > +++ b/xen/common/gunzip.c > > @@ -11,7 +11,7 @@ static unsigned char *__initdata

[linux-5.4 test] 181515: trouble: blocked/broken/fail/pass

2023-06-20 Thread osstest service owner
flight 181515 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/181515/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf broken build-armhf

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

2023-06-20 Thread Jason Andryuk
On Mon, Jun 19, 2023 at 10:24 AM Jan Beulich wrote: > > On 14.06.2023 20:02, Jason Andryuk wrote: > > --- a/xen/arch/x86/acpi/cpufreq/hwp.c > > +++ b/xen/arch/x86/acpi/cpufreq/hwp.c > > @@ -537,6 +537,29 @@ static const struct cpufreq_driver __initconstrel > > hwp_cpufreq_driver = > > .updat

Re: [PATCH v1] xen/arm: arm32: Add support to identify the Cortex-R52 processor

2023-06-20 Thread Ayan Kumar Halder
On 20/06/2023 17:41, Julien Grall wrote: Hi, Hi Julien, On 20/06/2023 16:17, Ayan Kumar Halder wrote: Add a special configuration (CONFIG_AARCH32_V8R) to setup the Cortex-R52 specifics. Cortex-R52 is an Arm-V8R AArch32 processor. Refer ARM DDI 0487I.a ID081822, G8-9647, G8.2.112 MIDR, bit

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

2023-06-20 Thread Jason Andryuk
On Mon, Jun 19, 2023 at 7:38 AM Jan Beulich wrote: > > On 14.06.2023 20:02, Jason Andryuk wrote: > > Falling back from cpufreq=hwp to cpufreq=xen is a more user-friendly > > choice than disabling cpufreq when HWP is not available. Specifying > > cpufreq=hwp indicates the user wants cpufreq, so, i

[PATCH v5 3/3] maintainers: Add ppc64 maintainer

2023-06-20 Thread Shawn Anastasio
Signed-off-by: Shawn Anastasio --- MAINTAINERS | 4 1 file changed, 4 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7a07949e1d..64c9cc89ed 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -458,6 +458,10 @@ X: xen/arch/x86/acpi/lib.c F: xen/drivers/cpufreq/ F: xen/include

[PATCH v5 0/3] Initial support for Power

2023-06-20 Thread Shawn Anastasio
Hello all, This patch series adds support for building a minimal image for Power ISA 2.07B+ (POWER8+) systems. In addition to a patch adding support to the build system and a simple infinite loop at the entrypoint, patches to add ppc64le support to the CI as well as a MAINTAINERS update are includ

[PATCH v5 1/3] xen: Add files needed for minimal ppc64le build

2023-06-20 Thread Shawn Anastasio
Add the build system changes required to build for ppc64le (POWER8+). As of now the resulting image simply boots to an infinite loop. $ make XEN_TARGET_ARCH=ppc64 -C xen build This port targets POWER8+ CPUs running in Little Endian mode specifically, and does not boot on older machines. Additiona

[PATCH v5 2/3] automation: Add ppc64le cross-build jobs

2023-06-20 Thread Shawn Anastasio
Add build jobs to cross-compile Xen for ppc64le. Signed-off-by: Shawn Anastasio Acked-by: Stefano Stabellini Acked-by: Andrew Cooper --- automation/gitlab-ci/build.yaml | 60 + 1 file changed, 60 insertions(+) diff --git a/automation/gitlab-ci/build.yaml b/auto

[PATCH] hw/xen: Clarify (lack of) error handling in transaction_commit()

2023-06-20 Thread David Woodhouse
From: David Woodhouse Coverity was unhappy (CID 1508359) because we didn't check the return of init_walk_op() in transaction_commit(), despite doing so at every other call site. Strictly speaking, this is a false positive since it can never fail. It only fails for invalid user input (transaction

[PATCH] xen/decompress: Drop bool_t and use bool instead

2023-06-20 Thread Andrew Cooper
In particular, the libxg wrapper for unxz.c uses char for bool_t which is a major antipattern. Luckily the code doesn't suffer from truncated values. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Stefano Stabellini CC: Julien Gral

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-20 Thread Kim, Dongwon
Hello, I just came across this discussion regarding s3/s4 support in virtio-gpu driver and QEMU. We saw similar problem a while ago (QEMU deletes all objects upon suspension) and came up with an experimental solution that is basically making virtio-gpu driver to do object creation for al

Re: [PULL 05/27] hw/xen: Watches on XenStore transactions

2023-06-20 Thread David Woodhouse
On Tue, 2023-06-20 at 13:19 +0100, Peter Maydell wrote: > On Fri, 2 Jun 2023 at 18:06, Peter Maydell > wrote: > > > > On Tue, 2 May 2023 at 18:08, Peter Maydell > > wrote: > > > > > > On Tue, 7 Mar 2023 at 18:27, David Woodhouse > > > wrote: > > > > > > > > From: David Woodhouse > > > > Hi;

[PATCH] x86: Drop opt_pku entirely

2023-06-20 Thread Andrew Cooper
This option is particularly dubious as Xen does not use Protection Keys, owing to the sharing of pagetables with PV guests. All this option does is hide PKU by default from HVM guests, and is therefore redundant with the more generic cpuid=no-pku. The variable ought to be in __initdata given it's

[PATCH] x86/vpmu: Simplify is_pmc_quirk

2023-06-20 Thread Andrew Cooper
This should be static, and there's no need for a separate (non-init, even) function to perform a simple equality test. Drop the is_ prefix which is gramatically questionable, and make it __ro_after_init. Leave a TODO, because the behaviour is definitely wrong to be applied to ~all modern Intel CP

[PATCH v1 20/23] xen platform: unplug ahci object

2023-06-20 Thread Joel Upham
This will unplug the ahci device when the Xen driver calls for an unplug. This has been tested to work in linux and Windows guests. When q35 is detected, we will remove the ahci controller with the hard disks. In the libxl config, cdrom devices are put on a seperate ahci controller. This allows fo

[PATCH v1 18/23] xen/pt: add VC/VC9/MFVC PCIe Extended Capabilities descriptors and sizing

2023-06-20 Thread Joel Upham
Virtual Channel/MFVC capabilities are relatively useless for emulation (passing through accesses to them should be enough in most cases) yet they have hardest format of all PCIe Extended Capabilities, mostly because VC capability format allows the sparse config space layout with gaps between the pa

[PATCH v1 16/23] xen/pt: add descriptors and size calculation for RCLD/ACS/PMUX/DPA/MCAST/TPH/DPC PCIe Extended Capabilities

2023-06-20 Thread Joel Upham
Add few more PCIe Extended Capabilities entries to the xen_pt_emu_reg_grps[] array along with their corresponding *_size_init() functions. All these capabilities have non-fixed size but their size calculation is very simple, hence adding them in a single batch. For every capability register group

[PATCH v1 17/23] xen/pt: add Resizable BAR PCIe Extended Capability descriptor and sizing

2023-06-20 Thread Joel Upham
Unlike other PCIe Extended Capabilities, we currently cannot allow attempts to use Resizable BAR Capability. Without specifically handling BAR resizing we're likely end up with corrupted MMIO hole layout if guest OS will attempt to use this feature. Actually, recent Windows versions started to unde

[PATCH v1 19/23] xen/pt: Fake capability id

2023-06-20 Thread Joel Upham
Some PCIe capabilities needed to be faked for the xen implementation to work. This is the situation when we were asked to hide (aka "hardwire to 0") some PCIe ext capability, but it was located at offset 0x100 in PCIe config space. In this case we can't simply exclude it from the linked list of ca

[PATCH v1 15/23] xen/pt: add AER PCIe Extended Capability descriptor and sizing

2023-06-20 Thread Joel Upham
The patch provides Advanced Error Reporting PCIe Extended Capability description structure and corresponding capability sizing function. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt_config_init.c | 72 + 1 file changed, 72 ins

[PATCH v1 13/23] xen/pt: add Vendor-specific PCIe Extended Capability descriptor and sizing

2023-06-20 Thread Joel Upham
The patch provides Vendor-specific PCIe Extended Capability description structure and corresponding sizing function. In this particular case the size of the Vendor capability is available in the VSEC Length field. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- hw/xen/xen_pt_con

[PATCH v1 14/23] xen/pt: add fixed-size PCIe Extended Capabilities descriptors

2023-06-20 Thread Joel Upham
This adds description structures for all fixed-size PCIe Extended Capabilities. For every capability register group, only 2 registers are emulated currently: Capability ID (16 bit) and Next Capability Offset/Version (16 bit). Both needed to implement selective capability hiding. All other register

[PATCH v1 12/23] xen/pt: allow to hide PCIe Extended Capabilities

2023-06-20 Thread Joel Upham
We need to hide some unwanted PCI/PCIe capabilities for passed through devices. Normally we do this by marking the capability register group as XEN_PT_GRP_TYPE_HARDWIRED which exclude this capability from the capability list and returns zeroes on attempts to read capability body. Skipping the capab

[PATCH v1 11/23] xen/pt: handle PCIe Extended Capabilities Next register

2023-06-20 Thread Joel Upham
The patch adds new xen_pt_ext_cap_ptr_reg_init function which is used to initialize the emulated next pcie extended capability pointer. Primary mission of this function is to have a method to selectively hide some extended capabilities from the capability linked list, skipping them by altering the

[PATCH v1 10/23] xen/pt: add support for PCIe Extended Capabilities and larger config space

2023-06-20 Thread Joel Upham
This patch provides basic facilities for PCIe Extended Capabilities and support for controlled (via s->pcie_enabled_dev flag) access to PCIe config space (>256). PCIe Extended Capabilities make use of 16-bit capability ID. Also, a capability size might exceed 8-bit width. So as the very first step

[PATCH v1 09/23] xen/pt: Xen PCIe passthrough support for Q35: bypass PCIe topology check

2023-06-20 Thread Joel Upham
Compared to legacy i440 system, there are certain difficulties while passing through PCIe devices to guest OSes like Windows 7 and above on platforms with native support of PCIe bus (in our case Q35). This problem is not applicable to older OSes like Windows XP -- PCIe passthrough on such OSes can

[PATCH v1 08/23] xen/pt: determine the legacy/PCIe mode for a passed through device

2023-06-20 Thread Joel Upham
Even if we have some real PCIe device being passed through to a guest, there are situations when we cannot use its PCIe features, primarily allowing to access extended (>256) config space. Basically, we can allow reading PCIe extended config space only if both the device and emulated system are PC

[PATCH v1 07/23] xen/pt: avoid reading PCIe device type and cap version multiple times

2023-06-20 Thread Joel Upham
xen_pt_config_init.c reads Device/Port Type and Capability version fields in many places. Two functions are used for this purpose: get_capability_version and get_device_type. These functions perform PCI conf space reading every time they're called. Another bad thing is that these functions know not

[PATCH v1 06/23] xen/pt: XenHostPCIDevice: provide functions for PCI Capabilities and PCIe Extended Capabilities enumeration

2023-06-20 Thread Joel Upham
This patch introduces 2 new functions, - xen_host_pci_find_next_ext_cap (actually a reworked xen_host_pci_find_ext_cap_offset function which is unused) - xen_host_pci_find_next_cap These functions allow to search for PCI/PCIe capabilities in a uniform way. Both functions allow to search either a

[PATCH v1 1/1] Q35 Support

2023-06-20 Thread Joel Upham
--- hw/acpi/ich9.c| 22 +- hw/acpi/pcihp.c |6 +- hw/core/machine.c | 19 + hw/i386/pc_piix.c |3 +- hw/i386/pc_q35.c | 39 +- hw/i386/xen/xen-hvm.c |7 +- hw/i386/xen/xen_platform.c| 19 +- hw/isa/l

[PATCH v1 01/23] pc/xen: Xen Q35 support: provide IRQ handling for PCI devices

2023-06-20 Thread Joel Upham
The primary difference in PCI device IRQ management between Xen HVM and QEMU is that Xen PCI IRQs are "device-centric" while QEMU PCI IRQs are "chipset-centric". Namely, Xen uses PCI device BDF and INTx as coordinates to assert IRQ while QEMU finds out to which chipset PIRQ the IRQ is routed throug

[PATCH v2 10/12] hvmloader: use libacpi to build MCFG table

2023-06-20 Thread Joel Upham
This patch extends hvmloader_acpi_build_tables() with code which detects if MMCONFIG is available -- i.e. initialized and enabled (+we're running on Q35), obtains its base address and size and asks libacpi to build MCFG table for it via setting the flag ACPI_HAS_MCFG in a manner similar to other op

[PATCH v2 07/12] hvmloader: allocate MMCONFIG area in the MMIO hole + minor code refactoring

2023-06-20 Thread Joel Upham
Much like normal PCI BARs or other chipset-specific memory-mapped resources, MMCONFIG area needs space in MMIO hole, so we must allocate it manually. The actual MMCONFIG size depends on a number of PCI buses available which should be covered by ECAM. Possible options are 64MB, 128MB and 256MB. As

[PATCH v2 12/12] libxl_dm: handle the new 6 port ahci controller

2023-06-20 Thread Joel Upham
This patch adds support to allow for 6 emulated devices on a controller, and handling cdrom drives properly. This is not from the original patch series. Signed-off-by: Joel Upham --- tools/libs/light/libxl_dm.c | 40 - 1 file changed, 31 insertions(+), 9 delet

[PATCH v2 08/12] libxl: Q35 support (new option device_model_machine)

2023-06-20 Thread Joel Upham
Provide a new domain config option to select the emulated machine type, device_model_machine. It has following possible values: - "i440" - i440 emulation (default) - "q35" - emulate a Q35 machine. By default, the storage interface is AHCI. Note that omitting device_model_machine parameter means i4

[PATCH v2 09/12] libacpi: build ACPI MCFG table if requested

2023-06-20 Thread Joel Upham
This adds construct_mcfg() function to libacpi which allows to build MCFG table for a given mmconfig_addr/mmconfig_len pair if the ACPI_HAS_MCFG flag was specified in acpi_config struct. The maximum bus number is calculated from mmconfig_len using MCFG_SIZE_TO_NUM_BUSES macro (1MByte of MMIO space

[PATCH v2 11/12] docs: provide description for device_model_machine option

2023-06-20 Thread Joel Upham
This patch adds description for 'device_model_machine' option which allows to control which chipset will be emulated by device model. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- docs/man/xl.cfg.5.pod.in | 27 +++ 1 file changed, 27 insertions(+) diff

[PATCH v2 03/12] hvmloader: add function to query an emulated machine type (i440/Q35)

2023-06-20 Thread Joel Upham
This adds a new function get_pc_machine_type() which allows to determine the emulated chipset type. Supported return values: - MACHINE_TYPE_I440 - MACHINE_TYPE_Q35 - MACHINE_TYPE_UNKNOWN, results in the error message being printed followed by calling BUG() in hvmloader. Signed-off-by: Alexey Ge

[PATCH v2 06/12] hvmloader: add basic Q35 support

2023-06-20 Thread Joel Upham
This patch does following: 1. Move PCI-device specific initialization out of pci_setup function to the newly created class_specific_pci_device_setup function to simplify code. 2. PCI-device specific initialization extended with LPC controller initialization 3. Initialize PIRQA...{PIRQD, PIRQH} r

[PATCH v2 01/12] libacpi: new DSDT ACPI table for Q35

2023-06-20 Thread Joel Upham
This patch adds the DSDT table for Q35 (new tools/libacpi/dsdt_q35.asl file). There are not many differences with dsdt.asl (for i440) at the moment, namely: - BDF location of LPC Controller - Minor changes related to FDC detection - Addition of _OSC method to inform OSPM about PCIe features suppor

[PATCH v2 05/12] hvmloader: add Q35 DSDT table loading

2023-06-20 Thread Joel Upham
Allows to select Q35 DSDT table in hvmloader_acpi_build_tables(). Function get_pc_machine_type() is used to select a proper table (i440/q35). As we are bound to the qemu-xen device model for Q35, no need to initialize config->dsdt_15cpu/config->dsdt_15cpu_len fields. Added the seabios/ovmf loadin

[PATCH v2 04/12] hvmloader: add ACPI enabling for Q35

2023-06-20 Thread Joel Upham
In order to turn on ACPI for OS, we need to write a chipset-specific value to SMI_CMD register (sort of imitation of the APM->ACPI switch on real systems). Modify acpi_enable_sci() function to support both i440 and Q35 emulation. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- t

[PATCH v2 02/12] Makefile: build and use new DSDT table for Q35

2023-06-20 Thread Joel Upham
Provide building for newly added dsdt_q35.asl file, in a way similar to dsdt.asl. Note that '15cpu' ACPI tables are only applicable to qemu-traditional (which have no support for Q35), so we need to use 'anycpu' version only. Signed-off-by: Alexey Gerasimenko Signed-off-by: Joel Upham --- tool

[PATCH v2 00/12] Q35 Support

2023-06-20 Thread Joel Upham
Q35 support using Qemu's device emulation. I based the patches from 2017 found on the mailing list here: https://lists.xenproject.org/archives/html/xen-devel/2018-03/msg01176.html I have been using a version of these patches on Xen 4.16 with Qemu version 4.1 for over 6 months. The guest VMs are

Re: [PATCH v1] xen/arm: arm32: Add support to identify the Cortex-R52 processor

2023-06-20 Thread Julien Grall
Hi, On 20/06/2023 16:17, Ayan Kumar Halder wrote: Add a special configuration (CONFIG_AARCH32_V8R) to setup the Cortex-R52 specifics. Cortex-R52 is an Arm-V8R AArch32 processor. Refer ARM DDI 0487I.a ID081822, G8-9647, G8.2.112 MIDR, bits[31:24] = 0x41 , Arm Ltd bits[23:20] = Implementation de

Re: [PATCH 00/13] lib{xc,xl}: support for guest MSR features

2023-06-20 Thread Andrew Cooper
On 16/06/2023 2:10 pm, Roger Pau Monne wrote: > Hello, > > The following series adds support for handling guest MSR features as > defined in arch-x86/cpufeatureset.h. > > The end result is the user being able to use such features with the > xl.cfg(5) cpuid option. This also involves adding support

[xen-unstable test] 181513: trouble: blocked/broken/fail/pass

2023-06-20 Thread osstest service owner
flight 181513 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/181513/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf broken build-armhf

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

2023-06-20 Thread Stewart Hildebrand
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. Signed-off-by: Oleksandr Andrushchenko Signed-off-by: Rahul Singh Signed-off-by: Stewart Hildebrand --- There ar

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

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

Re: [PATCH v4 2/4] xen: Add files needed for minimal ppc64le build

2023-06-20 Thread Shawn Anastasio
On 6/20/23 5:15 AM, Jan Beulich wrote: > On 16.06.2023 19:48, Shawn Anastasio wrote: >> --- /dev/null >> +++ b/xen/arch/ppc/Kconfig >> @@ -0,0 +1,42 @@ >> +config PPC >> +def_bool y >> + >> +config PPC64 >> +def_bool y >> +select 64BIT >> + >> +config ARCH_DEFCONFIG >> +string >> +

[PATCH v1] xen/arm: arm32: Add support to identify the Cortex-R52 processor

2023-06-20 Thread Ayan Kumar Halder
Add a special configuration (CONFIG_AARCH32_V8R) to setup the Cortex-R52 specifics. Cortex-R52 is an Arm-V8R AArch32 processor. Refer ARM DDI 0487I.a ID081822, G8-9647, G8.2.112 MIDR, bits[31:24] = 0x41 , Arm Ltd bits[23:20] = Implementation defined bits[19:16] = 0xf , Arch features are individua

Re: [XEN PATCH v2] docs/misra: document the C dialect and translation toolchain assumptions.

2023-06-20 Thread Jan Beulich
On 20.06.2023 14:10, Roberto Bagnara wrote: > + * - Token pasting of ',' and __VA_ARGS__ > + - ARM64, X86_64 > + - See Section "6.21 Macros with a Variable Number of Arguments" of > GCC_MANUAL. > + > + * - No arguments for '...' parameter of variadic macro > + - ARM64, X86_64 > +

Re: [XEN PATCH v2] docs/misra: document the C dialect and translation toolchain assumptions.

2023-06-20 Thread Jan Beulich
On 20.06.2023 14:10, Roberto Bagnara wrote: > + * - Arithmetic operator on void type > + - ARM64, X86_64 > + - See Section "6.24 Arithmetic on void- and Function-Pointers" of > GCC_MANUAL." The first line is misleading - we don't (and can't) do arithmetic on void. What we do is arithmet

Re: [XEN PATCH v2] docs/misra: document the C dialect and translation toolchain assumptions.

2023-06-20 Thread Jan Beulich
On 20.06.2023 14:10, Roberto Bagnara wrote: > + * - Non-standard tokens > + - ARM64, X86_64 > + - _Static_assert: > + see Section "2.1 C Language" of GCC_MANUAL. > + asm, __asm__: > + see Sections "6.48 Alternate Keywords" and "6.47 How to Use Inline > Assembly La

Re: [PATCH 04/13] libx86: introduce helper to fetch msr entry

2023-06-20 Thread Jan Beulich
On 16.06.2023 15:10, Roger Pau Monne wrote: > @@ -119,6 +103,21 @@ int x86_msr_copy_from_buffer(struct cpu_policy *p, > return rc; > } > > +const uint64_t *x86_msr_get_entry_const(const struct cpu_policy *p, > +uint32_t idx) I don't think idx needs t

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

2023-06-20 Thread Simone Ballarin
Hi, Il giorno mar 20 giu 2023 alle ore 15:20 Jan Beulich ha scritto: > On 20.06.2023 12:35, Simone Ballarin wrote: > > --- a/xen/common/gunzip.c > > +++ b/xen/common/gunzip.c > > @@ -11,7 +11,7 @@ static unsigned char *__initdata window; > > static memptr __initdata free_mem_ptr; > > static me

Re: [XEN PATCH v2 1/3] xen/arch/arm: fix violations of MISRA C:2012 Rule 3.1

2023-06-20 Thread Nicola Vetrini
Hi, On 19/06/23 12:29, Julien Grall wrote: Hi, On 19/06/2023 11:25, Jan Beulich wrote: On 19.06.2023 12:01, Julien Grall wrote: On 19/06/2023 10:56, Nicola Vetrini wrote: In the files `xen/arch/arm/include/asm/arm(32|64)/flushtlb.h' there are a few occurrences of nested '//' character sequen

Re: [xen-unstable-smoke test] 181514: trouble: blocked/broken/pass

2023-06-20 Thread Anthony PERARD
On Tue, Jun 20, 2023 at 12:02:46PM +, osstest service owner wrote: > flight 181514 xen-unstable-smoke real [real] > http://logs.test-lab.xenproject.org/osstest/logs/181514/ > > Failures and problems with tests :-( > > Tests which did not succeed and are blocking, > including tests which could

Re: [XEN PATCH 04/13] xen/arm: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Simone Ballarin
Hi, Il giorno mar 20 giu 2023 alle ore 13:03 Julien Grall ha scritto: > Hi, > > On 20/06/2023 11:34, Simone Ballarin wrote: > > From: Gianluca Luparini > > Is this person the original author of this patch? If so... > > > > > The xen sources contains violations of MISRA C:2012 Rule 7.2 whose > h

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

2023-06-20 Thread Jan Beulich
On 20.06.2023 12:35, Simone Ballarin wrote: > --- a/xen/common/gunzip.c > +++ b/xen/common/gunzip.c > @@ -11,7 +11,7 @@ static unsigned char *__initdata window; > static memptr __initdata free_mem_ptr; > static memptr __initdata free_mem_end_ptr; > > -#define WSIZE 0x8000 > +#defi

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

2023-06-20 Thread Jan Beulich
On 20.06.2023 12:35, 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: [PATCH 10/11] tools/xenstore: drop use of tdb

2023-06-20 Thread Julien Grall
Hi Juergen, On 30/05/2023 10:13, Juergen Gross wrote: Today all Xenstore nodes are stored in a TDB data base. This data base has several disadvantages: - it is using a fixed sized hash table, resulting in high memory overhead for small installations with only very few VMs, and a rather la

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

2023-06-20 Thread Roger Pau Monné
On Tue, Jun 20, 2023 at 12:34:52PM +0200, 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". > >

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

2023-06-20 Thread Julien Grall
Hi Juergen, One more remark as I was reviewing patch #10. On 30/05/2023 10:13, 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 addition

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

2023-06-20 Thread Jan Beulich
On 20.06.2023 12:35, Simone Ballarin wrote: > --- a/xen/include/public/io/ring.h > +++ b/xen/include/public/io/ring.h > @@ -36,11 +36,11 @@ > typedef unsigned int RING_IDX; > > /* Round a 32-bit unsigned constant down to the nearest power of two. */ > -#define __RD2(_x) (((_x) & 0x0002) ?

Re: [XEN PATCH 07/13] xen/x86: fixed violations of MISRA C:2012 Rule 7.2

2023-06-20 Thread Jan Beulich
On 20.06.2023 12:34, Simone Ballarin wrote: > --- a/xen/arch/x86/cpu/vpmu_intel.c > +++ b/xen/arch/x86/cpu/vpmu_intel.c > @@ -950,10 +950,10 @@ const struct arch_vpmu_ops *__init core2_vpmu_init(void) > fixed_ctrl_mask |= > (FIXED_CTR_CTRL_ANYTHREAD_MASK << (FIXED_CTR_CTRL_BITS

  1   2   >