Re: Asking for help to debug xen efi on Kunpeng machine

2023-06-20 Thread Jiatong Shen
Hello Julien, Sorry for the delay.. I obtained the full xen log and attached it in the mail. Please take a look when you are available. Thank you very much Best Regards, Jiatong Shen On Sat, Jun 17, 2023 at 4:55 AM Julien Grall wrote: > Hi, > > On 15/06/2023 22:52, Jiatong Shen wrote: > >

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

2023-06-20 Thread osstest service owner
flight 181512 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/181512/ 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: [XEN PATCH v2 3/3] xen: fix violations of MISRA C:2012 Rule 3.1

2023-06-20 Thread Nicola Vetrini
On 19/06/23 12:29, Jan Beulich wrote: On 19.06.2023 11:56, Nicola Vetrini wrote: --- a/xen/common/xmalloc_tlsf.c +++ b/xen/common/xmalloc_tlsf.c @@ -140,9 +140,6 @@ static inline void MAPPING_SEARCH(unsigned long *r, int *fl, int *sl) *fl = flsl(*r) - 1; *sl = (*r >> (*fl

Re: [XEN PATCH v2 2/3] xen/drivers/passthrough/arm/smmu-v3.c: fix violations of MISRA C:2012 Rule 3.1

2023-06-20 Thread Nicola Vetrini
On 19/06/23 12:10, Julien Grall wrote: Hi, On 19/06/2023 10:56, Nicola Vetrini wrote: In the file `xen/drivers/passthrough/arm/smmu-v3.c' there are a few occurrences of nested '//' character sequences inside C-style comment blocks, which violate Rule 3.1. The patch aims to resolve those by

Re: [PATCH v3 14/16] tools/xenstore: split out environment specific live update code

2023-06-20 Thread Juergen Gross
On 19.06.23 19:55, Julien Grall wrote: Hi Juergen, On 30/05/2023 09:54, Juergen Gross wrote: -static struct live_update *lu_status; - -struct lu_dump_state { -    void *buf; -    unsigned int size; -#ifndef __MINIOS__ -    int fd; -    char *filename; -#endif -}; - -static int lu_destroy(void *

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

2023-06-20 Thread Chen, Jiqian
Hi Gerd Hoffmann On 2023/6/19 20:51, Gerd Hoffmann wrote: > Hi, >> Adding a new command requires new feature flag (and maybe it should be in >> the <0x1000 range instead) >> >> But I am not sure we need a new message at the virtio-gpu level. Gerd, wdyt? >> >> Maybe it's not a good place to rese

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

2023-06-20 Thread Jan Beulich
On 19.06.2023 20:06, 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: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-20 Thread Gerd Hoffmann
Hi, > > The guest driver should be able to restore resources after resume. > > Thank you for your suggestion! > As far as I know, resources are created on host side and guest has no backup, > if resources are destroyed, guest can't restore them. > Or do you mean guest driver need to send comma

Re: [PATCH v3 5/5] x86/microcode: Disable microcode update handler if DIS_MCU_UPDATE is set

2023-06-20 Thread Jan Beulich
On 15.06.2023 17:48, Alejandro Vallejo wrote: > --- a/xen/arch/x86/cpu/common.c > +++ b/xen/arch/x86/cpu/common.c > @@ -352,6 +352,11 @@ void __init early_cpu_init(void) > &c->x86_capability[FEATURESET_7c0], > &c->x86_capability[FEATURESET_7d0]);

Re: [PATCH v3 1/5] x86/microcode: Allow reading microcode revision even if it can't be updated

2023-06-20 Thread Jan Beulich
On 19.06.2023 18:10, Jan Beulich wrote: > On 19.06.2023 18:06, Andrew Cooper wrote: >> On 19/06/2023 4:58 pm, Jan Beulich wrote: >>> On 19.06.2023 17:49, Andrew Cooper wrote: On 15/06/2023 4:48 pm, Alejandro Vallejo wrote: > diff --git a/xen/arch/x86/cpu/microcode/core.c > b/xen/arch/

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

2023-06-20 Thread Jiamei Xie
Hi Andrew, On 2023/6/20 02:06, 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 intr

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

2023-06-20 Thread Jan Beulich
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 > + default "arch/ppc/configs/openpower_defconfig"

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

2023-06-20 Thread Roberto Bagnara
On 19/06/23 13:47, Jan Beulich wrote: On 19.06.2023 12:53, Roberto Bagnara wrote: On 19/06/23 09:54, Jan Beulich wrote: On 16.06.2023 17:54, Roberto Bagnara wrote: On 16/06/23 01:26, Stefano Stabellini wrote: On Thu, 15 Jun 2023, Roberto Bagnara wrote: + static function is used in an i

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

2023-06-20 Thread Roberto Bagnara
On 16/06/23 22:43, Stefano Stabellini wrote: On Fri, 16 Jun 2023, Roberto Bagnara wrote: + * - Implicit conversion from a pointer to an incompatible pointer + - ARM64, X86_64 + - Non-documented GCC extension. Is this related to -Wincompatible-pointer-types? In my opinion, this does

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

2023-06-20 Thread osstest service owner
flight 181511 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/181511/ 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

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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". These violations are caused by the missing "u" or "U" suffix in unsigned intege

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Simone Ballarin
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" as a suffix to explicitly state when an integer constant i

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

2023-06-20 Thread Julien Grall
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 headline states: "A "u" or "U" suffix shall be applied to all integer constants that are re

Re: [PATCH 1/7] xen/arm32: head: Add missing isb in setup_fixmap()

2023-06-20 Thread Luca Fancellu
> On 19 Jun 2023, at 18:01, Julien Grall wrote: > > From: Julien Grall > > Per the Arm Arm (ARM DDI 0406C.d A3.8.3): > > "The DMB and DSB memory barriers affect reads and writes to the memory > system generated by load/store instructions and data or unified cache > maintenance operations be

Re: [PATCH 2/7] xen/arm32: head: Add mising isb in switch_to_runtime_mapping()

2023-06-20 Thread Luca Fancellu
> On 19 Jun 2023, at 18:01, Julien Grall wrote: > > From: Julien Grall > > Per the Arm Arm (ARM DDI 0406C.d A3.8.3): > > "The DMB and DSB memory barriers affect reads and writes to the memory > system generated by load/store instructions and data or unified cache > maintenance operations be

Re: [PATCH 3/7] xen/arm64: head: Add missing isb in setup_fixmap()

2023-06-20 Thread Luca Fancellu
> On 19 Jun 2023, at 18:01, Julien Grall wrote: > > From: Julien Grall > > On older version of the Arm Arm (ARM DDI 0487E.a, B2-125) there were > the following paragraph: > > "DMB and DSB instructions affect reads and writes to the memory system > generated by Load/Store instructions and da

Re: [PATCH 02/11] tools/xenstore: replace key in struct node with data base name

2023-06-20 Thread Julien Grall
Hi Juergen, On 30/05/2023 10:13, Juergen Gross wrote: Instead of storing the TDB key in struct node, only store the name of the node used to access it in the data base. Associated with that change replace the key parameter of access_node() with the equivalent db_name. This is in preparation to

Re: [PATCH 03/11] tools/xenstore: let transaction_prepend() return the name for access

2023-06-20 Thread Julien Grall
Hi Juergen, On 30/05/2023 10:13, Juergen Gross wrote: Instead of setting the TDB key for accessing the node in the data base, let transaction_prepend() return the associated name instead. This is in preparation to replace TDB with a more simple data storage. Signed-off-by: Juergen Gross ---

Re: [PATCH 04/11] tools/xenstore: rename do_tdb_delete() and change parameter type

2023-06-20 Thread Julien Grall
Hi Juergen, On 30/05/2023 10:13, Juergen Gross wrote: diff --git a/tools/xenstore/xenstored_core.h b/tools/xenstore/xenstored_core.h index f7cb035f26..7fc6d73e5a 100644 --- a/tools/xenstore/xenstored_core.h +++ b/tools/xenstore/xenstored_core.h @@ -358,11 +358,12 @@ extern xengnttab_handle **xgt

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

2023-06-20 Thread Oleksii
On Mon, 2023-06-19 at 19:06 +0100, 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 thi

Re: [PATCH 01/13] libs/guest: simplify xc_cpuid_apply_policy()

2023-06-20 Thread Andrew Cooper
On 16/06/2023 2:10 pm, Roger Pau Monne wrote: > Introduce a local xc_cpu_policy_t and use it to simplify some of the > logic in the function: > > * Populate the introduced xc_cpu_policy_t with the current domain >policy, which will already be the default for the given domain >type. This a

Re: [PATCH 02/13] libx86: introduce helper to fetch cpuid leaf

2023-06-20 Thread Jan Beulich
On 16.06.2023 15:10, Roger Pau Monne wrote: > Introduce a helper based on the current Xen guest_cpuid code in order > to fetch a cpuid leaf from a policy. The newly introduced function in > cpuid.c should not be directly called and instead the provided > x86_cpuid_get_leaf macro should be used that

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

2023-06-20 Thread osstest service owner
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 not be run: build-armhf broken build-armhf

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

2023-06-20 Thread Roberto Bagnara
This document specifies the C language dialect used by Xen and the assumptions Xen makes on the translation toolchain. Signed-off-by: Roberto Bagnara --- docs/misra/C-language-toolchain.rst | 478 1 file changed, 478 insertions(+) create mode 100644 docs/misra/C-lan

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

2023-06-20 Thread Jan Beulich
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 > represented in an unsigned type". > > These violations are

Re: [PATCH 09/13] libxl: change the type of libxl_cpuid_policy_list

2023-06-20 Thread Andrew Cooper
On 16/06/2023 2:10 pm, Roger Pau Monne wrote: > Currently libxl_cpuid_policy_list is an opaque type to the users of > libxl, and internally it's an array of xc_xend_cpuid objects. > > Change the type to instead be a structure that contains one array for > CPUID policies, in preparation for it also

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

2023-06-20 Thread Peter Maydell
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; Coverity's "is there missing error handling?" > > heuristic fired for a change in this c

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

2023-06-20 Thread Julien Grall
Hi Juergen, On 30/05/2023 10:13, Juergen Gross wrote: @@ -395,18 +393,18 @@ static int finalize_transaction(struct connection *conn, while ((i = list_top(&trans->accessed, struct accessed_node, list))) { if (i->ta_node) { - set_tdb_key(i->trans_name,

Re: [PATCH 06/11] tools/xenstore: switch get_acc_data() to use name instead of key

2023-06-20 Thread Julien Grall
Hi Juergen, On 30/05/2023 10:13, Juergen Gross wrote: Eliminate further TDB_DATA usage by switching get_acc_data() and get_acc_domid() from a TDB key to the name of the node in the data base as a parameter. This is in preparation to replace TDB with a more simple data storage. Signed-off-by: J

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

2023-06-20 Thread Robert Beckett
On 20/06/2023 10:41, Gerd Hoffmann wrote: Hi, The guest driver should be able to restore resources after resume. Thank you for your suggestion! As far as I know, resources are created on host side and guest has no backup, if resources are destroyed, guest can't restore them. Or do you me

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 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 > represented in an unsigned type". > > I propose to use "U"

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

2023-06-20 Thread Julien Grall
Hi Juergen, 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 additional parameter. This enables to make set_tdb_key

Re: [PATCH 08/11] tools/xenstore: make hashtable key and value parameters const

2023-06-20 Thread Julien Grall
Hi Juergen, On 30/05/2023 10:13, Juergen Gross wrote: The key is never modified by hashtable code, so it should be marked as const. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Cheers, -- Julien Grall

Re: [XEN PATCH 02/13] AMD/IOMMU: 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/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 > > /* IOMMU Capability */ > -#define PCI_CAP_ID_MAS

Re: [PATCH 09/11] tools/xenstore: add hashtable_replace() function

2023-06-20 Thread Julien Grall
Hi Juergen, On 30/05/2023 10:13, Juergen Gross wrote: For an effective way to replace a hashtable entry add a new function hashtable_replace(). While at it let hashtable_add() fail if an entry with the specified key does already exist. Please explain why you want to do it. I also think this c

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

2023-06-20 Thread Jan Beulich
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 > represented in an unsigned type". > > I propose to use "U"

Re: [PATCH 11/11] tools/xenstore: remove tdb code

2023-06-20 Thread Julien Grall
Hi Juergen, On 30/05/2023 10:13, Juergen Gross wrote: Now that TDB isn't used anymore, remove it. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Cheers, --- tools/xenstore/Makefile.common |2 +- tools/xenstore/tdb.c | 1748 tools

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

2023-06-20 Thread Jan Beulich
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 > represented in an unsigned type". > > I propose to use "U"

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

2023-06-20 Thread Julien Grall
Hi, On 20/06/2023 13:43, 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 represented in an unsig

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

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: [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 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 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 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: [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 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-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 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 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: [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 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: [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: > + * - 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 > +

[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: [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 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

[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

[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

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

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

[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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

  1   2   >