Re: [Xen-devel] [Qemu-devel] [PATCH trivial] xen/Makefile.objs: simplify

2015-12-30 Thread Cao jin
On 12/29/2015 06:28 PM, Stefan Weil wrote: Am 29.12.2015 um 11:13 schrieb Cao jin: merge three lines into one line Signed-off-by: Cao jin --- hw/xen/Makefile.objs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/xen/Makefile.objs b/hw/xen/Makefile.objs index a9ad7

[Xen-devel] [PATCH trivial] xen/Makefile.objs: simplify

2015-12-30 Thread Cao jin
merge three lines into one line Signed-off-by: Cao jin --- hw/xen/Makefile.objs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/xen/Makefile.objs b/hw/xen/Makefile.objs index a9ad7e7..77806f0 100644 --- a/hw/xen/Makefile.objs +++ b/hw/xen/Makefile.objs @@ -1,6 +1,4 @@

[Xen-devel] [PATCH trivial v2] xen/Makefile.objs: simplify

2015-12-30 Thread Cao jin
merge last two lines, keep alphabetic order. Signed-off-by: Cao jin --- hw/xen/Makefile.objs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/xen/Makefile.objs b/hw/xen/Makefile.objs index a9ad7e7..d367094 100644 --- a/hw/xen/Makefile.objs +++ b/hw/xen/Makefile.objs @@ -2

[Xen-devel] [distros-debian-squeeze test] 38573: all pass

2015-12-30 Thread Platform Team regression test user
flight 38573 distros-debian-squeeze real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/38573/ Perfect :-) All tests in this flight passed baseline version: flight 38554 jobs: build-amd64 pass build-armhf

Re: [Xen-devel] [PATCH 1/4] x86/hvm: allow guest to use clflushopt and clwb

2015-12-30 Thread Andrew Cooper
On 30/12/2015 02:16, Haozhong Zhang wrote: On 12/30/15 09:35, Haozhong Zhang wrote: On 12/29/15 15:46, Andrew Cooper wrote: On 29/12/2015 11:31, Haozhong Zhang wrote: Pass CPU features CLFLUSHOPT and CLWB into HVM domain so that those two instructions can be used by guest. The specification o

Re: [Xen-devel] [PATCH 0/5] migration/remus: bug fix and cleanup

2015-12-30 Thread Andrew Cooper
On 30/12/2015 01:39, Wen Congyang wrote: Wen Congyang (5): remus: don't call stream_continue() when doing failover remus: don't write xenstore data if it fails tools/libxc: don't send end record if remus fails tools/libxl: remove unused function libxl__domain_save_device_model() A

Re: [Xen-devel] [PATCH 1/5] remus: don't call stream_continue() when doing failover

2015-12-30 Thread Andrew Cooper
On 30/12/2015 01:39, Wen Congyang wrote: stream_continue() is used for migration to read emulator xenstore data and emulator context. For remus, if we do failover, we have read it in the checkpoint cycle, and we only need to complete the stream. Signed-off-by: Wen Congyang Reviewed-by: Andrew

Re: [Xen-devel] [PATCH 2/5] remus: don't write xenstore data if it fails

2015-12-30 Thread Andrew Cooper
On 30/12/2015 01:39, Wen Congyang wrote: If what fails? Given the content of this patch in the context of the previous one, I presume you are wishing to avoid re-sending the emulator state after libxl__xc_domain_save_done() completes, but under what circumstances will this occur? Signed-of

Re: [Xen-devel] [PATCH 5/5] Allow all user to create a file under the directory /var/lib/xen

2015-12-30 Thread Andrew Cooper
On 30/12/2015 05:25, Wen Congyang wrote: On 12/30/2015 12:11 PM, Doug Goldstein wrote: On 12/29/15 8:39 PM, Wen Congyang wrote: We may use non-root user to run qemu, and the qemu needs to write save file to /var/lib/xen. So we should allow all user to create a file under the directory /var/lib/

Re: [Xen-devel] [PATCH 3/5] tools/libxc: don't send end record if remus fails

2015-12-30 Thread Andrew Cooper
On 30/12/2015 01:39, Wen Congyang wrote: Signed-off-by: Wen Congyang Reviewed-by: Andrew Cooper While looking at this code, what about error handling for the postcopy() callback just out of context? --- tools/libxc/xc_sr_save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[Xen-devel] [PATCH v2 1/2] x86/hvm: allow guest to use clflushopt and clwb

2015-12-30 Thread Haozhong Zhang
Pass CPU features CLFLUSHOPT and CLWB into HVM domain so that those two instructions can be used by guest. The specification of above two instructions can be found in https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf Signed-off-by: Haozhong Zhang --- tools/libxc/xc_cpu

[Xen-devel] [PATCH v2 2/2] x86/hvm: add support for pcommit instruction

2015-12-30 Thread Haozhong Zhang
Pass PCOMMIT CPU feature into HMV domain. Currently, we do not intercept pcommit instruction for L1 guest, and allow L1 to intercept pcommit instruction for L2 guest. The specification of pcommit instruction can be found in https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pd

[Xen-devel] [PATCH v2 0/2] add support for vNVDIMM - Part 1: enable instructions

2015-12-30 Thread Haozhong Zhang
I split the previous patch series "[PATCH 0/4] add support for vNVDIMM" into two parts. This is the first part that enables clflushopt/clwb/pcommit instructions for HVM guests. [The second part will be sent separately after v1 patches get reviewed.] Changes in v2: * Refactor modifications in hvm

Re: [Xen-devel] [PATCH v2 1/2] x86/hvm: allow guest to use clflushopt and clwb

2015-12-30 Thread Andrew Cooper
On 30/12/2015 11:48, Haozhong Zhang wrote: Pass CPU features CLFLUSHOPT and CLWB into HVM domain so that those two instructions can be used by guest. The specification of above two instructions can be found in https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf Signed-of

Re: [Xen-devel] [PATCH v2 2/2] x86/hvm: add support for pcommit instruction

2015-12-30 Thread Andrew Cooper
On 30/12/2015 11:48, Haozhong Zhang wrote: Pass PCOMMIT CPU feature into HMV domain. Currently, we do not intercept pcommit instruction for L1 guest, and allow L1 to intercept pcommit instruction for L2 guest. The specification of pcommit instruction can be found in https://software.intel.com/si

[Xen-devel] [XenGT][IGVT-g] Device model creation failed

2015-12-30 Thread Oleksii Kurochko
Hello! We are going to use XenGT on Intel Atom based board(VTC-1010, with 4GB RAM). For this purpose we use next repos: xen - https://github.com/01org/Igvtg-xen dom0 (ubuntu linux, 1024MB or 2048MB ) - https://github.com/01org/Igvtg-kernel domU (android-x86, rest memory excluding xen heap, xen, ab

[Xen-devel] [PATCH 31/34] xenbus: use __smp_XXX barriers

2015-12-30 Thread Michael S. Tsirkin
drivers/xen/xenbus/xenbus_comms.c uses full memory barriers to communicate with the other side. For guests compiled with CONFIG_SMP, smp_wmb and smp_mb would be sufficient, so mb() and wmb() here are only needed if a non-SMP guest runs on an SMP host. Switch to __smp_XXX barriers which serve this

[Xen-devel] [PATCH 32/34] xen/io: use __smp_XXX barriers

2015-12-30 Thread Michael S. Tsirkin
include/xen/interface/io/ring.h uses full memory barriers to communicate with the other side. For guests compiled with CONFIG_SMP, smp_wmb and smp_mb would be sufficient, so mb() and wmb() here are only needed if a non-SMP guest runs on an SMP host. Switch to __smp_XXX barriers which serve this e

Re: [Xen-devel] [PATCH 0/5] migration/remus: bug fix and cleanup

2015-12-30 Thread Wen Congyang
On 12/30/2015 06:38 PM, Andrew Cooper wrote: > On 30/12/2015 01:39, Wen Congyang wrote: >> >> Wen Congyang (5): >>remus: don't call stream_continue() when doing failover >>remus: don't write xenstore data if it fails >>tools/libxc: don't send end record if remus fails >>tools/libxl:

Re: [Xen-devel] [PATCH 3/5] tools/libxc: don't send end record if remus fails

2015-12-30 Thread Wen Congyang
On 12/30/2015 07:11 PM, Andrew Cooper wrote: > On 30/12/2015 01:39, Wen Congyang wrote: >> Signed-off-by: Wen Congyang > > Reviewed-by: Andrew Cooper > > While looking at this code, what about error handling for the postcopy() > callback just out of context? We don't handle it now. IIRC, migr

Re: [Xen-devel] [XenGT][IGVT-g] Device model creation failed

2015-12-30 Thread Tian, Kevin
What does Qemu log tell you about below error? libxl: error: libxl_dm.c:1531:device_model_spawn_outcome: domain 1 device model: spawn failed (rc=-3) In the meantime, it’d be helpful if you can capture serial console output. If error comes from XenGT driver, there should be some useful informat

Re: [Xen-devel] [PATCH 2/5] remus: don't write xenstore data if it fails

2015-12-30 Thread Wen Congyang
On 12/30/2015 06:47 PM, Andrew Cooper wrote: > On 30/12/2015 01:39, Wen Congyang wrote: > > If what fails? > > Given the content of this patch in the context of the previous one, I presume > you are wishing to avoid re-sending the emulator state after > libxl__xc_domain_save_done() completes, b

[Xen-devel] [PATCH v3 07/13] x86: Add functions for 64-bit integer arithmetic

2015-12-30 Thread Haozhong Zhang
This patch adds several functions to take multiplication, division and shifting involving 64-bit integers. Those functions are derived from Linux kernel and will be used by later patches to calculate scaling ratio and scaled TSC. Signed-off-by: Haozhong Zhang --- Changes in v3: (addressing Boris

[Xen-devel] [PATCH v3 09/13] x86/hvm: Replace architecture TSC scaling by a common function

2015-12-30 Thread Haozhong Zhang
This patch implements a common function hvm_scale_tsc() to scale TSC by using TSC scaling information collected by architecture code. Signed-off-by: Haozhong Zhang Reviewed-by: Kevin Tian (except the mul64 part) --- Changes in v3: (addressing Boris Ostrovsky's comments) * Remove unnecessary as

[Xen-devel] [PATCH v3 10/13] x86/hvm: Move saving/loading vcpu's TSC to common code

2015-12-30 Thread Haozhong Zhang
Both VMX and SVM save/load vcpu's TSC when saving/loading vcpu's context, so this patch moves saving/loading vcpu's TSC to the common functions hvm_[save|load]_cpu_ctxt(). Signed-off-by: Haozhong Zhang Acked-by: Jan Beulich Acked-by: Kevin Tian Reviewed-by: Boris Ostrovsky --- xen/arch/x86/hv

[Xen-devel] [PATCH v3 00/13] Add VMX TSC scaling support

2015-12-30 Thread Haozhong Zhang
This patchset adds support for VMX TSC scaling feature which is available on Intel Skylake Server CPU. The specification of VMX TSC scaling can be found at http://www.intel.com/content/www/us/en/processors/timestamp-counter-scaling-virtualization-white-paper.html VMX TSC scaling allows guest TSC w

[Xen-devel] [PATCH v3 11/13] x86/hvm: Detect TSC scaling through hvm_funcs

2015-12-30 Thread Haozhong Zhang
This patch uses hvm_funcs.tsc_scaling_supported instead of the architecture code to detect the TSC scaling support. Signed-off-by: Haozhong Zhang Acked-by: Jan Beulich Reviewed-by: Kevin Tian Reviewed-by: Boris Ostrovsky --- xen/arch/x86/time.c | 5 ++--- 1 file changed, 2 insertions(+), 3 de

[Xen-devel] [PATCH v3 04/13] x86/time.c: Scale host TSC in pvclock properly

2015-12-30 Thread Haozhong Zhang
This patch makes the pvclock return the scaled host TSC and corresponding scaling parameters to HVM domains if guest TSC is not emulated and TSC scaling is enabled. Signed-off-by: Haozhong Zhang --- Changes in v3: (addressing Boris Ostrovsky's comments) * No changes in fact. tsc_set_info() does

[Xen-devel] [PATCH v3 05/13] svm: Remove redundant TSC scaling in svm_set_tsc_offset()

2015-12-30 Thread Haozhong Zhang
Now every caller passes an already scaled offset to svm_set_tsc_offset(), so it's not necessary to recalculate a scaled TSC offset in svm_set_tsc_offset(). Signed-off-by: Haozhong Zhang Reviewed-by: Boris Ostrovsky --- Changes in v3: (addressing Boris Ostrovsky's comments) * Move declaration o

[Xen-devel] [PATCH v3 06/13] x86/hvm: Collect information of TSC scaling ratio

2015-12-30 Thread Haozhong Zhang
Both VMX TSC scaling and SVM TSC ratio use the 64-bit TSC scaling ratio, but the number of fractional bits of the ratio is different between VMX and SVM. This patch adds the architecture code to collect the number of fractional bits and other related information into fields of struct hvm_function_t

[Xen-devel] [PATCH v3 03/13] x86/hvm: Scale host TSC when setting/getting guest TSC

2015-12-30 Thread Haozhong Zhang
The existing hvm_[set|get]_guest_tsc_fixed() calculate the guest TSC by adding the TSC offset to the host TSC. When the TSC scaling is enabled, the host TSC should be scaled first. This patch adds the scaling logic to those two functions. Reviewed-by: Boris Ostrovsky Signed-off-by: Haozhong Zhang

[Xen-devel] [PATCH v3 01/13] x86/time.c: Use correct guest TSC frequency in tsc_set_info()

2015-12-30 Thread Haozhong Zhang
When TSC_MODE_PVRDTSCP is used for a HVM container and TSC scaling is available, use the non-zero value of argument gtsc_khz of tsc_set_info() as the guest TSC frequency rather than using the host TSC frequency. Otherwise, TSC scaling will not be able get the correct ratio between the host and gues

[Xen-devel] [PATCH v3 08/13] x86/hvm: Setup TSC scaling ratio

2015-12-30 Thread Haozhong Zhang
This patch adds a field tsc_scaling_ratio in struct hvm_vcpu to record the TSC scaling ratio, and sets it up when tsc_set_info() is called for a vcpu or when a vcpu is restored or reset. Before applying the TSC scaling ratio to CPU, we check its validity in tsc_set_info(). If an invalid ratio is g

[Xen-devel] [PATCH v3 02/13] x86/time.c: Use correct guest TSC frequency in tsc_get_info()

2015-12-30 Thread Haozhong Zhang
When the TSC mode of a HVM container is TSC_MODE_DEFAULT or TSC_MODE_PVRDTSCP and no TSC emulation is used, the existing tsc_get_info() uses the host TSC frequency (cpu_khz) as the guest TSC frequency. However, tsc_set_info() may set the guest TSC frequency to a value different than the host. In or

[Xen-devel] [PATCH v3 13/13] docs: Add descriptions of TSC scaling in xl.cfg and tscmode.txt

2015-12-30 Thread Haozhong Zhang
Signed-off-by: Haozhong Zhang --- Changes in v3: (addressing Kevin Tian's comments) * Reorganize words to address Kevin's comments. docs/man/xl.cfg.pod.5 | 14 +- docs/misc/tscmode.txt | 21 + 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/docs/m

[Xen-devel] [PATCH v3 12/13] vmx: Add VMX RDTSC(P) scaling support

2015-12-30 Thread Haozhong Zhang
This patch adds the initialization and setup code for VMX TSC scaling. Signed-off-by: Haozhong Zhang Acked-by: Kevin Tian --- xen/arch/x86/hvm/vmx/vmcs.c| 12 +--- xen/arch/x86/hvm/vmx/vmx.c | 15 +++ xen/include/asm-x86/hvm/vmx/vmcs.h | 7 +++ 3 files c

Re: [Xen-devel] [PATCH v3 52/62] arm/acpi: Prepare EFI memory descriptor for Dom0

2015-12-30 Thread Shannon Zhao
On 2015/11/27 22:30, Stefano Stabellini wrote: > On Tue, 17 Nov 2015, shannon.z...@linaro.org wrote: >> > From: Shannon Zhao >> > >> > Create a few EFI memory descriptors to tell Dom0 the RAM region >> > information, ACPI table regions and EFI tables reserved resions. >> > >> > Signed-off-by: