Re: [Xen-devel] [PATCH v7 01/11] qapi/error: add (Error **errp) cleaning APIs

2020-02-20 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add functions to clean Error **errp: call corresponding Error *err > cleaning function an set pointer to NULL. > > New functions: > error_free_errp > error_report_errp > warn_report_errp > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by:

[Xen-devel] [linux-4.19 bisection] complete test-amd64-amd64-qemuu-nested-intel

2020-02-20 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-amd64-qemuu-nested-intel testid debian-hvm-install/l1/l2 Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: ovmf

Re: [Xen-devel] [PATCH v3 19/20] Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument

2020-02-20 Thread David Gibson
On Thu, Feb 20, 2020 at 02:05:47PM +0100, Philippe Mathieu-Daudé wrote: > Use an explicit boolean type. > > This commit was produced with the included Coccinelle script > scripts/coccinelle/exec_rw_const. > > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David Gibson > --- >

[Xen-devel] [PATCH v4] ns16550: Add ACPI support for ARM only

2020-02-20 Thread Wei Xu
Parse the ACPI SPCR table and initialize the 16550 compatible serial port for ARM only. Currently we only support one UART on ARM. Some fields which we do not care yet on ARM are ignored. Signed-off-by: Wei Xu --- Changes in v4: - change the print when the serial port address is 0 - check the

Re: [Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-02-20 Thread Anchal Agarwal
On Thu, Feb 20, 2020 at 10:01:52AM -0700, Durrant, Paul wrote: > > -Original Message- > > From: Roger Pau Monné > > Sent: 20 February 2020 16:49 > > To: Durrant, Paul > > Cc: Agarwal, Anchal ; Valentin, Eduardo > > ; len.br...@intel.com; pet...@infradead.org; > >

[Xen-devel] [xen-unstable-smoke test] 147371: tolerable all pass - PUSHED

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

Re: [Xen-devel] [PATCH] x86/xen: Distribute switch variables for initialization

2020-02-20 Thread Kees Cook
On Thu, Feb 20, 2020 at 11:33:41AM -0500, Boris Ostrovsky wrote: > > > On 2/20/20 1:37 AM, Jürgen Groß wrote: > > On 20.02.20 07:23, Kees Cook wrote: > >> Variables declared in a switch statement before any case statements > >> cannot be automatically initialized with compiler instrumentation

[Xen-devel] [xen-unstable-smoke test] 147370: tolerable all pass - PUSHED

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

Re: [Xen-devel] [PATCH v3 01/20] scripts/git.orderfile: Display Cocci scripts before code modifications

2020-02-20 Thread Michael S. Tsirkin
On Thu, Feb 20, 2020 at 02:05:29PM +0100, Philippe Mathieu-Daudé wrote: > When we use a Coccinelle semantic script to do automatic > code modifications, it makes sense to look at the semantic > patch first. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin > --- >

[Xen-devel] [PATCH] x86/splitlock: CPUID and MSR details

2020-02-20 Thread Andrew Cooper
A splitlock is an atomic operation which crosses a cache line boundary. It serialises operations in the cache coherency fabric and comes with a multi-thousand cycle stall. Intel Tremont CPUs introduce MSR_CORE_CAPS to enumerate various core-specific features, and MSR_TEST_CTRL to adjust the

[Xen-devel] [linux-next test] 147291: regressions - FAIL

2020-02-20 Thread osstest service owner
flight 147291 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/147291/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-examine 8 reboot fail REGR. vs. 147157

Re: [Xen-devel] [PATCH v2] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Julien Grall
Hi, On 20/02/2020 17:31, Roger Pau Monne wrote: Allow a CPU already holding the lock in write mode to also lock it in read mode. There's no harm in allowing read locking a rwlock that's already owned by the caller (ie: CPU) in write mode. Allowing such accesses is required at least for the CPU

Re: [Xen-devel] [PATCH 3/3] xen/x86: Rename and simplify async_event_* infrastructure

2020-02-20 Thread Andrew Cooper
On 18/02/2020 16:31, Jan Beulich wrote: > On 17.02.2020 12:17, Andrew Cooper wrote: >> --- a/xen/arch/x86/pv/iret.c >> +++ b/xen/arch/x86/pv/iret.c >> @@ -27,15 +27,15 @@ static void async_exception_cleanup(struct vcpu *curr) >> { >> unsigned int trap; >> >> -if (

Re: [Xen-devel] [PATCH] MAINTAINERS: Step back to designated reviewer for mm/

2020-02-20 Thread Andrew Cooper
On 20/02/2020 18:09, George Dunlap wrote: > With having to take over Lars' role as community manager, I don't have > the necessary time to review the mm/ subsystem. Step back to being only > a designated reviewer, reverting mantainership to the x86 maintianers. > > While here, fix my e-mail

[Xen-devel] [PATCH] MAINTAINERS: Step back to designated reviewer for mm/

2020-02-20 Thread George Dunlap
With having to take over Lars' role as community manager, I don't have the necessary time to review the mm/ subsystem. Step back to being only a designated reviewer, reverting mantainership to the x86 maintianers. While here, fix my e-mail address in other places. Signed-off-by: George Dunlap

[Xen-devel] [PATCH v2] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Roger Pau Monne
Allow a CPU already holding the lock in write mode to also lock it in read mode. There's no harm in allowing read locking a rwlock that's already owned by the caller (ie: CPU) in write mode. Allowing such accesses is required at least for the CPU maps use-case. In order to do this reserve 14bits

Re: [Xen-devel] [PATCH v6 1/6] libxl: add infrastructure to track and query 'recent' domids

2020-02-20 Thread Ian Jackson
Durrant, Paul writes ("RE: [PATCH v6 1/6] libxl: add infrastructure to track and query 'recent' domids"): > Not being co-located makes this somewhat tricky; I think it will basically > still come down to me writing some code and then you saying whether that's > what you meant... unless you can

Re: [Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-02-20 Thread Durrant, Paul
> -Original Message- > From: Roger Pau Monné > Sent: 20 February 2020 16:49 > To: Durrant, Paul > Cc: Agarwal, Anchal ; Valentin, Eduardo > ; len.br...@intel.com; pet...@infradead.org; > b...@kernel.crashing.org; x...@kernel.org; linux...@kvack.org; > pa...@ucw.cz; h...@zytor.com;

Re: [Xen-devel] [PATCH v6 1/6] libxl: add infrastructure to track and query 'recent' domids

2020-02-20 Thread Durrant, Paul
> -Original Message- > From: Ian Jackson > Sent: 20 February 2020 16:46 > To: Durrant, Paul > Cc: xen-devel@lists.xenproject.org; Wei Liu ; Anthony Perard > > Subject: RE: [PATCH v6 1/6] libxl: add infrastructure to track and query > 'recent' domids > > Durrant, Paul writes ("RE:

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Roger Pau Monné
On Thu, Feb 20, 2020 at 05:00:37PM +0100, Jürgen Groß wrote: > On 20.02.20 16:57, Roger Pau Monné wrote: > > On Thu, Feb 20, 2020 at 04:50:22PM +0100, Jan Beulich wrote: > > > On 20.02.2020 16:17, Roger Pau Monné wrote: > > > > On Thu, Feb 20, 2020 at 04:02:55PM +0100, Jan Beulich wrote: > > > > >

Re: [Xen-devel] [PATCH v6 1/6] libxl: add infrastructure to track and query 'recent' domids

2020-02-20 Thread Durrant, Paul
> -Original Message- > From: Ian Jackson > Sent: 20 February 2020 16:20 > To: Durrant, Paul > Cc: xen-devel@lists.xenproject.org; Wei Liu ; Anthony Perard > > Subject: Re: [PATCH v6 1/6] libxl: add infrastructure to track and query > 'recent' domids > > Paul Durrant writes ("[PATCH v6

Re: [Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-02-20 Thread Roger Pau Monné
On Thu, Feb 20, 2020 at 04:23:13PM +, Durrant, Paul wrote: > > -Original Message- > > From: Roger Pau Monné > > Sent: 20 February 2020 15:45 > > To: Durrant, Paul > > Cc: Agarwal, Anchal ; Valentin, Eduardo > > ; len.br...@intel.com; pet...@infradead.org; > >

Re: [Xen-devel] [PATCH v6 1/6] libxl: add infrastructure to track and query 'recent' domids

2020-02-20 Thread Ian Jackson
Durrant, Paul writes ("RE: [PATCH v6 1/6] libxl: add infrastructure to track and query 'recent' domids"): > [Ian:] > > IMO the reuse timeout call and the clock_gettime call should be put in > > libxl__open_domid_history; and the time filtering check should be > > folded into libxl__read_recent. >

Re: [Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-02-20 Thread Durrant, Paul
> -Original Message- > From: Roger Pau Monné > Sent: 20 February 2020 15:45 > To: Durrant, Paul > Cc: Agarwal, Anchal ; Valentin, Eduardo > ; len.br...@intel.com; pet...@infradead.org; > b...@kernel.crashing.org; x...@kernel.org; linux...@kvack.org; > pa...@ucw.cz; h...@zytor.com;

Re: [Xen-devel] [PATCH] MAINTAINERS: make Roger VPCI maintainer

2020-02-20 Thread Roger Pau Monné
On Thu, Feb 20, 2020 at 05:01:02PM +0100, Jan Beulich wrote: > On 20.02.2020 16:58, Wei Liu wrote: > > Roger has kindly agreed to take on the burden. > > > > Signed-off-by: Wei Liu > > Acked-by: Jan Beulich > with ... > > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -500,6 +500,12 @@ F:

Re: [Xen-devel] [PATCH] x86/xen: Distribute switch variables for initialization

2020-02-20 Thread Boris Ostrovsky
On 2/20/20 1:37 AM, Jürgen Groß wrote: > On 20.02.20 07:23, Kees Cook wrote: >> Variables declared in a switch statement before any case statements >> cannot be automatically initialized with compiler instrumentation (as >> they are not part of any execution flow). With GCC's proposed automatic

Re: [Xen-devel] [PATCH v6 4/6] libxl: allow creation of domains with a specified or random domid

2020-02-20 Thread Ian Jackson
Paul Durrant writes ("[PATCH v6 4/6] libxl: allow creation of domains with a specified or random domid"): > This patch adds a 'domid' field to libxl_domain_create_info and then > modifies libxl__domain_make() to have Xen use that value if it is valid. > If the domid value is invalid then Xen will

Re: [Xen-devel] [PATCH v6 3/6] public/xen.h: add a definition for a 'valid domid' mask

2020-02-20 Thread Ian Jackson
Paul Durrant writes ("[PATCH v6 3/6] public/xen.h: add a definition for a 'valid domid' mask"): > A subsequent patch will modify libxl to allow selection of a random domid > value when creating domains. Valid values are limited to a width of 15 bits, > so add an appropriate mask definition to the

Re: [Xen-devel] [PATCH v6 1/6] libxl: add infrastructure to track and query 'recent' domids

2020-02-20 Thread Ian Jackson
Paul Durrant writes ("[PATCH v6 1/6] libxl: add infrastructure to track and query 'recent' domids"): > A domid is considered recent if the domain it represents was destroyed > less than a specified number of seconds ago. For debugging and/or testing > purposes the number can be set using the

Re: [Xen-devel] [PATCH v6 2/6] libxl: modify libxl__logv() to only log valid domid values

2020-02-20 Thread Ian Jackson
Paul Durrant writes ("[PATCH v6 2/6] libxl: modify libxl__logv() to only log valid domid values"): > Some code-paths use values other than INVALID_DOMID to indicate an invalid > domain id. Specifically, xl will pass a value of 0 when creating/restoring > a domain. Therefore modify libxl__logv()

Re: [Xen-devel] [PATCH] x86/vpt: update last_guest_time with cmpxchg and drop pl_time_lock

2020-02-20 Thread Igor Druzhinin
On 20/02/2020 15:47, Jan Beulich wrote: > On 20.02.2020 16:37, Igor Druzhinin wrote: >> On 20/02/2020 08:27, Jan Beulich wrote: >>> On 19.02.2020 19:52, Igor Druzhinin wrote: On 19/02/2020 07:48, Jan Beulich wrote: > On 20.12.2019 22:39, Igor Druzhinin wrote: >> @@ -38,24 +37,22 @@

Re: [Xen-devel] [PATCH] MAINTAINERS: make Roger VPCI maintainer

2020-02-20 Thread Jan Beulich
On 20.02.2020 16:58, Wei Liu wrote: > Roger has kindly agreed to take on the burden. > > Signed-off-by: Wei Liu Acked-by: Jan Beulich with ... > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -500,6 +500,12 @@ F: xen/include/*/vm_event.h > F: xen/include/asm-x86/hvm/monitor.h > F:

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Jürgen Groß
On 20.02.20 16:57, Roger Pau Monné wrote: On Thu, Feb 20, 2020 at 04:50:22PM +0100, Jan Beulich wrote: On 20.02.2020 16:17, Roger Pau Monné wrote: On Thu, Feb 20, 2020 at 04:02:55PM +0100, Jan Beulich wrote: On 20.02.2020 15:11, Roger Pau Monné wrote: On Thu, Feb 20, 2020 at 01:48:54PM

[Xen-devel] [PATCH] MAINTAINERS: make Roger VPCI maintainer

2020-02-20 Thread Wei Liu
Roger has kindly agreed to take on the burden. Signed-off-by: Wei Liu --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 46424c1833..e7d1d5a88a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -500,6 +500,12 @@ F: xen/include/*/vm_event.h F:

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Roger Pau Monné
On Thu, Feb 20, 2020 at 04:50:22PM +0100, Jan Beulich wrote: > On 20.02.2020 16:17, Roger Pau Monné wrote: > > On Thu, Feb 20, 2020 at 04:02:55PM +0100, Jan Beulich wrote: > >> On 20.02.2020 15:11, Roger Pau Monné wrote: > >>> On Thu, Feb 20, 2020 at 01:48:54PM +0100, Jan Beulich wrote: >

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Jan Beulich
On 20.02.2020 16:20, Roger Pau Monné wrote: > On Thu, Feb 20, 2020 at 04:11:08PM +0100, Jan Beulich wrote: >> On 20.02.2020 15:38, Roger Pau Monné wrote: >>> On Thu, Feb 20, 2020 at 03:23:38PM +0100, Jürgen Groß wrote: On 20.02.20 15:11, Roger Pau Monné wrote: > On Thu, Feb 20, 2020 at

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Jan Beulich
On 20.02.2020 16:17, Roger Pau Monné wrote: > On Thu, Feb 20, 2020 at 04:02:55PM +0100, Jan Beulich wrote: >> On 20.02.2020 15:11, Roger Pau Monné wrote: >>> On Thu, Feb 20, 2020 at 01:48:54PM +0100, Jan Beulich wrote: Another option is to use the recurse_cpu field of the associated spin

Re: [Xen-devel] [PATCH] x86/vpt: update last_guest_time with cmpxchg and drop pl_time_lock

2020-02-20 Thread Jan Beulich
On 20.02.2020 16:37, Igor Druzhinin wrote: > On 20/02/2020 08:27, Jan Beulich wrote: >> On 19.02.2020 19:52, Igor Druzhinin wrote: >>> On 19/02/2020 07:48, Jan Beulich wrote: On 20.12.2019 22:39, Igor Druzhinin wrote: > @@ -38,24 +37,22 @@ void hvm_init_guest_time(struct domain *d) >

Re: [Xen-devel] [RFC PATCH v3 06/12] xen-blkfront: add callbacks for PM suspend and hibernation

2020-02-20 Thread Roger Pau Monné
On Thu, Feb 20, 2020 at 08:54:36AM +, Durrant, Paul wrote: > > -Original Message- > > From: Xen-devel On Behalf Of > > Roger Pau Monné > > Sent: 20 February 2020 08:39 > > To: Agarwal, Anchal > > Cc: Valentin, Eduardo ; len.br...@intel.com; > > pet...@infradead.org;

Re: [Xen-devel] [PATCH 2/8] x86/setup: Fix badpage= handling for memory above HYPERVISOR_VIRT_END

2020-02-20 Thread Jan Beulich
On 01.02.2020 01:32, David Woodhouse wrote: > --- a/xen/common/page_alloc.c > +++ b/xen/common/page_alloc.c > @@ -1758,6 +1758,18 @@ int query_page_offline(mfn_t mfn, uint32_t *status) > return 0; > } > > +static unsigned long contig_avail_pages(struct page_info *pg, unsigned long >

Re: [Xen-devel] [PATCH] x86/vpt: update last_guest_time with cmpxchg and drop pl_time_lock

2020-02-20 Thread Igor Druzhinin
On 20/02/2020 08:27, Jan Beulich wrote: > On 19.02.2020 19:52, Igor Druzhinin wrote: >> On 19/02/2020 07:48, Jan Beulich wrote: >>> On 20.12.2019 22:39, Igor Druzhinin wrote: @@ -38,24 +37,22 @@ void hvm_init_guest_time(struct domain *d) uint64_t hvm_get_guest_time_fixed(const struct

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Roger Pau Monné
On Thu, Feb 20, 2020 at 04:11:08PM +0100, Jan Beulich wrote: > On 20.02.2020 15:38, Roger Pau Monné wrote: > > On Thu, Feb 20, 2020 at 03:23:38PM +0100, Jürgen Groß wrote: > >> On 20.02.20 15:11, Roger Pau Monné wrote: > >>> On Thu, Feb 20, 2020 at 01:48:54PM +0100, Jan Beulich wrote: > On

[Xen-devel] [xen-unstable-smoke test] 147361: tolerable all pass - PUSHED

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

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Roger Pau Monné
On Thu, Feb 20, 2020 at 04:02:55PM +0100, Jan Beulich wrote: > On 20.02.2020 15:11, Roger Pau Monné wrote: > > On Thu, Feb 20, 2020 at 01:48:54PM +0100, Jan Beulich wrote: > >> Another option is to use the recurse_cpu field of the > >> associated spin lock: The field is used for recursive locks >

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Jan Beulich
On 20.02.2020 15:38, Roger Pau Monné wrote: > On Thu, Feb 20, 2020 at 03:23:38PM +0100, Jürgen Groß wrote: >> On 20.02.20 15:11, Roger Pau Monné wrote: >>> On Thu, Feb 20, 2020 at 01:48:54PM +0100, Jan Beulich wrote: On 20.02.2020 13:02, Roger Pau Monne wrote: > @@ -166,7 +180,8 @@ static

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Jan Beulich
On 20.02.2020 15:11, Roger Pau Monné wrote: > On Thu, Feb 20, 2020 at 01:48:54PM +0100, Jan Beulich wrote: >> Another option is to use the recurse_cpu field of the >> associated spin lock: The field is used for recursive locks >> only, and hence the only conflict would be with >>

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Roger Pau Monné
On Thu, Feb 20, 2020 at 03:23:38PM +0100, Jürgen Groß wrote: > On 20.02.20 15:11, Roger Pau Monné wrote: > > On Thu, Feb 20, 2020 at 01:48:54PM +0100, Jan Beulich wrote: > > > On 20.02.2020 13:02, Roger Pau Monne wrote: > > > > I've done some testing and at least the CPU down case is fixed now. >

[Xen-devel] [linux-5.4 test] 147286: regressions - FAIL

2020-02-20 Thread osstest service owner
flight 147286 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/147286/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-qemuu-nested-intel 17 debian-hvm-install/l1/l2 fail REGR. vs. 146121

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Jürgen Groß
On 20.02.20 15:11, Roger Pau Monné wrote: On Thu, Feb 20, 2020 at 01:48:54PM +0100, Jan Beulich wrote: On 20.02.2020 13:02, Roger Pau Monne wrote: I've done some testing and at least the CPU down case is fixed now. Posting early in order to get feedback on the approach taken. Looks good,

Re: [Xen-devel] [PATCH v3 03/20] exec: Let qemu_ram_*() functions take a const pointer argument

2020-02-20 Thread Durrant, Paul
> -Original Message- > From: Xen-devel On Behalf Of > Philippe Mathieu-Daudé > Sent: 20 February 2020 13:06 > To: Peter Maydell ; qemu-de...@nongnu.org > Cc: Fam Zheng ; Dmitry Fleytman > ; k...@vger.kernel.org; Michael S. Tsirkin > ; Jason Wang ; Gerd Hoffmann > ; Edgar E. Iglesias ;

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Roger Pau Monné
On Thu, Feb 20, 2020 at 01:48:54PM +0100, Jan Beulich wrote: > On 20.02.2020 13:02, Roger Pau Monne wrote: > > I've done some testing and at least the CPU down case is fixed now. > > Posting early in order to get feedback on the approach taken. > > Looks good, thanks, just a question and two

Re: [Xen-devel] [PATCH v3 19/20] Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument

2020-02-20 Thread Durrant, Paul
> -Original Message- > From: Xen-devel On Behalf Of > Philippe Mathieu-Daudé > Sent: 20 February 2020 13:06 > To: Peter Maydell ; qemu-de...@nongnu.org > Cc: Fam Zheng ; Dmitry Fleytman > ; k...@vger.kernel.org; Michael S. Tsirkin > ; Jason Wang ; Gerd Hoffmann > ; Edgar E. Iglesias ;

Re: [Xen-devel] [PATCH v3 02/20] hw: Remove unnecessary cast when calling dma_memory_read()

2020-02-20 Thread Philippe Mathieu-Daudé
On 2/20/20 2:43 PM, Philippe Mathieu-Daudé wrote: On 2/20/20 2:16 PM, Eric Blake wrote: On 2/20/20 7:05 AM, Philippe Mathieu-Daudé wrote: Since its introduction in commit d86a77f8abb, dma_memory_read() always accepted void pointer argument. Remove the unnecessary casts. This commit was

Re: [Xen-devel] [PATCH v3 02/20] hw: Remove unnecessary cast when calling dma_memory_read()

2020-02-20 Thread Philippe Mathieu-Daudé
On 2/20/20 2:16 PM, Eric Blake wrote: On 2/20/20 7:05 AM, Philippe Mathieu-Daudé wrote: Since its introduction in commit d86a77f8abb, dma_memory_read() always accepted void pointer argument. Remove the unnecessary casts. This commit was produced with the included Coccinelle script

[Xen-devel] [PATCH v2] xen/sched: rework credit2 run-queue allocation

2020-02-20 Thread Juergen Gross
Currently the memory for each run-queue of the credit2 scheduler is allocated at the scheduler's init function: for each cpu in the system a struct csched2_runqueue_data is being allocated, even if the current scheduler only handles one physical cpu or is configured to work with a single

[Xen-devel] [XEN PATCH v2] libxl: wait for console path before firing console_available

2020-02-20 Thread Paweł Marczewski
If we skip the bootloader, the TTY path will be set for xenconsoled. However, there is no guarantee that this will happen by the time we want to call the console_available callback, so we have to wait. Signed-off-by: Paweł Marczewski --- Changed since v1: * use xswait mechanism to add a

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-02-20 Thread Julien Grall
Hi, On 20/02/2020 11:59, Jan Beulich wrote: On 07.02.2020 19:04, David Woodhouse wrote: --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -488,7 +488,8 @@ void share_xen_page_with_guest(struct page_info *page, struct domain *d, page_set_owner(page, d); smp_wmb(); /* install

Re: [Xen-devel] [PATCH v3 03/20] exec: Let qemu_ram_*() functions take a const pointer argument

2020-02-20 Thread Philippe Mathieu-Daudé
On 2/20/20 2:21 PM, Paolo Bonzini wrote: On 20/02/20 14:05, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 6 +++--- include/sysemu/xen-mapcache.h | 4 ++-- exec.c| 8 hw/i386/xen/xen-mapcache.c|

Re: [Xen-devel] [PATCH v3 03/20] exec: Let qemu_ram_*() functions take a const pointer argument

2020-02-20 Thread Paolo Bonzini
On 20/02/20 14:05, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > include/exec/cpu-common.h | 6 +++--- > include/sysemu/xen-mapcache.h | 4 ++-- > exec.c| 8 > hw/i386/xen/xen-mapcache.c| 2 +- > 4 files changed, 10

Re: [Xen-devel] [PATCH v3 02/20] hw: Remove unnecessary cast when calling dma_memory_read()

2020-02-20 Thread Eric Blake
On 2/20/20 7:05 AM, Philippe Mathieu-Daudé wrote: Since its introduction in commit d86a77f8abb, dma_memory_read() always accepted void pointer argument. Remove the unnecessary casts. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Signed-off-by:

Re: [Xen-devel] [PATCH v3 01/20] scripts/git.orderfile: Display Cocci scripts before code modifications

2020-02-20 Thread Laurent Vivier
On 20/02/2020 14:05, Philippe Mathieu-Daudé wrote: > When we use a Coccinelle semantic script to do automatic > code modifications, it makes sense to look at the semantic > patch first. > > Signed-off-by: Philippe Mathieu-Daudé > --- > scripts/git.orderfile | 3 +++ > 1 file changed, 3

Re: [Xen-devel] [PATCH v3 01/20] scripts/git.orderfile: Display Cocci scripts before code modifications

2020-02-20 Thread Eric Blake
On 2/20/20 7:05 AM, Philippe Mathieu-Daudé wrote: When we use a Coccinelle semantic script to do automatic code modifications, it makes sense to look at the semantic patch first. Signed-off-by: Philippe Mathieu-Daudé --- scripts/git.orderfile | 3 +++ 1 file changed, 3 insertions(+)

[Xen-devel] [linux-4.14 bisection] complete test-armhf-armhf-xl-vhd

2020-02-20 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-armhf-armhf-xl-vhd testid xen-boot Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: ovmf git://xenbits.xen.org/osstest/ovmf.git Tree:

Re: [Xen-devel] [PATCH v5 0/2] docs: Migration design documents

2020-02-20 Thread Durrant, Paul
Ping? I have not receieved any further comments on v5. Can I please get acks or otherwise so we can (hopefully) move on with coding? Paul > -Original Message- > From: Paul Durrant > Sent: 13 February 2020 10:53 > To: xen-devel@lists.xenproject.org > Cc: Durrant, Paul ; Andrew Cooper

[Xen-devel] [PATCH v3 17/20] Avoid address_space_rw() with a constant is_write argument

2020-02-20 Thread Philippe Mathieu-Daudé
From: Peter Maydell The address_space_rw() function allows either reads or writes depending on the is_write argument passed to it; this is useful when the direction of the access is determined programmatically (as for instance when handling the KVM_EXIT_MMIO exit reason). Under the hood it just

[Xen-devel] [PATCH v3 18/20] exec: Let cpu_[physical]_memory API use a boolean 'is_write' argument

2020-02-20 Thread Philippe Mathieu-Daudé
The 'is_write' argument is either 0 or 1. Convert it to a boolean type. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-all.h| 2 +- include/exec/cpu-common.h | 6 +++--- exec.c| 10 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git

[Xen-devel] [PATCH v3 19/20] Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument

2020-02-20 Thread Philippe Mathieu-Daudé
Use an explicit boolean type. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Signed-off-by: Philippe Mathieu-Daudé --- scripts/coccinelle/exec_rw_const.cocci | 14 ++ include/exec/cpu-common.h | 4 ++--

[Xen-devel] [PATCH v3 16/20] Let address_space_rw() calls pass a boolean 'is_write' argument

2020-02-20 Thread Philippe Mathieu-Daudé
Since its introduction in commit ac1970fbe8, address_space_rw() takes a boolean 'is_write' argument. Fix the codebase by using an explicit boolean type. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Inspired-by: Peter Maydell Signed-off-by:

[Xen-devel] [PATCH v3 13/20] hw/virtio: Let virtqueue_map_iovec() use a boolean 'is_write' argument

2020-02-20 Thread Philippe Mathieu-Daudé
The 'is_write' argument is either 0 or 1. Convert it to a boolean type. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/virtio.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 2c5410e981..9d06dbe3ef 100644 ---

[Xen-devel] [PATCH v3 14/20] hw/virtio: Let vhost_memory_map() use a boolean 'is_write' argument

2020-02-20 Thread Philippe Mathieu-Daudé
The 'is_write' argument is either 0 or 1. Convert it to a boolean type. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/vhost.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 9edfadc81d..0d226dae10 100644 ---

[Xen-devel] [PATCH v3 12/20] hw/ide: Let the DMAIntFunc prototype use a boolean 'is_write' argument

2020-02-20 Thread Philippe Mathieu-Daudé
The 'is_write' argument is either 0 or 1. Convert it to a boolean type. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ide/internal.h | 2 +- hw/dma/rc4030.c | 6 +++--- hw/ide/ahci.c | 2 +- hw/ide/core.c | 2 +- hw/ide/macio.c| 2 +-

[Xen-devel] [PATCH v3 10/20] Remove unnecessary cast when using the cpu_[physical]_memory API

2020-02-20 Thread Philippe Mathieu-Daudé
This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Suggested-by: Stefan Weil Signed-off-by: Philippe Mathieu-Daudé --- scripts/coccinelle/exec_rw_const.cocci | 10 ++ hw/display/omap_lcdc.c | 10 +-

[Xen-devel] [PATCH v3 08/20] Remove unnecessary cast when using the address_space API

2020-02-20 Thread Philippe Mathieu-Daudé
This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Two lines in hw/net/dp8393x.c that Coccinelle produced that were over 80 characters were re-wrapped by hand. Suggested-by: Stefan Weil Signed-off-by: Philippe Mathieu-Daudé ---

[Xen-devel] [PATCH v3 00/20] global exec/memory/dma APIs cleanup

2020-02-20 Thread Philippe Mathieu-Daudé
This series is inspired from Peter Maydel cleanup patch: https://www.mail-archive.com/qemu-devel@nongnu.org/msg680625.html - Convert 'is_write' argument to boolean - Use void pointer for blob buffer - Remove unnecessary casts (Stefan Weil) - Replace [API]_rw() by [API]_read/write() when is_write

[Xen-devel] [PATCH v3 04/20] exec: Rename ram_ptr variable

2020-02-20 Thread Philippe Mathieu-Daudé
As we are going to use a different 'ptr' variable, rename the 'ram pointer' variable. Signed-off-by: Philippe Mathieu-Daudé --- exec.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/exec.c b/exec.c index 02b4e6ea41..06e386dc72 100644 --- a/exec.c +++

[Xen-devel] [PATCH v3 09/20] exec: Let the cpu_[physical]_memory API use void pointer arguments

2020-02-20 Thread Philippe Mathieu-Daudé
As we are only dealing with a blob buffer, use a void pointer argument. This will let us simplify other APIs. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-all.h| 2 +- include/exec/cpu-common.h | 2 +- exec.c| 8 +--- 3 files changed, 7 insertions(+), 5

[Xen-devel] [PATCH v3 07/20] hw/net: Avoid casting non-const pointer, use address_space_write()

2020-02-20 Thread Philippe Mathieu-Daudé
The NetReceive prototype gets a const buffer: typedef ssize_t (NetReceive)(NetClientState *, const uint8_t *, size_t); We already have the address_space_write() method to write a const buffer to an address space. Use it to avoid: hw/net/i82596.c: In function ‘i82596_receive’:

[Xen-devel] [PATCH v3 01/20] scripts/git.orderfile: Display Cocci scripts before code modifications

2020-02-20 Thread Philippe Mathieu-Daudé
When we use a Coccinelle semantic script to do automatic code modifications, it makes sense to look at the semantic patch first. Signed-off-by: Philippe Mathieu-Daudé --- scripts/git.orderfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/git.orderfile b/scripts/git.orderfile

[Xen-devel] [PATCH v3 11/20] hw/ide/internal: Remove unused DMARestartFunc typedef

2020-02-20 Thread Philippe Mathieu-Daudé
The IDE DMA restart callback has been removed in commit fe09c7c9f0. Fixes: fe09c7c9f0 Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ide/internal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 52ec197da0..ce766ac485 100644

[Xen-devel] [PATCH v3 15/20] exec: Let address_space_unmap() use a boolean 'is_write' argument

2020-02-20 Thread Philippe Mathieu-Daudé
The 'is_write' argument is either 0 or 1. Convert it to a boolean type. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 2 +- exec.c| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index

[Xen-devel] [PATCH v3 06/20] exec: Let the address_space API use void pointer arguments

2020-02-20 Thread Philippe Mathieu-Daudé
As we are only dealing with a blob buffer, use a void pointer argument. This will let us simplify other APIs. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 12 ++-- exec.c| 11 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git

[Xen-devel] [PATCH v3 03/20] exec: Let qemu_ram_*() functions take a const pointer argument

2020-02-20 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 6 +++--- include/sysemu/xen-mapcache.h | 4 ++-- exec.c| 8 hw/i386/xen/xen-mapcache.c| 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/exec/cpu-common.h

[Xen-devel] [PATCH v3 05/20] exec: Let flatview API take void pointer arguments

2020-02-20 Thread Philippe Mathieu-Daudé
Only flatview_[read/write]_continue use a byte pointer to increment an offset. For the users, we are only dealing with a blob buffer. Use a void pointer argument. This will let us simplify the address_space API in the next commit. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h

[Xen-devel] [PATCH v3 02/20] hw: Remove unnecessary cast when calling dma_memory_read()

2020-02-20 Thread Philippe Mathieu-Daudé
Since its introduction in commit d86a77f8abb, dma_memory_read() always accepted void pointer argument. Remove the unnecessary casts. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Signed-off-by: Philippe Mathieu-Daudé ---

[Xen-devel] [xen-unstable-smoke test] 147354: tolerable all pass - PUSHED

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

Re: [Xen-devel] [PATCH V3] x86/altp2m: Hypercall to set altp2m view visibility

2020-02-20 Thread Alexandru Stefan ISAILA
On 20.02.2020 14:21, George Dunlap wrote: > On 2/19/20 9:18 AM, Alexandru Stefan ISAILA wrote: >> At this moment a guest can call vmfunc to change the altp2m view. This >> should be limited in order to avoid any unwanted view switch. >> >> The new xc_altp2m_set_visibility() solves this by making

Re: [Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Jan Beulich
On 20.02.2020 13:02, Roger Pau Monne wrote: > I've done some testing and at least the CPU down case is fixed now. > Posting early in order to get feedback on the approach taken. Looks good, thanks, just a question and two comments: > --- a/xen/include/xen/rwlock.h > +++

Re: [Xen-devel] [PATCH v6] x86: introduce a new set of APIs to manage Xen page tables

2020-02-20 Thread Wei Liu
On Thu, Feb 20, 2020 at 01:10:56PM +0100, Jan Beulich wrote: > On 28.01.2020 15:21, Wei Liu wrote: > > On Tue, Jan 28, 2020 at 01:50:05PM +, Hongyan Xia wrote: > >> From: Wei Liu > >> > >> We are going to switch to using domheap page for page tables. > >> A new set of APIs is introduced to

Re: [Xen-devel] [PATCH V3] x86/altp2m: Hypercall to set altp2m view visibility

2020-02-20 Thread George Dunlap
On 2/19/20 9:18 AM, Alexandru Stefan ISAILA wrote: > At this moment a guest can call vmfunc to change the altp2m view. This > should be limited in order to avoid any unwanted view switch. > > The new xc_altp2m_set_visibility() solves this by making views invisible > to vmfunc. > This is done by

Re: [Xen-devel] [PATCH v6] x86: introduce a new set of APIs to manage Xen page tables

2020-02-20 Thread Jan Beulich
On 28.01.2020 15:21, Wei Liu wrote: > On Tue, Jan 28, 2020 at 01:50:05PM +, Hongyan Xia wrote: >> From: Wei Liu >> >> We are going to switch to using domheap page for page tables. >> A new set of APIs is introduced to allocate and free pages of page >> tables based on mfn instead of the

[Xen-devel] [PATCH] rwlock: allow recursive read locking when already locked in write mode

2020-02-20 Thread Roger Pau Monne
Allow a CPU already holding the lock in write mode to also lock it in read mode. There's no harm in allowing read locking a rwlock that's already owned by the caller (ie: CPU) in write mode. Allowing such accesses is required at least for the CPU maps use-case. In order to do this reserve 12bits

Re: [Xen-devel] [PATCH 2/2] xen/mm: Introduce PG_state_uninitialised

2020-02-20 Thread Jan Beulich
On 07.02.2020 19:04, David Woodhouse wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -488,7 +488,8 @@ void share_xen_page_with_guest(struct page_info *page, > struct domain *d, > > page_set_owner(page, d); > smp_wmb(); /* install valid domain ptr before updating

Re: [Xen-devel] [PATCH 5/5] libxl/PCI: align reserved device memory boundary for HAP guests

2020-02-20 Thread Wei Liu
On Thu, Feb 20, 2020 at 12:45:54PM +0100, Jan Beulich wrote: > On 20.02.2020 12:43, Wei Liu wrote: > > On Tue, Feb 18, 2020 at 04:47:49PM +0100, Jan Beulich wrote: > >> As the code comment says, this will allow use of a 2Mb super page > >> mapping at the end of "low" memory. > >> > >>

Re: [Xen-devel] [PATCH 0/5] libxl/PCI: reserved device memory adjustments

2020-02-20 Thread Wei Liu
On Tue, Feb 18, 2020 at 04:44:11PM +0100, Jan Beulich wrote: > While playing with this, I've noticed a number of issues, > some actual bugs, some merely cosmetic (at least at this point > in time. This is the collection of adjustments made, with bug > fixes first. I will leave committing this

Re: [Xen-devel] [PATCH 5/5] libxl/PCI: align reserved device memory boundary for HAP guests

2020-02-20 Thread Jan Beulich
On 20.02.2020 12:43, Wei Liu wrote: > On Tue, Feb 18, 2020 at 04:47:49PM +0100, Jan Beulich wrote: >> As the code comment says, this will allow use of a 2Mb super page >> mapping at the end of "low" memory. >> >> Signed-off-by: Jan Beulich >> >> --- a/tools/libxl/libxl_dm.c >> +++

Re: [Xen-devel] [PATCH 3/5] libxl/PCI: make "rdm=" parsing comply with documentation

2020-02-20 Thread Wei Liu
On Tue, Feb 18, 2020 at 04:47:04PM +0100, Jan Beulich wrote: > Documentation says " is a comma separated list > of settings, from the following list". There's no mention > of a specific order, yet so far the parsing logic did accept only > strategy, then policy (and neither of the two omitted).

Re: [Xen-devel] [PATCH 5/5] libxl/PCI: align reserved device memory boundary for HAP guests

2020-02-20 Thread Wei Liu
On Tue, Feb 18, 2020 at 04:47:49PM +0100, Jan Beulich wrote: > As the code comment says, this will allow use of a 2Mb super page > mapping at the end of "low" memory. > > Signed-off-by: Jan Beulich > > --- a/tools/libxl/libxl_dm.c > +++ b/tools/libxl/libxl_dm.c > @@ -563,6 +563,13 @@ int

Re: [Xen-devel] [PATCH 4/5] libxl/PCI: pass correct "hotplug" argument to libxl__device_pci_setdefault()

2020-02-20 Thread Wei Liu
On Tue, Feb 18, 2020 at 04:47:27PM +0100, Jan Beulich wrote: > Uniformly passing "false" can't be right, but has been benign because of > the function not using this parameter. > > Signed-off-by: Jan Beulich Acked-by: Wei Liu ___ Xen-devel mailing

Re: [Xen-devel] [PATCH 2/5] libxl/PCI: establish per-device reserved memory policy earlier

2020-02-20 Thread Wei Liu
On Tue, Feb 18, 2020 at 04:46:44PM +0100, Jan Beulich wrote: > Reserved device memory region processing as well as E820 table creation > happen earlier than the adding of (PCI) devices, yet they consume the > policy (e.g. to decide whether to add entries to the E820 table). But so > far it was

Re: [Xen-devel] [PATCH] Avoid cpu_physical_memory_rw() with a constant is_write argument

2020-02-20 Thread Paolo Bonzini
On 18/02/20 19:49, Peter Maydell wrote: > Depending on which way we go we would either want to remove these > casts, or not. > > I guess that we have more cases of 'void*', and that would > certainly be the easier way to convert (otherwise we probably > need to add a bunch of new casts to

  1   2   >