[Xen-devel] [PATCH v2] libxl/libxl_qmp.c: fix qmp_open

2015-03-18 Thread PRAMOD DEVENDRA
From: Pramod Devendra Signed-off-by: Pramod Devendra CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu --- Changed since v1: 1. Make sure sun_path does not overflow. 2. Close qmp_fd on error. --- tools/libxl/libxl_qmp.c | 26 -- 1 file changed, 20

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

2015-03-18 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 |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index cb006df..2678be2 100644 --- a/t

[Xen-devel] Network blocked after sending several packets larger than 128 bytes when using Driver Domain

2015-03-18 Thread openlui
Hi, all: I am trying to use a HVM with PCI pass-through NIC as network driver domain. However, when I send packets whose size are larger than 128 bytes from DomU using pkt-gen tools, after several seconds, the network between driver domain and destination host will be blocked. The networking

Re: [Xen-devel] (v2) VT-d Posted-interrupt (PI) design for XEN

2015-03-18 Thread Wu, Feng
Thanks for the comments! > -Original Message- > From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] > Sent: Thursday, March 19, 2015 12:10 AM > To: Wu, Feng > Cc: xen-devel@lists.xen.org; Zhang, Yang Z; Tian, Kevin; Keir Fraser > (k...@xen.org); Jan Beulich (jbeul...@suse.com) > Su

[Xen-devel] for test - please ignore

2015-03-18 Thread Wu, Feng
For test, please ignore. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

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

2015-03-18 Thread Waiman Long
On 03/16/2015 09:16 AM, Peter Zijlstra wrote: 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 u

Re: [Xen-devel] (v2) VT-d Posted-interrupt (PI) design for XEN

2015-03-18 Thread Zhang, Yang Z
Konrad Rzeszutek Wilk wrote on 2015-03-19: > On Wed, Mar 18, 2015 at 12:44:21PM +, Wu, Feng wrote: >> VT-d Posted-interrupt (PI) design for XEN >> >> Background >> == >> With the development of virtualization, there are more and more >> device assignment requirements. However, today wh

[Xen-devel] [qemu-upstream-4.3-testing test] 36518: tolerable FAIL - PUSHED

2015-03-18 Thread xen . org
flight 36518 qemu-upstream-4.3-testing real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/36518/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-libvirt 9 guest-start fail never pass test-amd64-amd64-xl-qemuu

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

2015-03-18 Thread Chen, Tiejun
This duplicates the code from above. I think this would be best done as: static int libxl__detect_gfx_passthru_kind(libxl__gc *gc, guest_config) { if (b_info->u.hvm.gfx_passthru_kind != LIBXL_GFX_PASSTHRU_KIND_DEFAULT) return 0; if (libxl__is_igd_vga_passthru(gc, guest_config)

Re: [Xen-devel] [PATCH v4 4/5] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen.

2015-03-18 Thread Xu, Quan
> -Original Message- > From: Stefan Berger [mailto:stef...@linux.vnet.ibm.com] > Sent: Thursday, March 19, 2015 3:17 AM > To: Xu, Quan; stefano.stabell...@eu.citrix.com; qemu-de...@nongnu.org; > arm...@redhat.com; lcapitul...@redhat.com; aligu...@amazon.com; > pbonz...@redhat.com; ebl...@

[Xen-devel] Deadlock in /proc/xen/xenbus watch+read on 3.17+ (maybe earlier)

2015-03-18 Thread Marek Marczykowski-Górecki
Hi, I've hit some deadlock in kernel xenstore client exposed via /proc/xen/xenbus. Steps to reproduce are simple: int main() { struct xs_handle *xs; xs = xs_open(0); xs_watch(xs, "domid", "token"); xs_read(xs, 0, "name", NULL); return 0; } xs_watch internal

Re: [Xen-devel] [PATCH] libxlu: avoid having two definitions of XLU_ConfigList

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 09:33:58PM +, Wei Liu wrote: > There is already a typedef in libxlutil.h. Remove the one in > libxlu_internal.h. > > Signed-off-by: Wei Liu Missing the 'Reported-by: Konrad Rzeszutek Wilk ' > --- > tools/libxl/libxlu_internal.h | 4 ++-- > 1 file changed, 2 insertion

[Xen-devel] [PATCH v2 10/13] libxc: If xc_domain_add_to_physmap fails, include errno value

2015-03-18 Thread Konrad Rzeszutek Wilk
Instead of just the return value. Signed-off-by: Konrad Rzeszutek Wilk Acked-by Ian Campbell --- 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 af0c9f4..3301f53 100644 --- a/tools/libx

[Xen-devel] [PATCH v2 01/13] libxc: Replaces tabs with spaces in xc_cpupool_freeinfo

2015-03-18 Thread Konrad Rzeszutek Wilk
The goto looks very wrong when the rest of the code has spaces. Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Ian Campbell --- tools/libxc/xc_cpupool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxc/xc_cpupool.c b/tools/libxc/xc_cpupool.c index 6393cfb..828

[Xen-devel] [PATCH v2 06/13] libxc: Fix xc_pm API calls to return negative error and stash error in errno.

2015-03-18 Thread Konrad Rzeszutek Wilk
Oddly enough the user of this API did the right thing - check for return being negative and used 'errno' for the real error. Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Ian Campbell --- tools/libxc/xc_pm.c | 54 +++-- 1 file changed, 36 inserti

[Xen-devel] [PATCH v2 03/13] libxc: Fix xc_domain_get_tsc_info to return -1 instead of -Exx.

2015-03-18 Thread Konrad Rzeszutek Wilk
We don't need to put fill errno because xc_hypercall_buffer_alloc fills the errno with the appropriate errno values and we just need to pass them up the stack. Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Ian Campbell --- tools/libxc/xc_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[Xen-devel] [PATCH v2 08/13] libxc: Check xc_domain_maximum_gpfn for negative return values

2015-03-18 Thread Konrad Rzeszutek Wilk
Instead of assuming everything is always OK. We stash the gpfns value as an parameter. Signed-off-by: Konrad Rzeszutek Wilk --- tools/libxc/xc_core_arm.c| 17 ++--- tools/libxc/xc_core_x86.c| 24 tools/libxc/xc_domain_save.c | 8 +++- 3 files cha

[Xen-devel] [PATCH v2] Fix libxc return -E misusage.

2015-03-18 Thread Konrad Rzeszutek Wilk
Hey Please see the following patches which fix an subset of some of the various usages of return -Exx instead of using -1 (and stashing in errno the error value). We also clean up some cases where the errno is over-writen - we want to bubble up the errnor that the underlaying hypercall had done.

[Xen-devel] [PATCH v2 02/13] libxc: Propagate errno from hypercall instead of anything else.

2015-03-18 Thread Konrad Rzeszutek Wilk
After we have done the hypercall - the errno has the failure code. However our usage of pthread and munmap can trigger them to manipulate the errno with their failure values. That would be bad as what we care about is just the hypercall error value. Another solution to this would be to save the 'e

[Xen-devel] [PATCH v2 07/13] libxc: Fix xc_tmem_control to return proper error.

2015-03-18 Thread Konrad Rzeszutek Wilk
The API returns now negative values on error and stashes the error in errno. Fix the user of this API. The 'xc_hypercall_bounce_pre' can fail - and if so it will stash its errno values - no need to over-write it. Signed-off-by: Konrad Rzeszutek Wilk --- tools/libxc/xc_tmem.c |

[Xen-devel] [PATCH v2 13/13] libxc: Fix do_memory_op to return negative value on errors

2015-03-18 Thread Konrad Rzeszutek Wilk
instead of the -Exx values (which should go in errno). This patch has HUGE implications. There is a lot of APIs that are using do_memory_op. Fortunately most of them check for 'if (do_memory_op(..) < 0)' so will function properly. However there were some which printed the return value to the user.

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

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

[Xen-devel] [PATCH v2 05/13] libxc: Return negative value and propagate errno for xc_offline_page API

2015-03-18 Thread Konrad Rzeszutek Wilk
Instead of returning -Exx we now return -1 for error. We could stash the -Exx values in errno values but why - the underlaying functions we call all stash the proper errno value. Hence we just propagate it up wherver it is needed. Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Ian Campbell ---

[Xen-devel] [PATCH v2 11/13] libxc: Check xc_sharing_* for proper return values.

2015-03-18 Thread Konrad Rzeszutek Wilk
If there is a negative return value - check for that and also use errno for the proper error value. Signed-off-by: Konrad Rzeszutek Wilk --- tools/libxl/libxl.c | 4 ++-- tools/tests/mem-sharing/memshrtool.c | 12 ++-- 2 files changed, 12 insertions(+), 4 deletions(-)

[Xen-devel] [PATCH v2 09/13] libxc: Check xc_maximum_ram_page for negative return values.

2015-03-18 Thread Konrad Rzeszutek Wilk
Instead of assuming everything is always OK. As such we return now the return value (or zero for success). The max_mfn is now passed in as the parameter. Signed-off-by: Konrad Rzeszutek Wilk --- tools/libxc/include/xenctrl.h | 2 +- tools/libxc/xc_offline_page.c | 6 +++--- tools/libxc/xc_priv

[Xen-devel] [PATCH v2 04/13] libxc: xc_physdev_map return -1 and populate errno.

2015-03-18 Thread Konrad Rzeszutek Wilk
The users of these (qemu) check for a negative value so we are safe in regards to that. However they also use the return value to inform the user of the error. Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Ian Campbell --- tools/libxc/xc_physdev.c | 12 1 file changed, 8 insertion

Re: [Xen-devel] Upstream QEMU based stubdom and rump kernel

2015-03-18 Thread Samuel Thibault
Hello, Wei Liu, le Tue 17 Mar 2015 14:29:07 +, a écrit : > One of my lessons learned from the existing stubdom stuffs is that I > should work with upstream and produce maintainable code. Not only maintainable, but really make sure to have the time to stick with upstream on the long run, first

[Xen-devel] [xen-4.4-testing test] 36516: tolerable FAIL - PUSHED

2015-03-18 Thread xen . org
flight 36516 xen-4.4-testing real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/36516/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-amd64-i386-pair17 guest-migrate/src_host/dst_host fail like 35919 Tests which did not succee

[Xen-devel] [xen-4.5-testing test] 36511: tolerable FAIL - PUSHED

2015-03-18 Thread xen . org
flight 36511 xen-4.5-testing real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/36511/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-pvh-intel 9 guest-start fail never pass test-amd64-amd64-rumpuserxen-amd64

[Xen-devel] [qemu-upstream-4.5-testing test] 36517: tolerable FAIL - PUSHED

2015-03-18 Thread xen . org
flight 36517 qemu-upstream-4.5-testing real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/36517/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-pvh-intel 9 guest-start fail never pass test-armhf-armhf-libvirt

Re: [Xen-devel] Upstream QEMU based stubdom and rump kernel

2015-03-18 Thread Antti Kantee
On 18/03/15 21:21, Anil Madhavapeddy wrote: This is not an argument for or against; if you want to expose AF_WHATEVER to applications running on a rump kernel, you need to sell AF_WHATEVER to NetBSD, not to rumpkernel-users. Well, preferably you need to sell it to everyone implementing socket

[Xen-devel] [PATCH] libxlu: avoid having two definitions of XLU_ConfigList

2015-03-18 Thread Wei Liu
There is already a typedef in libxlutil.h. Remove the one in libxlu_internal.h. Signed-off-by: Wei Liu --- tools/libxl/libxlu_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxlu_internal.h b/tools/libxl/libxlu_internal.h index 3451cfe..0acdde3 10

Re: [Xen-devel] Regression introduced by libxlu: rework internal representation of setting

2015-03-18 Thread Wei Liu
On Wed, Mar 18, 2015 at 04:18:32PM -0400, Konrad Rzeszutek Wilk wrote: > Hey > > The git commit 1a09c5113a38dcf1fb6582d77285d727defeea6c > "libxlu: rework internal representation of setting" breaks build: > > ~/xtt-x86_64/xen/tools/libxl> make > rm -f _paths.h.tmp; echo "#define SBINDIR \"/usr/s

Re: [Xen-devel] Upstream QEMU based stubdom and rump kernel

2015-03-18 Thread Anil Madhavapeddy
On 18 Mar 2015, at 20:23, Antti Kantee wrote: > > On 18/03/15 19:05, Anil Madhavapeddy wrote: >>> This fits in with a couple of things I hope to make time to work on in the >>> next couple of months: >>> >>> 1. Introspection of Rump Kernel domUs for ops purposes, i.e. get some >>>basic "ps",

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

2015-03-18 Thread Waiman Long
On 03/16/2015 09:16 AM, Peter Zijlstra wrote: 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 w

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

2015-03-18 Thread Waiman Long
On 03/16/2015 09:16 AM, 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 stuff is 'simple

Re: [Xen-devel] Upstream QEMU based stubdom and rump kernel

2015-03-18 Thread Antti Kantee
On 18/03/15 19:05, Anil Madhavapeddy wrote: This fits in with a couple of things I hope to make time to work on in the next couple of months: 1. Introspection of Rump Kernel domUs for ops purposes, i.e. get some basic "ps", "top", "vmstat"-like information about what the domU is doing fr

[Xen-devel] Regression introduced by libxlu: rework internal representation of setting

2015-03-18 Thread Konrad Rzeszutek Wilk
Hey The git commit 1a09c5113a38dcf1fb6582d77285d727defeea6c "libxlu: rework internal representation of setting" breaks build: ~/xtt-x86_64/xen/tools/libxl> make rm -f _paths.h.tmp; echo "#define SBINDIR \"/usr/sbin\"" >>_paths.h.tmp; echo "#define BINDIR \"/usr/bin\"" >>_paths.h.tmp; echo "#d

Re: [Xen-devel] [PATCH v4 4/5] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen.

2015-03-18 Thread Stefan Berger
On 03/10/2015 08:14 AM, Quan Xu wrote: This Patch provides the glue for the TPM_TIS(Qemu frontend) to Xen stubdom vTPM domain that provides the actual TPM functionality. It sends data and TPM commends with xen_vtpm_frontend. It is similar as another two vTPM backens: *vTPM passthrough backen S

Re: [Xen-devel] Upstream QEMU based stubdom and rump kernel

2015-03-18 Thread Martin Lucina
a...@recoil.org said: > > Point 2. will further require implementing support in the Rump Kernel, > > either for a shim which would proxy AF_UNIX / AF_INET transparently using > > vchan, or possibly later implementing a separate socket family (AF_VCHAN / > > AF_HYPER?). Once that is done you should

Re: [Xen-devel] Upstream QEMU based stubdom and rump kernel

2015-03-18 Thread Anil Madhavapeddy
On 18 Mar 2015, at 11:20, Martin Lucina wrote: >> >> A bit background information. A stubdom is a service domain. With QEMU >> stubdom we are able to run QEMU device emulation code in a separate >> domain so that bugs in QEMU don't affect Dom0 (the controlling domain). >> Xen currently has a QEM

[Xen-devel] Implementing working set tracker in xen

2015-03-18 Thread HANNAS YAYA Issa
Hello Today I'm working on virtual machines working set size tracking in xen hypervisor. I follow the vmware approch I read in this article: https://www.google.fr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&sqi=2&ved=0CCEQFjAA&url=https%3A%2F%2Fwww.usenix.org%2Fevents%2Fosdi02%2Ftech%2Fwaldspurger

Re: [Xen-devel] [PATCH v4 3/5] Qemu-Xen-vTPM: Register Xen stubdom vTPM frontend driver

2015-03-18 Thread Stefan Berger
On 03/10/2015 08:14 AM, Quan Xu wrote: This drvier transfers any request/repond between TPM xenstubdoms driver and Xen vTPM stubdom, and facilitates communications between Xen vTPM stubdom domain and vTPM xenstubdoms driver. It is a glue for the TPM xenstubdoms driver and Xen stubdom vTPM domain

Re: [Xen-devel] Fwd: difference between physical address, machine address, physical frame number and machine frame number

2015-03-18 Thread Razvan Cojocaru
> the source codes I read maddr, paddr, pfn and mdfn. > please can someone explain me the differences between these concepts in > xen hypervisor. I think Tim did a very good job here: http://www.slideshare.net/xen_com_mgr/xen-memory-management HTH, Razvan __

Re: [Xen-devel] [PATCH v1] Fix libxc return -E misusage.

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 04:43:07PM +, Ian Campbell wrote: > On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > > Hey, > > > > Please see the following set of patches which fix the various > > usage of return -Exx instead of return -1 for errors (and > > stashing the error value

[Xen-devel] Fwd: difference between physical address, machine address, physical frame number and machine frame number

2015-03-18 Thread HANNAS YAYA Issa
Hello guys. I start to develop in xen hypervisor no so long. I work on memory. in the source codes I read maddr, paddr, pfn and mdfn. please can someone explain me the differences between these concepts in xen hypervisor. Thank you ___ Xen-devel mai

Re: [Xen-devel] [PATCH 12/14] libxl: Check xc_sharing_* for proper return values.

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 04:36:40PM +, Ian Campbell wrote: > On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > > If there is a negative return value - check for that and > > also use errno for the proper error value. > > Was xc_sharing_freed_pages fixed earlier in the series (wh

Re: [Xen-devel] [PATCH 2/3] libxl: Domain destroy: unlock userdata earlier

2015-03-18 Thread Jim Fehlig
Ian Campbell wrote: > On Tue, 2015-03-17 at 17:34 +, Wei Liu wrote: > >> On Tue, Mar 17, 2015 at 09:30:58AM -0600, Jim Fehlig wrote: >> >>> From: Ian Jackson >>> >>> Unlock the userdata before we actually call xc_domain_destroy. This >>> leaves open the possibility that other libxl ca

Re: [Xen-devel] [PATCH 1/3] libxl: In domain death search, start search at first domid we want

2015-03-18 Thread Jim Fehlig
Ian Campbell wrote: > On Tue, 2015-03-17 at 09:30 -0600, Jim Fehlig wrote: > >> From: Ian Jackson >> >> From: Ian Jackson >> >> When domain_death_xswatch_callback needed a further call to >> xc_domain_getinfolist it would restart it with the last domain it >> found rather than the first one it

Re: [Xen-devel] [PATCH 08/14] libxl: Fix xc_tmem_control to return proper error.

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 04:26:37PM +, Ian Campbell wrote: > On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > > The API returns now negative values on error and stashes > > the error in errno. Fix the user of this API. > > > > The 'xc_hypercall_bounce_pre' can fail - and if so

[Xen-devel] Userspace PV backend hangs

2015-03-18 Thread Iurii Konovalenko
Hi, guys! We continue bringing up System based on Xen hypervisor on Renesas Lager board. We started 4 domains: Dom0 (Linux 3.14), Driver Domain (Linux 3.14), Cluster Domain (Linux 3.14), and DomU (Tizen with 3.14 kernel). Each domain has 2 VCPUs (4 physical CPUs are up). Currently, we use Xen vers

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

2015-03-18 Thread George Dunlap
On 03/18/2015 04:49 PM, Dario Faggioli wrote: >> scheduler_init() is called before smp_prepare_cpus() in part because of >> a dependency chain elsewhere: we cannot set up the idle domain until >> scheduler_init() is called; and other places further on in the >> initialization but before setting up

Re: [Xen-devel] [RFC PATCH] dpci: Put the dpci back on the list if running on another CPU.

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 04:43:40PM +, Jan Beulich wrote: > >>> On 18.03.15 at 15:06, wrote: > > On Wed, Mar 18, 2015 at 07:41:55AM +, Jan Beulich wrote: > >> >>> On 17.03.15 at 18:44, wrote: > >> > As you can see to preserve the existing functionality such as > >> > being able to schedule

Re: [Xen-devel] Upstream QEMU based stubdom and rump kernel

2015-03-18 Thread Ian Campbell
On Wed, 2015-03-18 at 12:45 +, Stefano Stabellini wrote: > On Wed, 18 Mar 2015, Ian Campbell wrote: > > On Wed, 2015-03-18 at 12:24 +0100, Martin Lucina wrote: > > > ian.campb...@citrix.com said: > > > > On Tue, 2015-03-17 at 15:27 +, Wei Liu wrote: > > > > > This looks most interesting as

Re: [Xen-devel] [PATCH 14/14] libxl: Fix do_memory_op to return negative value on errors

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > instead of the -Exx values (which should go in errno). > > This patch has HUGE implications. For such a small patch! > There is a lot of APIs > that are using do_memory_op. Fortunatly most of them "Fortunately". > check for 'if

Re: [Xen-devel] [PATCH 12/14] libxl: Check xc_sharing_* for proper return values.

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > If there is a negative return value - check for that and > also use errno for the proper error value. Was xc_sharing_freed_pages fixed earlier in the series (which is strictly speaking a bisection hazard, but nevermind) or was the e

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

2015-03-18 Thread Dario Faggioli
On Wed, 2015-03-18 at 15:26 +, George Dunlap wrote: > On 03/18/2015 08:53 AM, Dario Faggioli wrote: > >>> @@ -1986,9 +1982,13 @@ static void init_pcpu(const struct scheduler *ops, > >>> int cpu) > >>> static void * > >>> csched2_alloc_pdata(const struct scheduler *ops, int cpu) > >>> { > >>

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

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: $subject says libxl but means libxc. Actually, now I notice it so do almost all of the patches! Once fixed any acks I gave (or will give shortly) can still be applied. > Instead of just the return value. > > Signed-off-by: Konrad R

Re: [Xen-devel] [PATCH 10/14] libxl: Check xc_maximum_ram_page for negative return values.

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > Instead of assuming everything is always OK. > > Signed-off-by: Konrad Rzeszutek Wilk > --- > tools/libxc/xg_save_restore.h | 3 +++ > tools/misc/xen-mfndump.c | 2 +- > 2 files changed, 4 insertions(+), 1 deletion(-) > > di

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

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > 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_sav

Re: [Xen-devel] [RFC PATCH] dpci: Put the dpci back on the list if running on another CPU.

2015-03-18 Thread Jan Beulich
>>> On 18.03.15 at 15:06, wrote: > On Wed, Mar 18, 2015 at 07:41:55AM +, Jan Beulich wrote: >> >>> On 17.03.15 at 18:44, wrote: >> > As you can see to preserve the existing functionality such as >> > being able to schedule N amount of interrupt injections >> > for the N interrupts we might ge

Re: [Xen-devel] [RFC PATCH] xen-netback: making the bandwidth limiter runtime settable

2015-03-18 Thread Wei Liu
On Wed, Mar 18, 2015 at 05:21:08PM +0100, Imre Palik wrote: > On 03/17/15 12:17, Wei Liu wrote: > > On Fri, Mar 13, 2015 at 01:51:05PM +0100, Imre Palik wrote: > >> From: "Palik, Imre" > >> > >> With the current netback, the bandwidth limiter's parameters are only > >> settable during vif setup ti

Re: [Xen-devel] [PATCH v1] Fix libxc return -E misusage.

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > Hey, > > Please see the following set of patches which fix the various > usage of return -Exx instead of return -1 for errors (and > stashing the error value in errno). All of them, or just a subset of the callpaths? If it's all o

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

2015-03-18 Thread George Dunlap
On Tue, Mar 17, 2015 at 11:45 PM, Andrew Warkentin wrote: > On 3/17/15, George Dunlap wrote: >> Any deduplication code would run in as a process probably in domain 0, >> and may be somewhat slow; but the actual mechanism of sharing is a >> generic mechanism in the hypervisor which any client can

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

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > We should be using the errno that the hypercall left > instead of overwritting it with the return value. "overwriting" > Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Ian Campbell __

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

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > 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. "appropriate" > Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Ian

Re: [Xen-devel] [PATCH 03/14] libxc: xc_core_arch_memory_map_get populate errno

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > with proper value (ENOMEM) when reporting failures. > > Signed-off-by: Konrad Rzeszutek Wilk > --- > [v1: errno before using PERROR] > --- > tools/libxc/xc_core_arm.c | 1 + > tools/libxc/xc_core_x86.c | 1 + > 2 files changed, 2

Re: [Xen-devel] [PATCH 02/14] libxl: Propagate errno from hypercall instead of anything else.

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > After we have done the hypercall - the errno has the failure > code. However our usage of pthread and munmap can trigger them > to manipulate the errno with their failure values. That would > be bad as what we care about is just the

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

2015-03-18 Thread Dario Faggioli
On Wed, 2015-03-18 at 16:08 +, George Dunlap wrote: > On 03/18/2015 03:59 PM, Jan Beulich wrote: > On 18.03.15 at 16:26, wrote: > >> In both cases there's a slight risk in using system_state to determine > >> whether to rely on cpu_data[] or not, because there's actually a window > >> for

Re: [Xen-devel] [PATCH 05/14] libxl: xc_physdev_map return -1 and populate errno.

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 04:21:52PM +, Ian Campbell wrote: > On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > > The users of these (qemu) check for a negative value > > so we are safe in regards to that. However they > > also use the return value to inform the user of the > > er

Re: [Xen-devel] [PATCH 08/14] libxl: Fix xc_tmem_control to return proper error.

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > The API returns now negative values on error and stashes > the error in errno. Fix the user of this API. > > The 'xc_hypercall_bounce_pre' can fail - and if so it will > stash its errno values - no need to over-write it. > > Signed

Re: [Xen-devel] [PATCH v2] xentop: add support for qdisks

2015-03-18 Thread Ian Campbell
On Wed, 2015-03-11 at 11:51 -0600, Charles Arnold wrote: > Now that Xen uses qdisks by default and qemu does not write out > statistics to sysfs this patch queries the QMP for disk statistics. > > This patch depends on libyajl for parsing statistics returned from > QMP. The runtime requires libyaj

Re: [Xen-devel] [PATCH 07/14] libxl: Fix xc_pm API calls to return negative error and stash error in errno.

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > Oddly enough the user of this API did the right thing - > check for return being negative and used 'errno' for the > real error. > > Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Ian Campbell _

Re: [Xen-devel] [PATCH 06/14] libxl: Return negative value and propagate errno for xc_offline_page API

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > Instead of returning -Exx we now return -1 for error. > We could stash the -Exx values in errno values but why - the > underlaying functions we call all stash the proper errno > value. Hence we just propagate it up wherver it is need

Re: [Xen-devel] [PATCH 05/14] libxl: xc_physdev_map return -1 and populate errno.

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > The users of these (qemu) check for a negative value > so we are safe in regards to that. However they > also use the return value to inform the user of the > error. IIRC I saw a qemu patch go past to fix the callers? > Signed-off-

Re: [Xen-devel] [RFC PATCH] xen-netback: making the bandwidth limiter runtime settable

2015-03-18 Thread Imre Palik
On 03/17/15 12:17, Wei Liu wrote: > On Fri, Mar 13, 2015 at 01:51:05PM +0100, Imre Palik wrote: >> From: "Palik, Imre" >> >> With the current netback, the bandwidth limiter's parameters are only >> settable during vif setup time. This patch register a watch on them, and >> thus makes them runtime

Re: [Xen-devel] [PATCH 01/14] libxc: Replaces tabs with spaces in xc_cpupool_freeinfo

2015-03-18 Thread Ian Campbell
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote: > The goto looks very wrong when the rest of the code > has spaces. > > Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Ian Campbell ___ Xen-devel mailing list Xen-devel@lists.xen.org

Re: [Xen-devel] [PATCH] dpci: Put the dpci back on the list if scheduled from another CPU.

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 04:06:37PM +, Jan Beulich wrote: > >>> On 18.03.15 at 14:58, wrote: > > On Wed, Mar 18, 2015 at 07:38:12AM +, Jan Beulich wrote: > >> >>> On 17.03.15 at 18:15, wrote: > >> > The latest one (please see attached) would cause an dead-lock iff > >> > on the CPU we are

Re: [Xen-devel] (v2) VT-d Posted-interrupt (PI) design for XEN

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 12:44:21PM +, Wu, Feng wrote: > VT-d Posted-interrupt (PI) design for XEN > > Background > == > With the development of virtualization, there are more and more device > assignment requirements. However, today when a VM is running with > assigned devices (such as

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

2015-03-18 Thread George Dunlap
On 03/18/2015 03:59 PM, Jan Beulich wrote: On 18.03.15 at 16:26, wrote: >> In both cases there's a slight risk in using system_state to determine >> whether to rely on cpu_data[] or not, because there's actually a window >> for each processor after system_state == SYS_STATE_smp_boot where >>

Re: [Xen-devel] [PATCH] dpci: Put the dpci back on the list if scheduled from another CPU.

2015-03-18 Thread Jan Beulich
>>> On 18.03.15 at 14:58, wrote: > On Wed, Mar 18, 2015 at 07:38:12AM +, Jan Beulich wrote: >> >>> On 17.03.15 at 18:15, wrote: >> > The latest one (please see attached) would cause an dead-lock iff >> > on the CPU we are running the softirq and an do_IRQ comes for the >> > exact dpci we are

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

2015-03-18 Thread Jan Beulich
>>> On 18.03.15 at 16:26, wrote: > In both cases there's a slight risk in using system_state to determine > whether to rely on cpu_data[] or not, because there's actually a window > for each processor after system_state == SYS_STATE_smp_boot where > cpu_data[] is *not* initialized, but it's not ob

Re: [Xen-devel] [PATCH v2 0/7] Some (not only) cpupool related fixes and improvements

2015-03-18 Thread Ian Campbell
On Fri, 2015-03-13 at 12:08 +0100, Dario Faggioli wrote: > Dario Faggioli (7): > xl: turn some int local variable into bool > xl: add -c/--cpupool option to `xl list' > libxl: introduce libxl_cpupool_cpu{add,remove}_cpumap() > xl: enable using ranges of pCPUs when manipulati

[Xen-devel] [PATCH V4] Add flag to start info regarding virtual mapped p2m list

2015-03-18 Thread Juergen Gross
Xen pv domains are using a domain private p2m list to convert guest pfns to mfns. This p2m list has to be updated by the Xen tools during domain restore and migration, as the mfns will most likely change. In order to locate the p2m list the Xen tools need an interface provided by the guest. Up to n

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

2015-03-18 Thread George Dunlap
On 03/18/2015 08:53 AM, Dario Faggioli wrote: >>> @@ -1986,9 +1982,13 @@ static void init_pcpu(const struct scheduler *ops, >>> int cpu) >>> static void * >>> csched2_alloc_pdata(const struct scheduler *ops, int cpu) >>> { >>> -/* Check to see if the cpu is online yet */ >>> -/* Note: c

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

2015-03-18 Thread Daniel Kiper
On Wed, Mar 18, 2015 at 01:59:58PM +, David Vrabel wrote: > On 18/03/15 13:57, Juergen Gross wrote: > > On 03/18/2015 11:36 AM, David Vrabel wrote: > >> On 16/03/15 10:31, Juergen Gross wrote: > >>> On 03/16/2015 11:03 AM, Daniel Kiper wrote: > On Mon, Mar 16, 2015 at 06:35:04AM +0100, Jue

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

2015-03-18 Thread Wei Liu
On Wed, Mar 18, 2015 at 01:12:50PM +, Lars Kurth wrote: > Hi, > > I added all the people who raised their hands so far to the TO list. As far > as I can tell we have people from the following timezones: GMT, GMT+1, MTZ, > ETZ - if I got this wrong, please let me know your timezone. Depending

Re: [Xen-devel] [PATCH v2 2/5] libxl: vcpuset: Return error values.

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 02:09:09PM +, Dario Faggioli wrote: > On Wed, 2015-03-18 at 13:08 +, Ian Campbell wrote: > > On Wed, 2015-03-18 at 13:06 +, Ian Campbell wrote: > > > On Fri, 2015-03-13 at 16:26 -0400, Konrad Rzeszutek Wilk wrote: > > > > The function does not return any values a

Re: [Xen-devel] [PATCH v3 22/24] tools/libxl: arm: Use an higher value for the GIC phandle

2015-03-18 Thread Julien Grall
Hi Ian, On 24/02/2015 10:08, Ian Campbell wrote: On Mon, 2015-02-23 at 22:02 +, Julien Grall wrote: On 23/02/2015 14:36, Ian Campbell wrote: On Thu, 2015-01-29 at 13:48 +, Julien Grall wrote: On 29/01/15 12:28, Stefano Stabellini wrote: On Thu, 29 Jan 2015, Julien Grall wrote: On 2

Re: [Xen-devel] [PATCH v2 2/5] libxl: vcpuset: Return error values.

2015-03-18 Thread Dario Faggioli
On Wed, 2015-03-18 at 13:08 +, Ian Campbell wrote: > On Wed, 2015-03-18 at 13:06 +, Ian Campbell wrote: > > On Fri, 2015-03-13 at 16:26 -0400, Konrad Rzeszutek Wilk wrote: > > > The function does not return any values at all. Convert the > > > internal libxl ones (ERROR_FAIL, ..., etc) to p

Re: [Xen-devel] [RFC PATCH] dpci: Put the dpci back on the list if running on another CPU.

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 07:41:55AM +, Jan Beulich wrote: > >>> On 17.03.15 at 18:44, wrote: > > As you can see to preserve the existing functionality such as > > being able to schedule N amount of interrupt injections > > for the N interrupts we might get - I modified '->masked' > > to be an a

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

2015-03-18 Thread David Vrabel
On 18/03/15 13:57, Juergen Gross wrote: > On 03/18/2015 11:36 AM, David Vrabel wrote: >> On 16/03/15 10:31, Juergen Gross wrote: >>> 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: >

Re: [Xen-devel] [PATCH] dpci: Put the dpci back on the list if scheduled from another CPU.

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 07:38:12AM +, Jan Beulich wrote: > >>> On 17.03.15 at 18:15, wrote: > > On Tue, Mar 17, 2015 at 04:06:14PM +, Jan Beulich wrote: > >> >>> On 17.03.15 at 16:38, wrote: > >> > --- a/xen/drivers/passthrough/io.c > >> > +++ b/xen/drivers/passthrough/io.c > >> > @@ -804

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

2015-03-18 Thread Juergen Gross
On 03/18/2015 11:36 AM, David Vrabel wrote: On 16/03/15 10:31, Juergen Gross wrote: 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/1

Re: [Xen-devel] [PATCH v2 2/5] libxl: vcpuset: Return error values.

2015-03-18 Thread Konrad Rzeszutek Wilk
On Wed, Mar 18, 2015 at 01:06:18PM +, Ian Campbell wrote: > On Fri, 2015-03-13 at 16:26 -0400, Konrad Rzeszutek Wilk wrote: > > The function does not return any values at all. Convert the > > internal libxl ones (ERROR_FAIL, ..., etc) to positive values > > and for the other cases just return s

Re: [Xen-devel] [PATCH 4/5] libxl: wait for stubdom to be ready

2015-03-18 Thread Ian Campbell
On Fri, 2015-03-13 at 10:34 +, Wei Liu wrote: > Watch /local/domain/$dm_domid/device-model/$domid/state, wait until > state turns "running" then unpause guest. > > LIBXL_STUBDOM_START_TIMEOUT is the timeout used wait for stubdom to be > ready. My test on a very old machine (Core 2 6400) showed

Re: [Xen-devel] [PATCH 3/5] libxl: use new QEMU xenstore protocol

2015-03-18 Thread Ian Campbell
On Fri, 2015-03-13 at 10:34 +, Wei Liu wrote: > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > index 3dedad4..4a38455 100644 > --- a/tools/libxl/libxl_dm.c > +++ b/tools/libxl/libxl_dm.c > @@ -998,7 +998,7 @@ void libxl__spawn_stub_dm(libxl__egc *egc, > libxl__stub_dm_spawn_sta

Re: [Xen-devel] [PATCH 2/5] libxl: use LIBXL_TOOLSTACK_DOMID

2015-03-18 Thread Ian Campbell
On Fri, 2015-03-13 at 10:34 +, Wei Liu wrote: > The function in question is libxl__spawn_local_dm. We should use > LIBXL_TOOLSTACK_DOMID when constructing xenstore path. > > Currently LIBXL_TOOLSTACK_DOMID is 0, so this patch introduces no > functional change. As I mentioned on the previous p

Re: [Xen-devel] [PATCH v2 4/5] libxl: vcpuset: Remove useless limit on max_vcpus.

2015-03-18 Thread Ian Campbell
On Fri, 2015-03-13 at 16:26 -0400, Konrad Rzeszutek Wilk wrote: > The check is superflous. If the 'max_vcpus' (argument > value) is greater than pCPU and --ignore-host has not > been supplied we would print an warning and return > and not call this code. > > If the --ignore-host parameter had bee

Re: [Xen-devel] [PATCH 1/5] libxl: remove DM path in libxl__device_model_destroy

2015-03-18 Thread Ian Campbell
On Wed, 2015-03-18 at 13:21 +, Ian Campbell wrote: > On Fri, 2015-03-13 at 10:34 +, Wei Liu wrote: > > ... because it is the right place to clean up device model stuffs. > > ... and not devices_destroy_cb because it is the right ... > > (also "stuff"). > > > And the path should use LIBXL

  1   2   >