[Xen-devel] tools: any user of xc_dom_image->allocate?

2015-09-11 Thread Juergen Gross
While testing xen tools patches to start a pv-domU >512GB I stumbled over a problem in the domain builder: it is keeping track of the last allocated virtual address in the memory image it is creating. For very huge domains (>1TB) this virtual address will wrap around as it is starting at -2GB and

Re: [Xen-devel] [OSSTest Nested v12 01/21] Optimize and re-format previous code of 'submenu' parsing

2015-09-11 Thread Ian Campbell
On Thu, 2015-09-10 at 17:16 +0100, Ian Jackson wrote: > Robert Ho writes ("[OSSTest Nested v12 01/21] Optimize and re-format > previous code of 'submenu' parsing"): > > * space between ')' and '{'; and after '=' > > * omit unnecessary 'define' and '!defined' usage > > * break long '{}' into several

[Xen-devel] [xen-4.4-testing test] 61695: regressions - FAIL

2015-09-11 Thread osstest service owner
flight 61695 xen-4.4-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/61695/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qcow2 9 debian-di-install fail REGR. vs. 60727 test-amd64-i386-x

Re: [Xen-devel] xl: libxl_domain_info: getting domain info list: Bad address

2015-09-11 Thread Riku Voipio
Hi, On 10 September 2015 at 20:07, Julien Grall wrote: > Hi, > > Riku reported me an error on their CI loop while run Xen on the Arndale: > > Starting /usr/sbin/xenstored... > Setting domain 0 name, domid and JSON config... > libxl: error: libxl.c:675:libxl_domain_info: getting domain info list:

[Xen-devel] [PATCH v7 04/17] vt-d: VT-d Posted-Interrupts feature detection

2015-09-11 Thread Feng Wu
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM intervention when guest is running in non-root mode. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Fe

[Xen-devel] [PATCH v7 01/17] VT-d Posted-intterrupt (PI) design

2015-09-11 Thread Feng Wu
Add the design doc for VT-d PI. CC: Kevin Tian CC: Yang Zhang CC: Jan Beulich CC: Keir Fraser CC: Andrew Cooper CC: George Dunlap Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk --- docs/misc/vtd-pi.txt | 332 +

[Xen-devel] [PATCH v7 00/17] Add VT-d Posted-Interrupts support

2015-09-11 Thread Feng Wu
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM intervention when guest is running in non-root mode. You can find the VT-d Posted-Interrtups Spec. in

[Xen-devel] [PATCH v7 02/17] Add cmpxchg16b support for x86-64

2015-09-11 Thread Feng Wu
This patch adds cmpxchg16b support for x86-64, so software can perform 128-bit atomic write/read. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu --- v7: - Make the last two parameters of __cmpxchg16b() const - Remove memory clobber - Add run-time and build-build check

[Xen-devel] [PATCH v7 09/17] VT-d: Remove pointless casts

2015-09-11 Thread Feng Wu
Remove pointless casts. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Feng Wu Reviewed-by: Konrad Rzeszutek Wilk --- v7: - Remove an 'u32' casting omitted in v5 v5: - Newly added. xen/drivers/passthrough/vtd/utils.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff

[Xen-devel] [PATCH v7 08/17] vmx: Suppress posting interrupts when 'SN' is set

2015-09-11 Thread Feng Wu
Currently, we don't support urgent interrupt, all interrupts are recognized as non-urgent interrupt, so we cannot send posted-interrupt when 'SN' is set. CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Reviewed-by: Konrad Rzeszutek Wilk --- v7: - Codin

[Xen-devel] [PATCH v7 05/17] vmx: Extend struct pi_desc to support VT-d Posted-Interrupts

2015-09-11 Thread Feng Wu
Extend struct pi_desc according to VT-d Posted-Interrupts Spec. CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Reviewed-by: Andrew Cooper Acked-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk --- v7: - Coding style. v3: - Use u32 instead of u64 f

[Xen-devel] [PATCH v7 06/17] vmx: Add some helper functions for Posted-Interrupts

2015-09-11 Thread Feng Wu
This patch adds some helper functions to manipulate the Posted-Interrupts Descriptor. CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Reviewed-by: Konrad Rzeszutek Wilk --- v7: - Use bitfield in pi_test_on() and pi_test_sn() v4: - Newly added xen/in

[Xen-devel] [PATCH v7 11/17] vt-d: Add API to update IRTE when VT-d PI is used

2015-09-11 Thread Feng Wu
This patch adds an API which is used to update the IRTE for posted-interrupt when guest changes MSI/MSI-X information. CC: Yang Zhang CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu --- v7: - Remove __uint128_t cast - Remove Kevin's Ack due to a bug fi

[Xen-devel] [PATCH v7 07/17] vmx: Initialize VT-d Posted-Interrupts Descriptor

2015-09-11 Thread Feng Wu
This patch initializes the VT-d Posted-interrupt Descriptor. CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu Acked-by: Kevin Tian Reviewed-by: Konrad Rzeszutek Wilk --- v7: - Add comments to function 'pi_desc_init' to clarify why we update the poste

[Xen-devel] [PATCH v7 10/17] vt-d: Extend struct iremap_entry to support VT-d Posted-Interrupts

2015-09-11 Thread Feng Wu
Extend struct iremap_entry according to VT-d Posted-Interrupts Spec. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Feng Wu Acked-by: Kevin Tian --- v7: - Add a __uint128_t member to the union in struct iremap_entry v4: - res_4 is not a bitfiled, correct it. - Expose 'im' to remapped irte as we

[Xen-devel] [PATCH v7 15/17] vmx: VT-d posted-interrupt core logic handling

2015-09-11 Thread Feng Wu
This patch includes the following aspects: - Handling logic when vCPU is blocked: * Add a global vector to wake up the blocked vCPU when an interrupt is being posted to it (This part was sugguested by Yang Zhang ). * Define two per-cpu variables: 1. pi_blocked_vcpu:

[Xen-devel] [PATCH v7 14/17] vmx: Properly handle notification event when vCPU is running

2015-09-11 Thread Feng Wu
When a vCPU is running in Root mode and a notification event has been injected to it. we need to set VCPU_KICK_SOFTIRQ for the current cpu, so the pending interrupt in PIRR will be synced to vIRR before VM-Exit in time. CC: Kevin Tian CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-of

[Xen-devel] [PATCH v7 12/17] x86: move some APIC related macros to apicdef.h

2015-09-11 Thread Feng Wu
Move some APIC related macros to apicdef.h, so they can be used outside of vlapic.c. CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper Signed-off-by: Feng Wu --- v7: - Put the Macros to the right place inside the file. v6: - Newly introduced. xen/arch/x86/hvm/vlapic.c | 5 - xen/inc

Re: [Xen-devel] [OSSTest Nested v12 09/21] Wrapper and use core_dump_setup() for nested host and normal host to setup coredump sysctl

2015-09-11 Thread Ian Campbell
On Thu, 2015-09-10 at 18:23 +0100, Ian Jackson wrote: > Robert Ho writes ("[OSSTest Nested v12 09/21] Wrapper and use > core_dump_setup() for nested host and normal host to setup coredump > sysctl"): > > This patch does these 4 things: > > 1. wrapper coredump setup code from original ts-host-instal

[Xen-devel] [PATCH v7 13/17] Update IRTE according to guest interrupt config changes

2015-09-11 Thread Feng Wu
When guest changes its interrupt configuration (such as, vector, etc.) for direct-assigned devices, we need to update the associated IRTE with the new guest vector, so external interrupts from the assigned devices can be injected to guests without VM-Exit. For lowest-priority interrupts, we use ve

[Xen-devel] [PATCH v7 03/17] iommu: Add iommu_intpost to control VT-d Posted-Interrupts feature

2015-09-11 Thread Feng Wu
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt. With VT-d Posted-Interrupts enabled, external interrupts from direct-assigned devices can be delivered to guests without VMM intervention when guest is running in non-root mode. This patch adds variable 'iommu_intpost' to contr

[Xen-devel] [PATCH v7 16/17] VT-d: Dump the posted format IRTE

2015-09-11 Thread Feng Wu
Add the utility to dump the posted format IRTE. CC: Yang Zhang CC: Kevin Tian Signed-off-by: Feng Wu --- v7: - Remove the two stage loop v6: - Fix a typo v4: - Newly added xen/drivers/passthrough/vtd/utils.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(

[Xen-devel] [PATCH v7 17/17] Add a command line parameter for VT-d posted-interrupts

2015-09-11 Thread Feng Wu
Enable VT-d Posted-Interrupts and add a command line parameter for it. CC: Jan Beulich Signed-off-by: Feng Wu Reviewed-by: Kevin Tian Acked-by: Jan Beulich --- v6: - Change the default value to 'false' in xen-command-line.markdown docs/misc/xen-command-line.markdown | 9 - xen/driver

Re: [Xen-devel] [PATCH v3] x86/hvm: fix saved pmtimer value

2015-09-11 Thread Jan Beulich
>>> On 11.09.15 at 03:18, wrote: > Jan Beulich writes: >> From: Kouya Shimura >> >> The ACPI PM timer is sometimes broken on live migration. >> Since vcpu->arch.hvm_vcpu.guest_time is always zero in other than >> "delay for missed ticks mode". Even in "delay for missed ticks mode", >> vcpu's gue

Re: [Xen-devel] xl: libxl_domain_info: getting domain info list: Bad address

2015-09-11 Thread Ian Campbell
On Thu, 2015-09-10 at 18:07 +0100, Julien Grall wrote: > Hi, > > Riku reported me an error on their CI loop while run Xen on the Arndale: > > Starting /usr/sbin/xenstored... > Setting domain 0 name, domid and JSON config... > libxl: error: libxl.c:675:libxl_domain_info: getting domain info list:

Re: [Xen-devel] [v2][PATCH] xen/vtd/iommu: permit group devices to passthrough in relaxed mode

2015-09-11 Thread Jan Beulich
>>> On 11.09.15 at 01:22, wrote: > Sorry it's a bad example. My actual concern is that we can't count > on this per-VM relax/strict policy to prevent group devices assigned > to different VM. In that case it's definitely a security hole since > one VM may clobber shared RMRR to impact another VM.

Re: [Xen-devel] [libvirt] [PATCH LIBVIRT] libxl: don't end job for ephemeal domain on start failure

2015-09-11 Thread Michal Privoznik
On 10.09.2015 17:45, Ian Campbell wrote: > commit 4b53d0d4ac9c "libxl: don't remove persistent domain on start > failure" cleans up the vm object and sets it to NULL if the vm is not > persistent, however at end job vm (now NULL) is dereferenced via the call to > libxlDomainObjEndJob. Avoid this by

Re: [Xen-devel] [PATCH] xen/domctl: lower loglevel of XEN_DOMCTL_memory_mapping

2015-09-11 Thread Jan Beulich
>>> On 11.09.15 at 02:59, wrote: > If you want a formula I would do: > > #define MAX_SOCKETS 8 > > max_pfns = pow(2,(MAX_SOCKETS - (max(nr_iommus(), MAX_SOCKETS * 64; > > Where nr_iommus would have to be somehow implemented, ditto for pow. > > This should give you: > 8-> 64 > 7-

Re: [Xen-devel] xl: libxl_domain_info: getting domain info list: Bad address

2015-09-11 Thread Julien Grall
Hi Ian, On 11/09/2015 09:52, Ian Campbell wrote: On Thu, 2015-09-10 at 18:07 +0100, Julien Grall wrote: Hi, Riku reported me an error on their CI loop while run Xen on the Arndale: Starting /usr/sbin/xenstored... Setting domain 0 name, domid and JSON config... libxl: error: libxl.c:675:libxl_

Re: [Xen-devel] xl: libxl_domain_info: getting domain info list: Bad address

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-11 at 10:26 +0100, Julien Grall wrote: > Hi Ian, > > On 11/09/2015 09:52, Ian Campbell wrote: > > On Thu, 2015-09-10 at 18:07 +0100, Julien Grall wrote: > > > Hi, > > > > > > Riku reported me an error on their CI loop while run Xen on the > > > Arndale: > > > > > > Starting /usr/

Re: [Xen-devel] xl: libxl_domain_info: getting domain info list: Bad address

2015-09-11 Thread Julien Grall
On 11/09/2015 08:55, Riku Voipio wrote: It looks like the errors started Sep 4th, while Sep 3rd was still OK. The Xen binary was same for both test runs, only the kernel (which follows mainline) was changed. Failing kernel was 807249d3ada1ff28a47c4054ca4edd479421b671 While last succeeding was 1e

Re: [Xen-devel] xhci_hcd intterrupt affinity in Dom0/DomU limited to single interrupt

2015-09-11 Thread Jan Beulich
>>> On 10.09.15 at 18:20, wrote: > On Wed, 2015-09-09 at 00:48 -0600, Jan Beulich wrote: >> >>> On 08.09.15 at 18:02, wrote: >> > I believe the driver does support use of multiple interrupts based on >> > the previous explanation of the lspci output where it was established >> > that the device c

[Xen-devel] [PATCH OSSTEST] cri-common: Refactor select_prevxenbranch to cri-getprevxenbranch

2015-09-11 Thread Ian Campbell
This moves it outside any prevailing set -x and reduces the amount of noise in various logs. Signed-off-by: Ian Campbell --- cri-common | 16 +--- cri-getprevxenbranch | 19 +++ 2 files changed, 20 insertions(+), 15 deletions(-) create mode 100755 cri-getpr

[Xen-devel] [PATCH OSSTEST] ts-xen-build: Do not set QEMU_REMOTE unless $r{tree_qemu} is set

2015-09-11 Thread Ian Campbell
4.4 and earlier do not check if QEMU_REMOTE is empty before using it. >From 4.5 onwards if QEMU_REMOTE is empty then default is used. This should fix the build-*-prev job for 4.5 and earlier. In this job we deliberately don't specify tree_qemu since we want whatever that branch gives us. Signed-o

Re: [Xen-devel] [PATCH] xen/domctl: lower loglevel of XEN_DOMCTL_memory_mapping

2015-09-11 Thread Malcolm Crossley
On 11/09/15 10:17, Jan Beulich wrote: On 11.09.15 at 02:59, wrote: >> If you want a formula I would do: >> >> #define MAX_SOCKETS 8 >> >> max_pfns = pow(2,(MAX_SOCKETS - (max(nr_iommus(), MAX_SOCKETS * 64; >> >> Where nr_iommus would have to be somehow implemented, ditto for pow. >> >> T

[Xen-devel] [PATCH for-4.6] libxl: clear O_NONBLOCK|O_NDELAY on migration fd and reinstate afterwards

2015-09-11 Thread Ian Campbell
The fd passed to us by libvirt for both save and restore has at least O_NONBLOCK set, which libxl does not expect and therefore fails to handle any EAGAIN which might arise. This has been observed with migration v2, but if v1 used to work I think that would be just be by luck and/or coincidence.

Re: [Xen-devel] [PATCH for-4.6] libxl: clear O_NONBLOCK|O_NDELAY on migration fd and reinstate afterwards

2015-09-11 Thread Ian Jackson
Ian Campbell writes ("[PATCH for-4.6] libxl: clear O_NONBLOCK|O_NDELAY on migration fd and reinstate afterwards"): > The fd passed to us by libvirt for both save and restore has at least > O_NONBLOCK set, which libxl does not expect and therefore fails to > handle any EAGAIN which might arise. Ac

Re: [Xen-devel] [PATCH for 4.6 v3 2/3] xl/libxl: disallow saving a guest with vNUMA configured

2015-09-11 Thread Ian Campbell
On Thu, 2015-09-10 at 18:05 +0100, Wei Liu wrote: > On Thu, Sep 10, 2015 at 05:53:35PM +0100, Ian Campbell wrote: > > On Thu, 2015-09-10 at 17:15 +0100, Wei Liu wrote: > > > On Thu, Sep 10, 2015 at 05:10:57PM +0100, Ian Campbell wrote: > > > > On Thu, 2015-09-10 at 15:50 +0100, Wei Liu wrote: > > >

Re: [Xen-devel] [PATCH v3 07/10] xl: correct handling of extra_config in main_cpupoolcreate

2015-09-11 Thread Ian Jackson
Wei Liu writes ("[PATCH v3 07/10] xl: correct handling of extra_config in main_cpupoolcreate"): > Don't dereference extra_config if it's NULL. Don't leak extra_config in > the end. I have cherry picked onto all stable trees (back to 4.2). 4.3 and earlier were also missing 8d394a43 aka 7737ecb2 "

Re: [Xen-devel] [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters

2015-09-11 Thread Ian Campbell
On Thu, 2015-09-10 at 17:10 +0100, Stefano Stabellini wrote: > > C) When you could go: > > > >DT -> Discover Xen -> Xen-specific stuff -> Xen-specific EFI/ACPI > > discovery > > I take you mean discovering Xen with the usual Xen hypervisor node on > device tree. There may be other options,

Re: [Xen-devel] [PATCH] xen/domctl: lower loglevel of XEN_DOMCTL_memory_mapping

2015-09-11 Thread Jan Beulich
>>> On 11.09.15 at 12:28, wrote: > On 11/09/15 10:17, Jan Beulich wrote: > On 11.09.15 at 02:59, wrote: >>> If you want a formula I would do: >>> >>> #define MAX_SOCKETS 8 >>> >>> max_pfns = pow(2,(MAX_SOCKETS - (max(nr_iommus(), MAX_SOCKETS * 64; >>> >>> Where nr_iommus would have to be

[Xen-devel] [distros-debian-sid test] 37922: regressions - FAIL

2015-09-11 Thread Platform Team regression test user
flight 37922 distros-debian-sid real [real] http://osstest.xs.citrite.net/~osstest/testlogs/logs/37922/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-i386-sid-netboot-pygrub 9 debian-di-install fail REGR. vs. 37873 test-a

Re: [Xen-devel] OVMF/Xen, Debian wheezy can't boot with NX on stack (Was: Re: [edk2] [PATCH] OvmfPkg: prevent code execution from DXE stack)

2015-09-11 Thread Laszlo Ersek
On 09/09/15 12:48, Laszlo Ersek wrote: > On 09/09/15 11:37, Ian Campbell wrote: >> On Wed, 2015-09-09 at 01:06 -0600, Jan Beulich wrote: >> On 09.09.15 at 00:23, wrote: On 09/08/15 19:26, Anthony PERARD wrote: > And I get this on the console: > Welcome to GRUB! > > X6

Re: [Xen-devel] [PATCH] xen/domctl: lower loglevel of XEN_DOMCTL_memory_mapping

2015-09-11 Thread Malcolm Crossley
On 11/09/15 12:11, Jan Beulich wrote: On 11.09.15 at 12:28, wrote: >> On 11/09/15 10:17, Jan Beulich wrote: >> On 11.09.15 at 02:59, wrote: If you want a formula I would do: #define MAX_SOCKETS 8 max_pfns = pow(2,(MAX_SOCKETS - (max(nr_iommus(), MAX_SOCKETS

[Xen-devel] [PATCH 5/5] libxc: create p2m list outside of kernel mapping if supported

2015-09-11 Thread Juergen Gross
In case the kernel of a new pv-domU indicates it is supporting a p2m list outside the initial kernel mapping by specifying INIT_P2M, let the domain builder allocate the memory for the p2m list from physical guest memory only and map it to the address the kernel is expecting. This will enable loadi

[Xen-devel] [PATCH 4/5] libxc: split p2m allocation in domain builder from other magic pages

2015-09-11 Thread Juergen Gross
Add an own function to allocate the p2m list in the domain builder in order to prepare allocating the p2m list outside of the initial kernel mapping. This will be needed to support loading domains with huge memory (>512 GB). Signed-off-by: Juergen Gross --- tools/libxc/include/xc_dom.h | 1 + t

[Xen-devel] [PATCH 3/5] libxc: create unmapped initrd in domain builder if supported

2015-09-11 Thread Juergen Gross
In case the kernel of a new pv-domU indicates it is supporting an unmapped initrd, don't waste precious virtual space for the initrd, but allocate only guest physical memory for it. Signed-off-by: Juergen Gross --- tools/libxc/xc_dom_core.c | 24 ++-- 1 file changed, 22 inser

[Xen-devel] [PATCH 2/5] libxc: do initrd processing of domain builder in own function

2015-09-11 Thread Juergen Gross
Factor out the initrd processing in xc_dom_build_image() into an own function to prepare starting a domain with unmapped initrd. Signed-off-by: Juergen Gross --- tools/libxc/xc_dom_core.c | 77 ++- 1 file changed, 43 insertions(+), 34 deletions(-) dif

[Xen-devel] [PATCH 0/5] libxc: support building large pv-domains

2015-09-11 Thread Juergen Gross
The Xen hypervisor supports starting a dom0 with large memory (up to the TB range) by not including the initrd and p2m list in the initial kernel mapping. Especially the p2m list can grow larger than the available virtual space in the initial mapping. The started kernel is indicating the support o

[Xen-devel] [PATCH 1/5] libxc: remove allocate member from struct xc_dom_image

2015-09-11 Thread Juergen Gross
The allocate() callback in struct xc_dom_image is never set. Remove it. Signed-off-by: Juergen Gross --- tools/libxc/include/xc_dom.h | 2 -- tools/libxc/xc_dom_core.c| 4 2 files changed, 6 deletions(-) diff --git a/tools/libxc/include/xc_dom.h b/tools/libxc/include/xc_dom.h index 600

Re: [Xen-devel] [PATCH 1/5] libxc: remove allocate member from struct xc_dom_image

2015-09-11 Thread Ian Jackson
Juergen Gross writes ("[PATCH 1/5] libxc: remove allocate member from struct xc_dom_image"): > The allocate() callback in struct xc_dom_image is never set. Remove it. Acked-by: Ian Jackson ___ Xen-devel mailing list Xen-devel@lists.xen.org http://list

Re: [Xen-devel] [PATCH 2/5] libxc: do initrd processing of domain builder in own function

2015-09-11 Thread Ian Jackson
Juergen Gross writes ("[PATCH 2/5] libxc: do initrd processing of domain builder in own function"): > Factor out the initrd processing in xc_dom_build_image() into an own > function to prepare starting a domain with unmapped initrd. I haven't checked that this is just code motion and the obvious

Re: [Xen-devel] [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters

2015-09-11 Thread Daniel Kiper
On Thu, Sep 10, 2015 at 05:23:02PM +0100, Mark Rutland wrote: > > > C) When you could go: > > > > > >DT -> Discover Xen -> Xen-specific stuff -> Xen-specific EFI/ACPI > > > discovery > > > > I take you mean discovering Xen with the usual Xen hypervisor node on > > device tree. I think that C)

Re: [Xen-devel] [PATCH 3/5] libxc: create unmapped initrd in domain builder if supported

2015-09-11 Thread Ian Jackson
Juergen Gross writes ("[PATCH 3/5] libxc: create unmapped initrd in domain builder if supported"): > In case the kernel of a new pv-domU indicates it is supporting an > unmapped initrd, don't waste precious virtual space for the initrd, > but allocate only guest physical memory for it. ... The na

Re: [Xen-devel] [PATCH for-4.6] libxl: clear O_NONBLOCK|O_NDELAY on migration fd and reinstate afterwards

2015-09-11 Thread Wei Liu
On Fri, Sep 11, 2015 at 11:50:14AM +0100, Ian Jackson wrote: > Ian Campbell writes ("[PATCH for-4.6] libxl: clear O_NONBLOCK|O_NDELAY on > migration fd and reinstate afterwards"): > > The fd passed to us by libvirt for both save and restore has at least > > O_NONBLOCK set, which libxl does not exp

Re: [Xen-devel] [PATCH v6 00/29] Introduce HVM without dm and new boot ABI

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-04 at 14:08 +0200, Roger Pau Monne wrote: > This series is split in the following order: > > - Patches from 1 to 10 switch HVM domain contruction to use the xc_dom_* >family of functions, like they are used to build PV domains. This batch >of patches can go in regardless o

Re: [Xen-devel] [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters

2015-09-11 Thread Stefano Stabellini
On Fri, 11 Sep 2015, Daniel Kiper wrote: > On Thu, Sep 10, 2015 at 05:23:02PM +0100, Mark Rutland wrote: > > > > C) When you could go: > > > > > > > >DT -> Discover Xen -> Xen-specific stuff -> Xen-specific EFI/ACPI > > > > discovery > > > > > > I take you mean discovering Xen with the usual X

Re: [Xen-devel] [PATCH 3/5] libxc: create unmapped initrd in domain builder if supported

2015-09-11 Thread Julien Grall
On 11/09/15 13:54, Ian Jackson wrote: > Juergen Gross writes ("[PATCH 3/5] libxc: create unmapped initrd in domain > builder if supported"): >> In case the kernel of a new pv-domU indicates it is supporting an >> unmapped initrd, don't waste precious virtual space for the initrd, >> but allocate o

Re: [Xen-devel] [PATCH for 4.6 v3 2/3] xl/libxl: disallow saving a guest with vNUMA configured

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-11 at 11:50 +0100, Ian Campbell wrote: > But "is d->vnuma" corresponds to there being vnuma config for the domain. We discussed this IRL and concluded that we should stop trying to differentiate "no vnuma configuration" from "has empty vnuma configuration". So this code should ra

Re: [Xen-devel] tools: any user of xc_dom_image->allocate?

2015-09-11 Thread Andrew Cooper
On 11/09/15 08:25, Juergen Gross wrote: While testing xen tools patches to start a pv-domU >512GB I stumbled over a problem in the domain builder: it is keeping track of the last allocated virtual address in the memory image it is creating. For very huge domains (>1TB) this virtual address will w

Re: [Xen-devel] [PATCH for 4.6 v2 1/3] libxl: set ret to non-zero value in failure path

2015-09-11 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-devel] [PATCH for 4.6 v2 1/3] libxl: set ret to non-zero value in failure path"): > On Thu, 2015-09-10 at 11:55 +0100, Ian Campbell wrote: > > On Wed, 2015-09-09 at 18:03 +0100, Wei Liu wrote: > > > ... otherwise we have something like: > > > > > > xl: libxl_create.

Re: [Xen-devel] [PATCH V6 3/7] libxl: add pvusb API

2015-09-11 Thread Ian Campbell
On Thu, 2015-09-10 at 23:42 -0600, Chun Yan Liu wrote: > > > Do these fields have any particular size requirements arising from e.g. the > > USB spec or from possible dom0 implementations? > > > > If they have a well defined fixed size from a USB spec then maybe we > > could > > use the appro

Re: [Xen-devel] [PATCH for 4.6 v2] configure: don't silently disable systemd support

2015-09-11 Thread Ian Jackson
Ian Campbell writes ("Re: [PATCH for 4.6 v2] configure: don't silently disable systemd support"): > On Thu, 2015-09-10 at 12:18 +0100, Wei Liu wrote: > > Originally when user runs ./configure --enable-systemd and systemd > > development library is not available the build system silently disables >

Re: [Xen-devel] [PATCH 0/5] libxc: support building large pv-domains

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-11 at 14:32 +0200, Juergen Gross wrote: > The Xen hypervisor supports starting a dom0 with large memory (up to > the TB range) by not including the initrd and p2m list in the initial > kernel mapping. Especially the p2m list can grow larger than the > available virtual space in the

Re: [Xen-devel] [PATCH for 4.6 v2 1/3] libxl: set ret to non-zero value in failure path

2015-09-11 Thread Wei Liu
On Fri, Sep 11, 2015 at 02:26:54PM +0100, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-devel] [PATCH for 4.6 v2 1/3] libxl: set ret > to non-zero value in failure path"): > > On Thu, 2015-09-10 at 11:55 +0100, Ian Campbell wrote: > > > On Wed, 2015-09-09 at 18:03 +0100, Wei Liu wrote: > > >

Re: [Xen-devel] [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters

2015-09-11 Thread Ard Biesheuvel
On 11 September 2015 at 15:14, Stefano Stabellini wrote: > On Fri, 11 Sep 2015, Daniel Kiper wrote: >> On Thu, Sep 10, 2015 at 05:23:02PM +0100, Mark Rutland wrote: >> > > > C) When you could go: >> > > > >> > > >DT -> Discover Xen -> Xen-specific stuff -> Xen-specific EFI/ACPI >> > > > disco

Re: [Xen-devel] [PATCH 3/5] libxc: create unmapped initrd in domain builder if supported

2015-09-11 Thread Juergen Gross
On 09/11/2015 02:54 PM, Ian Jackson wrote: Juergen Gross writes ("[PATCH 3/5] libxc: create unmapped initrd in domain builder if supported"): In case the kernel of a new pv-domU indicates it is supporting an unmapped initrd, don't waste precious virtual space for the initrd, but allocate only g

Re: [Xen-devel] [PATCH 3/5] libxc: create unmapped initrd in domain builder if supported

2015-09-11 Thread Juergen Gross
On 09/11/2015 03:15 PM, Julien Grall wrote: On 11/09/15 13:54, Ian Jackson wrote: Juergen Gross writes ("[PATCH 3/5] libxc: create unmapped initrd in domain builder if supported"): In case the kernel of a new pv-domU indicates it is supporting an unmapped initrd, don't waste precious virtual s

Re: [Xen-devel] [PATCH 0/5] libxc: support building large pv-domains

2015-09-11 Thread Juergen Gross
On 09/11/2015 03:28 PM, Ian Campbell wrote: On Fri, 2015-09-11 at 14:32 +0200, Juergen Gross wrote: The Xen hypervisor supports starting a dom0 with large memory (up to the TB range) by not including the initrd and p2m list in the initial kernel mapping. Especially the p2m list can grow larger t

Re: [Xen-devel] [PATCH for 4.6 v3 2/3] xl/libxl: disallow saving a guest with vNUMA configured

2015-09-11 Thread Wei Liu
On Fri, Sep 11, 2015 at 02:21:17PM +0100, Ian Campbell wrote: > On Fri, 2015-09-11 at 11:50 +0100, Ian Campbell wrote: > > But "is d->vnuma" corresponds to there being vnuma config for the domain. > > We discussed this IRL and concluded that we should stop trying to > differentiate "no vnuma conf

Re: [Xen-devel] [PATCH for-4.6] libxl: clear O_NONBLOCK|O_NDELAY on migration fd and reinstate afterwards

2015-09-11 Thread Andrew Cooper
On 11/09/15 11:42, Ian Campbell wrote: The fd passed to us by libvirt for both save and restore has at least O_NONBLOCK set, which libxl does not expect and therefore fails to handle any EAGAIN which might arise. This has been observed with migration v2, but if v1 used to work I think that would

[Xen-devel] [PATCH for 4.6 v4 3/3] xl: handle empty vnuma configuration

2015-09-11 Thread Wei Liu
When user specifies vnuma = [], we need to skip the whole parser function, otherwise the parser sets b_info->max_memkb to garbage value. Signed-off-by: Wei Liu Acked-by: Ian Campbell --- tools/libxl/xl_cmdimpl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/libxl/xl_cmdimpl.c b/t

[Xen-devel] [PATCH for 4.6 v4 1/3] libxc: introduce xc_domain_getvnuma

2015-09-11 Thread Wei Liu
A simple wrapper for XENMEM_get_vnumainfo. Signed-off-by: Wei Liu Acked-by: Ian Campbell --- v4: rebase on top of staging --- tools/libxc/include/xenctrl.h | 18 +++ tools/libxc/xc_domain.c | 53 +++ 2 files changed, 71 insertions(+) di

[Xen-devel] [PATCH for 4.6 v4 0/3] More vNUMA patches

2015-09-11 Thread Wei Liu
Wei Liu (3): libxc: introduce xc_domain_getvnuma xl/libxl: disallow saving a guest with vNUMA configured xl: handle empty vnuma configuration docs/man/xl.cfg.pod.5 | 2 ++ tools/libxc/include/xenctrl.h | 18 +++ tools/libxc/xc_domain.c | 53 +++

[Xen-devel] [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

2015-09-11 Thread Wei Liu
This is because the migration stream does not preserve node information. Note this is not a regression for migration v2 vs legacy migration because neither of them preserve node information. Signed-off-by: Wei Liu --- Cc: andrew.coop...@citrix.com v4: 1. Don't differentiate "no vnuma" from "emp

Re: [Xen-devel] [PATCH for 4.6 v4 1/3] libxc: introduce xc_domain_getvnuma

2015-09-11 Thread Wei Liu
On Fri, Sep 11, 2015 at 02:50:07PM +0100, Wei Liu wrote: > A simple wrapper for XENMEM_get_vnumainfo. > > Signed-off-by: Wei Liu > Acked-by: Ian Campbell > --- > v4: rebase on top of staging Note that this patch needs some trivial contextual adjustment when being applied to staging-4.6. If you

Re: [Xen-devel] [PATCH 0/5] libxc: support building large pv-domains

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-11 at 15:42 +0200, Juergen Gross wrote: > On 09/11/2015 03:28 PM, Ian Campbell wrote: > > On Fri, 2015-09-11 at 14:32 +0200, Juergen Gross wrote: > > > The Xen hypervisor supports starting a dom0 with large memory (up to > > > the TB range) by not including the initrd and p2m list i

[Xen-devel] Xen 4.4 & 4.5 - Various problems (mostly undefined references to libxenctrl functions)

2015-09-11 Thread Sébastien Frémal
Hello, I'm working with Xen to develop new communication modules to improve data transfer between xen domains. As I had a really old version of Xen (installed in 2012 !!) and some functionnalities didn't work (sharing already allocated pages with grant references), I reinstalled my entire system (

Re: [Xen-devel] [PATCH V6 3/7] libxl: add pvusb API

2015-09-11 Thread Juergen Gross
On 09/11/2015 03:26 PM, Ian Campbell wrote: On Thu, 2015-09-10 at 23:42 -0600, Chun Yan Liu wrote: Do these fields have any particular size requirements arising from e.g. the USB spec or from possible dom0 implementations? If they have a well defined fixed size from a USB spec then maybe we c

Re: [Xen-devel] [PATCH for 4.6 v3 2/3] xl/libxl: disallow saving a guest with vNUMA configured

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-11 at 14:43 +0100, Wei Liu wrote: > On Fri, Sep 11, 2015 at 02:21:17PM +0100, Ian Campbell wrote: > > On Fri, 2015-09-11 at 11:50 +0100, Ian Campbell wrote: > > > But "is d->vnuma" corresponds to there being vnuma config for the > > > domain. > > > > We discussed this IRL and conc

Re: [Xen-devel] [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-11 at 14:50 +0100, Wei Liu wrote: > +/* Disallow saving a guest with vNUMA configured because migration > + * stream does not preserve node information. > + * > + * Do not differentiate "no vnuma configuration" from "empty vnuma > + * configuration". > + */ >

Re: [Xen-devel] [PATCH 0/5] libxc: support building large pv-domains

2015-09-11 Thread Juergen Gross
On 09/11/2015 03:53 PM, Ian Campbell wrote: On Fri, 2015-09-11 at 15:42 +0200, Juergen Gross wrote: On 09/11/2015 03:28 PM, Ian Campbell wrote: On Fri, 2015-09-11 at 14:32 +0200, Juergen Gross wrote: The Xen hypervisor supports starting a dom0 with large memory (up to the TB range) by not incl

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

2015-09-11 Thread Ian Jackson
Hu, Robert writes ("RE: [OSSTEST Nested PATCH v11 6/7] Compose the main recipe of nested test job"): > So strange, seems this mail was sent ' Tuesday, September 1, 2015 > 10:42 PM ', but I have just received it. How annoying. > I'm fully occupied by some > release test, so have to carefully rea

Re: [Xen-devel] [OSSTest Nested v12 09/21] Wrapper and use core_dump_setup() for nested host and normal host to setup coredump sysctl

2015-09-11 Thread Ian Jackson
Ian Campbell writes ("Re: [OSSTest Nested v12 09/21] Wrapper and use core_dump_setup() for nested host and normal host to setup coredump sysctl"): > On Thu, 2015-09-10 at 18:23 +0100, Ian Jackson wrote: > > Also it should do `mkdir -p' in case the directory already exists > > somehow. > > This is

Re: [Xen-devel] [PATCH V6 3/7] libxl: add pvusb API

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-11 at 15:55 +0200, Juergen Gross wrote: > On 09/11/2015 03:26 PM, Ian Campbell wrote: > > On Thu, 2015-09-10 at 23:42 -0600, Chun Yan Liu wrote: > > > > > > > Do these fields have any particular size requirements arising from > > > > e.g. the > > > > USB spec or from possible dom0

Re: [Xen-devel] [PATCH v3] xen: arm: Support <32MB frametables

2015-09-11 Thread Ian Campbell
On Tue, 2015-09-01 at 16:43 +0100, Ian Campbell wrote: > On Wed, 2015-08-26 at 17:44 -0700, Julien Grall wrote: > > Hi Chris, > > > > On 21/08/2015 14:30, Chris Brand wrote: > > > setup_frametable_mappings() rounds frametable_size up to a multiple > > > of 32MB. This is wasteful on systems with le

Re: [Xen-devel] [PATCH v3 2/2] xen: arm: Be explicit about bit values in mfn_to_xen_entry()

2015-09-11 Thread Ian Campbell
On Thu, 2015-09-10 at 11:56 -0700, Chris Brand wrote: > Ensure that every relevant bit is given an explicit value. > This has no effect on the generated code, but makes it > a little easier to follow. > > Reported-by: Julien Grall > Signed-off-by: Chris Brand Acked + applied for 4.7 along with

Re: [Xen-devel] OVMF/Xen, Debian wheezy can't boot with NX on stack (Was: Re: [edk2] [PATCH] OvmfPkg: prevent code execution from DXE stack)

2015-09-11 Thread Josh Triplett
On Fri, Sep 11, 2015 at 01:43:53PM +0200, Laszlo Ersek wrote: > On 09/09/15 12:48, Laszlo Ersek wrote: > > On 09/09/15 11:37, Ian Campbell wrote: > >> On Wed, 2015-09-09 at 01:06 -0600, Jan Beulich wrote: > >> On 09.09.15 at 00:23, wrote: > On 09/08/15 19:26, Anthony PERARD wrote: > >

Re: [Xen-devel] [PATCH] xen/domctl: lower loglevel of XEN_DOMCTL_memory_mapping

2015-09-11 Thread Jan Beulich
>>> On 11.09.15 at 14:05, wrote: > The flush_all(FLUSH_CACHE) in mtrr.c will result in a flush_area_mask for > all CPU's in the host. > It will more time to issue a IPI to all logical cores the more core's there > are. I admit that > x2apic_cluster mode may speed this up but not all hosts will h

Re: [Xen-devel] [PATCH for 4.6 v3 2/3] xl/libxl: disallow saving a guest with vNUMA configured

2015-09-11 Thread Wei Liu
On Fri, Sep 11, 2015 at 02:59:07PM +0100, Ian Campbell wrote: > On Fri, 2015-09-11 at 14:43 +0100, Wei Liu wrote: > > On Fri, Sep 11, 2015 at 02:21:17PM +0100, Ian Campbell wrote: > > > On Fri, 2015-09-11 at 11:50 +0100, Ian Campbell wrote: > > > > But "is d->vnuma" corresponds to there being vnuma

Re: [Xen-devel] [PATCH for-4.6] libxl: clear O_NONBLOCK|O_NDELAY on migration fd and reinstate afterwards

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-11 at 13:56 +0100, Wei Liu wrote: > On Fri, Sep 11, 2015 at 11:50:14AM +0100, Ian Jackson wrote: > > Ian Campbell writes ("[PATCH for-4.6] libxl: clear O_NONBLOCK|O_NDELAY > > on migration fd and reinstate afterwards"): > > > The fd passed to us by libvirt for both save and restore

Re: [Xen-devel] [PATCH for-4.6] libxl: clear O_NONBLOCK|O_NDELAY on migration fd and reinstate afterwards

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-11 at 14:44 +0100, Andrew Cooper wrote: > On 11/09/15 11:42, Ian Campbell wrote: > > The fd passed to us by libvirt for both save and restore has at least > > O_NONBLOCK set, which libxl does not expect and therefore fails to > > handle any EAGAIN which might arise. > > > > This ha

Re: [Xen-devel] [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

2015-09-11 Thread Wei Liu
On Fri, Sep 11, 2015 at 03:00:35PM +0100, Ian Campbell wrote: > On Fri, 2015-09-11 at 14:50 +0100, Wei Liu wrote: > > +/* Disallow saving a guest with vNUMA configured because migration > > + * stream does not preserve node information. > > + * > > + * Do not differentiate "no vnuma

[Xen-devel] [PATCH] arm/xen: Enable user access to the kernel before issuing a privcmd call

2015-09-11 Thread Julien Grall
When Xen is copyin data to/from the guest it will check if the kernel has the right to do the access. If not, the hypercall will return an error. After the commit a5e090acbf545c0a3b04080f8a488b17ec41fe02 "ARM: software-based priviledged-no-access support", the kernel can't access anymore the user

Re: [Xen-devel] [PATCH V6 3/7] libxl: add pvusb API

2015-09-11 Thread Juergen Gross
On 09/11/2015 04:09 PM, Ian Campbell wrote: On Fri, 2015-09-11 at 15:55 +0200, Juergen Gross wrote: On 09/11/2015 03:26 PM, Ian Campbell wrote: On Thu, 2015-09-10 at 23:42 -0600, Chun Yan Liu wrote: Do these fields have any particular size requirements arising from e.g. the USB spec or from

[Xen-devel] [PATCH for-4.6] libxl: format fd flags with 0x since they are hex.

2015-09-11 Thread Ian Campbell
Commit 93f5194e7270 "libxl: clear O_NONBLOCK|O_NDELAY on migration fd and reinstate afterwards" added some logging of fcntl.F_GETFL at all as %x without a 0x prefix to make it clear they numbers are hex. Fix this alongwith an inadvertent logging of the fd itself as hex. Signed-off-by: Ian Campbell

Re: [Xen-devel] [PATCH for 4.6 v4 2/3] xl/libxl: disallow saving a guest with vNUMA configured

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-11 at 15:14 +0100, Wei Liu wrote: @@ -1636,6 +1638,20 @@ void libxl__domain_save(libxl__egc *egc, > libxl__domain_suspend_state *dss) >| (debug ? XCFLAGS_DEBUG : 0) >| (dss->hvm ? XCFLAGS_HVM : 0); > > +/* Disallow saving a guest with vNUMA configured b

Re: [Xen-devel] [PATCH] arm/xen: Enable user access to the kernel before issuing a privcmd call

2015-09-11 Thread Ian Campbell
On Fri, 2015-09-11 at 15:16 +0100, Julien Grall wrote: > When Xen is copyin data to/from the guest it will check if the kernel "copying" > has the right to do the access. If not, the hypercall will return an > error. > > After the commit a5e090acbf545c0a3b04080f8a488b17ec41fe02 "ARM: > software-

Re: [Xen-devel] [PATCH OSSTEST] cri-common: Refactor select_prevxenbranch to cri-getprevxenbranch

2015-09-11 Thread Ian Jackson
Ian Campbell writes ("[PATCH OSSTEST] cri-common: Refactor select_prevxenbranch to cri-getprevxenbranch"): > This moves it outside any prevailing set -x and reduces the amount of > noise in various logs. ... > +#!/bin/bash > + > +xenbranch=$1 Missing set -e. Ian. ___

Re: [Xen-devel] [PATCH for-4.6] libxl: format fd flags with 0x since they are hex.

2015-09-11 Thread Ian Jackson
Ian Campbell writes ("[PATCH for-4.6] libxl: format fd flags with 0x since they are hex."): > Commit 93f5194e7270 "libxl: clear O_NONBLOCK|O_NDELAY on migration fd > and reinstate afterwards" added some logging of fcntl.F_GETFL at all > as %x without a 0x prefix to make it clear they numbers are h

  1   2   >