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

2015-12-16 Thread osstest service owner
flight 66414 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/66414/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-winxpsp3 6 xen-boot fail REGR. vs. 59254 test-amd64-i386-freeb

[Xen-devel] [PATCH v5 COLOPre 17/18] tools/libxl: move remus state into a seperate structure

2015-12-16 Thread Wen Congyang
From: Yang Hongyang Add a new structure remus state, and move concrete layer's private member to remus state. it is pure refactoring and no functional changes. Init interval in libxl__remus_setup(). It is safe to move this initialisation, because this value is only used for remus, and remus will

[Xen-devel] [PATCH v5 COLOPre 18/18] tools/libxl: seperate device init/cleanup from checkpoint device layer

2015-12-16 Thread Wen Congyang
From: Yang Hongyang we call (init|cleanup)_subkind_nic and (init|cleanup)_subkind_drbd_disk directly in checkpoint device. Move them to libxl_remus.c, Call them before calling libxl__checkpoint_devices_setup() or after calling libxl__checkpoint_devices_teardown(). it is pure refactoring and no fu

[Xen-devel] [PATCH v5 COLOPre 02/18] tools/libxl: move remus code into libxl_remus.c

2015-12-16 Thread Wen Congyang
From: Yang Hongyang After previous refactoring, we are now able to move all remus code into a separate file libxl_remus.c. Export following functions for internal use: - Remus callbacks * libxl__remus_domain_suspend_callback * libxl__remus_domain_resume_callback * libxl__remus_domain_save_

[Xen-devel] [PATCH v5 COLOPre 14/18] tools/libxl: fix backword compatibility after the automatic renaming

2015-12-16 Thread Wen Congyang
From: Yang Hongyang The error code ERROR_REMUS_XXX was introduced in Xen 4.5, and changed to ERROR_CHECKPOINT_XXX after previous renaming. The patch fix the backword compatibility. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang --- tools/libxl/libxl.h | 13 + 1 file chan

[Xen-devel] [PATCH v5 COLOPre 16/18] tools/libxl: store remus_ops in checkpoint device state

2015-12-16 Thread Wen Congyang
From: Yang Hongyang Checkpoint device is an abstract layer to do checkpoint. COLO can also use it to do checkpoint. But there are still some codes in checkpoint device which touch remus. This patch and the following 2 will seperate remus from checkpoint device layer. We use remus ops directly i

[Xen-devel] [PATCH v5 COLOPre 13/18] tools/libxl: rename remus device to checkpoint device

2015-12-16 Thread Wen Congyang
From: Yang Hongyang This patch is auto generated by the following commands: 1. git mv tools/libxl/libxl_remus_device.c tools/libxl/libxl_checkpoint_device.c 2. perl -pi -e 's/libxl_remus_device/libxl_checkpoint_device/g' tools/libxl/Makefile 3. perl -pi -e 's/\blibxl__remus_devices/libxl__ch

[Xen-devel] [PATCH v5 COLOPre 03/18] tools/libxl: move save/restore code into libxl_dom_save.c

2015-12-16 Thread Wen Congyang
From: Yang Hongyang This is purely code motion. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang CC: Ian Jackson CC: Wei Liu Acked-by: Ian Campbell --- tools/libxl/Makefile | 2 +- tools/libxl/libxl_dom.c | 605 - tools/libxl/l

[Xen-devel] [PATCH v5 COLOPre 15/18] tools/libxl: adjust the indentation

2015-12-16 Thread Wen Congyang
From: Yang Hongyang This is just tidying up after the previous automatic renaming. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang Acked-by: Ian Campbell --- tools/libxl/libxl_checkpoint_device.c | 21 +++-- tools/libxl/libxl_internal.h | 19 +++-

[Xen-devel] [PATCH v5 COLOPre 09/18] tools/libxl: introduce libxl__domain_common_switch_qemu_logdirty()

2015-12-16 Thread Wen Congyang
From: Yang Hongyang Secondary vm is running in colo mode, we need to send secondary vm's dirty page information to master at checkpoint, so we have to enable qemu logdirty on secondary. libxl__domain_suspend_common_switch_qemu_logdirty() is to enable qemu logdirty. But it uses domain_save_state,

[Xen-devel] [PATCH v5 COLOPre 06/18] tools/libxl: introduce enum type libxl_checkpointed_stream

2015-12-16 Thread Wen Congyang
From: Yang Hongyang introduce enum type libxl_checkpointed_stream in IDL. rename the last argument of migrate_receive from "remus" to "checkpointed" since the semantics of this parameter has changed. NOTE: libxl_domain_restore_params isn't changed here, checkpointed_stream is still an int. Si

[Xen-devel] [PATCH v5 COLOPre 00/18] Prerequisite patches for COLO

2015-12-16 Thread Wen Congyang
This patchset is Prerequisite for COLO feature. Refer to: http://wiki.xen.org/wiki/COLO_-_Coarse_Grain_Lock_Stepping v4->v5: - Rebased to the latest xen - Addressed comments from last round v3->v4: - Rebased to the latest migration v2 branch - Addressed comments from last round v2->v3: - Me

[Xen-devel] [PATCH v5 COLOPre 12/18] tools/libx{l, c}: add back channel to libxc

2015-12-16 Thread Wen Congyang
In COLO mode, both VMs are running, and are considered in sync if the visible network traffic is identical. After some time, they fall out of sync. At this point, the two VMs have definitely diverged. Lets call the primary dirty bitmap set A, while the secondary dirty bitmap set B. Sets A and B

[Xen-devel] [PATCH v5 COLOPre 01/18] libxl/remus: init checkpoint_callback in Remus setup callback

2015-12-16 Thread Wen Congyang
From: Yang Hongyang init stream {read/write} state checkpoint_callback in Remus setup callback. There's no functional change, it's just refactoring so that we can move all remus code into one file. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang CC: Andrew Cooper CC: Ian Campbell CC

[Xen-devel] [PATCH v5 COLOPre 07/18] migration/save: pass checkpointed_stream from libxl to libxc

2015-12-16 Thread Wen Congyang
From: Yang Hongyang Pass checkpointed_stream from libxl to libxc. It won't affact legacy migration because legacy migration won't use this param. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Andrew Cooper --- tools/libxc/include

[Xen-devel] [PATCH v5 COLOPre 04/18] libxl/save: Refactor libxl__domain_suspend_state

2015-12-16 Thread Wen Congyang
From: Yang Hongyang Currently struct libxl__domain_suspend_state contains 2 type of states, one is save state, another is suspend state. This patch separates those two out. The motivation of this is that COLO will need to do suspend/resume continuously, we need a more common suspend state. After

[Xen-devel] [PATCH v5 COLOPre 11/18] tools/libxl: Add back channel to allow migration target send data back

2015-12-16 Thread Wen Congyang
From: Yang Hongyang In colo mode, slave needs to send data to master, but the io_fd only can be written in master, and only can be read in slave. Save recv_fd in domain_suspend_state, and send_fd in domain_create_state. Extend libxl_domain_create_restore API, add a send_fd param to it. Add LIBXL_

[Xen-devel] [PATCH v5 COLOPre 10/18] tools/libxl: export logdirty_init

2015-12-16 Thread Wen Congyang
From: Yang Hongyang We need to enable logdirty on secondary, so we export logdirty_init for internal use. Rename it to libxl__logdirty_init. Signed-off-by: Yang Hongyang Signed-off-by: Wen Congyang Acked-by: Ian Campbell --- tools/libxl/libxl_dom_save.c | 4 ++-- tools/libxl/libxl_internal.h

[Xen-devel] [PATCH v5 COLOPre 05/18] tools/libxc: support to resume uncooperative HVM guests

2015-12-16 Thread Wen Congyang
Befor this patch: 1. suspend a. PVHVM and PV: we use the same way to suspend the guest (send the suspend request to the guest). If the guest doesn't support evtchn, the xenstore variant will be used, suspending the guest via XenBus control node. b. pure HVM: we call xc_domain_shutdown(..., SH

[Xen-devel] [PATCH v5 COLOPre 08/18] tools/libxl: introduce libxl__domain_restore_device_model to load qemu state

2015-12-16 Thread Wen Congyang
From: Yang Hongyang In normal migration, the qemu state was passed to qemu as a parameter. With COLO, Secondary vm is running. So we will do the following steps at every checkpoint: 1. suspend both primary vm and secondary vm 2. sync the state 3. resume both primary vm and secondary vm Primary wi

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

2015-12-16 Thread osstest service owner
flight 66415 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/66415/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds 15 guest-start/debian.repeatfail like 65748 test-amd64-i386-xl-qemut-stub

[Xen-devel] [xen-unstable baseline-only test] 38525: regressions - trouble: broken/fail/pass

2015-12-16 Thread Platform Team regression test user
This run is configured for baseline tests only. flight 38525 xen-unstable real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/38525/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-debianhvm-amd64-xsm 2

[Xen-devel] Garbled serial console output

2015-12-16 Thread Harmandeep Kaur
Hi, I tried to setup xen serial console with this guide, http://wiki.xen.org/wiki/Xen_Serial_Console I am using RS232 -USB cable for this purpose. I am on Ubuntu 15.10 (4.2.0-19-generic). xl info http://paste2.org/F2UgY5yz My output is garbled. http://paste2.org/tZveaAGU I will appreciate any

Re: [Xen-devel] how to enable kdb for xen

2015-12-16 Thread quizyjones
Thanks a lot and looking forward to that. > Date: Wed, 16 Dec 2015 09:42:47 -0500 > Subject: Re: [Xen-devel] how to enable kdb for xen > From: ufimts...@gmail.com > To: konrad.w...@oracle.com > CC: quizy_jo...@outlook.com; xen-devel@lists.xen.org; > elena.ufimts...@oracle.com; t...@xen.org > > O

Re: [Xen-devel] xen panics when setting int3 traps

2015-12-16 Thread quizyjones
Sorry for the late reply, there is something wrong in network which makes the email not delivered successfully.The inject method is by using xc_map_foreign_range to map the address of the nested xen and memcpy the trap to the specific location. If there is a problem, it should be the xc_map_

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

2015-12-16 Thread osstest service owner
flight 66413 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/66413/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-raw 5 xen-install fail REGR. vs. 65654 Regressions which are reg

[Xen-devel] [PATCH 3.13.y-ckt 24/78] x86/cpu: Fix SMAP check in PVOPS environments

2015-12-16 Thread Kamal Mostafa
3.13.11-ckt32 -stable review patch. If anyone has any objections, please let me know. -- From: Andrew Cooper commit 581b7f158fe0383b492acd1ce3fb4e99d4e57808 upstream. There appears to be no formal statement of what pv_irq_ops.save_fl() is supposed to return precisely. Native

[Xen-devel] [3.13.y-ckt stable] Patch "x86/cpu: Fix SMAP check in PVOPS environments" has been added to staging queue

2015-12-16 Thread Kamal Mostafa
This is a note to let you know that I have just added a patch titled x86/cpu: Fix SMAP check in PVOPS environments to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree which can be found at: http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.13.y-queue This

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

2015-12-16 Thread osstest service owner
flight 66410 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/66410/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-rumpuserxen-i386 10 guest-start fail REGR. vs. 63732 test-amd64-amd64-xl-qe

Re: [Xen-devel] How to change/set preferred SSL cipher suite for relocation (migration)?

2015-12-16 Thread Alireza Vaezi
On 12/16/15, Ian Campbell wrote: > On Wed, 2015-12-16 at 01:01 +0330, Alireza Vaezi wrote: >> I'm using Xen 4.4.2 and I need to be able to change or set my preferred >> (available) ssl cipher suit like RC4-SHA, or DES-CBC-SHA , etc. to be >> further used in relocation/migration of domU via ssl. >>

Re: [Xen-devel] [PATCH XEN v7 01/29] stubdom: recurse into tools/include in mk-headers-$(XEN_TARGET_ARCH) rule

2015-12-16 Thread Samuel Thibault
Ian Campbell, on Wed 16 Dec 2015 12:31:08 +, wrote: > ... rather than in the libxc rule. > > This puts all the header dependencies in one place and will allow us > to avoid races when more libraries which need these headers are > introduced. I observed issues with the xen-foreign/tmp.size file

[Xen-devel] [linux-mingo-tip-master test] 66412: regressions - FAIL

2015-12-16 Thread osstest service owner
flight 66412 linux-mingo-tip-master real [real] http://logs.test-lab.xenproject.org/osstest/logs/66412/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-pvops 5 kernel-build fail REGR. vs. 60684 build-i386

[Xen-devel] [PATCH RFC 24/31] tools/stubs: Expose host levelling capabilities to userspace

2015-12-16 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: David Scott CC: Rob Hoes --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_misc.c | 14 ++ tools/ocaml/libs/xc/xenctrl.ml | 2 ++ tools/ocaml/libs/xc/xenctrl.mli

[Xen-devel] [PATCH RFC 20/31] x86: Improvements to in-hypervisor cpuid sanity checks

2015-12-16 Thread Andrew Cooper
* Use the boot-generated pv and hvm featureset to clamp the visible features, rather than picking and choosing at individual features. This subsumes most of the feature availability checks. * More use of compiler-visible &'s and |'s, rather than clear,set bit. * Remove logic which hides PSE36

[Xen-devel] [PATCH RFC 10/31] xen/x86: Calculate HVM featureset

2015-12-16 Thread Andrew Cooper
For HVM guests, there are two different featuresets, depending on whether hap or shadow mode is used. HVM Shadow guests are strictly more capable than PV guests, and HVM HAP are strictly more capable than HVM Shadow; this is represented in the way the HVM shadow and HAP masks are expressed. Signe

[Xen-devel] [PATCH RFC 30/31] x86/domctl: Update PV domain cpumasks when setting cpuid policy

2015-12-16 Thread Andrew Cooper
This allows PV domains with different featuresets to observe different values from a native cpuid instruction, on supporting hardware. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/domctl.c | 68 +++ 1 file changed, 68 insertio

[Xen-devel] [PATCH RFC 22/31] x86/cpu: Move set_cpumask() calls into c_early_init()

2015-12-16 Thread Andrew Cooper
Before c/s 44e24f8567 "x86: don't call generic_identify() redundantly", the commandline-provided masks would take effect in Xen's view of the features. As the masks got applied after the query for features, the redundant call to generic_identify() would clobber the wrong feature information with t

[Xen-devel] [PATCH RFC 18/31] xen/x86: Improve disabling of features which have dependencies

2015-12-16 Thread Andrew Cooper
APIC and XSAVE have dependent features, which also need disabling if Xen chooses to disable a feature. Use setup_clear_cpu_cap() rather than clear_bit(), as it takes care of dependent features as well. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/apic.c | 4 ++-- xe

[Xen-devel] [PATCH RFC 26/31] xen/x86: Rework AMD masking MSR setup

2015-12-16 Thread Andrew Cooper
This patch is best reviewed as its end result rather than as a diff, as it rewrites almost all of the setup. On the BSP, cpuid information is used to evaluate the potential available set of masking MSRs, and they are unconditionally probed, filling in the availability information and hardware defa

[Xen-devel] [PATCH RFC 21/31] x86/domctl: Break out logic to update domain state from cpuid information

2015-12-16 Thread Andrew Cooper
Later changes will add to this logic. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/domctl.c | 64 --- 1 file changed, 35 insertions(+), 29 deletions(-) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index bf62a88.

[Xen-devel] [PATCH RFC 14/31] tools/libxc: Use featureset rather than guesswork

2015-12-16 Thread Andrew Cooper
It is conceptually wrong to base a VM's featureset on the features visible to the toolstack which happens to construct it. Instead, the featureset used is either an explicit one passed by the toolstack, or the default which Xen believes it can give to the guest. Signed-off-by: Andrew Cooper ---

[Xen-devel] [PATCH RFC 17/31] xen/x86: Clear dependent features when clearing a cpu cap

2015-12-16 Thread Andrew Cooper
When clearing a cpu cap, clear all dependent features. This avoids having a featureset with intermediate features disabled, but leaf features enabled. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/cpu/common.c | 16 1 file changed, 16 insertions(+) diff --

[Xen-devel] [PATCH RFC 25/31] xen/x86: Common infrastructure for levelling context switching

2015-12-16 Thread Andrew Cooper
Future changes will make use of this to advertise availability of levelling support, and to provide lazy context switching. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/cpu/common.c| 3 +++ xen/include/asm-x86/cpufeature.h | 1 + xen/include/asm-x86/processor.h |

[Xen-devel] [PATCH RFC 29/31] x86/pv: Provide custom cpumasks for PV domains

2015-12-16 Thread Andrew Cooper
And use them in preference to cpumask_defaults on context switch. HVM domains must not be masked (to avoid interfering with cpuid calls within the guest), so always lazily context switch to the host default. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/cpu/amd.c | 4

[Xen-devel] [PATCH RFC 23/31] xen/x86: Export cpuid levelling capabilities via SYSCTL

2015-12-16 Thread Andrew Cooper
This allows the toolstack to query what exactly Xen can control in a PV guest issuing a native `cpuid` instruction. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Tim Deegan CC: Ian Campbell --- xen/arch/x86/cpu/common.c | 3 +++ xen/arch/x86/sysctl.c | 6 ++ xen/i

[Xen-devel] [PATCH RFC 15/31] x86: Generate deep dependencies of x86 features

2015-12-16 Thread Andrew Cooper
Some features depend on other features. Working out and maintaining the exact dependency tree is complicated, so it is expressed in script form instead. `gen-feature-deps.py` parses 'xen/include/public/arch-x86/featureset.h' (To obtain some literal names conforming to the API), contains some sing

[Xen-devel] [PATCH RFC 19/31] tools/libxc: Sanitise guest featuresets

2015-12-16 Thread Andrew Cooper
When generating a VM featureset, clearing individual features is problematic if a feature has dependent features. Instead of disabling individual features, collect all disabling together in sanitise_featureset(), and perform deep dependency removal on the result, to remove all impacted features.

[Xen-devel] [PATCH RFC 27/31] xen/x86: Rework Intel masking/faulting setup

2015-12-16 Thread Andrew Cooper
This patch is best reviewed as its end result rather than as a diff, as it rewrites almost all of the setup. On the BSP, cpuid information is used to evaluate the potential available set of masking MSRs, and they are unconditionally probed, filling in the availability information and hardware defa

[Xen-devel] [PATCH RFC 12/31] tools: Utility for dealing with featuresets

2015-12-16 Thread Andrew Cooper
It is able to reports the current featuresets; both the static masks and dynamic featuresets from Xen, or to decode an arbitrary featureset into `/proc/cpuinfo` style strings. Signed-off-by: Andrew Cooper --- CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- .gitignore

[Xen-devel] [PATCH RFC 28/31] xen/x86: Context switch all levelling state in context_switch()

2015-12-16 Thread Andrew Cooper
A single ctxt_switch_levelling() function pointer is provided (defaulting to an empty nop), which is overridden in the appropriate $VENDOR_init_levelling(). set_cpuid_faulting() is made private and included within intel_ctxt_switch_levelling() Signed-off-by: Andrew Cooper --- CC: Jan Beulich --

[Xen-devel] [PATCH RFC 11/31] xen/x86: Calculate Raw featureset

2015-12-16 Thread Andrew Cooper
Calculate and expose the raw featureset to userspace. This is for informational purposes; the difference between the raw and the host featuresets are the features Xen has specifically chosen not to use. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Tim Deegan CC: Ian Campbell --- xen/

[Xen-devel] [PATCH RFC 13/31] tools/libxc: Wire a featureset through to cpuid policy logic

2015-12-16 Thread Andrew Cooper
Later changes will cause the cpuid generation logic to seed their information from a featureset. This patch adds the infrastructure to specify a featureset, and will obtain the appropriate default from Xen if omitted. Signed-off-by: Andrew Cooper --- CC: Ian Campbell CC: Ian Jackson CC: Wei Li

[Xen-devel] [PATCH RFC 16/31] x86: Automatically generate known_features

2015-12-16 Thread Andrew Cooper
Use the new gen-feature-deps.py infrastructure to automatically generate known_features[], rather than requiring people to patch two places to add a new feature for hypervisor use. Signed-off-by: Andrew Cooper --- CC: Jan Beulich TODO: Probably move the introduction of gen-feature-deps.py earie

[Xen-devel] [PATCH RFC 31/31] tools/libxc: Calculate xstate cpuid leaf from guest information

2015-12-16 Thread Andrew Cooper
It is unsafe to generate the guests xstate leaves from host information, as it prevents the differences between hosts from being hidden. Signed-off-by: Andrew Cooper --- CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxc/xc_cpuid_x86.c | 44 ++

[Xen-devel] [PATCH RFC 06/31] xen/x86: Infrastructure to calculate guest featuresets

2015-12-16 Thread Andrew Cooper
Guest featuresets are seeded from the host featureset, and the host featureset has calculated in the front of boot_cpu_data.x86_capability. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/Makefile | 1 + xen/arch/x86/cpuid.c| 23 +++ xen/arch

[Xen-devel] [PATCH RFC 00/31] x86: Improvements to cpuid handling for guests

2015-12-16 Thread Andrew Cooper
Presented here is v1 of my work to improve cpuid levelling for guests. This series is very close to what is now present in XenServer trunk, and testing is going well. This series is available in git form at: http://xenbits.xen.org/git-http/people/andrewcoop/xen.git levelling-v1 This entire ser

[Xen-devel] [PATCH RFC 09/31] xen/x86: Calculate PV featureset

2015-12-16 Thread Andrew Cooper
The PV featuremask is the collection of features a PV guest can safely use (i.e. has support in Xen, or needs no hypervisor support). The PV guest featureset is then the host featureset, clipped to the PV mask. As part of this work, I introduced all the remaining bits in leaf 7 which can be enabl

[Xen-devel] [PATCH RFC 08/31] tools/stubs: Expose host featureset to userspace

2015-12-16 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: David Scott CC: Rob Hoes --- tools/libxc/include/xenctrl.h | 3 +++ tools/libxc/xc_misc.c | 27 +++ tools/ocaml/libs/xc/xenctrl.ml | 3 +++ tools/ocaml/libs/xc

[Xen-devel] [PATCH RFC 04/31] xen/x86: Mask out unknown features from Xen's capabilities

2015-12-16 Thread Andrew Cooper
If Xen doesn't know about a feature, it is unsafe for use and should be deliberately hidden from Xen's capabilities. This doesn't make a practical difference yet, but will make a difference later when the guest featuresets are seeded from the host featureset. Signed-off-by: Andrew Cooper --- CC:

[Xen-devel] [PATCH RFC 03/31] xen/x86: Store antifeatures inverted in a featureset

2015-12-16 Thread Andrew Cooper
Awkwardly, some new feature bits mean "Feature $X no longer works". Store these inverted in a featureset. This permits safe zero-extending of a smaller featureset as part of a comparison, and safe reasoning (subset?, superset?, compatible? etc.) without specific knowldge of meaning of each bit. S

[Xen-devel] [PATCH RFC 05/31] xen/x86: Collect more CPUID feature words

2015-12-16 Thread Andrew Cooper
New words are: * 0x0007:0.ecx - New for Intel Skylake processors * 0x8007.edx - Contains Invarient TSC * 0x8008.ebx - Newly used for AMD Zen processors In addition, replace a lot of open-coded Invarient TSC manipulation. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/a

[Xen-devel] [PATCH RFC 02/31] tools/libxc: Use public/featureset.h for cpuid policy generation

2015-12-16 Thread Andrew Cooper
Rather than having a different local copy of some of the feature definitions. Modify the xc_cpuid_x86.c cpumask helpers to appropriate truncate the new values, and add X86_FEATURE_TSC_ADJUST to the public API to allow libxc to continue compiling. Signed-off-by: Andrew Cooper --- CC: Jan Beulich

[Xen-devel] [PATCH RFC 01/31] xen/public: Export featureset information in the public API

2015-12-16 Thread Andrew Cooper
For the featureset to be a useful object, it needs a stable interpretation, a property which is missing from the current hw_caps interface. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Tim Deegan CC: Ian Campbell --- xen/include/asm-x86/cpufeature.h | 175 +

[Xen-devel] [PATCH RFC 07/31] xen/x86: Export host featureset via SYSCTL

2015-12-16 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Tim Deegan CC: Ian Campbell --- xen/arch/x86/sysctl.c | 51 + xen/include/public/sysctl.h | 20 ++ 2 files changed, 71 insertions(+) diff --git a/xen/arch/x86/sysctl.c b/xen/

[Xen-devel] [linux-linus bisection] complete test-amd64-i386-xl-qemuu-winxpsp3-vcpus1

2015-12-16 Thread osstest service owner
branch xen-unstable xenbranch xen-unstable job test-amd64-i386-xl-qemuu-winxpsp3-vcpus1 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-tr

Re: [Xen-devel] [PATCH] x86/PCI: Intercept Dom0 MMCFG from dom0s in HVM containers

2015-12-16 Thread Boris Ostrovsky
On 12/16/2015 04:04 AM, Jan Beulich wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3116,6 +3116,21 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned long gla, goto out_put_gfn; } +if ( (p2mt == p2m_mmio_direct) && is_hardware_domain(currd) )

Re: [Xen-devel] [PATCH XEN v7 07/29] tools: Refactor /dev/xen/gnt{dev, shr} wrappers into libxengnttab.

2015-12-16 Thread Andrew Cooper
On 16/12/15 12:31, Ian Campbell wrote: > libxengnttab will provide a stable API and ABI for accessing the > grant table devices. > > The functions are moved into the xengnt{tab,shr} namespace to make a > clean break from libxc and avoid ambiguity regarding which interfaces > are stable. > > All in-

Re: [Xen-devel] [PATCH RFC XEN v1 09/14] xen: arm: Save and restore GIC state.

2015-12-16 Thread Stefano Stabellini
On Wed, 9 Dec 2015, Ian Campbell wrote: > Currently only GICv2 support is implemented. > > Given the differing architectural state between the GICv2 and v3 I > ended up with separate save records. I'm not sure if this is the best > plan. I have also split the state into GICD (per domain) and GICC

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

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

Re: [Xen-devel] [PATCH v3 6/6] xl: Return error code on save

2015-12-16 Thread George Dunlap
On 01/12/15 11:53, George Dunlap wrote: > save_domain was already constructing an error code; it just wasn't > being used. > > Signed-off-by: George Dunlap > --- > CC: Ian Campbell > CC: Ian Jackson > CC: Wei Liu > --- > tools/libxl/xl_cmdimpl.c | 3 +-- > 1 file changed, 1 insertion(+), 2 de

[Xen-devel] [linux-3.16 test] 66400: regressions - FAIL

2015-12-16 Thread osstest service owner
flight 66400 linux-3.16 real [real] http://logs.test-lab.xenproject.org/osstest/logs/66400/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-rumpuserxen-i386 10 guest-start fail REGR. vs. 64969 test-amd64-i386-xl-qem

Re: [Xen-devel] [PATCH RFC XEN v1 08/14] xen: arm: Save and restore arch timer state.

2015-12-16 Thread Stefano Stabellini
On Wed, 16 Dec 2015, Ian Campbell wrote: > On Wed, 2015-12-16 at 15:53 +, Stefano Stabellini wrote: > > On Wed, 9 Dec 2015, Ian Campbell wrote: > > > Signed-off-by: Ian Campbell > > > --- > > >  xen/arch/arm/vtimer.c  | 72 > > > ++ > > >  xen/inc

Re: [Xen-devel] [PATCHv4 2/2] x86/ept: defer the invalidation until the p2m lock is released

2015-12-16 Thread David Vrabel
On 14/12/15 14:39, David Vrabel wrote: > Holding the p2m lock while calling ept_sync_domain() is very expensive > since it does a on_selected_cpus() call. IPIs on many socket machines > can be very slows and on_selected_cpus() is serialized. > > Defer the invalidate until the p2m lock is released

[Xen-devel] [PATCH 3.19.y-ckt 028/128] x86/cpu: Fix SMAP check in PVOPS environments

2015-12-16 Thread Kamal Mostafa
3.19.8-ckt12 -stable review patch. If anyone has any objections, please let me know. -- From: Andrew Cooper commit 581b7f158fe0383b492acd1ce3fb4e99d4e57808 upstream. There appears to be no formal statement of what pv_irq_ops.save_fl() is supposed to return precisely. Native

Re: [Xen-devel] [V3 PATCH 7/9] x86/hvm: pkeys, add pkeys support for guest_walk_tables

2015-12-16 Thread Tim Deegan
At 16:34 + on 16 Dec (1450283699), Andrew Cooper wrote: > On 16/12/15 16:28, Tim Deegan wrote: > > Hi, > > > > At 15:36 + on 16 Dec (1450280191), George Dunlap wrote: > >> (hvm_fetch_from_guest_virt() seems to only set PFEC_insn_fetch if nx or > >> smep are enabled in the guest. This seems

[Xen-devel] [PATCH XEN-BONUS v7] tools/libs/*: Introduce APIs to restrict handles to a specific domain.

2015-12-16 Thread Ian Campbell
These are intended to allow user space processes (in particular QEMU) to lock down all the handles at start of day and then drop the privileges which would allow them to open any new unrestricted handles (e.g. setuid or similar). This will reduce the privileges which taking over such a process woul

Re: [Xen-devel] [V3 PATCH 7/9] x86/hvm: pkeys, add pkeys support for guest_walk_tables

2015-12-16 Thread Tim Deegan
At 16:50 + on 16 Dec (1450284615), George Dunlap wrote: > On 16/12/15 16:28, Tim Deegan wrote: > > Hi, > > > > At 15:36 + on 16 Dec (1450280191), George Dunlap wrote: > >> (hvm_fetch_from_guest_virt() seems to only set PFEC_insn_fetch if nx or > >> smep are enabled in the guest. This seem

Re: [Xen-devel] [PATCH v3 1/6] xl: Return proper error codes for block-attach and block-detach

2015-12-16 Thread George Dunlap
On 16/12/15 16:53, George Dunlap wrote: > On 08/12/15 17:15, Ian Campbell wrote: >> On Tue, 2015-12-01 at 11:53 +, George Dunlap wrote: >>> Return proper error codes on failure so that scripts can tell whether >>> the command completed properly or not. >>> >>> Also while we're at it, normalize

Re: [Xen-devel] [PATCH] x86: Make debug output consistent in hvm_set_callback_via

2015-12-16 Thread Jan Beulich
>>> On 16.12.15 at 17:10, wrote: > The unconditional printks in the switch statement of the > hvm_set_callback_via function results in Xen log spam in non debug > versions of Xen. Oh, now I see - that's because dprintk() is a no-op inline nowadays. > --- a/xen/arch/x86/hvm/irq.c > +++ b/xen/arch

Re: [Xen-devel] [PATCH] build: convert CONFIG_COMPAT to Kconfig

2015-12-16 Thread Jan Beulich
>>> On 16.12.15 at 13:00, wrote: > Use the Kconfig generated CONFIG_COMPAT defines in the code base. > > CC: Keir Fraser > CC: Jan Beulich > CC: Andrew Cooper > Signed-off-by: Doug Goldstein > --- > config/x86_64.mk | 1 - > xen/arch/x86/Kconfig | 1 + > xen/common/Kconfig | 7 +++

Re: [Xen-devel] [PATCH v2] x86/HVM: Merge HVM and PVH hypercall tables

2015-12-16 Thread Konrad Rzeszutek Wilk
On Wed, Dec 16, 2015 at 11:34:07AM -0500, Boris Ostrovsky wrote: > The tables are almost identical and therefore there is little reason to > keep both sets. > > PVH needs 3 extra hypercalls: > * mmuext_op. MMUEXT_PIN_L_TABLE are required by control domain (dom0) > when building guests. > * platf

Re: [Xen-devel] [PATCH v3 1/6] xl: Return proper error codes for block-attach and block-detach

2015-12-16 Thread George Dunlap
On 08/12/15 17:15, Ian Campbell wrote: > On Tue, 2015-12-01 at 11:53 +, George Dunlap wrote: >> Return proper error codes on failure so that scripts can tell whether >> the command completed properly or not. >> >> Also while we're at it, normalize init and dispose of >> libxl_device_disk struct

Re: [Xen-devel] [V3 PATCH 7/9] x86/hvm: pkeys, add pkeys support for guest_walk_tables

2015-12-16 Thread George Dunlap
On 16/12/15 16:28, Tim Deegan wrote: > Hi, > > At 15:36 + on 16 Dec (1450280191), George Dunlap wrote: >> (hvm_fetch_from_guest_virt() seems to only set PFEC_insn_fetch if nx or >> smep are enabled in the guest. This seems inconsistent to me with the >> treatment of PFEC_reserved_bit: it seem

Re: [Xen-devel] [PATCH RFC XEN v1 08/14] xen: arm: Save and restore arch timer state.

2015-12-16 Thread Ian Campbell
On Wed, 2015-12-16 at 16:17 +, Julien Grall wrote: > Hi, > > On 16/12/15 16:02, Ian Campbell wrote: > > The PPI state is saved by the GIC. Perhaps we should save the actual > > number > > used by the guest here though. > > I think we have to save the actual number as we don't guarantee that t

Re: [Xen-devel] [PATCH RFC XEN v1 12/14] tools: libxc: implement modify_returncode for ARM.

2015-12-16 Thread Ian Campbell
On Wed, 2015-12-16 at 16:22 +, Stefano Stabellini wrote: > On Wed, 9 Dec 2015, Ian Campbell wrote: > > Signed-off-by: Ian Campbell > > --- > >  tools/libxc/xc_resume.c | 18 ++ > >  1 file changed, 18 insertions(+) > > > > diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_r

Re: [Xen-devel] [V3 PATCH 7/9] x86/hvm: pkeys, add pkeys support for guest_walk_tables

2015-12-16 Thread Andrew Cooper
On 16/12/15 16:28, Tim Deegan wrote: > Hi, > > At 15:36 + on 16 Dec (1450280191), George Dunlap wrote: >> (hvm_fetch_from_guest_virt() seems to only set PFEC_insn_fetch if nx or >> smep are enabled in the guest. This seems inconsistent to me with the >> treatment of PFEC_reserved_bit: it seems

[Xen-devel] [PATCH v2] x86/HVM: Merge HVM and PVH hypercall tables

2015-12-16 Thread Boris Ostrovsky
The tables are almost identical and therefore there is little reason to keep both sets. PVH needs 3 extra hypercalls: * mmuext_op. MMUEXT_PIN_L_TABLE are required by control domain (dom0) when building guests. * platform_op. These are only available to privileged domains. We will (eventually)

Re: [Xen-devel] [V3 PATCH 7/9] x86/hvm: pkeys, add pkeys support for guest_walk_tables

2015-12-16 Thread Tim Deegan
Hi, At 15:36 + on 16 Dec (1450280191), George Dunlap wrote: > (hvm_fetch_from_guest_virt() seems to only set PFEC_insn_fetch if nx or > smep are enabled in the guest. This seems inconsistent to me with the > treatment of PFEC_reserved_bit: it seems like > hvm_fetch_from_guest_virt() should al

Re: [Xen-devel] [PATCH RFC XEN v1 12/14] tools: libxc: implement modify_returncode for ARM.

2015-12-16 Thread Stefano Stabellini
On Wed, 9 Dec 2015, Ian Campbell wrote: > Signed-off-by: Ian Campbell > --- > tools/libxc/xc_resume.c | 18 ++ > 1 file changed, 18 insertions(+) > > diff --git a/tools/libxc/xc_resume.c b/tools/libxc/xc_resume.c > index 87d4324..fa16c3e 100644 > --- a/tools/libxc/xc_resume.c > +

Re: [Xen-devel] [PATCH RFC XEN v1 08/14] xen: arm: Save and restore arch timer state.

2015-12-16 Thread Julien Grall
Hi, On 16/12/15 16:02, Ian Campbell wrote: > The PPI state is saved by the GIC. Perhaps we should save the actual number > used by the guest here though. I think we have to save the actual number as we don't guarantee that the interrupt (and memory layout BTW) for the guest won't change between 2

[Xen-devel] [PATCH] x86: Make debug output consistent in hvm_set_callback_via

2015-12-16 Thread Malcolm Crossley
The unconditional printks in the switch statement of the hvm_set_callback_via function results in Xen log spam in non debug versions of Xen. The printks are for debug output only so conditionally compile the entire switch statement on debug versions of Xen only. --- xen/arch/x86/hvm/irq.c | 4 +++-

Re: [Xen-devel] [PATCHv3 1/2] x86/ept: invalidate guest physical mappings on VMENTER

2015-12-16 Thread George Dunlap
On 14/12/15 14:41, David Vrabel wrote: > On 07/12/15 10:25, George Dunlap wrote: >> >> I took the past tense ("synced") to mean, "These CPUs have been >> brought into sync (or are no longer out of sync)". So they start out >> not-synced, so you initialize the bit to be clear; when an INVEPT is >>

Re: [Xen-devel] [PATCH RFC XEN v1 08/14] xen: arm: Save and restore arch timer state.

2015-12-16 Thread Ian Campbell
On Wed, 2015-12-16 at 15:53 +, Stefano Stabellini wrote: > On Wed, 9 Dec 2015, Ian Campbell wrote: > > Signed-off-by: Ian Campbell > > --- > >  xen/arch/arm/vtimer.c  | 72 > > ++ > >  xen/include/public/arch-arm/hvm/save.h | 15 ++- > >  2 fil

Re: [Xen-devel] [PATCH RFC XEN v1 08/14] xen: arm: Save and restore arch timer state.

2015-12-16 Thread Stefano Stabellini
On Wed, 9 Dec 2015, Ian Campbell wrote: > Signed-off-by: Ian Campbell > --- > xen/arch/arm/vtimer.c | 72 > ++ > xen/include/public/arch-arm/hvm/save.h | 15 ++- > 2 files changed, 86 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/arm

Re: [Xen-devel] [V3 PATCH 7/9] x86/hvm: pkeys, add pkeys support for guest_walk_tables

2015-12-16 Thread George Dunlap
[Adding Tim, the previous mm maintainer] On 11/12/15 09:16, Wu, Feng wrote: >>> +{ >>> +void *xsave_addr; >>> +unsigned int pkru = 0; >>> +bool_t pkru_ad, pkru_wd; >>> + >>> +bool_t uf = !!(pfec & PFEC_user_mode); >>> +bool_t wf = !!(pfec & PFEC_write_access); >>> +bool_t f

Re: [Xen-devel] [PATCH] tools: allow configure time choice of libexec subdirectory.

2015-12-16 Thread Ian Campbell
On Wed, 2015-12-16 at 15:06 +, Ian Campbell wrote: > -XENFIRMWAREDIR=`eval echo $libexecdir/$PACKAGE_TARNAME/boot` > +dnl These variables will be substituted in various .in files > +LIBEXEC_BIN=${LIBEXEC}/bin > +AC_SUBST(LIBEXEC_BIN) > +LIBEXEC_LIB=${LIBEXEC}/lib > +AC_SUBST(LIBEXEC_LIB) > +LIB

[Xen-devel] [distros-debian-snapshot test] 38518: tolerable FAIL

2015-12-16 Thread Platform Team regression test user
flight 38518 distros-debian-snapshot real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/38518/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-i386-i386-daily-netboot-pvgrub 9 debian-di-install fail like 38464 test-amd64-i38

Re: [Xen-devel] [PATCH v13 5/8] xen: Add vmware_port support

2015-12-16 Thread Jan Beulich
>>> On 28.11.15 at 22:45, wrote: > --- > v13: > Changed to uint32_t arch_flags, since the emulation_flags is this. I don't really understand this sentence, and I also don't understand why you couldn't just use another XEN_X86_EMU_ flag, e.g. XEN_X86_EMU_VMWARE_PORT (which would be the first one

[Xen-devel] [PATCH] tools: allow configure time choice of libexec subdirectory.

2015-12-16 Thread Ian Campbell
Currently we hardcode various paths such as $libexec/xen/{bin,boot}, however some downstreams (notably Debian) would like instead to install things into $libexec/xen-X.Y/{bin,boot} as part of allowing multiple versions of the tools packages to be installed. Since this currently involves patching c

Re: [Xen-devel] [PATCH RFC XEN v1 07/14] xen: arm: Save and restore basic per-VCPU state.

2015-12-16 Thread Ian Campbell
On Wed, 2015-12-16 at 14:55 +, Stefano Stabellini wrote: > On Wed, 9 Dec 2015, Ian Campbell wrote: > > XXX TBD No support for arm64 (or even 32-bit guest on arm64). > > XXX In particular the handling of save/restore of VFP state doesn't > > XXX even compile for arm32. I need to investigate the

  1   2   3   >