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

2021-01-14 Thread osstest service owner
flight 158425 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/158425/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-arm64-arm64-xl-seattle broken test-amd64-i386-qemuu-rhel6hvm-intel 7 xe

Re: [PATCH v11 05/27] tools/libxenevtchn: add possibility to not close file descriptor on exec

2021-01-14 Thread Jürgen Groß
On 15.01.21 02:01, Andrew Cooper wrote: On 14/01/2021 15:37, Juergen Gross wrote: diff --git a/tools/include/xenevtchn.h b/tools/include/xenevtchn.h index 3e9b6e7323..b6dd8f3186 100644 --- a/tools/include/xenevtchn.h +++ b/tools/include/xenevtchn.h @@ -64,11 +64,25 @@ struct xentoollog_logger;

[ovmf test] 158428: all pass - PUSHED

2021-01-14 Thread osstest service owner
flight 158428 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/158428/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 014b9850f2a33ae402b87c46268f4d98395d5d59 baseline version: ovmf 40c4cd54213b78ef0daee

Re: [PATCH v11 03/27] tools/libxenevtchn: check xenevtchn_open() flags for not supported bits

2021-01-14 Thread Jürgen Groß
On 14.01.21 20:24, Andrew Cooper wrote: On 14/01/2021 15:37, Juergen Gross wrote: Refuse a call of xenevtchn_open() with unsupported bits in flags being set. Suggested-by: Andrew Cooper Signed-off-by: Juergen Gross Reviewed-by: Andrew Cooper Possibly worth stating that this potentially go

Re: [PATCH v11 02/27] tools/libxenevtchn: rename open_flags to flags

2021-01-14 Thread Jürgen Groß
On 14.01.21 20:22, Andrew Cooper wrote: On 14/01/2021 15:37, Juergen Gross wrote: Rename the xenevtchn_open() parameter open_flags to flags as it might be used for things not passed on to open(). No functional change. Suggested-by: Andrew Cooper Signed-off-by: Juergen Gross Reviewed-by: An

[libvirt test] 158431: regressions - FAIL

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

Re: [PATCH v11 01/27] tools/libxenevtchn: switch to standard xen coding style

2021-01-14 Thread Jürgen Groß
On 14.01.21 20:07, Andrew Cooper wrote: On 14/01/2021 15:37, Juergen Gross wrote: There is a mixture of different styles in libxenevtchn. Use the standard xen style only. No functional change. Signed-off-by: Juergen Gross Acked-by: Andrew Cooper , although if whoever commits could fix these

[xen-unstable-smoke test] 158429: tolerable FAIL - PUSHED

2021-01-14 Thread osstest service owner
flight 158429 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/158429/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-xl-qemuu-debianhvm-amd64 16 guest-localmigrate fail REGR. vs. 158420 Tests which d

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

2021-01-14 Thread osstest service owner
flight 158424 xen-unstable real [real] flight 158430 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/158424/ http://logs.test-lab.xenproject.org/osstest/logs/158430/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armh

Re: [RFC PATCH v3 6/6] of: Add plumbing for restricted DMA pool

2021-01-14 Thread Claire Chang
On Fri, Jan 15, 2021 at 2:52 AM Florian Fainelli wrote: > > On 1/14/21 1:08 AM, Claire Chang wrote: > > On Wed, Jan 13, 2021 at 7:48 AM Florian Fainelli > > wrote: > >> > >> On 1/5/21 7:41 PM, Claire Chang wrote: > >>> If a device is not behind an IOMMU, we look up the device node and set > >>>

Re: [PATCH V4 22/24] xen/arm: Add mapcache invalidation handling

2021-01-14 Thread Stefano Stabellini
On Tue, 12 Jan 2021, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > We need to send mapcache invalidation request to qemu/demu everytime > the page gets removed from a guest. > > At the moment, the Arm code doesn't explicitely remove the existing > mapping before inserting the new

Re: [PATCH V4 20/24] xen/arm: io: Harden sign extension check

2021-01-14 Thread Stefano Stabellini
On Tue, 12 Jan 2021, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > In the ideal world we would never get an undefined behavior when > propagating the sign bit since that bit can only be set for access > size smaller than the register size (i.e byte/half-word for aarch32, > byte/hal

Re: [PATCH V4 19/24] xen/arm: io: Abstract sign-extension

2021-01-14 Thread Stefano Stabellini
On Tue, 12 Jan 2021, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > In order to avoid code duplication (both handle_read() and > handle_ioserv() contain the same code for the sign-extension) > put this code to a common helper to be used for both. > > Signed-off-by: Oleksandr Tyshch

Re: [PATCH V4 18/24] xen/dm: Introduce xendevicemodel_set_irq_level DM op

2021-01-14 Thread Stefano Stabellini
On Tue, 12 Jan 2021, Oleksandr Tyshchenko wrote: > From: Julien Grall > > This patch adds ability to the device emulator to notify otherend > (some entity running in the guest) using a SPI and implements Arm > specific bits for it. Proposed interface allows emulator to set > the logical level of

Re: [PATCH V4 17/24] xen/ioreq: Introduce domain_has_ioreq_server()

2021-01-14 Thread Stefano Stabellini
On Tue, 12 Jan 2021, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > This patch introduces a helper the main purpose of which is to check > if a domain is using IOREQ server(s). > > On Arm the current benefit is to avoid calling vcpu_ioreq_handle_completion() > (which implies iterat

Re: [PATCH V4 16/24] xen/mm: Handle properly reference in set_foreign_p2m_entry() on Arm

2021-01-14 Thread Stefano Stabellini
On Tue, 12 Jan 2021, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > This patch implements reference counting of foreign entries in > in set_foreign_p2m_entry() on Arm. This is a mandatory action if > we want to run emulator (IOREQ server) in other than dom0 domain, > as we can't tru

Re: [PATCH V3 16/23] xen/mm: Handle properly reference in set_foreign_p2m_entry() on Arm

2021-01-14 Thread Stefano Stabellini
On Mon, 30 Nov 2020, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > This patch implements reference counting of foreign entries in > in set_foreign_p2m_entry() on Arm. This is a mandatory action if > we want to run emulator (IOREQ server) in other than dom0 domain, > as we can't tru

Re: [PATCH V4 15/24] xen/arm: Stick around in leave_hypervisor_to_guest until I/O has completed

2021-01-14 Thread Stefano Stabellini
On Tue, 12 Jan 2021, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > This patch adds proper handling of return value of > vcpu_ioreq_handle_completion() which involves using a loop in > leave_hypervisor_to_guest(). > > The reason to use an unbounded loop here is the fact that vCPU s

Re: [PATCH v11 05/27] tools/libxenevtchn: add possibility to not close file descriptor on exec

2021-01-14 Thread Andrew Cooper
On 14/01/2021 15:37, Juergen Gross wrote: > diff --git a/tools/include/xenevtchn.h b/tools/include/xenevtchn.h > index 3e9b6e7323..b6dd8f3186 100644 > --- a/tools/include/xenevtchn.h > +++ b/tools/include/xenevtchn.h > @@ -64,11 +64,25 @@ struct xentoollog_logger; > * > * Calling xenevtchn_clos

Re: [PATCH V4 14/24] arm/ioreq: Introduce arch specific bits for IOREQ/DM features

2021-01-14 Thread Stefano Stabellini
On Tue, 12 Jan 2021, Oleksandr Tyshchenko wrote: > From: Julien Grall > > This patch adds basic IOREQ/DM support on Arm. The subsequent > patches will improve functionality and add remaining bits. > > The IOREQ/DM features are supposed to be built with IOREQ_SERVER > option enabled, which is dis

[qemu-mainline test] 158421: regressions - FAIL

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

Re: [PATCH v4 08/11] xen/compiler: import 'fallthrough' keyword from linux

2021-01-14 Thread Stefano Stabellini
On Thu, 14 Jan 2021, Jan Beulich wrote: > On 13.01.2021 00:30, Stefano Stabellini wrote: > > On Tue, 12 Jan 2021, Jan Beulich wrote: > >> On 08.01.2021 15:46, Rahul Singh wrote: > >>> -Wimplicit-fallthrough warns when a switch case falls through. Warning > >>> can be suppress by either adding a /*

Re: [PATCH 3/3] Arm: don't hard-code grant table limits in create_domUs()

2021-01-14 Thread Stefano Stabellini
On Thu, 14 Jan 2021, Jan Beulich wrote: > I can only assume that f2ae59bc4b9b ("Rationalize max_grant_frames and > max_maptrack_frames handling") unintentionally left Arm's create_domUs() > set limits to explicit values, as at least some of the same constraints > apply here. > > Signed-off-by: Jan

Re: IRQ latency measurements in hypervisor

2021-01-14 Thread Stefano Stabellini
+ Bertrand, Andrew (see comment on alloc_heap_pages()) Really great work, Volodymyr! Some comments below. On Tue, 12 Jan 2021, Volodymyr Babchuk wrote: > Hello community, > > Recently I was experimenting with context switching latencies in > Xen. I want to share my findings and discuss some iss

Re: [PATCH v2 0/7] Rid W=1 warnings in Ethernet

2021-01-14 Thread Lee Jones
On Thu, 14 Jan 2021, Jakub Kicinski wrote: > On Thu, 14 Jan 2021 08:33:49 + Lee Jones wrote: > > On Wed, 13 Jan 2021, Jakub Kicinski wrote: > > > > > On Wed, 13 Jan 2021 16:41:16 + Lee Jones wrote: > > > > Resending the stragglers again. > > > >

[ovmf test] 158422: all pass - PUSHED

2021-01-14 Thread osstest service owner
flight 158422 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/158422/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 40c4cd54213b78ef0daee2f4b186150d7ef63bb4 baseline version: ovmf 536a3e67263b6d891152c

Re: [PATCH v11 04/27] tools/libxenevtchn: propagate xenevtchn_open() flags parameter

2021-01-14 Thread Andrew Cooper
On 14/01/2021 15:37, Juergen Gross wrote: > Propagate the flags parameter of xenevtchn_open() to the OS-specific > handlers in order to enable handling them there. > > Signed-off-by: Juergen Gross Acked-by: Andrew Cooper

Re: [PATCH v11 03/27] tools/libxenevtchn: check xenevtchn_open() flags for not supported bits

2021-01-14 Thread Andrew Cooper
On 14/01/2021 15:37, Juergen Gross wrote: > Refuse a call of xenevtchn_open() with unsupported bits in flags being > set. > > Suggested-by: Andrew Cooper > Signed-off-by: Juergen Gross Reviewed-by: Andrew Cooper Possibly worth stating that this potentially going to cause problems for callers w

Re: [PATCH v11 02/27] tools/libxenevtchn: rename open_flags to flags

2021-01-14 Thread Andrew Cooper
On 14/01/2021 15:37, Juergen Gross wrote: > Rename the xenevtchn_open() parameter open_flags to flags as it might > be used for things not passed on to open(). > > No functional change. > > Suggested-by: Andrew Cooper > Signed-off-by: Juergen Gross Reviewed-by: Andrew Cooper Possibly worth sta

Re: [PATCH for-4.15 2/4] xen/iommu: x86: Free the IOMMU page-tables with the pgtables.lock held

2021-01-14 Thread Julien Grall
On 23/12/2020 14:01, Julien Grall wrote: Hi Jan, On 23/12/2020 13:48, Jan Beulich wrote: On 22.12.2020 16:43, Julien Grall wrote: From: Julien Grall The pgtables.lock is protecting access to the page list pgtables.list. However, iommu_free_pgtables() will not held it. I guess it was assum

Re: [PATCH v11 01/27] tools/libxenevtchn: switch to standard xen coding style

2021-01-14 Thread Andrew Cooper
On 14/01/2021 15:37, Juergen Gross wrote: > There is a mixture of different styles in libxenevtchn. Use the > standard xen style only. > > No functional change. > > Signed-off-by: Juergen Gross Acked-by: Andrew Cooper , although if whoever commits could fix these as well, that would be great. >

Re: [ANNOUNCE] Xen 4.15 release schedule and feature tracking

2021-01-14 Thread Andrew Cooper
On 14/01/2021 16:06, Ian Jackson wrote: > The last posting date for new feature patches for Xen 4.15 is > tomorrow. [1] We seem to be getting a reasonable good flood of stuff > trying to meet this deadline :-). > > Patches for new fetures posted after tomorrow will be deferred to the > next Xen re

Re: [PATCH for-4.15 4/4] xen/iommu: x86: Don't leak the IOMMU page-tables

2021-01-14 Thread Julien Grall
Hi Jan, On 23/12/2020 16:35, Jan Beulich wrote: On 23.12.2020 17:19, Julien Grall wrote: On 23/12/2020 16:15, Jan Beulich wrote: On 23.12.2020 17:07, Julien Grall wrote: I think I prefer the small race introduced (the pages will still be freed) over this solution. The "will still be freed"

Re: [RFC PATCH v3 6/6] of: Add plumbing for restricted DMA pool

2021-01-14 Thread Florian Fainelli
On 1/14/21 1:08 AM, Claire Chang wrote: > On Wed, Jan 13, 2021 at 7:48 AM Florian Fainelli wrote: >> >> On 1/5/21 7:41 PM, Claire Chang wrote: >>> If a device is not behind an IOMMU, we look up the device node and set >>> up the restricted DMA when the restricted-dma-pool is presented. >>> >>> Sig

[linux-linus test] 158418: regressions - FAIL

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

Re: [PATCH V4 00/24] IOREQ feature (+ virtio-mmio) on Arm

2021-01-14 Thread Oleksandr
On 14.01.21 18:11, Ian Jackson wrote: Hi Ian Hi, thanks for giving this update. Since you were the only person who took the time to send such an update I feel I can spend some time on trying to help with any obstacles you may face. Thank you. Hence this enquiry: Oleksandr writes ("

Re: [PATCH v3 08/15] x86: add new features for paravirt patching

2021-01-14 Thread Borislav Petkov
On Thu, Jan 14, 2021 at 07:30:24PM +0100, Borislav Petkov wrote: > On Thu, Dec 17, 2020 at 09:12:57PM +0800, kernel test robot wrote: > >ld: arch/x86/kernel/alternative.o: in function `paravirt_set_cap': > > >> arch/x86/kernel/alternative.c:605: undefined reference to > > >> `pv_is_native_spin

Re: [PATCH v3 08/15] x86: add new features for paravirt patching

2021-01-14 Thread Borislav Petkov
On Thu, Dec 17, 2020 at 09:12:57PM +0800, kernel test robot wrote: >ld: arch/x86/kernel/alternative.o: in function `paravirt_set_cap': > >> arch/x86/kernel/alternative.c:605: undefined reference to > >> `pv_is_native_spin_unlock' > >> ld: arch/x86/kernel/alternative.c:608: undefined reference

Re: [PATCH] x86/dpci: remove the dpci EOI timer

2021-01-14 Thread Roger Pau Monné
On Thu, Jan 14, 2021 at 02:30:15PM +0100, Jan Beulich wrote: > On 14.01.2021 13:54, Roger Pau Monné wrote: > > On Thu, Jan 14, 2021 at 12:48:59PM +0100, Jan Beulich wrote: > >> On 13.01.2021 14:11, Roger Pau Monné wrote: > >>> On Wed, Jan 13, 2021 at 06:21:03AM +, Tian, Kevin wrote: > > Fro

Re: [PATCH V4 24/24] [RFC] libxl: Add support for virtio-disk configuration

2021-01-14 Thread Ian Jackson
Oleksandr Tyshchenko writes ("[PATCH V4 24/24] [RFC] libxl: Add support for virtio-disk configuration"): > This patch adds basic support for configuring and assisting virtio-disk > backend (emualator) which is intended to run out of Qemu and could be run > in any domain. Thanks. I think this is

Re: [PATCH] x86/dpci: remove the dpci EOI timer

2021-01-14 Thread Roger Pau Monné
On Thu, Jan 14, 2021 at 02:41:29PM +0100, Jan Beulich wrote: > On 14.01.2021 13:33, Roger Pau Monné wrote: > > On Thu, Jan 14, 2021 at 12:45:27PM +0100, Jan Beulich wrote: > >> On 14.01.2021 11:22, Roger Pau Monné wrote: > >>> On Wed, Jan 13, 2021 at 04:31:33PM -0500, Jason Andryuk wrote: > On

Re: [PATCH v2 0/7] Rid W=1 warnings in Ethernet

2021-01-14 Thread Jakub Kicinski
On Thu, 14 Jan 2021 08:33:49 + Lee Jones wrote: > On Wed, 13 Jan 2021, Jakub Kicinski wrote: > > > On Wed, 13 Jan 2021 16:41:16 + Lee Jones wrote: > > > Resending the stragglers again. > > > > > > > > > T

Re: [PATCH] argo: don't leak stack contents when returning ring info

2021-01-14 Thread Jan Beulich
On 14.01.2021 17:59, Roger Pau Monné wrote: > On Thu, Jan 14, 2021 at 03:01:06PM +0100, Jan Beulich wrote: >> The max_message_size field of the output gets filled only when the flags >> field is non-zero. Don't copy back uninitialized data to guest context. > > I'm afraid I'm missing something. AF

Re: [PATCH] argo: don't leak stack contents when returning ring info

2021-01-14 Thread Roger Pau Monné
On Thu, Jan 14, 2021 at 03:01:06PM +0100, Jan Beulich wrote: > The max_message_size field of the output gets filled only when the flags > field is non-zero. Don't copy back uninitialized data to guest context. I'm afraid I'm missing something. AFAICT ent gets filled from the user-space contents of

Re: [PATCH v11 00/27] tools/xenstore: support live update for xenstored

2021-01-14 Thread Jürgen Groß
On 14.01.21 16:37, Juergen Gross wrote: Today Xenstore is not restartable. This means a Xen server needing an update of xenstored has to be rebooted in order to let this update become effective. This patch series is changing that: The internal state of xenstored (the contents of Xenstore, all co

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

2021-01-14 Thread osstest service owner
flight 158416 xen-unstable real [real] flight 158423 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/158416/ http://logs.test-lab.xenproject.org/osstest/logs/158423/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-arm6

Re: [PATCH V4 00/24] IOREQ feature (+ virtio-mmio) on Arm

2021-01-14 Thread Ian Jackson
Hi, thanks for giving this update. Since you were the only person who took the time to send such an update I feel I can spend some time on trying to help with any obstacles you may face. Hence this enquiry: Oleksandr writes ("Re: [ANNOUNCE] Xen 4.15 release schedule and feature tracking"): > I

[ANNOUNCE] Xen 4.15 release schedule and feature tracking

2021-01-14 Thread Ian Jackson
The last posting date for new feature patches for Xen 4.15 is tomorrow. [1] We seem to be getting a reasonable good flood of stuff trying to meet this deadline :-). Patches for new fetures posted after tomorrow will be deferred to the next Xen release after 4.15. NB the primary responsibility fo

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

2021-01-14 Thread osstest service owner
flight 158420 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/158420/ 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 v11 25/27] tools/xenstore: add read watch state for live update

2021-01-14 Thread Juergen Gross
Add reading the watch state records for live update. This requires factoring out some of the add watch functionality into a dedicated function. Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant --- V4: - add comment (Julien Grall) V6: - correct check_watch_path() (setting errno) --- tool

[PATCH v11 23/27] tools/xenstore: add read connection state for live update

2021-01-14 Thread Juergen Gross
Add the needed functions for reading connection state for live update. As the connection is identified by a unique connection id in the state records we need to add this to struct connection. Add a new function to return the connection based on a connection id. Signed-off-by: Juergen Gross Revie

[PATCH v11 15/27] docs: update the xenstore migration stream documentation

2021-01-14 Thread Juergen Gross
For live update of Xenstore some records defined in the migration stream document need to be changed: - Support of the read-only socket has been dropped from all Xenstore implementations, so ro-socket-fd in the global record can be removed. - Some guests require the event channel to Xenstore to

[PATCH v11 20/27] tools/xenstore: evaluate the live update flag when starting

2021-01-14 Thread Juergen Gross
In the live update case several initialization steps of xenstore must be omitted or modified. Add the proper handling for that. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- V4: - set xprintf = trace in daemon case (Julien Grall) - only update /tool/xenstored node contents V7: - so

[PATCH v11 17/27] tools/xenstore: dump the xenstore state for live update

2021-01-14 Thread Juergen Gross
Dump the complete Xenstore status to a file (daemon case) or memory (stubdom case). As we don't know the exact length of the needed area in advance we are using an anonymous rather large mapping in stubdom case, which will use only virtual address space until accessed. And as we are writing the ar

[PATCH v11 18/27] tools/xenstore: handle CLOEXEC flag for local files and pipes

2021-01-14 Thread Juergen Gross
For support of live update the locally used files need to have the "close on exec" flag set. Fortunately the used Xen libraries are already doing this, so only the logging and tdb related files and pipes are affected. openlog() has the close on exec attribute, too. In order to be able to keep the

[PATCH v11 21/27] tools/xenstore: read internal state when doing live upgrade

2021-01-14 Thread Juergen Gross
When started due to a live upgrade read the internal state and apply it to the data base and internal structures. Add the main control functions for that. For now only handle the daemon case. Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant Acked-by: Julien Grall --- V4: - directly mmap

[PATCH v11 27/27] tools/xenstore: activate new binary for live update

2021-01-14 Thread Juergen Gross
Add activation of the new binary for live update. The daemon case is handled completely, while for stubdom we only add stubs. Signed-off-by: Juergen Gross --- V7: - added unbinding dom0 and virq event channels V8: - no longer close dom0 evtchn (Julien Grall) V10: - remember original argc and ar

Re: [PATCH] common: don't require use of DOMID_SELF

2021-01-14 Thread Jan Beulich
On 14.01.2021 16:01, Andrew Cooper wrote: > On 14/01/2021 14:02, Jan Beulich wrote: >> --- a/xen/common/grant_table.c >> +++ b/xen/common/grant_table.c >> @@ -2776,15 +2776,19 @@ struct gnttab_copy_buf { >> static int gnttab_copy_lock_domain(domid_t domid, bool is_gref, >>

[PATCH v11 24/27] tools/xenstore: add read node state for live update

2021-01-14 Thread Juergen Gross
Add the needed functions for reading node state for live update. This requires some refactoring of current node handling in Xenstore in order to avoid repeating the same code patterns multiple times. Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant Acked-by: Julien Grall --- V4: - drop l

[PATCH v11 13/27] tools/xenstore: add the basic framework for doing the live update

2021-01-14 Thread Juergen Gross
Add the main framework for executing the live update. This for now only defines the basic execution steps with empty dummy functions. This final step returning means failure, as in case of success the new executable will have taken over. Signed-off-by: Juergen Gross --- V4: - const (Julien Grall)

[PATCH v11 22/27] tools/xenstore: add reading global state for live update

2021-01-14 Thread Juergen Gross
Add reading the global state for live update. Signed-off-by: Juergen Gross Acked-by: Julien Grall Reviewed-by: Paul Durrant --- tools/xenstore/xenstored_control.c | 1 + tools/xenstore/xenstored_core.c| 9 + tools/xenstore/xenstored_core.h| 2 ++ 3 files changed, 12 insertions(

[PATCH v11 19/27] tools/xenstore: split off domain introduction from do_introduce()

2021-01-14 Thread Juergen Gross
For live update the functionality to introduce a new domain similar to the XS_INTRODUCE command is needed, so split that functionality off into a dedicated function introduce_domain(). Switch initial dom0 initialization to use this function, too. Signed-off-by: Juergen Gross Reviewed-by: Julien

[PATCH v11 26/27] tools/xenstore: handle dying domains in live update

2021-01-14 Thread Juergen Gross
From: Julien Grall A domain could just be dying when live updating Xenstore, so the case of not being able to map the ring page or to connect to the event channel must be handled gracefully. Signed-off-by: Julien Grall Reviewed-by: Paul Durrant --- V4: - new patch (Julien, I hope adding the So

[PATCH v11 14/27] tools/xenstore: allow live update only with no transaction active

2021-01-14 Thread Juergen Gross
In order to simplify live update state dumping only allow live update to happen when no transaction is active. A timeout is used to detect guests which have a transaction active for longer periods of time. In case such a guest is detected when trying to do a live update it will be reported and the

[PATCH v11 12/27] tools/xenstore: add support for delaying execution of a xenstore request

2021-01-14 Thread Juergen Gross
Today a Xenstore request is processed as soon as it is seen by xenstored. Add the framework for being able to delay processing of a request if the right conditions aren't met. Any delayed requests are executed at the end of the main processing loop in xenstored. They can either delay themselves ag

[PATCH v11 08/27] tools/xenstore: add basic live-update command parsing

2021-01-14 Thread Juergen Gross
Add the basic parts for parsing the live-update control command. For now only add the parameter evaluation and calling appropriate functions. Those function only print a message for now and return success. Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant Reviewed-by: Julien Grall --- V2:

[PATCH v11 09/27] tools/xenstore: introduce live update status block

2021-01-14 Thread Juergen Gross
Live update of Xenstore is done in multiple steps. It needs a status block holding the current state of live update and related data. It is allocated as child of the connection live update was started over in order to abort live update in case the connection is closed. Allocation of the block is d

[PATCH v11 10/27] tools/xenstore: save new binary for live update

2021-01-14 Thread Juergen Gross
Save the new binary name for the daemon case and the new kernel for stubdom in order to support live update of Xenstore.. Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant Reviewed-by: Julien Grall --- tools/xenstore/xenstored_control.c | 41 +- 1 file changed,

[PATCH v11 11/27] tools/xenstore: add command line handling for live update

2021-01-14 Thread Juergen Gross
Updating an instance of Xenstore via live update needs to hand over the command line parameters to the updated instance. Those can be either the parameters used by the updated instance or new ones when supplied when starting the live update. So when supplied store the new command line parameters i

[PATCH v11 16/27] tools/xenstore: add include file for state structure definitions

2021-01-14 Thread Juergen Gross
Add an include file containing all structures and defines needed for dumping and restoring the internal Xenstore state. Signed-off-by: Juergen Gross Acked-by: Julien Grall --- V4: - drop mfn from connection record (rebase to V5 of state doc patch) - add #ifdef __MINIOS__ (Julien Grall) - correct

[PATCH v11 01/27] tools/libxenevtchn: switch to standard xen coding style

2021-01-14 Thread Juergen Gross
There is a mixture of different styles in libxenevtchn. Use the standard xen style only. No functional change. Signed-off-by: Juergen Gross --- V11: - new patch --- tools/libs/evtchn/core.c| 24 + tools/libs/evtchn/freebsd.c | 25 +++--- tools/libs/evtchn/linux.c | 4 ++ tool

[PATCH v11 07/27] tools/xenstore: add live update command to xenstore-control

2021-01-14 Thread Juergen Gross
Add the "live-update" command to xenstore-control enabling updating xenstored to a new version in a running Xen system. With -c it is possible to pass a different command line to the new instance of xenstored. This will replace the command line used for the invocation of the just running xenstore

[PATCH v11 06/27] tools/xenstore: refactor XS_CONTROL handling

2021-01-14 Thread Juergen Gross
In order to allow control commands with binary data refactor handling of XS_CONTROL: - get primary command first - add maximum number of additional parameters to pass to command handler Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Reviewed-by: Paul Durrant --- V2: - add comment reg

[PATCH v11 05/27] tools/libxenevtchn: add possibility to not close file descriptor on exec

2021-01-14 Thread Juergen Gross
Today the file descriptor for the access of the event channel driver is being closed in case of exec(2). For the support of live update of a daemon using libxenevtchn this can be problematic, so add a way to keep that file descriptor open. Add support of a flag XENEVTCHN_NO_CLOEXEC for xenevtchn_o

[PATCH v11 04/27] tools/libxenevtchn: propagate xenevtchn_open() flags parameter

2021-01-14 Thread Juergen Gross
Propagate the flags parameter of xenevtchn_open() to the OS-specific handlers in order to enable handling them there. Signed-off-by: Juergen Gross --- V11: - new patch (carved out from patch 4 of V10, Andrew Cooper) --- tools/libs/evtchn/core.c| 2 +- tools/libs/evtchn/freebsd.c | 2 +- tool

[PATCH v11 03/27] tools/libxenevtchn: check xenevtchn_open() flags for not supported bits

2021-01-14 Thread Juergen Gross
Refuse a call of xenevtchn_open() with unsupported bits in flags being set. Suggested-by: Andrew Cooper Signed-off-by: Juergen Gross --- V11: - new patch (Andrew Cooper) --- tools/libs/evtchn/core.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/libs/evtchn/

[PATCH v11 00/27] tools/xenstore: support live update for xenstored

2021-01-14 Thread Juergen Gross
Today Xenstore is not restartable. This means a Xen server needing an update of xenstored has to be rebooted in order to let this update become effective. This patch series is changing that: The internal state of xenstored (the contents of Xenstore, all connections to various clients like programs

[PATCH v11 02/27] tools/libxenevtchn: rename open_flags to flags

2021-01-14 Thread Juergen Gross
Rename the xenevtchn_open() parameter open_flags to flags as it might be used for things not passed on to open(). No functional change. Suggested-by: Andrew Cooper Signed-off-by: Juergen Gross --- V11: - new patch (Andrew Cooper) --- tools/include/xenevtchn.h | 2 +- tools/libs/evtchn/core.c

Re: [PATCH] common: don't require use of DOMID_SELF

2021-01-14 Thread Andrew Cooper
On 14/01/2021 15:30, Jan Beulich wrote: > On 14.01.2021 15:43, Julien Grall wrote: >> On 14/01/2021 14:02, Jan Beulich wrote: >>> It's not overly difficult for a domain to figure out its ID, so >>> requiring the use of DOMID_SELF in a very limited set of places isn't >>> really helpful towards keep

Re: [PATCH V4 11/24] xen/mm: Make x86's XENMEM_resource_ioreq_server handling common

2021-01-14 Thread Oleksandr
On 14.01.21 05:58, Wei Chen wrote: Hi Oleksandr, Hi Wei -Original Message- From: Xen-devel On Behalf Of Oleksandr Tyshchenko Sent: 2021年1月13日 5:52 To: xen-devel@lists.xenproject.org Cc: Julien Grall ; Jan Beulich ; Andrew Cooper ; Roger Pau Monné ; Wei Liu ; George Dunlap ; Ian

Re: [PATCH] common: don't require use of DOMID_SELF

2021-01-14 Thread Jan Beulich
On 14.01.2021 15:43, Julien Grall wrote: > On 14/01/2021 14:02, Jan Beulich wrote: >> It's not overly difficult for a domain to figure out its ID, so >> requiring the use of DOMID_SELF in a very limited set of places isn't >> really helpful towards keeping the ID opaque to the guest. > > So I agre

Re: [PATCH 1/4] xen/dmalloc: Introduce dmalloc() APIs

2021-01-14 Thread Andrew Cooper
On 14/01/2021 10:14, Jan Beulich wrote: > On 14.01.2021 00:16, Andrew Cooper wrote: >> On 05/01/2021 15:56, Jan Beulich wrote: >>> On 23.12.2020 17:34, Andrew Cooper wrote: RFC: * This probably wants to be less fatal in release builds >>> I'm not even convinced this wants to be a panic()

[PATCH 3/3] Arm: don't hard-code grant table limits in create_domUs()

2021-01-14 Thread Jan Beulich
I can only assume that f2ae59bc4b9b ("Rationalize max_grant_frames and max_maptrack_frames handling") unintentionally left Arm's create_domUs() set limits to explicit values, as at least some of the same constraints apply here. Signed-off-by: Jan Beulich --- a/xen/arch/arm/domain_build.c +++ b/x

Re: [PATCH V4 00/24] IOREQ feature (+ virtio-mmio) on Arm

2021-01-14 Thread Oleksandr
On 14.01.21 05:55, Wei Chen wrote: Hi Oleksandr, Hi Wei. I have tested this series with latest master and staging branches. The virtio function works well for Arm as v3. Thank you! This is good news. For latest staging branch, it needs a tiny rebase for: 0011 xen/mm: Make x86's XENM

[PATCH 2/3] gnttab: consolidate pin-to-status syncing

2021-01-14 Thread Jan Beulich
Forever since the fix for XSA-230 the 2nd of the comments ahead of fixup_status_for_copy_pin() has been stale - there's nothing specific to transitive grants there anymore. Move the function up, drop the "copy" part from its name again, add a "readonly" parameter, and use it also on other paths ha

[PATCH 1/3] gnttab: adjust pin count overflow checks

2021-01-14 Thread Jan Beulich
It's at least odd to check counters which aren't going to be incremented. And it's also not helpful to use open-coded literal numbers in these checks. Calculate the increment values first and derive from them the mask to use in the checks. Also move the pin count checks ahead of the calculation o

[PATCH 0/3] gnttab: pin count related adjustments & more

2021-01-14 Thread Jan Beulich
Getting rid of the literal number has been something I've been hoping to see happen for perhaps over 10 years, along with doing away with some unnecessary refusal of operations. The other two changes are "collateral damage" from doing that change. 1: gnttab: adjust pin count overflow checks 2: gnt

[PATCH 17/17] x86/shadow: adjust is_pv_*() checks

2021-01-14 Thread Jan Beulich
To cover for "x86: correct is_pv_domain() when !CONFIG_PV" (or any other change along those lines) we should prefer is_hvm_*(), as it may become a build time constant while is_pv_*() generally won't. Also when a domain pointer is in scope, prefer is_*_domain() over is_*_vcpu(). Signed-off-by: Jan

[PATCH 16/17] x86/shadow: only 4-level guest code needs building when !HVM

2021-01-14 Thread Jan Beulich
In order to limit #ifdef-ary, provide "stub" #define-s for SH_type_{l1,fl1,l2}_{32,pae}_shadow and SHF_{L1,FL1,L2}_{32,PAE}. The change in shadow_vcpu_init() is necessary to cover for "x86: correct is_pv_domain() when !CONFIG_PV" (or any other change along those lines) - we should only rely on is_

[PATCH 15/17] x86/shadow: drop SH_type_l2h_pae_shadow

2021-01-14 Thread Jan Beulich
This is a remnant from 32-bit days, having no place anymore where a shadow of this type would be created. Signed-off-by: Jan Beulich --- hash_{domain,vcpu}_foreach() have a use each of literal 15. It's not clear to me what the proper replacement constant would be, as it doesn't look as if SH_type

[PATCH 14/17] x86/shadow: SH_type_l2h_shadow is PV-only

2021-01-14 Thread Jan Beulich
..., i.e. being used only with 4 guest paging levels. Drop its L2/PAE alias and adjust / drop conditionals. Use >= 4 where touching them anyway, in preparation for 5-level paging. Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -334,7 +334,

[PATCH 13/17] x86/shadow: don't open-code SHF_* shorthands

2021-01-14 Thread Jan Beulich
Use SHF_L1_ANY, SHF_32, SHF_PAE, as well as SHF_64, and introduce SHF_FL1_ANY. Note that in shadow_audit_tables() this has the effect of no longer (I assume mistakenly, or else I don't see why the respective callback table entry isn't NULL) excluding SHF_L2H_64. Signed-off-by: Jan Beulich --- a

[PATCH 12/17] x86/shadow: move shadow_set_le() to their own source file

2021-01-14 Thread Jan Beulich
The few GUEST_PAGING_LEVELS dependencies (of shadow_set_l2e() only) can be easily expressed by function parameters; I suppose the extra indirect call is acceptable for the increasingly little used 32-bit non-PAE case. This way shadow_set_l[12]e(), each of which compiles to almost 1k of code, need b

[PATCH 11/17] x86/shadow: polish shadow_write_entries()

2021-01-14 Thread Jan Beulich
First of all, avoid the initial dummy write: Try to write the actual new value instead, and start the loop from 1 if this was successful. Further, drop safe_write_entry() and use write_atomic() instead. This eliminates the need for the BUILD_BUG_ON() there at the same time. Then - use const and un

[PATCH 10/17] x86/shadow: use get_unsafe() instead of copy_from_unsafe()

2021-01-14 Thread Jan Beulich
This is the slightly more direct way of getting at what we want, and better in line with shadow_write_entries()'s use of put_unsafe(). Signed-off-by: Jan Beulich --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -2614,10 +2614,9 @@ static int sh_page_fault(struct vcpu

[PATCH 09/17] x86/PV: use get_unsafe() instead of copy_from_unsafe()

2021-01-14 Thread Jan Beulich
The former expands to a single (memory accessing) insn, which the latter does not guarantee. Yet we'd prefer to read consistent PTEs rather than risking a split read racing with an update done elsewhere. Signed-off-by: Jan Beulich --- a/xen/arch/x86/pv/mm.c +++ b/xen/arch/x86/pv/mm.c @@ -41,9 +4

[PATCH 08/17] x86: move stac()/clac() from {get,put}_unsafe_asm() ...

2021-01-14 Thread Jan Beulich
... to {get,put}_unsafe_size(). There's no need to have the macros expanded once per case label in the latter. This also makes the former well-formed single statements again. No change in generated code. Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/uaccess.h +++ b/xen/include/asm-x86/uac

[PATCH 07/17] x86: rename copy_{from,to}_user() to copy_{from,to}_guest_pv()

2021-01-14 Thread Jan Beulich
Bring them (back) in line with __copy_{from,to}_guest_pv(). Since it falls in the same group, also convert clear_user(). Instead of adjusting __raw_clear_guest(), drop it - it's unused and would require a non- checking __clear_guest_pv() which we don't have. Add previously missing __user at some c

[PATCH 06/17] x86/gdbsx: convert "user" to "guest" accesses

2021-01-14 Thread Jan Beulich
Using copy_{from,to}_user(), this code was assuming to be called only by PV guests. Use copy_{from,to}_guest() instead, transforming the incoming structure field into a guest handle (the field should really have been one in the first place). Also do not transform the debuggee address into a pointer

[PATCH 05/17] x86: rename {get,put}_user() to {get,put}_guest()

2021-01-14 Thread Jan Beulich
Bring them (back) in line with __{get,put}_guest(). Signed-off-by: Jan Beulich --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -1626,19 +1626,19 @@ static void load_segments(struct vcpu *n if ( !ring_1(regs) ) { -ret = put_user(regs->ss,

  1   2   >