[Xen-devel] [RFC] arm: Handle SiP Service Calls

2017-12-06 Thread Peng Fan
Support ARM SiP (Silicon Provider) services. - Import arm-smccc.h from Linux Kernel ca122fe376fc ("Merge tag 'arc-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc") - Introudce a new callback function in platform_desc - Add do_trap_hvccc to handle non xen specific hype

[Xen-devel] [seabios test] 116915: regressions - FAIL

2017-12-06 Thread osstest service owner
flight 116915 seabios real [real] http://logs.test-lab.xenproject.org/osstest/logs/116915/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemuu-ws16-amd64 17 guest-stop fail REGR. vs. 115539 Tests which are failing

Re: [Xen-devel] [PATCH v14 04/11] x86/hvm/ioreq: defer mapping gfns until they are actually requsted

2017-12-06 Thread Chao Gao
On Tue, Nov 28, 2017 at 03:08:46PM +, Paul Durrant wrote: >A subsequent patch will introduce a new scheme to allow an emulator to >map ioreq server pages directly from Xen rather than the guest P2M. > >This patch lays the groundwork for that change by deferring mapping of >gfns until their valu

[Xen-devel] [qemu-mainline test] 116904: tolerable FAIL - PUSHED

2017-12-06 Thread osstest service owner
flight 116904 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/116904/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 14 saverestore-support-checkfail like 116683 test-armhf-armhf-libvirt-xsm 14 sav

Re: [Xen-devel] [RFC PATCH 29/31] xen/arm: Introduce CPUFreq Interface component

2017-12-06 Thread Stefano Stabellini
On Wed, 6 Dec 2017, Oleksandr Tyshchenko wrote: > >> +perf->platform_limit = platform_limit; > >> +perf->shared_type = CPUFREQ_SHARED_TYPE_ANY; > >> +perf->domain_info.domain = cpumask_first(mask); > >> +perf->domain_info.num_processors = cpumask_weight(mask); > >> + > >> +/* It

[Xen-devel] [linux-4.9 test] 116894: regressions - trouble: broken/fail/pass

2017-12-06 Thread osstest service owner
flight 116894 linux-4.9 real [real] http://logs.test-lab.xenproject.org/osstest/logs/116894/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-arndale broken test-amd64-amd64-xl-qemut-win7-amd64 16 gues

Re: [Xen-devel] [RFC PATCH 06/31] cpufreq: make cpufreq driver more generalizable

2017-12-06 Thread Stefano Stabellini
On Wed, 6 Dec 2017, Jan Beulich wrote: > >>> On 05.12.17 at 21:48, wrote: > > You are right. We need to define a new struct for internal usage, for > > example: > > > > struct xen_processor_performance_internal { > > uint32_t flags; /* flag for Px sub info type */ > > uint32_t platfor

Re: [Xen-devel] [PATCH v2 06/13] iommu: Add extra use_iommu argument to iommu_domain_init()

2017-12-06 Thread Julien Grall
Hi, On 12/06/2017 07:53 PM, Oleksandr Tyshchenko wrote: On Wed, Dec 6, 2017 at 6:51 PM, Jan Beulich wrote: On 25.07.17 at 19:26, wrote: The presence of this flag lets us know that the guest domain has statically assigned devices which will most likely be used for passthrough and as the resul

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-06 Thread Julien Grall
Hi, Answering to myself. On 12/04/2017 02:30 PM, Julien Grall wrote: On 01/12/17 22:58, Stefano Stabellini wrote: On Mon, 27 Nov 2017, Volodymyr Babchuk wrote: = Xen command forwarding = In the code below, it looks like Xen is forwarding everything to OP-TEE. Are there some commands Xen shoul

Re: [Xen-devel] [RFC] WIP: optee: add OP-TEE mediator

2017-12-06 Thread Julien Grall
Hi Stuart, On 12/05/2017 03:36 PM, Stuart Yoder wrote: There are limit on pCPUs, though. But this is not a problem, because XEN scheduler will decide which guest will access OP-TEE right now. OP-TEE don't have own scheduler at all, by the way. It is scheduled by normal world. Do you mind to

[Xen-devel] [libvirt test] 116902: tolerable all pass - PUSHED

2017-12-06 Thread osstest service owner
flight 116902 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/116902/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 14 saverestore-support-checkfail like 116849 test-armhf-armhf-libvirt-raw 13 saveresto

[Xen-devel] [xen-unstable test] 116891: tolerable FAIL - PUSHED

2017-12-06 Thread osstest service owner
flight 116891 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/116891/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-xl-qemut-win7-amd64 17 guest-stop fail like 116832 test-armhf-armhf-libvirt 14 save

Re: [Xen-devel] [PATCH] xen-netback: Fix logging message with spurious period after newline

2017-12-06 Thread David Miller
From: Joe Perches Date: Tue, 5 Dec 2017 22:40:25 -0800 > Using a period after a newline causes bad output. > > Signed-off-by: Joe Perches Applied. ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listin

[Xen-devel] [PATCH 2/2] x86/vmx: Drop enum handler_return

2017-12-06 Thread Andrew Cooper
They are straight aliases of the more common X86EMUL_* constants. While adjusting these, fix the case indentation where appropriate. No functional change, confirmed by diff'ing the compiled binary. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Jun Nakajima CC: Kevin Tian --- xen/arch

[Xen-devel] [PATCH 1/2] x86/vmx: Don't use hvm_inject_hw_exception() in long_mode_do_msr_write()

2017-12-06 Thread Andrew Cooper
Since c/s 49de10f3c1718 "x86/hvm: Don't raise #GP behind the emulators back for MSR accesses", returnning X86EMUL_EXCEPTION has pushed the exception generation to the top of the call tree. Using hvm_inject_hw_exception() and returning X86EMUL_EXCEPTION causes a double #GP injection, which combines

Re: [Xen-devel] [PATCH v2 06/13] iommu: Add extra use_iommu argument to iommu_domain_init()

2017-12-06 Thread Oleksandr Tyshchenko
Hi Jan. On Wed, Dec 6, 2017 at 6:51 PM, Jan Beulich wrote: On 25.07.17 at 19:26, wrote: >> The presence of this flag lets us know that the guest domain has statically >> assigned devices which will most likely be used for passthrough >> and as the result the IOMMU is expected to be used for

Re: [Xen-devel] [PATCH 2/2] x86: rename DIRTY_GS_BASE_USER

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:38, Jan Beulich wrote: > As of commit 91f85280b9 ("x86: fix GS-base-dirty determination") the > USER part of it isn't really appropriate anymore. > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-d

Re: [Xen-devel] [PATCH 1/2] x86: improve MSR_SHADOW_GS accesses

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:37, Jan Beulich wrote: > --- a/xen/include/asm-x86/msr.h > +++ b/xen/include/asm-x86/msr.h > @@ -8,6 +8,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -172,6 +173,24 @@ static inline unsigned long rdgsbase(voi > return base; > } >

Re: [Xen-devel] [PATCH v2 07/13] iommu: Make decision about needing IOMMU for hardware domains in advance

2017-12-06 Thread Oleksandr Tyshchenko
Hi, Jan. On Wed, Dec 6, 2017 at 7:01 PM, Jan Beulich wrote: On 25.07.17 at 19:26, wrote: >> From: Oleksandr Tyshchenko >> >> The hardware domains require IOMMU to be used in the most cases and >> a decision to use it is made at hardware domain construction time. >> But, it is not the best

[Xen-devel] [PATCH] x86/intel: Drop zeroed-out select_idle_routine() function

2017-12-06 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/cpu/intel.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c index ac932e5..d3145c0 100644 --- a/xen/arch/x86/cpu/intel.c +++ b/xen/arch/x86/cpu/intel.c @@ -15,8 +15,6 @@

Re: [Xen-devel] [PATCH 07/12] ARM: VGIC: split gic.c to observe hardware/virtual GIC separation

2017-12-06 Thread Andre Przywara
Hi, On 26/10/17 01:37, Stefano Stabellini wrote: > On Thu, 19 Oct 2017, Andre Przywara wrote: >> Currently gic.c holds code to handle hardware IRQs as well as code to >> bridge VGIC requests to the GIC virtualization hardware. > > That is true, however, I don't necessarely see "the code to bridge

Re: [Xen-devel] [PATCH 05/12] ARM: VGIC: move gic_remove_from_lr_pending()

2017-12-06 Thread Andre Przywara
Hi, On 26/10/17 01:20, Stefano Stabellini wrote: > On Thu, 19 Oct 2017, Andre Przywara wrote: >> gic_remove_from_lr_pending() was not only misnamed, it also had the wrong >> abstraction, as it should not live in gic.c. >> Move it into vgic.c and vgic.h, where it belongs, and rename it on the >> wa

Re: [Xen-devel] [PATCH 03/12] ARM: VGIC: remove gic_clear_pending_irqs()

2017-12-06 Thread Andre Przywara
Hi, On 10/11/17 16:42, Andre Przywara wrote: > Hi, > > On 26/10/17 01:14, Stefano Stabellini wrote: >> On Thu, 19 Oct 2017, Andre Przywara wrote: >>> gic_clear_pending_irqs() was not only misnamed, but also misplaced, as >>> a function solely dealing with the GIC emulation should not live in gic.

[Xen-devel] [OSSTEST RFC 15/16] make-centos-flight: Create a flight with CentOS as dom0

2017-12-06 Thread Anthony PERARD
This is based on make-flight, with the added all_host_os=centos runvar, and without test that can not be run. Anything based on the recipe "test-debian" or "test-pair" is remove, as they require xen-tools. There is no XSM tests as the CentOS packages is built without. There is no build jobs as the

[Xen-devel] [OSSTEST RFC 13/16] WORKAROUND: Osstest/TestSupport: Make target_reboot works with systemd

2017-12-06 Thread Anthony PERARD
On host running with systemd as init, doing `ssh host reboot` will result in ssh returning an error. This patch works around by not waiting for the reboot command to return. Signed-off-by: Anthony PERARD --- Osstest/TestSupport.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --g

[Xen-devel] [OSSTEST RFC 16/16] Osstest/TestSupport: Handle qemu-img location on CentOS

2017-12-06 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- Osstest/TestSupport.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 40a5c5a..c82ba96 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1949,8 +1949,8 @@ sub make_q

[Xen-devel] [OSSTEST RFC 14/16] sg-run-job: Select host install script based on all_host_os runvar

2017-12-06 Thread Anthony PERARD
This also select a different xen installation script. Signed-off-by: Anthony PERARD --- sg-run-job | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sg-run-job b/sg-run-job index f6e8340..b324101 100755 --- a/sg-run-job +++ b/sg-run-job @@ -25,8 +25,9 @@ readc

[Xen-devel] [OSSTEST RFC 11/16] ts-centos-xen-pkg-install: Adjust daemons configuration

2017-12-06 Thread Anthony PERARD
Ajust configuration of xenconsoled and libvirtd. Signed-off-by: Anthony PERARD --- ts-centos-xen-pkg-install | 10 ++ 1 file changed, 10 insertions(+) diff --git a/ts-centos-xen-pkg-install b/ts-centos-xen-pkg-install index e10456d..0327b72 100755 --- a/ts-centos-xen-pkg-install +++ b/t

[Xen-devel] [OSSTEST RFC 10/16] ts-centos-xen-pkg-install: Install of Xen package on CentOS

2017-12-06 Thread Anthony PERARD
Install candidate packages that have been built by CBS, the CentOS Community Build Service. Signed-off-by: Anthony PERARD --- ts-centos-xen-pkg-install | 79 +++ 1 file changed, 79 insertions(+) create mode 100755 ts-centos-xen-pkg-install diff --git

[Xen-devel] [OSSTEST RFC 12/16] ts-centos-xen-pkg-install: Create bridge config

2017-12-06 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- ts-centos-xen-pkg-install | 22 ++ 1 file changed, 22 insertions(+) diff --git a/ts-centos-xen-pkg-install b/ts-centos-xen-pkg-install index 0327b72..9a4dcdd 100755 --- a/ts-centos-xen-pkg-install +++ b/ts-centos-xen-pkg-install @@ -82,8 +82,

[Xen-devel] [OSSTEST RFC 06/16] Osstest/CentOS.pm: Introduce CentOS support, starting with kickstart_installcmdline_core

2017-12-06 Thread Anthony PERARD
This function will be use later to install CentOS on a host. Signed-off-by: Anthony PERARD --- Osstest/CentOS.pm | 51 +++ 1 file changed, 51 insertions(+) create mode 100644 Osstest/CentOS.pm diff --git a/Osstest/CentOS.pm b/Osstest/CentOS.pm ne

[Xen-devel] [OSSTEST RFC 04/16] TestSupport: In host_install_postboot, don't call update-rc.d on CentOS

2017-12-06 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- Osstest/TestSupport.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 13e4360..b0e21bf 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -2818,7 +2818,8 @@ sub guest_ed

[Xen-devel] [OSSTEST RFC 05/16] TestSupport: Adapt target_https_mitm_proxy_setup to CentOS

2017-12-06 Thread Anthony PERARD
The location for new certificates is different, and update-ca-certificates is Debian specific. Signed-off-by: Anthony PERARD --- Osstest/TestSupport.pm | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index b0e21bf

[Xen-devel] [OSSTEST RFC 09/16] CentOS: Setup osstest-confirm-booted.service

2017-12-06 Thread Anthony PERARD
This emulate the osstest-confirm-booted service that is done on Debian. In order to have the service been started last: - it is made dependent on multi-user.target which is the default target on systemd. - it is part of osstest.target which depend on multi-user.target. - the osstest.target is set

[Xen-devel] [OSSTEST RFC 08/16] ts-centos-host-install: Install CentOS on a host

2017-12-06 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- ts-centos-host-install | 154 + 1 file changed, 154 insertions(+) create mode 100755 ts-centos-host-install diff --git a/ts-centos-host-install b/ts-centos-host-install new file mode 100755 index 000..943002d

[Xen-devel] [OSSTEST RFC 07/16] Osstest/CentOS: kickstart_create to generate an autoinstall recipe

2017-12-06 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- Osstest/CentOS.pm | 215 ++ 1 file changed, 215 insertions(+) diff --git a/Osstest/CentOS.pm b/Osstest/CentOS.pm index 33479b1..dbba354 100644 --- a/Osstest/CentOS.pm +++ b/Osstest/CentOS.pm @@ -28,13 +28,22 @@

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
Hi Jan, On 12/06/2017 03:15 PM, Jan Beulich wrote: On 06.12.17 at 13:58, wrote: On 12/06/2017 12:28 PM, George Dunlap wrote: 2. It sounds like rather than using PoD, you could use the "misconfigured p2m table" technique that x86 uses: set bits in the p2m entry which cause a specific kind of H

[Xen-devel] [OSSTEST RFC 02/16] Osstest/TestSupport: In teditfileex, get the file with the requested user

2017-12-06 Thread Anthony PERARD
e.g. If the file to be edited is only accessible to the root user, target_getfile() would not work. Signed-off-by: Anthony PERARD --- Osstest/TestSupport.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index c9dada3..65324fb

[Xen-devel] [OSSTEST RFC 00/16] Testing CentOS as dom0 with osstest

2017-12-06 Thread Anthony PERARD
Hi, This patch series teach osstest how to install CentOS 7 on a host and how to install Xen via packages that have been built in the CentOS Community Build Service (or CBS). For now, this is only usefull in standalone or to start ad-hoc flight, as there is nothing to build Xen. It is based on R

[Xen-devel] [OSSTEST RFC 03/16] Osstest/TestSupport: Add centos to package_install_cmd

2017-12-06 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- Osstest/TestSupport.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 65324fb..13e4360 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -530,6 +530,8 @@ sub package_install_cmd ($;$)

[Xen-devel] [OSSTEST RFC 01/16] JobDB-Standalone.tcl: Fix read-runvar

2017-12-06 Thread Anthony PERARD
This fix the error bellow, when the runvar exist: can't read "runvarinfo()": no such element in array while executing "set val $runvarinfo($val)" invoked from within "osstestdb eval { SELECT val FROM runvars WHERE flight = $flight AND job = $job AND na

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread George Dunlap
On 12/06/2017 12:58 PM, Julien Grall wrote: > Hi George, > > On 12/06/2017 12:28 PM, George Dunlap wrote: >> On 12/05/2017 06:39 PM, Julien Grall wrote: >>> Hi all, >>> >>> Even though it is an Arm failure, I have CCed x86 folks to get feedback >>> on the approach. I have a WIP branch I could shar

Re: [Xen-devel] [PATCH] x86/HVM: don't retain emulated insn cache when exiting back to guest

2017-12-06 Thread Julien Grall
Hi Andrew, On 12/06/2017 03:08 PM, Andrew Cooper wrote: On 06/12/17 13:04, Julien Grall wrote: Hi Jan, On 12/06/2017 12:58 PM, Jan Beulich wrote: On 06.12.17 at 12:47, wrote: On 12/06/2017 11:45 AM, Jan Beulich wrote: On 06.12.17 at 10:47, wrote: I guess I have been CCed because you woul

Re: [Xen-devel] [PATCH] simplify xenmem_add_to_physmap_batch()

2017-12-06 Thread Jan Beulich
>>> On 06.12.17 at 17:40, wrote: > On 06/12/17 16:21, Jan Beulich wrote: >> There's no need for >> - advancing the handles and at the same time using >> __copy_{from,to}_guest_offset(), >> - an "out" label, >> - local variables "done" and (function scope) "rc". >> >> Signed-off-by: Jan Beulich

Re: [Xen-devel] [PATCH] x86/HVM: make explicit that hvm_print_line() does output only

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:27, Jan Beulich wrote: > On input "c" being 0xff should already have the effect of bailing early > (due to the isprint()), but let's rather make this explicit. Also > convert the BUG_ON() to an ASSERT() (nothing fatal happens in the > function if this is violated), at the same time e

Re: [Xen-devel] [PATCH v2 07/13] iommu: Make decision about needing IOMMU for hardware domains in advance

2017-12-06 Thread Jan Beulich
>>> On 25.07.17 at 19:26, wrote: > From: Oleksandr Tyshchenko > > The hardware domains require IOMMU to be used in the most cases and > a decision to use it is made at hardware domain construction time. > But, it is not the best moment for the non-shared IOMMUs due to > the necessity of retrievi

Re: [Xen-devel] [PATCH] VMX: drop bogus gpa parameter from __invept()

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:28, Jan Beulich wrote: > Perhaps there once was a plan to have a flush type requiring this, but > the current SDM has no mention of such and all callers pass zero anyway. > > Take the opportunity and also change involved types to uint64_t. > > Signed-off-by: Jan Beulich Reviewed-by

Re: [Xen-devel] [PATCH v2 06/13] iommu: Add extra use_iommu argument to iommu_domain_init()

2017-12-06 Thread Jan Beulich
>>> On 25.07.17 at 19:26, wrote: > The presence of this flag lets us know that the guest domain has statically > assigned devices which will most likely be used for passthrough > and as the result the IOMMU is expected to be used for this domain. > > Taking into the account this hint when dealing

Re: [Xen-devel] [PATCH] simplify xenmem_add_to_physmap_batch()

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:21, Jan Beulich wrote: > There's no need for > - advancing the handles and at the same time using > __copy_{from,to}_guest_offset(), > - an "out" label, > - local variables "done" and (function scope) "rc". > > Signed-off-by: Jan Beulich These changes do mean that start is no lon

Re: [Xen-devel] [PATCH] xenmem_add_to_physmap_one() has no need to know of XENMAPSPACE_gmfn_range

2017-12-06 Thread Jan Beulich
>>> On 06.12.17 at 17:32, wrote: > On 06/12/17 16:21, Jan Beulich wrote: >> As its name says, it handles a single GMFN only anyway. Note that ARM >> needs no adjustment, as it doesn't handle the two types at all. >> >> Also take the opportunity and clean up the handling of XENMAPSPACE_gmfn >> a li

Re: [Xen-devel] [PATCH 2/2] xen/pvcalls: Fix a check in pvcalls_front_remove()

2017-12-06 Thread Boris Ostrovsky
On 12/05/2017 01:29 PM, Stefano Stabellini wrote: > On Tue, 5 Dec 2017, Dan Carpenter wrote: >> bedata->ref can't be less than zero because it's unsigned. This affects >> certain error paths in probe. We first set ->ref = -1 and then we set >> it to a valid value later. >> >> Fixes: 219681909913

Re: [Xen-devel] [PATCH] xenmem_add_to_physmap_one() has no need to know of XENMAPSPACE_gmfn_range

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:21, Jan Beulich wrote: > As its name says, it handles a single GMFN only anyway. Note that ARM > needs no adjustment, as it doesn't handle the two types at all. > > Also take the opportunity and clean up the handling of XENMAPSPACE_gmfn > a little: There's no point in going through "

Re: [Xen-devel] [PATCH] xen/pvcalls: check for xenbus_read() errors

2017-12-06 Thread Boris Ostrovsky
On 12/05/2017 01:26 PM, Stefano Stabellini wrote: > On Tue, 5 Dec 2017, Dan Carpenter wrote: >> Smatch complains that "len" is uninitialized if xenbus_read() fails so >> let's add some error handling. >> >> Signed-off-by: Dan Carpenter > Reviewed-by: Stefano Stabellini Applied to for-linus-4.15.

[Xen-devel] [PATCH 2/2] x86: rename DIRTY_GS_BASE_USER

2017-12-06 Thread Jan Beulich
As of commit 91f85280b9 ("x86: fix GS-base-dirty determination") the USER part of it isn't really appropriate anymore. Signed-off-by: Jan Beulich --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -1276,7 +1276,7 @@ static DEFINE_PER_CPU(unsigned int, dirt #define DIRTY_FS 0x0

[Xen-devel] [PATCH 1/2] x86: improve MSR_SHADOW_GS accesses

2017-12-06 Thread Jan Beulich
Instead of using RDMSR/WRMSR, on fsgsbase-capable systems use a double SWAPGS combined with RDGSBASE/WRGSBASE. This halves execution time for a shadow GS update alone on my Haswell (and we have indications of good performance improvements by this on Skylake too), while the win is even higher when e

Re: [Xen-devel] [PATCH] mm: don't use domain_shutdown() when re-offlining a page

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:20, Jan Beulich wrote: > It goes all silent, leaving open what has actually caused the crash. > Use domain_crash() instead, which leaves a log message before calling > domain_shutdown(..., SHUTDOWN_crash). > > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper ___

Re: [Xen-devel] [PATCH] pdx: correct indentation

2017-12-06 Thread Andrew Cooper
On 06/12/17 16:19, Jan Beulich wrote: > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH 0/2] x86: further GS base handling changes

2017-12-06 Thread Jan Beulich
1: improve MSR_SHADOW_GS accesses 2: rename DIRTY_GS_BASE_USER Signed-off-by: Jan Beulich ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH] VMX: drop bogus gpa parameter from __invept()

2017-12-06 Thread Jan Beulich
Perhaps there once was a plan to have a flush type requiring this, but the current SDM has no mention of such and all callers pass zero anyway. Take the opportunity and also change involved types to uint64_t. Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx

[Xen-devel] [PATCH] x86/HVM: make explicit that hvm_print_line() does output only

2017-12-06 Thread Jan Beulich
On input "c" being 0xff should already have the effect of bailing early (due to the isprint()), but let's rather make this explicit. Also convert the BUG_ON() to an ASSERT() (nothing fatal happens in the function if this is violated), at the same time extending what is being checked. Signed-off-by

Re: [Xen-devel] [RFC Patch v4 2/8] ioreq: bump the number of IOREQ page to 4 pages

2017-12-06 Thread Paul Durrant
> -Original Message- > From: Chao Gao [mailto:chao@intel.com] > Sent: 06 December 2017 09:02 > To: Paul Durrant > Cc: xen-de...@lists.xen.org; Tim (Xen.org) ; Stefano > Stabellini ; Konrad Rzeszutek Wilk > ; Jan Beulich ; George > Dunlap ; Andrew Cooper > ; Wei Liu ; Ian Jackson > > S

[Xen-devel] [PATCH] simplify xenmem_add_to_physmap_batch()

2017-12-06 Thread Jan Beulich
There's no need for - advancing the handles and at the same time using __copy_{from,to}_guest_offset(), - an "out" label, - local variables "done" and (function scope) "rc". Signed-off-by: Jan Beulich --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -820,65 +820,37 @@ static int xenmem_a

[Xen-devel] [PATCH] xenmem_add_to_physmap_one() has no need to know of XENMAPSPACE_gmfn_range

2017-12-06 Thread Jan Beulich
As its name says, it handles a single GMFN only anyway. Note that ARM needs no adjustment, as it doesn't handle the two types at all. Also take the opportunity and clean up the handling of XENMAPSPACE_gmfn a little: There's no point in going through "idx" when capturing the MFN. Signed-off-by: Ja

[Xen-devel] [PATCH] mm: don't use domain_shutdown() when re-offlining a page

2017-12-06 Thread Jan Beulich
It goes all silent, leaving open what has actually caused the crash. Use domain_crash() instead, which leaves a log message before calling domain_shutdown(..., SHUTDOWN_crash). Signed-off-by: Jan Beulich --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -1546,7 +1546,7 @@ int offlin

[Xen-devel] [PATCH] pdx: correct indentation

2017-12-06 Thread Jan Beulich
Signed-off-by: Jan Beulich --- a/xen/common/pdx.c +++ b/xen/common/pdx.c @@ -42,19 +42,20 @@ bool __mfn_valid(unsigned long mfn) /* Sets all bits from the most-significant 1-bit down to the LSB */ static u64 __init fill_mask(u64 mask) { -while (mask & (mask + 1)) -mask

[Xen-devel] [PATCH] PCI/passthrough: don't discard Dom0 provided information

2017-12-06 Thread Jan Beulich
Instead of giving, to subsequent code, the appearance of there not having been any "info" data provided, adjust the conditional guarding SR-IOV handling. Signed-off-by: Jan Beulich --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -629,10 +629,7 @@ int pci_add_device(u16

[Xen-devel] [PATCH] x86/Intel: drop another 32-bit leftover

2017-12-06 Thread Jan Beulich
None of the models MISC_ENABLE MSR access is excluded for support 64-bit mode - drop the conditional from early_init_intel(). Also convert pointless rdmsr_safe() elsewhere to rdmsrl(). Signed-off-by: Jan Beulich --- a/xen/arch/x86/cpu/intel.c +++ b/xen/arch/x86/cpu/intel.c @@ -285,31 +285,29 @@

Re: [Xen-devel] [RFC Patch v4 2/8] ioreq: bump the number of IOREQ page to 4 pages

2017-12-06 Thread Chao Gao
On Wed, Dec 06, 2017 at 03:04:11PM +, Paul Durrant wrote: >> -Original Message- >> From: Chao Gao [mailto:chao@intel.com] >> Sent: 06 December 2017 07:50 >> To: xen-de...@lists.xen.org >> Cc: Chao Gao ; Paul Durrant >> ; Tim (Xen.org) ; Stefano Stabellini >> ; Konrad Rzeszutek Wilk

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

2017-12-06 Thread osstest service owner
flight 116876 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/116876/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-qemuu-debianhvm-amd64-xsm 7 xen-boot fail REGR. vs. 115643 test-amd64-am

Re: [Xen-devel] [PATCH] domctl: improve locking during domain destruction

2017-12-06 Thread Andrew Cooper
On 06/12/17 15:31, Jan Beulich wrote: > There is no need to hold the global domctl lock across domain_kill() - > the domain lock is fully sufficient here, and parallel cleanup after > multiple domains performs quite a bit better this way. > > Signed-off-by: Jan Beulich This is clearer.  Reviewed-

Re: [Xen-devel] [RFC Patch v4 1/8] ioreq: remove most 'buf' parameter from static functions

2017-12-06 Thread Chao Gao
On Wed, Dec 06, 2017 at 02:44:52PM +, Paul Durrant wrote: >> -Original Message- >> From: Chao Gao [mailto:chao@intel.com] >> Sent: 06 December 2017 07:50 >> To: xen-de...@lists.xen.org >> Cc: Chao Gao ; Andrew Cooper >> ; Jan Beulich ; Paul >> Durrant >> Subject: [RFC Patch v4 1/8]

[Xen-devel] [PATCH] domctl: improve locking during domain destruction

2017-12-06 Thread Jan Beulich
There is no need to hold the global domctl lock across domain_kill() - the domain lock is fully sufficient here, and parallel cleanup after multiple domains performs quite a bit better this way. Signed-off-by: Jan Beulich --- Changes since RFC: Comment added. --- Obviously other domctl-s could be

[Xen-devel] [linux-3.18 test] 116890: regressions - FAIL

2017-12-06 Thread osstest service owner
flight 116890 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/116890/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-xsm broken in 116862 build-armhf-xsm 5 h

Re: [Xen-devel] [PATCH] x86/HVM: don't retain emulated insn cache when exiting back to guest

2017-12-06 Thread Andrew Cooper
On 06/12/17 13:04, Julien Grall wrote: > Hi Jan, > > On 12/06/2017 12:58 PM, Jan Beulich wrote: > On 06.12.17 at 12:47, wrote: >>> On 12/06/2017 11:45 AM, Jan Beulich wrote: >>> On 06.12.17 at 10:47, wrote: > I guess I have been CCed because you would like this patch is > fixing t

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
On 12/06/2017 03:24 PM, George Dunlap wrote: On 12/06/2017 03:19 PM, Julien Grall wrote: Hi Konrad, On 12/06/2017 03:10 PM, Konrad Rzeszutek Wilk wrote: .snip.. The suggested policy is based on the KVM one: - If we trap a S/W instructions, we enable VM trapping (e.g HCR_EL2.TVM) to det

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread George Dunlap
On 12/06/2017 03:19 PM, Julien Grall wrote: > Hi Konrad, > > On 12/06/2017 03:10 PM, Konrad Rzeszutek Wilk wrote: >> .snip.. >>> The suggested policy is based on the KVM one: >>> - If we trap a S/W instructions, we enable VM trapping (e.g >>> HCR_EL2.TVM) to >>> detect cache being turned on/of

Re: [Xen-devel] [RFC Patch v4 2/8] ioreq: bump the number of IOREQ page to 4 pages

2017-12-06 Thread Paul Durrant
> -Original Message- > From: Chao Gao [mailto:chao@intel.com] > Sent: 06 December 2017 07:50 > To: xen-de...@lists.xen.org > Cc: Chao Gao ; Paul Durrant > ; Tim (Xen.org) ; Stefano Stabellini > ; Konrad Rzeszutek Wilk > ; Jan Beulich ; George > Dunlap ; Andrew Cooper > ; Wei Liu ; Ian J

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
Hi Konrad, On 12/06/2017 03:10 PM, Konrad Rzeszutek Wilk wrote: .snip.. The suggested policy is based on the KVM one: - If we trap a S/W instructions, we enable VM trapping (e.g HCR_EL2.TVM) to detect cache being turned on/off, and do a full clean. - We flush the caches on both

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Jan Beulich
>>> On 06.12.17 at 13:58, wrote: > On 12/06/2017 12:28 PM, George Dunlap wrote: >> 2. It sounds like rather than using PoD, you could use the >> "misconfigured p2m table" technique that x86 uses: set bits in the p2m >> entry which cause a specific kind of HAP fault when accessed. The fault >> han

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Konrad Rzeszutek Wilk
.snip.. > The suggested policy is based on the KVM one: > - If we trap a S/W instructions, we enable VM trapping (e.g > HCR_EL2.TVM) to > detect cache being turned on/off, and do a full clean. > - We flush the caches on both caches being turned on and off. > - Once the caches are

Re: [Xen-devel] [RFC Patch v4 1/8] ioreq: remove most 'buf' parameter from static functions

2017-12-06 Thread Paul Durrant
> -Original Message- > From: Chao Gao [mailto:chao@intel.com] > Sent: 06 December 2017 07:50 > To: xen-de...@lists.xen.org > Cc: Chao Gao ; Andrew Cooper > ; Jan Beulich ; Paul > Durrant > Subject: [RFC Patch v4 1/8] ioreq: remove most 'buf' parameter from static > functions > > It is

[Xen-devel] [PATCH] xen/arm: gic-v3: Bail out if gicv3_cpu_init fail

2017-12-06 Thread Julien Grall
From: Julien Grall When system registers are not enabled, all the access to them will trap in EL2. In Xen, system registers will be enabled by gicv3_cpu_init only on success. As the rest of the code (e.g gicv3_hyp_init) relies on system register, it is better to bail out directly. This will save

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

2017-12-06 Thread osstest service owner
flight 116916 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/116916/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 13 migrate-support-checkfail never pass test-armhf-armhf-xl 1

Re: [Xen-devel] [PATCH] x86/HVM: don't retain emulated insn cache when exiting back to guest

2017-12-06 Thread Julien Grall
Hi Jan, On 12/06/2017 12:58 PM, Jan Beulich wrote: On 06.12.17 at 12:47, wrote: On 12/06/2017 11:45 AM, Jan Beulich wrote: On 06.12.17 at 10:47, wrote: I guess I have been CCed because you would like this patch is fixing the regression you mentioned on IRC? Yes, but first of all we need t

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
On 12/06/2017 12:58 PM, Julien Grall wrote: Hi George, On 12/06/2017 12:28 PM, George Dunlap wrote: On 12/05/2017 06:39 PM, Julien Grall wrote: Hi all, Even though it is an Arm failure, I have CCed x86 folks to get feedback on the approach. I have a WIP branch I could share if that interest

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
Hi George, On 12/06/2017 12:28 PM, George Dunlap wrote: On 12/05/2017 06:39 PM, Julien Grall wrote: Hi all, Even though it is an Arm failure, I have CCed x86 folks to get feedback on the approach. I have a WIP branch I could share if that interest people. Few months ago, we noticed an heisenb

Re: [Xen-devel] [PATCH] x86/HVM: don't retain emulated insn cache when exiting back to guest

2017-12-06 Thread Jan Beulich
>>> On 06.12.17 at 12:47, wrote: > On 12/06/2017 11:45 AM, Jan Beulich wrote: > On 06.12.17 at 10:47, wrote: >>> I guess I have been CCed because you would like this patch is fixing the >>> regression you mentioned on IRC? >> >> Yes, but first of all we need to see whether the issue goes awa

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread George Dunlap
On 12/05/2017 06:39 PM, Julien Grall wrote: > Hi all, > > Even though it is an Arm failure, I have CCed x86 folks to get feedback > on the approach. I have a WIP branch I could share if that interest people. > > Few months ago, we noticed an heisenbug on jobs run by osstest on the > cubietrucks (

Re: [Xen-devel] [PATCH for-next 07/16] xen/arm: Introduce copy_to_guest_phys_flush_dcache

2017-12-06 Thread Julien Grall
Hi Stefano, On 12/06/2017 01:26 AM, Stefano Stabellini wrote: On Thu, 23 Nov 2017, Julien Grall wrote: Hi Andrew, On 23/11/17 18:49, Andrew Cooper wrote: On 23/11/17 18:32, Julien Grall wrote: This new function will be used in a follow-up patch to copy data to the guest using the IPA (aka gu

Re: [Xen-devel] [PATCH for-next 06/16] xen/arm: Extend copy_to_guest to support copying from/to guest physical address

2017-12-06 Thread Julien Grall
Hi Stefano, On 12/06/2017 01:22 AM, Stefano Stabellini wrote: On Thu, 23 Nov 2017, Julien Grall wrote: The only differences between copy_to_guest and access_guest_memory_by_ipa are: - The latter does not support copying data crossing page boundary - The former is copying from/to guest

Re: [Xen-devel] [PATCH] arm64/xen: Add missing #address-cells and #size-cells properties

2017-12-06 Thread Daniel Kiper
On Thu, Nov 30, 2017 at 10:22:57PM +0100, Daniel Kiper wrote: [...] > Understood! I will apply this patch next week. Pushed! Thanks, Daniel ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-d

Re: [Xen-devel] [RFC] xen/arm: Handling cache maintenance instructions by set/way

2017-12-06 Thread Julien Grall
Hi Jan, On 12/06/2017 09:15 AM, Jan Beulich wrote: On 05.12.17 at 19:39, wrote: The suggested policy is based on the KVM one: - If we trap a S/W instructions, we enable VM trapping (e.g HCR_EL2.TVM) to detect cache being turned on/off, and do a full clean. - We flush the caches

[Xen-devel] [xen-unstable-coverity test] 116909: all pass - PUSHED

2017-12-06 Thread osstest service owner
flight 116909 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/116909/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen 289adc1c56562d88e50b04245cd2027df8813bf4 baseline version: xen 4cd0

Re: [Xen-devel] [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH

2017-12-06 Thread Juergen Gross
On 06/12/17 12:50, Julien Grall wrote: > Hi, > > On 12/06/2017 11:47 AM, Roger Pau Monné wrote: >> On Wed, Dec 06, 2017 at 12:22:00PM +0100, Juergen Gross wrote: >>> On 06/12/17 10:53, Julien Grall wrote: Hi Juergen, On 12/05/2017 04:19 PM, Juergen Gross wrote: > On 05/12/17 16:

Re: [Xen-devel] [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH

2017-12-06 Thread Julien Grall
Hi, On 12/06/2017 11:47 AM, Roger Pau Monné wrote: On Wed, Dec 06, 2017 at 12:22:00PM +0100, Juergen Gross wrote: On 06/12/17 10:53, Julien Grall wrote: Hi Juergen, On 12/05/2017 04:19 PM, Juergen Gross wrote: On 05/12/17 16:23, Julien Grall wrote: Hi Juergen, On 04/12/17 15:49, Juergen Gr

Re: [Xen-devel] [for-4.10] Re: [PATCH v2] tools/libxl: mark special pages as reserved in e820 map for PVH

2017-12-06 Thread Roger Pau Monné
On Wed, Dec 06, 2017 at 12:22:00PM +0100, Juergen Gross wrote: > On 06/12/17 10:53, Julien Grall wrote: > > Hi Juergen, > > > > On 12/05/2017 04:19 PM, Juergen Gross wrote: > >> On 05/12/17 16:23, Julien Grall wrote: > >>> Hi Juergen, > >>> > >>> On 04/12/17 15:49, Juergen Gross wrote: > On 2

Re: [Xen-devel] [PATCH] x86/HVM: don't retain emulated insn cache when exiting back to guest

2017-12-06 Thread Julien Grall
On 12/06/2017 11:45 AM, Jan Beulich wrote: On 06.12.17 at 10:47, wrote: I guess I have been CCed because you would like this patch is fixing the regression you mentioned on IRC? Yes, but first of all we need to see whether the issue goes away in master once the patch is in. Would revertin

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

2017-12-06 Thread Julien Grall
On 11/15/2017 04:46 PM, Julien Grall wrote: > Hi, > > On 11/15/2017 11:29 AM, osstest service owner wrote: >> flight 116178 xen-unstable real [real] >> http://logs.test-lab.xenproject.org/osstest/logs/116178/ >> >> Regressions :-( >> >> Tests which did not succeed and are blocking, >> including

Re: [Xen-devel] [PATCH] x86/HVM: don't retain emulated insn cache when exiting back to guest

2017-12-06 Thread Jan Beulich
>>> On 06.12.17 at 10:47, wrote: > I guess I have been CCed because you would like this patch is fixing the > regression you mentioned on IRC? Yes, but first of all we need to see whether the issue goes away in master once the patch is in. Jan ___ X

Re: [Xen-devel] [RFC PATCH 04/31] cpufreq: make turbo settings to be configurable

2017-12-06 Thread Oleksandr Tyshchenko
Hi, Stefano. On Tue, Dec 5, 2017 at 9:24 PM, Stefano Stabellini wrote: > On Tue, 5 Dec 2017, Oleksandr Tyshchenko wrote: >> >> Another question is second_max_freq. As I understand, it is highest >> >> non-turbo frequency calculated by framework to limit target frequency >> >> when >> >> turbo mod

  1   2   >