Re: [Xen-devel] [PATCH v3 01/19] xen: dump vNUMA information with debug key "u"

2015-01-13 Thread Jan Beulich
>>> On 13.01.15 at 13:11, wrote: > @@ -408,6 +413,49 @@ static void dump_numa(unsigned char key) > > for_each_online_node ( i ) > printk("Node %u: %u\n", i, page_num_node[i]); > + > +if ( !d->vnuma ) > +continue; > + > +vnuma = d->vnuma;

Re: [Xen-devel] [PATCH v3 11/19] tools/hvmloader: link errno.h from xen internal

2015-01-13 Thread Wei Liu
On Tue, Jan 13, 2015 at 04:32:10PM +, Jan Beulich wrote: > >>> On 13.01.15 at 13:11, wrote: > > From: Tiejun Chen > > > > We need to act on some specific hypercall error numbers, so > > require the hypervisor view on the errno.h value rather than > > just the build environment's number. So h

Re: [Xen-devel] [PATCH RFC] make error codes a formal part of the ABI

2015-01-13 Thread Ian Campbell
On Tue, 2015-01-13 at 16:21 +, Jan Beulich wrote: > Now that we have two cases where patches against hvmloader got > submitted needing to include the hypervisor's errno.h (for the host's > system header not necessarily reflecting the correct numbers), take > this as a strong sign that we need t

Re: [Xen-devel] [PATCH] xen-time: decreasing the rating of the xen clocksource below that of the tsc clocksource for dom0's

2015-01-13 Thread Boris Ostrovsky
On 01/13/2015 11:17 AM, Boris Ostrovsky wrote: On 01/13/2015 11:07 AM, David Vrabel wrote: On 13/01/15 15:42, Boris Ostrovsky wrote: On 01/13/2015 04:52 AM, David Vrabel wrote: On 13/01/15 08:14, Imre Palik wrote: From: "Palik, Imre" In Dom0's the use of the TSC clocksource (whenever it is

Re: [Xen-devel] [PATCH v3 11/19] tools/hvmloader: link errno.h from xen internal

2015-01-13 Thread Jan Beulich
>>> On 13.01.15 at 13:11, wrote: > From: Tiejun Chen > > We need to act on some specific hypercall error numbers, so > require the hypervisor view on the errno.h value rather than > just the build environment's number. So here link this headfile > from xen. > > Acked-by: Jan Beulich > Signed-o

Re: [Xen-devel] [PATCH for-4.6 2/4] xen/arm: vgic: Keep track of vIRQ used by a domain

2015-01-13 Thread Julien Grall
Hi Ian, On 13/01/15 15:51, Ian Campbell wrote: > On Fri, 2014-12-12 at 14:43 +, Julien Grall wrote: >> While it's easy to know which hardware IRQ is assigned to a domain, there >> is no way to know which IRQ is emulated by Xen for a specific domain. > > It seems you are tracking all valid int

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Jan Beulich
>>> On 13.01.15 at 17:17, wrote: > Ian Campbell writes: >> An alternative approach to this might be to walk the guest p2m (with >> appropriate continuations) and move each domheap page (this would also >> help us preserve super page mappings). It would also have the advantage >> of not needing ad

[Xen-devel] [PATCH Linux-2.6.18] scsifront: avoid aquiring same lock twice if ring is full

2015-01-13 Thread Juergen Gross
The locking in scsifront_dev_reset_handler() is obviously wrong. In case of a full ring the host lock is aquired twice. Fixing this issue enables to get rid of the endless fo loop with an explicit break statement. Signed-off-by: Juergen Gross --- diff -r 078f1bb69ea5 drivers/xen/scsifront/scsif

[Xen-devel] [PATCH RFC] make error codes a formal part of the ABI

2015-01-13 Thread Jan Beulich
Now that we have two cases where patches against hvmloader got submitted needing to include the hypervisor's errno.h (for the host's system header not necessarily reflecting the correct numbers), take this as a strong sign that we need to make the error return values part of the hypervisor ABI (whi

Re: [Xen-devel] [PATCH] xen-time: decreasing the rating of the xen clocksource below that of the tsc clocksource for dom0's

2015-01-13 Thread Boris Ostrovsky
On 01/13/2015 11:07 AM, David Vrabel wrote: On 13/01/15 15:42, Boris Ostrovsky wrote: On 01/13/2015 04:52 AM, David Vrabel wrote: On 13/01/15 08:14, Imre Palik wrote: From: "Palik, Imre" In Dom0's the use of the TSC clocksource (whenever it is stable enough to be used) instead of the Xen clo

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Vitaly Kuznetsov
Ian Campbell writes: > On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote: >> +gmfn = mfn_to_gmfn(d, mfn); > > (I haven't thought about it super hard, but I'm taking it as given that > this approach to kexec is going to be needed for ARM too, since that > seems likely) > > mfn_

Re: [Xen-devel] [PATCH OSSTEST v2 08/18] Toolstack: Refactor guest lifecycle.

2015-01-13 Thread Ian Campbell
On Tue, 2014-12-02 at 16:04 +, Ian Campbell wrote: > +sub create ($$) { > +my ($self,$cfg) = @_; > +my $ho = $self->{Host}; > +my $lcfg = $cfg; > +$lcfg =~ s,/,-,g; > +$lcfg = "$ho->{Name}--$lcfg"; > +target_cmd_root($ho, "virsh domxml-from-native xen-xm $cfg > $cfg.xml"

Re: [Xen-devel] [PATCH v3 18/19] libxlutil: nested list support

2015-01-13 Thread Wei Liu
On Tue, Jan 13, 2015 at 03:52:48PM +, Ian Jackson wrote: > Wei Liu writes ("[PATCH v3 18/19] libxlutil: nested list support"): > > This is done with three major changes: > > 1. Rework internal representation of setting. > > 2. Extend grammar of parser. > > 3. Introduce new APIs. > > This commi

Re: [Xen-devel] [PATCH] xen-time: decreasing the rating of the xen clocksource below that of the tsc clocksource for dom0's

2015-01-13 Thread David Vrabel
On 13/01/15 15:42, Boris Ostrovsky wrote: > On 01/13/2015 04:52 AM, David Vrabel wrote: >> On 13/01/15 08:14, Imre Palik wrote: >>> From: "Palik, Imre" >>> >>> In Dom0's the use of the TSC clocksource (whenever it is stable >>> enough to >>> be used) instead of the Xen clocksource should not cause

Re: [Xen-devel] (v2) Design proposal for RMRR fix

2015-01-13 Thread Jan Beulich
>>> On 13.01.15 at 17:00, wrote: > Another option I was thinking about: Before assigning a device to a > guest, you have to unplug the device and assign it to pci-back (e.g., > with xl pci-assignable-add). In addition to something like rmmr=host, > we could add rmrr=assignable, which would add al

Re: [Xen-devel] [PATCH v3 04/19] libxl: introduce vNUMA types

2015-01-13 Thread Wei Liu
On Tue, Jan 13, 2015 at 03:40:43PM +, Ian Jackson wrote: > Wei Liu writes ("[PATCH v3 04/19] libxl: introduce vNUMA types"): > > A domain can contain several virtual NUMA nodes, hence we introduce an > > array in libxl_domain_build_info. > > > > libxl_vnode_info contains the size of memory in

Re: [Xen-devel] (v2) Design proposal for RMRR fix

2015-01-13 Thread George Dunlap
On 01/13/2015 03:47 PM, Jan Beulich wrote: On 13.01.15 at 14:45, wrote: >> On Tue, Jan 13, 2015 at 11:03 AM, Tian, Kevin wrote: Well it will have an impact on the overall design of the code; but you're right, if RMRRs really can (and will) be anywhere in memory, then the domai

Re: [Xen-devel] [PATCH for-4.6 1/4] xen/arm: vgic: Rename nr_lines into nr_spis

2015-01-13 Thread Ian Campbell
On Tue, 2015-01-13 at 15:52 +, Julien Grall wrote: > Hi Ian, > > On 13/01/15 15:38, Ian Campbell wrote: > > On Fri, 2014-12-12 at 14:43 +, Julien Grall wrote: > >> The field nr_lines in the arch_domain vgic structure contains the number of > >> SPIs for the emulated GIC. Using the nr_lines

Re: [Xen-devel] (v2) Design proposal for RMRR fix

2015-01-13 Thread George Dunlap
On 01/13/2015 03:52 PM, Jan Beulich wrote: On 13.01.15 at 13:03, wrote: >>> From: Jan Beulich [mailto:jbeul...@suse.com] >>> Sent: Tuesday, January 13, 2015 7:56 PM >> On 13.01.15 at 12:03, wrote: lowmem: [0, 0x9fff] mmio hole: [0xa000, 0x] >

Re: [Xen-devel] [PATCH for-4.6 4/4] xen/arm: Find automatically a PPI for the DOM0 event channel interrupt

2015-01-13 Thread Ian Campbell
On Mon, 2014-12-15 at 16:09 +, Julien Grall wrote: > Hi Stefano, > > On 15/12/14 15:35, Stefano Stabellini wrote: > > On Fri, 12 Dec 2014, Julien Grall wrote: > >> Use the new vgic interface to know which virtual PPI is free and use it > >> for the event channel code. > >> > >> At the DOM0 cre

Re: [Xen-devel] [PATCH for-4.6 3/4] xen/arm: vgic: notice if the vIRQ is not allocated when the guest enable it

2015-01-13 Thread Ian Campbell
On Fri, 2014-12-12 at 14:43 +, Julien Grall wrote: > This help for guest interrupts debugging. If the vIRQ is not allocate, > this means that nothing is wired to it. Should we short circuit the rest of the enable operation for this IRQ then? i.e. implement such writes as ignored, e.g. not refl

Re: [Xen-devel] [PATCH v3 18/19] libxlutil: nested list support

2015-01-13 Thread Ian Jackson
Wei Liu writes ("[PATCH v3 18/19] libxlutil: nested list support"): > This is done with three major changes: > 1. Rework internal representation of setting. > 2. Extend grammar of parser. > 3. Introduce new APIs. This commit message is very brief. For example, under the heading of `Rework interna

Re: [Xen-devel] [PATCH for-4.6 2/4] xen/arm: vgic: Keep track of vIRQ used by a domain

2015-01-13 Thread Ian Campbell
On Fri, 2014-12-12 at 14:43 +, Julien Grall wrote: > While it's easy to know which hardware IRQ is assigned to a domain, there > is no way to know which IRQ is emulated by Xen for a specific domain. It seems you are tracking all valid interrupts, including hardware ones, not just those for emu

[Xen-devel] [PATCH V4 2/3] tests: Tests for the xen-xl parser

2015-01-13 Thread Jim Fehlig
From: Kiarie Kahurani add tests for the xen_xl config parser Signed-off-by: Kiarie Kahurani Signed-off-by: Jim Fehlig --- V4: Only build xlconfigtest when libxl is available. tests/Makefile.am| 11 ++ tests/testutilsxen.c | 50 tests/testutilsx

Re: [Xen-devel] [PATCH v3 00/14] Enable vTPM subsystem on TPM 2.0

2015-01-13 Thread Daniel De Graaf
On 01/12/2015 11:06 AM, Xu, Quan wrote: Graaf, Now there are no more comments for this series of patch. Can this series of patch be merged in staging branch? or any other AR, let me know. If the series of patch are in staging branch, the Community and I can continue to develop and enhance it.

[Xen-devel] [PATCH V4 3/3] libxl: Add support for parsing/formating Xen XL config

2015-01-13 Thread Jim Fehlig
From: Kiarie Kahurani Now that xenconfig supports parsing and formatting Xen's XL config format, integrate it into the libxl driver's connectDomainXML{From,To}Native functions. Signed-off-by: Kiarie Kahurani Signed-off-by: Jim Fehlig --- V4: Note support for new 'xen-xl' format in virsh man p

[Xen-devel] [PATCH V4 0/3] Parser for xen-xl config format

2015-01-13 Thread Jim Fehlig
It's been a long, twisting road to V4 of the Xen xl parser. V3 [1] was based on a flex-based parser that was copied from the Xen project and proved to be a bit challenging to integrate properly with autotools. But as it turns out, Xen provides an interface to the parser via libxlutil. I hadn't rea

Re: [Xen-devel] [PATCH for-4.6 1/4] xen/arm: vgic: Rename nr_lines into nr_spis

2015-01-13 Thread Julien Grall
Hi Ian, On 13/01/15 15:38, Ian Campbell wrote: > On Fri, 2014-12-12 at 14:43 +, Julien Grall wrote: >> The field nr_lines in the arch_domain vgic structure contains the number of >> SPIs for the emulated GIC. Using the nr_lines make confusion with the GIC >> code, where it means the number of

[Xen-devel] [PATCH V4 1/3] Introduce support for parsing/formatting Xen xl config format

2015-01-13 Thread Jim Fehlig
Introduce a parser/formatter for the xl config format. Since the deprecation of xm/xend, the VM config file format has diverged as new features are added to libxl. This patch adds support for parsing and formating the xl config format. It supports the existing xm config format, plus adds support

Re: [Xen-devel] (v2) Design proposal for RMRR fix

2015-01-13 Thread Jan Beulich
>>> On 13.01.15 at 13:03, wrote: >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: Tuesday, January 13, 2015 7:56 PM >> >>> On 13.01.15 at 12:03, wrote: >> >lowmem: [0, 0x9fff] >> >mmio hole: [0xa000, 0x] >> >highmem:[0x1, 0x160

Re: [Xen-devel] [PATCH v3 09/14] vTPM/TPM2: Support 'tpm2' extra command line.

2015-01-13 Thread Daniel De Graaf
On 12/31/2014 12:51 AM, Quan Xu wrote: Make vtpm-stubdom domain compatible to launch on TPM 1.x / TPM 2.0. Add: .. extra="tpm2" .. to launch vtpm-stubdom domain on TPM 2.0, ignore it on TPM 1.x. for example, vtpm-stubdom domain configuration on TPM 2.0: kernel="/usr/lib/xen/boot/vtpmmgr

Re: [Xen-devel] [PATCH 01/10] xen/arm: Implement hip04-d01 platform

2015-01-13 Thread Frediano Ziglio
2015-01-13 15:23 GMT+00:00 Ian Campbell : > On Tue, 2015-01-13 at 15:11 +, Frediano Ziglio wrote: >> 2015-01-13 14:42 GMT+00:00 Ian Campbell : >> > On Tue, 2015-01-13 at 14:09 +, Frediano Ziglio wrote: >> >> 2015-01-13 11:58 GMT+00:00 Ian Campbell : >> >> > On Mon, 2014-11-03 at 10:11 +

Re: [Xen-devel] (v2) Design proposal for RMRR fix

2015-01-13 Thread Jan Beulich
>>> On 13.01.15 at 14:45, wrote: > On Tue, Jan 13, 2015 at 11:03 AM, Tian, Kevin wrote: >>> Well it will have an impact on the overall design of the code; but >>> you're right, if RMRRs really can (and will) be anywhere in memory, >>> then the domain builder will need to know what RMRRs are going

Re: [Xen-devel] [PATCH] xen-time: decreasing the rating of the xen clocksource below that of the tsc clocksource for dom0's

2015-01-13 Thread Boris Ostrovsky
On 01/13/2015 04:52 AM, David Vrabel wrote: On 13/01/15 08:14, Imre Palik wrote: From: "Palik, Imre" In Dom0's the use of the TSC clocksource (whenever it is stable enough to be used) instead of the Xen clocksource should not cause any issues, as Dom0 VMs never live-migrated. The TSC clocksou

Re: [Xen-devel] [PATCH v3 04/19] libxl: introduce vNUMA types

2015-01-13 Thread Ian Jackson
Wei Liu writes ("[PATCH v3 04/19] libxl: introduce vNUMA types"): > A domain can contain several virtual NUMA nodes, hence we introduce an > array in libxl_domain_build_info. > > libxl_vnode_info contains the size of memory in that node, the distance > from that node to every nodes, the underlying

Re: [Xen-devel] [PATCH for-4.6 1/4] xen/arm: vgic: Rename nr_lines into nr_spis

2015-01-13 Thread Ian Campbell
On Fri, 2014-12-12 at 14:43 +, Julien Grall wrote: > The field nr_lines in the arch_domain vgic structure contains the number of > SPIs for the emulated GIC. Using the nr_lines make confusion with the GIC > code, where it means the number of IRQs. This can lead to coding error. > > Also introd

Re: [Xen-devel] [Xen-users] [TestDay] minor bug + possible configuration bug 4.5rc4 archlinux

2015-01-13 Thread Ian Campbell
On Tue, 2015-01-13 at 15:11 +, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-users] [TestDay] minor bug + possible > configuration bug 4.5rc4 archlinux"): > > On Tue, 2015-01-13 at 09:45 +0100, Olaf Hering wrote: > > > I dont think we can do anything about this systemd brain damage. Eith

Re: [Xen-devel] [PATCH 01/10] xen/arm: Implement hip04-d01 platform

2015-01-13 Thread Ian Campbell
On Tue, 2015-01-13 at 15:11 +, Frediano Ziglio wrote: > 2015-01-13 14:42 GMT+00:00 Ian Campbell : > > On Tue, 2015-01-13 at 14:09 +, Frediano Ziglio wrote: > >> 2015-01-13 11:58 GMT+00:00 Ian Campbell : > >> > On Mon, 2014-11-03 at 10:11 +, Frediano Ziglio wrote: > >> >> Add this new pl

Re: [Xen-devel] [Xen-users] [TestDay] minor bug + possible configuration bug 4.5rc4 archlinux

2015-01-13 Thread Ian Jackson
Ian Campbell writes ("Re: [Xen-users] [TestDay] minor bug + possible configuration bug 4.5rc4 archlinux"): > On Tue, 2015-01-13 at 09:45 +0100, Olaf Hering wrote: > > I dont think we can do anything about this systemd brain damage. Either > > it gets its Where= from such line within the file, or i

Re: [Xen-devel] [PATCH v3 04/24] xen: guestcopy: Provide an helper to safely copy string from guest

2015-01-13 Thread Daniel De Graaf
On 01/13/2015 09:25 AM, Julien Grall wrote: Flask code already provides an helper to copy a string from guest. In a later patch, the new DT hypercalls will need a similar function. To avoid code duplication, copy the flask helper (flask_copying_string) to common code: - Rename into safe_cop

Re: [Xen-devel] [PATCH 01/10] xen/arm: Implement hip04-d01 platform

2015-01-13 Thread Frediano Ziglio
2015-01-13 14:42 GMT+00:00 Ian Campbell : > On Tue, 2015-01-13 at 14:09 +, Frediano Ziglio wrote: >> 2015-01-13 11:58 GMT+00:00 Ian Campbell : >> > On Mon, 2014-11-03 at 10:11 +, Frediano Ziglio wrote: >> >> Add this new platform to Xen. >> >> This platform require specific code to initiali

Re: [Xen-devel] [PATCH v3 01/24] xen: Extend DOMCTL createdomain to support arch configuration

2015-01-13 Thread Daniel De Graaf
On 01/13/2015 09:25 AM, Julien Grall wrote: On ARM the virtual GIC may differ between each guest (emulated GIC version, number of SPIs...). Those informations are already known at the domain creation and can never change. For now only the gic_version is set. In long run, there will be more param

Re: [Xen-devel] Backport request for "tools/hotplug: set mtu from bridge for tap interface" - for Xen 4.3

2015-01-13 Thread Daniel Kiper
On Mon, Jan 12, 2015 at 05:06:12PM +, Ian Jackson wrote: > Charles Arnold writes ("Re: Backport request for "tools/hotplug: set mtu from > bridge for tap interface" - for Xen 4.3"): > > With changeset 22885 support was added for setting the MTU in the vif-bridge > > script for when a vif inter

Re: [Xen-devel] Backport request for "tools/hotplug: set mtu from bridge for tap interface"

2015-01-13 Thread Daniel Kiper
On Mon, Jan 12, 2015 at 03:44:28PM +, Ian Jackson wrote: > Daniel Kiper writes ("Re: Backport request for "tools/hotplug: set mtu from > bridge for tap interface""): > > On Tue, Nov 18, 2014 at 06:24:31PM +, Ian Jackson wrote: > > > Does it apply cleanly to 4.3 and 4.4? I haven't checked.

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Tim Deegan
At 13:53 + on 13 Jan (1421153637), Ian Campbell wrote: > On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote: > > +gmfn = mfn_to_gmfn(d, mfn); > > (I haven't thought about it super hard, but I'm taking it as given that > this approach to kexec is going to be needed for ARM to

Re: [Xen-devel] [PATCH 08/14] xen-netback: use foreign page information from the pages themselves

2015-01-13 Thread David Vrabel
On 12/01/15 15:43, David Vrabel wrote: > From: Jenny Herbert > > Use the foreign page flag in netback to get the domid and grant ref > needed for the grant copy. This signficiantly simplifies the netback > code and makes netback work with foreign pages from other backends > (e.g., blkback). > >

Re: [Xen-devel] [PATCH 01/10] xen/arm: Implement hip04-d01 platform

2015-01-13 Thread Ian Campbell
On Tue, 2015-01-13 at 14:09 +, Frediano Ziglio wrote: > 2015-01-13 11:58 GMT+00:00 Ian Campbell : > > On Mon, 2014-11-03 at 10:11 +, Frediano Ziglio wrote: > >> Add this new platform to Xen. > >> This platform require specific code to initialize CPUs. > > > > What is the "bootwrapper"? Are

Re: [Xen-devel] [RFC PATCHv1 net-next] xen-netback: always fully coalesce guest Rx packets

2015-01-13 Thread Wei Liu
On Tue, Jan 13, 2015 at 02:05:17PM +, David Vrabel wrote: > Always fully coalesce guest Rx packets into the minimum number of ring > slots. Reducing the number of slots per packet has significant > performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host > receive test). > Good num

[Xen-devel] [PATCH v3 20/24] xen/passthrough: Extend XEN_DOMCTL_assign_device to support DT device

2015-01-13 Thread Julien Grall
TODO: Update the commit message A device node is described by a path. It will be used to retrieved the node in the device tree and assign the related device to the domain. Only device protected by an IOMMU can be assigned to a guest. Signed-off-by: Julien Grall Cc: Ian Jackson Cc: Wei Liu Cc:

[Xen-devel] [PATCH v3 02/24] xen/arm: Divide GIC initialization in 2 parts

2015-01-13 Thread Julien Grall
Currently the function to translate IRQ from the device tree is set unconditionally to be able to be able to retrieve serial/timer IRQ before the GIC has been initialized. It assumes that the xlate function won't never changed. We may also need to have the primary interrupt controller very early.

[Xen-devel] [PATCH v3 24/24] xl: Add new option dtdev

2015-01-13 Thread Julien Grall
The option "dtdev" will be used to passthrough a non-PCI device described in the device tree to a guest. Signed-off-by: Julien Grall Cc: Ian Jackson Cc: Wei Liu --- Changes in v2: - libxl_device_dt has been rename to libxl_device_dtdev - use xrealloc instead of realloc ---

[Xen-devel] [PATCH v3 19/24] xen/iommu: arm: Wire iommu DOMCTL for ARM

2015-01-13 Thread Julien Grall
Signed-off-by: Julien Grall Acked-by: Stefano Stabellini Cc: Jan Beulich --- Changes in v3: - Add Stefano's ack Changes in v2: - Don't move the call in common code. --- xen/arch/arm/domctl.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git

[Xen-devel] [PATCH v3 23/24] libxl: Add support for non-PCI passthrough

2015-01-13 Thread Julien Grall
On ARM, every non-PCI device are described in the device tree. Each of them can be found via a path. This patch introduces a very basic support, only the IOMMU will be set up correctly. The user will have to: - Describe the device in the partial device tree - Map manually MMIO/IRQ This is

[Xen-devel] [PATCH v3 17/24] xen/passthrough: arm: release earlier the DT devices assigned to a guest

2015-01-13 Thread Julien Grall
The toolstack may not have deassign every device used by a guest. Therefore we have to go through the device list and removing them before asking the IOMMU drivers to release memory for this domain. This can be done by moving the call to the release function when we relinquish the resources. The I

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

2015-01-13 Thread Julien Grall
The partial device tree may contains phandle. The Device Tree Compiler tends to allocate the phandle from 1. Reserve the ID 65000 for the GIC phandle. I think we can safely assume that the partial device tree will never contain a such ID. Signed-off-by: Julien Grall Cc: Ian Jackson Cc: Wei Liu

[Xen-devel] [PATCH v3 10/24] xen/arm: gic: Add sanity checks gic_route_irq_to_guest

2015-01-13 Thread Julien Grall
With the addition of interrupt assignment to guest, we need to make sure the guest don't blow up the interrupt management in Xen. Before associating the IRQ to a vIRQ we need to make sure: - the vIRQ is not already associated to another IRQ - the guest didn't enable the vIRQ Signed-off-by

[Xen-devel] [PATCH v3 14/24] xen/dts: Use unsigned int for MMIO and IRQ index

2015-01-13 Thread Julien Grall
There is no reason to use signed integer for an index. Signed-off-by: Julien Grall Acked-by: Stefano Stabellini --- Changes in v3: - Slightly update commit message to drop the reference to new hypercalls. - Add Stefano's acked Changes in v2: - Use unsign

[Xen-devel] [PATCH v3 13/24] xen/arm: Implement hypercall PHYSDEVOP_{, un}map_pirq

2015-01-13 Thread Julien Grall
The physdev sub-hypercalls PHYSDEVOP_{,map}_pirq allow the toolstack to assign/deassign a physical IRQ to the guest (via the config options "irqs" for xl). The x86 version is using them with PIRQ (IRQ bound to an event channel). As ARM doesn't have a such concept, we could reuse it to bound a physi

[Xen-devel] [PATCH v3 03/24] xen/dts: Allow only IRQ translation that are mapped to main GIC

2015-01-13 Thread Julien Grall
Xen is only able to handle one GIC controller. Some platform may contain other interrupt controller. Make sure to only translate IRQ mapped into the GIC handled by Xen. Signed-off-by: Julien Grall --- Changes in v3: - Patch was previously sent a separate series [1] - Rework

[Xen-devel] [PATCH v3 18/24] xen/passthrough: iommu_deassign_device_dt: By default reassign device to nobody

2015-01-13 Thread Julien Grall
Currently, when the device is deassigned from a domain, we directly reassign to DOM0. As the device may not have been correctly reset, this may lead to corruption or expose some part of DOM0 memory. Also, we may have no way to reset some platform devices. If Xen reassigns the device to "nobody",

[Xen-devel] [PATCH v3 08/24] xen/arm: Allow virq != irq

2015-01-13 Thread Julien Grall
Actually Xen is assuming that the virtual IRQ will always be the same as IRQ. Modify route_guest_irq to take the virtual IRQ in parameter and let Xen assign a different IRQ number. Also store the vIRQ in the desc action to easily retrieve easily the IRQ target when we need to inject the interrupt.

[Xen-devel] [PATCH v3 11/24] xen/arm: Let the toolstack configure the number of SPIs

2015-01-13 Thread Julien Grall
Each domain may have a different number of IRQs depending on the devices assigned to it. Rather re-using the number of IRQs used by the hardwared GIC, let the toolstack specify the number of SPIs when the domain is created. This will avoid to waste memory. To calculate the number of SPIs, we assu

[Xen-devel] [PATCH v3 21/24] tools/(lib)xl: Add partial device tree support for ARM

2015-01-13 Thread Julien Grall
Let the user to pass additional nodes to the guest device tree. For this purpose, everything in the node /passthrough from the partial device tree will be copied into the guest device tree. The node /aliases will be also copied to allow the user to define aliases which can be used by the guest ker

[Xen-devel] [PATCH v3 15/24] xen/dts: Provide an helper to get a DT node from a path provided by a guest

2015-01-13 Thread Julien Grall
Signed-off-by: Julien Grall --- Changes in v3: - Use the new prototype of safe_copy_string_from_guest Changes in v2: - guest_copy_string_from_guest has been renamed into safe_copy_string_from_guest --- xen/common/device_tree.c | 19 +++ xen/i

[Xen-devel] [PATCH v3 01/24] xen: Extend DOMCTL createdomain to support arch configuration

2015-01-13 Thread Julien Grall
On ARM the virtual GIC may differ between each guest (emulated GIC version, number of SPIs...). Those informations are already known at the domain creation and can never change. For now only the gic_version is set. In long run, there will be more parameters such as the number of SPIs. All will be

[Xen-devel] [PATCH v3 06/24] xen/arm: Map disabled device in DOM0

2015-01-13 Thread Julien Grall
The check to avoid mapping disabled device in DOM0 was added in the anticipation of the device passthrough. But, a brand new property will be added later to mark device which will passthrough. At the same time, remove the memory type check because those nodes has been blacklisted. Futhermore, some

[Xen-devel] [PATCH v3 12/24] xen/arm: Release IRQ routed to a domain when it's destroying

2015-01-13 Thread Julien Grall
Xen has to release IRQ routed to a domain in order to reuse later. Currently only SPIs can be routed to the guest so we only need to browse SPIs for a specific domain. Futhermore, a guest can crash and let the IRQ in an incorrect state (i.e has not being EOIed). Xen will have to reset the IRQ in o

[Xen-devel] [PATCH v3 07/24] xen/arm: Introduce xen, passthrough property

2015-01-13 Thread Julien Grall
When a device is marked for passthrough (via the new property "xen,passthrough"), dom0 must not access to the device (i.e not loading a driver), but should be able to manage the MMIO/interrupt of the passthrough device. The latter part will allow the toolstack to map MMIO/IRQ when a device is pas

[Xen-devel] [PATCH v3 05/24] xen/arm: vgic: Introduce a function to initialize pending_irq

2015-01-13 Thread Julien Grall
The structure pending_irq is initialized on the same way in 2 differents place. Introduce vgic_init_pending_irq to avoid code duplication. Also move the setting of the irq field in this function as we need to initialize it once rather than every time an IRQ is injected to the guest. Finally, use

[Xen-devel] [PATCH v3 16/24] xen/passthrough: Introduce iommu_construct

2015-01-13 Thread Julien Grall
This new function will correctly initialize the IOMMU page table for the current domain. Also use it in iommu_assign_dt_device even though the current IOMMU implementation on ARM shares P2M with the processor. Signed-off-by: Julien Grall Cc: Jan Beulich --- Changes in v3: - The ASS

[Xen-devel] [PATCH v3 09/24] xen/arm: route_irq_to_guest: Check validity of the IRQ

2015-01-13 Thread Julien Grall
Currently Xen only supports SPIs routing for guest, add a function is_assignable_irq to check if we can assign a given IRQ to the guest. Secondly, make sure the vIRQ is not the greater that the number of IRQs handle to the vGIC and it's an SPIs. Thirdly, when the IRQ is already assigned to the do

[Xen-devel] [PATCH v3 04/24] xen: guestcopy: Provide an helper to safely copy string from guest

2015-01-13 Thread Julien Grall
Flask code already provides an helper to copy a string from guest. In a later patch, the new DT hypercalls will need a similar function. To avoid code duplication, copy the flask helper (flask_copying_string) to common code: - Rename into safe_copy_string_from_guest - Add comment to explai

[Xen-devel] [PATCH v3 00/24] xen/arm: Add support for non-pci passthrough

2015-01-13 Thread Julien Grall
Hello all, This is the third version of this patch series to add support for platform device passthrough on ARM. Compare to the previous version [1], the automatic mapping of MMIO/IRQ and the generation of the device tree has been dropped. Instead the user will have to: - Map manually MMIO/I

Re: [Xen-devel] [PATCH] libxl: provide xenlight.pc

2015-01-13 Thread Ian Campbell
On Tue, 2015-01-13 at 12:56 +, Wei Liu wrote: > On Tue, Jan 13, 2015 at 01:19:05PM +0100, Olaf Hering wrote: > > On Tue, Jan 13, Ian Campbell wrote: > > > > > On Fri, 2015-01-09 at 14:32 +, Wei Liu wrote: > > > > A pkg-config file for libxl. It also contains two variables > > > > (xenfirmw

Re: [Xen-devel] [PATCH v5 8/9] libxl: soft reset support

2015-01-13 Thread Ian Campbell
On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote: > Supported for HVM guests only. Is it specifically PVHVM guests, or are unaware HVM guests also supported? (I think the answer is that an unaware HVM guest has no way to trigger a soft reset, so maybe it's moot...) > diff --git a/tools/l

Re: [Xen-devel] [OSSTEST PATCH] make-flight: reorganize scheduling related test jobs

2015-01-13 Thread Dario Faggioli
On Mon, 2015-01-12 at 16:52 +, Ian Jackson wrote: > Dario Faggioli writes ("[OSSTEST PATCH] make-flight: reorganize scheduling > related test jobs"): > > Scheduling related tests are ok to run on ARM, so do > > not cut them off. They also do not depend on a > > particular Dom0 architecture. >

[Xen-devel] [seabios test] 33391: tolerable FAIL - PUSHED

2015-01-13 Thread xen . org
flight 33391 seabios real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/33391/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-pvh-intel 9 guest-start fail never pass test-amd64-i386-libvirt 9 guest-start

Re: [Xen-devel] [PATCH 01/10] xen/arm: Implement hip04-d01 platform

2015-01-13 Thread Frediano Ziglio
2015-01-13 11:58 GMT+00:00 Ian Campbell : > On Mon, 2014-11-03 at 10:11 +, Frediano Ziglio wrote: >> Add this new platform to Xen. >> This platform require specific code to initialize CPUs. > > What is the "bootwrapper"? Are you running this on real silicon or on an > emulator? Can the platform

Re: [Xen-devel] [PATCH v5 7/9] libxc: introduce soft reset for HVM domains

2015-01-13 Thread Ian Campbell
On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote: > Add new xc_domain_soft_reset() function which performs so-called 'soft reset' > for an HVM domain. It is being performed in the following way: > - Save HVM context and all HVM params; > - Devour original domain with XEN_DOMCTL_devour; > -

[Xen-devel] [RFC PATCHv1 net-next] xen-netback: always fully coalesce guest Rx packets

2015-01-13 Thread David Vrabel
Always fully coalesce guest Rx packets into the minimum number of ring slots. Reducing the number of slots per packet has significant performance benefits (e.g., 7.2 Gbit/s to 11 Gbit/s in an off-host receive test). However, this does increase the number of grant ops per packet which decreases pe

Re: [Xen-devel] [PATCH v5 6/9] libxl: add libxl__domain_soft_reset_destroy()

2015-01-13 Thread Ian Campbell
On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote: > New libxl__domain_soft_reset_destroy() is an internal-only > version of libxl_domain_destroy() which follows the same domain > destroy path with the only difference: xc_domain_destroy() is > being avoided so the domain is not actually bei

Re: [Xen-devel] [PATCH v3 5/5] tools: add total/local memory bandwith monitoring

2015-01-13 Thread Wei Liu
On Tue, Jan 13, 2015 at 04:02:13PM +0800, Chao Peng wrote: > Add Memory Bandwidth Monitoring(MBM) for VMs. Two types of monitoring > are supported: total and local memory bandwidth monitoring. To use it, > CMT should be enabled in hypervisor. > > Signed-off-by: Chao Peng > --- > docs/man/xl.pod.

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Ian Campbell
On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote: > +gmfn = mfn_to_gmfn(d, mfn); (I haven't thought about it super hard, but I'm taking it as given that this approach to kexec is going to be needed for ARM too, since that seems likely) mfn_to_gmfn is going to be a bit pricey

Re: [Xen-devel] [PATCH v3 4/5] tools: code refactoring for MBM

2015-01-13 Thread Wei Liu
On Tue, Jan 13, 2015 at 04:02:12PM +0800, Chao Peng wrote: > Make some internal routines common so that total/local memory bandwidth > monitoring in the next patch can make use of them. > > Signed-off-by: Chao Peng Acked-by: Wei Liu Could you please in your later patch submission include short

Re: [Xen-devel] (v2) Design proposal for RMRR fix

2015-01-13 Thread George Dunlap
On Tue, Jan 13, 2015 at 11:03 AM, Tian, Kevin wrote: >> Right; so the "report" in this case is "report to the guest". >> >> As I said, I think that's confusing terminology; after all, we want to >> report to the guest all holes that we make, and only the holes that we >> make. The question isn't

Re: [Xen-devel] [PATCH 04/10] xen/arm: Make gic-v2 code handle hip04-d01 platform

2015-01-13 Thread Frediano Ziglio
2015-01-13 11:54 GMT+00:00 Ian Campbell : > On Mon, 2014-11-03 at 10:11 +, Frediano Ziglio wrote: >> The GIC in this platform is mainly compatible with the standard >> GICv2 beside: >> - ITARGET is extended to 16 bit to support 16 CPUs; >> - SGI mask is extended to support 16 CPUs; >> - maximum

Re: [Xen-devel] [PATCH 2/2] sched: credit2: consider per-vcpu soft affinity

2015-01-13 Thread Dario Faggioli
On Sat, 2014-11-29 at 14:33 -1000, Justin T. Weaver wrote: > when deciding which run queue to assign each vcpu to. > > There are two main changes in functionality that this patch introduces. > > First, in function runq_tickle, it tries to find idle pcpus in other run > queues that the vcpu would

Re: [Xen-devel] [PATCH] libxl: provide xenlight.pc

2015-01-13 Thread Wei Liu
On Tue, Jan 13, 2015 at 01:19:05PM +0100, Olaf Hering wrote: > On Tue, Jan 13, Ian Campbell wrote: > > > On Fri, 2015-01-09 at 14:32 +, Wei Liu wrote: > > > A pkg-config file for libxl. It also contains two variables > > > (xenfirmwaredir and libexec_bin) so that tools that are very keen on >

[Xen-devel] [linux-next test] 33387: regressions - trouble: broken/fail/pass

2015-01-13 Thread xen . org
flight 33387 linux-next real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/33387/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl3 host-install(3) broken REGR. vs. 7 test-amd64-amd64-xl-qe

Re: [Xen-devel] [PATCH v2] [Bugfix] x86/apic: Fix xen IRQ allocation failure caused by commit b81975eade8c

2015-01-13 Thread Jiang Liu
On 2015/1/13 18:09, David Vrabel wrote: > On 13/01/15 02:23, Jiang Liu wrote: >> On 2015/1/12 23:01, David Vrabel wrote: >>> On 12/01/15 13:39, Jiang Liu wrote: Commit b81975eade8c ("x86, irq: Clean up irqdomain transition code") breaks xen IRQ allocation because xen_smp_prepare_cpus() do

Re: [Xen-devel] [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour

2015-01-13 Thread Ian Campbell
On Thu, 2014-12-18 at 13:57 +, Jan Beulich wrote: > >>> On 11.12.14 at 14:45, wrote: > > --- a/xen/common/domctl.c > > +++ b/xen/common/domctl.c > > @@ -1177,6 +1177,39 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) > > u_domctl) > > } > > break; > > > > +case XEN_DOMC

[Xen-devel] [PATCH v3 12/19] hvmloader: retrieve vNUMA information from hypervisor

2015-01-13 Thread Wei Liu
Hvmloader issues XENMEM_get_vnumainfo hypercall and stores the information retrieved in scratch space for later use. Signed-off-by: Wei Liu Cc: Jan Beulich --- Changes in v3: 1. Move init_vnuma_info before ACPI stuff. 2. Fix errno.h inclusion. 3. Remove upper limits and use loop. --- tools/firm

[Xen-devel] [PATCH v3 18/19] libxlutil: nested list support

2015-01-13 Thread Wei Liu
This is done with three major changes: 1. Rework internal representation of setting. 2. Extend grammar of parser. 3. Introduce new APIs. New APIs introduced: 1. xlu_cfg_value_type 2. xlu_cfg_value_get_string 3. xlu_cfg_value_get_list 4. xlu_cfg_get_listitem2 Previous APIs work as before. Nested

[Xen-devel] [PATCH v3 17/19] libxl: disallow memory relocation when vNUMA is enabled

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

[Xen-devel] [PATCH v3 13/19] hvmloader: construct SRAT

2015-01-13 Thread Wei Liu
Signed-off-by: Wei Liu Cc: Jan Beulich --- Changes in v3: 1. Remove redundant variable. 2. Coding style fix. 3. Add assertion. Changes in v2: 1. Remove explicit zero initializers. 2. Adapt to new vNUMA retrieval routine. 3. Move SRAT very late in secondary table build. --- tools/firmware/hvmload

[Xen-devel] [PATCH v3 15/19] libxc: allocate memory with vNUMA information for HVM guest

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

[Xen-devel] [PATCH v3 10/19] xen: handle XENMEM_get_vnumainfo in compat_memory_op

2015-01-13 Thread Wei Liu
Signed-off-by: Wei Liu Cc: Jan Beulich --- Changes in v3: 1. Fix hard tabs. 2. Fix subject line. 3. Add extra hunk to handle -ENOBUFS (hence drop Reviewed-by:) --- xen/common/compat/memory.c | 46 xen/include/xlat.lst |2 ++ 2 files change

[Xen-devel] [PATCH v3 14/19] hvmloader: construct SLIT

2015-01-13 Thread Wei Liu
Signed-off-by: Wei Liu Cc: Jan Beulich --- 1. Coding style fix. 2. Fix an error code. 3. Use unsigned int for loop variable. Changes in v2: 1. Adapt to new vNUMA retrieval routine. 2. Move SLIT very late in secondary table build. --- tools/firmware/hvmloader/acpi/acpi2_0.h |8 +++ tools/

[Xen-devel] [PATCH v3 19/19] xl: vNUMA support

2015-01-13 Thread Wei Liu
This patch includes configuration options parser and documentation. Please find the hunk to xl.cfg.pod.5 for more information. Signed-off-by: Wei Liu Cc: Ian Campbell Cc: Ian Jackson Cc: Dario Faggioli Cc: Elena Ufimtseva --- Changes in v2: 1. Make vnuma_vdistances mandatory. 2. Use nested l

[Xen-devel] [PATCH v3 11/19] tools/hvmloader: link errno.h from xen internal

2015-01-13 Thread Wei Liu
From: Tiejun Chen We need to act on some specific hypercall error numbers, so require the hypervisor view on the errno.h value rather than just the build environment's number. So here link this headfile from xen. Acked-by: Jan Beulich Signed-off-by: Tiejun Chen --- .gitignore

<    1   2   3   >