[libvirt test] 158374: regressions - FAIL

2021-01-11 Thread osstest service owner
flight 158374 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/158374/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-libvirt 6 libvirt-buildfail REGR. vs. 151777 build-arm64-libvirt

Re: [RFC PATCH v3 0/6] Restricted DMA

2021-01-11 Thread Claire Chang
On Fri, Jan 8, 2021 at 1:59 AM Florian Fainelli wrote: > > On 1/7/21 9:42 AM, Claire Chang wrote: > > >> Can you explain how ATF gets involved and to what extent it does help, > >> besides enforcing a secure region from the ARM CPU's perpsective? Does > >> the PCIe root complex not have an IOMMU b

Re: [RFC PATCH v3 5/6] dt-bindings: of: Add restricted DMA pool

2021-01-11 Thread Claire Chang
On Fri, Jan 8, 2021 at 2:15 AM Florian Fainelli wrote: > > On 1/7/21 10:00 AM, Konrad Rzeszutek Wilk wrote: > >>> > >>> > >>> - Nothing stops the physical device from bypassing the SWIOTLB buffer. > >>>That is if an errant device screwed up the length or DMA address, the > >>>SWIOTLB woul

Re: [PATCH] xen/privcmd: allow fetching resource sizes

2021-01-11 Thread Jürgen Groß
On 12.01.21 06:50, Jürgen Groß wrote: On 11.01.21 23:39, Andrew Cooper wrote: On 11/01/2021 22:09, boris.ostrov...@oracle.com wrote: On 1/11/21 10:29 AM, Roger Pau Monne wrote: +    xdata.domid = kdata.dom; +    xdata.type = kdata.type; +    xdata.id = kdata.id; + +    if (!kdata.addr && !kdat

Re: [PATCH] xen/privcmd: allow fetching resource sizes

2021-01-11 Thread Jürgen Groß
On 11.01.21 16:29, Roger Pau Monne wrote: Allow issuing an IOCTL_PRIVCMD_MMAP_RESOURCE ioctl with num = 0 and addr = 0 in order to fetch the size of a specific resource. Add a shortcut to the default map resource path, since fetching the size requires no address to be passed in, and thus no VMA

Re: [PATCH] xen/privcmd: allow fetching resource sizes

2021-01-11 Thread Jürgen Groß
On 11.01.21 23:39, Andrew Cooper wrote: On 11/01/2021 22:09, boris.ostrov...@oracle.com wrote: On 1/11/21 10:29 AM, Roger Pau Monne wrote: + xdata.domid = kdata.dom; + xdata.type = kdata.type; + xdata.id = kdata.id; + + if (!kdata.addr && !kdata.num) { I think we should n

[PATCH v2 1/2] viridian: remove implicit limit of 64 VPs per partition

2021-01-11 Thread Igor Druzhinin
TLFS 7.8.1 stipulates that "a virtual processor index must be less than the maximum number of virtual processors per partition" that "can be obtained through CPUID leaf 0x4005". Furthermore, "Requirements for Implementing the Microsoft Hypervisor Interface" defines that starting from Windows Se

[PATCH v2 2/2] viridian: allow vCPU hotplug for Windows VMs

2021-01-11 Thread Igor Druzhinin
If Viridian extensions are enabled, Windows wouldn't currently allow a hotplugged vCPU to be brought up dynamically. We need to expose a special bit to let the guest know we allow it. Hide it behind an option to stay on the safe side regarding compatibility with existing guests but nevertheless set

[linux-linus test] 158368: regressions - FAIL

2021-01-11 Thread osstest service owner
flight 158368 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/158368/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-xsm7 xen-install fail REGR. vs. 152332 test-amd64-i386-qem

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

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

[qemu-mainline test] 158367: regressions - FAIL

2021-01-11 Thread osstest service owner
flight 158367 qemu-mainline real [real] flight 158370 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/158367/ http://logs.test-lab.xenproject.org/osstest/logs/158370/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

Re: [RESEND] [RFC PATCH] xen/arm: domain_build: Ignore empty memory bank

2021-01-11 Thread Stefano Stabellini
On Mon, 4 Jan 2021, Elliott Mitchell wrote: > On Mon, Dec 21, 2020 at 06:28:35PM +, Julien Grall wrote: > > On 21/12/2020 17:30, Elliott Mitchell wrote: > > > I doubt this is the only bug exposed by > > > 5a37207df52066efefe419c677b089a654d37afc. > > > > Are you saying that with my patch dropp

Re: [PATCH] iommu/arm: ipmmu-vmsa: Use 1U << 31 rather than 1 << 31

2021-01-11 Thread Stefano Stabellini
On Mon, 11 Jan 2021, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > Replace all the use of 1 << 31 with 1U << 31 to prevent undefined > behavior in the IPMMU-VMSA driver. > > Signed-off-by: Oleksandr Tyshchenko Reviewed-by: Stefano Stabellini > --- > This is a follow-up to > h

Re: [PATCH 2/2] sysemu: Let VMChangeStateHandler take boolean 'running' argument

2021-01-11 Thread David Gibson
On Mon, Jan 11, 2021 at 04:20:20PM +0100, Philippe Mathieu-Daudé wrote: > The 'running' argument from VMChangeStateHandler does not require > other value than 0 / 1. Make it a plain boolean. > > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David Gibson > --- > include/sysemu/runs

[PATCH] xen/arm: don't read aarch32 regs when aarch32 isn't available

2021-01-11 Thread Stefano Stabellini
Don't read aarch32 system registers at boot time when the aarch32 state is not available. They are UNKNOWN, so it is not useful to read them. Moreover, on Cavium ThunderX reading ID_PFR2_EL1 causes a Xen crash. Instead, only read them when aarch32 is available. Leave the corresponding fields in st

Re: [PATCH] xen/privcmd: allow fetching resource sizes

2021-01-11 Thread Andrew Cooper
On 11/01/2021 22:09, boris.ostrov...@oracle.com wrote: > On 1/11/21 10:29 AM, Roger Pau Monne wrote: >> >> +xdata.domid = kdata.dom; >> +xdata.type = kdata.type; >> +xdata.id = kdata.id; >> + >> +if (!kdata.addr && !kdata.num) { > > I think we should not allow only one of them to

Re: [PATCH v2 09/11] xen/memory: Fix mapping grant tables with XENMEM_acquire_resource

2021-01-11 Thread Andrew Cooper
On 11/01/2021 20:05, Andrew Cooper wrote: >>> --- a/xen/common/memory.c >>> +++ b/xen/common/memory.c >>> @@ -1027,17 +1027,31 @@ static unsigned int resource_max_frames(struct >>> domain *d, >>> } >>> } >>> >>> +/* >>> + * Returns -errno on error, or positive in the range [1, nr_frames] o

[xen-unstable test] 158357: regressions - FAIL

2021-01-11 Thread osstest service owner
flight 158357 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/158357/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-xl-thunderx 8 xen-boot fail REGR. vs. 158290 test-arm64-arm64-e

Re: [PATCH] xen/privcmd: allow fetching resource sizes

2021-01-11 Thread boris . ostrovsky
On 1/11/21 10:29 AM, Roger Pau Monne wrote: > > + xdata.domid = kdata.dom; > + xdata.type = kdata.type; > + xdata.id = kdata.id; > + > + if (!kdata.addr && !kdata.num) { I think we should not allow only one of them to be zero. If it's only kdata.num then we will end up with p

Re: [PATCH v2 02/11] xen/gnttab: Rework resource acquisition

2021-01-11 Thread Andrew Cooper
On 24/09/2020 10:51, Paul Durrant wrote: >> diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c >> index a5d3ed8bda..912f07be47 100644 >> --- a/xen/common/grant_table.c >> +++ b/xen/common/grant_table.c >> @@ -4013,6 +4013,81 @@ static int gnttab_get_shared_frame_mfn(struct domain >>

Re: [PATCH v2 02/11] xen/gnttab: Rework resource acquisition

2021-01-11 Thread Andrew Cooper
On 25/09/2020 14:17, Jan Beulich wrote: > On 22.09.2020 20:24, Andrew Cooper wrote: >> --- a/xen/common/grant_table.c >> +++ b/xen/common/grant_table.c >> @@ -4013,6 +4013,81 @@ static int gnttab_get_shared_frame_mfn(struct domain >> *d, >> return 0; >> } >> >> +int gnttab_acquire_resource

Re: [PATCH v2 09/11] xen/memory: Fix mapping grant tables with XENMEM_acquire_resource

2021-01-11 Thread Andrew Cooper
On 28/09/2020 10:37, Jan Beulich wrote: > On 22.09.2020 20:24, Andrew Cooper wrote: >> --- a/xen/arch/x86/mm.c >> +++ b/xen/arch/x86/mm.c >> @@ -4632,7 +4632,6 @@ int arch_acquire_resource(struct domain *d, unsigned >> int type, >> if ( id != (unsigned int)ioservid ) >> break

Re: [PATCH v2] xen/arm: do not read MVFR2 when is not defined

2021-01-11 Thread Bertrand Marquis
Hi, > On 11 Jan 2021, at 19:07, Julien Grall wrote: > > > > On 11/01/2021 19:02, Bertrand Marquis wrote: >> Hi Julien, > > Hi Bertrand, > >>> On 11 Jan 2021, at 18:50, Julien Grall wrote: >>> >>> On 11/01/2021 18:21, Bertrand Marquis wrote: Hi Julien, >>> >>> Hi Bertrand, >>> S

Re: [PATCH v2] xen/arm: do not read MVFR2 when is not defined

2021-01-11 Thread Julien Grall
On 11/01/2021 19:02, Bertrand Marquis wrote: Hi Julien, Hi Bertrand, On 11 Jan 2021, at 18:50, Julien Grall wrote: On 11/01/2021 18:21, Bertrand Marquis wrote: Hi Julien, Hi Bertrand, Sorry for the delay but I was on holiday until today. Welcome back! No worries. On 11 Jan 202

Re: [PATCH v2] xen/arm: do not read MVFR2 when is not defined

2021-01-11 Thread Bertrand Marquis
Hi Julien, > On 11 Jan 2021, at 18:50, Julien Grall wrote: > > On 11/01/2021 18:21, Bertrand Marquis wrote: >> Hi Julien, > > Hi Bertrand, > >> Sorry for the delay but I was on holiday until today. > > Welcome back! No worries. > >>> On 11 Jan 2021, at 10:25, Julien Grall wrote: >>> >>> Hi

Re: [PATCH v2] xen/arm: do not read MVFR2 when is not defined

2021-01-11 Thread Julien Grall
On 11/01/2021 18:21, Bertrand Marquis wrote: Hi Julien, Hi Bertrand, Sorry for the delay but I was on holiday until today. Welcome back! No worries. On 11 Jan 2021, at 10:25, Julien Grall wrote: Hi Jan, On 11/01/2021 08:49, Jan Beulich wrote: On 08.01.2021 20:22, Stefano Stabellini

Re: [PATCH v2] xen/arm: do not read MVFR2 when is not defined

2021-01-11 Thread Bertrand Marquis
Hi Julien, Sorry for the delay but I was on holiday until today. > On 11 Jan 2021, at 10:25, Julien Grall wrote: > > Hi Jan, > > On 11/01/2021 08:49, Jan Beulich wrote: >> On 08.01.2021 20:22, Stefano Stabellini wrote: >>> MVFR2 is not available on ARMv7. It is available on ARMv8 aarch32 and >

Re: [PATCH v20210111 01/39] stubdom: fix tpm_version

2021-01-11 Thread Samuel Thibault
Olaf Hering, le lun. 11 janv. 2021 18:41:46 +0100, a ecrit: > It is just a declaration, not a variable. > > ld: > /home/abuild/rpmbuild/BUILD/xen-4.14.20200616T103126.3625b04991/non-dbg/stubdom/vtpmmgr/vtpmmgr.a(vtpm_cmd_handler.o):(.bss+0x0): > multiple definition of `tpm_version'; > /home/abu

[PATCH v20210111 01/39] stubdom: fix tpm_version

2021-01-11 Thread Olaf Hering
It is just a declaration, not a variable. ld: /home/abuild/rpmbuild/BUILD/xen-4.14.20200616T103126.3625b04991/non-dbg/stubdom/vtpmmgr/vtpmmgr.a(vtpm_cmd_handler.o):(.bss+0x0): multiple definition of `tpm_version'; /home/abuild/rpmbuild/BUILD/xen-4.14.20200616T103126.3625b04991/non-dbg/stubdom/v

[PATCH v20210111 28/39] tools/guest: restore: move pfns array in populate_pfns

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move populate_pfns' pfns array into preallocated space. Use some prefix to avoid conflict with an array used in handle_page_data. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 1 + tools/libs/guest/xg_sr_restore.c | 11 +-- 2 files ch

[PATCH v20210111 34/39] tools: adjust libxl_domain_suspend to receive a struct props

2021-01-11 Thread Olaf Hering
Upcoming changes will pass more knobs down to xc_domain_save. Adjust the libxl_domain_suspend API to allow easy adding of additional knobs. No change in behavior intented. Signed-off-by: Olaf Hering --- tools/include/libxl.h| 26 +++--- tools/libs/light/libxl

[PATCH v20210111 26/39] tools/guest: restore: move map_errs array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move map_errs array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 1 + tools/libs/guest/xg_sr_restore.c | 12 +--- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h

[PATCH v20210111 32/39] tools: remove tabs from code produced by libxl_save_msgs_gen.pl

2021-01-11 Thread Olaf Hering
Signed-off-by: Olaf Hering --- tools/libs/light/libxl_save_msgs_gen.pl | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/libs/light/libxl_save_msgs_gen.pl b/tools/libs/light/libxl_save_msgs_gen.pl index 5bfbd4fd10..9d425b1dee 100755 --- a/tools/libs

[PATCH v20210111 22/39] tools/guest: save: move local_pages array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move local_pages array into preallocated space. Adjust the code to use the src page as is in case of HVM. In case of PV the page may need to be normalised, use an private memory area for this purpose. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h

[PATCH v20210111 33/39] tools: recognize LIBXL_API_VERSION for 4.15

2021-01-11 Thread Olaf Hering
This is required by upcoming API changes. Signed-off-by: Olaf Hering --- tools/include/libxl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/include/libxl.h b/tools/include/libxl.h index 3433c950f9..6546dcd819 100644 --- a/tools/include/libxl.h +++ b/tools/include/l

[PATCH v20210111 39/39] tools: add --abort_if_busy to libxl_domain_suspend

2021-01-11 Thread Olaf Hering
Provide a knob to the host admin to abort the live migration of a running domU if the downtime during final transit will be too long for the workload within domU. Adjust error reporting. Add ERROR_MIGRATION_ABORTED to allow callers of libxl_domain_suspend to distinguish between errors and the requ

[PATCH v20210111 37/39] tools: add --max_iters to libxl_domain_suspend

2021-01-11 Thread Olaf Hering
Migrating a large, and potentially busy, domU will take more time than neccessary due to excessive number of copying iterations. Allow to host admin to control the number of iterations which copy cumulated domU dirty pages to the target host. The default remains 5, which means one initial iterati

[PATCH v20210111 06/39] Use XEN_SCRIPT_DIR to refer to /etc/xen/scripts

2021-01-11 Thread Olaf Hering
Replace all hardcoded paths to use XEN_SCRIPT_DIR to expand the actual location. Update .gitignore. Signed-off-by: Olaf Hering --- .gitignore | 3 +++ docs/configure.ac | 3 +++ ...k-configuration.5.pod =

[PATCH v20210111 31/39] tools/guest: restore: write data directly into guest

2021-01-11 Thread Olaf Hering
Read incoming migration stream directly into the guest memory. This avoids the memory allocation and copying, and the resulting performance penalty. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 1 + tools/libs/guest/xg_sr_restore.c | 132 ++- 2

[PATCH v20210111 00/39] leftover from 2020

2021-01-11 Thread Olaf Hering
Various unreviewed changes. Olaf Hering (39): stubdom: fix tpm_version xl: use proper name for bash_completion file docs: remove stale create example from xl.1 docs: substitute XEN_CONFIG_DIR in xl.conf.5 tools: add with-xen-scriptdir configure option Use XEN_SCRIPT_DIR to refer to /et

[PATCH v20210111 19/39] tools/guest: save: move iov array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move iov array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save.c | 7 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/tools/libs/

[PATCH v20210111 36/39] tools: add callback to libxl for precopy_policy and precopy_stats_t

2021-01-11 Thread Olaf Hering
This duplicates simple_precopy_policy. To recap its purpose: - do up to 5 iterations of copying dirty domU memory to target, including the initial copying of all domU memory, excluding the final copying while the domU is suspended - do fewer iterations in case the domU dirtied less than 50 page

[PATCH v20210111 38/39] tools: add --min_remaining to libxl_domain_suspend

2021-01-11 Thread Olaf Hering
The decision to stop+move a domU to the new host must be based on two factors: - the available network bandwidth for the migration stream - the maximum time a workload within a domU can be savely suspended Both values define how many dirty pages a workload may produce prior the final stop+move. T

[PATCH v20210111 30/39] tools/guest: restore: split handle_page_data

2021-01-11 Thread Olaf Hering
handle_page_data must be able to read directly into mapped guest memory. This will avoid unneccesary memcpy calls for data that can be consumed verbatim. Split the various steps of record processing: - move processing to handle_buffered_page_data - adjust xenforeignmemory_map to set errno in case

[PATCH v20210111 24/39] tools/guest: restore: move types array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move types array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 1 + tools/libs/guest/xg_sr_restore.c | 12 +--- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/

[PATCH v20210111 35/39] tools: change struct precopy_stats to precopy_stats_t

2021-01-11 Thread Olaf Hering
This will help libxl_save_msgs_gen.pl to copy the struct as a region of memory. No change in behavior intented. Signed-off-by: Olaf Hering --- tools/include/xenguest.h| 7 +++ tools/libs/guest/xg_sr_common.h | 2 +- tools/libs/guest/xg_sr_save.c | 6 +++--- 3 files changed, 7 inse

[PATCH v20210111 29/39] tools/guest: restore: split record processing

2021-01-11 Thread Olaf Hering
handle_page_data must be able to read directly into mapped guest memory. This will avoid unneccesary memcpy calls for data which can be consumed verbatim. Rearrange the code to allow decisions based on the incoming record. This change is preparation for future changes in handle_page_data, no cha

[PATCH v20210111 23/39] tools/guest: restore: move pfns array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move pfns array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_restore.c | 6 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/tools/lib

[PATCH v20210111 27/39] tools/guest: restore: move mfns array in populate_pfns

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move populate_pfns mfns array into preallocated space. Use some prefix to avoid conflict with an array used in handle_page_data. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_restore.c | 5 ++--- 2 files changed, 4

[PATCH v20210111 25/39] tools/guest: restore: move mfns array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move mfns array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_restore.c | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/tools/libs

Re: [PATCH 2/2] sysemu: Let VMChangeStateHandler take boolean 'running' argument

2021-01-11 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > The 'running' argument from VMChangeStateHandler does not require > other value than 0 / 1. Make it a plain boolean. > > Signed-off-by: Philippe Mathieu-Daudé Seems reasonable Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 1/2] sysemu/runstate: Let runstate_is_running() return bool

2021-01-11 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > runstate_check() returns a boolean. runstate_is_running() > returns what runstate_check() returns, also a boolean. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée -- Alex Bennée

[PATCH v20210111 21/39] tools/guest: save: move guest_data array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move guest_data array into preallocated space. Because this was allocated with calloc: Adjust the loop to clear unused entries as needed. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save.c | 11 ++- 2 f

[PATCH v20210111 20/39] tools/guest: save: move rec_pfns array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move rec_pfns array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save.c | 11 +-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b

[PATCH v20210111 16/39] tools/guest: save: move mfns array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move mfns array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save.c | 7 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/tools/libs

[PATCH v20210111 18/39] tools/guest: save: move errors array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move errors array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save.c | 7 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/tools/li

[PATCH v20210111 14/39] tools/guest: prepare to allocate arrays once

2021-01-11 Thread Olaf Hering
The hotpath 'send_dirty_pages' is supposed to do just one thing: sending. The other end 'handle_page_data' is supposed to do just receiving. But instead both do other costly work like memory allocations and data moving. Do the allocations once, the array sizes are a compiletime constant. Avoid unn

[PATCH v20210111 17/39] tools/guest: save: move types array

2021-01-11 Thread Olaf Hering
Remove allocation from hotpath, move types array into preallocated space. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save.c | 7 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/libs/guest/xg_sr_common.h b/tools/lib

[PATCH v20210111 13/39] tools: show migration transfer rate in send_dirty_pages

2021-01-11 Thread Olaf Hering
Show how fast domU pages are transferred in each iteration. The relevant data is how fast the pfns travel, not so much how much protocol overhead exists. So the reported MiB/sec is just for pfns. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 ++ tools/libs/guest/xg_sr_save

[PATCH v20210111 15/39] tools/guest: save: move batch_pfns

2021-01-11 Thread Olaf Hering
The batch_pfns array is already allocated in advance. Move it into the preallocated area. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 2 +- tools/libs/guest/xg_sr_save.c | 25 +++-- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/tools

[PATCH v20210111 07/39] xl: optionally print timestamps during xl migrate

2021-01-11 Thread Olaf Hering
During 'xl -v.. migrate domU host' a large amount of debug is generated. It is difficult to map each line to the sending and receiving side. Also the time spent for migration is not reported. With 'xl migrate -T domU host' both sides will print timestamps and also the pid of the invoked xl process

[PATCH v20210111 12/39] tools: unify type checking for data pfns in migration stream

2021-01-11 Thread Olaf Hering
Introduce a helper which decides if a given pfn type has data for the migration stream. No change in behavior intended. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_common.h | 17 tools/libs/guest/xg_sr_restore.c | 34 +--- tools/libs/guest

[PATCH v20210111 08/39] xl: fix description of migrate --debug

2021-01-11 Thread Olaf Hering
xl migrate --debug used to track every pfn in every batch of pages. But these times are gone. Adjust the help text to tell what --debug is supposed to do today. Signed-off-by: Olaf Hering --- docs/man/xl.1.pod.in | 4 +++- tools/xl/xl_cmdtable.c | 2 +- 2 files changed, 4 insertions(+), 2 dele

[PATCH v20210111 11/39] tools: use xc_is_known_page_type

2021-01-11 Thread Olaf Hering
Verify pfn type on sending side, also verify incoming batch of pfns. Signed-off-by: Olaf Hering --- tools/libs/guest/xg_sr_restore.c | 3 +-- tools/libs/guest/xg_sr_save.c| 6 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/libs/guest/xg_sr_restore.c b/tools/libs/

[PATCH v20210111 10/39] tools: add xc_is_known_page_type to libxenctrl

2021-01-11 Thread Olaf Hering
Users of xc_get_pfn_type_batch may want to sanity check the data returned by Xen. Add a simple helper for this purpose. Signed-off-by: Olaf Hering --- tools/libs/ctrl/xc_private.h | 33 + 1 file changed, 33 insertions(+) diff --git a/tools/libs/ctrl/xc_private.h

[PATCH v20210111 09/39] tools: add readv_exact to libxenctrl

2021-01-11 Thread Olaf Hering
Read a batch of iovec's. In the common case of short reads, finish individual iov's with read_exact. Signed-off-by: Olaf Hering --- tools/libs/ctrl/xc_private.c | 55 +++- tools/libs/ctrl/xc_private.h | 1 + 2 files changed, 55 insertions(+), 1 deletion(-) diff

[PATCH v20210111 05/39] tools: add with-xen-scriptdir configure option

2021-01-11 Thread Olaf Hering
In the near future all fresh installations will have an empty /etc. The content of this directory will not be controlled by the package manager anymore. One of the reasons for this move is to make snapshots more robust. As a first step into this direction, add a knob to configure to allow storing

[PATCH v20210111 02/39] xl: use proper name for bash_completion file

2021-01-11 Thread Olaf Hering
Files in the bash-completion dirs should be named like the commands, without suffix. Without this change 'xl' will not be recognized as a command with completion support if BASH_COMPLETION_DIR is set to /usr/share/bash-completion/completions. Fixes commit 9136a919b19929ecb242ef327053d55d824397df

[PATCH v20210111 04/39] docs: substitute XEN_CONFIG_DIR in xl.conf.5

2021-01-11 Thread Olaf Hering
xl(1) opens xl.conf in XEN_CONFIG_DIR. Substitute this variable also in the man page. Signed-off-by: Olaf Hering Reviewed-by: Anthony PERARD --- docs/man/xl.1.pod.in | 2 +- docs/man/xl.conf.5.pod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/man/xl.1.pod.in b/do

[PATCH v20210111 03/39] docs: remove stale create example from xl.1

2021-01-11 Thread Olaf Hering
Maybe xm create had a feature to create a domU based on a configuration file. xl create requires the '-f' option to refer to a file. There is no code to look into XEN_CONFIG_DIR, so remove the example. Signed-off-by: Olaf Hering --- docs/man/xl.1.pod.in | 7 --- 1 file changed, 7 deletions(-

Re: [PATCH 10/24] Make libs/evtchn build on NetBSD

2021-01-11 Thread Roger Pau Monné
On Sun, Jan 10, 2021 at 01:22:50PM +0100, Manuel Bouyer wrote: > On Mon, Jan 04, 2021 at 06:15:24PM +0100, Roger Pau Monné wrote: > > On Mon, Jan 04, 2021 at 11:26:45AM +0100, Manuel Bouyer wrote: > > > On Tue, Dec 29, 2020 at 12:52:43PM +0100, Roger Pau Monné wrote: > > > > On Mon, Dec 14, 2020 at

[linux-linus test] 158346: regressions - FAIL

2021-01-11 Thread osstest service owner
flight 158346 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/158346/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-xsm7 xen-install fail REGR. vs. 152332 test-amd64-i386-qem

Re: [PATCH 12/24] Implement gnttab on NetBSD

2021-01-11 Thread Roger Pau Monné
On Sun, Jan 10, 2021 at 01:40:50PM +0100, Manuel Bouyer wrote: > On Mon, Jan 04, 2021 at 06:24:11PM +0100, Roger Pau Monné wrote: > > On Mon, Jan 04, 2021 at 11:29:51AM +0100, Manuel Bouyer wrote: > > > On Tue, Dec 29, 2020 at 12:16:01PM +0100, Roger Pau Monné wrote: > > > > Might need some kind of

Re: [PATCH] x86/acpi: remove dead code

2021-01-11 Thread Roger Pau Monné
On Mon, Jan 11, 2021 at 10:33:28AM +0100, Jan Beulich wrote: > On 11.01.2021 10:26, Roger Pau Monne wrote: > > After the recent changes to acpi_fadt_parse_sleep_info the bad label > > can never be called with facs mapped, and hence the unmap can be > > removed. > > > > Additionally remove the whol

[xen-unstable bisection] complete test-arm64-arm64-xl-credit1

2021-01-11 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-arm64-arm64-xl-credit1 testid xen-boot Tree: linux git://xenbits.xen.org/linux-pvops.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemuu git://xenbits.xen.org/qemu-xen.git Tree: xen git://xenbits.xen.org/xen.git

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

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

[PATCH v2] tools: create libxensaverestore

2021-01-11 Thread Olaf Hering
Move all save/restore related code from libxenguest.so into a separate library libxensaverestore.so. The only consumer is libxl-save-helper. There is no need to have the moved code mapped all the time in binaries where libxenguest.so is used. According to size(1) the change is: textdata

Re: [PATCH v4 11/11] xen/arm: smmuv3: Add support for SMMUv3 driver

2021-01-11 Thread Oleksandr
Hi Rahul -   static int arm_smmu_device_probe(struct platform_device *pdev)   {   int irq, ret; -    struct resource *res; -    resource_size_t ioaddr; +    paddr_t ioaddr, iosize;   struct arm_smmu_device *smmu; -    struct device *dev = &pdev->dev; -    bool bypass;   -    smmu = de

Re: [PATCH 3/4] x86: Allow non-faulting accesses to non-emulated MSRs if policy permits this

2021-01-11 Thread boris . ostrovsky
On 1/11/21 2:48 AM, Jan Beulich wrote: > On 08.01.2021 21:39, boris.ostrov...@oracle.com wrote: >> On 1/8/21 10:18 AM, Jan Beulich wrote: >> >>> >>> Just to re-raise the question raised by Andrew already earlier >>> on: Has Solaris been fixed in the meantime, or is this at least >>> firmly planne

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Laszlo Ersek
On 01/11/21 17:31, Igor Druzhinin wrote: > On 11/01/2021 15:35, Laszlo Ersek wrote: >> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments >> unless you have verified the sender and know the content is safe. >> >> On 01/11/21 16:26, Igor Druzhinin wrote: >>> On 11/01/2021 15:

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Igor Druzhinin
On 11/01/2021 15:35, Laszlo Ersek wrote: > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments > unless you have verified the sender and know the content is safe. > > On 01/11/21 16:26, Igor Druzhinin wrote: >> On 11/01/2021 15:21, Jan Beulich wrote: >>> On 11.01.2021 15:49,

Re: [PATCH v4 11/11] xen/arm: smmuv3: Add support for SMMUv3 driver

2021-01-11 Thread Oleksandr
On 08.01.21 16:46, Rahul Singh wrote: Hi Rahul Add support for ARM architected SMMUv3 implementation. It is based on the Linux SMMUv3 driver. Driver is currently supported as Tech Preview. Major differences with regard to Linux driver are as follows: 2. Only Stage-2 translation is supported

Re: [PATCH 1/2] sysemu/runstate: Let runstate_is_running() return bool

2021-01-11 Thread David Hildenbrand
On 11.01.21 16:20, Philippe Mathieu-Daudé wrote: > runstate_check() returns a boolean. runstate_is_running() > returns what runstate_check() returns, also a boolean. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/sysemu/runstate.h | 2 +- > softmmu/runstate.c| 2 +- > 2 files

[qemu-mainline test] 158341: regressions - FAIL

2021-01-11 Thread osstest service owner
flight 158341 qemu-mainline real [real] flight 158363 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/158341/ http://logs.test-lab.xenproject.org/osstest/logs/158363/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

Re: [PATCH 5/5] x86/PV32: avoid TLB flushing after mod_l3_entry()

2021-01-11 Thread Roger Pau Monné
On Mon, Jan 11, 2021 at 03:28:23PM +0100, Jan Beulich wrote: > On 11.01.2021 15:23, Roger Pau Monné wrote: > > On Tue, Nov 03, 2020 at 11:58:16AM +0100, Jan Beulich wrote: > >> 32-bit guests may not depend upon the side effect of using ordinary > >> 4-level paging when running on a 64-bit hyperviso

Re: [PATCH v3 05/11] tools/foreignmem: Support querying the size of a resource

2021-01-11 Thread Roger Pau Monné
On Mon, Jan 11, 2021 at 03:26:57PM +, Andrew Cooper wrote: > With the Xen side of this interface fixed to return real sizes, userspace > needs to be able to make the query. > > Introduce xenforeignmemory_resource_size() for the purpose, bumping the > library minor version. > > Update both Lin

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Laszlo Ersek
On 01/11/21 16:26, Igor Druzhinin wrote: > On 11/01/2021 15:21, Jan Beulich wrote: >> On 11.01.2021 15:49, Laszlo Ersek wrote: >>> On 01/11/21 15:00, Igor Druzhinin wrote: On 11/01/2021 09:27, Jan Beulich wrote: > On 11.01.2021 05:53, Igor Druzhinin wrote: >> We faced a problem with pa

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Jan Beulich
On 11.01.2021 16:26, Igor Druzhinin wrote: > Another problem that I faced while experimenting is that creating page > tables for 46-bits (that CPUID returned in my case) of address space takes > about a minute on a modern CPU. Which probably isn't fundamentally different from bare metal? Jan

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Laszlo Ersek
On 01/11/21 16:21, Jan Beulich wrote: > On 11.01.2021 15:49, Laszlo Ersek wrote: >> On 01/11/21 15:00, Igor Druzhinin wrote: >>> On 11/01/2021 09:27, Jan Beulich wrote: On 11.01.2021 05:53, Igor Druzhinin wrote: > We faced a problem with passing through a PCI device with 64GB BAR to >

[PATCH] xen/privcmd: allow fetching resource sizes

2021-01-11 Thread Roger Pau Monne
Allow issuing an IOCTL_PRIVCMD_MMAP_RESOURCE ioctl with num = 0 and addr = 0 in order to fetch the size of a specific resource. Add a shortcut to the default map resource path, since fetching the size requires no address to be passed in, and thus no VMA to setup. Fixes: 3ad0876554caf ('xen/privcm

[PATCH v3 05/11] tools/foreignmem: Support querying the size of a resource

2021-01-11 Thread Andrew Cooper
With the Xen side of this interface fixed to return real sizes, userspace needs to be able to make the query. Introduce xenforeignmemory_resource_size() for the purpose, bumping the library minor version. Update both Linux and FreeBSD's osdep_xenforeignmemory_map_resource() to understand size req

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Igor Druzhinin
On 11/01/2021 15:21, Jan Beulich wrote: > On 11.01.2021 15:49, Laszlo Ersek wrote: >> On 01/11/21 15:00, Igor Druzhinin wrote: >>> On 11/01/2021 09:27, Jan Beulich wrote: On 11.01.2021 05:53, Igor Druzhinin wrote: > We faced a problem with passing through a PCI device with 64GB BAR to

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Jan Beulich
On 11.01.2021 15:49, Laszlo Ersek wrote: > On 01/11/21 15:00, Igor Druzhinin wrote: >> On 11/01/2021 09:27, Jan Beulich wrote: >>> On 11.01.2021 05:53, Igor Druzhinin wrote: We faced a problem with passing through a PCI device with 64GB BAR to UEFI guest. The BAR is expectedly programmed

[PATCH 2/2] sysemu: Let VMChangeStateHandler take boolean 'running' argument

2021-01-11 Thread Philippe Mathieu-Daudé
The 'running' argument from VMChangeStateHandler does not require other value than 0 / 1. Make it a plain boolean. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/runstate.h | 10 -- target/arm/kvm_arm.h| 2 +- target/ppc/cpu-qom.h| 2 +- accel/xen/xen-all.c

[PATCH 1/2] sysemu/runstate: Let runstate_is_running() return bool

2021-01-11 Thread Philippe Mathieu-Daudé
runstate_check() returns a boolean. runstate_is_running() returns what runstate_check() returns, also a boolean. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/runstate.h | 2 +- softmmu/runstate.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sy

[PATCH 0/2] sysemu: Let VMChangeStateHandler take boolean 'running' argument

2021-01-11 Thread Philippe Mathieu-Daudé
Trivial prototype change to clarify the use of the 'running' argument of VMChangeStateHandler. Green CI: https://gitlab.com/philmd/qemu/-/pipelines/239497352 Philippe Mathieu-Daudé (2): sysemu/runstate: Let runstate_is_running() return bool sysemu: Let VMChangeStateHandler take boolean 'runni

Re: [PATCH] tools/libxenstat: ensure strnlen() declaration is visible

2021-01-11 Thread Ian Jackson
Jan Beulich writes ("[PATCH] tools/libxenstat: ensure strnlen() declaration is visible"): > Its guard was updated such that it is visible by default when POSIX 2008 > was adopted by glibc. It's not visible by default on older glibc. > > Fixes: 40fe714ca424 ("tools/libs/stat: use memcpy instead of

Re: [PATCH v2 05/11] tools/foreignmem: Support querying the size of a resource

2021-01-11 Thread Andrew Cooper
On 11/01/2021 10:50, Roger Pau Monné wrote: > On Fri, Jan 08, 2021 at 05:52:36PM +, Andrew Cooper wrote: >> On 22/09/2020 19:24, Andrew Cooper wrote: >>> diff --git a/tools/libs/foreignmemory/linux.c >>> b/tools/libs/foreignmemory/linux.c >>> index fe73d5ab72..eec089e232 100644 >>> --- a/tools

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Laszlo Ersek
On 01/11/21 15:00, Igor Druzhinin wrote: > On 11/01/2021 09:27, Jan Beulich wrote: >> On 11.01.2021 05:53, Igor Druzhinin wrote: >>> We faced a problem with passing through a PCI device with 64GB BAR to >>> UEFI guest. The BAR is expectedly programmed into 64-bit PCI aperture at >>> 64G address whi

Re: [PATCH] hvmloader: pass PCI MMIO layout to OVMF as an info table

2021-01-11 Thread Igor Druzhinin
On 11/01/2021 14:14, Jan Beulich wrote: > On 11.01.2021 15:00, Igor Druzhinin wrote: >> On 11/01/2021 09:27, Jan Beulich wrote: >>> On 11.01.2021 05:53, Igor Druzhinin wrote: --- a/tools/firmware/hvmloader/ovmf.c +++ b/tools/firmware/hvmloader/ovmf.c @@ -61,6 +61,14 @@ struct ovmf_in

  1   2   >