Re: [Xen-devel] [PATCH v2] automation: enable building rombios with clang

2018-08-26 Thread Wei Liu
On Sat, Aug 25, 2018 at 10:01:38PM -0500, Doug Goldstein wrote: > On Fri, Aug 24, 2018 at 04:34:35PM +0100, Wei Liu wrote: > > On Fri, Aug 24, 2018 at 10:32:24AM -0500, Doug Goldstein wrote: > > > On Fri, Aug 24, 2018 at 04:22:47PM +0100, Wei Liu wrote: > > > > Previously it is disabled because the

Re: [Xen-devel] [PATCH] mm, oom: distinguish blockable mode for mmu notifiers

2018-08-26 Thread Tetsuo Handa
On 2018/08/24 22:52, Michal Hocko wrote: > @@ -180,11 +180,15 @@ void amdgpu_mn_unlock(struct amdgpu_mn *mn) > */ > static int amdgpu_mn_read_lock(struct amdgpu_mn *amn, bool blockable) > { > - if (blockable) > - mutex_lock(&amn->read_lock); > - else if (!mutex_trylock(&amn-

Re: [Xen-devel] [PATCH v2 2/2] x86/pae: use 64 bit atomic xchg function in native_ptep_get_and_clear

2018-08-26 Thread Thomas Gleixner
On Tue, 21 Aug 2018, Juergen Gross wrote: > Using only 32-bit writes for the pte will result in an intermediate > L1TF vulnerable PTE. When running as a Xen PV guest this will at once > switch the guest to shadow mode resulting in a loss of performance. > > Use arch_atomic64_xchg() instead which

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

2018-08-26 Thread osstest service owner
flight 126689 xen-unstable-coverity real [real] http://logs.test-lab.xenproject.org/osstest/logs/126689/ Perfect :-) All tests in this flight passed as required version targeted for testing: xen a923919797c39d51ea0b808ea691bed20fe8e072 baseline version: xen 1385

[Xen-devel] [linux-3.18 bisection] complete test-amd64-i386-freebsd10-amd64

2018-08-26 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-i386-freebsd10-amd64 testid guest-start 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: qemu git://xenbits.xen.org/qemu-xen-tradit

[Xen-devel] [xen-4.10-testing baseline-only test] 75124: regressions - FAIL

2018-08-26 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 75124 xen-4.10-testing real [real] http://osstest.xensource.com/osstest/logs/75124/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-win7-amd64 15 guest-saveresto

Re: [Xen-devel] [PATCH 25/34] x86/mm/shadow: make it build with !CONFIG_HVM

2018-08-26 Thread Wei Liu
On Tue, Aug 21, 2018 at 02:27:40AM -0600, Jan Beulich wrote: > > > --- a/xen/arch/x86/mm/shadow/multi.c > > +++ b/xen/arch/x86/mm/shadow/multi.c > > @@ -2926,18 +2926,25 @@ static int sh_page_fault(struct vcpu *v, > > } > > else > > { > > +#if CONFIG_HVM > >

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

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

[Xen-devel] [PATCH v2 04/23] x86/hvm: provide hvm_hap_supported

2018-08-26 Thread Wei Liu
And replace direct accesses in non-HVM subsystems to hvm_funcs.hap_supported with the new function, to avoid accessing an internal data structure of another subsystem directly. Signed-off-by: Wei Liu --- xen/arch/x86/cpuid.c | 2 +- xen/arch/x86/domain.c | 2 +- xen/arch/x86/set

[Xen-devel] [PATCH v2 02/23] xen: is_hvm_{domain, vcpu} should evaluate to false when !CONFIG_HVM

2018-08-26 Thread Wei Liu
Turn them into static inline functions which evaluate to false when CONFIG_HVM is not set. ARM won't be broken because ARM guests are set to PV type in the hypervisor. But ARM has plan to switch to HVM guest type inside the hypervisor, so preemptively introduce CONFIG_HVM for ARM here. Signed-off

[Xen-devel] [PATCH v2 01/23] x86: change name of parameter for various invlpg functions

2018-08-26 Thread Wei Liu
They all incorrectly named a parameter virtual address while it should have been linear address. Requested-by: Andrew Cooper Signed-off-by: Wei Liu --- xen/arch/x86/hvm/svm/svm.c | 14 +++--- xen/arch/x86/hvm/vmx/vmx.c | 12 ++-- xen/arch/x86/mm.c

[Xen-devel] [PATCH v2 03/23] x86: enclose hvm_op and dm_op in CONFIG_HVM in relevant tables

2018-08-26 Thread Wei Liu
PV guest (Dom0) needs to able to use these two hypercalls in order to serve HVM guests. But if xen doesn't support HVM at all there is no point in exposing them to PV guests. Signed-off-by: Wei Liu --- v2: 1. Merge two CONFIG_HVMs together 2. Also change args table --- xen/arch/x86/hypercall.c

[Xen-devel] [PATCH v2 07/23] x86/vpmu: put HVM only code under CONFIG_HVM

2018-08-26 Thread Wei Liu
Change u32 to uint32_t while at it. Signed-off-by: Wei Liu --- xen/arch/x86/cpu/vpmu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index b978e05..fa6762f 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpm

[Xen-devel] [PATCH v2 06/23] x86: don't call vpci function in physdev_op when !CONFIG_HAS_VPCI

2018-08-26 Thread Wei Liu
Signed-off-by: Wei Liu --- xen/arch/x86/physdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c index b87ec90..af7fd84 100644 --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -557,6 +557,7 @@ ret_t do_physdev_op(int cmd, XEN_GUES

[Xen-devel] [PATCH v2 00/23] Make CONFIG_HVM work

2018-08-26 Thread Wei Liu
This series goes through x86 code to make CONFIG_HVM work. With this series, it is possible to build Xen with PV support only. Running `xl info` on a host with PV only Xen: root@lcy2-dt108:~# xl info host : lcy2-dt108 release: 4.17.0-0.bpo.1-amd64 version

[Xen-devel] [PATCH v2 08/23] xen/pt: io.c contains HVM only code

2018-08-26 Thread Wei Liu
We also need to make it x86 only because ARM also defines CONFIG_HVM. Signed-off-by: Wei Liu --- v2: use x86-y list --- xen/drivers/passthrough/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/Makefile b/xen/drivers/passthrough/Makefile inde

[Xen-devel] [PATCH v2 05/23] x86: provide stub for memory_type_changed

2018-08-26 Thread Wei Liu
Jan indicated that for PV guests the memory type is not changed, for HVM guests memory_type_changed is needed for EPT's effective memory type calculation. This means memory_type_changed is HVM only. Provide a stub to minimise code churn. Signed-off-by: Wei Liu --- xen/include/asm-x86/mtrr.h |

[Xen-devel] [PATCH v2 09/23] x86/pt: make it build with !CONFIG_HVM

2018-08-26 Thread Wei Liu
This requires providing stubs for a few functions which are part of HVM code. Signed-off-by: Wei Liu --- xen/include/asm-x86/hvm/io.h | 5 + xen/include/asm-x86/hvm/vmx/vmx.h | 5 + 2 files changed, 10 insertions(+) diff --git a/xen/include/asm-x86/hvm/io.h b/xen/include/asm-x86/hv

[Xen-devel] [PATCH v2 13/23] x86: provide stubs, declarations and macros in hvm.h

2018-08-26 Thread Wei Liu
Make sure hvm_enabled evaluate to false then provide necessary stubs, declarations and macros to make Xen build. The is_viridian_domain macro can't be turned into an inline function easily, so instead its caller is modified to avoid unused variable warning. Signed-off-by: Wei Liu --- xen/arch/x

[Xen-devel] [PATCH v2 18/23] x86/domctl: XEN_DOMCTL_debug_op is HVM only

2018-08-26 Thread Wei Liu
Signed-off-by: Wei Liu --- xen/arch/x86/domctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index ab85489..6f1c43e 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -975,6 +975,7 @@ long arch_do_domctl( d->arch.supp

[Xen-devel] [PATCH v2 17/23] x86/mm: put paging_update_nestedmode under CONFIG_HVM

2018-08-26 Thread Wei Liu
Nested HVM is not enabled when !CONFIG_HVM. Signed-off-by: Wei Liu --- xen/arch/x86/mm/paging.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c index dcee496..7f460bd 100644 --- a/xen/arch/x86/mm/paging.c +++ b/xen/arch/x86/mm/paging.c @@

[Xen-devel] [PATCH v2 14/23] x86/mm: put nested p2m code under CONFIG_HVM

2018-08-26 Thread Wei Liu
These functions are only useful for nested hvm, which isn't enabled when CONFIG_HVM is false. Enclose relevant code in CONFIG_HVM. Guard np2m_schedule with nestedhvm_enabled. Signed-off-by: Wei Liu --- xen/arch/x86/domain.c | 6 -- xen/arch/x86/mm/p2m.c | 6 ++ 2 files changed, 10 inser

[Xen-devel] [PATCH v2 15/23] x86/mm: put HVM only code under CONFIG_HVM

2018-08-26 Thread Wei Liu
Going through the code, HAP, EPT, PoD and ALTP2M depend on HVM code. Put these components under CONFIG_HVM. This further requires putting one of the vm event under CONFIG_HVM. Also make hap_enabled evaluate to false when !CONFIG_HVM. This in turn requires marking a variable in p2m_set_entry as __m

[Xen-devel] [PATCH v2 11/23] x86: XENMEM_resource_ioreq_server is HVM only

2018-08-26 Thread Wei Liu
Put the entire case branch under CONFIG_HVM. Nonetheless check HVM before trying to get ioreq server. Signed-off-by: Wei Liu --- v2: put entire case branch under CONFIG_HVM --- xen/arch/x86/mm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c inde

[Xen-devel] [PATCH v2 19/23] x86: PIT emulation is common to both PV and HVM

2018-08-26 Thread Wei Liu
Move the file to x86 common code and change its name to emul-i8254.c. Put HVM only code under CONFIG_HVM or is_hvm_domain. Signed-off-by: Wei Liu --- v2: move the whole file. --- xen/arch/x86/Makefile | 1 +- xen/arch/x86/emul-i8254.c | 609 +++- xen/ar

[Xen-devel] [PATCH v2 23/23] xen: decouple HVM and IOMMU capabilities

2018-08-26 Thread Wei Liu
HVM and IOMMU are two distinct hardware features, yet they were bundled together in sysctl and xl's output. Decouple them on sysctl level. On toolstack level we still need to maintain a sensible semantics for `xl info`. Massage the information according to the following table: pv hvm iom

[Xen-devel] [PATCH v2 12/23] x86: monitor.o is currently HVM only

2018-08-26 Thread Wei Liu
There has been plan to make PV work, but it is not yet there. Provide stubs to make it build with !CONFIG_HVM. Signed-off-by: Wei Liu --- xen/arch/x86/Makefile | 2 +- xen/include/asm-x86/monitor.h | 14 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/xen/

[Xen-devel] [PATCH v2 16/23] x86/p2m/pod: make it build with !CONFIG_HVM

2018-08-26 Thread Wei Liu
Populate-on-demand is HVM only. Provide a bunch of stubs for common p2m code and guard one invocation of guest_physmap_mark_populate_on_demand with is_hvm_domain. Signed-off-by: Wei Liu --- xen/common/memory.c | 3 ++- xen/include/asm-x86/p2m.h | 40 ---

[Xen-devel] [PATCH v2 21/23] x86: expose CONFIG_HVM

2018-08-26 Thread Wei Liu
Signed-off-by: Wei Liu --- v2: use tab to indent Haven't added a dependency on PV_SHIM_EXCLUSIVE because agreement is not yet reached. --- xen/arch/x86/Kconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 73ab8f8..11637e1 100644 ---

[Xen-devel] [PATCH v2 22/23] x86/pvshim: disable HVM for PV shim

2018-08-26 Thread Wei Liu
Signed-off-by: Wei Liu Reviewed-by: Roger Pau Monné --- tools/firmware/xen-dir/shim.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware/xen-dir/shim.config b/tools/firmware/xen-dir/shim.config index 21d7075..de53dfe 100644 --- a/tools/firmware/xen-dir/shim.

[Xen-devel] [PATCH v2 20/23] xen: connect guest creation with CONFIG_{HVM, PV}

2018-08-26 Thread Wei Liu
Signed-off-by: Wei Liu --- xen/common/domain.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index 171d25e..73b5485 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -318,9 +318,23 @@ struct domain *domain_create(domid_t

[Xen-devel] [PATCH v2 10/23] x86/pt: split out HVM functions from vtd.c

2018-08-26 Thread Wei Liu
Functions are moved to hvm.c. Reorder makefile items while at it. Signed-off-by: Wei Liu --- v2: reduce and sort inlcudes --- xen/drivers/passthrough/vtd/x86/Makefile | 3 +- xen/drivers/passthrough/vtd/x86/hvm.c| 67 +- xen/drivers/passthrough/vtd/x86/vtd.c| 45

[Xen-devel] [xen-4.9-testing test] 126600: regressions - FAIL

2018-08-26 Thread osstest service owner
flight 126600 xen-4.9-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/126600/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-ws16-amd64 17 guest-stopfail REGR. vs. 124248 test-amd64-amd6

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

2018-08-26 Thread osstest service owner
flight 126583 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/126583/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-rumprun-i386 12 guest-start fail REGR. vs. 126042 test-amd64-i386-xl-x

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

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

[Xen-devel] [xen-4.7-testing test] 126604: regressions - FAIL

2018-08-26 Thread osstest service owner
flight 126604 xen-4.7-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/126604/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-libvirt-pair 22 guest-migrate/src_host/dst_host fail REGR. vs. 125057 test-am

Re: [Xen-devel] [PATCH v2 12/23] x86: monitor.o is currently HVM only

2018-08-26 Thread Razvan Cojocaru
On 8/26/18 3:19 PM, Wei Liu wrote: > There has been plan to make PV work, but it is not yet there. Provide > stubs to make it build with !CONFIG_HVM. > > Signed-off-by: Wei Liu > --- > xen/arch/x86/Makefile | 2 +- > xen/include/asm-x86/monitor.h | 14 ++ > 2 files changed,

Re: [Xen-devel] [PATCH v2 15/23] x86/mm: put HVM only code under CONFIG_HVM

2018-08-26 Thread Razvan Cojocaru
On 8/26/18 3:19 PM, Wei Liu wrote: > Going through the code, HAP, EPT, PoD and ALTP2M depend on HVM code. > Put these components under CONFIG_HVM. This further requires putting > one of the vm event under CONFIG_HVM. > > Also make hap_enabled evaluate to false when !CONFIG_HVM. This in turn > requ

[Xen-devel] [linux-4.9 bisection] complete test-amd64-i386-freebsd10-i386

2018-08-26 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-i386-freebsd10-i386 testid guest-start 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: qemu git://xenbits.xen.org/qemu-xen-traditi

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

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

[Xen-devel] [linux-linus bisection] complete test-amd64-amd64-xl-qcow2

2018-08-26 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-amd64-xl-qcow2 testid xen-boot Tree: linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git T

[Xen-devel] [linux-4.14 test] 126635: tolerable FAIL - PUSHED

2018-08-26 Thread osstest service owner
flight 126635 linux-4.14 real [real] http://logs.test-lab.xenproject.org/osstest/logs/126635/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-xl-pvshim12 guest-start fail never pass test-amd64-i386-libvirt-xsm 13 migrat

[Xen-devel] [linux-3.18 bisection] complete test-amd64-amd64-xl-credit2

2018-08-26 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-amd64-xl-credit2 testid guest-start 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: qemu git://xenbits.xen.org/qemu-xen-traditiona

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

2018-08-26 Thread osstest service owner
flight 126639 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/126639/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 17 guest-stopfail like 126411 test-amd64-i386-xl-qemuu-win7-amd64

[Xen-devel] [xen-unstable baseline-only test] 75126: regressions - FAIL

2018-08-26 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 75126 xen-unstable real [real] http://osstest.xensource.com/osstest/logs/75126/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-freebsd10-amd64 22 leak-check/check

[Xen-devel] incompatible changes in staging break qemu

2018-08-26 Thread Olaf Hering
Since about two weeks, no released qemu can be built against xen.git#staging. The error looks like that: qemu-20180825T130857.235c82acca/include/hw/xen/xen_common.h:677:5: error: too many arguments to function 'xc_domain_create' It looks like staging lacks proper compat wrappers for released qe

Re: [Xen-devel] [PATCH v1 1/6] arm: add SMC wrapper that is compatible with SMCCC

2018-08-26 Thread Jan Beulich
>>> On 22.08.18 at 16:11, wrote: > Existing SMC wrapper call_smc() allows only 4 parameters and > returns only one value. This is enough for existing > use in PSCI code, but TEE mediator will need a call that is > fully compatible with ARM SMCCC. > This patch adds this call for both arm32 and arm6

Re: [Xen-devel] Ping: [PATCH v2] x86: assorted array_index_nospec() insertions

2018-08-26 Thread Jan Beulich
>>> On 23.08.18 at 10:40, wrote: >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 16 August 2018 09:03 >> To: Andrew Cooper >> Cc: Razvan Cojocaru ; Paul Durrant >> ; xen-devel ; >> Tamas K Lengyel >> Subject: Ping: [PATCH v2] x86: assorted array_index_nosp