Re: [Xen-devel] [PATCH v2 3/3] x86/ioreq server: Add HVMOP to map guest ram with p2m_ioreq_server to an ioreq server

2016-04-07 Thread Yu, Zhang
Thanks for your advices and good questions. :) On 4/7/2016 1:13 AM, George Dunlap wrote: On Thu, Mar 31, 2016 at 11:53 AM, Yu Zhang wrote: A new HVMOP - HVMOP_map_mem_type_to_ioreq_server, is added to let one ioreq server claim/disclaim its responsibility for the handling of guest pages with p

Re: [Xen-devel] [PATCH v9 2/3] VT-d: wrap a _sync version for all VT-d flush interfaces

2016-04-07 Thread Xu, Quan
On April 05, 2016 5:35pm, Jan Beulich wrote: > >>> On 01.04.16 at 16:47, wrote: > > The dev_invalidate_iotlb() scans ats_devices list to flush ATS > > devices, and the invalidate_sync() is put after dev_invalidate_iotlb() > > to synchronize with hardware for flush status. If we assign multiple >

Re: [Xen-devel] Running Xen on Nvidia Jetson-TK1

2016-04-07 Thread Dushyant Behl
Hello, On Fri, Apr 1, 2016 at 3:34 PM, Julien Grall wrote: > Hello Dushyant, > > On 29/03/16 21:56, Dushyant Behl wrote: >> >> On Wed, Mar 30, 2016 at 12:31 AM, Julien Grall >> wrote: >>> >>> On 24/03/16 11:05, Dushyant Behl wrote: > > >> (XEN) DOM0: [0.00] irq: no irq domain found for >

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

2016-04-07 Thread osstest service owner
flight 89242 linux-3.16 real [real] http://logs.test-lab.xenproject.org/osstest/logs/89242/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-libvirt-pair 21 guest-migrate/src_host/dst_host fail REGR. vs. 85048 Tests which are

Re: [Xen-devel] [PATCH 2/2] libxl: Do not leak data on error path from libxl__read_sysfs_file_contents

2016-04-07 Thread Chun Yan Liu
>>> On 4/4/2016 at 11:10 PM, in message <1459782600-16073-2-git-send-email-ian.jack...@eu.citrix.com>, Ian Jackson wrote: > Bug introduced in bc023ecd > "libxl_utils: add internal function to read sysfs file contents" > > CID: 1358108 > Signed-off-by: Ian Jackson > CC: cover...@xenprojec

Re: [Xen-devel] [PATCH 1/2] libxl: Set rc on failure of usbdev_busaddr_to_busid

2016-04-07 Thread Chun Yan Liu
Thanks, Ian! >>> On 4/4/2016 at 11:09 PM, in message <1459782600-16073-1-git-send-email-ian.jack...@eu.citrix.com>, Ian Jackson wrote: > We must set rc before using `goto out'. > > Bug introduced in bf7628f0 "libxl: add pvusb API". > > CID: 1358113 > Signed-off-by: Ian Jackson > CC: cov

[Xen-devel] [PATCH] x86/emulate: Check current->arch.vm_event in hvmemul_virtual_to_linear()

2016-04-07 Thread Razvan Cojocaru
Theoretically it is possible for mem_access_emulate_each_rep to be true even when current->arch.vm_event == NULL, so add an extra check to hvmemul_virtual_to_linear(). Signed-off-by: Razvan Cojocaru --- xen/arch/x86/hvm/emulate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Xen-devel] Redundant lstats in libxl_pvusb.c

2016-04-07 Thread Chun Yan Liu
>>> On 4/4/2016 at 11:07 PM, in message <22274.33583.712655.413...@mariner.uk.xensource.com>, Ian Jackson wrote: > In libxl_usb.c, usbintf_get_drvpath calls stat(2) on the driver sysfs > path, and then realpath on the same path. It's true. This could be done by calling realpath only. Will co

Re: [Xen-devel] [PATCH v4 02/14] x86/xen: use X86_SUBARCH_XEN for PV guest boots

2016-04-07 Thread David Vrabel
On 07/04/16 01:06, Luis R. Rodriguez wrote: > The use of subarch should have no current effect on Xen > PV guests, as such this should have no current functional > effects. Reviewed-by: David Vrabel David ___ Xen-devel mailing list Xen-devel@lists.xen

[Xen-devel] [PATCH 4/4] fix a pvusb type check

2016-04-07 Thread Chunyan Liu
Missing a check of controller type. Signed-off-by: Chunyan Liu CC: Simon Cao CC: George Dunlap CC: Ian Jackson CC: Juergen Gross --- This affects Juergen's qusb patch too. Fix that together. This patch could be applied on top of Juergen's qusb backend patch. tools/libxl/libxl_pvusb.c | 7 ++

[Xen-devel] [PATCH 0/4] pvusb fixes

2016-04-07 Thread Chunyan Liu
Patch series of pvusb fixes. Chunyan Liu (4): a fix in libxl_device_usbdev_list correct libxl_write_exactly sizeof cleanup redundant lstat in libxl_pvusb.c fix a pvusb type check tools/libxl/libxl_pvusb.c | 38 +- 1 file changed, 17 insertions(+), 21 d

[Xen-devel] [PATCH 3/4] cleanup redundant lstat in libxl_pvusb.c

2016-04-07 Thread Chunyan Liu
CID: 1358112 Signed-off-by: Chunyan Liu CC: Simon Cao CC: George Dunlap CC: Ian Jackson --- tools/libxl/libxl_pvusb.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/tools/libxl/libxl_pvusb.c b/tools/libxl/libxl_pvusb.c index 45117cf..02d3e55 100644

[Xen-devel] [PATCH 2/4] correct libxl_write_exactly sizeof

2016-04-07 Thread Chunyan Liu
sizeof is wrongly used in libxl_write_exactly function, using strlen instead. CID: 1358110 CID: 1358109 Signed-off-by: Chunyan Liu CC: Simon Cao CC: George Dunlap CC: Ian Jackson --- tools/libxl/libxl_pvusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl

[Xen-devel] [PATCH 1/4] a fix in libxl_device_usbdev_list

2016-04-07 Thread Chunyan Liu
In testing with libvirt pvusb functionality, found a rc check error in libxl_device_usbdev_list. Correct it. This function is not used by xl. Signed-off-by: Chunyan Liu CC: Simon Cao CC: George Dunlap CC: Ian Jackson --- tools/libxl/libxl_pvusb.c | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [Xen-devel] [PATCH v4 04/14] x86/rtc: replace paravirt rtc check with platform legacy quirk

2016-04-07 Thread David Vrabel
On 07/04/16 01:06, Luis R. Rodriguez wrote: > We have 4 types of x86 platforms that disable RTC: > > * Intel MID > * Lguest - uses paravirt > * Xen dom-U - uses paravirt > * x86 on legacy systems annotated with an ACPI legacy flag > > We can consolidate all of these into a platform specif

Re: [Xen-devel] [PATCH v4 06/14] x86/init: use a platform legacy quirk for ebda

2016-04-07 Thread David Vrabel
On 07/04/16 01:06, Luis R. Rodriguez wrote: > > --- a/arch/x86/kernel/platform-quirks.c > +++ b/arch/x86/kernel/platform-quirks.c > @@ -7,8 +7,12 @@ > void __init x86_early_init_platform_quirks(void) > { > x86_platform.legacy.rtc = 1; > + x86_platform.legacy.ebda_search = 0; You shoul

Re: [Xen-devel] [PATCH v4 11/14] pnpbios: replace paravirt_enabled() check with legacy device check

2016-04-07 Thread David Vrabel
On 07/04/16 01:06, Luis R. Rodriguez wrote: > Since we are removing paravirt_enabled() replace it with a > logical equivalent. Even though PNPBIOS is x86 specific we > add an arch-specific type call, which can be implemented by > any architecture to show how other legacy attribute devices > can lat

Re: [Xen-devel] [PATCH 4/4] fix a pvusb type check

2016-04-07 Thread Juergen Gross
On 07/04/16 11:40, Chunyan Liu wrote: > Missing a check of controller type. > > Signed-off-by: Chunyan Liu > CC: Simon Cao > CC: George Dunlap > CC: Ian Jackson > CC: Juergen Gross Reviewed-by: Juergen Gross > --- > This affects Juergen's qusb patch too. Fix that together. This patch > cou

Re: [Xen-devel] [PATCH v3] xen/arm: map_dev_mmio_region: printk should be ratelimited

2016-04-07 Thread Julien Grall
Hi Shannon, On 07/04/16 07:28, Shannon Zhao wrote: From: Shannon Zhao The function map_dev_mmio_region is used in a hypercall. Therefore all printks should be ratelimited to avoid a malicious guest flooding the console. Signed-off-by: Shannon Zhao Reviewed-by: Konrad Rzeszutek Wilk Acked-

[Xen-devel] [RFC PATCH] Data integrity extension support for xen-block

2016-04-07 Thread Bob Liu
* What's data integrity extension and why? Modern filesystems feature checksumming of data and metadata to protect against data corruption. However, the detection of the corruption is done at read time which could potentially be months after the data was written. At that point the original data t

[Xen-devel] [linux-3.18 test] 89247: regressions - trouble: blocked/broken/fail/pass

2016-04-07 Thread osstest service owner
flight 89247 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/89247/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf 4 host-build-prep fail REGR. vs. 86513 test-amd64-amd64-xl-qe

Re: [Xen-devel] [PATCH v10 06/17] Xen: ARM: Add support for mapping platform device mmio

2016-04-07 Thread Julien Grall
Hi Shannon, On 07/04/16 02:37, Shannon Zhao wrote: On 2016/4/6 20:16, Julien Grall wrote: +gpfns[j] = XEN_PFN_DOWN(r->start) + j; +idxs[j] = XEN_PFN_DOWN(r->start) + j; +} + +xatp.domid = DOMID_SELF; +xatp.size = nr; +xatp.space = XENMAP

Re: [Xen-devel] [PATCH v10 00/17] Add ACPI support for Xen Dom0 on ARM64

2016-04-07 Thread Julien Grall
On 07/04/16 02:39, Shannon Zhao wrote: Hi Julien, Hi Shannon, On 2016/4/6 19:32, Julien Grall wrote: Hi Shannon, On 01/04/2016 16:48, Shannon Zhao wrote: This patch set adds ACPI support for Xen Dom0 on ARM64. The relevant Xen ACPI on ARM64 design document could be found from [1]. This pa

Re: [Xen-devel] [PATCH v1] libxc: fix uninitialized variable when changing rtds scheduling parameters

2016-04-07 Thread Ian Jackson
Andrew Cooper writes ("Re: [Xen-devel] [PATCH v1] libxc: fix uninitialized variable when changing rtds scheduling parameters"): > On 06/04/16 21:30, Chong Li wrote: > > Commit 046c2b503a89d21b41e4d555a9f75d02af00dbc6 introduces a build > > failure: in some cases (e.g., num_vcpus <=0), > > xc_sched

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

2016-04-07 Thread osstest service owner
flight 89251 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/89251/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ovmf-amd64 9 debian-hvm-install fail REGR. vs. 65543 test-amd64-amd64-xl-qemuu-ov

Re: [Xen-devel] Redundant lstats in libxl_pvusb.c

2016-04-07 Thread Ian Jackson
Chun Yan Liu writes ("Re: Redundant lstats in libxl_pvusb.c"): > <22274.33583.712655.413...@mariner.uk.xensource.com>, Ian Jackson > wrote: > > In libxl_usb.c, usbintf_get_drvpath calls stat(2) on the driver sysfs > > path, and then realpath on the same path. > > It's true. This could be done

Re: [Xen-devel] Redundant lstats in libxl_pvusb.c

2016-04-07 Thread Chun Yan Liu
>>> On 4/7/2016 at 06:43 PM, in message <22278.14817.248393.423...@mariner.uk.xensource.com>, Ian Jackson wrote: > Chun Yan Liu writes ("Re: Redundant lstats in libxl_pvusb.c"): > > <22274.33583.712655.413...@mariner.uk.xensource.com>, Ian Jackson > > wrote: > > > In libxl_usb.c, usbintf_g

[Xen-devel] [for-4.7] xen/arm64: correctly emulate the {w, x}zr registers

2016-04-07 Thread Julien Grall
On AArch64, encoding 31 for an R in the HSR is used to represent either {w,x}sp or {w,x}zr (See C1.2.4 in ARM DDI 0486A.d) depending on how the register field is interpreted by the instruction. All the instructions trapped by Xen (either via a sysreg access or data abort) interpret encoding 31 as

[Xen-devel] [for-4.7 3/5] xen/arm: acpi: Fix SMP support when booting with ACPI

2016-04-07 Thread Julien Grall
The variable enabled_cpus is used to know the number of CPU enabled in the MADT. Currently this variable is used to check the validity of the boot CPU. It will be considered invalid when "enabled_cpus > 1". However, this condition also means that multiple CPUs are present on the system. So second

[Xen-devel] [for-4.7 5/5] xen/arm: acpi: Print more error messages in acpi_map_gic_cpu_interface

2016-04-07 Thread Julien Grall
It's helpful to spot any error without having to modify the hypervisor code. Signed-off-by: Julien Grall --- xen/arch/arm/acpi/boot.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen/arch/arm/acpi/boot.c b/xen/arch/arm/acpi/boot.c index 602ab39..23285f7 100644 --- a/xen/arch/arm/ac

[Xen-devel] [for-4.7 4/5] xen/arm: acpi: Remove uncessary check in acpi_map_gic_cpu_interface

2016-04-07 Thread Julien Grall
This part of the code will never be executed when the entry corresponds to the boot CPU. Also print an error message rather when arch_cpu_init has failed. Signed-off-by: Julien Grall --- xen/arch/arm/acpi/boot.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a

[Xen-devel] [for-4.7 1/5] drivers/pl011: ACPI: The interrupt should always be high level triggered

2016-04-07 Thread Julien Grall
The SPCR does not specify if the interrupt is edge or level triggered. So the configuration needs to be hardcoded in the code. Based on the PL011 TRM (see 2.2.8 in ARM DDI 0183G), the interrupt generated will be active high. This wording implies the interrupt should be high level triggered. Note t

[Xen-devel] [for-4.7 2/5] xen/arm: acpi: The boot CPU does not always match the first entry in the MADT

2016-04-07 Thread Julien Grall
Since the ACPI 6.0 errata document [1], the first entry in the MADT does not have to correspond to the boot CPU. Introduce a new variable to know if a MADT entry matching the boot CPU is found. Furthermore, it's not necessary to check if the MPIDR is duplicated for the boot CPU. So the rest of the

[Xen-devel] [for-4.7 0/5] xen/arm: acpi: Bunch of fixes to use ACPI with SMP and PL011

2016-04-07 Thread Julien Grall
Hello, This patch series fixes secondary bring up and the use of the PL011 UART driver when Xen boots using ACPI. Regards, Cc: wei.l...@citrix.com Julien Grall (5): drivers/pl011: ACPI: The interrupt should always be high level triggered xen/arm: acpi: The boot CPU does not always match

[Xen-devel] [PATCH] bind_usbintf: do not reuse 'path'

2016-04-07 Thread Chunyan Liu
To avoid confusion, add a new variable "intf_path" to indicate driver/interface path, let "path" indicate driver/bind path only. CID: 1358111 Signed-off-by: Chunyan Liu CC: Simon Cao CC: George Dunlap CC: Ian Jackson --- tools/libxl/libxl_pvusb.c | 6 +++--- 1 file changed, 3 insertions(+),

Re: [Xen-devel] [PATCH v2 01/11] xen: sched: make implementing .alloc_pdata optional

2016-04-07 Thread George Dunlap
On 06/04/16 18:22, Dario Faggioli wrote: > The .alloc_pdata scheduler hook must, before this change, > be implemented by all schedulers --even those ones that > don't need to allocate anything. > > Make it possible to just use the SCHED_OP(), like for > the other hooks, by using ERR_PTR() and IS_E

Re: [Xen-devel] [PATCH v10 06/17] Xen: ARM: Add support for mapping platform device mmio

2016-04-07 Thread Shannon Zhao
On 2016/4/7 18:32, Julien Grall wrote: > Hi Shannon, > > On 07/04/16 02:37, Shannon Zhao wrote: >> >> >> On 2016/4/6 20:16, Julien Grall wrote: +gpfns[j] = XEN_PFN_DOWN(r->start) + j; +idxs[j] = XEN_PFN_DOWN(r->start) + j; +} + +xa

Re: [Xen-devel] [PATCH v4 26/26] tools/libxc: Calculate xstate cpuid leaf from guest information

2016-04-07 Thread Andrew Cooper
On 07/04/16 01:56, Jan Beulich wrote: Andrew Cooper 04/07/16 2:40 AM >>> >> On 07/04/2016 01:16, Jan Beulich wrote: >> Andrew Cooper 04/05/16 7:49 PM >>> There is no possible way of avoiding having a whitelist somewhere, which limits what Xen will tolerate supporting for the gu

[Xen-devel] [PATCH v5 02/21] xen/x86: Calculate maximum host and guest featuresets

2016-04-07 Thread Andrew Cooper
All of this information will be used by the toolstack to make informed levelling decisions for VMs, and by Xen to sanity check toolstack-provided information. The split between the shadow and hap HVM masks is necessary due to the lack of a "get cpuid policy" hypercall. Multi-host toolstacks (i.e.

[Xen-devel] [PATCH v5 01/21] xen/x86: Annotate VM applicability in featureset

2016-04-07 Thread Andrew Cooper
Use attributes to specify whether a feature is applicable to be exposed to: 1) All guests 2) HVM guests 3) HVM HAP guests and, via absence of an attribute, to no guests. There is no current need for other categories (e.g. PV-only features), and such categories should not be introduced if possib

[Xen-devel] [PATCH v5 03/21] xen/x86: Generate deep dependencies of features

2016-04-07 Thread Andrew Cooper
Some features depend on other features. Working out and maintaining the exact dependency tree is complicated, so it is expressed in the automatic generation script. At runtime, Xen needs to be disable all features which are dependent on a feature being disabled. Because of the flattening perform

[Xen-devel] [PATCH v5 08/21] x86/cpu: Sysctl and common infrastructure for levelling context switching

2016-04-07 Thread Andrew Cooper
A toolstack needs to know how much control Xen has over the visible cpuid values in PV guests. Provide an explicit mechanism to query what Xen is capable of. This interface will currently report no capabilities. This change is scaffolding for future patches, which will introduce detection and sw

[Xen-devel] [PATCH v5 07/21] x86/cpu: Move set_cpumask() calls into c_early_init()

2016-04-07 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 processor features. As the masks got applied after the query for features, the redundant call to generic_identify() would clobber the pre-masking feature in

[Xen-devel] [PATCH v5 05/21] xen/x86: Improve disabling of features which have dependencies

2016-04-07 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 Reviewed-by: Jan Beulich --- v2: Move boolean_param() adjacent t

[Xen-devel] [PATCH v5 04/21] xen/x86: Clear dependent features when clearing a cpu cap

2016-04-07 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 Reviewed-by: Jan Beulich --- v3: * Style fixes. Use __test_and_set_bit() --- xen/arch/x86/cpu/common.c | 16

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

2016-04-07 Thread Andrew Cooper
This series is available in git form at: http://xenbits.xen.org/git-http/people/andrewcoop/xen.git levelling-v4 Notable changes from v4 are further tweaking of the SSE* dependency tree, fixing of deep-C and P state collection on some Linux dom0 kernels, fix the construction of HVM domains on Sky

[Xen-devel] [PATCH v5 09/21] x86/cpu: Rework AMD masking MSR setup

2016-04-07 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 v5 06/21] xen/x86: Improvements to in-hypervisor cpuid sanity checks

2016-04-07 Thread Andrew Cooper
Currently, {pv,hvm}_cpuid() has a large quantity of essentially-static logic for modifying the features visible to a guest. A lot of this can be subsumed by {pv,hvm}_featuremask, which identify the features available on this hardware which could be given to a PV or HVM guest. This is a step in th

[Xen-devel] [PATCH v5 11/21] x86/cpu: Context switch cpuid masks and faulting state in context_switch()

2016-04-07 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(). One (attempted) functional change is that the faulti

[Xen-devel] [PATCH v5 20/21] tools/libxc: Use featuresets rather than guesswork

2016-04-07 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. Collect all the feature manipulati

[Xen-devel] [PATCH v5 10/21] x86/cpu: Rework Intel masking/faulting setup

2016-04-07 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 v5 13/21] x86/domctl: Update PV domain cpumasks when setting cpuid policy

2016-04-07 Thread Andrew Cooper
This allows PV domains with different featuresets to observe different values from a native cpuid instruction, on supporting hardware. It is important to leak the host view of X2APIC, HTT and CMP_LEGACY through to guests, even though they could be hidden. These flags affect how to interpret other

[Xen-devel] [PATCH v5 18/21] tools: Utility for dealing with featuresets

2016-04-07 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 Acked-by: Wei Liu --- CC: Ian Jackson v2: No linking hackary --- .gitignore

[Xen-devel] [PATCH v5 12/21] x86/pv: Provide custom cpumasks for PV domains

2016-04-07 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 Reviewed-by: Jan Beulich --- v2: * s/cpumasks/cpuidmasks/

[Xen-devel] [PATCH v5 19/21] tools/libxc: Wire a featureset through to cpuid policy logic

2016-04-07 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 Acked-by: Wei Liu --- CC: Ian Jackson v2: * M

[Xen-devel] [PATCH v5 15/21] tools/libxc: Modify bitmap operations to take void pointers

2016-04-07 Thread Andrew Cooper
The type of the pointer to a bitmap is not interesting; it does not affect the representation of the block of bits being pointed to. Make the libxc functions consistent with those in Xen, so they can work just as well with 'unsigned int *' based bitmaps. As part of doing so, change the implementa

[Xen-devel] [PATCH v5 14/21] xen+tools: Export maximum host and guest cpu featuresets via SYSCTL

2016-04-07 Thread Andrew Cooper
And provide stubs for toolstack use. Signed-off-by: Andrew Cooper Acked-by: Wei Liu Acked-by: David Scott Acked-by: Jan Beulich --- CC: Tim Deegan CC: Daniel De Graaf v2: * Rebased to use libxencall * Improve hypercall documentation v3: * Provide libxc implementation for XEN_SYSCTL_get_c

[Xen-devel] [PATCH v5 17/21] tools/libxc: Expose the automatically generated cpu featuremask information

2016-04-07 Thread Andrew Cooper
Signed-off-by: Andrew Cooper Acked-by: Wei Liu --- CC: Ian Jackson New in v2 --- tools/libxc/Makefile | 9 ++ tools/libxc/include/xenctrl.h | 14 tools/libxc/xc_cpuid_x86.c| 75 +++ 3 files changed, 98 insertions(+) diff --git

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

2016-04-07 Thread Andrew Cooper
The existing logic is broken for heterogeneous migration. By always advertising the host maximum xstate, a migration to a less capable host always fails as Xen cannot accomodate the xcr0_accum in the migration stream. By calculating xstate from the feature information (which a multi-host toolstac

[Xen-devel] [PATCH v5 16/21] tools/libxc: Use public/featureset.h for cpuid policy generation

2016-04-07 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. As some of the feature have been renamed in the public API, similar renames are made here. Signed-off-by: Andrew Cooper Acked-by: Wei L

[Xen-devel] [PATCH v11 06/17] Xen: ARM: Add support for mapping platform device mmio

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao Add a bus_notifier for platform bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- drivers/xen/Makefile | 1 + drivers/xen/arm-device.c | 153

[Xen-devel] [PATCH v11 00/17] Add ACPI support for Xen Dom0 on ARM64

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao This patch set adds ACPI support for Xen Dom0 on ARM64. The relevant Xen ACPI on ARM64 design document could be found from [1]. This patch set adds a new FDT node "uefi" under /hypervisor to pass UEFI information. Introduce a bus notifier of AMBA and Platform bus to map the ne

[Xen-devel] [PATCH v11 07/17] Xen: ARM: Add support for mapping AMBA device mmio

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao Add a bus_notifier for AMBA bus device in order to map the device mmio regions when DOM0 booting with ACPI. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini Reviewed-by: Julien Grall --- drivers/xen/arm-device.c | 43 +++

[Xen-devel] [PATCH v11 05/17] xen: memory : Add new XENMAPSPACE type XENMAPSPACE_dev_mmio

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao Add a new type of Xen map space for Dom0 to map device's MMIO region. Signed-off-by: Shannon Zhao Reviewed-by: Julien Grall --- include/xen/interface/memory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h

[Xen-devel] [PATCH v11 03/17] Xen: xlate: Use page_to_xen_pfn instead of page_to_pfn

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao Make xen_xlate_map_ballooned_pages work with 64K pages. In that case Kernel pages are 64K in size but Xen pages remain 4K in size. Xen pfns refer to 4K pages. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini Reviewed-by: Julien Grall --- drivers/xen/xlate_mmu.c

[Xen-devel] [PATCH v11 02/17] xen/grant-table: Move xlated_setup_gnttab_pages to common place

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao Move xlated_setup_gnttab_pages to common place, so it can be reused by ARM to setup grant table. Rename it to xen_xlate_map_ballooned_pages. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini Reviewed-by: Julien Grall --- arch/x86/xen/grant-table.c | 57 +

[Xen-devel] [PATCH v11 14/17] XEN: EFI: Move x86 specific codes to architecture directory

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao Move x86 specific codes to architecture directory and export those EFI runtime service functions. This will be useful for initializing runtime service on ARM later. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- arch/x86/xen/efi.c| 112 +

[Xen-devel] [PATCH v11 04/17] arm/xen: Use xen_xlate_map_ballooned_pages to setup grant table

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao Use xen_xlate_map_ballooned_pages to setup grant table. Then it doesn't rely on DT or ACPI to pass the start address and size of grant table. Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini Reviewed-by: Julien Grall --- arch/arm/xen/enlighten.c | 13 -

[Xen-devel] [PATCH v11 01/17] Xen: ACPI: Hide UART used by Xen

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao ACPI 6.0 introduces a new table STAO to list the devices which are used by Xen and can't be used by Dom0. On Xen virtual platforms, the physical UART is used by Xen. So here it hides UART from Dom0. CC: "Rafael J. Wysocki" (supporter:ACPI) CC: Len Brown (supporter:ACPI) CC:

[Xen-devel] [PATCH v11 08/17] Xen: public/hvm: sync changes of HVM_PARAM_CALLBACK_VIA ABI from Xen

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao Sync the changes of HVM_PARAM_CALLBACK_VIA ABI introduced by Xen commit (public/hvm: export the HVM_PARAM_CALLBACK_VIA ABI in the API). Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- include/xen/interface/hvm/params.h | 27 +-- 1 file

[Xen-devel] [PATCH v11 15/17] ARM64: XEN: Add a function to initialize Xen specific UEFI runtime services

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao When running on Xen hypervisor, runtime services are supported through hypercall. Add a Xen specific function to initialize runtime services. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- arch/arm/include/asm/xen/xen-ops.h | 6 ++ arch/arm/xen/Makef

[Xen-devel] [PATCH v11 12/17] ARM64: ACPI: Check if it runs on Xen to enable or disable ACPI

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao When it's a Xen domain0 booting with ACPI, it will supply a /chosen and a /hypervisor node in DT. So check if it needs to enable ACPI. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini Acked-by: Hanjun Guo --- arch/arm64/kernel/acpi.c | 14 ++ 1 file

[Xen-devel] [PATCH v11 09/17] xen/hvm/params: Add a new delivery type for event-channel in HVM_PARAM_CALLBACK_IRQ

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao This new delivery type which is for ARM shares the same value with HVM_PARAM_CALLBACK_TYPE_VECTOR which is for x86. val[15:8] is flag: val[7:0] is a PPI. To the flag, bit 8 stands the interrupt mode is edge(1) or level(0) and bit 9 stands the interrupt polarity is active low(1

[Xen-devel] [PATCH v11 10/17] arm/xen: Get event-channel irq through HVM_PARAM when booting with ACPI

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao The kernel will get the event-channel IRQ through HVM_PARAM_CALLBACK_IRQ. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini Reviewed-by: Julien Grall --- arch/arm/xen/enlighten.c | 36 +++- 1 file changed, 35 insertions(+), 1 delet

[Xen-devel] [PATCH v11 16/17] FDT: Add a helper to get the subnode by given name

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao Sometimes it needs to check if there is a subnode of given node in FDT by given name. Introduce this helper to get the subnode if it exists. CC: Rob Herring Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini Acked-by: Rob Herring --- drivers/of/fdt.c | 13

[Xen-devel] [PATCH v11 11/17] ARM: XEN: Move xen_early_init() before efi_init()

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao Move xen_early_init() before efi_init(), then when calling efi_init() could initialize Xen specific UEFI. Check if it runs on Xen hypervisor through the flat dts. Cc: Russell King Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini Reviewed-by: Julien Grall --- a

[Xen-devel] [PATCH v11 17/17] Xen: EFI: Parse DT parameters for Xen specific UEFI

2016-04-07 Thread Shannon Zhao
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. If Xen supports EFI, initialize runtime services. CC: Matt Fleming Signed-off-by: Shannon Zhao Reviewed-by: Matt Fleming Reviewed-by:

[Xen-devel] [PATCH v11 13/17] ARM: Xen: Document UEFI support on Xen ARM virtual platforms

2016-04-07 Thread Shannon Zhao
From: Shannon Zhao Add a "uefi" node under /hypervisor node in FDT, then Linux kernel could scan this to get the UEFI information. CC: Rob Herring Signed-off-by: Shannon Zhao Acked-by: Rob Herring Reviewed-by: Stefano Stabellini --- Documentation/devicetree/bindings/arm/xen.txt | 35 +++

Re: [Xen-devel] [for-4.7 3/5] xen/arm: acpi: Fix SMP support when booting with ACPI

2016-04-07 Thread Shannon Zhao
On 2016/4/7 18:59, Julien Grall wrote: > The variable enabled_cpus is used to know the number of CPU enabled in > the MADT. > > Currently this variable is used to check the validity of the boot CPU. > It will be considered invalid when "enabled_cpus > 1". > > However, this condition also means

Re: [Xen-devel] [for-4.7 5/5] xen/arm: acpi: Print more error messages in acpi_map_gic_cpu_interface

2016-04-07 Thread Shannon Zhao
On 2016/4/7 18:59, Julien Grall wrote: > It's helpful to spot any error without having to modify the hypervisor > code. > > Signed-off-by: Julien Grall Reviewed-by: Shannon Zhao > --- > xen/arch/arm/acpi/boot.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/xen/arch/arm/acp

Re: [Xen-devel] [for-4.7 4/5] xen/arm: acpi: Remove uncessary check in acpi_map_gic_cpu_interface

2016-04-07 Thread Shannon Zhao
On 2016/4/7 18:59, Julien Grall wrote: > This part of the code will never be executed when the entry > corresponds to the boot CPU. > > Also print an error message rather when arch_cpu_init has failed. > > Signed-off-by: Julien Grall Reviewed-by: Shannon Zhao > --- > xen/arch/arm/acpi/boot.

Re: [Xen-devel] [PATCH v4 01/14] x86/boot: enumerate documentation for the x86 hardware_subarch

2016-04-07 Thread Andy Shevchenko
On Wed, 2016-04-06 at 17:06 -0700, Luis R. Rodriguez wrote: > Although hardware_subarch has been in place since the x86 boot > protocol 2.07 it hasn't been used much. Enumerate current possible > values to avoid misuses and help with semantics later at boot > time should this be used further. > >

Re: [Xen-devel] Regarding Outreachy project on Improving CR Dashboard

2016-04-07 Thread Priya
Hello all, Thanks for the suggestions. I have updated the changes as u had mentioned. I am sorry, but I could not find any errors while running $ python3 createjson.py --mbox xen-devel-2016-03 --output new.json command. I am wondering what is wrong with this and might be a problem with python3 o

[Xen-devel] [BUG]

2016-04-07 Thread Михаил Казанцев
"IRQ problem dom0 xen4.5-amd64" i have mothrboard geforce 6100pm-m2(v3.0) latest bios and athtlon 64 x2 5000+ cpu Mothrboard based on nforce 430 chipset if in bios enabled apic mode. Xen boot stops on trying to load dom0 kernel (gentoo kernel v4.5 or ubuntu kernel v 4.2)  and just showing black

Re: [Xen-devel] [for-4.7 1/5] drivers/pl011: ACPI: The interrupt should always be high level triggered

2016-04-07 Thread Shannon Zhao
On 2016/4/7 18:59, Julien Grall wrote: > The SPCR does not specify if the interrupt is edge or level triggered. > So the configuration needs to be hardcoded in the code. > > Based on the PL011 TRM (see 2.2.8 in ARM DDI 0183G), the interrupt generated > will be active high. This wording implies t

Re: [Xen-devel] [for-4.7 2/5] xen/arm: acpi: The boot CPU does not always match the first entry in the MADT

2016-04-07 Thread Shannon Zhao
On 2016/4/7 18:59, Julien Grall wrote: > Since the ACPI 6.0 errata document [1], the first entry in the MADT > does not have to correspond to the boot CPU. > > Introduce a new variable to know if a MADT entry matching the boot CPU > is found. Furthermore, it's not necessary to check if the MPIDR

Re: [Xen-devel] [PATCH v4 04/14] x86/rtc: replace paravirt rtc check with platform legacy quirk

2016-04-07 Thread Boris Ostrovsky
On 04/06/2016 08:06 PM, Luis R. Rodriguez wrote: We have 4 types of x86 platforms that disable RTC: * Intel MID * Lguest - uses paravirt * Xen dom-U - uses paravirt * x86 on legacy systems annotated with an ACPI legacy flag We can consolidate all of these into a platform specific le

Re: [Xen-devel] [PATCH v5 21/21] tools/libxc: Calculate xstate cpuid leaf from guest information

2016-04-07 Thread Wei Liu
On Thu, Apr 07, 2016 at 12:57:26PM +0100, Andrew Cooper wrote: > The existing logic is broken for heterogeneous migration. By always > advertising the host maximum xstate, a migration to a less capable host always > fails as Xen cannot accomodate the xcr0_accum in the migration stream. > > By cal

Re: [Xen-devel] [PATCH v5 15/21] tools/libxc: Modify bitmap operations to take void pointers

2016-04-07 Thread Wei Liu
On Thu, Apr 07, 2016 at 12:57:20PM +0100, Andrew Cooper wrote: > The type of the pointer to a bitmap is not interesting; it does not affect the > representation of the block of bits being pointed to. > > Make the libxc functions consistent with those in Xen, so they can work just > as well with 'u

Re: [Xen-devel] [PATCH v4 08/14] apm32: remove paravirt_enabled() use

2016-04-07 Thread Boris Ostrovsky
On 04/06/2016 08:06 PM, Luis R. Rodriguez wrote: There is already a check for apm_info.bios == 0, the apm_info.bios is set from the boot_params.apm_bios_info. Both Xen and lguest, which are also the only ones that set paravirt_enabled to true, never set the apm_bios.info. The Xen folks are sure

Re: [Xen-devel] [PATCH v4 00/14] x86: remove paravirt_enabled

2016-04-07 Thread Juergen Gross
On 07/04/16 02:06, Luis R. Rodriguez wrote: > Now that Andy's ASM paravirt_enabled() use is merged all we need is to address > the rest of the C code uses. This completes that work by providing proper > semantics for platform legacy settings and quirks as suggested by Ingo, this > in > turn can al

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

2016-04-07 Thread osstest service owner
flight 89344 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/89344/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): build-amd64-libvirt 5 libvirt-buildfail like 89250 Tests which did not suc

Re: [Xen-devel] [for-4.7 1/5] drivers/pl011: ACPI: The interrupt should always be high level triggered

2016-04-07 Thread Julien Grall
Hi Shannon, Thank you for the review. On 07/04/16 13:30, Shannon Zhao wrote: On 2016/4/7 18:59, Julien Grall wrote: The SPCR does not specify if the interrupt is edge or level triggered. So the configuration needs to be hardcoded in the code. Based on the PL011 TRM (see 2.2.8 in ARM DDI 018

Re: [Xen-devel] [for-4.7 1/5] drivers/pl011: ACPI: The interrupt should always be high level triggered

2016-04-07 Thread Shannon Zhao
On 2016年04月07日 21:41, Julien Grall wrote: > > On 07/04/16 13:30, Shannon Zhao wrote: >> >> >> On 2016/4/7 18:59, Julien Grall wrote: >>> The SPCR does not specify if the interrupt is edge or level triggered. >>> So the configuration needs to be hardcoded in the code. >>> >>> Based on the PL011 TRM

Re: [Xen-devel] [for-4.7 1/5] drivers/pl011: ACPI: The interrupt should always be high level triggered

2016-04-07 Thread Julien Grall
On 07/04/16 14:57, Shannon Zhao wrote: On 2016年04月07日 21:41, Julien Grall wrote: On 07/04/16 13:30, Shannon Zhao wrote: On 2016/4/7 18:59, Julien Grall wrote: The SPCR does not specify if the interrupt is edge or level triggered. So the configuration needs to be hardcoded in the code. Ba

[Xen-devel] [PATCH 1/2] pygrub: Ignore GRUB2 if statements

2016-04-07 Thread Ross Lagerwall
SLES 12's default GRUB config has the following code before any entries: if [ -n "$extra_cmdline" ]; then submenu "Bootable snapshot #$snapshot_num" { menuentry "If OK, run 'snapper rollback' and reboot." { true; } } fi This prevents pygrub from booting using the default entry. Since I'm n

Re: [Xen-devel] [PATCH v6 02/24] xen/xsplice: Hypervisor implementation of XEN_XSPLICE_op

2016-04-07 Thread Andrew Cooper
On 07/04/16 04:49, Konrad Rzeszutek Wilk wrote: > +static int xsplice_upload(xen_sysctl_xsplice_upload_t *upload) > +{ > +struct payload *data = NULL, *found; > +char n[XEN_XSPLICE_NAME_SIZE]; > +int rc; > + > +rc = verify_payload(upload, n); > +if ( rc ) > +return rc; >

Re: [Xen-devel] [PATCH v2 04/11] xen: sched: close potential races when switching scheduler to CPUs

2016-04-07 Thread George Dunlap
On 06/04/16 18:23, Dario Faggioli wrote: > In short, the point is making sure that the actual switch > of scheduler and the remapping of the scheduler's runqueue > lock occur in the same critical section, protected by the > "old" scheduler's lock (and not, e.g., in the free_pdata > hook, as it is n

Re: [Xen-devel] [PATCH v2 08/11] xen: sched: allow for choosing credit2 runqueues configuration at boot

2016-04-07 Thread George Dunlap
On 07/04/16 06:04, Juergen Gross wrote: > On 06/04/16 19:23, Dario Faggioli wrote: >> In fact, credit2 uses CPU topology to decide how to arrange >> its internal runqueues. Before this change, only 'one runqueue >> per socket' was allowed. However, experiments have shown that, >> for instance, havi

Re: [Xen-devel] [PATCH v4 08/14] hvmloader: Locate the BIOS blob

2016-04-07 Thread Anthony PERARD
On Tue, Apr 05, 2016 at 06:59:03AM -0600, Jan Beulich wrote: > >>> On 14.03.16 at 18:55, wrote: > > --- a/tools/firmware/hvmloader/hvmloader.c > > +++ b/tools/firmware/hvmloader/hvmloader.c > > @@ -292,8 +322,16 @@ int main(void) > > } > > > > printf("Loading %s ...\n", bios->name); >

  1   2   3   >