Re: [QEMU][PATCH v2 10/11] hw/arm: introduce xenpv machine

2022-12-01 Thread Philippe Mathieu-Daudé
On 2/12/22 04:00, Vikram Garhwal wrote: Add a new machine xenpv which creates a IOREQ server to register/connect with Xen Hypervisor. Optional: When CONFIG_TPM is enabled, it also creates a tpm-tis-device, adds a TPM emulator and connects to swtpm running on host machine via chardev socket and

Re: [QEMU][PATCH v2 07/11] hw/xen/xen-hvm-common: Use g_new and error_setg_errno

2022-12-01 Thread Philippe Mathieu-Daudé
On 2/12/22 03:59, Vikram Garhwal wrote: Replace g_malloc with g_new and perror with error_setg_errno. Signed-off-by: Vikram Garhwal --- hw/xen/xen-hvm-common.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) @@ -717,7 +717,7 @@ void destroy_hvm_domain(bool reboot)

[xen-unstable test] 175009: tolerable FAIL - PUSHED

2022-12-01 Thread osstest service owner
flight 175009 xen-unstable real [real] flight 175020 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/175009/ http://logs.test-lab.xenproject.org/osstest/logs/175020/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: [QEMU][PATCH v2 05/11] include/hw/xen/xen_common: return error from xen_create_ioreq_server

2022-12-01 Thread Philippe Mathieu-Daudé
Hi Stefano and Vikram, On 2/12/22 03:59, Vikram Garhwal wrote: From: Stefano Stabellini This is done to prepare for enabling xenpv support for ARM architecture. On ARM it is possible to have a functioning xenpv machine with only the PV backends and no IOREQ server. If the IOREQ server

Re: [QEMU][PATCH v2 01/11] hw/i386/xen/: move xen-mapcache.c to hw/xen/

2022-12-01 Thread Philippe Mathieu-Daudé
On 2/12/22 03:59, Vikram Garhwal wrote: xen-mapcache.c contains common functions which can be used for enabling Xen on aarch64 with IOREQ handling. Moving it out from hw/i386/xen to hw/xen to make it accessible for both aarch64 and x86. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano

Re: [QEMU][PATCH v2 10/11] hw/arm: introduce xenpv machine

2022-12-01 Thread Juergen Gross
On 02.12.22 04:00, Vikram Garhwal wrote: Add a new machine xenpv which creates a IOREQ server to register/connect with Xen Hypervisor. Optional: When CONFIG_TPM is enabled, it also creates a tpm-tis-device, adds a TPM emulator and connects to swtpm running on host machine via chardev socket and

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

2022-12-01 Thread osstest service owner
flight 175016 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175016/ 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

[ovmf test] 175017: all pass - PUSHED

2022-12-01 Thread osstest service owner
flight 175017 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/175017/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 47d988387efc8b45561f542f7a8e5b6a43979a8c baseline version: ovmf

Re: [PATCH v1 10/12] hw/arm: introduce xenpv machine

2022-12-01 Thread Garhwal, Vikram
Hi Julien, From: Julien Grall Date: Sunday, October 16, 2022 at 10:48 AM To: Garhwal, Vikram , qemu-de...@nongnu.org Cc: Stabellini, Stefano , Peter Maydell , Stefano Stabellini , Anthony Perard , Paul Durrant , open list:ARM TCG CPUs , open list:X86 Xen CPUs Subject: Re: [PATCH v1 10/12]

[QEMU][PATCH v2 10/11] hw/arm: introduce xenpv machine

2022-12-01 Thread Vikram Garhwal
Add a new machine xenpv which creates a IOREQ server to register/connect with Xen Hypervisor. Optional: When CONFIG_TPM is enabled, it also creates a tpm-tis-device, adds a TPM emulator and connects to swtpm running on host machine via chardev socket and support TPM functionalities for a guest

[QEMU][PATCH v2 09/11] meson.build: do not set have_xen_pci_passthrough for aarch64 targets

2022-12-01 Thread Vikram Garhwal
From: Stefano Stabellini have_xen_pci_passthrough is only used for Xen x86 VMs. Signed-off-by: Stefano Stabellini Reviewed-by: Alex Bennée --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index 5c6b5a1c75..81d36420f0 100644 --- a/meson.build +++

[QEMU][PATCH v2 04/11] xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common

2022-12-01 Thread Vikram Garhwal
From: Stefano Stabellini This patch does following: 1. creates arch_handle_ioreq() and arch_xen_set_memory(). This is done in preparation for moving most of xen-hvm code to an arch-neutral location, move the x86-specific portion of xen_set_memory to arch_xen_set_memory. Also, move

[QEMU][PATCH v2 08/11] accel/xen/xen-all: export xenstore_record_dm_state

2022-12-01 Thread Vikram Garhwal
xenstore_record_dm_state() will also be used in aarch64 xenpv machine. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini --- accel/xen/xen-all.c | 2 +- include/hw/xen/xen.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/accel/xen/xen-all.c

[QEMU][PATCH v2 11/11] meson.build: enable xenpv machine build for ARM

2022-12-01 Thread Vikram Garhwal
Add CONFIG_XEN for aarch64 device to support build for ARM targets. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Reviewed-by: Alex Bennée --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index

[QEMU][PATCH v2 03/11] hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState

2022-12-01 Thread Vikram Garhwal
From: Stefano Stabellini In preparation to moving most of xen-hvm code to an arch-neutral location, move: - shared_vmport_page - log_for_dirtybit - dirty_bitmap - suspend - wakeup out of XenIOState struct as these are only used on x86, especially the ones related to dirty logging. Updated

[QEMU][PATCH v2 07/11] hw/xen/xen-hvm-common: Use g_new and error_setg_errno

2022-12-01 Thread Vikram Garhwal
Replace g_malloc with g_new and perror with error_setg_errno. Signed-off-by: Vikram Garhwal --- hw/xen/xen-hvm-common.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index 03128e575b..4ba5141fa2 100644 ---

[QEMU][PATCH v2 05/11] include/hw/xen/xen_common: return error from xen_create_ioreq_server

2022-12-01 Thread Vikram Garhwal
From: Stefano Stabellini This is done to prepare for enabling xenpv support for ARM architecture. On ARM it is possible to have a functioning xenpv machine with only the PV backends and no IOREQ server. If the IOREQ server creation fails, continue to the PV backends initialization.

[QEMU][PATCH v2 02/11] hw/i386/xen: rearrange xen_hvm_init_pc

2022-12-01 Thread Vikram Garhwal
In preparation to moving most of xen-hvm code to an arch-neutral location, move non IOREQ references to: - xen_get_vmport_regs_pfn - xen_suspend_notifier - xen_wakeup_notifier - xen_ram_init towards the end of the xen_hvm_init_pc() function. This is done to keep the common ioreq functions in one

[QEMU][PATCH v2 06/11] hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure

2022-12-01 Thread Vikram Garhwal
From: Stefano Stabellini On ARM it is possible to have a functioning xenpv machine with only the PV backends and no IOREQ server. If the IOREQ server creation fails continue to the PV backends initialization. Also, moved the IOREQ registration and mapping subroutine to new function

[QEMU][PATCH v2 01/11] hw/i386/xen/: move xen-mapcache.c to hw/xen/

2022-12-01 Thread Vikram Garhwal
xen-mapcache.c contains common functions which can be used for enabling Xen on aarch64 with IOREQ handling. Moving it out from hw/i386/xen to hw/xen to make it accessible for both aarch64 and x86. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini --- hw/i386/meson.build

[QEMU][PATCH v2 00/11] Introduce xenpv machine for arm architecture

2022-12-01 Thread Vikram Garhwal
Hi, This series add xenpv machine for aarch64. Motivation behind creating xenpv machine with IOREQ and TPM was to enable each guest on Xen aarch64 to have it's own unique and emulated TPM. This series does following: 1. Moved common xen functionalities from hw/i386/xen to hw/xen/ so those can

[ovmf test] 175014: all pass - PUSHED

2022-12-01 Thread osstest service owner
flight 175014 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/175014/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf a1d57239140f09a8b2cc386f9421f6f4e634435f baseline version: ovmf

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

2022-12-01 Thread osstest service owner
flight 175013 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175013/ 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: objtool warning for next-20221118

2022-12-01 Thread Paul E. McKenney
On Tue, Nov 29, 2022 at 11:56:55AM -0800, Paul E. McKenney wrote: > On Fri, Nov 25, 2022 at 06:30:35AM +0100, Juergen Gross wrote: > > On 24.11.22 17:39, Josh Poimboeuf wrote: > > > On Thu, Nov 24, 2022 at 08:47:47AM +0100, Juergen Gross wrote: > > > > > > +++ b/arch/x86/xen/smp_pv.c > > > > > >

[qemu-upstream-4.17-testing baseline test] 175008: tolerable FAIL

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

RE: [4.17?] Re: [PATCH] x86/HVM+shim: fix build when !CONFIG_GRANT_TABLE

2022-12-01 Thread Henry Wang
Hi Andrew, > -Original Message- > From: Andrew Cooper > Subject: Re: [4.17?] Re: [PATCH] x86/HVM+shim: fix build > when !CONFIG_GRANT_TABLE > > On 01/12/2022 16:14, Henry Wang wrote: > >>> Thanks for investigating. > >>> > >>> Acked-by: Andrew Cooper > >> Thanks. > >> > >>> Thoughts

Re: [PATCH 01/12] tools/xenstore: manage per-transaction domain accounting data in an array

2022-12-01 Thread Julien Grall
Hi Juergen, On 01/11/2022 16:04, Juergen Gross wrote: In order to prepare keeping accounting data in an array instead of using independent fields, switch the struct changed_domain accounting data to that scheme, for now only using an array with one element. In order to be able to extend this

Re: [PATCH 18/20] tools/xenstore: make log macro globally available

2022-12-01 Thread Julien Grall
Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: Move the definition of the log() macro to xenstored_core.h in order to make it usable from other source files, too. While at it preserve errno from being modified. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Cheers, --

Re: [PATCH 16/20] tools/xenstore: let chk_domain_generation() return a bool

2022-12-01 Thread Julien Grall
Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: Instead of returning 0 or 1 let chk_domain_generation() return a boolean value. Simplify the only caller by removing the ret variable. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Cheers, -- Julien Grall

Re: [PATCH 15/20] tools/xenstore: make domain_is_unprivileged() an inline function

2022-12-01 Thread Julien Grall
Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: clang is complaining about a NULL dereference for constructs like: domain_is_unprivileged(conn) ? conn->in : NULL I have just build xenstored with clang 11 and didn't get a complain. So can you provide more details? Cheers, --

Re: [PATCH 14/20] tools/xenstore: replace literal domid 0 with dom0_domid

2022-12-01 Thread Julien Grall
Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: There are some places left where dom0 is associated with domid 0. Use dom0_domid instead. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Cheers, -- Julien Grall

Re: [PATCH 11/20] tools/xenstore: move changed domain handling

2022-12-01 Thread Julien Grall
Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: static bool check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) @@ -492,8 +504,12 @@ static struct domain *find_or_alloc_existing_domain(unsigned int domid) xc_dominfo_t dominfo; domain = find_domain_struct(domid);

Re: [ANNOUNCE] Call for agenda items for 1 December Community Call @ 1600 UTC

2022-12-01 Thread Elliott Mitchell
On Thu, Nov 24, 2022 at 05:11:36PM +, George Dunlap wrote: > > == Dial-in Information == > ## Meeting time > 16:00 - 17:00 UTC > Further International meeting times: > https://www.timeanddate.com/worldclock/meetingdetails.html?year=2022=12=1=16=0=0=1234=37=224=179 > I guess I have to ask,

[xen-4.17-testing baseline test] 175007: tolerable FAIL

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

Re: [PATCH 10/20] tools/xenstore: replace watch->relative_path with a prefix length

2022-12-01 Thread Julien Grall
Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: @@ -324,8 +312,7 @@ const char *dump_state_watches(FILE *fp, struct connection *conn, head.length = sizeof(sw); sw.conn_id = conn_id; - path = get_watch_path(watch, watch->node); -

Re: [PATCH 08/20] tools/xenstore: add hashlist for finding struct domain by domid

2022-12-01 Thread Julien Grall
Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: @@ -341,49 +339,56 @@ static bool get_domain_info(unsigned int domid, xc_dominfo_t *dominfo) dominfo->domid == domid; } -void check_domains(void) +static int check_domain(void *k, void *v, void *arg) Looking at this

[PATCH] tools/oxenstored: Render backtraces more nicely in Syslog

2022-12-01 Thread Andrew Cooper
fallback_exception_handler feeds a string with embedded newlines directly into syslog(). While this is an improvement on getting nothing, syslogd escapes all control characters it gets, and emits one (long) line into the log. Fix the problem generally in the syslog stub. As we already have a

Re: [PATCH v6 0/3] Yocto Gitlab CI

2022-12-01 Thread Stefano Stabellini
Tested-by: Stefano Stabellini On Thu, 1 Dec 2022, Bertrand Marquis wrote: > This patch series is a first attempt to check if we could use Yocto in > gitlab ci to build and run xen on qemu for arm, arm64 and x86. > > The first patch is introducing a container template from which container >

Re: [PATCH 07/20] tools/xenstore: enhance hashtable implementation

2022-12-01 Thread Julien Grall
Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: Today it is possible to set a flag when calling hashtable_destroy() in order to specify whether the data associated with the hashtable entries should be freed or not. The keys of the entries will always be freed. Change that by replacing

Re: [PATCH v6 3/3] automation: Add CI test jobs for Yocto

2022-12-01 Thread Stefano Stabellini
On Thu, 1 Dec 2022, Bertrand Marquis wrote: > From: Michal Orzel > > Populate test jobs for Yocto based tests using the provided containers. > Due to the size restrictions, it is currently not possible to split the > build and run tasks, therefore everything is done in a single step. > > Test

Re: [PATCH v6 2/3] automation: Add a clean rule for containers

2022-12-01 Thread Stefano Stabellini
On Thu, 1 Dec 2022, Bertrand Marquis wrote: > Add make clean support to remove the containers from the local docker > registry. > make clean- must be called to remove an image: > make clean-yocto/kirkstone-qemuarm: remove yocto kirkstone for qemuarm > image > > Signed-off-by: Bertrand Marquis

Re: [PATCH v6 1/3] automation: Create Yocto docker images

2022-12-01 Thread Stefano Stabellini
On Thu, 1 Dec 2022, Bertrand Marquis wrote: > Add containers suitable to run yocto kirkstone build based on ubuntu > 22.04. It contains all packages required by Yocto and a checkout of the > layers required to build Xen with Yocto. > > Add a generic docker image template to be used to

Re: [PATCH v1 02/12] hw/i386/xen/: move xen-mapcache.c to hw/xen/

2022-12-01 Thread Garhwal, Vikram
Hi Paul, From: Paul Durrant Date: Wednesday, October 19, 2022 at 7:54 AM To: Garhwal, Vikram , qemu-de...@nongnu.org Cc: Stabellini, Stefano , Michael S. Tsirkin , Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Eduardo Habkost , Stefano Stabellini , Anthony Perard , open list:X86

Re: [PATCH 2/4] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-01 Thread Stefano Stabellini
On Thu, 1 Dec 2022, Luca Fancellu wrote: > Hi Stefano, > > >>> > >>> > +sm_tool_args="n" > +;; > +--cppcheck-cmd=*) > +CPPCHECK_TOOL="$(eval echo "${OPTION#*=}")" > +sm_tool_args="y" > +;; > +

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

2022-12-01 Thread osstest service owner
flight 175010 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175010/ 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: Porting Xen in raspberry pi4B

2022-12-01 Thread Stefano Stabellini
On Thu, 1 Dec 2022, Vipul Suneja wrote: > Hi Stefano, > Thanks! > > I am exploring both options here, modification of framebuffer source file & > setting up x11vnc server in guest. > Other than these I would like to share a few findings with you. > > 1. If i keep "CONFIG_XEN_FBDEV_FRONTEND=y"

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

2022-12-01 Thread Julien Grall
Hi Juergen, On 08/11/2022 08:09, Juergen Gross wrote: On 07.11.22 19:37, Julien Grall wrote: On 07/11/2022 08:34, Juergen Gross wrote: On 06.11.22 23:00, Julien Grall wrote: Hi Juergen, On 01/11/2022 15:28, Juergen Gross wrote: The accounting for the number of nodes of a domain in an

Re: [4.17?] Re: [PATCH] x86/HVM+shim: fix build when !CONFIG_GRANT_TABLE

2022-12-01 Thread Andrew Cooper
On 01/12/2022 16:14, Henry Wang wrote: >>> Thanks for investigating. >>> >>> Acked-by: Andrew Cooper >> Thanks. >> >>> Thoughts about inclusion into 4.17?  This is a build time regression vs >>> 4.16. >> I thought this was odd enough a configuration, but since you ask, let me >> forward the

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

2022-12-01 Thread osstest service owner
flight 175004 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/175004/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-coresched-amd64-xl broken test-arm64-arm64-examine 8 reboot

[XEN v2] Xen: Ensure "xenheap_bits - PAGE_SHIFT" can be used to shift "unsigned long"

2022-12-01 Thread Ayan Kumar Halder
Machine frame number (mfn) is used to represent the hardware page address. This is an unsigned long variable. We need to check if it can hold the complete range of hardware page addresses. To ensure this we check that the count of bits represented by 'unsigned long' added to the bit index of page

Re: Porting Xen in raspberry pi4B

2022-12-01 Thread Vipul Suneja
Hi Stefano, Thanks! I am exploring both options here, modification of framebuffer source file & setting up x11vnc server in guest. Other than these I would like to share a few findings with you. 1. If i keep "CONFIG_XEN_FBDEV_FRONTEND=y" then xen-fbfront.ko is not generating but if i keep

Re: [XEN v1] Xen: Enable compilation when PADDR_BITS == BITS_PER_LONG

2022-12-01 Thread Julien Grall
On 01/12/2022 12:12, Ayan Kumar Halder wrote: On 01/12/2022 10:26, Julien Grall wrote: Hi Ayan, Hi Julien, I have a question. On 01/12/2022 10:03, Ayan Kumar Halder wrote: It is possible for a pointer to represent physical memory of the same size. In other words, a 32 bit pointer can

[XEN v1] xen/Arm: Remove the extra assignment

2022-12-01 Thread Ayan Kumar Halder
As "io_size" and "uart->io_size" are both u64, so there will be no truncation. Thus, one can remove the ASSERT() and extra assignment. In an earlier commit (7c1de0038895cbc75ebd0caffc5b0f3f03c5ad51), "ns16550.io_size" was u32 and "io_size" was u64. Thus, the ASSERT() was needed to check if the

[RFC PATCH 14/21] xen/arm: vIOMMU: IOMMU device tree node for dom0

2022-12-01 Thread Rahul Singh
XEN will create an IOMMU device tree node in the device tree to enable the dom0 to discover the virtual SMMUv3 during dom0 boot. IOMMU device tree node will only be created when cmdline option viommu is enabled. Signed-off-by: Rahul Singh --- xen/arch/arm/domain_build.c | 94

RE: [4.17?] Re: [PATCH] x86/HVM+shim: fix build when !CONFIG_GRANT_TABLE

2022-12-01 Thread Henry Wang
Hi Jan and Andrew, > -Original Message- > From: Jan Beulich > Subject: [4.17?] Re: [PATCH] x86/HVM+shim: fix build > when !CONFIG_GRANT_TABLE > > On 01.12.2022 17:01, Andrew Cooper wrote: > > On 01/12/2022 15:57, Jan Beulich wrote: > >> The HVM flavor of the hypercall handlers exists

[RFC PATCH 21/21] xen/arm: vIOMMU: Modify the partial device tree for dom0less

2022-12-01 Thread Rahul Singh
To configure IOMMU in guest for passthrough devices, user will need to copy the unmodified "iommus" property from host device tree to partial device tree. To enable the dom0 linux kernel to confiure the IOMMU correctly replace the phandle in partial device tree with virtual IOMMU phandle when

[RFC PATCH 20/21] libxl/arm: vIOMMU: Modify the partial device tree for iommus

2022-12-01 Thread Rahul Singh
To configure IOMMU in guest for passthrough devices, user will need to copy the unmodified "iommus" property from host device tree to partial device tree. To enable the dom0 linux kernel to confiure the IOMMU correctly replace the phandle in partial device tree with virtual IOMMU phandle when

[RFC PATCH 19/21] xen/arm: vsmmuv3: Add support to send stage-1 event to guest

2022-12-01 Thread Rahul Singh
Stage-1 translation is handled by guest, therefore stage-1 fault has to be forwarded to guest. Signed-off-by: Rahul Singh --- xen/drivers/passthrough/arm/smmu-v3.c | 48 -- xen/drivers/passthrough/arm/vsmmu-v3.c | 45

[RFC PATCH 18/21] xen/arm: iommu: skip the iommu-map property for PCI devices

2022-12-01 Thread Rahul Singh
Current code skip the IOMMUS specific properties for the non PCI devices when handling the dom0 node but there is no support to skip the IOMMUS specific properties for the PCI devices. This patch will add the support to skip the IOMMUS specific properties for the PCI devices. Signed-off-by:

[RFC PATCH 17/21] xen/arm: vsmmuv3: Alloc virq for virtual SMMUv3

2022-12-01 Thread Rahul Singh
Alloc and reserve virq for event queue and global error to send event to guests. Also Modify the libxl to accomadate the new define virq. Signed-off-by: Rahul Singh --- tools/libs/light/libxl_arm.c | 24 ++-- xen/arch/arm/domain_build.c| 11 +++

[RFC PATCH 16/21] arm/libxl: vsmmuv3: Emulated SMMUv3 device tree node in libxl

2022-12-01 Thread Rahul Singh
libxl will create an Emulated SMMUv3 device tree node in the device tree to enable the guest OS to discover the virtual SMMUv3 during guest boot. Emulated SMMUv3 device tree node will only be created when "viommu=smmuv3" is set in xl domain configuration. Signed-off-by: Rahul Singh ---

[RFC PATCH 15/21] xen/arm: vsmmuv3: Emulated SMMUv3 device tree node for dom0less

2022-12-01 Thread Rahul Singh
XEN will create an Emulated SMMUv3 device tree node in the device tree to enable the dom0less domains to discover the virtual SMMUv3 during boot. Emulated SMMUv3 device tree node will only be created when cmdline option vsmmuv3 is enabled. Signed-off-by: Rahul Singh ---

[RFC PATCH 13/21] xen/arm: vsmmuv3: Add "iommus" property node for dom0 devices

2022-12-01 Thread Rahul Singh
"iommus" property will be added for dom0 devices to virtual IOMMU node to enable the dom0 linux kernel to configure the IOMMU Signed-off-by: Rahul Singh --- xen/arch/arm/domain_build.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/domain_build.c

[RFC PATCH 12/21] xen/arm: vsmmuv3: Add support for event queue and global error

2022-12-01 Thread Rahul Singh
Event queue is used to send the events to guest when there is an events/ faults. Add support for event queue to send events to guest. Global error in SMMUv3 hw will be updated in smmu_gerror and smmu_gerrorn register. Add support for global error registers to send global error to guest.

[RFC PATCH 11/21] xen/arm: vsmmuv3: Attach Stage-1 configuration to SMMUv3 hardware

2022-12-01 Thread Rahul Singh
Attach the Stage-1 configuration to device STE to support nested translation for the guests. Signed-off-by: Rahul Singh --- xen/drivers/passthrough/arm/smmu-v3.c | 79 ++ xen/drivers/passthrough/arm/smmu-v3.h | 1 + xen/drivers/passthrough/arm/vsmmu-v3.c | 18 ++

[RFC PATCH 05/21] xen/arm: vsmmuv3: Add dummy support for virtual SMMUv3 for guests

2022-12-01 Thread Rahul Singh
domain_viommu_init() will be called during domain creation and will add the dummy trap handler for virtual IOMMUs for guests. A host IOMMU list will be created when host IOMMU devices are probed and this list will be used to create the IOMMU device tree node for dom0. For dom0, 1-1 mapping will

[RFC PATCH 10/21] xen/arm: vsmmuv3: Add support for command CMD_CFGI_STE

2022-12-01 Thread Rahul Singh
CMD_CFGI_STE is used to invalidate/validate the STE. Emulated vSMMUv3 driver in XEN will read the STE from the guest memory space and capture the Stage-1 configuration required to support nested translation. Signed-off-by: Rahul Singh --- xen/drivers/passthrough/arm/vsmmu-v3.c | 148

[RFC PATCH 09/21] xen/arm: vsmmuv3: Add support for cmdqueue handling

2022-12-01 Thread Rahul Singh
Add support for virtual cmdqueue handling for guests Signed-off-by: Rahul Singh --- xen/drivers/passthrough/arm/vsmmu-v3.c | 101 + 1 file changed, 101 insertions(+) diff --git a/xen/drivers/passthrough/arm/vsmmu-v3.c b/xen/drivers/passthrough/arm/vsmmu-v3.c index

[RFC PATCH 08/21] xen/arm: vsmmuv3: Add support for registers emulation

2022-12-01 Thread Rahul Singh
Add initial support for various emulated registers for virtual SMMUv3 for guests and also add support for virtual cmdq and eventq. Signed-off-by: Rahul Singh --- xen/drivers/passthrough/arm/vsmmu-v3.c | 281 + 1 file changed, 281 insertions(+) diff --git

[RFC PATCH 07/21] xen/arm: vIOMMU: Add cmdline boot option "viommu = "

2022-12-01 Thread Rahul Singh
Add cmdline boot option "viommu = " to enable or disable the virtual iommu support for guests on ARM. Signed-off-by: Rahul Singh --- docs/misc/xen-command-line.pandoc | 7 +++ xen/arch/arm/include/asm/viommu.h | 11 +++ xen/drivers/passthrough/arm/viommu.c | 9

[RFC PATCH 06/21] xen/domctl: Add XEN_DOMCTL_CONFIG_VIOMMU_* and viommu config param

2022-12-01 Thread Rahul Singh
Add new viommu_type field and field values XEN_DOMCTL_CONFIG_VIOMMU_NONE XEN_DOMCTL_CONFIG_VIOMMU_SMMUV3 in xen_arch_domainconfig to enable/disable vIOMMU support for domains. Also add viommu="N" parameter to xl domain configuration to enable the vIOMMU for the domains. Currently, only the

[RFC PATCH 04/21] xen/arm: vIOMMU: add generic vIOMMU framework

2022-12-01 Thread Rahul Singh
This patch adds basic framework for vIOMMU. Signed-off-by: Rahul Singh --- xen/arch/arm/domain.c| 17 +++ xen/arch/arm/domain_build.c | 3 ++ xen/arch/arm/include/asm/viommu.h| 70 xen/drivers/passthrough/Kconfig | 6 +++

[RFC PATCH 03/21] xen/arm: smmuv3: Alloc io_domain for each device

2022-12-01 Thread Rahul Singh
In current implementation io_domain is allocated once for each xen domain as Stage2 translation is common for all devices in same xen domain. Nested stage supports S1 and S2 configuration at the same time. Stage1 translation will be different for each device as linux kernel will allocate

[4.17?] Re: [PATCH] x86/HVM+shim: fix build when !CONFIG_GRANT_TABLE

2022-12-01 Thread Jan Beulich
On 01.12.2022 17:01, Andrew Cooper wrote: > On 01/12/2022 15:57, Jan Beulich wrote: >> The HVM flavor of the hypercall handlers exists only when GRANT_TABLE is >> enabled, while surrogate shim variants exist only for the purpose of PV. >> (Also scratch out the Arm variant in that case; what

[RFC PATCH 02/21] xen/arm: smmuv3: Add support for stage-1 and nested stage translation

2022-12-01 Thread Rahul Singh
Xen SMMUv3 driver only supports stage-2 translation. Add support for Stage-1 translation that is required to support nested stage translation. In true nested mode, both s1_cfg and s2_cfg will coexist. Let's remove the union. When nested stage translation is setup, both s1_cfg and s2_cfg are

[RFC PATCH 01/21] xen/arm: smmuv3: Maintain a SID->device structure

2022-12-01 Thread Rahul Singh
From: Jean-Philippe Brucker Backport Linux commit cdf315f907d4. This is the clean backport without any changes. When handling faults from the event or PRI queue, we need to find the struct device associated with a SID. Add a rb_tree to keep track of SIDs. Acked-by: Jonathan Cameron

[RFC PATCH 00/21] Add SMMUv3 Stage 1 Support for XEN guests

2022-12-01 Thread Rahul Singh
The SMMUv3 supports two stages of translation. Each stage of translation can be independently enabled. An incoming address is logically translated from VA to IPA in stage 1, then the IPA is input to stage 2 which translates the IPA to the output PA. Stage 1 is intended to be used by a software

Re: [PATCH] x86/HVM+shim: fix build when !CONFIG_GRANT_TABLE

2022-12-01 Thread Andrew Cooper
On 01/12/2022 15:57, Jan Beulich wrote: > The HVM flavor of the hypercall handlers exists only when GRANT_TABLE is > enabled, while surrogate shim variants exist only for the purpose of PV. > (Also scratch out the Arm variant in that case; what exactly is used in > that cell of the new table row

[PATCH] x86/HVM+shim: fix build when !CONFIG_GRANT_TABLE

2022-12-01 Thread Jan Beulich
The HVM flavor of the hypercall handlers exists only when GRANT_TABLE is enabled, while surrogate shim variants exist only for the purpose of PV. (Also scratch out the Arm variant in that case; what exactly is used in that cell of the new table row doesn't really matter.) Fixes: 8523851dbc49

Re: [PATCH 2/4] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-01 Thread Luca Fancellu
Hi Stefano, >>> >>> +sm_tool_args="n" +;; +--cppcheck-cmd=*) +CPPCHECK_TOOL="$(eval echo "${OPTION#*=}")" +sm_tool_args="y" +;; +--cppcheck-html) +CPPCHECK_HTML="y"

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

2022-12-01 Thread osstest service owner
flight 175006 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/175006/ 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 v2 5/6] tools/oxenstored: Rework Domain evtchn handling to use port_pair

2022-12-01 Thread Edwin Torok
> On 1 Dec 2022, at 14:22, Andrew Cooper wrote: > > On 01/12/2022 11:59, Christian Lindig wrote: >>> On 30 Nov 2022, at 16:54, Andrew Cooper wrote: >>> >>> Inter-domain event channels are always a pair of local and remote ports. >>> Right now the handling is asymmetric, caused by the fact

Re: Commit moratorium

2022-12-01 Thread Julien Grall
Hi Jan, On 01/12/2022 15:17, Jan Beulich wrote: On 01.12.2022 15:32, Julien Grall wrote: I have finally managed to branch 4.17. The tree is now re-opened. Does this extend to the 4.17 branch as well? I've committed Anthony's build fix to staging, but wasn't sure about doing the "backport"

RE: Commit moratorium

2022-12-01 Thread Henry Wang
Hi Jan, > -Original Message- > From: Jan Beulich > Subject: Re: Commit moratorium > > On 01.12.2022 15:32, Julien Grall wrote: > > I have finally managed to branch 4.17. The tree is now re-opened. > > Does this extend to the 4.17 branch as well? I've committed Anthony's > build fix to

Re: preparations for 4.16.3

2022-12-01 Thread Julien Grall
Hi Jan & Stefano, On 28/11/2022 10:50, Jan Beulich wrote: All, the release is due in a couple of weeks time; ideally we'd get it out before the year end break. Please point out backports you find missing from the respective staging branch, but which you consider relevant. I have just one

Re: Commit moratorium

2022-12-01 Thread Jan Beulich
On 01.12.2022 15:32, Julien Grall wrote: > I have finally managed to branch 4.17. The tree is now re-opened. Does this extend to the 4.17 branch as well? I've committed Anthony's build fix to staging, but wasn't sure about doing the "backport" right away ... Jan

Re: [PATCH 3/4] tools/misra: fix skipped rule numbers

2022-12-01 Thread Stefano Stabellini
On Thu, 1 Dec 2022, Luca Fancellu wrote: > >> Hi Stefano, > >> > >> MISRA rules are in this format X.Y, misra_c2012_rules is a dictionary > >> where the key is > >> X and the value is the maximum number that Y can have. > >> > >> For example rule 13.Y goes from 13.1 to 13.6 (in the dictionary

Re: [PATCH 2/4] xen/scripts: add cppcheck tool to the xen-analysis.py script

2022-12-01 Thread Stefano Stabellini
On Thu, 1 Dec 2022, Jan Beulich wrote: > On 01.12.2022 12:18, Luca Fancellu wrote: > >> On 1 Dec 2022, at 08:33, Jan Beulich wrote: > >> On 30.11.2022 21:26, Stefano Stabellini wrote: > >>> On Wed, 30 Nov 2022, Luca Fancellu wrote: > > I think the revert of the cppcheck integration in

Re: [PATCH v1 3/5] tools/ocaml/libs/xc: add hvm_param_get binding

2022-12-01 Thread Edwin Torok
> On 1 Dec 2022, at 14:22, Christian Lindig wrote: > > > >> On 1 Dec 2022, at 14:16, Edwin Torok wrote: >> >> The disadvantage is that we can't pattern match on it anymore. >> >> Although we could have some OCaml code that does the pattern matching on >> another type and maps it to

Re: [PATCH v1 2/5] tools/ocaml/libs/xc: add binding to xc_evtchn_status

2022-12-01 Thread Edwin Torok
> On 1 Dec 2022, at 13:59, Andrew Cooper wrote: > > On 01/12/2022 13:35, Edwin Torok wrote: >>> On 1 Dec 2022, at 11:34, Andrew Cooper wrote: >>> >>> On 30/11/2022 17:32, Edwin Török wrote: + +caml_enter_blocking_section(); +rc = xc_evtchn_status(_H(xch), ); +

Re: Commit moratorium

2022-12-01 Thread Julien Grall
Hi all, I have finally managed to branch 4.17. The tree is now re-opened. Please be mindful what you are committing in staging until the final tarball is ready (hopefully mid-next week) so it is easier to backport any necessary fix to staging-4.17. Cheers, On 24/11/2022 09:48, Julien Grall

[PATCH v6 3/3] automation: Add CI test jobs for Yocto

2022-12-01 Thread Bertrand Marquis
From: Michal Orzel Populate test jobs for Yocto based tests using the provided containers. Due to the size restrictions, it is currently not possible to split the build and run tasks, therefore everything is done in a single step. Test jobs for the supported Yocto targets are generic to avoid

[PATCH v6 2/3] automation: Add a clean rule for containers

2022-12-01 Thread Bertrand Marquis
Add make clean support to remove the containers from the local docker registry. make clean- must be called to remove an image: make clean-yocto/kirkstone-qemuarm: remove yocto kirkstone for qemuarm image Signed-off-by: Bertrand Marquis --- Changes in v6: - Rework clean rule to prevent calling

[PATCH v6 1/3] automation: Create Yocto docker images

2022-12-01 Thread Bertrand Marquis
Add containers suitable to run yocto kirkstone build based on ubuntu 22.04. It contains all packages required by Yocto and a checkout of the layers required to build Xen with Yocto. Add a generic docker image template to be used to automatically generate docker files for different configurations:

[PATCH v6 0/3] Yocto Gitlab CI

2022-12-01 Thread Bertrand Marquis
This patch series is a first attempt to check if we could use Yocto in gitlab ci to build and run xen on qemu for arm, arm64 and x86. The first patch is introducing a container template from which container files can be generated for all combinations we want to support (qemu arm, arm64 and x86

Re: [PATCH v1 3/5] tools/ocaml/libs/xc: add hvm_param_get binding

2022-12-01 Thread Christian Lindig
> On 1 Dec 2022, at 14:16, Edwin Torok wrote: > > The disadvantage is that we can't pattern match on it anymore. > > Although we could have some OCaml code that does the pattern matching on > another type and maps it to these private integer types. > However at that point we've manually

Re: [PATCH v2 5/6] tools/oxenstored: Rework Domain evtchn handling to use port_pair

2022-12-01 Thread Andrew Cooper
On 01/12/2022 11:59, Christian Lindig wrote: >> On 30 Nov 2022, at 16:54, Andrew Cooper wrote: >> >> Inter-domain event channels are always a pair of local and remote ports. >> Right now the handling is asymmetric, caused by the fact that the evtchn is >> bound after the associated Domain object

Re: [PATCH v1 3/5] tools/ocaml/libs/xc: add hvm_param_get binding

2022-12-01 Thread Edwin Torok
> On 1 Dec 2022, at 13:57, Christian Lindig wrote: > > > >> On 1 Dec 2022, at 13:50, Edwin Torok wrote: >> >> Should we instead switch to using ctypes to generate these constants? > > I would not advocate this. Ctypes is the kind of meta programming that is > great when it works but hell

Re: [PATCH v1 2/5] tools/ocaml/libs/xc: add binding to xc_evtchn_status

2022-12-01 Thread Andrew Cooper
On 01/12/2022 13:35, Edwin Torok wrote: >> On 1 Dec 2022, at 11:34, Andrew Cooper wrote: >> >> On 30/11/2022 17:32, Edwin Török wrote: >>> + >>> +caml_enter_blocking_section(); >>> +rc = xc_evtchn_status(_H(xch), ); >>> +caml_leave_blocking_section(); >>> + >>> +if ( rc < 0 ) >>>

Re: [PATCH v1 3/5] tools/ocaml/libs/xc: add hvm_param_get binding

2022-12-01 Thread Christian Lindig
> On 1 Dec 2022, at 13:50, Edwin Torok wrote: > > Should we instead switch to using ctypes to generate these constants? I would not advocate this. Ctypes is the kind of meta programming that is great when it works but hell if it does not and it adds more dependencies. I just had a

  1   2   >