Re: [Xen-devel] [PATCH 03/10] x86/gen-cpuid: Rework internal logic to ease future changes

2020-02-26 Thread Jan Beulich
On 26.02.2020 21:22, Andrew Cooper wrote: > Better split the logic between parse/calculate/write. Collect the feature > comment by their comment character, and perform the accumulation operations in > crunch_numbers(). Would you mind saying "character(s)" here, as there are items with multiple

Re: [Xen-devel] [PATCH 02/10] tools/libxc: Simplify xc_get_static_cpu_featuremask()

2020-02-26 Thread Jan Beulich
On 26.02.2020 21:22, Andrew Cooper wrote: > Drop XC_FEATUREMASK_DEEP_FEATURES. It isn't used by any callers, and unlike > the other static masks, won't be of interest to anyone without other pieces of > cpuid-autogen.h > > In xc_get_static_cpu_featuremask(), use a 2d array instead of

Re: [Xen-devel] [PATCH 01/10] x86/sysctl: Don't return cpu policy data for compiled-out support (2)

2020-02-26 Thread Jan Beulich
On 26.02.2020 21:22, Andrew Cooper wrote: > Just as with c/s 96dc77b4b1 for XEN_SYSCTL_get_cpu_policy, > XEN_SYSCTL_get_cpu_featureset needs to become conditional. > > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Albeit I'd say "want", not "needs" in the description. Jan

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

2020-02-26 Thread osstest service owner
flight 147586 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/147586/ 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

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

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

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

2020-02-26 Thread osstest service owner
flight 147656 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/147656/ 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

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

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

[Xen-devel] [linux-4.14 test] 147561: regressions - FAIL

2020-02-26 Thread osstest service owner
flight 147561 linux-4.14 real [real] http://logs.test-lab.xenproject.org/osstest/logs/147561/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit2 7 xen-boot fail REGR. vs. 142849 test-armhf-armhf-xl

[Xen-devel] [PATCH] xen: Replace zero-length array with flexible-array member

2020-02-26 Thread Gustavo A. R. Silva
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By

Re: [Xen-devel] [PATCH 1/2] tools/helpers: Introduce cmp-fd-file-inode utility

2020-02-26 Thread Rich Persaud
On Feb 26, 2020, at 11:07, Jason Andryuk wrote: > >> On Wed, Feb 26, 2020 at 10:48 AM Ian Jackson wrote: >> Jason Andryuk writes ("[PATCH 1/2] tools/helpers: Introduce >> cmp-fd-file-inode utility"): >>> This is a C implementation of the perl code inside of locking.sh to >>> check that the

[Xen-devel] [PATCH 10/10] x86/hvm: Do not enable MPX by default

2020-02-26 Thread Andrew Cooper
Memory Protection eXtension support has been dropped from GCC and Linux, and will be dropped from future Intel CPUs. With all other default/max pieces in place, move MPX from default to max. This means that VMs won't be offered it by default, but can explicitly opt into using it via

[Xen-devel] [PATCH 05/10] x86/msr: Compile out unused logic/objects

2020-02-26 Thread Andrew Cooper
Arrange to compile out the PV or HVM logic and objects as applicable. This involves a bit of complexity in init_domain_msr_policy() as is_pv_domain() can't be evaulated at compile time. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/arch/x86/msr.c |

[Xen-devel] [PATCH 08/10] x86/cpuid: Introduce and use default CPUID policies

2020-02-26 Thread Andrew Cooper
For now, the default and max policies remain identical, but this will change in the future. Write calculate_{pv,hvm}_def_policy() in a way which will cope with simple feature differences for now. Update XEN_SYSCTL_get_cpu_policy and init_domain_cpuid_policy() to use the default policies.

[Xen-devel] [PATCH 03/10] x86/gen-cpuid: Rework internal logic to ease future changes

2020-02-26 Thread Andrew Cooper
Better split the logic between parse/calculate/write. Collect the feature comment by their comment character, and perform the accumulation operations in crunch_numbers(). Avoid rendering the featuresets to C uint32_t's in crunch_numbers(), and instead do this in write_results(). Update

[Xen-devel] [PATCH 04/10] x86/gen-cpuid: Create max and default variations of INIT_*_FEATURES

2020-02-26 Thread Andrew Cooper
For now, write the same content for both. Update the users of the initialisers to use the new name, and extend xen-cpuid to dump both default and max featuresets. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- tools/libxc/include/xenctrl.h | 9

[Xen-devel] [PATCH 00/10] x86: Default vs Max policies

2020-02-26 Thread Andrew Cooper
This series builds on several years worth of building blocks to finally create a real distinction between default and max policies. See the final patch for a concrete example. Everything but the final patch is ready to go in now. The final patch depends on the still-in-review migration series,

[Xen-devel] [PATCH 02/10] tools/libxc: Simplify xc_get_static_cpu_featuremask()

2020-02-26 Thread Andrew Cooper
Drop XC_FEATUREMASK_DEEP_FEATURES. It isn't used by any callers, and unlike the other static masks, won't be of interest to anyone without other pieces of cpuid-autogen.h In xc_get_static_cpu_featuremask(), use a 2d array instead of individually named variables, and drop the switch statement

[Xen-devel] [PATCH 07/10] x86/cpuid: Compile out unused logic/objects

2020-02-26 Thread Andrew Cooper
CPUID Policy objects are large (1860 bytes at the time of writing), so compiling them out based on CONFIG_{PV,HVM} makes a lot of sense. This involves a bit of complexity in init_domain_cpuid_policy() and recalculate_cpuid_policy() as is_pv_domain() can't be evaulated at compile time.

[Xen-devel] [PATCH 09/10] x86/gen-cpuid: Distinguish default vs max in feature annotations

2020-02-26 Thread Andrew Cooper
Allow lowercase a/s/h to be used to annotate a non-default feature. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/include/public/arch-x86/cpufeatureset.h | 2 ++ xen/tools/gen-cpuid.py | 7 --- 2 files changed, 6

[Xen-devel] [PATCH 06/10] x86/msr: Introduce and use default MSR policies

2020-02-26 Thread Andrew Cooper
For now, the default and max policies remain identical, but this will change in the future. Update XEN_SYSCTL_get_cpu_policy and init_domain_msr_policy() to use the default policies. Take the opportunity sort PV ahead of HVM, as is the prevailing style elsewhere. Signed-off-by: Andrew Cooper

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

2020-02-26 Thread Andrew Cooper
Just as with c/s 96dc77b4b1 for XEN_SYSCTL_get_cpu_policy, XEN_SYSCTL_get_cpu_featureset needs to become conditional. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- tools/misc/xen-cpuid.c | 17 + xen/arch/x86/sysctl.c | 17

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

2020-02-26 Thread osstest service owner
flight 147647 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/147647/ 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

[Xen-devel] [libvirt test] 147583: regressions - FAIL

2020-02-26 Thread osstest service owner
flight 147583 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/147583/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-libvirt 6 libvirt-buildfail REGR. vs. 146182 build-i386-libvirt

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

2020-02-26 Thread Tamas K Lengyel
On Wed, Feb 26, 2020 at 9:17 AM Tamas K Lengyel wrote: > > On Wed, Feb 26, 2020 at 9:10 AM Roger Pau Monné wrote: > > > > On Wed, Feb 26, 2020 at 08:58:05AM -0700, Tamas K Lengyel wrote: > > > On Wed, Feb 26, 2020 at 8:36 AM Roger Pau Monné > > > wrote: > > > > > > > > On Wed, Feb 26, 2020 at

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

2020-02-26 Thread Woodhouse, David
On Wed, 2020-02-26 at 16:12 +, Julien Grall wrote: > (+David) > > On 26/02/2020 15:23, Jan Beulich wrote: > > On 26.02.2020 15:05, Durrant, Paul wrote: > > > > From: Jan Beulich > > > > Sent: 26 February 2020 13:58 > > > > > > > > On 25.02.2020 10:53, Paul Durrant wrote: > > > > > There's

Re: [Xen-devel] [PATCH] libxl: add initializers for libxl__domid_history

2020-02-26 Thread Wei Liu
On Wed, Feb 26, 2020 at 01:12:13PM +, Paul Durrant wrote: > This patch fixes Coverity issue CID 1459006 (Insecure data handling > (INTEGER_OVERFLOW)). > > The problem is that the error paths for libxl__mark_domid_recent() and > libxl__is_domid_recent() check the 'f' field in struct

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

2020-02-26 Thread osstest service owner
flight 147643 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/147643/ 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 v1] domctl: fix typo in comment

2020-02-26 Thread Wei Liu
On Wed, Feb 26, 2020 at 05:13:39PM +0100, Olaf Hering wrote: > Add missing 'a' to sharing. > > Signed-off-by: Olaf Hering Acked-by: Wei Liu ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

[Xen-devel] Reminder: XenSummit CFP Deadline next Friday, 6 March

2020-02-26 Thread George Dunlap
Dear Community Members, Just a reminder to everyone, that the CFP for the XenProject Developer and Design Summit 2020 closes NEXT FRIDAY, 6 March. Information about how to submit, schedule topics, and so on can be found at the CFP page: https://events.linuxfoundation.org/xen-summit/program/cfp/

Re: [Xen-devel] [PATCH 1/3] libxl: create domain 'error' node in xenstore

2020-02-26 Thread Ian Jackson
Paul Durrant writes ("[PATCH 1/3] libxl: create domain 'error' node in xenstore"): > Several PV drivers (both historically and currently [1]) report errors > by writing text into /local/domain/$DOMID/error. This patch creates the > node in libxl and makes it writable by the domain, and also adds

[Xen-devel] [PATCH 1/3] libxl: create domain 'error' node in xenstore

2020-02-26 Thread Paul Durrant
Several PV drivers (both historically and currently [1]) report errors by writing text into /local/domain/$DOMID/error. This patch creates the node in libxl and makes it writable by the domain, and also adds some text into xenstore-paths.pandoc to state what the node is for. [1]

[Xen-devel] [PATCH 3/3] libxl: make the top level 'device' node in xenstore writable...

2020-02-26 Thread Paul Durrant
... by the guest. Since this node is created largely to host the frontend areas for PV devices, all of which are fully guest-writable, there seems little point in making the top level node read-only. Other toolstacks, such as xend, did make the node writable by the guest and some PV drivers [1]

[Xen-devel] [PATCH 0/3] PV driver compatibility fixes

2020-02-26 Thread Paul Durrant
Paul Durrant (3): libxl: create domain 'error' node in xenstore libxl: make creation of xenstore suspend event channel node optional libxl: make the top level 'device' node in xenstore writable... docs/man/xl.cfg.5.pod.in| 7 +++ docs/misc/xenstore-paths.pandoc | 5 +

[Xen-devel] [PATCH 2/3] libxl: make creation of xenstore suspend event channel node optional

2020-02-26 Thread Paul Durrant
The purpose and semantics of the node are explained in xenstore-paths.pandoc [1]. It was originally introduced in xend by commit 17636f47a474 "Teach xc_save to use event-channel-based domain suspend if available.". Note that, because, the top-level frontend 'device' node was created writable by

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

2020-02-26 Thread Tamas K Lengyel
On Wed, Feb 26, 2020 at 9:10 AM Roger Pau Monné wrote: > > On Wed, Feb 26, 2020 at 08:58:05AM -0700, Tamas K Lengyel wrote: > > On Wed, Feb 26, 2020 at 8:36 AM Roger Pau Monné > > wrote: > > > > > > On Wed, Feb 26, 2020 at 08:20:30AM -0700, Tamas K Lengyel wrote: > > > > > > +static int

[Xen-devel] [PATCH v1] domctl: fix typo in comment

2020-02-26 Thread Olaf Hering
Add missing 'a' to sharing. Signed-off-by: Olaf Hering --- xen/include/public/domctl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index fec6f6fdd1..1ad34c35eb 100644 --- a/xen/include/public/domctl.h +++

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

2020-02-26 Thread Julien Grall
(+David) On 26/02/2020 15:23, Jan Beulich wrote: On 26.02.2020 15:05, Durrant, Paul wrote: From: Jan Beulich Sent: 26 February 2020 13:58 On 25.02.2020 10:53, Paul Durrant wrote: There's no particular reason shared_info need use a xenheap page. It's only purpose is to be mapped by the guest

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

2020-02-26 Thread Roger Pau Monné
On Wed, Feb 26, 2020 at 08:58:05AM -0700, Tamas K Lengyel wrote: > On Wed, Feb 26, 2020 at 8:36 AM Roger Pau Monné wrote: > > > > On Wed, Feb 26, 2020 at 08:20:30AM -0700, Tamas K Lengyel wrote: > > > > > +static int populate_special_pages(struct domain *cd) > > > > > +{ > > > > > +struct

Re: [Xen-devel] [PATCH 1/2] tools/helpers: Introduce cmp-fd-file-inode utility

2020-02-26 Thread Jason Andryuk
On Wed, Feb 26, 2020 at 10:48 AM Ian Jackson wrote: > > Jason Andryuk writes ("[PATCH 1/2] tools/helpers: Introduce cmp-fd-file-inode > utility"): > > This is a C implementation of the perl code inside of locking.sh to > > check that the locked file descriptor and lock file share the same inode

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

2020-02-26 Thread Tamas K Lengyel
On Wed, Feb 26, 2020 at 8:36 AM Roger Pau Monné wrote: > > On Wed, Feb 26, 2020 at 08:20:30AM -0700, Tamas K Lengyel wrote: > > > > +static int populate_special_pages(struct domain *cd) > > > > +{ > > > > +struct p2m_domain *p2m = p2m_get_hostp2m(cd); > > > > +static const unsigned int

[Xen-devel] block scripts file:// check_sharing bug

2020-02-26 Thread Jason Andryuk
Hi, I've noticed a couple of issues in the block script check_sharing function. Right now, loopback file can be assigned multiple times to multiple VMs. The first issue is `stat -c '%D'` is used to get the device number of the file in hexadecimal, but losetup prints the device number as

[Xen-devel] [PATCH v3 03/13] numa: Teach ram block notifiers about resizeable ram blocks

2020-02-26 Thread David Hildenbrand
Ram block notifiers are currently not aware of resizes. Especially to handle resizes during migration, but also to implement actually resizeable ram blocks (make everything between used_length and max_length inaccessible), we want to teach ram block notifiers about resizeable ram. Introduce the

Re: [Xen-devel] [PATCH 1/2] tools/helpers: Introduce cmp-fd-file-inode utility

2020-02-26 Thread Ian Jackson
Jason Andryuk writes ("[PATCH 1/2] tools/helpers: Introduce cmp-fd-file-inode utility"): > This is a C implementation of the perl code inside of locking.sh to > check that the locked file descriptor and lock file share the same inode > and therefore match. One change from the perl version is

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

2020-02-26 Thread Roger Pau Monné
On Wed, Feb 26, 2020 at 08:28:31AM -0700, Tamas K Lengyel wrote: > > You also need to reset the contents of the special pages, the > > vcpu_info pages and the shared_info page in order to match the state > > the VM was in when forking. > > Ack. > > > > > PV timers should also be reset to

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

2020-02-26 Thread Roger Pau Monné
On Wed, Feb 26, 2020 at 08:20:30AM -0700, Tamas K Lengyel wrote: > > > +static int populate_special_pages(struct domain *cd) > > > +{ > > > +struct p2m_domain *p2m = p2m_get_hostp2m(cd); > > > +static const unsigned int params[] = > > > +{ > > > +HVM_PARAM_STORE_PFN, > > > +

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

2020-02-26 Thread Tamas K Lengyel
> You also need to reset the contents of the special pages, the > vcpu_info pages and the shared_info page in order to match the state > the VM was in when forking. Ack. > > PV timers should also be reset to parent's state AFAICT, or else you > will get spurious timer interrupts. Could you

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

2020-02-26 Thread Roger Pau Monné
On Tue, Feb 25, 2020 at 11:17:56AM -0800, Tamas K Lengyel wrote: > 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

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

2020-02-26 Thread Jan Beulich
On 26.02.2020 15:05, Durrant, Paul wrote: >> From: Jan Beulich >> Sent: 26 February 2020 13:58 >> >> On 25.02.2020 10:53, Paul Durrant wrote: >>> 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

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

2020-02-26 Thread Tamas K Lengyel
> > +if ( (ret = cpupool_move_domain(cd, d->cpupool)) ) > > +return ret; > > You can join both ifs into a single one, since both return ret. Sure. > > + > > +for ( i = 0; i < cd->max_vcpus; i++ ) > > +{ > > +mfn_t vcpu_info_mfn; > > + > > +if ( !d->vcpu[i] ||

[Xen-devel] [PATCH 1/2] tools/helpers: Introduce cmp-fd-file-inode utility

2020-02-26 Thread Jason Andryuk
This is a C implementation of the perl code inside of locking.sh to check that the locked file descriptor and lock file share the same inode and therefore match. One change from the perl version is replacing printing "y" on success with exit values of 0 (shell True) and 1 (shell False).

[Xen-devel] [PATCH 2/2] Linux/locking.sh: Use cmp-fd-file-inode for lock check

2020-02-26 Thread Jason Andryuk
Replace perl with cmp-fd-file-inode when checking that the lock file descriptor and lockfile inodes match. Signed-off-by: Jason Andryuk --- tools/hotplug/Linux/locking.sh | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tools/hotplug/Linux/locking.sh

[Xen-devel] [PATCH 0/2] Remove locking.sh dependency on perl

2020-02-26 Thread Jason Andryuk
Perl is a large dependency for locking.sh's single use of comparing a file descriptor's and a file's inodes. Many systems don't otherwise require perl, so dropping this use eliminates the dependency. Replace the open-coded perl with an equivalent C implementation. Jason Andryuk (2):

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

2020-02-26 Thread Roger Pau Monné
On Tue, Feb 25, 2020 at 11:17:55AM -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

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

2020-02-26 Thread Jan Beulich
On 26.02.2020 15:22, Julien Grall wrote: > On 26/02/2020 12:03, Durrant, Paul wrote: >>> From: Julien Grall >>> Sent: 26 February 2020 11:33 >>> >>> On 25/02/2020 09:53, Paul Durrant wrote: For Arm, the call to free_shared_info() in arch_domain_destroy() is left in place since it called

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

2020-02-26 Thread Julien Grall
On 26/02/2020 12:03, Durrant, Paul wrote: -Original Message- From: Julien Grall Sent: 26 February 2020 11:33 To: Durrant, Paul ; xen-devel@lists.xenproject.org Cc: Stefano Stabellini ; Volodymyr Babchuk ; Andrew Cooper ; George Dunlap ; Ian Jackson ; Jan Beulich ; Konrad Rzeszutek

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

2020-02-26 Thread Durrant, Paul
> -Original Message- > From: Jan Beulich > Sent: 26 February 2020 13:58 > To: Durrant, Paul > Cc: xen-devel@lists.xenproject.org; Stefano Stabellini > ; Julien Grall ; Volodymyr Babchuk > ; Andrew Cooper ; > George Dunlap ; Ian Jackson > ; Konrad Rzeszutek Wilk > ; Wei Liu > Subject:

Re: [Xen-devel] [PATCH] xen: do live patching only from main idle loop

2020-02-26 Thread Jürgen Groß
On 24.02.20 23:25, Julien Grall wrote: Hi Juergen, On 11/02/2020 09:31, Juergen Gross wrote: diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 6f9bec22d3..30c4c1830b 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -23,7 +23,6 @@   #include   #include   #include

Re: [Xen-devel] [PATCH v5 4/4] x86/smp: do not use scratch_cpumask when in interrupt or exception context

2020-02-26 Thread Roger Pau Monné
On Wed, Feb 26, 2020 at 02:10:44PM +0100, Jan Beulich wrote: > On 26.02.2020 13:38, Roger Pau Monne wrote: > > Using scratch_cpumask in send_IPI_mask is not safe in IRQ or exception > > context because it can nest, and hence send_IPI_mask could be > > overwriting another user scratch cpumask data

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

2020-02-26 Thread Jan Beulich
On 25.02.2020 10:53, Paul Durrant wrote: > 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. Since the cover letter also doesn't give any background - is there a problem with the current

[Xen-devel] [qemu-mainline test] 147546: regressions - FAIL

2020-02-26 Thread osstest service owner
flight 147546 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/147546/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-freebsd10-i386 14 guest-saverestore fail REGR. vs. 144861

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

2020-02-26 Thread osstest service owner
flight 147633 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/147633/ 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

[Xen-devel] [linux-linus test] 147541: regressions - FAIL

2020-02-26 Thread osstest service owner
flight 147541 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/147541/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-shadow12 guest-start fail REGR. vs. 133580

[Xen-devel] [PATCH] libxl: add initializers for libxl__domid_history

2020-02-26 Thread Paul Durrant
This patch fixes Coverity issue CID 1459006 (Insecure data handling (INTEGER_OVERFLOW)). The problem is that the error paths for libxl__mark_domid_recent() and libxl__is_domid_recent() check the 'f' field in struct libxl__domid_history when it may not have been initialized. Signed-off-by: Paul

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

2020-02-26 Thread Alexandru Stefan ISAILA
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 having a separate arch.altp2m_working_eptp that is populated and

Re: [Xen-devel] [PATCH v5 4/4] x86/smp: do not use scratch_cpumask when in interrupt or exception context

2020-02-26 Thread Jan Beulich
On 26.02.2020 13:38, Roger Pau Monne wrote: > Using scratch_cpumask in send_IPI_mask is not safe in IRQ or exception > context because it can nest, and hence send_IPI_mask could be > overwriting another user scratch cpumask data when used in such > contexts. > > Instead introduce a new cpumask to

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

2020-02-26 Thread Jan Beulich
On 26.02.2020 13:19, Roger Pau Monne wrote: > Add helpers to track when executing in #MC handler context. This is > modeled after the in_irq helpers. > > Note that there are no users of in_mce_handler() introduced by the > change, further users will be added by followup changes. > >

Re: [Xen-devel] [PATCH v4 2/4] x86: track when in NMI context

2020-02-26 Thread Jan Beulich
On 26.02.2020 13:19, Roger Pau Monne wrote: > Add helpers to track when running in NMI handler 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

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

2020-02-26 Thread Jan Beulich
On 26.02.2020 13:19, 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] [XEN PATCH v3 04/23] xen/build: remove use of AFLAGS-y

2020-02-26 Thread Jan Beulich
On 26.02.2020 12:33, Anthony PERARD wrote: > And simply add directly to AFLAGS. > > Signed-off-by: Anthony PERARD Acked-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xenproject.org

[Xen-devel] [PATCH v6 09/12] xen: add runtime parameter access support to hypfs

2020-02-26 Thread Juergen Gross
Add support to read and modify values of hypervisor runtime parameters via the hypervisor file system. As runtime parameters can be modified via a sysctl, too, this path has to take the hypfs rw_lock as writer. For custom runtime parameters the connection between the parameter value and the file

[Xen-devel] [PATCH v6 12/12] xen: remove XEN_SYSCTL_set_parameter support

2020-02-26 Thread Juergen Gross
The functionality of XEN_SYSCTL_set_parameter is available via hypfs now, so it can be removed. This allows to remove the kernel_param structure for runtime parameters by putting the now only used structure element into the hypfs node structure of the runtime parameters. Signed-off-by: Juergen

[Xen-devel] [PATCH v6 07/12] xen: provide version information in hypfs

2020-02-26 Thread Juergen Gross
Provide version and compile information in /buildinfo/ node of the Xen hypervisor file system. As this information is accessible by dom0 only no additional security problem arises. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- V3: - new patch V4: - add __read_mostly annotations

Re: [Xen-devel] [PATCH] x86/vPMU: don't blindly assume IA32_PERF_CAPABILITIES MSR exists

2020-02-26 Thread Chen, Farrah
I applied this patch to Xen and retested, Xen on KVM booted up successfully, thanks a lot. Thanks, Fan -Original Message- From: Andrew Cooper Sent: Wednesday, February 26, 2020 6:56 PM To: Jan Beulich ; Roger Pau Monné Cc: xen-devel@lists.xenproject.org; Chen, Farrah ; Hao, Xudong ;

[Xen-devel] [PATCH v6 04/12] xen: add basic hypervisor filesystem support

2020-02-26 Thread Juergen Gross
Add the infrastructure for the hypervisor filesystem. This includes the hypercall interface and the base functions for entry creation, deletion and modification. In order not to have to repeat the same pattern multiple times in case adding a new node should BUG_ON() failure, the helpers for

[Xen-devel] [PATCH v6 03/12] docs: add feature document for Xen hypervisor sysfs-like support

2020-02-26 Thread Juergen Gross
On the 2019 Xen developer summit there was agreement that the Xen hypervisor should gain support for a hierarchical name-value store similar to the Linux kernel's sysfs. In the beginning there should only be basic support: entries can be added from the hypervisor itself only, there is a simple

[Xen-devel] [PATCH v6 00/12] Add hypervisor sysfs-like support

2020-02-26 Thread Juergen Gross
On the 2019 Xen developer summit there was agreement that the Xen hypervisor should gain support for a hierarchical name-value store similar to the Linux kernel's sysfs. This is a first implementation of that idea adding the basic functionality to hypervisor and tools side. The interface to any

[Xen-devel] [PATCH v6 11/12] tools/libxc: remove xc_set_parameters()

2020-02-26 Thread Juergen Gross
There is no user of xc_set_parameters() left, so remove it. Signed-off-by: Juergen Gross --- V6: - new patch --- tools/libxc/include/xenctrl.h | 1 - tools/libxc/xc_misc.c | 21 - 2 files changed, 22 deletions(-) diff --git a/tools/libxc/include/xenctrl.h

[Xen-devel] [PATCH v6 08/12] xen: add /buildinfo/config entry to hypervisor filesystem

2020-02-26 Thread Juergen Gross
Add the /buildinfo/config entry to the hypervisor filesystem. This entry contains the .config file used to build the hypervisor. Signed-off-by: Juergen Gross --- V3: - store data in gzip format - use binfile mechanism to create data file - move code to kernel.c V6: - add config item for the

[Xen-devel] [PATCH v6 10/12] tools/libxl: use libxenhypfs for setting xen runtime parameters

2020-02-26 Thread Juergen Gross
Instead of xc_set_parameters() use xenhypfs_write() for setting parameters of the hypervisor. Signed-off-by: Juergen Gross --- V6: - new patch --- tools/Rules.mk | 2 +- tools/libxl/Makefile | 3 ++- tools/libxl/libxl.c | 53

[Xen-devel] [PATCH v6 01/12] xen: allow only sizeof(bool) variables for boolean_param()

2020-02-26 Thread Juergen Gross
Support of other variable sizes than that of normal bool ones for boolean_parameter() don't make sense, so catch any other sized variables at build time. Fix the one parameter using a plain int instead of bool. Signed-off-by: Juergen Gross --- V6: - new patch --- xen/arch/x86/hvm/asid.c | 2 +-

[Xen-devel] [PATCH v6 05/12] libs: add libxenhypfs

2020-02-26 Thread Juergen Gross
Add the new library libxenhypfs for access to the hypervisor filesystem. Signed-off-by: Juergen Gross Acked-by: Wei Liu --- V1: - rename to libxenhypfs - add xenhypfs_write() V3: - major rework due to new hypervisor interface - add decompression capability V4: - add dependency to libz in

[Xen-devel] [PATCH v6 06/12] tools: add xenfs tool

2020-02-26 Thread Juergen Gross
Add the xenfs tool for accessing the hypervisor filesystem. Signed-off-by: Juergen Gross Acked-by: Wei Liu --- V1: - rename to xenhypfs - don't use "--" for subcommands - add write support V2: - escape non-printable characters per default with cat subcommand (Ian Jackson) - add -b option to

[Xen-devel] [PATCH v6 02/12] xen: add a generic way to include binary files as variables

2020-02-26 Thread Juergen Gross
Add a new script xen/tools/binfile for including a binary file at build time being usable via a pointer and a size variable in the hypervisor. Make use of that generic tool in xsm. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Wei Liu --- V3: - new patch V4: - add

[Xen-devel] [PATCH v5 4/4] x86/smp: do not use scratch_cpumask when in interrupt or exception context

2020-02-26 Thread Roger Pau Monne
Using scratch_cpumask in send_IPI_mask is not safe in IRQ or exception context because it can nest, and hence send_IPI_mask could be overwriting another user scratch cpumask data when used in such contexts. Instead introduce a new cpumask to be used by send_IPI_mask, and disable interrupts while

Re: [Xen-devel] [PATCH v4 4/4] x86/smp: do not use scratch_cpumask when in interrupt or exception context

2020-02-26 Thread Roger Pau Monné
On Wed, Feb 26, 2020 at 01:19:21PM +0100, Roger Pau Monne wrote: > Using scratch_cpumask in send_IPI_mask is not safe in IRQ or exception > context because it can nest, and hence send_IPI_mask could be > overwriting another user scratch cpumask data when used in such > contexts. > > Instead

[Xen-devel] [PATCH v4 2/4] x86: track when in NMI context

2020-02-26 Thread Roger Pau Monne
Add helpers to track when running in NMI handler 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 another fault is received while handling the NMI (a

[Xen-devel] [PATCH v4 4/4] x86/smp: do not use scratch_cpumask when in interrupt or exception context

2020-02-26 Thread Roger Pau Monne
Using scratch_cpumask in send_IPI_mask is not safe in IRQ or exception context because it can nest, and hence send_IPI_mask could be overwriting another user scratch cpumask data when used in such contexts. Instead introduce a new cpumask to be used by send_IPI_mask, and disable interrupts while

[Xen-devel] [PATCH v4 1/4] x86: introduce a nmi_count tracking variable

2020-02-26 Thread Roger Pau Monne
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 currently in service. Signed-off-by: Roger Pau Monné

[Xen-devel] [PATCH v4 3/4] x86: track when in #MC context

2020-02-26 Thread Roger Pau Monne
Add helpers to track when executing in #MC handler context. This is modeled after the in_irq helpers. Note that there are no users of in_mce_handler() introduced by the change, further users will be added by followup changes. Signed-off-by: Roger Pau Monné --- Changes since v3: - Rename to

[Xen-devel] [PATCH v4 0/4] x86/smp: fix send_IPI_mask usage of scratch_cpumask

2020-02-26 Thread Roger Pau Monne
Hello, Commit: 5500d265a2a8fa63d60c08beb549de8ec82ff7a5 x86/smp: use APIC ALLBUT destination shorthand when possible Introduced a bogus usage of the scratch cpumask: it was used in a function that could be called from interrupt context, and hence using the scratch cpumask there is not safe.

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

2020-02-26 Thread Durrant, Paul
> -Original Message- > From: Julien Grall > Sent: 26 February 2020 11:33 > To: Durrant, Paul ; xen-devel@lists.xenproject.org > Cc: Stefano Stabellini ; Volodymyr Babchuk > ; Andrew Cooper ; > George Dunlap ; Ian Jackson > ; Jan Beulich ; Konrad > Rzeszutek Wilk ; Wei Liu > Subject: Re:

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

2020-02-26 Thread Durrant, Paul
> -Original Message- > From: Andrew Cooper > Sent: 26 February 2020 11:46 > To: Durrant, Paul ; xen-devel@lists.xenproject.org > Cc: Stefano Stabellini ; Julien Grall > ; Volodymyr Babchuk ; George > Dunlap ; Ian Jackson > ; Jan Beulich ; Konrad > Rzeszutek Wilk ; Wei Liu > Subject: Re:

Re: [Xen-devel] [PATCH v2.1 15/17] tools/libx[cl]: Plumb 'missing' through static_data_done() up into libxl

2020-02-26 Thread Ian Jackson
Andrew Cooper writes ("[PATCH v2.1 15/17] tools/libx[cl]: Plumb 'missing' through static_data_done() up into libxl"): > Pre Xen-4.14 streams will not contain any CPUID/MSR information. There is > nothing libxc can do about this, and will have to rely on the higher level > toolstack to provide

Re: [Xen-devel] [PATCH] x86/mm: switch to new APIs in arch_init_memory

2020-02-26 Thread Jan Beulich
On 21.02.2020 11:42, Hongyan Xia wrote: > From: Wei Liu > > Since we now map and unmap Xen PTE pages, we would like to track the > lifetime of mappings so that 1) we do not dereference memory through a > variable after it is unmapped, 2) we do not unmap more than once. > Therefore, we introduce

Re: [Xen-devel] [XEN PATCH v3 03/23] xen/build: Remove confusing comment on the %.s:%.S rule

2020-02-26 Thread Wei Liu
On Wed, Feb 26, 2020 at 11:33:35AM +, Anthony PERARD wrote: > That comment was introduce by 3943db776371 ("[XEN] Can be built > -std=gnu99 (except for .S files).") to explain why CFLAGS was removed > from the command line. The comment is already written where the > -std=gnu flags gets remove

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

2020-02-26 Thread Andrew Cooper
On 25/02/2020 09:53, Paul Durrant wrote: > There's no particular reason shared_info need use a xenheap page. ? There are a number of ABI-critical reasons, not least the evtchn_pending field which Xen needs to write. I can see what you're trying to do, and it looks fine in principle, but the

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

2020-02-26 Thread Jan Beulich
On 26.02.2020 12:33, Julien Grall wrote: > On 25/02/2020 09:53, Paul Durrant wrote: >> --- a/xen/common/time.c >> +++ b/xen/common/time.c >> @@ -99,6 +99,9 @@ void update_domain_wallclock_time(struct domain *d) >> uint32_t *wc_version; >> uint64_t sec; >> >> +if ( d->is_dying )

[Xen-devel] [XEN PATCH v3 13/23] xen/build: include include/config/auto.conf in main Makefile

2020-02-26 Thread Anthony PERARD
We are going to generate the CFLAGS early from "xen/Makefile" instead of in "Rules.mk", but we need to include "config/auto.conf", so include it in "Makefile". Before including "config/auto.conf" we check which make target a user is calling, as some targets don't need "auto.conf". For targets

[Xen-devel] [XEN PATCH v3 23/23] xen/build: use if_changed to build guest_%.o

2020-02-26 Thread Anthony PERARD
Use if_changed for building all guest_%.o objects, and make use of command that already exist. This patch also introduces CFLAGS_$@, it is used so that flags are applied to all .o .i and .s targets. This patch make a change to the way guest_%.o files are built, and now run the same commands that

[Xen-devel] [XEN PATCH v3 17/23] xen/build: Start using if_changed

2020-02-26 Thread Anthony PERARD
This patch start to use if_changed introduced in a previous commit. Whenever if_changed is called, the target must have FORCE as dependency so that if_changed can check if the command line to be run as changed, so the macro $(real-prereqs) must be use to discover the dependencies without "FORCE".

  1   2   >