Re: [Xen-devel] [PATCH v3 4/4] libxl: add support for vscsi

2015-03-16 Thread Olaf Hering
On Fri, Mar 13, Wei Liu wrote: > On Fri, Mar 13, 2015 at 02:45:28PM +0100, Olaf Hering wrote: > > On Thu, Mar 12, Ian Campbell wrote: > > > > > On Thu, 2015-03-12 at 17:07 +0100, Olaf Hering wrote: > > > > Related: I see libxl_device_vscsi_dispose does now a pointer check, so I > > > > assume its

Re: [Xen-devel] [PATCH] Build: Fix stubdom vtpm build failure

2015-03-16 Thread Xu, Quan
Olaf, Could you help me test this patch in SLE_11_SP3/openSUSE_11.4? Quan > -Original Message- > From: Xu, Quan > Sent: Saturday, March 14, 2015 10:37 AM > To: o...@aepfle.de; ian.campb...@citrix.com > Cc: xen-devel@lists.xen.org; dgde...@tycho.nsa.gov; > andrew.coop...@citrix.com

Re: [Xen-devel] [PATCH] Build: Fix stubdom vtpm build failure

2015-03-16 Thread Olaf Hering
On Fri, Mar 13, Quan Xu wrote: > Typedefs are duplicated in stubdom/vtpmmgr/tcg.h and supported compilers > do not cope with current staging branch. What remains after applying this patch is this error: [ 665s] tpm2_types.h:229:19: error: redefinition of typedef 'TPM_ALGORITHM_ID' [ 665s] tcg.

Re: [Xen-devel] [PATCH] Build: Fix stubdom vtpm build failure

2015-03-16 Thread Xu, Quan
Thanks Olaf. I will continue to send out v2 to fix it. I will change from 'TPM_ALGORITHM_ID' to 'TPM2_ALGORITHM_ID'. Quan > -Original Message- > From: Olaf Hering [mailto:o...@aepfle.de] > Sent: Monday, March 16, 2015 5:16 PM > To: Xu, Quan > Cc: ian.campb...@citrix.com; xen-devel@list

Re: [Xen-devel] Compliling Xen 4.5.0 Fails with error: ‘bufioreq_pfn’ may be used uninitialised in this function [-Werror=uninitialized]

2015-03-16 Thread Paul Durrant
> -Original Message- > From: xen-devel-boun...@lists.xen.org [mailto:xen-devel- > boun...@lists.xen.org] On Behalf Of Ian Murray > Sent: 15 March 2015 22:59 > To: xen-de...@lists.xensource.com > Subject: [Xen-devel] Compliling Xen 4.5.0 Fails with error: ‘bufioreq_pfn’ may > be used uniniti

[Xen-devel] [PATCH v8 05/21] libxl: introduce vNUMA types

2015-03-16 Thread Wei Liu
A domain can contain several virtual NUMA nodes, hence we introduce an array in libxl_domain_build_info. libxl_vnode_info contains the size of memory in that node, the distance from that node to every nodes, the underlying pnode and a bitmap of vcpus. Signed-off-by: Wei Liu Reviewed-by: Dario Fa

[Xen-devel] [PATCH v8 02/21] libxc: duplicate snippet to allocate p2m_host array

2015-03-16 Thread Wei Liu
Currently all in tree code doesn't set the superpage flag, I would just remove superpage support if I can, but Konrad wants it retained for the moment. As I'm going to change the p2m_host array allocation, duplicate the code snippet to allocate p2m_host array in this patch, so that we retain the b

[Xen-devel] [PATCH v8 09/21] libxl: functions to build vmemranges for PV guest

2015-03-16 Thread Wei Liu
Introduce a arch-independent routine to generate one vmemrange per vnode. Also introduce arch-dependent routines for different architectures because part of the process is arch-specific -- ARM has yet have NUMA support and E820 is x86 only. For those x86 guests who care about machine E820 map (i.e

[Xen-devel] [PATCH v8 03/21] libxc: add p2m_size to xc_dom_image

2015-03-16 Thread Wei Liu
Add a new field p2m_size to keep track of the number of pages covered by p2m. Change total_pages to p2m_size in functions which in fact need the size of p2m. This is needed because we are going to ditch the assumption that PV x86 has only one contiguous ram region. Originally the p2m size was alw

[Xen-devel] [PATCH v8 04/21] libxc: allocate memory with vNUMA information for PV guest

2015-03-16 Thread Wei Liu
>From libxc's point of view, it only needs to know vnode to pnode mapping and size of each vnode to allocate memory accordingly. Add these fields to xc_dom structure. The caller might not pass in vNUMA information. In that case, a dummy layout is generated for the convenience of libxc's allocation

[Xen-devel] [PATCH v8 06/21] libxl: add vmemrange to libxl__domain_build_state

2015-03-16 Thread Wei Liu
A vnode consists of one or more vmemranges (virtual memory range). One example of multiple vmemranges is that there is a hole in one vnode. Currently we haven't exported vmemrange interface to libxl user. Vmemranges are generated during domain build, so we have relevant structures in domain build

[Xen-devel] [PATCH v8 08/21] libxl: x86: factor out e820_host_sanitize

2015-03-16 Thread Wei Liu
This function gets the machine E820 map and sanitize it according to PV guest configuration. This will be used in later patch. No functional change introduced in this patch. Signed-off-by: Wei Liu Reviewed-by: Andrew Cooper Reviewed-by: Dario Faggioli Cc: Ian Campbell Cc: Ian Jackson Cc: Ele

[Xen-devel] [PATCH v8 07/21] libxl: introduce libxl__vnuma_config_check

2015-03-16 Thread Wei Liu
This function is used to check whether vNUMA configuration (be it auto-generated or supplied by user) is valid. Define a new error code ERROR_VNUMA_CONFIG_INVALID. The checks performed can be found in the comment of the function. This vNUMA function (and future ones) is placed in a new file call

[Xen-devel] [PATCH v8 01/21] xen: make two memory hypercalls vNUMA-aware

2015-03-16 Thread Wei Liu
Make XENMEM_increase_reservation and XENMEM_populate_physmap vNUMA-aware. That is, if guest requests Xen to allocate memory for specific vnode, Xen can translate vnode to pnode using vNUMA information of that guest. XENMEMF_vnode is introduced for the guest to mark the node number is in fact virt

[Xen-devel] [PATCH v8 00/21] Virtual NUMA for PV and HVM

2015-03-16 Thread Wei Liu
Hi all This is version 8 of this series rebased on top of master. This patch series implements virtual NUMA support for both PV and HVM guest. That is, admin can configure via libxl what virtual NUMA topology the guest sees. This is the stage 1 (basic vNUMA support) and part of stage 2 (vNUMA-wa

Re: [Xen-devel] [RFC PATCH 02/19] xen/arm: its: Import GICv3 ITS driver from linux

2015-03-16 Thread Vijay Kilari
On Fri, Mar 13, 2015 at 4:05 PM, Julien Grall wrote: > > > On 13/03/2015 10:24, Julien Grall wrote: >> >> Hello Vijay, >> >> On 02/03/2015 12:30, vijay.kil...@gmail.com wrote: >>> >>> From: Vijaya Kumar K >>> >>> This is actual GICv3 ITS driver from linux. >>> No xen related changes are made and

Re: [Xen-devel] [PATCHv1] xen/balloon: disable memory hotplug in PV guests

2015-03-16 Thread Daniel Kiper
On Mon, Mar 16, 2015 at 06:35:04AM +0100, Juergen Gross wrote: > On 03/11/2015 04:40 PM, Boris Ostrovsky wrote: > >On 03/11/2015 10:42 AM, David Vrabel wrote: > >>On 10/03/15 13:35, Boris Ostrovsky wrote: > >>>On 03/10/2015 07:40 AM, David Vrabel wrote: > On 09/03/15 14:10, David Vrabel wrote:

Re: [Xen-devel] Compliling Xen 4.5.0 Fails with error: ‘bufioreq_pfn’ may be used uninitialised in this function [-Werror=uninitialized]

2015-03-16 Thread Ian Campbell
On Mon, 2015-03-16 at 09:45 +, Paul Durrant wrote: > Those line numbers don't work for me. I did a checkout of > RELEASE-4.5.0 and, whilst bufioreq_pfn is indeed declared on line 718, > I see no reference to it on line 487. Also, if I compile debug=n I see > no problem. Is it possible you don't

Re: [Xen-devel] [RFC PATCH 02/19] xen/arm: its: Import GICv3 ITS driver from linux

2015-03-16 Thread Stefano Stabellini
On Mon, 16 Mar 2015, Vijay Kilari wrote: > On Fri, Mar 13, 2015 at 4:05 PM, Julien Grall wrote: > > > > > > On 13/03/2015 10:24, Julien Grall wrote: > >> > >> Hello Vijay, > >> > >> On 02/03/2015 12:30, vijay.kil...@gmail.com wrote: > >>> > >>> From: Vijaya Kumar K > >>> > >>> This is actual GICv

Re: [Xen-devel] [PATCH RFC v1 1/2] xen/hw/passthrough: Use errno instead of ret for xc_physdev_map_* calls

2015-03-16 Thread Stefano Stabellini
On Fri, 13 Mar 2015, Konrad Rzeszutek Wilk wrote: > As the libxc library follows (mostly) the return negative > for failure and stashes the error value in errno. > > Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Stefano Stabellini I'll add it to my queue > hw/xen/xen_pt.c | 4 ++-- > h

Re: [Xen-devel] [PATCH RFC v1 2/2] xen-hvm: When using xc_domain_add_to_physmap also include errno when reporting

2015-03-16 Thread Stefano Stabellini
On Fri, 13 Mar 2015, Konrad Rzeszutek Wilk wrote: > .errors - as it will most likely have the proper error value. > > Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Stefano Stabellini > xen-hvm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/xen-hvm.c b/xen-hv

[Xen-devel] [PATCH v8 10/21] libxl: build, check and pass vNUMA info to Xen for PV guest

2015-03-16 Thread Wei Liu
Transform the user supplied vNUMA configuration into libxl internal representations, and finally libxc representations. Check validity of the configuration along the line. Signed-off-by: Wei Liu Reviewed-by: Dario Faggioli Cc: Ian Campbell Cc: Ian Jackson Cc: Dario Faggioli Cc: Elena Ufimtsev

[Xen-devel] [PATCH v8 20/21] xl: introduce xcalloc

2015-03-16 Thread Wei Liu
Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Acked-by: Ian Campbell --- Changes in v6: 1. Join two lines to make code more compact. 2. Use %zu and drop casting. --- tools/libxl/xl_cmdimpl.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tools/libxl/xl_cmdimpl.c b/to

[Xen-devel] [PATCH v8 14/21] libxl: disallow memory relocation when vNUMA is enabled

2015-03-16 Thread Wei Liu
Disallow memory relocation when vNUMA is enabled, because relocated memory ends up off node. Further more, even if we dynamically expand node coverage in hvmloader, low memory and high memory may reside in different physical nodes, blindly relocating low memory to high memory gives us a sub-optimal

[Xen-devel] [PATCH v8 19/21] libxlu: introduce new APIs

2015-03-16 Thread Wei Liu
These APIs can be used to manipulate XLU_ConfigValue and XLU_ConfigList. APIs introduced: 1. xlu_cfg_value_type 2. xlu_cfg_value_get_string 3. xlu_cfg_value_get_list 4. xlu_cfg_get_listitem2 Move some definitions from private header to public header as needed. Signed-off-by: Wei Liu Cc: Ian Jac

[Xen-devel] [PATCH v8 12/21] libxc: allocate memory with vNUMA information for HVM guest

2015-03-16 Thread Wei Liu
The algorithm is more or less the same as the one used for PV guest. Libxc gets hold of the mapping of vnode to pnode and size of each vnode then allocate memory accordingly. And then the function returns low memory end, high memory end and mmio start to caller. Libxl needs those values to constru

[Xen-devel] [PATCH v8 17/21] libxlu: nested list support

2015-03-16 Thread Wei Liu
1. Extend grammar of parser. 2. Adjust internal functions to accept XLU_ConfigValue instead of char *. Signed-off-by: Wei Liu Cc: Ian Jackson Cc: Ian Campbell Acked-by: Ian Jackson --- tools/libxl/libxlu_cfg.c | 30 +++--- tools/libxl/libxlu_cfg_i.h | 5 +++-- to

[Xen-devel] [PATCH v8 15/21] libxl: define LIBXL_HAVE_VNUMA

2015-03-16 Thread Wei Liu
Signed-off-by: Wei Liu Reviewed-by: Dario Faggioli Cc: Ian Campbell Cc: Ian Jackson Acked-by: Ian Campbell --- Changes in v6: 1. Better description of the macro. --- tools/libxl/libxl.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index

[Xen-devel] [PATCH v8 13/21] libxl: build, check and pass vNUMA info to Xen for HVM guest

2015-03-16 Thread Wei Liu
Transform user supplied vNUMA configuration into libxl internal representations then libxc representations. Check validity along the line. Libxc has more involvement in building vmemranges in HVM case compared to PV case. The building of vmemranges is placed after xc_hvm_build returns, because it

[Xen-devel] [PATCH v8 21/21] xl: vNUMA support

2015-03-16 Thread Wei Liu
This patch includes configuration options parser and documentation. Please find the hunk to xl.cfg.pod.5 for more information. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson --- Changes in v8: 1. State all options are mandatory in manpage. 2. Rework xl config parser. Changes in v7: 1

[Xen-devel] [PATCH v8 11/21] libxc: indentation change to xc_hvm_build_x86.c

2015-03-16 Thread Wei Liu
Move a while loop in xc_hvm_build_x86 one block to the right. No functional change introduced. Functional changes will be introduced in next patch. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Cc: Dario Faggioli Cc: Elena Ufimtseva Acked-by: Ian Campbell --- tools/libxc/xc_hvm_b

[Xen-devel] [PATCH v8 16/21] libxlu: rework internal representation of setting

2015-03-16 Thread Wei Liu
This patches does following things: 1. Properly define a XLU_ConfigList type. Originally it was defined to be XLU_ConfigSetting. 2. Define XLU_ConfigValue type, which can be either a string or a list of XLU_ConfigValue. 3. ConfigSetting now references XLU_ConfigValue. Originally it only w

[Xen-devel] [PATCH v8 18/21] libxlu: record location when parsing values

2015-03-16 Thread Wei Liu
Originally only setting has line number recorded. Since we're moving to more sophisticated API, record the location for individual value. It is useful for error reporting. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson --- Changes in v8: 1. Define YYLTYPE in libxl_internal.h and get ri

[Xen-devel] [PATCH 1/3] tools/libxl/libxl_qmp.c: Make sure sun_path is NULL terminated in qmp_open

2015-03-16 Thread PRAMOD DEVENDRA
From: Pramod Devendra Signed-off-by: Pramod Devendra CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu --- tools/libxl/libxl_qmp.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c index c7324e6..10

[Xen-devel] [PATCH] tools/libxl: close the logfile_w and null file descriptors in libxl__spawn_qdisk_backend() error path

2015-03-16 Thread Koushik Chakravarty
Signed-off-by: Koushik Chakravarty CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu --- tools/libxl/libxl_dm.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index cb006df..161401c 100644 --- a

[Xen-devel] [PATCH] tools/libxl: avoid comparing an unsigned int to -1

2015-03-16 Thread Koushik Chakravarty
Signed-off-by: Koushik Chakravarty CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu --- tools/libxl/libxl_json.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_json.c b/tools/libxl/libxl_json.c index 98335b0..346929a 100644 --- a/to

[Xen-devel] [PATCH 2/3] tools/libxl/libxl_cpuid.c: Fix leak of resstr on error path

2015-03-16 Thread PRAMOD DEVENDRA
From: Pramod Devendra Signed-off-by: Pramod Devendra CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu --- tools/libxl/libxl_cpuid.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl_cpuid.c b/tools/libxl/libxl_cpuid.c index b

[Xen-devel] [PATCH 3/3] tools/libxc/xc_linux_osdep.c: Don't leak mmap() mapping on map_foreign_bulk() error path

2015-03-16 Thread PRAMOD DEVENDRA
From: Pramod Devendra Signed-off-by: Pramod Devendra CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu --- tools/libxc/xc_linux_osdep.c |1 + 1 file changed, 1 insertion(+) diff --git a/tools/libxc/xc_linux_osdep.c b/tools/libxc/xc_linux_osdep.c index b6c435a..ce59590

Re: [Xen-devel] [RFC PATCH 00/19] xen/arm: Add ITS support

2015-03-16 Thread Vijay Kilari
On Fri, Mar 13, 2015 at 3:43 PM, Julien Grall wrote: > Hi Vijay, > > On 13/03/2015 04:48, Vijay Kilari wrote: >> >> The changes that I envisage for supporting Multiple ITS is >>- Generate as many number of ITS dt nodes for Dom0 that host DT >> contains. >>- For DomU always generate only on

Re: [Xen-devel] [PATCHv1] xen/balloon: disable memory hotplug in PV guests

2015-03-16 Thread Juergen Gross
On 03/16/2015 11:03 AM, Daniel Kiper wrote: On Mon, Mar 16, 2015 at 06:35:04AM +0100, Juergen Gross wrote: On 03/11/2015 04:40 PM, Boris Ostrovsky wrote: On 03/11/2015 10:42 AM, David Vrabel wrote: On 10/03/15 13:35, Boris Ostrovsky wrote: On 03/10/2015 07:40 AM, David Vrabel wrote: On 09/03

Re: [Xen-devel] Xen 4.6 Development Update (two months reminder)

2015-03-16 Thread Wei Liu
On Fri, Mar 13, 2015 at 10:32:41AM +, Ian Campbell wrote: > (culling the cc list a lot) > > On Thu, 2015-03-12 at 11:54 +, Jan Beulich wrote: > > >>> On 12.03.15 at 11:21, wrote: > > > == Linux == > > > > Wouldn't it make sense to move external projects down, and have > > our core pieces

[Xen-devel] Problem about usleep function in tools/hotplug/Linux/xendomains.in

2015-03-16 Thread Fabio Fantoni
If usleep binary is missed in dom0 xendomains script use its function instead but as it is done now always rounds down to the nearest integer number, and in case it is less than 1 becomes 0. So for example in dom0 like those I use (debian) withoutusleep binaryall small usleep in the script are n

Re: [Xen-devel] [PATCH 1/4] x86/MSI-X: be more careful during teardown

2015-03-16 Thread Jan Beulich
>>> On 13.03.15 at 19:10, wrote: > On 10/03/15 16:27, Jan Beulich wrote: >> When a device gets detached from a guest, pciback will clear its >> command register, thus disabling both memory and I/O decoding. The >> disabled memory decoding, however, has an effect on the MSI-X table >> accesses the

Re: [Xen-devel] [PATCH 2/4] x86/MSI-X: access MSI‑X table only after having enabled MSI‑X

2015-03-16 Thread Jan Beulich
>>> On 13.03.15 at 20:18, wrote: > On 10/03/15 16:28, Jan Beulich wrote: >> As done in Linux by f598282f51 ("PCI: Fix the NIU MSI-X problem in a >> better way") and its broken predecessor, make sure we don't access the >> MSI-X table without having enabled MSI-X first, using the mask-all flag >> i

Re: [Xen-devel] [PATCH v3 4/4] libxl: add support for vscsi

2015-03-16 Thread Wei Liu
On Mon, Mar 16, 2015 at 09:16:31AM +0100, Olaf Hering wrote: > On Fri, Mar 13, Wei Liu wrote: > > > On Fri, Mar 13, 2015 at 02:45:28PM +0100, Olaf Hering wrote: > > > On Thu, Mar 12, Ian Campbell wrote: > > > > > > > On Thu, 2015-03-12 at 17:07 +0100, Olaf Hering wrote: > > > > > Related: I see l

Re: [Xen-devel] Allow controlling NAPI weight of virtual network interfaces (vif) with sysfs

2015-03-16 Thread Zoltan Kiss
Hi, In that case I recommend you to take a look at the debugfs patch already in there, based on that it should be pretty straightforward to do it what you want: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=f51de243 It already prints out "queue->napi.weight" Zol

Re: [Xen-devel] Any work on sharing of large multi-page segments?

2015-03-16 Thread Jan Beulich
>>> On 15.03.15 at 09:37, wrote: > Has anyone done any work on sharing of large multiple-page segments > between domains? The current grant table implementation is unsuitable > for this because it only allows sharing single pages and is limited to a > relatively small number of entries (and pas

Re: [Xen-devel] [PATCH] add upstream GRUB to the Xen build system

2015-03-16 Thread Fabio Fantoni
Il 13/03/2015 17:24, David Vrabel ha scritto: On 13/03/15 16:02, Stefano Stabellini wrote: On Fri, 13 Mar 2015, David Vrabel wrote: On 13/03/15 15:33, Stefano Stabellini wrote: Clone and build upstream GRUB to generate x86_64 and i386 pvgrub2 binaries. See Ian's blog post for more information:

Re: [Xen-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-16 Thread Ian Campbell
On Mon, 2015-03-16 at 09:07 +0800, Chen, Tiejun wrote: > On 2015/3/13 18:11, Ian Campbell wrote: > > On Fri, 2015-03-13 at 09:39 +0800, Chen, Tiejun wrote: > >>> I don't think you can abort here, since a user can set > >>> b_info->u.hvm.gfx_passthru_kind to default. You would need to > >>> return a

Re: [Xen-devel] [PATCH 1/2] x86: identifying the boot cpu

2015-03-16 Thread Jan Beulich
>>> On 13.03.15 at 19:07, wrote: > Provide helpers to access the socket and core IDs, resulting from > identification phase. Such helpers already exist, as can be seen from the context of the hunk changing xen/include/asm-x86/processor.h. What you add are accessors specifically for the boot CPU.

Re: [Xen-devel] osstest going offline for a bit due to database server move

2015-03-16 Thread Ian Campbell
On Sat, 2015-03-14 at 11:02 +, Ian Campbell wrote: > On Wed, 2015-03-11 at 16:28 +, Ian Jackson wrote: > > The db server for the production osstest instance needs to be > > physically moved. This is planned to take place on Friday. > > > > I have dropped a `stop' file in which will stop o

Re: [Xen-devel] [PATCH v2 2/2] sched_credit2.c: runqueue_per_core code

2015-03-16 Thread Jan Beulich
> @@ -161,10 +161,16 @@ > */ > #define __CSFLAG_runq_migrate_request 3 > #define CSFLAG_runq_migrate_request (1<<__CSFLAG_runq_migrate_request) > - > +/* CREDIT2_OPT_RUNQUEUE: Used to define the runqueue used > + */ > +#define CREDIT2_OPT_RUNQUEUE_CORE 1 > +#define CREDIT2_OPT_RUNQUEUE_SOCKET 2

Re: [Xen-devel] [PATCH v2 2/2] sched_credit2.c: runqueue_per_core code

2015-03-16 Thread Jan Beulich
>>> On 13.03.15 at 20:13, wrote: > On 03/13/2015 06:29 PM, Andrew Cooper wrote: >>> @@ -1940,10 +1946,10 @@ static void init_pcpu(const struct scheduler *ops, >>> int cpu) >>> >>> /* Figure out which runqueue to put it in */ >>> /* NB: cpu 0 doesn't get a STARTING callback, so we hard

Re: [Xen-devel] [PATCH v2 2/2] sched_credit2.c: runqueue_per_core code

2015-03-16 Thread Jan Beulich
>>> On 13.03.15 at 19:11, wrote: > @@ -1940,10 +1946,10 @@ static void init_pcpu(const struct scheduler *ops, > int cpu) > > /* Figure out which runqueue to put it in */ > /* NB: cpu 0 doesn't get a STARTING callback, so we hard-code it to > runqueue 0. */ > -if ( cpu == 0 ) > -

Re: [Xen-devel] [PATCH v2 2/2] sched_credit2.c: runqueue_per_core code

2015-03-16 Thread George Dunlap
On 03/16/2015 12:48 PM, Jan Beulich wrote: On 13.03.15 at 20:13, wrote: >> On 03/13/2015 06:29 PM, Andrew Cooper wrote: @@ -1940,10 +1946,10 @@ static void init_pcpu(const struct scheduler *ops, int cpu) /* Figure out which runqueue to put it in */ /* NB:

Re: [Xen-devel] [PATCH v2 2/2] sched_credit2.c: runqueue_per_core code

2015-03-16 Thread Jan Beulich
>>> On 16.03.15 at 13:51, wrote: > On 03/16/2015 12:48 PM, Jan Beulich wrote: > On 13.03.15 at 20:13, wrote: >>> On 03/13/2015 06:29 PM, Andrew Cooper wrote: > @@ -1940,10 +1946,10 @@ static void init_pcpu(const struct scheduler > *ops, > int cpu) > > /* Figure out wh

Re: [Xen-devel] Xen 4.6 Development Update (two months reminder)

2015-03-16 Thread Mihai Donțu
On Thu, 12 Mar 2015 10:21:56 + wei.l...@citrix.com wrote: > We are now two months into 4.6 development window. This is an email to keep > track of all the patch series I gathered. It is by no means complete and / or > acurate. Feel free to reply this email with new projects or correct my > misu

Re: [Xen-devel] [RFC PATCH 02/19] xen/arm: its: Import GICv3 ITS driver from linux

2015-03-16 Thread Julien Grall
On 16/03/15 10:12, Stefano Stabellini wrote: >>> BTW this is not even a copy from Linux. You replaced all the hard tab by >>> space... >> >> Yes, I replaced tabs. Whats the ways of copying linux driver to Xen. >> Should we keep and maintain coding style as well? > > If it is the Linux driver you a

Re: [Xen-devel] [RFC PATCH 02/19] xen/arm: its: Import GICv3 ITS driver from linux

2015-03-16 Thread Julien Grall
Hi Vijay, On 16/03/15 09:55, Vijay Kilari wrote: > On Fri, Mar 13, 2015 at 4:05 PM, Julien Grall wrote: >> >> >> On 13/03/2015 10:24, Julien Grall wrote: >>> >>> Hello Vijay, >>> >>> On 02/03/2015 12:30, vijay.kil...@gmail.com wrote: From: Vijaya Kumar K This is actual GICv3

Re: [Xen-devel] [PATCH v2 2/2] sched_credit2.c: runqueue_per_core code

2015-03-16 Thread Dario Faggioli
On Mon, 2015-03-16 at 12:56 +, Jan Beulich wrote: > >>> On 16.03.15 at 13:51, wrote: > > On 03/16/2015 12:48 PM, Jan Beulich wrote: > > >> Them returning garbage isn't what needs fixing. Instead the code > >> here should use a different condition to check whether this is the > >> boot CPU (e

[Xen-devel] [PATCH v3 0/6] tools/libxl: Improvements to libxl__datacopier

2015-03-16 Thread Ross Lagerwall
To support migration v2, we need far more flexibility out of the datacopier. This series adds the ability to read from an fd into a local buffer and to copy a specific number of bytes rather than to EOF. It also contains bugfixes related to writing from a local buffer, and POLLHUP handling. Chan

[Xen-devel] [PATCH v3 1/6] tools/libxl: Introduce min and max macros

2015-03-16 Thread Ross Lagerwall
From: Andrew Cooper This is the same set used by libxc. Signed-off-by: Andrew Cooper Acked-by: Ian Campbell CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxl/libxl_internal.h | 16 1 file changed, 16 insertions(+) diff --git a/tools/libxl/libxl_internal.h b/too

[Xen-devel] [PATCH v3 6/6] tools/libxl: Adjust datacopiers POLLHUP handling when the fd is also readable

2015-03-16 Thread Ross Lagerwall
From: Andrew Cooper POLLHUP|POLLIN is a valid revent to receive when there is readable data in a pipe, but the writable fd has been closed. This occurs in migration v2 when the legacy conversion process (which transforms the data inline) completes and exits successfully. In the case that there

[Xen-devel] [PATCH v3 5/6] tools/libxl: Extend datacopier to support reading into a buffer

2015-03-16 Thread Ross Lagerwall
Currently a datacopier may source its data from an fd or local buffer, but its destination must be an fd. For migration v2, libxl needs to read from the migration stream into a local buffer. Implement a "read into local buffer" mode, invoked when readbuf is set and writefd is -1. On success, the

[Xen-devel] [PATCH v3 2/6] tools/libxl: Update datacopier to support sending data only

2015-03-16 Thread Ross Lagerwall
From: Wen Congyang Currently, starting a datacopier requires a valid read and write fd, but this is a problem when purely sending data from a local buffer to a writable fd. The prefixdata mechanism already exists and works for inserting data from a local buffer ahead of reading from the read fd.

[Xen-devel] [PATCH v3 3/6] tools/libxl: Avoid overrunning static buffer with prefixdata

2015-03-16 Thread Ross Lagerwall
An individual datacopier_buf contains a static buffer of 1000 bytes. Attempting to add prefixdata of more than 1000 bytes would overrun the buffer and cause heap corruption. Instead, split the prefixdata and chain together multiple datacopier buffers. This allows for an arbitrary quantity of prefi

[Xen-devel] [PATCH v3 4/6] tools/libxl: Allow limiting amount copied by datacopier

2015-03-16 Thread Ross Lagerwall
Currently, a datacopier will unconditionally read until EOF on its read fd. For migration v2, libxl needs to read records of a specific length out of the migration stream, without reading any further data. Introduce a parameter, bytes_to_read, which may be used to stop the datacopier ahead of rea

Re: [Xen-devel] [RFC PATCH 02/19] xen/arm: its: Import GICv3 ITS driver from linux

2015-03-16 Thread Vijay Kilari
On Mon, Mar 16, 2015 at 6:45 PM, Julien Grall wrote: > Hi Vijay, > > On 16/03/15 09:55, Vijay Kilari wrote: >> On Fri, Mar 13, 2015 at 4:05 PM, Julien Grall >> wrote: >>> >>> >>> On 13/03/2015 10:24, Julien Grall wrote: Hello Vijay, On 02/03/2015 12:30, vijay.kil...@gmail.com

[Xen-devel] [PATCH 1/9] qspinlock: A simple generic 4-byte queue spinlock

2015-03-16 Thread Peter Zijlstra
From: Waiman Long This patch introduces a new generic queue spinlock implementation that can serve as an alternative to the default ticket spinlock. Compared with the ticket spinlock, this queue spinlock should be almost as fair as the ticket spinlock. It has about the same speed in single-thread

Re: [Xen-devel] [PATCH v2 5/6] tools/libxl: Extend datacopier to support reading into a buffer

2015-03-16 Thread Ross Lagerwall
On 03/11/2015 12:19 PM, Ian Campbell wrote: On Fri, 2015-03-06 at 19:05 +, Andrew Cooper wrote: From: Ross Lagerwall Currently a datacopier may source its data from an fd or local buffer, but its destination must be an fd. For migration v2, libxl needs to read from the migration stream in

[Xen-devel] [PATCH 8/9] qspinlock: Generic paravirt support

2015-03-16 Thread Peter Zijlstra
Implement simple paravirt support for the qspinlock. Provide a separate (second) version of the spin_lock_slowpath for paravirt along with a special unlock path. The second slowpath is generated by adding a few pv hooks to the normal slowpath, but where those will compile away for the native case

[Xen-devel] [PATCH 4/9] qspinlock: Extract out code snippets for the next patch

2015-03-16 Thread Peter Zijlstra
From: Waiman Long This is a preparatory patch that extracts out the following 2 code snippets to prepare for the next performance optimization patch. 1) the logic for the exchange of new and previous tail code words into a new xchg_tail() function. 2) the logic for clearing the pending bit

[Xen-devel] [PATCH 3/9] qspinlock: Add pending bit

2015-03-16 Thread Peter Zijlstra
From: Peter Zijlstra Because the qspinlock needs to touch a second cacheline (the per-cpu mcs_nodes[]); add a pending bit and allow a single in-word spinner before we punt to the second cacheline. It is possible so observe the pending bit without the locked bit when the last owner has just relea

[Xen-devel] [PATCH 6/9] qspinlock: Use a simple write to grab the lock

2015-03-16 Thread Peter Zijlstra
From: Waiman Long Currently, atomic_cmpxchg() is used to get the lock. However, this is not really necessary if there is more than one task in the queue and the queue head don't need to reset the tail code. For that case, a simple write to set the lock bit is enough as the queue head will be the

[Xen-devel] [PATCH 7/9] qspinlock: Revert to test-and-set on hypervisors

2015-03-16 Thread Peter Zijlstra
From: Peter Zijlstra When we detect a hypervisor (!paravirt, see qspinlock paravirt support patches), revert to a simple test-and-set lock to avoid the horrors of queue preemption. Cc: Ingo Molnar Cc: David Vrabel Cc: Oleg Nesterov Cc: Scott J Norton Cc: Paolo Bonzini Cc: Douglas Hatch Cc:

Re: [Xen-devel] [PATCH v6] tools/xenconsoled: Increase file descriptor limit

2015-03-16 Thread Frediano Ziglio
2015-03-02 15:04 GMT+00:00 Andrew Cooper : > XenServer's VM density testing uncovered a regression when moving from > sysvinit to systemd where the file descriptor limit dropped from 4096 to > 1024. (XenServer had previously inserted a ulimit statement into its > initscripts.) > > One solution is t

[Xen-devel] [PATCH 2/9] qspinlock, x86: Enable x86-64 to use queue spinlock

2015-03-16 Thread Peter Zijlstra
From: Waiman Long This patch makes the necessary changes at the x86 architecture specific layer to enable the use of queue spinlock for x86-64. As x86-32 machines are typically not multi-socket. The benefit of queue spinlock may not be apparent. So queue spinlock is not enabled. Currently, there

[Xen-devel] [PATCH 5/9] qspinlock: Optimize for smaller NR_CPUS

2015-03-16 Thread Peter Zijlstra
From: Peter Zijlstra When we allow for a max NR_CPUS < 2^14 we can optimize the pending wait-acquire and the xchg_tail() operations. By growing the pending bit to a byte, we reduce the tail to 16bit. This means we can use xchg16 for the tail part and do away with all the repeated compxchg() oper

[Xen-devel] [PATCH 9/9] qspinlock, x86, kvm: Implement KVM support for paravirt qspinlock

2015-03-16 Thread Peter Zijlstra
Implement the paravirt qspinlock for x86-kvm. We use the regular paravirt call patching to switch between: native_queue_spin_lock_slowpath() __pv_queue_spin_lock_slowpath() native_queue_spin_unlock()__pv_queue_spin_unlock() We use a callee saved call for the unlock function w

[Xen-devel] [PATCH 0/9] qspinlock stuff -v15

2015-03-16 Thread Peter Zijlstra
Hi Waiman, As promised; here is the paravirt stuff I did during the trip to BOS last week. All the !paravirt patches are more or less the same as before (the only real change is the copyright lines in the first patch). The paravirt stuff is 'simple' and KVM only -- the Xen code was a little more

Re: [Xen-devel] [PATCH 1/6] x86: detect and initialize Intel CAT feature

2015-03-16 Thread Jan Beulich
>>> On 13.03.15 at 11:13, wrote: > @@ -1112,6 +1117,12 @@ The following resources are available: >total/local memory bandwidth. Follow the same options with Cache Monitoring >Technology. > > +* Cache Alllocation Technology (Broadwell and later). Information regarding > + the cache allo

Re: [Xen-devel] [RFC PATCH 03/19] xen/arm: its: Port ITS driver to xen

2015-03-16 Thread Vijay Kilari
Hi Julien, On Fri, Mar 13, 2015 at 5:16 PM, Julien Grall wrote: > Hello Vijay, > > On 02/03/2015 12:30, vijay.kil...@gmail.com wrote: >> >> @@ -228,10 +242,10 @@ static struct its_collection >> *its_build_mapd_cmd(struct its_cmd_block *cmd, >>st

Re: [Xen-devel] [PATCH 0/9] qspinlock stuff -v15

2015-03-16 Thread David Vrabel
On 16/03/15 13:16, Peter Zijlstra wrote: > Hi Waiman, > > As promised; here is the paravirt stuff I did during the trip to BOS last > week. > > All the !paravirt patches are more or less the same as before (the only real > change is the copyright lines in the first patch). > > The paravirt stuf

Re: [Xen-devel] [PATCH RFC 03/14] libxc: Fix xc_domain_get_tsc_info returning -Exx instead of -1.

2015-03-16 Thread Konrad Rzeszutek Wilk
On Sat, Mar 14, 2015 at 07:55:39AM +, Ian Campbell wrote: > On Fri, 2015-03-13 at 15:40 -0400, Konrad Rzeszutek Wilk wrote: > > On Fri, Mar 13, 2015 at 03:31:12PM -0400, Konrad Rzeszutek Wilk wrote: > > > Instead put the -Exx in errno. > > > > > > Signed-off-by: Konrad Rzeszutek Wilk > > > --

Re: [Xen-devel] PVH DomU panics on boot on Xen 4.5.0 whereas it was fine on 4.4.1

2015-03-16 Thread Konrad Rzeszutek Wilk
On Sun, Mar 15, 2015 at 09:34:16PM +, Ian Murray wrote: > Hi, > > I have a domU guest that booted fine under Xen 4.4.1 with pvh=1 but now fails > to boot with it under Xen 4.5.0. Removing pvh=1, i.e. booting it as > traditional PV results in it booting fine. > > The only odd thing is that I

Re: [Xen-devel] [RFC PATCH 03/19] xen/arm: its: Port ITS driver to xen

2015-03-16 Thread Julien Grall
On 16/03/15 14:06, Vijay Kilari wrote: >>> @@ -343,17 +357,23 @@ static int its_queue_full(struct its_node *its) >>> static struct its_cmd_block *its_allocate_entry(struct its_node *its) >>> { >>> struct its_cmd_block *cmd; >>> -u32 count = 100;/* 1s! */ >>> +bool_t timeou

Re: [Xen-devel] [PATCH RFC 03/14] libxc: Fix xc_domain_get_tsc_info returning -Exx instead of -1.

2015-03-16 Thread Ian Campbell
On Mon, 2015-03-16 at 10:11 -0400, Konrad Rzeszutek Wilk wrote: > static void hypercall_buffer_cache_lock(xc_interface *xch) > { > +int saved_errno; > if ( xch->flags & XC_OPENFLAG_NON_REENTRANT ) > return; > +saved_errno = errno; You can do the init on declaration. > diff

Re: [Xen-devel] [PATCH RFC 03/14] libxc: Fix xc_domain_get_tsc_info returning -Exx instead of -1.

2015-03-16 Thread Konrad Rzeszutek Wilk
On Mon, Mar 16, 2015 at 02:23:22PM +, Ian Campbell wrote: > On Mon, 2015-03-16 at 10:11 -0400, Konrad Rzeszutek Wilk wrote: > > static void hypercall_buffer_cache_lock(xc_interface *xch) > > { > > +int saved_errno; > > if ( xch->flags & XC_OPENFLAG_NON_REENTRANT ) > > return

Re: [Xen-devel] [PATCH RFC v1 1/2] xen/hw/passthrough: Use errno instead of ret for xc_physdev_map_* calls

2015-03-16 Thread Konrad Rzeszutek Wilk
On Mon, Mar 16, 2015 at 10:13:50AM +, Stefano Stabellini wrote: > On Fri, 13 Mar 2015, Konrad Rzeszutek Wilk wrote: > > As the libxc library follows (mostly) the return negative > > for failure and stashes the error value in errno. > > > > Signed-off-by: Konrad Rzeszutek Wilk > > Acked-by: S

Re: [Xen-devel] [patch] xen/mce: fix up xen_late_init_mcelog() error handling

2015-03-16 Thread David Vrabel
On 05/03/15 11:24, Dan Carpenter wrote: > Static checkers complain about the missing call to misc_deregister() if > bind_virq_for_mce() fails. > > Also I reversed the tests so that we do error handling instead of > success handling. That way we just have a series of function calls > instead of th

Re: [Xen-devel] [PATCH v4] xen-scsiback: define a pr_fmt macro with xen-pvscsi

2015-03-16 Thread David Vrabel
On 10/03/15 20:49, Tao Chen wrote: > Add the {xen-pvscsi: } prefix in pr_fmt and remove DPRINTK, then > replace all DPRINTK with pr_debug. > > Also fixed up some comments just as eliminate redundant whitespace > and format the code. > > These will make the code easier to read. Applied to devel/f

Re: [Xen-devel] [PATCH V2 2/3] xen: scsiback: add LUN of restored domain

2015-03-16 Thread David Vrabel
On 17/02/15 07:02, Juergen Gross wrote: > When a xen domain is being restored the LUN state of a pvscsi device > is "Connected" and not "Initialising" as in case of attaching a new > pvscsi LUN. > > This must be taken into account when adding a new pvscsi device for > a domain as otherwise the pvs

Re: [Xen-devel] [PATCH V2 3/3] xen: support suspend/resume in pvscsi frontend

2015-03-16 Thread David Vrabel
On 17/02/15 07:02, Juergen Gross wrote: > Up to now the pvscsi frontend hasn't supported domain suspend and > resume. When a domain with an assigned pvscsi device was suspended > and resumed again, it was not able to use the device any more: trying > to do so resulted in hanging processes. > > Sup

Re: [Xen-devel] [PATCH 2/2] xen-pciback: also support disabling of bus-mastering and memory-write-invalidate

2015-03-16 Thread David Vrabel
On 11/03/15 13:52, Jan Beulich wrote: > It's not clear to me why only the enabling operation got handled so > far. Applied to devel/for-linus-4.1, thanks. David ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] OpenStack - Libvirt+Xen CI overview : anyone interested in a walk/through or presentation on how it works

2015-03-16 Thread Lars Kurth
Bob, adding the Test WG. As so far no-one has responded to your offer to organise an on-line meeting to walk interested parties the CI loop. If you are, please reply to this thread. If no-one comes back, I am wondering whether it may not be better to put some wiki pages together explaining ho

Re: [Xen-devel] [PATCH RFC 03/14] libxc: Fix xc_domain_get_tsc_info returning -Exx instead of -1.

2015-03-16 Thread Ian Campbell
On Mon, 2015-03-16 at 10:38 -0400, Konrad Rzeszutek Wilk wrote: > Do you want me to post it now (v1) or are you right now looking at the > patchset and would want to finish that? I'm battling yakks right now not reading the series, so you may as well send it! > > > > > > +errno = saved_errn

[Xen-devel] [PATCH 11/14] libxl: If xc_domain_add_to_physmap fails, include errno value

2015-03-16 Thread Konrad Rzeszutek Wilk
Instead of just the return value. Signed-off-by: Konrad Rzeszutek Wilk --- tools/libxc/xc_dom_x86.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c index bf06fe4..20e379c 100644 --- a/tools/libxc/xc_dom_x86.c +++ b/to

[Xen-devel] [PATCH 04/14] libxc: Fix xc_domain_get_tsc_info to return -1 instead of -Exx.

2015-03-16 Thread Konrad Rzeszutek Wilk
We don't need to put fill errno because xc_hypercall_buffer_alloc fills the errno with the appropiate errno values and we just need to pass them up the stack. Signed-off-by: Konrad Rzeszutek Wilk --- tools/libxc/xc_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool

[Xen-devel] [PATCH 09/14] libxl: Check xc_domain_maximum_gpfn for negative return values

2015-03-16 Thread Konrad Rzeszutek Wilk
Instead of assuming everything is always OK. Signed-off-by: Konrad Rzeszutek Wilk --- tools/libxc/xc_core_arm.c| 14 +++--- tools/libxc/xc_core_x86.c| 21 + tools/libxc/xc_domain_save.c | 8 +++- 3 files changed, 35 insertions(+), 8 deletions(-) diff --g

[Xen-devel] [PATCH 13/14] libxl: Don't assign return value to errno for E820 get/set xc_ calls.

2015-03-16 Thread Konrad Rzeszutek Wilk
We should be using the errno that the hypercall left instead of overwritting it with the return value. Signed-off-by: Konrad Rzeszutek Wilk --- tools/libxl/libxl_x86.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c i

  1   2   >