Re: [Xen-devel] [v9][PATCH 03/16] xen/passthrough: extend hypercall to support rdm reservation policy

2015-07-16 Thread Jan Beulich
>>> On 17.07.15 at 02:45, wrote: > This patch extends the existing hypercall to support rdm reservation policy. > We return error or just throw out a warning message depending on whether > the policy is "strict" or "relaxed" when reserving RDM regions in pfn space. > Note in some special cases, e.

Re: [Xen-devel] PV-vNUMA issue: topology is misinterpreted by the guest

2015-07-16 Thread Jan Beulich
>>> On 16.07.15 at 18:59, wrote: > And in general (both for PV and HVM) --- is there any reason to expose > CPU topology at all? I can see it being useful if VCPUs are pinned but > if they are not then it can make performance worse. Indeed - that's what our kernels have been doing for years, an

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

2015-07-16 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 Reviewed-by: David Vrabel Acked-by: Konrad Rzeszutek Wilk --- arch/x86/xen/p2m.c | 10 +++--- 1 file changed, 7

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

2015-07-16 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 Reviewed-by: David Vrabel Acked-by: Konrad Rzeszutek Wilk --- arch/x86/xen/

[Xen-devel] [Patch V6 01/16] xen: sync with xen headers

2015-07-16 Thread Juergen Gross
Use the newest headers from the xen tree to get some new structure layouts. Signed-off-by: Juergen Gross Reviewed-by: David Vrabel Acked-by: Konrad Rzeszutek Wilk --- arch/x86/include/asm/xen/interface.h | 96 include/xen/interface/xen.h | 35 +

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

2015-07-16 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 Acked-by: Konrad Rzeszutek Wilk --- arch/x86/xen/mmu.c | 19

[Xen-devel] [Patch V6 14/16] xen: move p2m list if conflicting with e820 map

2015-07-16 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 V6 06/16] xen: split counting of extra memory pages from remapping

2015-07-16 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 V6 05/16] xen: move static e820 map to global scope

2015-07-16 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 Acked-by: Konrad Rzeszutek Wil

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

2015-07-16 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 V6 00/16] xen: support pv-domains larger than 512GB

2015-07-16 Thread Juergen Gross
Support 64 bit pv-domains with more than 512GB of memory. Following test have been done: - 64 bit dom0 on 8GB machine - 64 bit dom0 on 1TB machine (resolving p2m/E820-map conflict) - 32 bit dom0 on 8GB machine - 64 bit dom0 on 8GB machine with faked kernel/E820-map conflict - 64 bit dom0 on 8GB ma

[Xen-devel] [Patch V6 13/16] xen: add explicit memblock_reserve() calls for special pages

2015-07-16 Thread Juergen Gross
Some special pages containing interfaces to xen are being reserved implicitly only today. The memblock_reserve() call to reserve them is meant to reserve the p2m list supplied by xen. It is just reserving not only the p2m list itself, but some more pages up to the start of the xen built page tables

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

2015-07-16 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 Reviewed-by: David Vrabel Acked-by: Konrad Rzeszutek Wilk --- arch/x86/xen/setup.

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

2015-07-16 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 Reviewed-by: David Vrabel Acked-by: Kon

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

2015-07-16 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 V6 02/16] xen: save linear p2m list address in shared info structure

2015-07-16 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 V6 04/16] xen: eliminate scalability issues from initial mapping setup

2015-07-16 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 V6 12/16] mm: provide early_memremap_ro to establish read-only mapping

2015-07-16 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 V6 08/16] xen: find unused contiguous memory area

2015-07-16 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

Re: [Xen-devel] Requesting for freeze exception for RMRR

2015-07-16 Thread Chen, Tiejun
On 2015/7/14 17:29, Wei Liu wrote: On Tue, Jul 14, 2015 at 09:27:17AM +0800, Chen, Tiejun wrote: Please work with maintainers to get those hvmloader patches acked or reviewed. I will do. Maybe I need to update current status today. I just send out v8: * All tools comments raised by Jackson

[Xen-devel] [v9][PATCH 00/16] Fix RMRR

2015-07-16 Thread Tiejun Chen
v9: * Patch #3: xen/passthrough: extend hypercall to support rdm reservation policy Correct one check condition of XEN_DOMCTL_DEV_RDM_RELAXED * Patch #5: hvmloader: get guest memory map into memory_map[] Correct the patch head description: [RESERVED_MEMORY_DYNAMIC_START, RESERVED_MEMORY_DYN

[Xen-devel] [v9][PATCH 12/16] tools: introduce a new parameter to set a predefined rdm boundary

2015-07-16 Thread Tiejun Chen
Previously we always fix that predefined boundary as 2G to handle conflict between memory and rdm, but now this predefined boundar can be changes with the parameter "rdm_mem_boundary" in .cfg file. CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu Acked-by: Wei Liu Acked-by:

[Xen-devel] [v9][PATCH 06/16] hvmloader/pci: disable all pci devices conflicting with rdm

2015-07-16 Thread Tiejun Chen
When allocating mmio address for PCI bars, mmio may overlap with reserved regions. Currently we just want to disable these associate devices simply to avoid conflicts but we will reshape current mmio allocation mechanism to fix this completely. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper

[Xen-devel] [v9][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-16 Thread Tiejun Chen
Now use the hypervisor-supplied memory map to build our final e820 table: * Add regions for BIOS ranges and other special mappings not in the hypervisor map * Add in the hypervisor regions * Adjust the lowmem and highmem regions if we've had to relocate memory (adding a highmem region if necess

[Xen-devel] [v9][PATCH 03/16] xen/passthrough: extend hypercall to support rdm reservation policy

2015-07-16 Thread Tiejun Chen
This patch extends the existing hypercall to support rdm reservation policy. We return error or just throw out a warning message depending on whether the policy is "strict" or "relaxed" when reserving RDM regions in pfn space. Note in some special cases, e.g. add a device to hwdomain, and remove a

[Xen-devel] [v9][PATCH 09/16] tools: extend xc_assign_device() to support rdm reservation policy

2015-07-16 Thread Tiejun Chen
This patch passes rdm reservation policy to xc_assign_device() so the policy is checked when assigning devices to a VM. Note this also bring some fallout to python usage of xc_assign_device(). CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu CC: David Scott Acked-by: Wei L

[Xen-devel] [v9][PATCH 04/16] xen: enable XENMEM_memory_map in hvm

2015-07-16 Thread Tiejun Chen
This patch enables XENMEM_memory_map in hvm. So hvmloader can use it to setup the e820 mappings. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Tiejun Chen Reviewed-by: Tim Deegan Reviewed-by: Kevin Tian Acked-by: Jan Beulich Acked-by: George Dunlap --- v5 ~ v9: * Nothin

[Xen-devel] [v9][PATCH 10/16] tools: introduce some new parameters to set rdm policy

2015-07-16 Thread Tiejun Chen
This patch introduces user configurable parameters to specify RDM resource and according policies, Global RDM parameter: rdm = "strategy=host,policy=strict/relaxed" Per-device RDM parameter: pci = [ 'sbdf, rdm_policy=strict/relaxed' ] Global RDM parameter, "strategy", allows user to speci

[Xen-devel] [v9][PATCH 05/16] hvmloader: get guest memory map into memory_map[]

2015-07-16 Thread Tiejun Chen
Now we get this map layout by call XENMEM_memory_map then save them into one global variable memory_map[]. It should include lowmem range, rdm range and highmem range. Note rdm range and highmem range may not exist in some cases. And here we need to check if any reserved memory conflicts with [RES

[Xen-devel] [v9][PATCH 02/16] xen/vtd: create RMRR mapping

2015-07-16 Thread Tiejun Chen
RMRR reserved regions must be setup in the pfn space with an identity mapping to reported mfn. However existing code has problem to setup correct mapping when VT-d shares EPT page table, so lead to problem when assigning devices (e.g GPU) with RMRR reported. So instead, this patch aims to setup ide

[Xen-devel] [v9][PATCH 13/16] libxl: construct e820 map with RDM information for HVM guest

2015-07-16 Thread Tiejun Chen
Here we'll construct a basic guest e820 table via XENMEM_set_memory_map. This table includes lowmem, highmem and RDMs if they exist, and hvmloader would need this info later. Note this guest e820 table would be same as before if the platform has no any RDM or we disable RDM (by default). CC: Ian

[Xen-devel] [v9][PATCH 15/16] xen/vtd: prevent from assign the device with shared rmrr

2015-07-16 Thread Tiejun Chen
Currently we're intending to cover this kind of devices with shared RMRR simply since the case of shared RMRR is a rare case according to our previous experiences. But late we can group these devices which shared rmrr, and then allow all devices within a group to be assigned to same domain. CC: Ya

[Xen-devel] [v9][PATCH 08/16] tools/libxc: Expose new hypercall xc_reserved_device_memory_map

2015-07-16 Thread Tiejun Chen
We will introduce the hypercall xc_reserved_device_memory_map approach to libxc. This helps us get rdm entry info according to different parameters. If flag == PCI_DEV_RDM_ALL, all entries should be exposed. Or we just expose that rdm entry specific to a SBDF. CC: Ian Jackson CC: Stefano Stabelli

[Xen-devel] [v9][PATCH 16/16] tools: parse to enable new rdm policy parameters

2015-07-16 Thread Tiejun Chen
This patch parses to enable user configurable parameters to specify RDM resource and according policies which are defined previously, Global RDM parameter: rdm = "strategy=host,policy=strict/relaxed" Per-device RDM parameter: pci = [ 'sbdf, rdm_policy=strict/relaxed' ] Default per-device

[Xen-devel] [v9][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM

2015-07-16 Thread Tiejun Chen
While building a VM, HVM domain builder provides struct hvm_info_table{} to help hvmloader. Currently it includes two fields to construct guest e820 table by hvmloader, low_mem_pgend and high_mem_pgend. So we should check them to fix any conflict with RDM. RMRR can reside in address space beyond 4

[Xen-devel] [v9][PATCH 14/16] xen/vtd: enable USB device assignment

2015-07-16 Thread Tiejun Chen
USB RMRR may conflict with guest BIOS region. In such case, identity mapping setup is simply skipped in previous implementation. Now we can handle this scenario cleanly with new policy mechanism so previous hack code can be removed now. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Tiejun Chen A

[Xen-devel] [v9][PATCH 01/16] xen: introduce XENMEM_reserved_device_memory_map

2015-07-16 Thread Tiejun Chen
From: Jan Beulich This is a prerequisite for punching holes into HVM and PVH guests' P2M to allow passing through devices that are associated with (on VT-d) RMRRs. CC: Jan Beulich CC: Yang Zhang CC: Kevin Tian Signed-off-by: Jan Beulich Signed-off-by: Tiejun Chen Acked-by: Kevin Tian --- v

Re: [Xen-devel] Request a freeze exception for COLO in v4.6

2015-07-16 Thread Dong, Eddie
> > There are currently 50 patches related to COLO pending reviews and acks > (25 pre + 25 COLO itself). Some pre patches are acked but there are still some > comments regarding implementation details in the pre patches and COLO itself > is > still lacking review. Further more, migration v2 is h

[Xen-devel] [linux-3.18 test] 59623: regressions - FAIL

2015-07-16 Thread osstest service owner
flight 59623 linux-3.18 real [real] http://logs.test-lab.xenproject.org/osstest/logs/59623/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-pvh-intel 11 guest-start fail REGR. vs. 58581 Tests which are failin

[Xen-devel] [linux-3.4 test] 59617: regressions - FAIL

2015-07-16 Thread osstest service owner
flight 59617 linux-3.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/59617/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-win7-amd64 6 xen-boot fail REGR. vs. 30511 Tests which are failing

[Xen-devel] [ovmf test] 59626: all pass - PUSHED

2015-07-16 Thread osstest service owner
flight 59626 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/59626/ Perfect :-) All tests in this flight passed version targeted for testing: ovmf 387e7c15f5e3a047de0a7a5edb5700e90a1c6c78 baseline version: ovmf 4c10f95344decc88816aaa705ace54d6e20

Re: [Xen-devel] [PATCH] tools/xl: Fix trim() following c/s e316316 "xl: Rewrite trim()"

2015-07-16 Thread Wei Liu
On Thu, Jul 16, 2015 at 10:53:02PM +0100, Andrew Cooper wrote: > On 16/07/2015 21:47, Wei Liu wrote: > > On Thu, Jul 16, 2015 at 08:18:31PM +0100, Andrew Cooper wrote: > >> c/s e316316 "xl: Rewrite trim()" uses the wrong indirection of > >> 'output', causing memory corruption for all callers. > >>

Re: [Xen-devel] [PATCH] tools/xl: Fix trim() following c/s e316316 "xl: Rewrite trim()"

2015-07-16 Thread Andrew Cooper
On 16/07/2015 21:47, Wei Liu wrote: > On Thu, Jul 16, 2015 at 08:18:31PM +0100, Andrew Cooper wrote: >> c/s e316316 "xl: Rewrite trim()" uses the wrong indirection of >> 'output', causing memory corruption for all callers. >> >> Introduce a new local variable, making the code more obviously >> corr

[Xen-devel] [PATCH v2 3/6] xen/x86/pvh: Properly set page tables for 32-bit PVH guests

2015-07-16 Thread Boris Ostrovsky
32-bit PVH guests don't want to write-protect/pin page tables. Signed-off-by: Boris Ostrovsky Reviewed-by: Konrad Rzeszutek Wilk --- arch/x86/xen/mmu.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index dd151

[Xen-devel] [PATCH v2 6/6] xen/x86/pvh: Allow building 32-bit PVH guests

2015-07-16 Thread Boris Ostrovsky
Signed-off-by: Boris Ostrovsky Reviewed-by: Konrad Rzeszutek Wilk --- arch/x86/xen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index e88fda8..891031e 100644 --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig @@ -48,5

[Xen-devel] [PATCH v2 1/6] xen/x86/pvh: Save %rbx in xen_pvh_early_cpu_init()

2015-07-16 Thread Boris Ostrovsky
x86-64 ABI requires that functions preserve %rbx. When xen_pvh_early_cpu_init() is executed on boot cpu it is invoked as a function and 'cpuid' instruction will clobber %rbx. (This is not a concern on secondary processors since there xen_pvh_early_cpu_init() is the entry point and thus does not nee

[Xen-devel] [PATCH v2 5/6] xen/x86/pvh: Add 32-bit PVH initialization code

2015-07-16 Thread Boris Ostrovsky
Signed-off-by: Boris Ostrovsky --- Changes in v2: * Some code reshuffling due to changes in patch 1. arch/x86/xen/enlighten.c | 4 arch/x86/xen/smp.c | 16 +--- arch/x86/xen/xen-head.S | 13 - 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/a

[Xen-devel] [PATCH v2 4/6] xen/x86/pvh: Set up descriptors for 32-bit PVH guests

2015-07-16 Thread Boris Ostrovsky
Signed-off-by: Boris Ostrovsky --- Changes in v2: * Set segment selectors using loadsegment() instead of assembly arch/x86/xen/enlighten.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index f8dc398..d665b

[Xen-devel] [PATCH v2 0/6] 32-bit PVH domU support

2015-07-16 Thread Boris Ostrovsky
A set of PVH-related patches. The first patch is x86-64 ABI fix for PVH guests. The second is a small update that removes redundant memset (both on PV and PVH code paths) The rest is to enable non-privileged 32-bit PVH guests. This requires hypervisor patches from http://lists.xenproject.org/arc

[Xen-devel] [PATCH v2 2/6] xen/x86: Remove unnecessary memset() call

2015-07-16 Thread Boris Ostrovsky
Since ctxt is kzalloc'd there is no need to call a memset for ctxt->fpu_ctxt. Signed-off-by: Boris Ostrovsky Reviewed-by: Konrad Rzeszutek Wilk --- arch/x86/xen/smp.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index e53be3b..33a4529 100644 --- a/a

[Xen-devel] [PATCH] xen: arm: Avoid reading beyond the last module

2015-07-16 Thread Chris (Christopher) Brand
nr_mods is set in add_boot_module() to the number of module array elements used. This function also ensures that nr_mods never exceeds MAX_MODULES (the size of the array). When looping through the array, the correct maximum index is "nr_mods-1", not "nr_mods". If the array is full, using the latter

[Xen-devel] pre-cursor email to incremental rev6 of altp2m patch series

2015-07-16 Thread Sahita, Ravi
Hi Wei and Maintainers, While we continue to work on the maintainer review comments - we prepared a minor incremental version v6 of our patch series that : 1. is rebased to staging 2. addresses a bug that we found/introduced in v5 The intent of creating this incremental version is to aid you i

Re: [Xen-devel] [v8][PATCH 06/16] hvmloader/pci: disable all pci devices conflicting with rdm

2015-07-16 Thread Chen, Tiejun
Jan and George, That implementation to this problem in v7 is really not accepted? Yes, that isn't a best solution to make our original mechanism very well, but in high level I just think that should be a correct solution fixing this problem. According to recent discussion seems we have not a e

Re: [Xen-devel] [v8][PATCH 06/16] hvmloader/pci: disable all pci devices conflicting with rdm

2015-07-16 Thread Chen, Tiejun
base = (resource->base + bar_sz - 1) & ~(uint64_t)(bar_sz - 1); + +/* If we're using mem_resource, check for RMRR conflicts */ +while ( resource == &mem_resource && +next_rmrr > 0 && +check_overlap(base, bar_sz, +

[Xen-devel] [PATCH 2/3] libxl: don't attempt to resume domain when suspend fails

2015-07-16 Thread Jim Fehlig
Failure of libxl_domain_suspend() does not leave the domain in a suspended state, so no need to call libxl_domain_resume(), which btw will fail with "domain not suspended". Signed-off-by: Jim Fehlig --- AFAICT, the xl migration code does not call libxl_domain_resume() when libxl_domain_suspend()

[Xen-devel] [PATCH 3/3] libxl: acquire a job when receiving a migrating domain

2015-07-16 Thread Jim Fehlig
Commit f86ae403 moved acquiring a job from libxlDomainStart() to its callers. One spot missed was in libxlDoMigrateReceive(). Acquire a job in libxlDoMigrateReceive() before calling libxlDomainStart(). Signed-off-by: Jim Fehlig --- src/libxl/libxl_migration.c | 20 +--- 1 file ch

[Xen-devel] [PATCH 1/3] libxl: fix ref counting of libxlMigrationDstArgs

2015-07-16 Thread Jim Fehlig
This patch fixes some flawed logic around ref counting the libxlMigrationDstArgs object. First, when adding sockets to the event loop with virNetSocketAddIOCallback(), the generic virObjectFreeCallback() was registered as a free function, with libxlMigrationDstArgs as its parameter. A reference wa

[Xen-devel] [PATCH 0/3] libxl: a few small migration fixes

2015-07-16 Thread Jim Fehlig
This series fixes a few issues found while testing migration with latest Xen and libvirt. See the individual patches for details. Jim Fehlig (3): libxl: fix ref counting of libxlMigrationDstArgs libxl: don't attempt to resume domain when suspend fails libxl: acquire a job when receiving a m

Re: [Xen-devel] [PATCH] tools/xl: Fix trim() following c/s e316316 "xl: Rewrite trim()"

2015-07-16 Thread Wei Liu
On Thu, Jul 16, 2015 at 08:18:31PM +0100, Andrew Cooper wrote: > c/s e316316 "xl: Rewrite trim()" uses the wrong indirection of > 'output', causing memory corruption for all callers. > > Introduce a new local variable, making the code more obviously > correct. > > Signed-off-by: Andrew Cooper >

Re: [Xen-devel] [PATCH] tools/xl: Fix segfaults from `xl psr-cat-cbm-set` command line handling

2015-07-16 Thread Wei Liu
On Thu, Jul 16, 2015 at 08:32:45PM +0100, Andrew Cooper wrote: > The socket option takes a mandatory argument. Mark it as such, so > optarg isn't NULL when passed to trim(), which unconditionally > dereference it. > > Range check optind against argc before blindly assuming that > argv[optind] and

[Xen-devel] [qemu-mainline test] 59616: regressions - FAIL

2015-07-16 Thread osstest service owner
flight 59616 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/59616/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ovmf-amd64 11 guest-saverestore fail REGR. vs. 59059 test-amd64-amd64-xl

[Xen-devel] [PATCH] xen: fix non-ANSI function declaration of function xen_has_pv_devices

2015-07-16 Thread Colin King
From: Colin Ian King xen_has_pv_devices has no parameters, so use the normal void parameter convention to make it match the prototype in the header file include/xen/platform_pci.h Signed-off-by: Colin Ian King --- arch/x86/xen/platform-pci-unplug.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[Xen-devel] [PATCH] xen: fix non-ANSI function declaration of function xen_has_pv_devices

2015-07-16 Thread Colin King
From: Colin Ian King xen_has_pv_devices has no parameters, so use the normal void parameter convention to make it match the prototype in the header file include/xen/platform_pci.h Signed-off-by: Colin Ian King --- arch/x86/xen/platform-pci-unplug.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[Xen-devel] [PATCH] tools/xl: Fix segfaults from `xl psr-cat-cbm-set` command line handling

2015-07-16 Thread Andrew Cooper
The socket option takes a mandatory argument. Mark it as such, so optarg isn't NULL when passed to trim(), which unconditionally dereference it. Range check optind against argc before blindly assuming that argv[optind] and argv[optind+1] exist. Signed-off-by: Andrew Cooper CC: Ian Campbell CC:

[Xen-devel] [PATCH] tools/xl: Fix trim() following c/s e316316 "xl: Rewrite trim()"

2015-07-16 Thread Andrew Cooper
c/s e316316 "xl: Rewrite trim()" uses the wrong indirection of 'output', causing memory corruption for all callers. Introduce a new local variable, making the code more obviously correct. Signed-off-by: Andrew Cooper CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- tools/libxl/xl_cmdimpl.c |

Re: [Xen-devel] [PATCH v9 11/11] (lib)xl: soft reset support

2015-07-16 Thread Konrad Rzeszutek Wilk
> diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 > index 3489b27..caed758 100644 > --- a/docs/man/xl.cfg.pod.5 > +++ b/docs/man/xl.cfg.pod.5 > @@ -346,6 +346,11 @@ destroy the domain. > write a "coredump" of the domain to F and then > restart the domain. > > +=item B > + > +reset al

Re: [Xen-devel] [PATCH v9 06/11] xen: Introduce XEN_DOMCTL_soft_reset

2015-07-16 Thread Konrad Rzeszutek Wilk
On Thu, Jul 16, 2015 at 06:27:21PM +0200, Vitaly Kuznetsov wrote: > New domctl resets state for a domain allowing it to 'start over': register > vcpu_info, switch to FIFO ABI for event channels. Still active grants are > being logged to help debugging misbehaving backends. > > Signed-off-by: Vital

Re: [Xen-devel] [PATCH v9 08/11] xen: arch-specific hooks for domain_soft_reset()

2015-07-16 Thread Konrad Rzeszutek Wilk
On Thu, Jul 16, 2015 at 06:27:23PM +0200, Vitaly Kuznetsov wrote: > x86-specific hook cleans up the pirq-emuirq mappings, destroys all ioreq > servers and and replaces the shared_info frame with an empty page to support > subsequent XENMAPSPACE_shared_info call. > > ARM-specific hook is -ENOSYS fo

Re: [Xen-devel] [PATCH v9 05/11] xen: grant_table: implement grant_table_warn_active_grants()

2015-07-16 Thread Konrad Rzeszutek Wilk
On Thu, Jul 16, 2015 at 06:27:20PM +0200, Vitaly Kuznetsov wrote: > Log first 10 active grants for a domain. This function is going to be used > for soft reset, active grants on this path usually mean misbehaving backends > refusing to release their mappings on shutdown. We need that in addition to

Re: [Xen-devel] [PATCH v9 04/11] xen: evtchn: make evtchn_reset() ready for soft reset

2015-07-16 Thread Konrad Rzeszutek Wilk
On Thu, Jul 16, 2015 at 06:27:19PM +0200, Vitaly Kuznetsov wrote: > We need to close all event channel so the domain performing soft reset > will be able to open them back. > > Signed-off-by: Vitaly Kuznetsov Reviewed-by: Konrad Rzeszutek Wilk > --- > Changes since v8: > - Check !d->controller_

Re: [Xen-devel] [PATCH v9 01/11] xen: introduce SHUTDOWN_soft_reset shutdown reason

2015-07-16 Thread Konrad Rzeszutek Wilk
On Thu, Jul 16, 2015 at 06:27:16PM +0200, Vitaly Kuznetsov wrote: > This special type of shutdown is supposed to be used by PVHVM guests when > they want to perform some sort of kexec/kdump. > > Signed-off-by: Vitaly Kuznetsov Reviewed-by: Konrad Rzeszutek Wilk > --- > Changes since v8: > - des

Re: [Xen-devel] [PATCH v2 09/20] xen/biomerge: Don't allow biovec to be merge when Linux is not using 4KB page

2015-07-16 Thread Konrad Rzeszutek Wilk
On Thu, Jul 16, 2015 at 05:15:41PM +0100, Julien Grall wrote: > Hi Stefano, > > On 16/07/2015 16:33, Stefano Stabellini wrote: > >On Fri, 10 Jul 2015, Konrad Rzeszutek Wilk wrote: > >>On Thu, Jul 09, 2015 at 09:42:21PM +0100, Julien Grall wrote: > >>>When Linux is using 64K page granularity, every

Re: [Xen-devel] Work-arounds in Xen code for Intel GFX?Re: Is: graphics corruption with 'xen: Support Xen pv-domains using PAT." Was:Re: [BUG] Characters on the screen are broken on Linux >= 3.19 with

2015-07-16 Thread Konrad Rzeszutek Wilk
On Thu, Jul 16, 2015 at 11:35:34PM +0800, Ting-Wei Lan wrote: > > > > > But Linux provides 'intel_iommu=igfx_off' to workaround the > > > > > problem. > > > > > Does Xen provide similar things? > > > > > > > > Not that I know of. The question is whether you really need VT-d, > > > > and > > > >

Re: [Xen-devel] [PATCH for-4.6 v2] tools/hotplug: Add an initscript to start "xl devd" in a driver domain

2015-07-16 Thread Wei Liu
On Thu, Jul 16, 2015 at 05:58:27PM +0100, Ian Campbell wrote: > The removal of the udev rules highlighted that although it has been > replaced by "xl devd" there isn't an initscript to replace it. > > To enable this add a --pidfile option to xl devd. > > Tested on Linux by running the script in d

[Xen-devel] [xen-unstable test] 59611: regressions - FAIL

2015-07-16 Thread osstest service owner
flight 59611 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/59611/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemut-stubdom-debianhvm-amd64-xsm 9 debian-hvm-install fail REGR. vs. 58965 tes

Re: [Xen-devel] [PATCH v2 19/20] xen/privcmd: Add support for Linux 64KB page granularity

2015-07-16 Thread Stefano Stabellini
On Thu, 16 Jul 2015, Stefano Stabellini wrote: > > + /* setup_hparams guarantees ret == 0 */ > > + BUG_ON(xen_apply_to_page(page, setup_hparams, info)); > > + > > + set_xen_guest_handle(xatp.idxs, info->h_idxs); > > + set_xen_guest_handle(xatp.gpfns, info->h_gpfns); > > + set_xen_guest_ha

Re: [Xen-devel] [PATCH v2 19/20] xen/privcmd: Add support for Linux 64KB page granularity

2015-07-16 Thread Stefano Stabellini
On Thu, 9 Jul 2015, Julien Grall wrote: > The hypercall interface (as well as the toolstack) is always using 4KB > page granularity. When the toolstack is asking for mapping a series of > guest PFN in a batch, it expects to have the page map contiguously in > its virtual memory. > > When Linux is

Re: [Xen-devel] [PATCH for-4.6 v2] tools/hotplug: Add an initscript to start "xl devd" in a driver domain

2015-07-16 Thread Ian Jackson
Ian Campbell writes ("[PATCH for-4.6 v2] tools/hotplug: Add an initscript to start "xl devd" in a driver domain"): > The removal of the udev rules highlighted that although it has been > replaced by "xl devd" there isn't an initscript to replace it. Acked-by: Ian Jackson ___

[Xen-devel] [PATCH] build: use correct qemu path in systemd service file and init script

2015-07-16 Thread Ting-Wei Lan
When --with-system-qemu is used, it is possible that we cannot find qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons init script and xen-qemu-dom0-disk-backend.service systemd service. Signed-off-by: Ting-Wei Lan --- tools/configure

Re: [Xen-devel] PV-vNUMA issue: topology is misinterpreted by the guest

2015-07-16 Thread Boris Ostrovsky
On 07/16/2015 12:39 PM, Andrew Cooper wrote: On 16/07/15 17:29, Jan Beulich wrote: On 16.07.15 at 17:50, wrote: Can't we set leaf 1's EBX[32:16] to 1? (I obviously fat-fingered this --- I meant EBX[23:16]) I don't think we should partially overwrite the relevant parts of CPUID output - eit

[Xen-devel] [PATCH for-4.6 v2] tools/hotplug: Add an initscript to start "xl devd" in a driver domain

2015-07-16 Thread Ian Campbell
The removal of the udev rules highlighted that although it has been replaced by "xl devd" there isn't an initscript to replace it. To enable this add a --pidfile option to xl devd. Tested on Linux by running the script in dom0 and checking the daemon was started/stopped, but not in an actual driv

Re: [Xen-devel] [PATCH OSSTEST v2 5/5] ms-flights-summary: Produce an HTML report of all active flights

2015-07-16 Thread Ian Campbell
On Tue, 2015-07-14 at 14:58 +0100, Ian Campbell wrote: > This could surely use better Perl and produce better output, however > I'm sending it now because it would be useful for further development > if some or all of the preceding patches could go into production and > this serves as an example of

Re: [Xen-devel] [PATCH v2 1/3] arm64: Add Xen boot support file

2015-07-16 Thread Ian Campbell
On Wed, 2015-07-15 at 18:18 +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > On 13.07.2015 10:53, fu@linaro.org wrote: > > From: Fu Wei > > > > This patch adds Xen boot support file: > > grub-core/loader/arm64/xen_boot.c > > include/grub/arm64/xen_boot.h > > > > This patch also adds com

Re: [Xen-devel] [v8][PATCH 06/16] hvmloader/pci: disable all pci devices conflicting with rdm

2015-07-16 Thread George Dunlap
On 07/16/2015 05:08 PM, Chen, Tiejun wrote: > On 2015/7/16 23:39, George Dunlap wrote: >> On 07/16/2015 04:20 PM, Chen, Tiejun wrote: > What about this? Looks reasonable (but don't forget that I continue to be unconvinced that the patch as a whole makes sense). >>> >>> Yes, I alw

Re: [Xen-devel] [PATCH v4 --for 4.6 COLOPre 13/25] migration/save: pass checkpointed_stream from libxl to libxc

2015-07-16 Thread Wei Liu
On Fri, Jul 17, 2015 at 12:21:11AM +0800, Yang Hongyang wrote: [...] > >>>Do (or will) specific non-zero values have any meaning to the libxc > >>>layer? i.e. does it have any knowledge of COLO vs. Remus as the libxl > >>>enum added in the last patch does? > >> > >>Yes, libxc side should be aware o

Re: [Xen-devel] PV-vNUMA issue: topology is misinterpreted by the guest

2015-07-16 Thread Andrew Cooper
On 16/07/15 17:29, Jan Beulich wrote: On 16.07.15 at 17:50, wrote: >> Can't we set leaf 1's EBX[32:16] to 1? > I don't think we should partially overwrite the relevant parts of > CPUID output - either all or nothing (so that things at least > remain consistent). Also, there are no masking/ov

Re: [Xen-devel] [PATCH v4 --for 4.6 COLOPre 13/25] migration/save: pass checkpointed_stream from libxl to libxc

2015-07-16 Thread Wei Liu
On Fri, Jul 17, 2015 at 12:24:11AM +0800, Yang Hongyang wrote: > > > On 07/17/2015 12:10 AM, Wei Liu wrote: > >On Wed, Jul 15, 2015 at 03:45:39PM +0800, Yang Hongyang wrote: > >>Pass checkpointed_stream from libxl to libxc. > >>It won't affact legacy migration because legacy migration > >>won't u

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-16 Thread Ian Campbell
On Thu, 2015-07-16 at 17:27 +0100, Marc Zyngier wrote: > On 16/07/15 17:18, Ian Campbell wrote: > > On Thu, 2015-07-16 at 16:21 +0100, Marc Zyngier wrote: > >> Hope this helps, > > > > It, plus the chat we had on IRC did, yes, thanks. > > > > In summary: > > > > I was very confusedly talking abo

Re: [Xen-devel] [v8][PATCH 06/16] hvmloader/pci: disable all pci devices conflicting with rdm

2015-07-16 Thread George Dunlap
On Thu, Jul 16, 2015 at 5:18 PM, George Dunlap wrote: > On Thu, Jul 16, 2015 at 4:39 PM, George Dunlap > wrote: >> On 07/16/2015 04:20 PM, Chen, Tiejun wrote: > What about this? Looks reasonable (but don't forget that I continue to be unconvinced that the patch as a whole make

Re: [Xen-devel] [PATCH] build: use correct qemu path in systemd service file and init script

2015-07-16 Thread Andrew Cooper
On 16/07/15 17:15, Ting-Wei Lan wrote: > When --with-system-qemu is used, it is possible that we cannot find > qemu-system-i386 in LIBEXEC_BIN, which can cause error in xencommons > init script and xen-qemu-dom0-disk-backend.service systemd service. > --- Thanks for this patch - it looks to be a g

Re: [Xen-devel] [PATCH OSSTEST] mg-list-all-branches: Sort branches according to any embedded version

2015-07-16 Thread Ian Jackson
Ian Campbell writes ("Re: [PATCH OSSTEST] mg-list-all-branches: Sort branches according to any embedded version"): > On Thu, 2015-07-16 at 17:17 +0100, Ian Jackson wrote: > > I > > have installed the perl module on the Xen Project colo and Citrix > > Cambridge instances. > > Thanks, I nearly fo

Re: [Xen-devel] PV-vNUMA issue: topology is misinterpreted by the guest

2015-07-16 Thread Jan Beulich
>>> On 16.07.15 at 17:50, wrote: > Can't we set leaf 1's EBX[32:16] to 1? I don't think we should partially overwrite the relevant parts of CPUID output - either all or nothing (so that things at least remain consistent). Jan ___ Xen-devel mailing li

[Xen-devel] [PATCH v9 11/11] (lib)xl: soft reset support

2015-07-16 Thread Vitaly Kuznetsov
Use existing create/restore path to perform 'soft reset' for HVM domains. Tear everything down, e.g. destroy domain's device model, remove the domain from xenstore, save toolstack record and start over. Signed-off-by: Vitaly Kuznetsov --- Changes since v8: - Pause/unpase the domain when doing xc_

Re: [Xen-devel] [PATCH v4 --for 4.6 COLOPre 11/25] tools/libxc: support to resume uncooperative HVM guests

2015-07-16 Thread Ian Jackson
Yang Hongyang writes ("Re: [Xen-devel] [PATCH v4 --for 4.6 COLOPre 11/25] tools/libxc: support to resume uncooperative HVM guests"): > On 07/16/2015 11:40 PM, Ian Jackson wrote: > >what this patch is doing > > > > That is, what the change in behaviour is. This includes clearly > > d

Re: [Xen-devel] [PATCH v4 --for 4.6 COLOPre 16/25] tools/libxl: Update libxl_domain_unpause() to support qemu-xen

2015-07-16 Thread Wei Liu
On Wed, Jul 15, 2015 at 03:45:42PM +0800, Yang Hongyang wrote: > Currently, libxl__domain_unpause() only supports > qemu-xen-traditional. Update it to support qemu-xen. > We use libxl__domain_resume_device_model to unpause guest dm. > > Signed-off-by: Yang Hongyang > CC: Ian Campbell > CC: Ian J

[Xen-devel] [PATCH v9 10/11] libxc: add XC_DEVICE_MODEL_SAVE_FILE

2015-07-16 Thread Vitaly Kuznetsov
Use this in libxl_dm instead of hard-coding. Signed-off-by: Vitaly Kuznetsov Acked-by: Ian Campbell --- Changes since v8: - None --- tools/libxc/include/xenguest.h | 2 ++ tools/libxl/libxl_dm.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/libxc/include/xe

[Xen-devel] [PATCH v9 08/11] xen: arch-specific hooks for domain_soft_reset()

2015-07-16 Thread Vitaly Kuznetsov
x86-specific hook cleans up the pirq-emuirq mappings, destroys all ioreq servers and and replaces the shared_info frame with an empty page to support subsequent XENMAPSPACE_shared_info call. ARM-specific hook is -ENOSYS for now. Signed-off-by: Vitaly Kuznetsov --- Changes since v8: - Comments fi

[Xen-devel] [PATCH v9 06/11] xen: Introduce XEN_DOMCTL_soft_reset

2015-07-16 Thread Vitaly Kuznetsov
New domctl resets state for a domain allowing it to 'start over': register vcpu_info, switch to FIFO ABI for event channels. Still active grants are being logged to help debugging misbehaving backends. Signed-off-by: Vitaly Kuznetsov --- Changes since v8: - Introduce vcpu_info_reset() helper. [Ko

[Xen-devel] [PATCH v9 01/11] xen: introduce SHUTDOWN_soft_reset shutdown reason

2015-07-16 Thread Vitaly Kuznetsov
This special type of shutdown is supposed to be used by PVHVM guests when they want to perform some sort of kexec/kdump. Signed-off-by: Vitaly Kuznetsov --- Changes since v8: - describe the expected behavior for 'soft reset' [Ian Jackson] --- xen/common/shutdown.c | 6 ++ xen/include/p

[Xen-devel] [PATCH v9 09/11] libxc: support XEN_DOMCTL_soft_reset operation

2015-07-16 Thread Vitaly Kuznetsov
Introduce xc_domain_soft_reset() function supporting XEN_DOMCTL_soft_reset. Signed-off-by: Vitaly Kuznetsov Acked-by: Wei Liu Reviewed-by: Konrad Rzeszutek Wilk Acked-by: Ian Jackson --- Changes since v8: - Add Wei's A-b. - Add Konrad's R-b. - Add Ian J A-b. --- tools/libxc/include/xenctrl.h

  1   2   3   4   >