[Xen-devel] [Patch V2 08/15] xen: find unused contiguous memory area

2015-04-08 Thread Juergen Gross
For being able to relocate pre-allocated data areas like initrd or p2m list it is mandatory to find a contiguous memory area which is not yet in use and doesn't conflict with the memory map we want to be in effect. In case such an area is found reserve it at once as this will be required to be don

[Xen-devel] [Patch V2 06/15] xen: split counting of extra memory pages from remapping

2015-04-08 Thread Juergen Gross
Memory pages in the initial memory setup done by the Xen hypervisor conflicting with the target E820 map are remapped. In order to do this those pages are counted and remapped in xen_set_identity_and_remap(). Split the counting from the remapping operation to be able to setup the needed memory siz

[Xen-devel] [Patch V2 13/15] xen: move p2m list if conflicting with e820 map

2015-04-08 Thread Juergen Gross
Check whether the hypervisor supplied p2m list is placed at a location which is conflicting with the target E820 map. If this is the case relocate it to a new area unused up to now and compliant to the E820 map. As the p2m list might by huge (up to several GB) and is required to be mapped virtuall

[Xen-devel] [Patch V2 04/15] xen: eliminate scalability issues from initial mapping setup

2015-04-08 Thread Juergen Gross
Direct Xen to place the initial P->M table outside of the initial mapping, as otherwise the 1G (implementation) / 2G (theoretical) restriction on the size of the initial mapping limits the amount of memory a domain can be handed initially. As the initial P->M table is copied rather early during bo

[Xen-devel] [Patch V2 07/15] xen: check memory area against e820 map

2015-04-08 Thread Juergen Gross
Provide a service routine to check a physical memory area against the E820 map. The routine will return false if the complete area is RAM according to the E820 map and true otherwise. Signed-off-by: Juergen Gross --- arch/x86/xen/setup.c | 23 +++ arch/x86/xen/xen-ops.h |

[Xen-devel] [Patch V2 01/15] xen: sync with xen headers

2015-04-08 Thread Juergen Gross
Use the newest headers from the xen tree to get some new structure layouts. Signed-off-by: Juergen Gross --- arch/x86/include/asm/xen/interface.h | 96 include/xen/interface/xen.h | 10 ++-- 2 files changed, 93 insertions(+), 13 deletions(-) diff --

[Xen-devel] [Patch V2 11/15] xen: check for initrd conflicting with e820 map

2015-04-08 Thread Juergen Gross
Check whether the initrd is placed at a location which is conflicting with the target E820 map. If this is the case relocate it to a new area unused up to now and compliant to the E820 map. Signed-off-by: Juergen Gross --- arch/x86/xen/setup.c | 51 +++

[Xen-devel] [Patch V2 15/15] xen: remove no longer needed p2m.h

2015-04-08 Thread Juergen Gross
Cleanup by removing arch/x86/xen/p2m.h as it isn't needed any more. Most definitions in this file are used in p2m.c only. Move those into p2m.c. set_phys_range_identity() is already declared in arch/x86/include/asm/xen/page.h, add __init annotation there. MAX_REMAP_RANGES isn't used at all, just

[Xen-devel] [Patch V2 10/15] xen: check pre-allocated page tables for conflict with memory map

2015-04-08 Thread Juergen Gross
Check whether the page tables built by the domain builder are at memory addresses which are in conflict with the target memory map. If this is the case just panic instead of running into problems later. Signed-off-by: Juergen Gross --- arch/x86/xen/mmu.c | 19 --- arch/x86/xe

[Xen-devel] [Patch V2 00/15] xen: support pv-domains larger than 512GB

2015-04-08 Thread Juergen Gross
Support 64 bit pv-domains with more than 512GB of memory. Tested with 64 bit dom0 on machines with 8GB and 1TB and 32 bit dom0 on a 8GB machine. Conflicts between E820 map and different hypervisor populated memory areas have been tested via a fake E820 map reserved area on the 8GB machine. Change

[Xen-devel] [Patch V2 14/15] xen: allow more than 512 GB of RAM for 64 bit pv-domains

2015-04-08 Thread Juergen Gross
64 bit pv-domains under Xen are limited to 512 GB of RAM today. The main reason has been the 3 level p2m tree, which was replaced by the virtual mapped linear p2m list. Parallel to the p2m list which is being used by the kernel itself there is a 3 level mfn tree for usage by the Xen tools and event

[Xen-devel] [Patch V2 12/15] mm: provide early_memremap_ro to establish read-only mapping

2015-04-08 Thread Juergen Gross
During early boot as Xen pv domain the kernel needs to map some page tables supplied by the hypervisor read only. This is needed to be able to relocate some data structures conflicting with the physical memory map especially on systems with huge RAM (above 512GB). Provide the function early_memrem

[Xen-devel] [Patch V2 02/15] xen: save linear p2m list address in shared info structure

2015-04-08 Thread Juergen Gross
The virtual address of the linear p2m list should be stored in the shared info structure read by the Xen tools to be able to support 64 bit pv-domains larger than 512 GB. Additionally the linear p2m list interface includes a generation count which is changed prior to and after each mapping change o

[Xen-devel] [Patch V2 03/15] xen: don't build mfn tree if tools don't need it

2015-04-08 Thread Juergen Gross
In case the Xen tools indicate they don't need the p2m 3 level tree as they support the virtual mapped linear p2m list, just omit building the tree. Signed-off-by: Juergen Gross --- arch/x86/xen/p2m.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/x86/xen/p2m

[Xen-devel] [Patch V2 09/15] xen: check for kernel memory conflicting with memory layout

2015-04-08 Thread Juergen Gross
Checks whether the pre-allocated memory of the loaded kernel is in conflict with the target memory map. If this is the case, just panic instead of run into problems later, as there is nothing we can do to repair this situation. Signed-off-by: Juergen Gross --- arch/x86/xen/setup.c | 12 +

[Xen-devel] [Patch V2 05/15] xen: move static e820 map to global scope

2015-04-08 Thread Juergen Gross
Instead of using a function local static e820 map in xen_memory_setup() and calling various functions in the same source with the map as a parameter use a map directly accessible by all functions in the source. Signed-off-by: Juergen Gross Reviewed-by: David Vrabel --- arch/x86/xen/setup.c | 96

Re: [Xen-devel] tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]

2015-04-08 Thread Prashant Sreedharan
On Wed, 2015-04-08 at 14:59 +0100, Ian Jackson wrote: > Thanks to Konrad, Michael and Prashant for your attention. > > > Prashant Sreedharan writes ("Re: tg3 NIC driver bug in 3.14.x under Xen"): > > Ian, in your previous mail you indicated there are no drops or errors > > reported on eth0 (assum

Re: [Xen-devel] [PATCH 2/2][v2] blk-plug: don't flush nested plug lists

2015-04-08 Thread Dave Chinner
[ Sending again with a trimmed CC list to just the lists. Jeff - cc lists that large get blocked by mailing lists... ] On Tue, Apr 07, 2015 at 02:55:13PM -0400, Jeff Moyer wrote: > The way the on-stack plugging currently works, each nesting level > flushes its own list of I/Os. This can be less t

[Xen-devel] [xen-4.3-testing test] 50358: regressions - trouble: blocked/broken/fail/pass

2015-04-08 Thread osstest service user
flight 50358 xen-4.3-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/50358/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-rumpuserxen 4 capture-logs !broken [st=!broken!] build-i386-rumpus

Re: [Xen-devel] [RFC v1 13/15] Update Posted-Interrupts Descriptor during vCPU scheduling

2015-04-08 Thread Tian, Kevin
> From: Wu, Feng > Sent: Wednesday, April 08, 2015 7:02 PM > > > > > > > > and how do you handle ON is set after above check? looks this is better > > > > handled behind cmpxchg loop... > > > > > > - If 'ON' is set before 'if ( pi_test_on(&old) == 1 )', return > > > - If 'ON' is not set before it,

Re: [Xen-devel] [PATCH 2/3] blkif: enable multi-page ring supporting

2015-04-08 Thread Bob Liu
On 04/08/2015 10:25 PM, David Vrabel wrote: > On 08/04/15 15:21, Konrad Rzeszutek Wilk wrote: >> On Wed, Apr 08, 2015 at 11:46:44AM +0100, David Vrabel wrote: >>> On 03/04/15 07:45, Bob Liu wrote: Remove the 'DEPRECATED' and next patch will follow the protocol defined here to suppo

[Xen-devel] [xen-4.5-testing test] 50355: regressions - trouble: broken/fail/pass

2015-04-08 Thread osstest service user
flight 50355 xen-4.5-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/50355/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-freebsd10-amd64 14 guest-localmigrate/x10 fail in 50317 REGR. vs. 50268 Tests w

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

2015-04-08 Thread Meng Xu
2015-04-08 5:13 GMT-04:00 George Dunlap : > On 04/07/2015 09:25 PM, Meng Xu wrote: >> Hi George, Dario and Konrad, >> >> I finished a prototype of the RTDS scheduler with the dedicated CPU >> feature and did some quick evaluation on this feature. Right now, I >> need to refactor the code (because i

[Xen-devel] [xen-4.4-testing test] 50356: trouble: blocked/broken/fail/pass

2015-04-08 Thread osstest service user
flight 50356 xen-4.4-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/50356/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-rumpuserxen 7 capture-logs !broken [st=!broken

[Xen-devel] [PATCH] VTd/dmar: Tweak how the DMAR table is clobbered

2015-04-08 Thread Andrew Cooper
Intead of clobbering DMAR -> XMAR and back, clobber to RMAD instead. This means that changing the signature does not alter the checksum, which allows the clobbering/unclobbering to be peformed atomically and idempotently, which is an advantage on the kexec path which can reenter acpi_dmar_reinstat

[Xen-devel] [PATCH] xen: Suspend ticks on all CPUs during suspend

2015-04-08 Thread Boris Ostrovsky
Commit 77e32c89a711 ("clockevents: Manage device's state separately for the core") decouples clockevent device's modes from states. With this change when a Xen guest tries to resume, it won't be calling its set_mode op which needs to be done on each VCPU in order to make the hypervisor aware that w

[Xen-devel] [PATCH v15 16/16] unfair qspinlock: a queue based unfair lock

2015-04-08 Thread Waiman Long
For a virtual guest with the qspinlock patch, a simple unfair byte lock will be used if PV spinlock is not configured in or the hypervisor isn't either KVM or Xen. The byte lock works fine with small guest of just a few vCPUs. On a much larger guest, however, byte lock can have serious performance

Re: [Xen-devel] [RFC PATCH COLO v5 06/29] Update libxl__domain_unpause() to support qemu-xen

2015-04-08 Thread Wei Liu
On Wed, Apr 01, 2015 at 02:41:42PM +0800, Yang Hongyang wrote: > From: Wen Congyang > > Currently, libxl__domain_unpause() only supports > qemu-xen-traditional. Update it to support qemu-xen. > > Signed-off-by: Wen Congyang > --- > tools/libxl/libxl.c | 13 + > tools/libxl

Re: [Xen-devel] [RFC PATCH COLO v5 05/29] Introduce a new internal API libxl__domain_unpause()

2015-04-08 Thread Wei Liu
On Wed, Apr 01, 2015 at 02:41:41PM +0800, Yang Hongyang wrote: > From: Wen Congyang > > The guest is paused after libxl_domain_create_restore(). > Secondary vm is running in colo mode. So we need to unpause > the guest. The current API libxl_domain_unpause() is > not an internal API. Introduce a

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

2015-04-08 Thread Wei Liu
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 > --- > tools/libxc/xc_resume.c | 20 ---

Re: [Xen-devel] [RFC PATCH COLO v5 03/29] tools: libxl: introduce a new API libxl__domain_restore() to read qemu state

2015-04-08 Thread Wei Liu
On Wed, Apr 01, 2015 at 02:41:39PM +0800, Yang Hongyang wrote: > From: Wen Congyang > > Secondary vm is running in colo mode. So we will do > the following things again and again: > 1. suspend both primay vm and secondary vm > 2. sync the state > 3. resume both primary vm and secondary vm > We wi

Re: [Xen-devel] [RFC PATCH COLO v5 04/29] Update libxl__domain_suspend_common_switch_qemu_logdirty() for colo

2015-04-08 Thread Wei Liu
On Wed, Apr 01, 2015 at 02:41:40PM +0800, Yang Hongyang wrote: > From: Wen Congyang > > Secondary vm is running in colo mode. So we need to > send secondary vm's dirty page information to master. > libxl__domain_suspend_common_switch_qemu_logdirty() is to enable > qemu logdirty. But it uses domai

Re: [Xen-devel] [RFC PATCH COLO v5 01/29] Add readme

2015-04-08 Thread Wei Liu
On Wed, Apr 01, 2015 at 02:41:37PM +0800, Yang Hongyang wrote: > From: Wen Congyang > > Signed-off-by: Wen Congyang > Signed-off-by: Yang Hongyang > --- > docs/README.colo | 92 > > 1 file changed, 92 insertions(+) > create mode 100644

Re: [Xen-devel] [RFC PATCH COLO v5 02/29] Refactor domain_suspend_callback_common()

2015-04-08 Thread Wei Liu
On Wed, Apr 01, 2015 at 02:41:38PM +0800, Yang Hongyang wrote: > From: Wen Congyang > > libxl__domain_suspend() is to save the guest. I think > we should call it libxl__domain_save(), but I don't > rename it. > FWIW this is not public API so we have certain degree of liberty to rename it if the

Re: [Xen-devel] [PATCH] xen/pci: Try harder to get PXM information for Xen

2015-04-08 Thread David Vrabel
On 08/04/15 18:17, Boris Ostrovsky wrote: > On 04/08/2015 12:44 PM, David Vrabel wrote: >> On 08/04/15 15:01, Boris Ostrovsky wrote: >>> On 04/08/2015 09:39 AM, Ross Lagerwall wrote: If the device being added to Xen is not contained in the ACPI table, walk the PCI device tree to find a pa

Re: [Xen-devel] [PATCH v15 12/15] pvqspinlock, x86: Enable PV qspinlock for Xen

2015-04-08 Thread Waiman Long
On 04/08/2015 08:01 AM, David Vrabel wrote: On 07/04/15 03:55, Waiman Long wrote: This patch adds the necessary Xen specific code to allow Xen to support the CPU halting and kicking operations needed by the queue spinlock PV code. This basically looks the same as the version I wrote, except I t

Re: [Xen-devel] [PATCH v1 1/2] arm: Add ability to relocate Xen in over 4GB space

2015-04-08 Thread Andrii Anisov
>>Therefore we needed to move all the rest (XEN, rest of domains) OVER 4GB. Andrii Anisov | Team Lead GlobalLogic Kyiv, 03038, Protasov Business Park, M.Grinchenka, 2/1 P +38.044.492.9695x3664 M +380505738852 S andriyanisov www.globallogic.com http://www.globallogi

Re: [Xen-devel] [PATCH v1 1/2] arm: Add ability to relocate Xen in over 4GB space

2015-04-08 Thread Andrii Anisov
> OOI, can you give more context why you need to relocate Xen over 4GB? Julien, The context here is pretty simple: just a workaround of the real system limitations: 1. Renesas R-Car H2 evaluation board lager has 4GB of RAM, 2GB mapped under 4GB boundary and 2GB over. 2. The R-Car2 chip

Re: [Xen-devel] [PATCH] xen/pci: Try harder to get PXM information for Xen

2015-04-08 Thread Boris Ostrovsky
On 04/08/2015 12:44 PM, David Vrabel wrote: On 08/04/15 15:01, Boris Ostrovsky wrote: On 04/08/2015 09:39 AM, Ross Lagerwall wrote: If the device being added to Xen is not contained in the ACPI table, walk the PCI device tree to find a parent that is contained in the ACPI table before finding t

[Xen-devel] [qemu-mainline test] 50359: regressions - trouble: broken/fail/pass

2015-04-08 Thread osstest service user
flight 50359 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/50359/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-winxpsp3 3 host-install(3) broken REGR. vs. 36709 test-amd64-i386-xl-

Re: [Xen-devel] [PATCH] xen/pci: Try harder to get PXM information for Xen

2015-04-08 Thread David Vrabel
On 08/04/15 15:01, Boris Ostrovsky wrote: > On 04/08/2015 09:39 AM, Ross Lagerwall wrote: >> If the device being added to Xen is not contained in the ACPI table, >> walk the PCI device tree to find a parent that is contained in the ACPI >> table before finding the PXM information from this device.

Re: [Xen-devel] [PATCH v6 1/5] sysctl: Make XEN_SYSCTL_numainfo a little more efficient

2015-04-08 Thread Andrew Cooper
On 07/04/15 18:28, Boris Ostrovsky wrote: > On 04/07/2015 01:04 PM, Andrew Cooper wrote: >> On 07/04/15 17:57, Boris Ostrovsky wrote: >>> On 04/07/2015 12:04 PM, Andrew Cooper wrote: On 06/04/15 23:12, Boris Ostrovsky wrote: > A number of changes to XEN_SYSCTL_numainfo interface: > >>>

Re: [Xen-devel] [PATCH v1 2/2] arm: skip verifying memory continuity

2015-04-08 Thread Julien Grall
Hi Iurii, On 08/04/15 13:36, Iurii Konovalenko wrote: > From: Iurii Konovalenko > > Odd check. Can you expand the commit explaining that Xen supports non-contiguous bank since commit e01fa4e2 "xen: arm: Enable physical address space compression (PDX) on arm"? Regards, -- Julien Grall __

Re: [Xen-devel] [PATCH v2 1/4] libxenstat: reuse xc_handle open in xenstat_init

2015-04-08 Thread Andrew Cooper
On 08/04/15 17:08, Wei Liu wrote: > Signed-off-by: Wei Liu > Cc: Ian Campbell > Cc: Ian Jackson > Cc: Charles Arnold Reviewed-by: Andrew Cooper > --- > tools/xenstat/libxenstat/src/xenstat_qmp.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/tools/xenstat/li

Re: [Xen-devel] [PATCH v2 4/4] libxenstat: qmp_read fix and cleanup

2015-04-08 Thread Andrew Cooper
On 08/04/15 17:08, Wei Liu wrote: > The second argument of poll(2) is the number of file descriptors. POLLIN > is defined as 1 so it happens to work. Also reduce the size of array to > one as there is only one file descriptor. > > Signed-off-by: Wei Liu > Cc: Ian Campbell > Cc: Ian Jackson > Cc:

[Xen-devel] [PATCH v2 4/4] libxenstat: qmp_read fix and cleanup

2015-04-08 Thread Wei Liu
The second argument of poll(2) is the number of file descriptors. POLLIN is defined as 1 so it happens to work. Also reduce the size of array to one as there is only one file descriptor. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Cc: Charles Arnold --- tools/xenstat/libxenstat/sr

[Xen-devel] [PATCH v2 0/4] libxenstat bug fixes and cleanups

2015-04-08 Thread Wei Liu
Wei Liu (4): libxenstat: reuse xc_handle open in xenstat_init libxenstat: YAJL_GET_STRING may return NULL libxenstat: always free qmp_stats libxenstat: qmp_read fix and cleanup tools/xenstat/libxenstat/src/xenstat_qmp.c | 19 --- 1 file changed, 8 insertions(+), 11 deletio

[Xen-devel] [PATCH v2 1/4] libxenstat: reuse xc_handle open in xenstat_init

2015-04-08 Thread Wei Liu
Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Cc: Charles Arnold --- tools/xenstat/libxenstat/src/xenstat_qmp.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/xenstat/libxenstat/src/xenstat_qmp.c b/tools/xenstat/libxenstat/src/xenstat_qmp.c index 2c

[Xen-devel] [PATCH v2 3/4] libxenstat: always free qmp_stats

2015-04-08 Thread Wei Liu
Originally qmp_stats is only freed in failure path and leaked in success path. Instead of wiring up the success path, rearrange the code a bit to always free qmp_stats before checking if info is NULL. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Cc: Charles Arnold Acked-by: Ian Jac

[Xen-devel] [PATCH v2 2/4] libxenstat: YAJL_GET_STRING may return NULL

2015-04-08 Thread Wei Liu
Passing NULL to strcmp can cause segmentation fault. Continue in that case. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Cc: Charles Arnold Reviewed-by: Andrew Cooper Acked-by: Ian Jackson --- tools/xenstat/libxenstat/src/xenstat_qmp.c | 2 +- 1 file changed, 1 insertion(+), 1 de

Re: [Xen-devel] [PATCH V14 3/7] xen/arm: Allow hypervisor access to mem_access protected pages

2015-04-08 Thread Julien Grall
On 08/04/15 16:57, Tamas K Lengyel wrote: > Yea I could reuse that code, although it has some extra stuff that I > don't need (like converting ipa to gfn back to paddr), and type checks > which I ultimately don't care about here as the only type allowed is > p2m_ram_rw. So the current version is pr

[Xen-devel] [PATCH v2] libxl: check return value of libxl_vcpu_setaffinity

2015-04-08 Thread Wei Liu
That function can fail. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Cc: Dario Faggioli --- v2: add missing `}'. --- tools/libxl/libxl_dom.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index a88db69.

Re: [Xen-devel] [PATCH v1 1/2] arm: Add ability to relocate Xen in over 4GB space

2015-04-08 Thread Julien Grall
Hi Iurii, OOI, can you give more context why you need to relocate Xen over 4GB? On 08/04/15 13:36, Iurii Konovalenko wrote: > From: Iurii Konovalenko > > Primary CPU relocate Xen in over 4GB space and wake up seondary CPUs. Typoes: s/relocate/relocates s/seondary/secondary > Secondary CPUs r

Re: [Xen-devel] [PATCH] libxl: check return value of libxl_vcpu_setaffinity

2015-04-08 Thread Wei Liu
On Wed, Apr 08, 2015 at 04:55:26PM +0100, Ian Jackson wrote: > Wei Liu writes ("[PATCH] libxl: check return value of > libxl_vcpu_setaffinity"): > > That function can fail. > ... > > } > > > > -libxl_for_each_set_bit(j, v->vcpus) > > -libxl_set_vcpuaffinity(CTX, domi

Re: [Xen-devel] [PATCH V14 3/7] xen/arm: Allow hypervisor access to mem_access protected pages

2015-04-08 Thread Tamas K Lengyel
On Wed, Apr 8, 2015 at 4:33 PM, Julien Grall wrote: > Hi Tamas, > > One minor question. > > On 26/03/15 22:05, Tamas K Lengyel wrote: > > +/* > > + * We had a mem_access permission limiting the access, but the page > type > > + * could also be limiting, so we need to check that as wel

Re: [Xen-devel] [PATCH 3/4] libxenstat: always free qmp_stats

2015-04-08 Thread Wei Liu
On Wed, Apr 08, 2015 at 04:49:58PM +0100, Ian Jackson wrote: > Wei Liu writes ("[PATCH 3/4] libxenstat: always free qmp_stats"): > > Originally qmp_stats is only freed in failure path and leaked in success > > path. > > > > Instead of wiring up the success path, rearrange the code a bit to > > alw

Re: [Xen-devel] [PATCH] libxl: check return value of libxl_vcpu_setaffinity

2015-04-08 Thread Ian Jackson
Wei Liu writes ("[PATCH] libxl: check return value of libxl_vcpu_setaffinity"): > That function can fail. ... > } > > -libxl_for_each_set_bit(j, v->vcpus) > -libxl_set_vcpuaffinity(CTX, domid, j, NULL, &cpumap); > +libxl_for_each_set_bit(j, v->vcpus) { > +

Re: [Xen-devel] [PATCH 2/4] libxenstat: YAJL_GET_STRING may return NULL

2015-04-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 2/4] libxenstat: YAJL_GET_STRING may return NULL"): > Passing NULL to strcmp can cause segmentation fault. Continue in that > case. > > Signed-off-by: Wei Liu > Cc: Ian Campbell > Cc: Ian Jackson > Cc: Charles Arnold Acked-by: Ian Jackson

[Xen-devel] Zir Blazer's guide to install Arch Linux and Xen - need feedback

2015-04-08 Thread Zir Blazer
A year or so ago I had done a near identical guide in spanish, to make installing Xen more accessible to hispanic people. However, I figured out that pretty much everyone which was interesed in it, didn't had the proper Hardware to try Passthrough, and anyone who does, should have no issues unde

Re: [Xen-devel] [PATCH 4/4] libxenstat: qmp_read fix and cleanup

2015-04-08 Thread Ian Jackson
Andrew Cooper writes ("Re: [PATCH 4/4] libxenstat: qmp_read fix and cleanup"): > On 08/04/15 16:01, Wei Liu wrote: > > The second argument of poll(2) is the number of file descriptors. POLLIN > > is defined as 1 so it happens to work. ... > > @@ -311,6 +312,9 @@ static int qmp_read(int qfd, unsigne

Re: [Xen-devel] [PATCH 3/4] libxenstat: always free qmp_stats

2015-04-08 Thread Ian Jackson
Wei Liu writes ("[PATCH 3/4] libxenstat: always free qmp_stats"): > Originally qmp_stats is only freed in failure path and leaked in success > path. > > Instead of wiring up the success path, rearrange the code a bit to > always free qmp_stats before checking if info is NULL. Acked-by: Ian Jackso

Re: [Xen-devel] [PATCH 1/4] libxenstat: check xc_interface_open return value

2015-04-08 Thread Wei Liu
On Wed, Apr 08, 2015 at 04:21:56PM +0100, Andrew Cooper wrote: > On 08/04/15 16:01, Wei Liu wrote: > > Signed-off-by: Wei Liu > > Cc: Ian Campbell > > Cc: Ian Jackson > > Cc: Charles Arnold > > The xenstat handle passed around already has an open xc_handle. That > should be reused rather than

Re: [Xen-devel] [PATCH 4/4] libxenstat: qmp_read fix and cleanup

2015-04-08 Thread Wei Liu
On Wed, Apr 08, 2015 at 04:25:06PM +0100, Andrew Cooper wrote: > On 08/04/15 16:01, Wei Liu wrote: > > The second argument of poll(2) is the number of file descriptors. POLLIN > > is defined as 1 so it happens to work. > > > > Also do two cleanups while I was there: > > 1. There is only one fd, so

Re: [Xen-devel] [PATCH V14 4/7] xen/arm: Data abort exception (R/W) mem_access events

2015-04-08 Thread Tamas K Lengyel
On Wed, Apr 8, 2015 at 5:26 PM, Julien Grall wrote: > Hi Tamas, > > The code looks good. See few typoes and coding style issue below. > > On 26/03/15 22:05, Tamas K Lengyel wrote: > > +static int p2m_mem_access_radix_set(struct p2m_domain *p2m, unsigned > long pfn, > > +

Re: [Xen-devel] [PATCH v8 00/15] Migration v2 (libxc)

2015-04-08 Thread Roger Pau Monné
El 02/04/15 a les 20.32, Andrew Cooper ha escrit: > Presented here is v8 of the Migration v2 series (libxc subset), which is able > to function when transparently inserted under an unmodified xl/libxl. > > There are numerous tweaks in v8 (fix build with MiniOS, tweak some code to > appease Coverit

Re: [Xen-devel] libvirtd live-locking on CTX_LOCK when doing 'virsh save /tmp/blah' with guest corrupting memory (on purpose).

2015-04-08 Thread Andrew Cooper
On 08/04/15 15:47, Konrad Rzeszutek Wilk wrote: > Hey Jim, Andrew, and Ian, > > This is libvirt v1.2.14 + three patches: > c82a59b libxl: drop virDomainObj lock when destroying a domain > a1c9d30 libxl: acquire a job when destroying a domain > 5bd5406 libxl: Move job acquisition in libxlDomainStart

Re: [Xen-devel] [PATCH V14 4/7] xen/arm: Data abort exception (R/W) mem_access events

2015-04-08 Thread Julien Grall
Hi Tamas, The code looks good. See few typoes and coding style issue below. On 26/03/15 22:05, Tamas K Lengyel wrote: > +static int p2m_mem_access_radix_set(struct p2m_domain *p2m, unsigned long > pfn, > +p2m_access_t a) > +{ > +int rc; > + > +if ( !p2

Re: [Xen-devel] [PATCH 4/4] libxenstat: qmp_read fix and cleanup

2015-04-08 Thread Andrew Cooper
On 08/04/15 16:01, Wei Liu wrote: > The second argument of poll(2) is the number of file descriptors. POLLIN > is defined as 1 so it happens to work. > > Also do two cleanups while I was there: > 1. There is only one fd, so a one-element array is enough. > 2. Initialise pfd to make code linter happ

Re: [Xen-devel] Nested Virt - Xen 4.4 through 4.6 - Hyper-V; Can't boot after enabling Hyper-V

2015-04-08 Thread Li, Liang Z
> On Tue, Apr 7, 2015 at 2:42 AM, mailing lists wrote: > > Hi -- > > > > I've been trying to get nested virtualization working with Xen so that > > I could boot Windows and use Hyper-V related features, however I have > > not had much success. Using Windows 8.1 or Windows 2012r2, I'm able > > to

Re: [Xen-devel] [PATCH 1/4] libxenstat: check xc_interface_open return value

2015-04-08 Thread Andrew Cooper
On 08/04/15 16:01, Wei Liu wrote: > Signed-off-by: Wei Liu > Cc: Ian Campbell > Cc: Ian Jackson > Cc: Charles Arnold The xenstat handle passed around already has an open xc_handle. That should be reused rather than opening a new one every time we want to get a list of domain ids. ~Andrew >

Re: [Xen-devel] [PATCH 2/4] libxenstat: YAJL_GET_STRING may return NULL

2015-04-08 Thread Andrew Cooper
On 08/04/15 16:01, Wei Liu wrote: > Passing NULL to strcmp can cause segmentation fault. Continue in that > case. > > Signed-off-by: Wei Liu > Cc: Ian Campbell > Cc: Ian Jackson > Cc: Charles Arnold Reviewed-by: Andrew Cooper > --- > tools/xenstat/libxenstat/src/xenstat_qmp.c | 2 +- > 1 fi

Re: [Xen-devel] [PATCH 29/28] libxl: ao internal API docs: Mention synchronous ao completion

2015-04-08 Thread Wei Liu
On Wed, Apr 08, 2015 at 12:37:58PM +0100, Ian Jackson wrote: > This doc comment about ao lifecycle failed to mention the option of > completing the ao during the initiator function. (Indeed, the most > obvious reading would forbid it.) > > Restructure the comment, describe this situation, and gen

[Xen-devel] [PATCH 0/4] libxenstat bug fixes and cleanups

2015-04-08 Thread Wei Liu
Wei Liu (4): libxenstat: check xc_interface_open return value libxenstat: YAJL_GET_STRING may return NULL libxenstat: always free qmp_stats libxenstat: qmp_read fix and cleanup tools/xenstat/libxenstat/src/xenstat_qmp.c | 18 -- 1 file changed, 12 insertions(+), 6 deletion

[Xen-devel] [PATCH 3/4] libxenstat: always free qmp_stats

2015-04-08 Thread Wei Liu
Originally qmp_stats is only freed in failure path and leaked in success path. Instead of wiring up the success path, rearrange the code a bit to always free qmp_stats before checking if info is NULL. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Cc: Charles Arnold --- tools/xensta

[Xen-devel] [PATCH 4/4] libxenstat: qmp_read fix and cleanup

2015-04-08 Thread Wei Liu
The second argument of poll(2) is the number of file descriptors. POLLIN is defined as 1 so it happens to work. Also do two cleanups while I was there: 1. There is only one fd, so a one-element array is enough. 2. Initialise pfd to make code linter happy. Signed-off-by: Wei Liu Cc: Ian Campbell

[Xen-devel] [PATCH 2/4] libxenstat: YAJL_GET_STRING may return NULL

2015-04-08 Thread Wei Liu
Passing NULL to strcmp can cause segmentation fault. Continue in that case. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Cc: Charles Arnold --- tools/xenstat/libxenstat/src/xenstat_qmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xenstat/libxenstat/sr

[Xen-devel] [PATCH 1/4] libxenstat: check xc_interface_open return value

2015-04-08 Thread Wei Liu
Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Cc: Charles Arnold --- tools/xenstat/libxenstat/src/xenstat_qmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/xenstat/libxenstat/src/xenstat_qmp.c b/tools/xenstat/libxenstat/src/xenstat_qmp.c index 2cb99e9..f3aeec4 100644

[Xen-devel] [PATCH] libxl: check return value of libxl_vcpu_setaffinity

2015-04-08 Thread Wei Liu
That function can fail. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Cc: Dario Faggioli --- tools/libxl/libxl_dom.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index a88db69..bc2e596 100644 --- a/tool

[Xen-devel] [PATCH] libxl: Disallow save or migrate when host devices are assigned to a guest.

2015-04-08 Thread Konrad Rzeszutek Wilk
It is unhealthy. If the device is not doing any DMA operations it would work - but if you are saving and there are DMA operations happening the chance of corruption (outstanding DMAs) increase. As such re-use the check migration used. Signed-off-by: Konrad Rzeszutek Wilk --- src/libxl/libxl_dom

[Xen-devel] libvirtd live-locking on CTX_LOCK when doing 'virsh save /tmp/blah' with guest corrupting memory (on purpose).

2015-04-08 Thread Konrad Rzeszutek Wilk
Hey Jim, Andrew, and Ian, This is libvirt v1.2.14 + three patches: c82a59b libxl: drop virDomainObj lock when destroying a domain a1c9d30 libxl: acquire a job when destroying a domain 5bd5406 libxl: Move job acquisition in libxlDomainStart to callers For fun I've set up an guest with PCI passthro

Re: [Xen-devel] [PATCH V3 0/3] libxl: domain destroy fixes

2015-04-08 Thread Konrad Rzeszutek Wilk
On Fri, Apr 03, 2015 at 04:49:01PM -0600, Jim Fehlig wrote: > V3 of a small series to fix issues wrt domain destroy > > V1: > https://www.redhat.com/archives/libvir-list/2015-March/msg01337.html > > V2: > https://www.redhat.com/archives/libvir-list/2015-April/msg00072.html > > In this version, p

Re: [Xen-devel] [PATCH V14 3/7] xen/arm: Allow hypervisor access to mem_access protected pages

2015-04-08 Thread Julien Grall
Hi Tamas, One minor question. On 26/03/15 22:05, Tamas K Lengyel wrote: > +/* > + * We had a mem_access permission limiting the access, but the page type > + * could also be limiting, so we need to check that as well. > + */ > +maddr = p2m_lookup(current->domain, ipa, &t); > +

Re: [Xen-devel] [PATCH 2/3] blkif: enable multi-page ring supporting

2015-04-08 Thread David Vrabel
On 08/04/15 15:21, Konrad Rzeszutek Wilk wrote: > On Wed, Apr 08, 2015 at 11:46:44AM +0100, David Vrabel wrote: >> On 03/04/15 07:45, Bob Liu wrote: >>> Remove the 'DEPRECATED' and next patch will follow the protocol defined >>> here to >>> support multi-page ring. >> >> Why are you un-deprecating

Re: [Xen-devel] [PATCH 2/3] blkif: enable multi-page ring supporting

2015-04-08 Thread Konrad Rzeszutek Wilk
On Wed, Apr 08, 2015 at 11:46:44AM +0100, David Vrabel wrote: > On 03/04/15 07:45, Bob Liu wrote: > > Remove the 'DEPRECATED' and next patch will follow the protocol defined > > here to > > support multi-page ring. > > Why are you un-deprecating this instead of using max-ring-page-order? > Are yo

[Xen-devel] [PATCH v3] increase size of irq from uint8_t to uint32_t

2015-04-08 Thread Iurii Konovalenko
From: Iurii Konovalenko Changes in v3: - Julien Grall's comment added to commit message Changes in v2: - Commit message edited - Signed-off is set Iurii Konovalenko (1): arm: irq: increase size of irq from uint8_t to uint32_t tools/libxc/include/xenctrl.h | 10 +- tools/

[Xen-devel] [PATCH v3] arm: irq: increase size of irq from uint8_t to uint32_t

2015-04-08 Thread Iurii Konovalenko
From: Iurii Konovalenko Changes are dedicated to XEN_DOMCTL_irq_permission and IRQ pssthrough API functions. PHYSDEV_* operations already using 32 bits type but signed one. Although, PHYSDEV_* operations are not yet used on ARM and LPIs support (which are using very high number) are not support

Re: [Xen-devel] sudden hang on boot on AMD Notebook

2015-04-08 Thread Konrad Rzeszutek Wilk
On Wed, Apr 08, 2015 at 09:09:23AM +0200, Olaf Hering wrote: > On Tue, Apr 07, Konrad Rzeszutek Wilk wrote: > > > You might also want to use 'sync_console'. > > This does not give any extra info in the case of the reported hang. No, but are you able to at least dump the status of the registers?

Re: [Xen-devel] [RFC PATCH 3/7] xen: psr: reserve an RMID for each core

2015-04-08 Thread Dario Faggioli
On Wed, 2015-04-08 at 14:28 +0100, George Dunlap wrote: > On 04/04/2015 03:14 AM, Dario Faggioli wrote: > > This allows for a new item to be passed as part of the psr= > > boot option: "percpu_cmt". If that is specified, Xen tries, > > at boot time, to associate an RMID to each core. > > > > XXX T

Re: [Xen-devel] [PATCH] xen/pci: Try harder to get PXM information for Xen

2015-04-08 Thread Boris Ostrovsky
On 04/08/2015 09:39 AM, Ross Lagerwall wrote: If the device being added to Xen is not contained in the ACPI table, walk the PCI device tree to find a parent that is contained in the ACPI table before finding the PXM information from this device. Signed-off-by: Ross Lagerwall --- drivers/xen/p

Re: [Xen-devel] tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]

2015-04-08 Thread Ian Jackson
Thanks to Konrad, Michael and Prashant for your attention. Prashant Sreedharan writes ("Re: tg3 NIC driver bug in 3.14.x under Xen"): > Ian, in your previous mail you indicated there are no drops or errors > reported on eth0 (assuming this is the tg3 port), which is added to the > bridge xenbr0 i

Re: [Xen-devel] [PATCH V14 2/7] xen/arm: Implement domain_get_maximum_gpfn

2015-04-08 Thread Julien Grall
On 08/04/15 14:47, Tamas K Lengyel wrote: > I think updating libxc to not truncate the value would be the preferred > way to go forward (changing return type to uint64_t). I already added > those changes to this patch and it's only a handful of instances. It won't work if the toolstack is running

Re: [Xen-devel] [PATCH V14 2/7] xen/arm: Implement domain_get_maximum_gpfn

2015-04-08 Thread Tamas K Lengyel
On Wed, Apr 8, 2015 at 3:42 PM, Julien Grall wrote: > On 08/04/15 14:38, Tamas K Lengyel wrote: > > The patch that will use xc_domain_maximum_gpfn is not included right now > > in this series as my other series significantly cleans up the existing > > xen-access test code. Before that's merged, t

Re: [Xen-devel] [PATCH V14 2/7] xen/arm: Implement domain_get_maximum_gpfn

2015-04-08 Thread Julien Grall
On 08/04/15 14:38, Tamas K Lengyel wrote: > The patch that will use xc_domain_maximum_gpfn is not included right now > in this series as my other series significantly cleans up the existing > xen-access test code. Before that's merged, there is no point in > carrying that patch here as it will be i

[Xen-devel] [PATCH] xen/pci: Try harder to get PXM information for Xen

2015-04-08 Thread Ross Lagerwall
If the device being added to Xen is not contained in the ACPI table, walk the PCI device tree to find a parent that is contained in the ACPI table before finding the PXM information from this device. Signed-off-by: Ross Lagerwall --- drivers/xen/pci.c | 15 +-- 1 file changed, 13 ins

Re: [Xen-devel] [PATCH V14 2/7] xen/arm: Implement domain_get_maximum_gpfn

2015-04-08 Thread Tamas K Lengyel
The patch that will use xc_domain_maximum_gpfn is not included right now in this series as my other series significantly cleans up the existing xen-access test code. Before that's merged, there is no point in carrying that patch here as it will be in conflict anyway. I'm intending to send that once

Re: [Xen-devel] [RFC PATCH 0/7] Intel Cache Monitoring: Current Status and Future Opportunities

2015-04-08 Thread Dario Faggioli
On Wed, 2015-04-08 at 12:27 +0100, George Dunlap wrote: > On 04/07/2015 11:27 AM, Andrew Cooper wrote: > > There seem to be several areas of confusion indicated in your document. > > I am unsure whether this is a side effect of the way you have written > > it, but here are (hopefully) some words

Re: [Xen-devel] [RFC PATCH 3/7] xen: psr: reserve an RMID for each core

2015-04-08 Thread George Dunlap
On 04/04/2015 03:14 AM, Dario Faggioli wrote: > This allows for a new item to be passed as part of the psr= > boot option: "percpu_cmt". If that is specified, Xen tries, > at boot time, to associate an RMID to each core. > > XXX This all looks rather straightforward, if it weren't > for the fa

Re: [Xen-devel] [PATCH v6 1/3] xenbus_client: Extend interface to support multi-page ring

2015-04-08 Thread David Vrabel
On 03/04/15 07:44, Bob Liu wrote: > From: Wei Liu > > Originally Xen PV drivers only use single-page ring to pass along > information. This might limit the throughput between frontend and > backend. > > The patch extends Xenbus driver to support multi-page ring, which in > general should improve

Re: [Xen-devel] [PATCH V14 2/7] xen/arm: Implement domain_get_maximum_gpfn

2015-04-08 Thread Julien Grall
Hi Tamas, On 26/03/15 22:05, Tamas K Lengyel wrote: > From: Julien Grall > > The function domain_get_maximum_gpfn is returning the maximum gpfn ever > mapped in the guest. We can use d->arch.p2m.max_mapped_gfn for this purpose. > > We use this in xenaccess as to avoid the user attempting to set

Re: [Xen-devel] [RFC PATCH 0/7] Intel Cache Monitoring: Current Status and Future Opportunities

2015-04-08 Thread Dario Faggioli
On Wed, 2015-04-08 at 12:30 +0100, George Dunlap wrote: > On 04/04/2015 03:14 AM, Dario Faggioli wrote: > > ### Per-vCPU cache monitoring > > > > This means being able to tell how much of the L3 is being used by each vCPU. > > Monitoring the cache occupancy of a specific domain, would still be >

  1   2   >