Re: [Xen-devel] [PATCH v7 0/6] xl/libxl: domid allocation/preservation changes

2020-02-25 Thread Durrant, Paul
> -Original Message- > From: Ian Jackson > Sent: 24 February 2020 17:57 > To: Durrant, Paul > Cc: Stefano Stabellini ; Julien Grall > ; Wei Liu ; Jason Andryuk > ; Andrew Cooper ; Konrad > Rzeszutek Wilk ; George Dunlap > ; Jan Beulich ; Anthony > Perard ; xen-devel@lists.xenproject.org >

[Xen-devel] [linux-4.19 bisection] complete test-amd64-amd64-xl-qemuu-ovmf-amd64

2020-02-25 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-amd64-xl-qemuu-ovmf-amd64 testid debian-hvm-install 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/oss

Re: [Xen-devel] [PATCH v7 03/11] scripts: add coccinelle script to use auto propagated errp

2020-02-25 Thread Vladimir Sementsov-Ogievskiy
23.02.2020 11:55, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and does corresponding changes in code (look for details in include/qapi/error.h) Usage example: spatch --sp-file scripts/coccinelle/auto-propagat

Re: [Xen-devel] [PATCH v9 3/5] xen/mem_sharing: VM forking

2020-02-25 Thread Roger Pau Monné
On Mon, Feb 24, 2020 at 03:14:56PM -0700, Tamas K Lengyel wrote: > > > > +int mem_sharing_fork_page(struct domain *d, gfn_t gfn, bool unsharing) > > > > +{ > > > > +int rc = -ENOENT; > > > > +shr_handle_t handle; > > > > +struct domain *parent; > > > > > > Can you constify parent, I ass

Re: [Xen-devel] [PATCH v9 3/5] xen/mem_sharing: VM forking

2020-02-25 Thread Roger Pau Monné
On Mon, Feb 24, 2020 at 03:26:05PM -0700, Tamas K Lengyel wrote: > > > Also cd and d and not very helpful names, I would just use child and > > > parent. > > > > Sure. > > Looking at this in the context of the whole pre-existing code-base, > the names cd & d are used throughout mem_sharing. So for

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

2020-02-25 Thread Vladimir Sementsov-Ogievskiy
22.02.2020 11:23, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 21.02.2020 19:34, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 21.02.2020 10:38, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add functions to clean Error **errp: call corr

Re: [Xen-devel] [PATCH v7 03/11] scripts: add coccinelle script to use auto propagated errp

2020-02-25 Thread Vladimir Sementsov-Ogievskiy
23.02.2020 11:55, Markus Armbruster wrote: +| +-warn_report_err(local_err); ++warn_report_errp(errp); Likewise. What about error_reportf_err(), warn_reportf_err()? Hmm I'm afraid, we don't have corresponding cases to update.. We can still handle them here, but, then, should we use no

Re: [Xen-devel] [PATCH v9 3/5] xen/mem_sharing: VM forking

2020-02-25 Thread Roger Pau Monné
On Fri, Feb 21, 2020 at 10:49:21AM -0800, Tamas K Lengyel wrote: > VM forking is the process of creating a domain with an empty memory space and > a > parent domain specified from which to populate the memory when necessary. For > the new domain to be functional the VM state is copied over as part

[Xen-devel] [PATCH 0/2] remove one more shared xenheap page: shared_info

2020-02-25 Thread Paul Durrant
Paul Durrant (2): domain: introduce alloc/free_shared_info() helpers... domain: use PGC_extra domheap page for shared_info xen/arch/arm/domain.c| 10 - xen/arch/arm/mm.c| 2 +- xen/arch/x86/domain.c| 12 +- xen/arch/x86/mm.c| 2 +- xen

[Xen-devel] [PATCH 1/2] domain: introduce alloc/free_shared_info() helpers...

2020-02-25 Thread Paul Durrant
... and save the MFN. This patch modifies the 'shared_info' field of struct domain to be a structure comprising an MFN and a virtual address. Allocations are still done from xenheap, so the virtual address still equates to virt_to_mfn() called on the MFN but subsequent patch will change this. Henc

[Xen-devel] [PATCH 2/2] domain: use PGC_extra domheap page for shared_info

2020-02-25 Thread Paul Durrant
There's no particular reason shared_info need use a xenheap page. It's only purpose is to be mapped by the guest so use a PGC_extra domheap page instead. This does entail freeing shared_info during domain_relinquish_resources() rather than domain_destroy() so care is needed to avoid de-referencing

Re: [Xen-devel] [PATCH v9 3/5] xen/mem_sharing: VM forking

2020-02-25 Thread Tamas K Lengyel
On Tue, Feb 25, 2020 at 3:05 AM Roger Pau Monné wrote: > > On Fri, Feb 21, 2020 at 10:49:21AM -0800, Tamas K Lengyel wrote: > > VM forking is the process of creating a domain with an empty memory space > > and a > > parent domain specified from which to populate the memory when necessary. > > Fo

Re: [Xen-devel] [PATCH v9 3/5] xen/mem_sharing: VM forking

2020-02-25 Thread Roger Pau Monné
On Tue, Feb 25, 2020 at 04:43:30AM -0700, Tamas K Lengyel wrote: > On Tue, Feb 25, 2020 at 3:05 AM Roger Pau Monné wrote: > > > > On Fri, Feb 21, 2020 at 10:49:21AM -0800, Tamas K Lengyel wrote: > > > VM forking is the process of creating a domain with an empty memory space > > > and a > > > pare

[Xen-devel] [PATCH] automation: document vsyscall=emulate for old glibc

2020-02-25 Thread Wei Liu
Signed-off-by: Wei Liu --- automation/build/README.md | 10 ++ 1 file changed, 10 insertions(+) diff --git a/automation/build/README.md b/automation/build/README.md index 476f82cf45..8cda2b65a5 100644 --- a/automation/build/README.md +++ b/automation/build/README.md @@ -58,6 +58,16 @@ un

Re: [Xen-devel] [PATCH v2] x86/cpu: Sync any remaining RCU callbacks after CPU up/down

2020-02-25 Thread Jan Beulich
On 21.02.2020 20:26, Igor Druzhinin wrote: > On 21/02/2020 16:29, Jan Beulich wrote: >> On 19.02.2020 18:25, Igor Druzhinin wrote: >>> --- a/xen/arch/x86/sysctl.c >>> +++ b/xen/arch/x86/sysctl.c >>> @@ -78,8 +78,11 @@ static void l3_cache_get(void *arg) >>> long cpu_up_helper(void *data) >>> { >>

Re: [Xen-devel] [PATCH v9 3/5] xen/mem_sharing: VM forking

2020-02-25 Thread Tamas K Lengyel
On Tue, Feb 25, 2020 at 5:06 AM Roger Pau Monné wrote: > > On Tue, Feb 25, 2020 at 04:43:30AM -0700, Tamas K Lengyel wrote: > > On Tue, Feb 25, 2020 at 3:05 AM Roger Pau Monné > > wrote: > > > > > > On Fri, Feb 21, 2020 at 10:49:21AM -0800, Tamas K Lengyel wrote: > > > > VM forking is the proces

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

2020-02-25 Thread Jan Beulich
On 24.02.2020 02:06, Wei Xu wrote: > On 2020/2/21 23:07, Jan Beulich wrote: >> On 21.02.2020 15:57, Julien Grall wrote: >>> On 21/02/2020 14:02, Jan Beulich wrote: On 21.02.2020 03:22, Wei Xu wrote: > --- a/xen/drivers/char/ns16550.c > +++ b/xen/drivers/char/ns16550.c > @@ -1620,6

Re: [Xen-devel] [PATCH 7/8] x86/setup: simplify handling of initrdidx when no initrd present

2020-02-25 Thread Jan Beulich
On 24.02.2020 14:31, Julien Grall wrote: > On 21/02/2020 16:59, Jan Beulich wrote: >> On 01.02.2020 01:33, David Woodhouse wrote: >>> From: David Woodhouse >>> >>> Remove a ternary operator that made my brain hurt. >> >> Personally I'd prefer the code to stay as is, but if Andrew agrees >> with th

Re: [Xen-devel] [PATCH v2] x86/cpu: Sync any remaining RCU callbacks after CPU up/down

2020-02-25 Thread Igor Druzhinin
On 25/02/2020 12:22, Jan Beulich wrote: > On 21.02.2020 20:26, Igor Druzhinin wrote: >> On 21/02/2020 16:29, Jan Beulich wrote: >>> On 19.02.2020 18:25, Igor Druzhinin wrote: --- a/xen/arch/x86/sysctl.c +++ b/xen/arch/x86/sysctl.c @@ -78,8 +78,11 @@ static void l3_cache_get(void *arg

Re: [Xen-devel] [PATCH v2] x86/cpu: Sync any remaining RCU callbacks after CPU up/down

2020-02-25 Thread Jan Beulich
On 25.02.2020 13:37, Igor Druzhinin wrote: > On 25/02/2020 12:22, Jan Beulich wrote: >> On 21.02.2020 20:26, Igor Druzhinin wrote: >>> On 21/02/2020 16:29, Jan Beulich wrote: On 19.02.2020 18:25, Igor Druzhinin wrote: > --- a/xen/arch/x86/sysctl.c > +++ b/xen/arch/x86/sysctl.c > @@

Re: [Xen-devel] [PATCH v2] x86/cpu: Sync any remaining RCU callbacks after CPU up/down

2020-02-25 Thread Igor Druzhinin
On 25/02/2020 12:40, Jan Beulich wrote: > On 25.02.2020 13:37, Igor Druzhinin wrote: >> On 25/02/2020 12:22, Jan Beulich wrote: >>> On 21.02.2020 20:26, Igor Druzhinin wrote: On 21/02/2020 16:29, Jan Beulich wrote: > On 19.02.2020 18:25, Igor Druzhinin wrote: >> --- a/xen/arch/x86/sysc

[Xen-devel] [PATCH] libxl: fix build with older glibc

2020-02-25 Thread Paul Durrant
Commit 2b02882ebbbc "libxl: add infrastructure to track and query 'recent' domids" added a call to clock_gettime() into libxl. The man- page for this states: "Link with -lrt (only for glibc versions before 2.17)." Unfortunately Centos 6 does have an glibc prior to that version, and the libxl Make

Re: [Xen-devel] [PATCH v7 03/11] scripts: add coccinelle script to use auto propagated errp

2020-02-25 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 23.02.2020 11:55, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and >>> does corresponding changes in code (look for details in >>> include/qapi/error.h) >>> >>> Us

Re: [Xen-devel] [PATCH] automation: document vsyscall=emulate for old glibc

2020-02-25 Thread Durrant, Paul
> -Original Message- > From: Xen-devel On Behalf Of Wei > Liu > Sent: 25 February 2020 12:11 > To: Xen Development List > Cc: Doug Goldstein ; Wei Liu > Subject: [Xen-devel] [PATCH] automation: document vsyscall=emulate for old > glibc > > Signed-off-by: Wei Liu > --- > automation/bui

Re: [Xen-devel] [PATCH] libxl: fix build with older glibc

2020-02-25 Thread Wei Liu
On Tue, Feb 25, 2020 at 12:33:43PM +, Paul Durrant wrote: > Commit 2b02882ebbbc "libxl: add infrastructure to track and query > 'recent' domids" added a call to clock_gettime() into libxl. The man- > page for this states: > > "Link with -lrt (only for glibc versions before 2.17)." > > Unfortu

Re: [Xen-devel] [PATCH] ns16550: Re-order the serial port address checking

2020-02-25 Thread Jan Beulich
On 25.02.2020 01:33, Wei Xu wrote: > On 2020/2/25 6:03, Julien Grall wrote: >> Thank you for sending a follow-up. >> >> On 24/02/2020 11:30, Wei Xu wrote: >>> Check the serial port address space before checking the address. >> >> Could you explain in a sentence why you want to re-order? > > Do you

Re: [Xen-devel] [PATCH v9 1/5] xen/x86: Make hap_get_allocation accessible

2020-02-25 Thread Jan Beulich
On 24.02.2020 16:20, Roger Pau Monné wrote: > On Fri, Feb 21, 2020 at 10:49:19AM -0800, Tamas K Lengyel wrote: >> During VM forking we'll copy the parent domain's parameters to the client, >> including the HAP shadow memory setting that is used for storing the domain's >> EPT. We'll copy this in th

Re: [Xen-devel] [PATCH v9 1/5] xen/x86: Make hap_get_allocation accessible

2020-02-25 Thread Tamas K Lengyel
On Tue, Feb 25, 2020 at 6:17 AM Jan Beulich wrote: > > On 24.02.2020 16:20, Roger Pau Monné wrote: > > On Fri, Feb 21, 2020 at 10:49:19AM -0800, Tamas K Lengyel wrote: > >> During VM forking we'll copy the parent domain's parameters to the client, > >> including the HAP shadow memory setting that

[Xen-devel] [PATCH] xen/grant-table: Remove outdated warning in gnttab_grow_table()

2020-02-25 Thread Julien Grall
One of the warning message in gnttab_grow_table() refers to a function was removed in commit 6425f91c72 "xen/gnttab: Fold grant_table_{create, set_limits}() into grant_table_init()". Since the commit, gt->active will be allocated while initializing the grant table at domain creation. Therefore gt-

Re: [Xen-devel] [PATCH v9 3/5] xen/mem_sharing: VM forking

2020-02-25 Thread Jan Beulich
On 24.02.2020 13:39, Roger Pau Monné wrote: > On Fri, Feb 21, 2020 at 10:49:21AM -0800, Tamas K Lengyel wrote: >> +static int mem_sharing_fork(struct domain *d, struct domain *cd) >> +{ >> +int rc = -EINVAL; >> + >> +if ( !cd->controller_pause_count ) >> +return rc; > > -EBUSY migh

Re: [Xen-devel] [PATCH] xen/grant-table: Remove outdated warning in gnttab_grow_table()

2020-02-25 Thread Andrew Cooper
On 25/02/2020 13:25, Julien Grall wrote: > One of the warning message in gnttab_grow_table() refers to a function > was removed in commit 6425f91c72 "xen/gnttab: Fold grant_table_{create, > set_limits}() into grant_table_init()". > > Since the commit, gt->active will be allocated while initializing

Re: [Xen-devel] [PATCH v9 3/5] xen/mem_sharing: VM forking

2020-02-25 Thread Jan Beulich
On 24.02.2020 16:45, Tamas K Lengyel wrote: > On Mon, Feb 24, 2020 at 5:39 AM Roger Pau Monné wrote: >> On Fri, Feb 21, 2020 at 10:49:21AM -0800, Tamas K Lengyel wrote: >>> --- a/xen/arch/x86/mm/p2m.c >>> +++ b/xen/arch/x86/mm/p2m.c >>> @@ -509,6 +509,14 @@ mfn_t __get_gfn_type_access(struct p2m_d

[Xen-devel] [xen-unstable test] 147522: regressions - FAIL

2020-02-25 Thread osstest service owner
flight 147522 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/147522/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-qemut-rhel6hvm-amd 12 guest-start/redhat.repeat fail REGR. vs. 147298 Tests whic

Re: [Xen-devel] [PATCH v9 4/5] x86/mem_sharing: reset a fork

2020-02-25 Thread Jan Beulich
On 24.02.2020 16:35, Tamas K Lengyel wrote: > On Mon, Feb 24, 2020 at 8:13 AM Roger Pau Monné wrote: >> On Fri, Feb 21, 2020 at 10:49:22AM -0800, Tamas K Lengyel wrote: >>> --- a/xen/arch/x86/mm/mem_sharing.c >>> +++ b/xen/arch/x86/mm/mem_sharing.c >>> @@ -1636,6 +1636,59 @@ static int mem_sharing

Re: [Xen-devel] [PATCH v9 3/5] xen/mem_sharing: VM forking

2020-02-25 Thread Tamas K Lengyel
On Tue, Feb 25, 2020 at 6:28 AM Jan Beulich wrote: > > On 24.02.2020 13:39, Roger Pau Monné wrote: > > On Fri, Feb 21, 2020 at 10:49:21AM -0800, Tamas K Lengyel wrote: > >> +static int mem_sharing_fork(struct domain *d, struct domain *cd) > >> +{ > >> +int rc = -EINVAL; > >> + > >> +if ( !

Re: [Xen-devel] [PATCH v9 4/5] x86/mem_sharing: reset a fork

2020-02-25 Thread Tamas K Lengyel
On Tue, Feb 25, 2020 at 6:39 AM Jan Beulich wrote: > > On 24.02.2020 16:35, Tamas K Lengyel wrote: > > On Mon, Feb 24, 2020 at 8:13 AM Roger Pau Monné > > wrote: > >> On Fri, Feb 21, 2020 at 10:49:22AM -0800, Tamas K Lengyel wrote: > >>> --- a/xen/arch/x86/mm/mem_sharing.c > >>> +++ b/xen/arch/x

Re: [Xen-devel] [PATCH] x86/build: Fix -mskip-rax-setup handling

2020-02-25 Thread Jan Beulich
On 21.02.2020 19:55, Andrew Cooper wrote: > The way -mskip-rax-setup is currently specified results in compiler support > being evaluated per translation unit, rather than per subdir. Switch to using > cc-add-option instead. > > This drops the number of callouts from 428 to 60. > > Signed-off-by

Re: [Xen-devel] [PATCH] xen/grant-table: Remove outdated warning in gnttab_grow_table()

2020-02-25 Thread Jan Beulich
On 25.02.2020 14:29, Andrew Cooper wrote: > On 25/02/2020 13:25, Julien Grall wrote: >> One of the warning message in gnttab_grow_table() refers to a function >> was removed in commit 6425f91c72 "xen/gnttab: Fold grant_table_{create, >> set_limits}() into grant_table_init()". >> >> Since the commit

Re: [Xen-devel] [PATCH v9 4/5] x86/mem_sharing: reset a fork

2020-02-25 Thread Jan Beulich
On 25.02.2020 14:45, Tamas K Lengyel wrote: > On Tue, Feb 25, 2020 at 6:39 AM Jan Beulich wrote: >> >> On 24.02.2020 16:35, Tamas K Lengyel wrote: >>> On Mon, Feb 24, 2020 at 8:13 AM Roger Pau Monné >>> wrote: On Fri, Feb 21, 2020 at 10:49:22AM -0800, Tamas K Lengyel wrote: > --- a/xen/

Re: [Xen-devel] [PATCH] xen/grant-table: Remove outdated warning in gnttab_grow_table()

2020-02-25 Thread Julien Grall
On 25/02/2020 13:29, Andrew Cooper wrote: On 25/02/2020 13:25, Julien Grall wrote: One of the warning message in gnttab_grow_table() refers to a function was removed in commit 6425f91c72 "xen/gnttab: Fold grant_table_{create, set_limits}() into grant_table_init()". Since the commit, gt->activ

[Xen-devel] [PATCH] x86/pvh: drop v2 suffix from pvh.pandoc

2020-02-25 Thread Wei Liu
There is now only one version of PVH implementation in Xen. Drop "v2" to avoid confusion. Signed-off-by: Wei Liu --- docs/misc/pvh.pandoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/misc/pvh.pandoc b/docs/misc/pvh.pandoc index ccf1c8fe69..3e18789d36 100644 --- a/

Re: [Xen-devel] [PATCH] xen/xmalloc Unify type handling in macros

2020-02-25 Thread Jan Beulich
On 24.02.2020 15:22, Andrew Cooper wrote: > The macros in xmalloc.h are a mix of using their type parameter directly, and > using typeof(). Switch uniformly to the latter so expressions can be used, > rather than only type names. As Roger says, there's a reason for the split. And as a result of t

Re: [Xen-devel] [PATCH v9 3/5] xen/mem_sharing: VM forking

2020-02-25 Thread Tamas K Lengyel
> > Note also that during a restore the guest is aware of such process, > > and will know that it needs to re-register some stuff, but that's not > > the case when forking, since the guest is not aware you need to make > > sure everything is in place. There are also the grant table pages, > > which

Re: [Xen-devel] [PATCH v9 4/5] x86/mem_sharing: reset a fork

2020-02-25 Thread Tamas K Lengyel
> >> In such a case, please put in a comment explaining why failure is > >> impossible. In the general case e.g. a 2Mb page may need splitting, > >> which may yield -ENOMEM. Such a comment will then also be useful in > >> case a new failure mode gets added to ->set_entry(), where it then > >> will

Re: [Xen-devel] [PATCH] x86/pvh: drop v2 suffix from pvh.pandoc

2020-02-25 Thread Jan Beulich
On 25.02.2020 15:22, Wei Liu wrote: > There is now only one version of PVH implementation in Xen. Drop "v2" to > avoid confusion. > > Signed-off-by: Wei Liu Acked-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists

Re: [Xen-devel] [PATCH] x86/msr: Drop {pv, hvm}_max_vcpu_msrs objects

2020-02-25 Thread Jan Beulich
On 24.02.2020 15:22, Andrew Cooper wrote: > @@ -103,10 +100,7 @@ int init_domain_msr_policy(struct domain *d) > > int init_vcpu_msr_policy(struct vcpu *v) > { > -struct domain *d = v->domain; > -struct vcpu_msrs *msrs = > -xmemdup(is_pv_domain(d) ? &pv_max_vcpu_msrs > -

[Xen-devel] [PATCH v2] xen/grant-table: Remove outdated warning in gnttab_grow_table()

2020-02-25 Thread Julien Grall
One of the warning message in gnttab_grow_table() refers to a function was removed in commit 6425f91c72 "xen/gnttab: Fold grant_table_{create, set_limits}() into grant_table_init()". Since the commit, gt->active will be allocated while initializing the grant table at domain creation. Therefore gt-

Re: [Xen-devel] [PATCH v3 1/2] atomic: add atomic_and operations

2020-02-25 Thread Jan Beulich
On 24.02.2020 09:43, Roger Pau Monne wrote:> --- a/xen/include/asm-x86/atomic.h > +++ b/xen/include/asm-x86/atomic.h > @@ -224,6 +224,14 @@ static inline int atomic_add_unless(atomic_t *v, int a, > int u) > return c; > } > > +static inline void atomic_and(unsigned int m, atomic_t *v) > +{

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

2020-02-25 Thread osstest service owner
flight 147598 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/147598/ 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 v7 03/11] scripts: add coccinelle script to use auto propagated errp

2020-02-25 Thread Vladimir Sementsov-Ogievskiy
25.02.2020 15:52, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 23.02.2020 11:55, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and does corresponding changes in code (look for details in inc

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

2020-02-25 Thread Jan Beulich
On 24.02.2020 09:44, Roger Pau Monne wrote: > @@ -20,21 +21,30 @@ typedef struct { > #define DEFINE_RWLOCK(l) rwlock_t l = RW_LOCK_UNLOCKED > #define rwlock_init(l) (*(l) = (rwlock_t)RW_LOCK_UNLOCKED) > > -/* > - * Writer states & reader shift and bias. > - * > - * Writer field is 8 bit to allo

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

2020-02-25 Thread Julien Grall
On 24/02/2020 10:10, Roger Pau Monné wrote: On Mon, Feb 24, 2020 at 10:05:39AM +, Julien Grall wrote: Hi Roger, On 24/02/2020 08:44, 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 t

Re: [Xen-devel] [PATCH v3 1/2] atomic: add atomic_and operations

2020-02-25 Thread Roger Pau Monné
On Tue, Feb 25, 2020 at 04:12:56PM +0100, Jan Beulich wrote: > On 24.02.2020 09:43, Roger Pau Monne wrote:> --- > a/xen/include/asm-x86/atomic.h > > +++ b/xen/include/asm-x86/atomic.h > > @@ -224,6 +224,14 @@ static inline int atomic_add_unless(atomic_t *v, int > > a, int u) > > return c; >

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

2020-02-25 Thread Roger Pau Monné
On Tue, Feb 25, 2020 at 04:23:34PM +0100, Jan Beulich wrote: > On 24.02.2020 09:44, Roger Pau Monne wrote: > > @@ -20,21 +21,30 @@ typedef struct { > > #define DEFINE_RWLOCK(l) rwlock_t l = RW_LOCK_UNLOCKED > > #define rwlock_init(l) (*(l) = (rwlock_t)RW_LOCK_UNLOCKED) > > > > -/* > > - * Write

Re: [Xen-devel] [PATCH] x86/pvh: drop v2 suffix from pvh.pandoc

2020-02-25 Thread Roger Pau Monné
On Tue, Feb 25, 2020 at 02:22:32PM +, Wei Liu wrote: > There is now only one version of PVH implementation in Xen. Drop "v2" to > avoid confusion. > > Signed-off-by: Wei Liu Reviewed-by: Roger Pau Monné Thanks. ___ Xen-devel mailing list Xen-dev

Re: [Xen-devel] [xen-unstable test] 147522: regressions - FAIL

2020-02-25 Thread Jan Beulich
On 25.02.2020 14:35, osstest service owner wrote: > flight 147522 xen-unstable real [real] > http://logs.test-lab.xenproject.org/osstest/logs/147522/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including tests which could not be run: > test-amd64-i386-qemut-rhel6hvm-a

Re: [Xen-devel] [PATCH v3 1/2] atomic: add atomic_and operations

2020-02-25 Thread Jan Beulich
On 24.02.2020 11:29, Julien Grall wrote: > On 24/02/2020 10:23, Roger Pau Monné wrote: >> On Mon, Feb 24, 2020 at 10:19:44AM +, Julien Grall wrote: >>> On 24/02/2020 10:09, Roger Pau Monné wrote: On Mon, Feb 24, 2020 at 10:02:53AM +, Julien Grall wrote: > On 24/02/2020 08:43, Roger

Re: [Xen-devel] [PATCH v3 1/5] x86: introduce a nmi_count tracking variable

2020-02-25 Thread Jan Beulich
On 24.02.2020 11:46, Roger Pau Monne wrote: > This is modeled after the irq_count variable, and is used to account > for all the NMIs handled by the system. > > This will allow to repurpose the nmi_count() helper so it can be used > in a similar manner as local_irq_count(): account for the NMIs >

Re: [Xen-devel] [PATCH v3 2/5] x86: track when in #NMI context

2020-02-25 Thread Jan Beulich
On 24.02.2020 11:46, Roger Pau Monne wrote: > Add helpers to track when running in #NMI context. This is modeled > after the in_irq helpers. > > The SDM states that no #NMI can be delivered while handling a #NMI > until the processor has executed an iret instruction. It's possible > however that a

Re: [Xen-devel] [PATCH v3 2/5] x86: track when in #NMI context

2020-02-25 Thread Jan Beulich
On 24.02.2020 11:46, Roger Pau Monne wrote: > @@ -18,6 +18,11 @@ typedef struct { > #define irq_enter() (local_irq_count(smp_processor_id())++) > #define irq_exit() (local_irq_count(smp_processor_id())--) > > +#define nmi_count(cpu) __IRQ_STAT((cpu), nmi_count) Oh, btw (noticed only w

Re: [Xen-devel] [PATCH v3 1/2] atomic: add atomic_and operations

2020-02-25 Thread Julien Grall
On 25/02/2020 16:15, Jan Beulich wrote: On 24.02.2020 11:29, Julien Grall wrote: On 24/02/2020 10:23, Roger Pau Monné wrote: On Mon, Feb 24, 2020 at 10:19:44AM +, Julien Grall wrote: On 24/02/2020 10:09, Roger Pau Monné wrote: On Mon, Feb 24, 2020 at 10:02:53AM +, Julien Grall wrote

[Xen-devel] [PATCH] x86/gen-cpuid: Fix Py2/3 compatibility

2020-02-25 Thread Andrew Cooper
There is a fencepost error on the sys.version_info check which will break on Python 3.0. Reverse the logic to make py2 compatible with py3 (rather than py3 compatible with py2) which will be more natural to follow as py2 usage reduces. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Li

Re: [Xen-devel] [PATCH v3 3/5] x86: track when in #MC context

2020-02-25 Thread Jan Beulich
On 24.02.2020 11:46, Roger Pau Monne wrote: > Add helpers to track when executing in #MC context. This is modeled > after the in_irq helpers. Same concern regarding the name as for NMI, i.e. perhaps in_mce_handler() here. (Note also the added 'e', which I think would make for slightly less in risk

Re: [Xen-devel] [PATCH] x86/gen-cpuid: Fix Py2/3 compatibility

2020-02-25 Thread Wei Liu
On Tue, Feb 25, 2020 at 04:57:48PM +, Andrew Cooper wrote: > There is a fencepost error on the sys.version_info check which will break on > Python 3.0. Reverse the logic to make py2 compatible with py3 (rather than > py3 compatible with py2) which will be more natural to follow as py2 usage >

[Xen-devel] [PATCH] x86/sysctl: Don't return cpu policy data for compiled-out support

2020-02-25 Thread Andrew Cooper
Policy objects aren't tiny, and the derivation logic isn't trivial. We are about to increase the number of policy objects, so take this opportunity to drop logic and storage space based on CONFIG_{PV,HVM}. Start by causing XEN_SYSCTL_get_cpu_policy to fail with -EOPNOTSUPP when requesting data fo

[Xen-devel] [PATCH v10 1/3] xen/mem_sharing: VM forking

2020-02-25 Thread Tamas K Lengyel
VM forking is the process of creating a domain with an empty memory space and a parent domain specified from which to populate the memory when necessary. For the new domain to be functional the VM state is copied over as part of the fork operation (HVM params, hap allocation, etc). Signed-off-by:

[Xen-devel] [PATCH v10 2/3] x86/mem_sharing: reset a fork

2020-02-25 Thread Tamas K Lengyel
Implement hypercall that allows a fork to shed all memory that got allocated for it during its execution and re-load its vCPU context from the parent VM. This allows the forked VM to reset into the same state the parent VM is in a faster way then creating a new fork would be. Measurements show abou

[Xen-devel] [PATCH v10 3/3] xen/tools: VM forking toolstack side

2020-02-25 Thread Tamas K Lengyel
Add necessary bits to implement "xl fork-vm" commands. The command allows the user to specify how to launch the device model allowing for a late-launch model in which the user can execute the fork without the device model and decide to only later launch it. Signed-off-by: Tamas K Lengyel --- v10:

[Xen-devel] [PATCH v10 0/3] VM forking

2020-02-25 Thread Tamas K Lengyel
The following series implements VM forking for Intel HVM guests to allow for the fast creation of identical VMs without the assosciated high startup costs of booting or restoring the VM from a savefile. JIRA issue: https://xenproject.atlassian.net/browse/XEN-89 The fork operation is implemented a

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

2020-02-25 Thread osstest service owner
flight 147603 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/147603/ 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] [linux-4.19 test] 147529: regressions - FAIL

2020-02-25 Thread osstest service owner
flight 147529 linux-4.19 real [real] http://logs.test-lab.xenproject.org/osstest/logs/147529/ 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. 142932 test-amd64-i

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

2020-02-25 Thread osstest service owner
flight 147605 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/147605/ 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] [ovmf test] 147531: regressions - FAIL

2020-02-25 Thread osstest service owner
flight 147531 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/147531/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ovmf-amd64 10 debian-hvm-install fail REGR. vs. 145767 test-amd64-i386-xl-qemu

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

2020-02-25 Thread Wei Xu
Hi Jan, On 2020/2/25 20:25, Jan Beulich wrote: > On 24.02.2020 02:06, Wei Xu wrote: >> On 2020/2/21 23:07, Jan Beulich wrote: >>> On 21.02.2020 15:57, Julien Grall wrote: On 21/02/2020 14:02, Jan Beulich wrote: > On 21.02.2020 03:22, Wei Xu wrote: >> --- a/xen/drivers/char/ns16550.c >

Re: [Xen-devel] [PATCH] ns16550: Re-order the serial port address checking

2020-02-25 Thread Wei Xu
Hi Jan, On 2020/2/25 21:10, Jan Beulich wrote: > On 25.02.2020 01:33, Wei Xu wrote: >> On 2020/2/25 6:03, Julien Grall wrote: >>> Thank you for sending a follow-up. >>> >>> On 24/02/2020 11:30, Wei Xu wrote: Check the serial port address space before checking the address. >>> >>> Could you ex

[Xen-devel] [BUG]Nested virtualization, Xen on KVM, Xen cannot boot up as a guest of KVM

2020-02-25 Thread Chen, Farrah
Description: Nested virtualization, take KVM host as L0, create guest on it, install Xen on guest, then guest cannot boot up from Xen and keep rebooting. Reproduce steps: 1. Enable KVM nested on host(L0) rmmod kvm_intel modprobe kvm_intel nested=y cat /sys/module/kvm_intel/parameters/nested Y 2.

Re: [Xen-devel] [PATCH 7/8] x86/setup: simplify handling of initrdidx when no initrd present

2020-02-25 Thread Julien Grall
Hi Jan, On 25/02/2020 12:34, Jan Beulich wrote: On 24.02.2020 14:31, Julien Grall wrote: On 21/02/2020 16:59, Jan Beulich wrote: On 01.02.2020 01:33, David Woodhouse wrote: From: David Woodhouse Remove a ternary operator that made my brain hurt. Personally I'd prefer the code to stay as i

Re: [Xen-devel] [BUG]Nested virtualization, Xen on KVM, Xen cannot boot up as a guest of KVM

2020-02-25 Thread Chao Gao
On Wed, Feb 26, 2020 at 02:21:25PM +0800, Chen, Farrah wrote: >Description: > >Nested virtualization, take KVM host as L0, create guest on it, install Xen on >guest, then guest cannot boot up from Xen and keep rebooting. > > > >Reproduce steps: >1. Enable KVM nested on host(L0) >rmmod kvm_intel >m

Re: [Xen-devel] [PATCH v7 03/11] scripts: add coccinelle script to use auto propagated errp

2020-02-25 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 25.02.2020 15:52, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> 23.02.2020 11:55, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: > Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and