Re: [Xen-devel] [OSSTEST Nested PATCH v8 5/7] Add new script to customize nested test configuration

2015-04-23 Thread Pang, LongtaoX
> -Original Message- > From: Ian Campbell [mailto:ian.campb...@citrix.com] > Sent: Tuesday, April 21, 2015 6:40 PM > To: Pang, LongtaoX > Cc: xen-devel@lists.xen.org; ian.jack...@eu.citrix.com; wei.l...@citrix.com; > Hu, > Robert > Subject: Re: [OSSTEST Nested PATCH v8 5/7] Add new scrip

Re: [Xen-devel] [PATCH v3 0/5] xen: arm: Parse PCI DT nodes' ranges and interrupt-map

2015-04-23 Thread Chen Baozi
On Mon, Apr 20, 2015 at 01:15:29PM +0100, Ian Campbell wrote: > This series adds parsing of the DT ranges and interrupt-map properties > for PCI devices, these contain the MMIOs and IRQs used by children on > the bus. This replaces the specific mapping stuff on xgene. > > Since last time I've adde

Re: [Xen-devel] [OSSTEST Nested PATCH v8 6/7] Compose the main recipe of nested test job

2015-04-23 Thread Pang, LongtaoX
> -Original Message- > From: Ian Campbell [mailto:ian.campb...@citrix.com] > Sent: Wednesday, April 22, 2015 7:24 PM > To: Pang, LongtaoX > Cc: wei.l...@citrix.com; Hu, Robert; ian.jack...@eu.citrix.com; > xen-devel@lists.xen.org > Subject: Re: [Xen-devel] [OSSTEST Nested PATCH v8 6/7] Co

Re: [Xen-devel] Possible bug/question in xen-hptool?

2015-04-23 Thread Jan Beulich
>>> On 23.04.15 at 06:03, wrote: > The first question is: > Why should we use "foreigndom >> 16" instead of "foreigndom" to get the > pt_dom? Because there are possibly three domains involved here: The current one (issuing the hypercall), the one owning the page, and the one owning the page table

Re: [Xen-devel] [PATCH v3 0/5] xen: arm: Parse PCI DT nodes' ranges and interrupt-map

2015-04-23 Thread Chen Baozi
On Thu, Apr 23, 2015 at 03:52:06PM +0800, Chen Baozi wrote: > On Mon, Apr 20, 2015 at 01:15:29PM +0100, Ian Campbell wrote: > > This series adds parsing of the DT ranges and interrupt-map properties > > for PCI devices, these contain the MMIOs and IRQs used by children on > > the bus. This replaces

Re: [Xen-devel] Nested EPT flushes on p2m change?

2015-04-23 Thread Tim Deegan
At 05:43 + on 10 Apr (1428644619), Zhang, Yang Z wrote: > Tian, Kevin wrote on 2015-04-03: > >> From: Tim Deegan [mailto:t...@xen.org] > >> Sent: Thursday, March 26, 2015 7:10 PM > >> > >> Hi, VMX maintainers, > >> > >> I was looking at the nested EPT code while following up on Ed's > >> emai

Re: [Xen-devel] [PATCH v3 0/5] xen: arm: Parse PCI DT nodes' ranges and interrupt-map

2015-04-23 Thread Chen Baozi
On Thu, Apr 23, 2015 at 04:22:31PM +0800, Chen Baozi wrote: > On Thu, Apr 23, 2015 at 03:52:06PM +0800, Chen Baozi wrote: > > On Mon, Apr 20, 2015 at 01:15:29PM +0100, Ian Campbell wrote: > > > This series adds parsing of the DT ranges and interrupt-map properties > > > for PCI devices, these conta

[Xen-devel] [PATCH] config: generate Paths-$SUBSYSTEM.mk

2015-04-23 Thread Wei Liu
... so that we can run ./configure in each subsystem. Make inclusion of Paths-*.mk mandatory. Skip generating a global Paths.mk since it's of no use anymore. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson --- Please rerun autogen.sh --- config/Docs.mk.in| 2 +- config/Stubdom.mk.

Re: [Xen-devel] [PATCH] adjust assertion in alloc_heap_pages()

2015-04-23 Thread Andrew Cooper
On 23/04/15 07:20, Jan Beulich wrote: > Older gcc warns (and due to -Werror fails) on this ASSERT() now that > "node" is of unsigned type. Make it more useful at once. > > Signed-off-by: Jan Beulich Coverity-ID: 1055630 Reviewed-by: Andrew Cooper > > --- a/xen/common/page_alloc.c > +++ b/xen/c

Re: [Xen-devel] [PATCH] adjust assertion in alloc_heap_pages()

2015-04-23 Thread Tim Deegan
At 07:20 +0100 on 23 Apr (1429773633), Jan Beulich wrote: > Older gcc warns (and due to -Werror fails) on this ASSERT() now that > "node" is of unsigned type. Make it more useful at once. > > Signed-off-by: Jan Beulich Acked-by: Tim Deegan ___ Xen-de

Re: [Xen-devel] [PATCH] refine C++ header checking compiler invocation

2015-04-23 Thread Tim Deegan
At 07:22 +0100 on 23 Apr (1429773762), Jan Beulich wrote: > g++ 4.1.x dies with "cc1plus: error: output filename specified twice" > on the currently used construct. That's apparently due to it converting > the manually specified "c++" into "c++-header", and mis-handling that > (which, when using "c

Re: [Xen-devel] [PATCH] tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore

2015-04-23 Thread Andrew Cooper
On 23/04/15 03:49, Boris Ostrovsky wrote: > When resuming, the guest needs to check whether the port has changed. HVM > guests use this parameter to get the port number. > > (We can't always use xenstore where this value is also written: for example > on Linux the console is resumed very early, bef

Re: [Xen-devel] [PATCH] passthrough/amd: avoid reading an uninitialized variable.

2015-04-23 Thread Tim Deegan
At 17:44 +0100 on 16 Apr (1429206250), Tim Deegan wrote: > update_intremap_entry_from_msi() doesn't write to its data pointer on > some error paths, so we copying that variable into the msg would count > as undefined behaviour. > > Signed-off-by: Tim Deegan > Cc: Suravee Suthikulpanit > Cc: Arav

Re: [Xen-devel] [OSSTEST Nested PATCH v8 5/7] Add new script to customize nested test configuration

2015-04-23 Thread Robert Hu
On Wed, 2015-04-22 at 10:56 +0100, Ian Campbell wrote: > On Wed, 2015-04-22 at 08:35 +, Pang, LongtaoX wrote: > > > > > > > -Original Message- > > > From: Ian Campbell [mailto:ian.campb...@citrix.com] > > > Sent: Tuesday, April 21, 2015 6:40 PM > > > To: Pang, LongtaoX > > > Cc: xen-d

[Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages on ARM

2015-04-23 Thread Stefano Stabellini
Make sure that xen_swiotlb_init allocates buffers that are DMA capable when at least one memblock is available below 4G. Otherwise we assume that all devices on the SoC can cope with >4G addresses. No functional changes on x86. From: Chen Baozi Signed-off-by: Chen Baozi Signed-off-by: Stefano

Re: [Xen-devel] [PATCH] xen: Add __GFP_DMA flag when xen_swiotlb_init gets free pages on ARM

2015-04-23 Thread David Vrabel
On 23/04/15 10:47, Stefano Stabellini wrote: > Make sure that xen_swiotlb_init allocates buffers that are DMA capable > when at least one memblock is available below 4G. Otherwise we assume > that all devices on the SoC can cope with >4G addresses. This commit message must explain why the PFNs (IP

Re: [Xen-devel] [OSSTEST Nested PATCH v8 4/7] Changes on test step of Debian hvm guest install

2015-04-23 Thread Ian Campbell
On Thu, 2015-04-23 at 13:59 +0800, Robert Hu wrote: > On Tue, 2015-04-21 at 11:28 +0100, Ian Campbell wrote: > > On Mon, 2015-04-13 at 17:19 -0400, longtao.pang wrote: > > > 1. Increase disk size to accommodate to nested test requirement. > > > 2. Since 'Debain-xxx-.iso' image will be stored in roo

[Xen-devel] [PATCH v6 04/14] x86: maintain COS to CBM mapping for each socket

2015-04-23 Thread Chao Peng
For each socket, a COS to CBM mapping structure is maintained for each COS. The mapping is indexed by COS and the value is the corresponding CBM. Different VMs may use the same CBM, a reference count is used to indicate if the CBM is available. Signed-off-by: Chao Peng Reviewed-by: Andrew Cooper

[Xen-devel] [PATCH v6 03/14] x86: detect and initialize Intel CAT feature

2015-04-23 Thread Chao Peng
Detect Intel Cache Allocation Technology(CAT) feature and store the cpuid information for later use. Currently only L3 cache allocation is supported. The L3 CAT features may vary among sockets so per-socket feature information is stored. The initialization can happen either at boot time or when CPU

[Xen-devel] [PATCH v6 01/14] x86: add socket_to_cpumask

2015-04-23 Thread Chao Peng
Maintain socket_to_cpumask which contains all the HT and core siblings in the same socket. Signed-off-by: Chao Peng --- xen/arch/x86/smpboot.c| 15 +++ xen/include/asm-x86/smp.h | 8 2 files changed, 23 insertions(+) diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/s

[Xen-devel] [PATCH v6 05/14] x86: add COS information for each domain

2015-04-23 Thread Chao Peng
In Xen's implementation, the CAT enforcement granularity is per domain. Due to the length of CBM and the number of COS may be socket-different, each domain has COS ID for each socket. The domain get COS=0 by default and at runtime its COS is then allocated dynamically when user specifies a CBM for

[Xen-devel] [PATCH v6 00/14] enable Cache Allocation Technology (CAT) for VMs

2015-04-23 Thread Chao Peng
Changes in v6: Address comments from Andrew/Dario/Ian, mainly: * Introduce cat_socket_init(_enable)_bitmap. * Merge xl psr-cmt/cat-hwinfo => xl psr-hwinfo. * Add function header to explain the 'target' parameter. * Use bitmap instead of TARGETS_ALL. * Document fix. Changes in v5: * Address comments

[Xen-devel] [PATCH v6 02/14] x86: improve psr scheduling code

2015-04-23 Thread Chao Peng
Switching RMID from previous vcpu to next vcpu only needs to write MSR_IA32_PSR_ASSOC once. Write it with the value of next vcpu is enough, no need to write '0' first. Idle domain has RMID set to 0 and because MSR is already updated lazily, so just switch it as it does. Also move the initializatio

[Xen-devel] [PATCH v6 06/14] x86: expose CBM length and COS number information

2015-04-23 Thread Chao Peng
General CAT information such as maximum COS and CBM length are exposed to user space by a SYSCTL hypercall, to help user space to construct the CBM. Signed-off-by: Chao Peng Reviewed-by: Andrew Cooper --- xen/arch/x86/psr.c | 31 +++ xen/arch/x86/sysctl.c

[Xen-devel] [PATCH v6 14/14] docs: add xl-psr.markdown

2015-04-23 Thread Chao Peng
Add document to introduce basic concepts and terms in PSR family technologies and the xl interfaces. Signed-off-by: Chao Peng --- Changes in v6: * Address comments from Ian. Changes in v5: * Address comments from Andrew/Ian. --- docs/man/xl.pod.1 | 10 +++- docs/misc/xl-psr.markdown | 1

[Xen-devel] [PATCH v6 12/14] tools/libxl: introduce some socket helpers

2015-04-23 Thread Chao Peng
Add libxl_socket_bitmap_alloc() to allow allocating a socket specific libxl_bitmap (as it is for cpu/node bitmap). Internal function libxl__count_physical_sockets() is introduced together to get the socket count when the size of bitmap is not specified. Signed-off-by: Chao Peng --- tools/libxl/

[Xen-devel] [PATCH v6 09/14] xsm: add CAT related xsm policies

2015-04-23 Thread Chao Peng
Add xsm policies for Cache Allocation Technology(CAT) related hypercalls to restrict the functions visibility to control domain only. Signed-off-by: Chao Peng Acked-by: Daniel De Graaf --- tools/flask/policy/policy/modules/xen/xen.if | 2 +- tools/flask/policy/policy/modules/xen/xen.te | 4 +++

[Xen-devel] [PATCH v6 13/14] tools: add tools support for Intel CAT

2015-04-23 Thread Chao Peng
This is the xc/xl changes to support Intel Cache Allocation Technology(CAT). 'xl psr-hwinfo' is updated to show CAT info and two new commands for CAT are introduced: - xl psr-cat-cbm-set [-s socket] Set cache capacity bitmasks(CBM) for a domain. - xl psr-cat-show Show CAT domain information

[Xen-devel] [PATCH v6 07/14] x86: dynamically get/set CBM for a domain

2015-04-23 Thread Chao Peng
For CAT, COS is maintained in hypervisor only while CBM is exposed to user space directly to allow getting/setting domain's cache capacity. For each specified CBM, hypervisor will either use a existed COS which has the same CBM or allocate a new one if the same CBM is not found. If the allocation f

[Xen-devel] [PATCH v6 10/14] tools/libxl: minor name changes for CMT commands

2015-04-23 Thread Chao Peng
Use "-" instead of "_" for monitor types. Signed-off-by: Chao Peng Reviewed-by: Dario Faggioli Acked-by: Ian Campbell --- tools/libxl/xl_cmdimpl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 394b55d..c666d

[Xen-devel] [PATCH v6 08/14] x86: add scheduling support for Intel CAT

2015-04-23 Thread Chao Peng
On context switch, write the the domain's Class of Service(COS) to MSR IA32_PQR_ASSOC, to notify hardware to use the new COS. For performance reason, the COS mask for current cpu is also cached in the local per-CPU variable. Signed-off-by: Chao Peng --- Changes in v5: * Remove the need to cache

[Xen-devel] [PATCH v6 11/14] tools/libxl: add command to show PSR hardware info

2015-04-23 Thread Chao Peng
Add dedicated one to show hardware information. [root@vmm-psr]xl psr-hwinfo Cache Monitoring Technology (CMT): Enabled : 1 Total RMID : 63 Supported monitor types: cache-occupancy total-mem-bandwidth local-mem-bandwidth Signed-off-by: Chao Peng Reviewed-by: Dario Faggioli Acked-by:

Re: [Xen-devel] [PATCH] config: generate Paths-$SUBSYSTEM.mk

2015-04-23 Thread Ian Campbell
On Thu, 2015-04-23 at 10:10 +0100, Wei Liu wrote: > ... so that we can run ./configure in each subsystem. > > Make inclusion of Paths-*.mk mandatory. Having done that does the Makefile machinery which prints the "You need to run configure message" still work? (That's the main reason some includes

[Xen-devel] Ping: pending AMD IOMMU patches

2015-04-23 Thread Jan Beulich
Suravee, Aravind, besides the patch Tim just pinged you about, we're also awaiting an ack/nak on "AMD IOMMU: only translate remapped IO-APIC RTEs". Thanks, Jan ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH] config: generate Paths-$SUBSYSTEM.mk

2015-04-23 Thread Wei Liu
On Thu, Apr 23, 2015 at 11:15:03AM +0100, Ian Campbell wrote: > On Thu, 2015-04-23 at 10:10 +0100, Wei Liu wrote: > > ... so that we can run ./configure in each subsystem. > > > > Make inclusion of Paths-*.mk mandatory. > > Having done that does the Makefile machinery which prints the "You need >

Re: [Xen-devel] [PATCH v3 0/5] xen: arm: Parse PCI DT nodes' ranges and interrupt-map

2015-04-23 Thread Ian Campbell
On Thu, 2015-04-23 at 17:02 +0800, Chen Baozi wrote: > > report: > > > > FATAL: sd_listen_fds() failed > > : File exists > > > > when trying to run xenstored. > > Well. It is related to systemd on jessie. Disabling systemd when building > tools > helped. > > Sorry for the noise. It's not rea

[Xen-devel] [PATCH] x86/shadow: fix big-memory build

2015-04-23 Thread Jan Beulich
Modifiers to the pointer passed into list_next_entry() are also being applied to the macro's return type, and hence if the input pointer is const-qualified a variable the result gets assigned to would also need to be. As that doesn't seem desirable here, drop the const qualifier on the input pointe

[Xen-devel] [PATCH] xen: use 'Hardware domain' instead of 'Domain 0' in hwdom_shutdown()

2015-04-23 Thread Vitaly Kuznetsov
hwdom_shutdown() operates with hardware domains, use the proper wording. Eliminate pointless braces from switch cases. Signed-off-by: Vitaly Kuznetsov --- xen/common/shutdown.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/xen/common/shutdown.c b/xen/c

Re: [Xen-devel] [PATCH] x86/shadow: fix big-memory build

2015-04-23 Thread Tim Deegan
At 11:38 +0100 on 23 Apr (1429789126), Jan Beulich wrote: > Modifiers to the pointer passed into list_next_entry() are also being > applied to the macro's return type, and hence if the input pointer is > const-qualified a variable the result gets assigned to would also need > to be. As that doesn't

Re: [Xen-devel] [OSSTEST Nested PATCH v8 4/7] Changes on test step of Debian hvm guest install

2015-04-23 Thread Hu, Robert
> -Original Message- > From: Ian Campbell [mailto:ian.campb...@citrix.com] > Sent: Thursday, April 23, 2015 2:53 PM > To: Hu, Robert > Cc: Pang, LongtaoX; xen-devel@lists.xen.org; ian.jack...@eu.citrix.com; > wei.l...@citrix.com > Subject: Re: [OSSTEST Nested PATCH v8 4/7] Changes on test s

Re: [Xen-devel] [OSSTEST Nested PATCH v8 6/7] Compose the main recipe of nested test job

2015-04-23 Thread Robert Hu
On Wed, 2015-04-22 at 12:23 +0100, Ian Campbell wrote: > On Wed, 2015-04-22 at 12:04 +0100, Ian Campbell wrote: > > On Wed, 2015-04-22 at 08:38 +, Pang, LongtaoX wrote: > > > > > > > > > > -Original Message- > > > > From: Ian Campbell [mailto:ian.campb...@citrix.com] > > > > Sent: Tue

Re: [Xen-devel] [PATCH] xen: use 'Hardware domain' instead of 'Domain 0' in hwdom_shutdown()

2015-04-23 Thread Jan Beulich
>>> On 23.04.15 at 12:39, wrote: > --- a/xen/common/shutdown.c > +++ b/xen/common/shutdown.c > @@ -37,46 +37,36 @@ void hwdom_shutdown(u8 reason) > switch ( reason ) > { > case SHUTDOWN_poweroff: > -{ > -printk("Domain 0 halted: halting machine.\n"); > +printk("H

Re: [Xen-devel] [PATCH] xen: use 'Hardware domain' instead of 'Domain 0' in hwdom_shutdown()

2015-04-23 Thread Vitaly Kuznetsov
"Jan Beulich" writes: On 23.04.15 at 12:39, wrote: >> --- a/xen/common/shutdown.c >> +++ b/xen/common/shutdown.c >> @@ -37,46 +37,36 @@ void hwdom_shutdown(u8 reason) >> switch ( reason ) >> { >> case SHUTDOWN_poweroff: >> -{ >> -printk("Domain 0 halted: halting m

Re: [Xen-devel] [OSSTEST Nested PATCH v8 6/7] Compose the main recipe of nested test job

2015-04-23 Thread Ian Jackson
Pang, LongtaoX writes ("RE: [Xen-devel] [OSSTEST Nested PATCH v8 6/7] Compose the main recipe of nested test job"): > Ian Campbell [mailto:ian.campb...@citrix.com]: > > The arguments passed to ts-* in sg-run-job should _always_ be just a > > bare indent. The ident=foo thing is a special case for s

Re: [Xen-devel] [OSSTEST Nested PATCH v8 4/7] Changes on test step of Debian hvm guest install

2015-04-23 Thread Ian Jackson
Ian Campbell writes ("Re: [OSSTEST Nested PATCH v8 4/7] Changes on test step of Debian hvm guest install"): > Hrm, perhaps this behaviour ought to be pushed down into prepareguest > itself, IOW the existing $mb argument to that function would become the > default, but the runvar would take precede

Re: [Xen-devel] [PATCHv6 4/5] gnttab: remove unnecessary grant table locks

2015-04-23 Thread Tim Deegan
At 17:00 +0100 on 22 Apr (1429722035), David Vrabel wrote: > @@ -2642,8 +2615,6 @@ __gnttab_swap_grant_ref(grant_ref_t ref_a, grant_ref_t > ref_b) > */ > return rc; > > -spin_lock(>->lock); > - Now that this lock is gone, is anything stopping us racing against another CPU

Re: [Xen-devel] [PATCH v3 0/5] xen: arm: Parse PCI DT nodes' ranges and interrupt-map

2015-04-23 Thread Chen Baozi
On Thu, Apr 23, 2015 at 11:16:36AM +0100, Ian Campbell wrote: > On Thu, 2015-04-23 at 17:02 +0800, Chen Baozi wrote: > > > > report: > > > > > > FATAL: sd_listen_fds() failed > > > : File exists > > > > > > when trying to run xenstored. > > > > Well. It is related to systemd on jessie. Disablin

Re: [Xen-devel] [PATCH] xen: use 'Hardware domain' instead of 'Domain 0' in hwdom_shutdown()

2015-04-23 Thread Jan Beulich
>>> On 23.04.15 at 13:07, wrote: > "Jan Beulich" writes: > > On 23.04.15 at 12:39, wrote: >>> --- a/xen/common/shutdown.c >>> +++ b/xen/common/shutdown.c >>> @@ -37,46 +37,36 @@ void hwdom_shutdown(u8 reason) >>> switch ( reason ) >>> { >>> case SHUTDOWN_poweroff: >>> -{

Re: [Xen-devel] [OSSTEST Nested PATCH v8 5/7] Add new script to customize nested test configuration

2015-04-23 Thread Ian Campbell
On Thu, 2015-04-23 at 17:38 +0800, Robert Hu wrote: > > > As mentioned in [ Patch], 'nested_l1' is ident for L1 guest VM, > > > 'nestedl1' is hostname for L1 guest VM. > > > ' store_runvar('nested_l1',$l1->{Guest});' is used to store L1's ident > > > and L1's hostname to database, that will be

Re: [Xen-devel] [OSSTEST Nested PATCH v8 5/7] Add new script to customize nested test configuration

2015-04-23 Thread Ian Campbell
On Thu, 2015-04-23 at 07:27 +, Pang, LongtaoX wrote: > > > > -Original Message- > > From: Ian Campbell [mailto:ian.campb...@citrix.com] > > Sent: Tuesday, April 21, 2015 6:40 PM > > To: Pang, LongtaoX > > Cc: xen-devel@lists.xen.org; ian.jack...@eu.citrix.com; > > wei.l...@citrix.com

[Xen-devel] [PATCH v10 03/15] tools/libxc: Migration v2 framework

2015-04-23 Thread Andrew Cooper
For testing purposes, the environmental variable "XG_MIGRATION_V2" allows the two save/restore codepaths to coexist, and have a runtime switch. Signed-off-by: Andrew Cooper Acked-by: Ian Campbell CC: Ian Jackson CC: Wei Liu --- v8: Adjust layout to compile with MiniOS --- tools/libxc/Makefil

[Xen-devel] [PATCH v10 00/15] Migration v2 (libxc)

2015-04-23 Thread Andrew Cooper
Presented here is v10 of the Migration v2 series (libxc subset), which is able to function when transparently inserted under an unmodified xl/libxl. There are no major changes from v9. A docs subseries has been completed in parallel and removed from this series, and liberal quantities of spell ch

[Xen-devel] [PATCH v10 07/15] tools/libxc: x86 PV common code

2015-04-23 Thread Andrew Cooper
Add functions common to save and restore of x86 PV guests. This includes functions for dealing with the P2M and M2P and the VCPU context. Signed-off-by: Andrew Cooper Acked-by: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxc/Makefile |1 + tools/libxc/xc_sr_common_x

[Xen-devel] [PATCH v10 02/15] libxc/progress: Extend the progress interface

2015-04-23 Thread Andrew Cooper
Progress information is logged via a different logger to regular libxc log messages, and currently can only express a range. However, not everything which needs reporting as progress comes with a range. Extend the interface to allow reporting of a single statement. The programming interface now

[Xen-devel] [PATCH v10 04/15] tools/libxc: C implementation of stream format

2015-04-23 Thread Andrew Cooper
Provide the C structures matching the binary (wire) format of the new stream format. All header/record fields are naturally aligned and explicit padding fields are used to ensure the correct layout (i.e., there is no need for any non-standard structure packing pragma or attribute). Provide some h

[Xen-devel] [PATCH v10 05/15] tools/libxc: generic common code

2015-04-23 Thread Andrew Cooper
Add the context structure used to keep state during the save/restore process. Define the set of architecture or domain type specific operations with a set of callbacks (save_ops, and restore_ops). Add common functions for writing records. Signed-off-by: Andrew Cooper Acked-by: Ian Campbell CC:

[Xen-devel] [PATCH v10 08/15] tools/libxc: x86 PV save code

2015-04-23 Thread Andrew Cooper
Save the x86 PV specific parts of a domain. This is the X86_PV_INFO record, the P2M_FRAMES, the X86_PV_SHARED_INFO, the three different VCPU context records, and the MSR records. The normalise_page callback used by the common code when writing the PAGE_DATA records, converts MFNs in page tables t

[Xen-devel] [PATCH v10 01/15] tools/libxc: Implement writev_exact() in the same style as write_exact()

2015-04-23 Thread Andrew Cooper
This implementation of writev_exact() will cope with an iovcnt greater than IOV_MAX because glibc will actually let this work anyway, and it is very useful not to have to work about this in the caller of writev_exact(). The caller is still required to ensure that the sum of iov_len's doesn't overf

[Xen-devel] [PATCH v10 06/15] tools/libxc: x86 common code

2015-04-23 Thread Andrew Cooper
Save/restore records common to all x86 domain types (HVM, PV). This is only the TSC_INFO record. Signed-off-by: Andrew Cooper Acked-by: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxc/Makefile |1 + tools/libxc/xc_sr_common_x86.c | 54

[Xen-devel] [PATCH v10 09/15] tools/libxc: x86 PV restore code

2015-04-23 Thread Andrew Cooper
Restore the x86 PV specific parts. The X86_PV_INFO, the P2M_FRAMES, SHARED_INFO, and VCPU context records. The localise_page callback is called from the common PAGE_DATA code to convert PFNs in page tables to MFNs. Page tables are pinned and the guest's P2M is updated when the stream is complete

Re: [Xen-devel] [RFC PATCH COLO v5 08/29] tools/libxl: Introduce bitops macros

2015-04-23 Thread Wen Congyang
On 04/22/2015 11:10 PM, Ian Campbell wrote: > On Wed, 2015-04-01 at 14:41 +0800, Yang Hongyang wrote: >> From: Wen Congyang >> >> This is the same set used by libxc. > > What is this for? > > libxl already exposes a fairly complete libxl_bitmap type and helpers > for use in its own interfaces an

Re: [Xen-devel] [PATCHv3 3/4] xen: use ticket locks for spin locks

2015-04-23 Thread Jan Beulich
>>> On 21.04.15 at 12:11, wrote: > @@ -213,27 +211,32 @@ int _spin_trylock(spinlock_t *lock) > > void _spin_barrier(spinlock_t *lock) > { > +spinlock_tickets_t sample; > #ifdef LOCK_PROFILE > s_time_t block = NOW(); > -u64 loop = 0; > +#endif > > check_barrier(&lock->

Re: [Xen-devel] [PATCHv3 3/4] xen: use ticket locks for spin locks

2015-04-23 Thread Tim Deegan
Hi, At 11:11 +0100 on 21 Apr (1429614687), David Vrabel wrote: > void _spin_lock(spinlock_t *lock) > { > +spinlock_tickets_t tickets = { .tail = 1, }; > LOCK_PROFILE_VAR; > > check_lock(&lock->debug); > -while ( unlikely(!_raw_spin_trylock(&lock->raw)) ) > +tickets.head_t

Re: [Xen-devel] [RFC PATCH COLO v5 07/29] support to resume uncooperative HVM guests

2015-04-23 Thread Wen Congyang
On 04/22/2015 10:54 PM, Ian Campbell wrote: > On Wed, 2015-04-01 at 14:41 +0800, Yang Hongyang wrote: >> From: Wen Congyang >> >> For PVHVM, the hypercall return code is 0, and it can be resumed >> in a new domain context. >> >> For HVM, do nothing. >> >> Signed-off-by: Wen Congyang >> --- >> to

Re: [Xen-devel] [RFC PATCH COLO v5 07/29] support to resume uncooperative HVM guests

2015-04-23 Thread Wen Congyang
On 04/09/2015 02:12 AM, Wei Liu wrote: > On Wed, Apr 01, 2015 at 02:41:43PM +0800, Yang Hongyang wrote: >> From: Wen Congyang >> >> For PVHVM, the hypercall return code is 0, and it can be resumed >> in a new domain context. >> >> For HVM, do nothing. >> >> Signed-off-by: Wen Congyang >> --- >>

Re: [Xen-devel] [OSSTEST Nested PATCH v8 4/7] Changes on test step of Debian hvm guest install

2015-04-23 Thread Ian Campbell
On Thu, 2015-04-23 at 10:43 +, Hu, Robert wrote: > > If/when the other ts-*-install need to support sizing the disk based on > > a runvar they would need similar changes. If you want to make those now > > for consistency then that would be great, but I don't think it needs to > > be mandatory.

[Xen-devel] [PATCH v10 13/15] tools/libxc: common restore code

2015-04-23 Thread Andrew Cooper
Restore a domain from the new format. This reads and validates the domain and image header and loads the guest memory from the PAGE_DATA records, populating the p2m as it does so. This provides the xc_domain_restore2() function as an alternative to the existing xc_domain_restore(). Signed-off-by

[Xen-devel] [PATCH v2] xen: use 'Hardware domain' instead of 'Domain 0' in hwdom_shutdown()

2015-04-23 Thread Vitaly Kuznetsov
hwdom_shutdown() operates with hardware domains, use the proper wording. Eliminate pointless braces from switch cases. Use hardware_domain->domain_id instead of hardware_domid to print the actual domain ID as in some cases it can differ (e.g. Dom0 dies before the actual HW domain got created, kexe

Re: [Xen-devel] [RFC][PATCH 04/13] tools/libxl: detect and avoid conflicts with RDM

2015-04-23 Thread Chen, Tiejun
On 2015/4/15 21:10, Ian Jackson wrote: Tiejun Chen writes ("[RFC][PATCH 04/13] tools/libxl: detect and avoid conflicts with RDM"): While building a VM, HVM domain builder provides struct hvm_info_table{} to help hvmloader. Currently it includes two fields to construct guest e820 table by hvmloa

Re: [Xen-devel] [RFC][PATCH 02/13] introduce XENMEM_reserved_device_memory_map

2015-04-23 Thread Chen, Tiejun
>>> @@ -121,6 +121,8 @@ void iommu_dt_domain_destroy(struct domain *d); struct page_info; +typedef int iommu_grdm_t(xen_pfn_t start, xen_ulong_t nr, u32 id, void *ctxt); This needs a comment describing what the return values are. Will do. I'm not sure if yourself determine providing

Re: [Xen-devel] [RFC][PATCH 07/13] xen/passthrough: extend hypercall to support rdm reservation policy

2015-04-23 Thread Chen, Tiejun
On 2015/4/16 23:40, Tim Deegan wrote: Hi, At 17:21 +0800 on 10 Apr (1428686518), Tiejun Chen wrote: +/* + * In some cases, e.g. add a device to hwdomain, and remove a device from + * user domain, 'try' is fine enough since this is always safe to hwdomain. + */ +#define XEN_DOMCTL_PCIDEV_RDM_DEF

Re: [Xen-devel] [RFC][PATCH 05/13] xen/x86/p2m: introduce set_identity_p2m_entry

2015-04-23 Thread Chen, Tiejun
On 2015/4/16 23:05, Tim Deegan wrote: Hi, At 17:21 +0800 on 10 Apr (1428686516), Tiejun Chen wrote: @@ -862,6 +862,36 @@ int set_mmio_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn, return set_typed_p2m_entry(d, gfn, mfn, p2m_mmio_direct, access); } +int set_identity_p2m_ent

[Xen-devel] [PATCH v10 10/15] tools/libxc: x86 HVM save code

2015-04-23 Thread Andrew Cooper
Save the x86 HVM specific parts of the domain. This is considerably simpler than an x86 PV domain. Only the HVM_CONTEXT and HVM_PARAMS records are needed. There is no need for any page normalisation. Signed-off-by: Andrew Cooper Acked-by: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/

[Xen-devel] [PATCH v10 15/15] tools/libxc: Migration v2 compatibility for unmodified libxl

2015-04-23 Thread Andrew Cooper
These changes cause migration v2 to behave similarly enough to legacy migration to function for HVM guests under an unmodified xl/libxl. The migration v2 work for libxl will fix the layering issues with the toolstack and qemu records, at which point this patch will be unneeded. It is however incl

[Xen-devel] [PATCH v10 12/15] tools/libxc: common save code

2015-04-23 Thread Andrew Cooper
Save a domain, calling domain type specific function at the appropriate points. This implements the xc_domain_save2() API function which is equivalent to the existing xc_domain_save(). This writes the image and domain headers, and writes all the PAGE_DATA records using a "live" process. Signed-o

[Xen-devel] [PATCH v10 11/15] tools/libxc: x86 HVM restore code

2015-04-23 Thread Andrew Cooper
Restore the x86 HVM specific parts of a domain. This is the HVM_CONTEXT and HVM_PARAMS records. There is no need for any page localisation. This also includes writing the trailing qemu save record to a file because this is what libxc currently does. This is intended to be moved into libxl prope

[Xen-devel] [PATCH v10 14/15] docs: libxc migration stream specification

2015-04-23 Thread Andrew Cooper
From: David Vrabel Add the specification for a new migration stream format. The document includes all the details but to summarize: The existing (legacy) format is dependant on the word size of the toolstack. This prevents domains from migrating from hosts running 32-bit toolstacks to hosts ru

Re: [Xen-devel] [PATCHv6 2/5] gnttab: introduce per-active entry locks

2015-04-23 Thread Jan Beulich
>>> On 22.04.15 at 18:00, wrote: > @@ -548,11 +542,14 @@ static void mapcount( > > for ( handle = 0; handle < lgt->maptrack_limit; handle++ ) > { > +struct active_grant_entry *act; const please (wherever possible, to document the intent to not modify). > -if ( active_

Re: [Xen-devel] [PATCHv3 0/4] Use ticket locks for spinlocks

2015-04-23 Thread David Vrabel
On 21/04/15 11:22, Jan Beulich wrote: On 21.04.15 at 12:11, wrote: >> We have analysed the affect of this series on interrupt latency (by >> measuring the duration of irq disable/enable regions) and there is no >> signficant impact. >> >> http://xenbits.xen.org/people/dvrabel/bar2_comp.png >

Re: [Xen-devel] Performance evaluation and Questions: Eliminating Xen (RTDS) scheduler overhead on dedicated CPU

2015-04-23 Thread Dario Faggioli
Hey, guys, I know, I know, I'm s much late to the party! Sorry, I got trapped into a thing that I really needed to finish... :-/ I've got no intention to resurrect this old thread, just wanted to pointed out a few things. On Wed, 2015-04-08 at 16:52 -0400, Meng Xu wrote: > 2015-04-08 5:13 GM

Re: [Xen-devel] [RFC][PATCH 02/13] introduce XENMEM_reserved_device_memory_map

2015-04-23 Thread Jan Beulich
>>> On 23.04.15 at 14:32, wrote: > But if you already have one just please ignore this and tell me Here's what I currently have: introduce XENMEM_reserved_device_memory_map This is a prerequisite for punching holes into HVM and PVH guests' P2M to allow passing through devices that are associate

Re: [Xen-devel] [RFC][PATCH 07/13] xen/passthrough: extend hypercall to support rdm reservation policy

2015-04-23 Thread Tim Deegan
At 20:32 +0800 on 23 Apr (1429821151), Chen, Tiejun wrote: > >> +if ( flag == XEN_DOMCTL_PCIDEV_RDM_TRY ) > >> +{ > >> +printk(XENLOG_G_WARNING "Some devices may work failed > >> .\n"); > > > > This is a bit cryptic. How about: > > "RMRR map f

Re: [Xen-devel] [OSSTEST Nested PATCH v8 5/7] Add new script to customize nested test configuration

2015-04-23 Thread Ian Campbell
On Thu, 2015-04-23 at 12:30 +0100, Ian Campbell wrote: > This is the same problem I mentioned above arising from $l1 doing double > duty as both host and guest. There are places in osstest which are > pretty fluid about this (if the object has the approrpaite props you can > use it as either), but

Re: [Xen-devel] [PATCH v4 3/5] libxl: add support for vscsi

2015-04-23 Thread Konrad Rzeszutek Wilk
On Wed, Apr 22, 2015 at 10:08:52AM +0200, Olaf Hering wrote: > On Tue, Apr 21, Konrad Rzeszutek Wilk wrote: > > > On Fri, Apr 17, 2015 at 08:30:58AM +, Olaf Hering wrote: > > > +=item B > > > + > > > +Specifies the PVSCSI devices to be provided to the guest. PVSCSI passes > > > +dom0 SCSI devi

[Xen-devel] [PATCH v4.1] Support CPU list parsing in xentrace.

2015-04-23 Thread Konrad Rzeszutek Wilk
Hey George, Ian, Ian: I copied your comment and stuffed it in, please Ack: [PATCH v4.1 1/3] libxl/cpumap: Add xc_cpumap_[setcpu, clearcpu, already Acked: [PATCH v4.1 2/3] libxc/xentrace: Use xc_cpumap_t for George: please review (it is unchanged since v4 posting): [PATCH v4.1 3/3] xentrace:

[Xen-devel] [PATCH v4.1 2/3] libxc/xentrace: Use xc_cpumap_t for xc_tbuf_set_cpu_mask

2015-04-23 Thread Konrad Rzeszutek Wilk
From: George Dunlap xentrace is the only caller at the moment. Split the cpu and event mask setting out into seperate functions, but leave the current limit of 32 bits for masks passed in from the command-line. Based on a patch from Konrad Rzeszutek Wilk Acked-by: Ian Campbell Signed-off-by:

[Xen-devel] [PATCH v4.1 1/3] libxl/cpumap: Add xc_cpumap_[setcpu, clearcpu, testcpu] to complement xc_cpumap_alloc.

2015-04-23 Thread Konrad Rzeszutek Wilk
We export the xc_cpumap_alloc but not the bit operations. One could include 'xc_bitops.h' but that is naughty - so instead we just export the proper functions to do it on the xc_cpumap_t typedef. Signed-off-by: Konrad Rzeszutek Wilk v2: Use our own macro to make sure ARM is not affected nega

[Xen-devel] [PATCH v4.1 3/3] xentrace: Implement cpu mask range parsing of human values (-c).

2015-04-23 Thread Konrad Rzeszutek Wilk
Instead of just using -c 0x we can also use: -c -, -c ,, or a combination of them, or 'all' for all cpus. This new format can include just singular CPUs: -c , or ranges without an start or end (and xentrace will figure out the values), such as: -c - (which will include cpu0, cpu1, and cpu2) or -c

Re: [Xen-devel] [PATCH 1/1] x86/hvm: prevent hvm_free_ioreq_gmfn() clobber of arbitrary memory

2015-04-23 Thread Paul Durrant
Apologies for breaking the threading. The mail server ate the thread and I couldn't manage to get it back... >[snip] >> OK, here it is as a proper patch. I still haven't tested it -- indeed >> I'm not sure how to test multiple ioreq clients. Any suggestions? > >Paul? > >Thanks, Jan Testing mul

Re: [Xen-devel] [PATCH] AMD IOMMU: only translate remapped IO-APIC RTEs

2015-04-23 Thread Suthikulpanit, Suravee
On 4/17/15, 10:27, "Jan Beulich" wrote: >1aeb1156fa ("x86 don't change affinity with interrupt unmasked") >introducing RTE reads prior to the respective interrupt having got >enabled for the first time uncovered a bug in 2ca9fbd739 ("AMD IOMMU: >allocate IRTE entries instead of using a static m

Re: [Xen-devel] [PATCH v4 3/3] xentrace: Implement cpu mask range parsing of human values (-c).

2015-04-23 Thread Konrad Rzeszutek Wilk
On Wed, Apr 15, 2015 at 01:26:45PM +0100, Ian Campbell wrote: > On Fri, 2015-04-03 at 20:43 -0400, Konrad Rzeszutek Wilk wrote: > > Instead of just using -c 0x we can > > also use: -c -, -c ,, or a > > combination of them, or 'all' for all cpus. > > > > This new format can include just singular CP

[Xen-devel] [PATCH 0/9] Porting the intel_pstate driver to Xen

2015-04-23 Thread Wei Wang
Hi, This patch series ports the intel_pstate driver from the Linux kernel to Xen. The intel_pstate driver is used to tune P states for SandyBridge+ processors. It can be disabled by adding "intel_pstate=disable" to the booting parameter list. The intel_pstate.c file under xen/arch/x86/acpi/cpuf

[Xen-devel] qemu-upstream build fix backport?

2015-04-23 Thread Jan Beulich
Stefano, while I'm not really convinced of the change, commit 14655e9a18 ("glib-compat: fix problems with not-quite glib 2.22") at least helps with building on SLE11 SP3. My concern is that the fallback seems worse than using the backported interface in glib, but I also can't see a reasonable way

Re: [Xen-devel] [PATCHv3 3/4] xen: use ticket locks for spin locks

2015-04-23 Thread David Vrabel
On 23/04/15 13:03, Tim Deegan wrote: > Hi, > > At 11:11 +0100 on 21 Apr (1429614687), David Vrabel wrote: >> void _spin_lock(spinlock_t *lock) >> { >> +spinlock_tickets_t tickets = { .tail = 1, }; >> LOCK_PROFILE_VAR; >> >> check_lock(&lock->debug); >> -while ( unlikely(!_raw

Re: [Xen-devel] [PATCH] AMD IOMMU: only translate remapped IO-APIC RTEs

2015-04-23 Thread Jan Beulich
>>> On 23.04.15 at 15:31, wrote: > > On 4/17/15, 10:27, "Jan Beulich" wrote: > >>1aeb1156fa ("x86 don't change affinity with interrupt unmasked") >>introducing RTE reads prior to the respective interrupt having got >>enabled for the first time uncovered a bug in 2ca9fbd739 ("AMD IOMMU: >>alloc

Re: [Xen-devel] [PATCHv6 2/5] gnttab: introduce per-active entry locks

2015-04-23 Thread David Vrabel
On 23/04/15 13:42, Jan Beulich wrote: > >> @@ -3130,7 +3167,9 @@ grant_table_destroy( >> >> if ( t == NULL ) >> return; >> - >> + >> +spin_lock(&t->lock); >> + >> for ( i = 0; i < nr_grant_frames(t); i++ ) >> free_xenheap_page(t->shared_raw[i]); >> xfree(t

Re: [Xen-devel] [PATCH v4 3/3] xentrace: Implement cpu mask range parsing of human values (-c).

2015-04-23 Thread George Dunlap
On 04/23/2015 02:31 PM, Konrad Rzeszutek Wilk wrote: > On Wed, Apr 15, 2015 at 01:26:45PM +0100, Ian Campbell wrote: >> On Fri, 2015-04-03 at 20:43 -0400, Konrad Rzeszutek Wilk wrote: >>> Instead of just using -c 0x we can >>> also use: -c -, -c ,, or a >>> combination of them, or 'all' for all cpu

Re: [Xen-devel] [PATCHv3 3/4] xen: use ticket locks for spin locks

2015-04-23 Thread Jan Beulich
>>> On 23.04.15 at 14:03, wrote: > At 11:11 +0100 on 21 Apr (1429614687), David Vrabel wrote: >> void _spin_unlock(spinlock_t *lock) >> { >> +smp_mb(); >> preempt_enable(); >> LOCK_PROFILE_REL; >> -_raw_spin_unlock(&lock->raw); >> +lock->tickets.head++; > > This needs to b

[Xen-devel] [PATCH 1/9] x86/acpi: add a common interface for matching the current cpu against an array of x86_cpu_ids

2015-04-23 Thread Wei Wang
Re-organize the cpu matching code in the mwait-idle.c, so that it can be re-used in the intel_pstate.c. Signed-off-by: Wei Wang --- xen/arch/x86/cpu/common.c | 39 +++ xen/arch/x86/cpu/mwait-idle.c | 30 +- xen/include/asm-

[Xen-devel] [PATCH 5/9] x86/intel_pstate: relocate the driver register/unregister function

2015-04-23 Thread Wei Wang
Register/unregister the CPU hotplug notifier when the driver is registered, and move the driver register/unregister function to the cpufreq.c. Signed-off-by: Wei Wang --- xen/drivers/cpufreq/cpufreq.c | 27 +++ xen/include/acpi/cpufreq/cpufreq.h | 28 ++-

  1   2   >