Re: [PATCH linux-next v2 0/2] x86/xen TSC related cleanups

2023-02-22 Thread Juergen Gross
On 22.02.23 18:54, Krister Johansen wrote: Hi, Enclosed please find a pair of patches that perform some additional cleanup that was suggested by Boris, Jan and Thomas. Specifically: this resync's arch/x86/include/asm/xen/cpuid.h from its upstream source in the Xen tree, and then uses one of the

[PATCH v2 7/8] xen/p2m: put reference for superpage

2023-02-22 Thread Penny Zheng
We are doing foreign memory mapping for static shared memory, and there is a great possibility that it could be super mapped. But today, p2m_put_l3_page could not handle superpages. This commits implements a new function p2m_put_superpage to handle superpages, specifically for helping put extra

[PATCH v2 8/8] xen/docs: refine docs about static shared memory

2023-02-22 Thread Penny Zheng
This commit amends docs(docs/misc/arm/device-tree/booting.txt) to include the new scenario where host address is not provided in "xen,shared-mem" property, and we also add a new example to explain in detail. We also fix some buggy info in the docs, like SHMID is "my-shared-mem-1", not "0x1".

[PATCH v2 5/8] xen/arm: support static shared memory when host address not provided

2023-02-22 Thread Penny Zheng
In order to support static shared memory when host address not provided, we shall do the following modification: - we shall let Xen allocate memory from heap for static shared memory at first domain, no matter it is owner or borrower. - In acquire_shared_memory_bank, as static shared memory has

[PATCH v2 6/8] xen/arm: remove shm holes for extended regions

2023-02-22 Thread Penny Zheng
Static shared memory acts as reserved memory in guest, so it shall be excluded from extended regions. Extended regions are taken care of under three different scenarios: normal DomU, direct-map domain with iommu on, and direct-map domain with iommu off. For normal DomU, we create a new function

[PATCH v2 4/8] xen/arm: use paddr_assigned to indicate whether host address is provided

2023-02-22 Thread Penny Zheng
We use paddr_assigned to indicate whether host address is provided, by checking the length of "xen,shared-mem" property. The shm matching criteria shall also be adapt to cover the new scenario, by adding when host address is not provided, if SHMID matches, the region size must exactly match too.

[PATCH v2 3/8] xen/arm: introduce allocate_domheap_memory and guest_physmap_memory

2023-02-22 Thread Penny Zheng
We split the code of allocate_bank_memory into two parts, allocate_domheap_memory and guest_physmap_memory. One is about allocating guest RAM from heap, which could be re-used later for allocating static shared memory from heap when host address is not provided. The other is building up guest P2M

[PATCH v2 2/8] xen/arm: re-define a set of data structures for static shared memory region

2023-02-22 Thread Penny Zheng
This commit introduces a set of separate data structures to deal with static shared memory at different stages. In boot-time host device tree parsing, we introduce a new structure "struct shm_node" and a new field "shm_info" in bootinfo to describe and store parsed shm info. only SHMID and

[PATCH V2 0/8] Follow-up static shared memory PART I

2023-02-22 Thread Penny Zheng
There are some unsolving issues on current 4.17 static shared memory feature[1], including: - In order to avoid keeping growing 'membank', having the shared memory info in separate structures is preferred. - Missing implementation on having the host address optional in "xen,shared-mem" property -

[PATCH v2 1/8] xen/arm: remove stale addr_cells/size_cells in assign_shared_memory

2023-02-22 Thread Penny Zheng
Function parameters {addr_cells,size_cells} are stale parameters in assign_shared_memory, so we shall remove them. Signed-off-by: Penny Zheng --- v1 -> v2: - new commit --- xen/arch/arm/domain_build.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/arch/arm/domain_build.c

[xen-4.15-testing test] 178137: tolerable trouble: fail/pass/starved - PUSHED

2023-02-22 Thread osstest service owner
flight 178137 xen-4.15-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/178137/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stopfail like 174778

[xen-4.16-testing test] 178138: regressions - trouble: blocked/fail/pass/starved

2023-02-22 Thread osstest service owner
flight 178138 xen-4.16-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/178138/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-qemut-rhel6hvm-amd 7 xen-installfail REGR. vs. 177405

[xen-4.14-testing test] 178136: regressions - trouble: broken/fail/pass/starved

2023-02-22 Thread osstest service owner
flight 178136 xen-4.14-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/178136/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-win7-amd64 broken

[linux-5.4 test] 178125: tolerable trouble: fail/pass/starved - PUSHED

2023-02-22 Thread osstest service owner
flight 178125 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/178125/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-qemuu-rhel6hvm-amd 7 xen-install fail like 176460 test-amd64-amd64-qemuu-nested-amd 20

[PATCH] Call SetVirtualAddressMap() by default

2023-02-22 Thread Demi Marie Obenour
To quote Andrew Cooper: > I know we've had this argument before, but not calling > SetVirtualAddressMap() isn't a viable option. It's a prerequisite to > function on literally millions of devices Qubes OS has been shipping EFI_SET_VIRTUAL_ADDRESS_MAP for years, and I believe OpenXT and EVE ship

[xen-unstable test] 178107: tolerable trouble: fail/pass/starved

2023-02-22 Thread osstest service owner
flight 178107 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/178107/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-examine-bios 4 memdisk-try-append fail blocked in 178070

[xen-unstable-smoke test] 178146: tolerable trouble: pass/starved - PUSHED

2023-02-22 Thread osstest service owner
flight 178146 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/178146/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

[PATCH linux-next v2 2/2] x86/xen/time: cleanup xen_tsc_safe_clocksource

2023-02-22 Thread Krister Johansen
Modifies xen_tsc_safe_clocksource() to use newly defined constants from arch/x86/include/asm/xen/cpuid.h. This replaces a numeric value with XEN_CPUID_TSC_MODE_NEVER_EMULATE, and deletes a comment that is now self explanatory. There should be no change in the function's behavior. Signed-off-by:

[PATCH linux-next v2 1/2] xen: update arch/x86/include/asm/xen/cpuid.h

2023-02-22 Thread Krister Johansen
Update arch/x86/include/asm/xen/cpuid.h from the Xen tree to get newest definitions. This picks up some TSC mode definitions and comment formatting changes. Signed-off-by: Krister Johansen --- arch/x86/include/asm/xen/cpuid.h | 22 ++ 1 file changed, 18 insertions(+), 4

[PATCH linux-next v2 0/2] x86/xen TSC related cleanups

2023-02-22 Thread Krister Johansen
Hi, Enclosed please find a pair of patches that perform some additional cleanup that was suggested by Boris, Jan and Thomas. Specifically: this resync's arch/x86/include/asm/xen/cpuid.h from its upstream source in the Xen tree, and then uses one of the new #define-s to replace a constant in

Re: Core parking broken with NR_CPUS=1

2023-02-22 Thread Jan Beulich
On 22.02.2023 17:20, Andrew Cooper wrote: > On 22/02/2023 4:17 pm, Jan Beulich wrote: >> On 22.02.2023 17:04, Andrew Cooper wrote: >>> While testing the rebuilt debian unstable container, I found: >>> >>> common/core_parking.c: In function 'core_parking_remove': >>> common/core_parking.c:230:53:

Re: Core parking broken with NR_CPUS=1

2023-02-22 Thread Andrew Cooper
On 22/02/2023 4:17 pm, Jan Beulich wrote: > On 22.02.2023 17:04, Andrew Cooper wrote: >> While testing the rebuilt debian unstable container, I found: >> >> common/core_parking.c: In function 'core_parking_remove': >> common/core_parking.c:230:53: error: array subscript 1 is above array >> bounds

Re: Core parking broken with NR_CPUS=1

2023-02-22 Thread Jan Beulich
On 22.02.2023 17:04, Andrew Cooper wrote: > While testing the rebuilt debian unstable container, I found: > > common/core_parking.c: In function 'core_parking_remove': > common/core_parking.c:230:53: error: array subscript 1 is above array > bounds of 'unsigned int[1]' [-Werror=array-bounds] >  

Re: [PATCH v2 1/4] xen: introduce CONFIG_GENERIC_BUG_FRAME

2023-02-22 Thread Oleksii
Hello Jan, On Wed, 2023-02-22 at 13:46 +0100, Jan Beulich wrote: > On 20.02.2023 17:40, Oleksii Kurochko wrote: > > A large part of the content of the bug.h is repeated among all > > architectures, so it was decided to create a new config > > CONFIG_GENERIC_BUG_FRAME. > > > > The version of

Core parking broken with NR_CPUS=1

2023-02-22 Thread Andrew Cooper
While testing the rebuilt debian unstable container, I found: common/core_parking.c: In function 'core_parking_remove': common/core_parking.c:230:53: error: array subscript 1 is above array bounds of 'unsigned int[1]' [-Werror=array-bounds]   230 | core_parking_cpunum[i] =

[linux-linus test] 178114: regressions - trouble: blocked/fail/pass/starved

2023-02-22 Thread osstest service owner
flight 178114 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/178114/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ws16-amd64 8 xen-boot fail REGR. vs. 178042

[XEN PATCH v7 19/20] xen/arm: ffa: add support to reclaim shared memory

2023-02-22 Thread Jens Wiklander
Adds support to reclaim memory previously shared with FFA_MEM_SHARE. Adds a check that the SP supports the needed FF-A feature FFA_MEM_RECLAIM. Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa.c | 53 ++ 1 file changed, 53 insertions(+) diff --git

[XEN PATCH v7 20/20] xen/arm: ffa: support sharing large memory ranges

2023-02-22 Thread Jens Wiklander
Adds support for sharing large memory ranges transmitted in fragments using FFA_MEM_FRAG_TX. The implementation is the bare minimum to be able to communicate with OP-TEE running as an SPMC at S-EL1. Adds a check that the SP supports the needed FF-A feature FFA_MEM_FRAG_TX. Signed-off-by: Jens

[XEN PATCH v7 17/20] xen/arm: ffa: add ABI structs for sharing memory

2023-02-22 Thread Jens Wiklander
Adds the ABI structs used by function FFA_MEM_SHARE and friends for sharing memory. Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c index

[XEN PATCH v7 16/20] xen/arm: ffa: add defines for sharing memory

2023-02-22 Thread Jens Wiklander
Adds defines needed for sharing using the function FFA_MEM_SHARE and friends. Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa.c | 57 ++ 1 file changed, 57 insertions(+) diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c index

[XEN PATCH v7 18/20] xen/arm: ffa: support sharing memory

2023-02-22 Thread Jens Wiklander
Adds support for a guest to share memory with an SP using FFA_MEM_SHARE and FFA_MEM_RECLAIM. Only small memory regions can be shared using a single call to FFA_MEM_SHARE are supported. A memory region that doesn't need to be shared any longer can be reclaimed with FFA_MEM_RECLAIM once the SP

[XEN PATCH v7 02/20] xen/arm: tee: add a primitive FF-A mediator

2023-02-22 Thread Jens Wiklander
Adds a FF-A version 1.1 [1] mediator to communicate with a Secure Partition in secure world. This commit brings in only the parts needed to negotiate FF-A version number with guest and SPMC. [1] https://developer.arm.com/documentation/den0077/e Signed-off-by: Jens Wiklander ---

[XEN PATCH v7 15/20] xen/arm: move regpair_to_uint64() and uint64_to_regpair() to regs.h

2023-02-22 Thread Jens Wiklander
Moves the two helper functions regpair_to_uint64() and uint64_to_regpair() from xen/arch/arm/tee/optee.c to the common arm specific regs.h. This enables reuse of these functions in the FF-A mediator in a subsequent patch. Reviewed-by: Michal Orzel Signed-off-by: Jens Wiklander ---

[XEN PATCH v7 09/20] xen/arm: ffa: add support for FFA_ID_GET

2023-02-22 Thread Jens Wiklander
Adds support for the FF-A function FFA_ID_GET to return the ID of the calling client. Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c index

[XEN PATCH v7 14/20] xen/arm: ffa: support guest FFA_PARTITION_INFO_GET

2023-02-22 Thread Jens Wiklander
Adds support in the mediator to handle FFA_PARTITION_INFO_GET requests from a guest. The requests are forwarded to the SPMC and the response is translated according to the FF-A version in use by the guest. Using FFA_PARTITION_INFO_GET changes the owner of the RX buffer to the caller (the guest in

[XEN PATCH v7 12/20] xen/arm: ffa: send guest events to Secure Partitions

2023-02-22 Thread Jens Wiklander
The FF-A specification defines framework messages sent as direct requests when certain events occurs. For instance when a VM (guest) is created or destroyed. Only SPs which have subscribed to these events will receive them. An SP can subscribe to these messages in its partition properties. Adds a

[XEN PATCH v7 10/20] xen/arm: ffa: add direct request support

2023-02-22 Thread Jens Wiklander
Adds support for sending a FF-A direct request. Checks that the SP also supports handling a 32-bit direct request. 64-bit direct requests are not used by the mediator itself so there is not need to check for that. Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa.c | 119

[XEN PATCH v7 13/20] xen/arm: ffa: support mapping guest RX/TX buffers

2023-02-22 Thread Jens Wiklander
Adds support in the mediator to map and unmap the RX and TX buffers provided by the guest using the two FF-A functions FFA_RXTX_MAP and FFA_RXTX_UNMAP. These buffer are later used to to transmit data that cannot be passed in registers only. Signed-off-by: Jens Wiklander ---

[XEN PATCH v7 11/20] xen/arm: ffa: map SPMC rx/tx buffers

2023-02-22 Thread Jens Wiklander
When initializing the FF-A mediator map the RX and TX buffers shared with the SPMC. These buffer are later used to to transmit data that cannot be passed in registers only. Adds a check that the SP supports the needed FF-A features FFA_RXTX_MAP_64 / FFA_RXTX_MAP_32 and FFA_RXTX_UNMAP. In 64-bit

[XEN PATCH v7 01/20] xen/arm: smccc: add support for SMCCCv1.2 extended input/output registers

2023-02-22 Thread Jens Wiklander
SMCCC v1.2 [1] AArch64 allows x0-x17 to be used as both parameter registers and result registers for the SMC and HVC instructions. Arm Firmware Framework for Armv8-A specification makes use of x0-x7 as parameter and result registers. Let us add new interface to support this extended set of

[XEN PATCH v7 07/20] xen/arm: ffa: add defines for framework direct request/response messages

2023-02-22 Thread Jens Wiklander
Adds defines for framework direct request/response messages. Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa.c | 9 + 1 file changed, 9 insertions(+) diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c index f4562ed2defc..d04bac9cc47f 100644 --- a/xen/arch/arm/tee/ffa.c

[XEN PATCH v7 04/20] docs: add Arm FF-A mediator

2023-02-22 Thread Jens Wiklander
Describes a FF-A version 1.1 [1] mediator to communicate with a Secure Partition in secure world. [1] https://developer.arm.com/documentation/den0077/latest Signed-off-by: Jens Wiklander --- SUPPORT.md | 7 +++ docs/man/xl.cfg.5.pod.in | 15 +++ 2 files changed,

[XEN PATCH v7 08/20] xen/arm: ffa: note dependency on 4k pages

2023-02-22 Thread Jens Wiklander
Adds a BUILD_BUG_ON() to assert the dependency on 4k pages in the FF-A mediator. Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa.c | 21 + 1 file changed, 21 insertions(+) diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c index d04bac9cc47f..8b0b80ce1ff5

[XEN PATCH v7 06/20] xen/arm: ffa: add flags for FFA_PARTITION_INFO_GET

2023-02-22 Thread Jens Wiklander
Defines flags used for the function FFA_PARTITION_INFO_GET. Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c index aa6cdbe0a4f9..f4562ed2defc 100644 ---

[XEN PATCH v7 03/20] tools: add Arm FF-A mediator

2023-02-22 Thread Jens Wiklander
Adds a new "ffa" value to the Enumeration "tee_type" to indicate if a guest is trusted to use FF-A. Signed-off-by: Jens Wiklander --- tools/libs/light/libxl_arm.c | 3 +++ tools/libs/light/libxl_types.idl | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git

[XEN PATCH v7 05/20] xen/arm: ffa: add remaining SMC function IDs

2023-02-22 Thread Jens Wiklander
Adds the remaining SMC function IDs from FF-A 1.1 specification. Signed-off-by: Jens Wiklander --- xen/arch/arm/tee/ffa.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c index 824153c9303a..aa6cdbe0a4f9

[XEN PATCH v7 00/20] Xen FF-A mediator

2023-02-22 Thread Jens Wiklander
Hi, This patch sets add an FF-A [1] mediator to the TEE mediator framework already present in Xen. The FF-A mediator implements the subset of the FF-A 1.1 specification needed to communicate with OP-TEE using FF-A as transport mechanism instead of SMC/HVC as with the TEE mediator. It allows a

[xen-unstable-smoke test] 178129: tolerable trouble: pass/starved - PUSHED

2023-02-22 Thread osstest service owner
flight 178129 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/178129/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [PATCH] CI: Drop gettext from containers

2023-02-22 Thread Michal Orzel
Hi Andrew, On 22/02/2023 15:13, Andrew Cooper wrote: > > > Xen 4.13 is fully out of support now. Drop this legacy build dependency. > > Signed-off-by: Andrew Cooper Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v2] x86: Perform mem_sharing teardown before paging teardown

2023-02-22 Thread Tamas K Lengyel
On Wed, Feb 22, 2023 at 5:48 AM Jan Beulich wrote: > > On 21.02.2023 16:59, Tamas K Lengyel wrote: > > On Tue, Feb 21, 2023 at 8:54 AM Jan Beulich wrote: > >> > >> On 15.02.2023 18:07, Tamas K Lengyel wrote: > >>> An assert failure has been observed in p2m_teardown when performing vm > >>>

[PATCH] CI: Drop gettext from containers

2023-02-22 Thread Andrew Cooper
Xen 4.13 is fully out of support now. Drop this legacy build dependency. Signed-off-by: Andrew Cooper --- CC: Anthony PERARD CC: Stefano Stabellini CC: Michal Orzel CC: Doug Goldstein --- automation/build/alpine/3.12-arm64v8.dockerfile | 2 --

Re: [PATCH v2 1/9] x86/svm: remove unused forward declaration of struct vcpu from svm.h

2023-02-22 Thread Jan Beulich
On 22.02.2023 13:00, Xenia Ragiadakou wrote: > Remove forward declaration of struct vcpu, that is a leftover since > the removal of svm_update_guest_cr()'s declaration from svm.h. > > Signed-off-by: Xenia Ragiadakou Acked-by: Jan Beulich > Fixes: b158e72abe30 ("x86/hvm: CFI hardening for

Re: [PATCH v2 1/4] xen: introduce CONFIG_GENERIC_BUG_FRAME

2023-02-22 Thread Jan Beulich
On 20.02.2023 17:40, Oleksii Kurochko wrote: > A large part of the content of the bug.h is repeated among all > architectures, so it was decided to create a new config > CONFIG_GENERIC_BUG_FRAME. > > The version of from x86 was taken as the base version. > > The patch introduces the following

Re: Ping: [PATCH 1/6] x86/Hyper-V: use standard C types in hyperv-tlfs.h

2023-02-22 Thread Paul Durrant
On 21/02/2023 13:43, Jan Beulich wrote: On 09.02.2023 11:38, Jan Beulich wrote: This is the only file left with a use of an __s type coming from Linux. Since the file has been using an apparently random mix of all three classes of fixed-width types (__{s,u}, {s,u}, and {,u}int_t), consolidate

[libvirt test] 178089: tolerable trouble: pass/starved - PUSHED

2023-02-22 Thread osstest service owner
flight 178089 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/178089/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-libvirt-xsm 15 migrate-support-checkfail never pass test-amd64-i386-libvirt 15

[PATCH v2 8/9] x86/vmx: declare nvmx_enqueue_n2_exceptions() static

2023-02-22 Thread Xenia Ragiadakou
Reduce the scope of nvmx_enqueue_n2_exceptions() to static because it is used only in this file. Take the opportunity to remove a trailing space. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - none xen/arch/x86/hvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v2 9/9] x86/vmx: move vmx_update_debug_state() in vmcs.c and declare it static

2023-02-22 Thread Xenia Ragiadakou
Move vmx_update_debug_state() in vmcs.c because it is used only in this file and limit its scope to this file by declaring it static and removing its declaration from private vmx.h Signed-off-by: Xenia Ragiadakou --- Changes in v2: - remove it from the private vmx.h header instead of the

[PATCH v2 6/9] x86/vmx: move declations used only by vmx code from vmx.h to private header

2023-02-22 Thread Xenia Ragiadakou
Create a new private header in arch/x86/hvm/vmx/ called vmx.h and move there all definitions and declarations that are used solely by vmx code. EPT related declarations and definitions stay in asm/hvm/vmx/vmx.h because they are used in arch/x86/mm and drivers/passthrough/vtd. Also, __vmread(),

[PATCH v2 5/9] x86/vmx: reduce scope of GAS_VMX_OP definition

2023-02-22 Thread Xenia Ragiadakou
Since GAS_VMX_OP is used only by vm{read,write}_safe, move its definition just above those functions and undefine it after use. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - none xen/arch/x86/include/asm/hvm/vmx/vmx.h | 14 -- 1 file changed, 8 insertions(+), 6

[PATCH v2 7/9] x86/vmx: remove unused included headers from vmx.c

2023-02-22 Thread Xenia Ragiadakou
Do not include the headers: asm/hvm/vpic.h asm/hvm/vpt.h asm/io.h asm/mce.h asm/mem_sharing.h asm/regs.h public/arch-x86/cpuid.h public/hvm/save.h because none of the declarations and macro definitions in them is used. Sort the rest of the headers alphabetically. Signed-off-by:

[PATCH v2 1/9] x86/svm: remove unused forward declaration of struct vcpu from svm.h

2023-02-22 Thread Xenia Ragiadakou
Remove forward declaration of struct vcpu, that is a leftover since the removal of svm_update_guest_cr()'s declaration from svm.h. Signed-off-by: Xenia Ragiadakou Fixes: b158e72abe30 ("x86/hvm: CFI hardening for hvm_funcs") --- Changes in v2: - leave the forward declaration of struct

[PATCH v2 2/9] x86/svm: opencode SVM_PAUSE{FILTER,THRESH}_INIT

2023-02-22 Thread Xenia Ragiadakou
Delete the macros SVM_PAUSE{FILTER,THRESH}_INIT from svm.h and opencode their values, since they are used in a single place and using macros is just unnecessary obfuscation. Signed-off-by: Xenia Ragiadakou --- Changes in v2: - opencode instead of moving the macros in vmcs.c, suggested by

[PATCH v2 4/9] x86/vmx: remove unused included headers from vmx.h

2023-02-22 Thread Xenia Ragiadakou
Do not include the headers: asm/i387.h asm/hvm/trace.h asm/processor.h asm/regs.h because none of the declarations and macro definitions in them is used in this file. Sort the rest of the headers alphabetically. Fix build by including asm/i387.h in vmx.c, needed for

[PATCH v2 0/9] x86/hvm: {svm,vmx}.{c,h} cleanup

2023-02-22 Thread Xenia Ragiadakou
This patch series attempts a cleanup of files {svm,vmx}.{c,h} by removing redundant headers and sorting the rest, reducing the scope of declarations and definitions, moving functions used only by internal {svm,vmx} code to private headers. This series aims to address the comments made on the

[PATCH v2 3/9] x86/svm: move declarations used only by svm code from svm.h to private header

2023-02-22 Thread Xenia Ragiadakou
Create a new private header in arch/x86/hvm/svm called svm.h and move there all definitions and declarations that are used solely by svm code. The function svm_invlpga() stays in arch/x86/hvm/svm/svm.h because it is used by arch/x86/hvm/svm/asid.h. Signed-off-by: Xenia Ragiadakou --- Changes

Re: [PATCH] x86/extable: hide use of negative offset from array start

2023-02-22 Thread Jan Beulich
On 22.02.2023 12:15, Andrew Cooper wrote: > On 22/02/2023 10:22 am, Jan Beulich wrote: >> In COVERAGE=y but DEBUG=n builds (observed by randconfig testing) gcc12 >> takes issue with the subtraction of 1 from __stop___pre_ex_table[], >> considering this an out of bounds access. Not being able to

Re: [PATCH] x86/extable: hide use of negative offset from array start

2023-02-22 Thread Andrew Cooper
On 22/02/2023 10:22 am, Jan Beulich wrote: > In COVERAGE=y but DEBUG=n builds (observed by randconfig testing) gcc12 > takes issue with the subtraction of 1 from __stop___pre_ex_table[], > considering this an out of bounds access. Not being able to know that > the symbol actually marks the end of

Re: [PATCH] x86/MSI: drop "packed" attribute from message data/address structures

2023-02-22 Thread Andrew Cooper
On 22/02/2023 10:35 am, Jan Beulich wrote: > The attribute has no purpose here and, in the worst case, could lead to > the compiler generating worse code. In practice, however: No change to > generated code (surprisingly not even to generated debug info), at least > with gcc12 and the .config-s

Re: [PATCH v2] x86: Perform mem_sharing teardown before paging teardown

2023-02-22 Thread Jan Beulich
On 21.02.2023 16:59, Tamas K Lengyel wrote: > On Tue, Feb 21, 2023 at 8:54 AM Jan Beulich wrote: >> >> On 15.02.2023 18:07, Tamas K Lengyel wrote: >>> An assert failure has been observed in p2m_teardown when performing vm >>> forking and then destroying the forked VM (p2m-basic.c:173). The assert

Re: [PATCH v4 2/2] x86/ucode/AMD: late load the patch on every logical thread

2023-02-22 Thread Jan Beulich
On 21.02.2023 22:26, Sergey Dyasli wrote: > On Tue, Feb 21, 2023 at 2:03 PM Jan Beulich wrote: >> >> On 15.02.2023 16:38, Sergey Dyasli wrote: >>> --- a/xen/arch/x86/cpu/microcode/core.c >>> +++ b/xen/arch/x86/cpu/microcode/core.c >>> @@ -398,10 +398,16 @@ static int cf_check

[PATCH] x86/MSI: drop "packed" attribute from message data/address structures

2023-02-22 Thread Jan Beulich
The attribute has no purpose here and, in the worst case, could lead to the compiler generating worse code. In practice, however: No change to generated code (surprisingly not even to generated debug info), at least with gcc12 and the .config-s I've tried. Requested-by: Andrew Cooper

[PATCH] x86/extable: hide use of negative offset from array start

2023-02-22 Thread Jan Beulich
In COVERAGE=y but DEBUG=n builds (observed by randconfig testing) gcc12 takes issue with the subtraction of 1 from __stop___pre_ex_table[], considering this an out of bounds access. Not being able to know that the symbol actually marks the end of an array, the compiler is kind of right with this

Re: Debian randconfig failure, Was Re: [XEN PATCH v2 0/7] automation: Update containers to allow HTTPS access to xenbits

2023-02-22 Thread Andrew Cooper
On 22/02/2023 9:53 am, Jan Beulich wrote: > On 22.02.2023 10:42, Jan Beulich wrote: >> On 21.02.2023 19:05, Andrew Cooper wrote: >>> On 21/02/2023 4:55 pm, Anthony PERARD wrote: Building randconfig on debian unstable seems to be an issue. >>> You're talking about >>>

Re: Debian randconfig failure, Was Re: [XEN PATCH v2 0/7] automation: Update containers to allow HTTPS access to xenbits

2023-02-22 Thread Jan Beulich
On 22.02.2023 10:42, Jan Beulich wrote: > On 21.02.2023 19:05, Andrew Cooper wrote: >> On 21/02/2023 4:55 pm, Anthony PERARD wrote: >>> Building randconfig on debian unstable seems to be an issue. >> >> You're talking about >> https://gitlab.com/xen-project/people/anthonyper/xen/-/jobs/3769926509

Re: Debian randconfig failure, Was Re: [XEN PATCH v2 0/7] automation: Update containers to allow HTTPS access to xenbits

2023-02-22 Thread Jan Beulich
On 21.02.2023 19:05, Andrew Cooper wrote: > On 21/02/2023 4:55 pm, Anthony PERARD wrote: >> Building randconfig on debian unstable seems to be an issue. > > You're talking about > https://gitlab.com/xen-project/people/anthonyper/xen/-/jobs/3769926509 ? > > + gcc --version > gcc (Debian

Re: [PATCH v2 01/13] tools/xenstore: don't allow creating too many nodes in a transaction

2023-02-22 Thread Juergen Gross
On 22.02.23 09:52, Julien Grall wrote: Hi Juergen, On 22/02/2023 08:36, Juergen Gross wrote: On 21.02.23 23:36, Julien Grall wrote: Hi Juergen, On 21/02/2023 08:10, Juergen Gross wrote: On 20.02.23 19:01, Julien Grall wrote: So I have recreated an XTF test which I think match what you

Re: [PATCH 1/2] xen/ioapic: Don't use local_irq_restore() to disable irqs

2023-02-22 Thread Jan Beulich
On 21.02.2023 19:14, Andrew Cooper wrote: > On 21/02/2023 1:40 pm, Jan Beulich wrote: >> On 20.02.2023 20:47, Andrew Cooper wrote: >>> Despite its name, the irq{save,restore}() APIs are only intended to >>> conditionally disable and re-enable interrupts. >> Are they? > > Yes, absolutely. > > And

[linux-linus test] 178093: regressions - trouble: blocked/broken/fail/pass/starved

2023-02-22 Thread osstest service owner
flight 178093 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/178093/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-coresched-amd64-xl broken test-amd64-coresched-amd64-xl 5

Re: [PATCH v2 01/13] tools/xenstore: don't allow creating too many nodes in a transaction

2023-02-22 Thread Julien Grall
Hi Juergen, On 22/02/2023 08:36, Juergen Gross wrote: On 21.02.23 23:36, Julien Grall wrote: Hi Juergen, On 21/02/2023 08:10, Juergen Gross wrote: On 20.02.23 19:01, Julien Grall wrote: So I have recreated an XTF test which I think match what you wrote [1]. It is indeed failing without

Re: [PATCH v2 04/13] tools/xenstore: add framework to commit accounting data on success only

2023-02-22 Thread Juergen Gross
On 21.02.23 23:42, Julien Grall wrote: Hi Juergen, On 21/02/2023 08:37, Juergen Gross wrote: On 20.02.23 23:50, Julien Grall wrote: +    list_del(>list); +    talloc_free(cd); +    } +} + +void acc_commit(struct connection *conn) +{ +    struct changed_domain *cd; +    struct

Re: [PATCH v2 01/13] tools/xenstore: don't allow creating too many nodes in a transaction

2023-02-22 Thread Juergen Gross
On 21.02.23 23:36, Julien Grall wrote: Hi Juergen, On 21/02/2023 08:10, Juergen Gross wrote: On 20.02.23 19:01, Julien Grall wrote: So I have recreated an XTF test which I think match what you wrote [1]. It is indeed failing without your patch. But then there are still some weird behavior

[xen-unstable test] 178070: tolerable trouble: fail/pass/starved - PUSHED

2023-02-22 Thread osstest service owner
flight 178070 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/178070/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 177972 test-amd64-i386-xl-qemuu-win7-amd64