Re: [Xen-devel] [PATCH 1/2] smp: convert the cpu maps lock into a rw lock

2020-02-20 Thread Jan Beulich
On 13.02.2020 12:32, Roger Pau Monne wrote: > Most users of the cpu maps just care about the maps not changing while > the lock is being held, but don't actually modify the maps. > > Convert the lock into a rw lock, and take the lock in read mode in > get_cpu_maps and in write mode in cpu_hotplug_

Re: [Xen-devel] [PATCH 2/2] smp: convert cpu_hotplug_begin into a blocking lock acquisition

2020-02-20 Thread Jan Beulich
On 19.02.2020 18:03, Jan Beulich wrote: > On 19.02.2020 17:08, Roger Pau Monné wrote: >> On Wed, Feb 19, 2020 at 03:07:14PM +, Andrew Cooper wrote: >>> On 19/02/2020 14:57, Jan Beulich wrote: On 19.02.2020 15:45, Roger Pau Monné wrote: > On Wed, Feb 19, 2020 at 02:44:12PM +0100, Jan Be

Re: [Xen-devel] [PATCH v5 8/8] xen: add runtime parameter access support to hypfs

2020-02-20 Thread Jürgen Groß
On 19.02.20 17:44, Jan Beulich wrote: On 19.02.2020 09:11, Juergen Gross wrote: --- a/docs/misc/hypfs-paths.pandoc +++ b/docs/misc/hypfs-paths.pandoc @@ -152,3 +152,12 @@ The major version of Xen. /buildinfo/version/minor = INTEGER The minor version of Xen. + + /params/ + +A dir

Re: [Xen-devel] [PATCH 1/2] smp: convert the cpu maps lock into a rw lock

2020-02-20 Thread Jürgen Groß
On 20.02.20 09:13, Jan Beulich wrote: On 13.02.2020 12:32, Roger Pau Monne wrote: Most users of the cpu maps just care about the maps not changing while the lock is being held, but don't actually modify the maps. Convert the lock into a rw lock, and take the lock in read mode in get_cpu_maps an

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

2020-02-20 Thread Jan Beulich
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 vcpu *v, uint64_t at_tsc) >>> { >>> struct

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

2020-02-20 Thread Jan Beulich
On 20.02.2020 08:44, Wei Xu wrote: > On 2020/2/17 21:53, Jan Beulich wrote: >> On 03.02.2020 12:21, Wei Xu wrote: >>> +static int __init ns16550_acpi_uart_init(const void *data) >>> +{ >>> +struct acpi_table_header *table; >>> +struct acpi_table_spcr *spcr; >>> +acpi_status status; >>>

Re: [Xen-devel] [PATCH 1/2] smp: convert the cpu maps lock into a rw lock

2020-02-20 Thread Jan Beulich
On 20.02.2020 09:27, Jürgen Groß wrote: > On 20.02.20 09:13, Jan Beulich wrote: >> On 13.02.2020 12:32, Roger Pau Monne wrote: >>> Most users of the cpu maps just care about the maps not changing while >>> the lock is being held, but don't actually modify the maps. >>> >>> Convert the lock into a r

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

2020-02-20 Thread Roger Pau Monné
Thanks for this work, please see below. On Wed, Feb 19, 2020 at 06:04:24PM +, Anchal Agarwal wrote: > On Tue, Feb 18, 2020 at 10:16:11AM +0100, Roger Pau Monné wrote: > > On Mon, Feb 17, 2020 at 11:05:53PM +, Anchal Agarwal wrote: > > > On Mon, Feb 17, 2020 at 11:05:09AM +0100, Roger Pau M

Re: [Xen-devel] [PATCH v5 8/8] xen: add runtime parameter access support to hypfs

2020-02-20 Thread Jan Beulich
On 20.02.2020 09:22, Jürgen Groß wrote: > On 19.02.20 17:44, Jan Beulich wrote: >> On 19.02.2020 09:11, Juergen Gross wrote: >>> --- a/xen/arch/arm/xen.lds.S >>> +++ b/xen/arch/arm/xen.lds.S >>> @@ -89,6 +89,11 @@ SECTIONS >>> __start_schedulers_array = .; >>> *(.data.schedulers)

Re: [Xen-devel] [PATCH v5 3/8] xen: add basic hypervisor filesystem support

2020-02-20 Thread Jan Beulich
On 20.02.2020 08:27, Jürgen Groß wrote: > On 19.02.20 16:49, Jan Beulich wrote: >> On 19.02.2020 09:11, Juergen Gross wrote: >>> +static inline void hypfs_string_set(struct hypfs_entry_leaf *leaf, >>> +const char *str) >>> +{ >>> +leaf->content = str; >>> +

Re: [Xen-devel] [PATCH 1/2] smp: convert the cpu maps lock into a rw lock

2020-02-20 Thread Julien Grall
On 20/02/2020 08:36, Jan Beulich wrote: On 20.02.2020 09:27, Jürgen Groß wrote: On 20.02.20 09:13, Jan Beulich wrote: On 13.02.2020 12:32, Roger Pau Monne wrote: Most users of the cpu maps just care about the maps not changing while the lock is being held, but don't actually modify the maps.

[Xen-devel] [linux-4.9 test] 147255: regressions - FAIL

2020-02-20 Thread osstest service owner
flight 147255 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/147255/ 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. 142947 test-amd64-i3

Re: [Xen-devel] [PATCH v5 3/8] xen: add basic hypervisor filesystem support

2020-02-20 Thread Jürgen Groß
On 20.02.20 09:43, Jan Beulich wrote: On 20.02.2020 08:27, Jürgen Groß wrote: On 19.02.20 16:49, Jan Beulich wrote: On 19.02.2020 09:11, Juergen Gross wrote: +static inline void hypfs_string_set(struct hypfs_entry_leaf *leaf, +const char *str) +{ +leaf->

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: 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; b...@kernel.crashing.org; x...@kernel.org; linux- > m...@kvack.org; pa...@ucw.cz; h...@zytor.co

Re: [Xen-devel] [PATCH v5 8/8] xen: add runtime parameter access support to hypfs

2020-02-20 Thread Jürgen Groß
On 20.02.20 09:49, Jan Beulich wrote: On 20.02.2020 09:22, Jürgen Groß wrote: On 19.02.20 17:44, Jan Beulich wrote: On 19.02.2020 09:11, Juergen Gross wrote: --- a/xen/arch/arm/xen.lds.S +++ b/xen/arch/arm/xen.lds.S @@ -89,6 +89,11 @@ SECTIONS __start_schedulers_array = .;

Re: [Xen-devel] [PATCH 1/2] smp: convert the cpu maps lock into a rw lock

2020-02-20 Thread Roger Pau Monné
On Thu, Feb 20, 2020 at 08:57:33AM +, Julien Grall wrote: > > > On 20/02/2020 08:36, Jan Beulich wrote: > > On 20.02.2020 09:27, Jürgen Groß wrote: > > > On 20.02.20 09:13, Jan Beulich wrote: > > > > On 13.02.2020 12:32, Roger Pau Monne wrote: > > > > > Most users of the cpu maps just care ab

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

2020-02-20 Thread Alexandru Stefan ISAILA
On 19.02.2020 18:37, Tamas K Lengyel wrote: > On Wed, Feb 19, 2020 at 2:19 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() so

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

2020-02-20 Thread Dario Faggioli
On Thu, 2020-02-20 at 07:56 +0100, Jürgen Groß wrote: > On 19.02.20 19:37, Dario Faggioli wrote: > > On Wed, 2020-02-19 at 17:52 +0100, Jan Beulich wrote: > > > > > Nevertheless, I'd add a quick comment about that, to make it even > > more > > obvious. :-) > > Do we really need that? > > Calling

[Xen-devel] dom-u stuck in ---sr- state after reboot

2020-02-20 Thread msd+xen-devel
Hi everyone, Since I use Xen 4.11 on Debian 10, sometimes (about one in twenty times) after a dom-u reboot, it stays stuck with the state '---sr-'. This had never happened for me with Xen 4.4 on Debian 8. I have to manually destroy and reboot the dom-u stuck domain. I can't see any error in logs

Re: [Xen-devel] [PATCH v2] xen/sched: add some diagnostic info in the run queue keyhandler

2020-02-20 Thread Dario Faggioli
On Tue, 2020-02-11 at 13:27 +0100, Juergen Gross wrote: > When dumping the run queue information add some more data regarding > current and (if known) previous vcpu for each physical cpu. > > With core scheduling activated the printed data will be e.g.: > > (XEN) CPUs info: > (XEN) CPU[00] curren

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

2020-02-20 Thread Wei Xu
Hi Jan, On 2020/2/20 16:33, Jan Beulich wrote: > On 20.02.2020 08:44, Wei Xu wrote: >> On 2020/2/17 21:53, Jan Beulich wrote: >>> On 03.02.2020 12:21, Wei Xu wrote: +static int __init ns16550_acpi_uart_init(const void *data) +{ +struct acpi_table_header *table; +struct

Re: [Xen-devel] [PATCH 1/3] tools/xentop: Fix calculation of used memory.

2020-02-20 Thread Wei Liu
The code looks correct to me, but I would like to add the following commit message to this change. Used memory should be calculated by subtracting free memory from total memory. On Wed, Feb 19, 2020 at 09:31:30PM +0100, Sander Eikelenboom wrote: > Signed-off-by: Sander Eikelenboom > --- > tool

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

2020-02-20 Thread Alexandru Stefan ISAILA
On 19.02.2020 19:00, Jan Beulich wrote: > On 19.02.2020 10:18, Alexandru Stefan ISAILA wrote: >> @@ -4835,6 +4836,23 @@ static int do_altp2m_op( >> break; >> } >> >> +case HVMOP_altp2m_set_visibility: >> +{ >> +uint16_t altp2m_idx = a.u.set_visibility.altp2m_idx

Re: [Xen-devel] [PATCH 3/3] tools/xentop: Cleanup some trailing whitespace

2020-02-20 Thread Wei Liu
On Wed, Feb 19, 2020 at 09:31:32PM +0100, Sander Eikelenboom wrote: > Signed-off-by: Sander Eikelenboom Acked-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 2/3] tools/xentop: Remove dead code

2020-02-20 Thread Wei Liu
On Wed, Feb 19, 2020 at 09:31:31PM +0100, Sander Eikelenboom wrote: > Signed-off-by: Sander Eikelenboom > --- I will add the following commit message: The variable freealbe_mb was never really used. Delete it and the code associated with it. Acked-by: Wei Liu > tools/xenstat/xentop/xentop.c

Re: [Xen-devel] [PATCH 0/3] tools/xentop: Fix calculation of used memory and some cleanups

2020-02-20 Thread Wei Liu
On Wed, Feb 19, 2020 at 09:31:29PM +0100, Sander Eikelenboom wrote: > Fixes some fallout from: c588c002cc1 ('tools: remove tmem code and commands') Thanks. I made some suggestions on adding commit messages. Let me know if you're okay with those. Wei. _

Re: [Xen-devel] [PATCH 1/3] tools/xentop: Fix calculation of used memory.

2020-02-20 Thread Wei Liu
On Thu, Feb 20, 2020 at 12:48:16AM +, Wei Liu wrote: > The code looks correct to me, but I would like to add the following > commit message to this change. > > Used memory should be calculated by subtracting free memory from total > memory. Fixes: c588c002cc1 ("tools: remove tmem code and com

Re: [Xen-devel] [PATCH 2/3] tools/xentop: Remove dead code

2020-02-20 Thread Wei Liu
On Thu, Feb 20, 2020 at 12:51:23AM +, Wei Liu wrote: > On Wed, Feb 19, 2020 at 09:31:31PM +0100, Sander Eikelenboom wrote: > > Signed-off-by: Sander Eikelenboom > > --- > > I will add the following commit message: > > The variable freealbe_mb was never really used. Delete it and the code > a

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

2020-02-20 Thread Jan Beulich
On 20.02.2020 10:59, Alexandru Stefan ISAILA wrote: > On 19.02.2020 19:00, Jan Beulich wrote: >> On 19.02.2020 10:18, Alexandru Stefan ISAILA wrote: >>> @@ -4835,6 +4836,23 @@ static int do_altp2m_op( >>> break; >>> } >>> >>> +case HVMOP_altp2m_set_visibility: >>> +{ >>>

Re: [Xen-devel] [PATCH 0/3] tools/xentop: Fix calculation of used memory and some cleanups

2020-02-20 Thread Sander Eikelenboom
On 20/02/2020 01:53, Wei Liu wrote: > On Wed, Feb 19, 2020 at 09:31:29PM +0100, Sander Eikelenboom wrote: >> Fixes some fallout from: c588c002cc1 ('tools: remove tmem code and commands') > > Thanks. I made some suggestions on adding commit messages. Let me know > if you're okay with those. > > We

Re: [Xen-devel] [PATCH 1/5] libxl/PCI: honor multiple per-device reserved memory regions

2020-02-20 Thread Wei Liu
On Tue, Feb 18, 2020 at 04:46:17PM +0100, Jan Beulich wrote: > While in "host" strategy all regions get processed, of the per-device > ones only the first entry has been consumed so far. > > Signed-off-by: Jan Beulich Acked-by: Wei Liu ___ Xen-devel

[Xen-devel] [linux-4.4 test] 147279: regressions - FAIL

2020-02-20 Thread osstest service owner
flight 147279 linux-4.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/147279/ 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. 139698 test-amd64-i3

Re: [Xen-devel] [PATCH v4 3/3] x86/hyperv: L0 assisted TLB flush

2020-02-20 Thread Durrant, Paul
> -Original Message- > From: Wei Liu On Behalf Of Wei Liu > Sent: 19 February 2020 11:44 > To: Xen Development List > Cc: Michael Kelley ; Durrant, Paul > ; Wei Liu ; Wei Liu > ; Jan Beulich ; Andrew Cooper > ; Roger Pau Monné > Subject: [PATCH v4 3/3] x86/hyperv: L0 assisted TLB flush >

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-02-20 Thread Jan Beulich
On 07.02.2020 16:57, David Woodhouse wrote: > @@ -1145,16 +1145,19 @@ static int reserve_offlined_page(struct page_info > *head) > > for ( cur_head = head; cur_head < head + ( 1UL << head_order); > cur_head++ ) > { > -if ( !page_state_is(cur_head, offlined) ) > +struct

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 uint8_t*

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 only

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 li

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 libxl__

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). Ma

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 >> +++ b/tools/libxl/li

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 seri

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. > >> > >> Signed-off-by

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 refcnt.

[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 o

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 xenhea

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 ha

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 all

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 > +++ b/xen/include/xen/rwlock.h

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

[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 1

[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é --- scripts/coccinelle/exec_r

[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 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 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 afee1

[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 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’: hw/net/i82596

[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 in

[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 i

[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 +++ b

[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é --- scripts/coccinelle/exe

[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 +- hw/ide/p

[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 +- hw/dma/etraxfs_dma.c

[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 ++-- hw/display/exynos4

[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: Philip

[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 --- a/hw/vir

[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 --- a/hw/virti

[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 a/in

[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 c

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] [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: qem

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(+) Review

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 insertion

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: Ph

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 insertio

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 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 va

[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 timeout

[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 run-queue.

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 scripts/cocci

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 produce

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 ; Stef

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 comme

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 ; Stef

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, than

[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 test-amd64-am

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. > >

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 >> _spin_is_locked(),

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 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 > >

[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 1

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 20.

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 vcp

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 > max_pa

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; b...@kernel.crashi

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] [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] 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 01:

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: > Anot

  1   2   >