[Xen-devel] [PATCH V6 1/5] x86/hvm: pkeys, disable pkeys for guests in non-paging mode

2016-01-18 Thread Huaitong Han
This patch disables pkeys for guest in non-paging mode, However XEN always uses paging mode to emulate guest non-paging mode, To emulate this behavior, pkeys needs to be manually disabled when guest switches to non-paging mode. Signed-off-by: Huaitong Han Reviewed-by: Andrew Cooper --- xen/arch

[Xen-devel] [PATCH V6 0/5] x86/hvm: pkeys, add memory protection-key support

2016-01-18 Thread Huaitong Han
Changes in v6: *2 patches merged are not included. *Don't write XSTATE_PKRU to PV's xcr0. *Use "if()" instead of "?:" in cpuid handling patch. *Update read_pkru function. *Use value 4 instead of CONFIG_PAGING_LEVELS. *Add George's patch for PFEC_insn_fetch handling. Changes in v5: *Add static for

[Xen-devel] [PATCH V6 5/5] x86/hvm: pkeys, add pkeys support for cpuid handling

2016-01-18 Thread Huaitong Han
This patch adds pkeys support for cpuid handing. Pkeys hardware support is CPUID.7.0.ECX[3]:PKU. software support is CPUID.7.0.ECX[4]:OSPKE and it reflects the support setting of CR4.PKE. Signed-off-by: Huaitong Han --- tools/libxc/xc_cpufeature.h | 2 ++ tools/libxc/xc_cpuid_x86.c | 6 -

[Xen-devel] [PATCH V6 4/5] xen/mm: Clean up pfec handling in gva_to_gfn

2016-01-18 Thread Huaitong Han
At the moment, the pfec argument to gva_to_gfn has two functions: * To inform guest_walk what kind of access is happenind * As a value to pass back into the guest in the event of a fault. Unfortunately this is not quite treated consistently: the hvm_fetch_* function will "pre-clear" the PFEC_ins

[Xen-devel] [PATCH V6 2/5] x86/hvm: pkeys, add pkeys support for guest_walk_tables

2016-01-18 Thread Huaitong Han
Protection keys define a new 4-bit protection key field(PKEY) in bits 62:59 of leaf entries of the page tables. PKRU register defines 32 bits, there are 16 domains and 2 attribute bits per domain in pkru, for each i (0 ≤ i ≤ 15), PKRU[2i] is the access-disable bit for protection key i (ADi); PKRU[

[Xen-devel] [PATCH V6 3/5] x86/hvm: pkeys, add xstate support for pkeys

2016-01-18 Thread Huaitong Han
The XSAVE feature set can operate on PKRU state only if the feature set is enabled (CR4.OSXSAVE = 1) and has been configured to manage PKRU state (XCR0[9] = 1). And XCR0.PKRU is disabled on PV mode without PKU feature enabled. Signed-off-by: Huaitong Han Reviewed-by: Andrew Cooper --- xen/arch/

[Xen-devel] [PATCH v5 1/6] remus: don't do failover if we don't have an consistent state

2016-01-18 Thread Wen Congyang
We will have an consistent state when a CHECKPOINT_END record is received. After the first CHECKPOINT_END record is received, we will buffer all records until the next CHECKPOINT_END record is received. So if the checkpoint() callback returns XGR_CHECKPOINT_FAILOVER, we only can do failover if ctx-

[Xen-devel] [PATCH v5 3/6] remus: resume immediately if libxl__xc_domain_save_done() completes

2016-01-18 Thread Wen Congyang
For example: if the secondary host is down, and we fail to send the data to the secondary host. xc_domain_save() returns 0. So in the function libxl__xc_domain_save_done(), rc is 0 (the helper program exits normally), and retval is 0 (it is xc_domain_save()'s return value). In such case, we just ne

[Xen-devel] [PATCH v5 4/6] tools/libxc: don't send end record if remus fails

2016-01-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- tools/libxc/xc_sr_save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c index 88d85ef..e532168 100644 --- a/tools/libxc/xc_sr_save.c +++ b/t

[Xen-devel] [PATCH v5 5/6] tools/libxc: error handling for the postcopy() callback

2016-01-18 Thread Wen Congyang
Signed-off-by: Wen Congyang Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- tools/libxc/xc_sr_save.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c index e532168..e4ba560 100644 --- a/tools/libxc/xc_sr_save.c +++

[Xen-devel] [PATCH v5 0/6] migration/remus: bug fix and cleanup

2016-01-18 Thread Wen Congyang
Wen Congyang (6): remus: don't do failover if we don't have an consistent state remus: don't call stream_continue() when doing failover remus: resume immediately if libxl__xc_domain_save_done() completes tools/libxc: don't send end record if remus fails tools/libxc: error handling for the

[Xen-devel] [PATCH v5 6/6] tools/libxl: remove unused function libxl__domain_save_device_model()

2016-01-18 Thread Wen Congyang
After the commit d77570e7, libxl__domain_save_device_model() is completely unused and can be dropped. Signed-off-by: Wen Congyang Acked-by: Ian Campbell --- tools/libxl/libxl.c | 4 -- tools/libxl/libxl_dom.c | 91 tools/libxl/libxl_in

[Xen-devel] [PATCH v5 2/6] remus: don't call stream_continue() when doing failover

2016-01-18 Thread Wen Congyang
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 Cooper --- tools/libxl/libxl_stream_read.c

[Xen-devel] [linux-next test] 78418: regressions - FAIL

2016-01-18 Thread osstest service owner
flight 78418 linux-next real [real] http://logs.test-lab.xenproject.org/osstest/logs/78418/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-credit2 15 guest-localmigratefail REGR. vs. 78319 test-amd64-amd64-xl-xs

Re: [Xen-devel] [PATCH v4 3/3] VT-d: Fix vt-d Device-TLB flush timeout issue.

2016-01-18 Thread Xu, Quan
> On January 18, 2016 at 11:32pm, wrote: > At 10:46 + on 14 Jan (1452768377), Xu, Quan wrote: > > > It's not about how this specific thing can be fixed. I didn't check all > > > the code. > > > There could be more examples, and in the future all new code need to > > > be aware that the majori

[Xen-devel] [ovmf test] 78465: regressions - FAIL

2016-01-18 Thread osstest service owner
flight 78465 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/78465/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ovmf-amd64 17 guest-start/debianhvm.repeat fail REGR. vs. 65543 test-amd64-amd64-

[Xen-devel] [PATCH v2 5/5] libxl: Add explicit cast to libxl_psr_cat_set_cbm

2016-01-18 Thread Chester Lin
Fixes Coverity CID 1343299. The call to xc_psr_cat_set_domain_data() expects type xc_psr_cat_type but is provided libxl_psr_cbm_type which is defined in IDL. The two enums are deliberately identical and IDL only exists so that libxl clients don't need to include libxc headers directly. This chang

[Xen-devel] [PATCH v2 1/5] libxl: tidy libxl_get_scheduler() according to CODING_STYLE

2016-01-18 Thread Chester Lin
To more closely follow the guidelines in CODING_STYLE, store the result of xc_sched_id() in the local variable r, and the check the result of the call in a separate statement. Change the type of the output parameter given to xc_sched_id() from libxl_scheduler to int to match the libxc interface.

[Xen-devel] [PATCH v2 2/5] libxl: make GC_FREE reachable in libxl_get_scheduler()

2016-01-18 Thread Chester Lin
Coverity CID 1343309 Make GC_FREE reachable in all cases in libxl_get_scheduler() by eliminating the error-path return and instead storing the error code in the returned variable. To make this semantically consistent, change the return type of libxl_get_scheduler() from libxl_scheduler to int, an

[Xen-devel] [PATCH v2 3/5] n16550: add sanity check for reg_shift

2016-01-18 Thread Chester Lin
Fix CID 1343302 by adding checking a check on the value of reg_shift. This patch also rolls the multiplication by 8 into the shift. No functional changes. Suggested-by: Jan Beulich Signed-off-by: Chester Lin --- xen/drivers/char/ns16550.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

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

2016-01-18 Thread osstest service owner
flight 78404 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/78404/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-multivcpu 6 xen-boot fail REGR. vs. 59254 test-armhf-armhf-xl-c

Re: [Xen-devel] [PATCH v4 04/10] acpi: Don't do traditional BIOS table scan for ARM64

2016-01-18 Thread Shannon Zhao
On 2016/1/18 21:29, Jan Beulich wrote: On 16.01.16 at 06:01, wrote: >> > --- a/xen/drivers/acpi/tables/tbxfroot.c >> > +++ b/xen/drivers/acpi/tables/tbxfroot.c >> > @@ -49,6 +49,12 @@ >> > #define _COMPONENT ACPI_TABLES >> > ACPI_MODULE_NAME("tbxfroot") >> > >> > +#ifdef CONFIG

Re: [Xen-devel] [PATCH v4 09/10] arm/uart: Rename dt-uart.c to arm-uart.c

2016-01-18 Thread Shannon Zhao
On 2016/1/18 18:40, Jan Beulich wrote: On 16.01.16 at 06:01, wrote: >> > From: Shannon Zhao >> > >> > Since we will add ACPI initialization for UART in this file later, >> > rename it with a generic name. >> > >> > Signed-off-by: Shannon Zhao >> > --- >> > v4: split the original patch t

Re: [Xen-devel] [PATCH v4 04/10] x86/hvm: Collect information of TSC scaling ratio

2016-01-18 Thread Haozhong Zhang
On 01/18/16 11:45, Egger, Christoph wrote: > On 17/01/16 22:58, Haozhong Zhang wrote: > > 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 collec

[Xen-devel] [RESEND PATCH v4 09/10] vmx: Add VMX RDTSC(P) scaling support

2016-01-18 Thread Haozhong Zhang
This patch adds the initialization and setup code for VMX TSC scaling. Signed-off-by: Haozhong Zhang Acked-by: Kevin Tian --- I forgot to remove the hardcoded TSC scaling parameters in vmx_function_table. Resend this patch with them removed. Changes in v4: (addressing Jan Beulich's comments)

[Xen-devel] [linux-linus bisection] complete test-armhf-armhf-xl-cubietruck

2016-01-18 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-armhf-armhf-xl-cubietruck 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: qemuu git://xenbits.xen.org/qemu-xen.git Tree: x

Re: [Xen-devel] [RFC/WIP] xen: clk: introudce pvclk for device passthrough

2016-01-18 Thread Peng Fan
Hello Ian, On Mon, Jan 18, 2016 at 12:41:59PM +, Ian Campbell wrote: >On Mon, 2016-01-18 at 11:24 +, David Vrabel wrote: >> On 16/01/16 05:22, Peng Fan wrote: >> > This patch was just a initial patch, not sure whether this way >> > is ok from you side for handlding clk when doing platform

Re: [Xen-devel] [RFC/WIP] xen: clk: introudce pvclk for device passthrough

2016-01-18 Thread Peng Fan
Hello David, On Mon, Jan 18, 2016 at 11:24:08AM +, David Vrabel wrote: >On 16/01/16 05:22, Peng Fan wrote: >> This patch was just a initial patch, not sure whether this way >> is ok from you side for handlding clk when doing platform device >> passhthrough. Any comments are appreciated, and yo

Re: [Xen-devel] [RFC/WIP] xen: clk: introudce pvclk for device passthrough

2016-01-18 Thread Peng Fan
Hello George, On Mon, Jan 18, 2016 at 11:22:44AM +, George Dunlap wrote: >On Sat, Jan 16, 2016 at 5:22 AM, Peng Fan wrote: >> This patch was just a initial patch, not sure whether this way >> is ok from you side for handlding clk when doing platform device >> passhthrough. Any comments are ap

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

2016-01-18 Thread Wen Congyang
On 01/19/2016 12:45 AM, Ian Campbell wrote: > On Mon, 2016-01-18 at 13:40 +0800, 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 co

Re: [Xen-devel] [PATCH v4 2/5] remus: resume immediately if libxl__xc_domain_save_done() completes

2016-01-18 Thread Wen Congyang
On 01/19/2016 12:51 AM, Ian Campbell wrote: > On Mon, 2016-01-18 at 13:40 +0800, Wen Congyang wrote: >> For example: if the secondary host is down, and we fail to send the data to >> the secondary host. xc_domain_save() returns 0. So in the function >> libxl__xc_domain_save_done(), rc is 0(the help

Re: [Xen-devel] [PATCH v4 3/3] VT-d: Fix vt-d Device-TLB flush timeout issue.

2016-01-18 Thread Tian, Kevin
> From: Tim Deegan [mailto:t...@xen.org] > Sent: Monday, January 18, 2016 11:32 PM > > At 10:46 + on 14 Jan (1452768377), Xu, Quan wrote: > > > It's not about how this specific thing can be fixed. I didn't check all > > > the code. > > > There could be more examples, and in the future all new

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

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

Re: [Xen-devel] [PATCH v4 02/10] x86/time.c: Scale host TSC in pvclock properly

2016-01-18 Thread Haozhong Zhang
On 01/18/16 06:42, Jan Beulich wrote: > >>> On 17.01.16 at 22:58, wrote: > > 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 > > Thi

Re: [Xen-devel] [PATCH v4 01/10] x86/hvm: Scale host TSC when setting/getting guest TSC

2016-01-18 Thread Haozhong Zhang
On 01/18/16 06:39, Jan Beulich wrote: > >>> On 17.01.16 at 22:58, wrote: > > 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 logi

[Xen-devel] [PATCH] x86/xen/p2m: trivia indentation fix on if statement

2016-01-18 Thread Colin King
From: Colin Ian King if statement is indented by 1 extra whitespace, remove this Signed-off-by: Colin Ian King --- arch/x86/xen/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index cab9f76..17dbc1d 100644 --- a/arch/x86/xen/p2m

[Xen-devel] [PATCH] INSTALL: fix typo

2016-01-18 Thread Doug Goldstein
There's a case of a missing T in the word 'the'. Signed-off-by: Doug Goldstein --- INSTALL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index 3d2e86a..95fa94d 100644 --- a/INSTALL +++ b/INSTALL @@ -275,7 +275,7 @@ Building the python tools may fail unless

[Xen-devel] [ovmf test] 78428: regressions - FAIL

2016-01-18 Thread osstest service owner
flight 78428 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/78428/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ovmf-amd64 17 guest-start/debianhvm.repeat fail REGR. vs. 65543 test-amd64-amd64-

Re: [Xen-devel] [PATCH] x86: Convert shadow-paging to Kconfig

2016-01-18 Thread Doug Goldstein
On 1/18/16 12:40 PM, Andrew Cooper wrote: > Signed-off-by: Andrew Cooper Reviewed-by: Doug Goldstein > --- > CC: Jan Beulich > CC: Doug Goldstein > --- > xen/arch/x86/Kconfig| 14 ++ > xen/arch/x86/Rules.mk | 4 > xen/arch/x86/mm/shadow/Makefile | 2 +

[Xen-devel] [xen-unstable-smoke test] 78449: regressions - FAIL

2016-01-18 Thread osstest service owner
flight 78449 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/78449/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl 6 xen-boot fail REGR. vs. 78441 Tests which di

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

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

[Xen-devel] [PATCH] x86: Convert shadow-paging to Kconfig

2016-01-18 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Doug Goldstein --- xen/arch/x86/Kconfig| 14 ++ xen/arch/x86/Rules.mk | 4 xen/arch/x86/mm/shadow/Makefile | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/Kconfig b

Re: [Xen-devel] Error booting Xen

2016-01-18 Thread Dario Faggioli
On Mon, 2016-01-18 at 18:09 +, Andrew Cooper wrote: > On 18/01/16 18:03, Harmandeep Kaur wrote: > > Hi, > > > > I tried to boot Xen (cloned from git clone > > git://xenbits.xen.org/xen.git), but it stucks > > in a infinite loop. I got the log via serial. > > You can inspect it at > > http://pa

Re: [Xen-devel] [PATCH v2 16/16] ARM64: XEN: Initialize Xen specific UEFI runtime services

2016-01-18 Thread Mark Rutland
On Mon, Jan 18, 2016 at 05:45:24PM +, Stefano Stabellini wrote: > On Mon, 18 Jan 2016, Mark Rutland wrote: > > On Fri, Jan 15, 2016 at 02:55:29PM +0800, Shannon Zhao wrote: > > > +void __init xen_efi_runtime_setup(void) > > > +{ > > > + efi.get_time = xen_efi_get_time; > > > + e

Re: [Xen-devel] [PATCH] xen: Improvements to clean and distclean targets

2016-01-18 Thread Andrew Cooper
On 18/01/16 16:57, Jan Beulich wrote: On 18.01.16 at 17:45, wrote: >> On 18/01/16 16:41, Jan Beulich wrote: >> On 18.01.16 at 17:27, wrote: * Move '*~' and 'core' into the find rule. >>> I don't understand this part: Where in the build process do such get >>> generated? I'm tempted

Re: [Xen-devel] Error booting Xen

2016-01-18 Thread Andrew Cooper
On 18/01/16 18:03, Harmandeep Kaur wrote: > Hi, > > I tried to boot Xen (cloned from git clone > git://xenbits.xen.org/xen.git), but it stucks > in a infinite loop. I got the log via serial. > You can inspect it at > http://paste2.org/YCpkzbpG > > If anybody has encountered this issue > before, I w

Re: [Xen-devel] [PATCH v3 4/4] x86/PV: enable the emulated PIT

2016-01-18 Thread Andrew Cooper
On 18/01/16 17:58, Roger Pau Monné wrote: > El 18/01/16 a les 11.41, Andrew Cooper ha escrit: >> On 18/01/16 09:44, Jan Beulich wrote: >> On 18.01.16 at 10:29, wrote: On 18/01/2016 07:43, Jan Beulich wrote: On 15.01.16 at 18:45, wrote: >> Changes since v2: >> - Change '

[Xen-devel] Error booting Xen

2016-01-18 Thread Harmandeep Kaur
Hi, I tried to boot Xen (cloned from git clone git://xenbits.xen.org/xen.git), but it stucks in a infinite loop. I got the log via serial. You can inspect it at http://paste2.org/YCpkzbpG If anybody has encountered this issue before, I will appreciate any help. Regards, Harmandeep Kaur Outreachy

Re: [Xen-devel] [PATCH v3 4/4] x86/PV: enable the emulated PIT

2016-01-18 Thread Roger Pau Monné
El 18/01/16 a les 11.41, Andrew Cooper ha escrit: > On 18/01/16 09:44, Jan Beulich wrote: > On 18.01.16 at 10:29, wrote: >>> On 18/01/2016 07:43, Jan Beulich wrote: >>> On 15.01.16 at 18:45, wrote: > Changes since v2: > - Change 'if ( (a && b) || (!a && c) )' into 'if ( a ? b : c

Re: [Xen-devel] [PATCH v2 16/16] ARM64: XEN: Initialize Xen specific UEFI runtime services

2016-01-18 Thread Stefano Stabellini
On Mon, 18 Jan 2016, Mark Rutland wrote: > On Fri, Jan 15, 2016 at 02:55:29PM +0800, Shannon Zhao wrote: > > From: Shannon Zhao > > > > When running on Xen hypervisor, runtime services are supported through > > hypercall. So call Xen specific function to initialize runtime services. > > > > Sign

Re: [Xen-devel] [PATCH v2 12/16] ARM: Xen: Document UEFI support on Xen ARM virtual platforms

2016-01-18 Thread Stefano Stabellini
On Mon, 18 Jan 2016, Mark Rutland wrote: > On Fri, Jan 15, 2016 at 02:55:25PM +0800, Shannon Zhao wrote: > > From: Shannon Zhao > > > > Add a "uefi" node under /hypervisor node in FDT, then Linux kernel could > > scan this to get the UEFI information. > > > > Signed-off-by: Shannon Zhao > > ---

Re: [Xen-devel] [PATCH] build: specify minimum versions of make and binutils

2016-01-18 Thread Doug Goldstein
On 1/18/16 11:03 AM, Jan Beulich wrote: On 18.01.16 at 17:53, wrote: >> To help people avoid having to figure out what versions of make and >> binutils need to be supported document them explicitly. The version of >> binutils that had to be supported was mentioned in >> http://lists.xenprojec

Re: [Xen-devel] [PATCH] MAINTAINERS: add myself for kconfig

2016-01-18 Thread Ian Campbell
On Wed, 2015-12-16 at 08:41 -0600, Doug Goldstein wrote: > Added myself as the maintainer of kconfig. > > CC: Ian Campbell > CC: Ian Jackson > CC: Jan Beulich > CC: Keir Fraser > CC: Tim Deegan > > Signed-off-by: Doug Goldstein Applied. Ian __

Re: [Xen-devel] [PATCH v2 16/16] ARM64: XEN: Initialize Xen specific UEFI runtime services

2016-01-18 Thread Stefano Stabellini
On Fri, 15 Jan 2016, Shannon Zhao wrote: > From: Shannon Zhao > > When running on Xen hypervisor, runtime services are supported through > hypercall. So call Xen specific function to initialize runtime services. > > Signed-off-by: Shannon Zhao Thanks Shannon, much much better! Just a couple o

Re: [Xen-devel] [PATCH] build: specify minimum versions of make and binutils

2016-01-18 Thread Jan Beulich
>>> On 18.01.16 at 17:53, wrote: > To help people avoid having to figure out what versions of make and > binutils need to be supported document them explicitly. The version of > binutils that had to be supported was mentioned in > http://lists.xenproject.org/archives/html/xen-devel/2016-01/msg0060

Re: [Xen-devel] [PATCH v4 2/5] remus: resume immediately if libxl__xc_domain_save_done() completes

2016-01-18 Thread Ian Campbell
On Mon, 2016-01-18 at 13:40 +0800, Wen Congyang wrote: > For example: if the secondary host is down, and we fail to send the data to > the secondary host. xc_domain_save() returns 0. So in the function > libxl__xc_domain_save_done(), rc is 0(the helper program exits normally), > and retval is 0(it

Re: [Xen-devel] [PATCH v3] x86/p2m: use large pages for MMIO mappings

2016-01-18 Thread Ian Campbell
On Mon, 2016-01-18 at 09:51 -0700, Jan Beulich wrote: > > > > On 18.01.16 at 17:32, wrote: > > I must confess I'm not entirely following what the various proposals > > are, > > What is currently implemented by the patch is that, upon error on > iteration N the hypervisor would clean up on a best

Re: [Xen-devel] [PATCH] xen: Improvements to clean and distclean targets

2016-01-18 Thread Jan Beulich
>>> On 18.01.16 at 17:45, wrote: > On 18/01/16 16:41, Jan Beulich wrote: > On 18.01.16 at 17:27, wrote: >>> * Move '*~' and 'core' into the find rule. >> I don't understand this part: Where in the build process do such get >> generated? I'm tempted to instead recommend to just drop those >> f

Re: [Xen-devel] [PATCH v7 2/2] public/io/netif.h: document control ring and toeplitz hashing

2016-01-18 Thread Ian Campbell
On Mon, 2016-01-18 at 09:35 -0700, Jan Beulich wrote: > > > > On 18.01.16 at 17:07, wrote: > > On Tue, 2016-01-12 at 09:58 +, Paul Durrant wrote: > > > + * NETIF_CTRL_TYPE_SET_TOEPLITZ_MAPPING > > > + * > > > + * > > > + * This is sent by the frontend to se

Re: [Xen-devel] [PATCH v4 00/14] xenstore: make it easier to run xenstore in a domain

2016-01-18 Thread Ian Campbell
On Mon, 2016-01-18 at 09:03 +0100, Juergen Gross wrote: > - patch 13 (was 14) to not reuse variable as requested by Ian Campbell Acked that, then applied the whole lot. Thanks, Ian. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.o

[Xen-devel] [PATCH] build: specify minimum versions of make and binutils

2016-01-18 Thread Doug Goldstein
To help people avoid having to figure out what versions of make and binutils need to be supported document them explicitly. The version of binutils that had to be supported was mentioned in http://lists.xenproject.org/archives/html/xen-devel/2016-01/msg00609.html as 2.17. Knowing that Jan got these

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

2016-01-18 Thread Ian Campbell
On Mon, 2016-01-18 at 16:53 +, Ian Campbell wrote: >  > What was the outcoming of Andy's comment on v1 regarding error handling > for ->postcopy? Ignore this, I saw just too late that it was in #4. Ian. ___ Xen-devel mailing list Xen-devel@lists.x

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

2016-01-18 Thread Ian Campbell
On Mon, 2016-01-18 at 13:40 +0800, Wen Congyang wrote: > Signed-off-by: Wen Congyang > Reviewed-by: Andrew Cooper Acked-by: Ian Campbell What was the outcoming of Andy's comment on v1 regarding error handling for ->postcopy? > --- >  tools/libxc/xc_sr_save.c | 2 +- >  1 file changed, 1 insert

Re: [Xen-devel] [PATCH v4 4/5] tools/libxc: error handling for the postcopy() callback

2016-01-18 Thread Ian Campbell
On Mon, 2016-01-18 at 13:40 +0800, Wen Congyang wrote: > Signed-off-by: Wen Congyang > Reviewed-by: Andrew Cooper Acked-by: Ian Campbell ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

[Xen-devel] [PATCH v2] xen: fix potential integer overflow in queue_reply

2016-01-18 Thread Insu Yun
When len is greater than UINT_MAX - sizeof(*rb), in next allocation, it can overflow integer range and allocates small size of heap. After that, memcpy will overflow the allocated heap. Therefore, it needs to check the size of given length. Signed-off-by: Insu Yun --- drivers/xen/xenbus/xenbus_d

Re: [Xen-devel] [PATCH v3] x86/p2m: use large pages for MMIO mappings

2016-01-18 Thread Jan Beulich
>>> On 18.01.16 at 17:32, wrote: > I must confess I'm not entirely following what the various proposals are, What is currently implemented by the patch is that, upon error on iteration N the hypervisor would clean up on a best effort basis and return the error indicator. In the alternative sugges

Re: [Xen-devel] [PATCH] xen: fix potential integer overflow in queue_reply

2016-01-18 Thread David Vrabel
On 18/01/16 16:38, David Vrabel wrote: > On 18/01/16 16:29, Insu Yun wrote: >> When len is greater than UINT_MAX - sizeof(*rb), in next allocation, >> it can overflow integer range and allocates small size of heap. >> After that, memcpy will overflow the allocated heap. >> Therefore, it needs to ch

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

2016-01-18 Thread Ian Campbell
On Mon, 2016-01-18 at 13:40 +0800, 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 Congyan

Re: [Xen-devel] [PATCH] xen: Improvements to clean and distclean targets

2016-01-18 Thread Andrew Cooper
On 18/01/16 16:41, Jan Beulich wrote: On 18.01.16 at 17:27, wrote: >> * Move '*~' and 'core' into the find rule. > I don't understand this part: Where in the build process do such get > generated? I'm tempted to instead recommend to just drop those > from the rm invocation... No idea about '

Re: [Xen-devel] [PATCH v3 4/4] x86/PV: enable the emulated PIT

2016-01-18 Thread Jan Beulich
>>> On 18.01.16 at 17:33, wrote: > On 18/01/16 16:27, Jan Beulich wrote: > On 18.01.16 at 17:10, wrote: >>> On 18/01/16 11:06, Jan Beulich wrote: > Whatever (eventually) gets used to set these values will however be > present in the xl configuration, which is at the very start of the

Re: [Xen-devel] [PATCH v2] x86/HVM: change the flags cpu context field to uint64_t

2016-01-18 Thread Jan Beulich
>>> On 18.01.16 at 17:33, wrote: > El 18/01/16 a les 17.24, Jan Beulich ha escrit: >> ULL might not be supported by pre-C99 compilers. Casting to >> uint64_t is, well, ugly. The flags field really has no business >> being wider then 32 bits. > > Right, although Xen uses gnu99 this is a public hea

Re: [Xen-devel] [PATCHv1 4/4] spinlock: add fair read-write locks

2016-01-18 Thread Jennifer Herbert
Hi Jan, Thank you for your comments. Sorry for the slow response - xmas and all... Responses below... On 22/12/15 13:54, Jan Beulich wrote: +/** + * rspin_until_writer_unlock - inc reader count & spin until writer is gone Stale comment - the function doesn't increment anything. Also through

Re: [Xen-devel] Questions about the use of idle_vcpu[]

2016-01-18 Thread Meng Xu
Hi Dario, On Mon, Jan 18, 2016 at 11:32 AM, Dario Faggioli wrote: > On Mon, 2016-01-18 at 11:07 -0500, Meng Xu wrote: >> On Mon, Jan 18, 2016 at 6:00 AM, Dario Faggioli >> wrote: >> > >> > RTDS behavior is broken in many respect, including this, >> > >> > and in fact, >> > Meng and Tianyang are

Re: [Xen-devel] [PATCH] xen: Improvements to clean and distclean targets

2016-01-18 Thread Jan Beulich
>>> On 18.01.16 at 17:27, wrote: > * Move '*~' and 'core' into the find rule. I don't understand this part: Where in the build process do such get generated? I'm tempted to instead recommend to just drop those from the rm invocation... > * Remove 'System.map' along with the other primary targets

[Xen-devel] [PATCH] xen: fix potential integer overflow in queue_reply

2016-01-18 Thread Insu Yun
When len is greater than UINT_MAX - sizeof(*rb), in next allocation, it can overflow integer range and allocates small size of heap. After that, memcpy will overflow the allocated heap. Therefore, it needs to check the size of given length. Signed-off-by: Insu Yun --- drivers/xen/xenbus/xenbus_d

Re: [Xen-devel] [PATCH] xen: fix potential integer overflow in queue_reply

2016-01-18 Thread David Vrabel
On 18/01/16 16:29, Insu Yun wrote: > When len is greater than UINT_MAX - sizeof(*rb), in next allocation, > it can overflow integer range and allocates small size of heap. > After that, memcpy will overflow the allocated heap. > Therefore, it needs to check the size of given length. [...] > --- a/d

Re: [Xen-devel] [PATCH v7 2/2] public/io/netif.h: document control ring and toeplitz hashing

2016-01-18 Thread Jan Beulich
>>> On 18.01.16 at 17:07, wrote: > On Tue, 2016-01-12 at 09:58 +, Paul Durrant wrote: >> + * NETIF_CTRL_TYPE_SET_TOEPLITZ_MAPPING >> + * >> + * >> + * This is sent by the frontend to set the content of the table mapping >> + * toeplitz hash value to queue n

Re: [Xen-devel] [BUG] Assertion '(sp == 0) || (peoi[sp-1].vector < vector)' failed at irq.c:1163

2016-01-18 Thread Håkon Alstadheim
Den 18. jan. 2016 11:31, skrev Jan Beulich: On 18.01.16 at 00:07, wrote: >> There we go :-/ . Log attached from boot to assertion-failure with >> loglvl=all guest_loglvl=all . Some of the log output might be a bit >> cryptic, they are notes to myself from local boot-scripts, basically >> firi

Re: [Xen-devel] [PATCH v3 4/4] x86/PV: enable the emulated PIT

2016-01-18 Thread Andrew Cooper
On 18/01/16 16:27, Jan Beulich wrote: On 18.01.16 at 17:10, wrote: >> On 18/01/16 11:06, Jan Beulich wrote: Whatever (eventually) gets used to set these values will however be present in the xl configuration, which is at the very start of the stream, and is what is used to crea

Re: [Xen-devel] [PATCH v2] x86/HVM: change the flags cpu context field to uint64_t

2016-01-18 Thread Roger Pau Monné
El 18/01/16 a les 17.24, Jan Beulich ha escrit: On 18.01.16 at 16:38, wrote: >> El 18/01/16 a les 16.24, Andrew Cooper ha escrit: >>> On 18/01/16 15:21, Jan Beulich wrote: >>> On 18.01.16 at 16:09, wrote: > --- a/xen/include/public/arch-x86/hvm/save.h > +++ b/xen/include/public/a

Re: [Xen-devel] [PATCH v3] x86/p2m: use large pages for MMIO mappings

2016-01-18 Thread Ian Campbell
On Mon, 2016-01-18 at 01:11 -0700, Jan Beulich wrote: > > > > On 15.01.16 at 15:55, wrote: > > On Fri, 2016-01-15 at 07:39 -0700, Jan Beulich wrote: > > > I don't think I agree - there are two models. The meaning of > > > -E2BIG for the caller to retry with a smaller amount doesn't exist in > > >

Re: [Xen-devel] Questions about the use of idle_vcpu[]

2016-01-18 Thread Dario Faggioli
On Mon, 2016-01-18 at 11:07 -0500, Meng Xu wrote: > On Mon, Jan 18, 2016 at 6:00 AM, Dario Faggioli > wrote: > >  > > RTDS behavior is broken in many respect, including this, > > > > and in fact, > > Meng and Tianyang are sending patches already to fix it (I'll let > > you > > guys have my commen

[Xen-devel] [PATCH] xen: Improvements to clean and distclean targets

2016-01-18 Thread Andrew Cooper
* Move '*~' and 'core' into the find rule. * Remove 'System.map' along with the other primary targets * Remove include/config/ and include/generated/ on clean * Remove .config.old in distclean Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/Makefile | 7 --- 1 file changed, 4 inser

Re: [Xen-devel] [PATCH v3 4/4] x86/PV: enable the emulated PIT

2016-01-18 Thread Jan Beulich
>>> On 18.01.16 at 17:10, wrote: > On 18/01/16 11:06, Jan Beulich wrote: >>> Whatever (eventually) gets used to set these values will however be >>> present in the xl configuration, which is at the very start of the >>> stream, and is what is used to create the new domain. >> Which makes me repeat

[Xen-devel] [PATCH v3] x86/HVM: add padding to struct hvm_hw_cpu

2016-01-18 Thread Roger Pau Monne
So that the size of the structure is the same on 32 and 64bit. Signed-off-by: Roger Pau Monné Reviewed-by: Andrew Cooper --- Cc: Ian Campbell Cc: Ian Jackson Cc: Jan Beulich Cc: Andrew Cooper --- This should fix the issues seen on OSSTest when using a 32bit toolstack on a 64bit hypervisor to

Re: [Xen-devel] [PATCH v2] x86/HVM: change the flags cpu context field to uint64_t

2016-01-18 Thread Jan Beulich
>>> On 18.01.16 at 16:38, wrote: > El 18/01/16 a les 16.24, Andrew Cooper ha escrit: >> On 18/01/16 15:21, Jan Beulich wrote: >> On 18.01.16 at 16:09, wrote: --- a/xen/include/public/arch-x86/hvm/save.h +++ b/xen/include/public/arch-x86/hvm/save.h @@ -161,8 +161,8 @@ struct hvm

Re: [Xen-devel] [PATCH OSSTEST] stop allowing libvirt failures (Was: Re: [xen-unstable-smoke test] 78436: tolerable FAIL - PUSHED)

2016-01-18 Thread Ian Campbell
On Mon, 2016-01-18 at 16:06 +, Ian Campbell wrote: > On Mon, 2016-01-18 at 15:44 +, osstest service owner wrote: > > flight 78436 xen-unstable-smoke real [real] > > http://logs.test-lab.xenproject.org/osstest/logs/78436/ > > > > Failures :-/ but no regressions. > > > > Regressions which a

Re: [Xen-devel] [PATCH v3 4/4] x86/PV: enable the emulated PIT

2016-01-18 Thread Andrew Cooper
On 18/01/16 11:06, Jan Beulich wrote: >> Which gets us to the second, broader issue: These flags shouldn't >> be forced to a particular value during migration, but instead they >> should be part of the state getting migrated. Incoming domains >> then would - if the field is missing due to coming fr

Re: [Xen-devel] [PATCH v7 2/2] public/io/netif.h: document control ring and toeplitz hashing

2016-01-18 Thread Ian Campbell
On Tue, 2016-01-12 at 09:58 +, Paul Durrant wrote: > This patch documents a new shared ring between frontend and backend that > can be used to pass bulk out-of-band data, such as that required to > implement toeplitz hashing in the backend such that it is configurable by > the frontend (which i

Re: [Xen-devel] Questions about the use of idle_vcpu[]

2016-01-18 Thread Meng Xu
On Mon, Jan 18, 2016 at 6:00 AM, Dario Faggioli wrote: > > On Mon, 2016-01-18 at 10:47 +, George Dunlap wrote: > > On Fri, Jan 15, 2016 at 1:04 AM, Tianyang Chen > > > > > If an idle vcpu is picked, the ret.time is set accordingly in both > > > credit > > > and credit2 by checking whether sne

[Xen-devel] [PATCH OSSTEST] stop allowing libvirt failures (Was: Re: [xen-unstable-smoke test] 78436: tolerable FAIL - PUSHED)

2016-01-18 Thread Ian Campbell
On Mon, 2016-01-18 at 15:44 +, osstest service owner wrote: > flight 78436 xen-unstable-smoke real [real] > http://logs.test-lab.xenproject.org/osstest/logs/78436/ > > Failures :-/ but no regressions. > > Regressions which are regarded as allowable (not blocking): >  test-amd64-amd64-libvirt 

[Xen-devel] Backports for Xen 4.6

2016-01-18 Thread Andrew Cooper
Hi, Looking at the XenServer patch queue, I have a few nominations for backports. Hypervisor: 22a1fbb575df "x86/hvm: make sure stdvga cache cannot be re-enabled" 0747bc8b4d85 "x86/vmx: Fix injection of #DB traps following XSA-156" Possibly also: 42940c046902 "x86/shadow: Fix missing newline in d

Re: [Xen-devel] [v3,11/41] mips: reuse asm-generic/barrier.h

2016-01-18 Thread Paul E. McKenney
On Mon, Jan 18, 2016 at 04:19:29PM +0800, Herbert Xu wrote: > Paul E. McKenney wrote: > > > > You could use SYNC_ACQUIRE() to implement read_barrier_depends() and > > smp_read_barrier_depends(), but SYNC_RMB probably does not suffice. > > The reason for this is that smp_read_barrier_depends() must

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

2016-01-18 Thread osstest service owner
flight 78436 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/78436/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-amd64-libvirt 6 xen-boot fail REGR. vs. 78183 Tests which did not suc

Re: [Xen-devel] [PATCH v2 14/16] Xen: EFI: Parse DT parameters for Xen specific UEFI

2016-01-18 Thread Stefano Stabellini
CC'ing Matt Fleming On Fri, 15 Jan 2016, Shannon Zhao wrote: > From: Shannon Zhao > > Add a new function to parse DT parameters for Xen specific UEFI just > like the way for normal UEFI. Then it could reuse the existing codes. > > Signed-off-by: Shannon Zhao Please CC the maintainers, use ./s

Re: [Xen-devel] [PATCH v2] x86/HVM: change the flags cpu context field to uint64_t

2016-01-18 Thread Roger Pau Monné
El 18/01/16 a les 16.24, Andrew Cooper ha escrit: > On 18/01/16 15:21, Jan Beulich wrote: > On 18.01.16 at 16:09, wrote: >>> --- a/xen/include/public/arch-x86/hvm/save.h >>> +++ b/xen/include/public/arch-x86/hvm/save.h >>> @@ -161,8 +161,8 @@ struct hvm_hw_cpu { >>> uint32_t error_code; >

Re: [Xen-devel] [PATCH v4 3/3] VT-d: Fix vt-d Device-TLB flush timeout issue.

2016-01-18 Thread Tim Deegan
At 10:46 + on 14 Jan (1452768377), Xu, Quan wrote: > > It's not about how this specific thing can be fixed. I didn't check all the > > code. > > There could be more examples, and in the future all new code need to be > > aware > > that the majority of IOMMU functions may have pdev->domain cha

Re: [Xen-devel] [PATCH v2] x86/HVM: change the flags cpu context field to uint64_t

2016-01-18 Thread Andrew Cooper
On 18/01/16 15:21, Jan Beulich wrote: On 18.01.16 at 16:09, wrote: >> --- a/xen/include/public/arch-x86/hvm/save.h >> +++ b/xen/include/public/arch-x86/hvm/save.h >> @@ -161,8 +161,8 @@ struct hvm_hw_cpu { >> uint32_t error_code; >> >> #define _XEN_X86_FPU_INITIALISED0 >> -#de

Re: [Xen-devel] [PATCH v2] x86/HVM: change the flags cpu context field to uint64_t

2016-01-18 Thread Jan Beulich
>>> On 18.01.16 at 16:09, wrote: > --- a/xen/include/public/arch-x86/hvm/save.h > +++ b/xen/include/public/arch-x86/hvm/save.h > @@ -161,8 +161,8 @@ struct hvm_hw_cpu { > uint32_t error_code; > > #define _XEN_X86_FPU_INITIALISED0 > -#define XEN_X86_FPU_INITIALISED (1U<<_XEN

Re: [Xen-devel] [PATCH] x86/HVM: add padding to hvm_hw_cpu

2016-01-18 Thread Jan Beulich
>>> On 18.01.16 at 15:47, wrote: >> index b6b1bf8..6862720 100644 >> --- a/xen/include/public/arch-x86/hvm/save.h >> +++ b/xen/include/public/arch-x86/hvm/save.h >> @@ -163,6 +163,7 @@ struct hvm_hw_cpu { >> #define _XEN_X86_FPU_INITIALISED0 >> #define XEN_X86_FPU_INITIALISED (1U

  1   2   3   >