Re: [Xen-devel] Question about DMA on 1:1 mapping dom0 of arm64

2015-04-17 Thread Chen Baozi
Hi Stefano, On Fri, Apr 17, 2015 at 03:32:20PM +0100, Stefano Stabellini wrote: > On Fri, 17 Apr 2015, Chen Baozi wrote: > > Hi all, > > > > According to my recent experience, there might be some problems of swiotlb > > dma map on 1:1 mapping arm64 dom0 with large memory. The issue is like > > b

Re: [Xen-devel] converting gatewaydev= from domU.cfg to libvirt.xml fails

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Jim Fehlig wrote: > On 04/17/2015 12:50 PM, Olaf Hering wrote: > >How should this be converted? > > > >/etc/init.d/boot.local > >tap=xentap > >tunctl -pt ${tap} > >ip addr add 1.1.1.1/29 dev ${tap} > >ip link set up dev ${tap} > > > >domU.cfg > >vif=[ > >'mac=00:16:3e:13:01:00,ip=1

Re: [Xen-devel] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Jim Fehlig wrote: > On 04/17/2015 11:59 AM, Olaf Hering wrote: > >On Fri, Apr 17, Olaf Hering wrote: > > > >>If the domU configu has sdl enabled libvirtd crashes: > >>libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion > >>`!libxl_defbool_is_default(db)' failed. >

Re: [Xen-devel] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Jim Fehlig wrote: > On 04/17/2015 11:19 AM, Olaf Hering wrote: > >+libxl_defbool_set(&x_vfb->vnc.enable, 0); > Not shown here, but just before the switch is > > libxl_device_vfb_init(x_vfb); > > which IIUC (looking at the impl in $xensrc/tools/libxl/_libxl_types.

Re: [Xen-devel] [PATCH v5 p2 04/19] xen/arm: Implement hypercall DOMCTL_{, un}bind_pt_pirq

2015-04-17 Thread Daniel De Graaf
On 04/16/2015 10:55 AM, Ian Campbell wrote: On Thu, 2015-04-09 at 16:09 +0100, Julien Grall wrote: From: Julien Grall I've left the XSM related quotes untrimmed and CCd Daniel. I think it's all code motion (making x86 specific things generic), so perhaps no ack needed but an opportunity to na

Re: [Xen-devel] [PATCH v2 0/3] libxl: fd events: Recheck with poll

2015-04-17 Thread Konrad Rzeszutek Wilk
On Thu, Apr 16, 2015 at 07:24:44PM +0100, Ian Jackson wrote: > Ian Jackson writes > ("<21807.61130.841852.546...@mariner.uk.xensource.com>"): > > Gah, mangled the subject line. I've tested those three patches and they work fine. To make sure that they did fix the problem I went back to Xen befor

Re: [Xen-devel] converting gatewaydev= from domU.cfg to libvirt.xml fails

2015-04-17 Thread Jim Fehlig
On 04/17/2015 12:50 PM, Olaf Hering wrote: How should this be converted? /etc/init.d/boot.local tap=xentap tunctl -pt ${tap} ip addr add 1.1.1.1/29 dev ${tap} ip link set up dev ${tap} domU.cfg vif=[ 'mac=00:16:3e:13:01:00,ip=1.1.1.2,type=vif,gatewaydev=xentap,script=vif-route' ] The result f

Re: [Xen-devel] [PATCH 2/3] libxl: fd events: Break out fd_occurs

2015-04-17 Thread Konrad Rzeszutek Wilk
On Thu, Apr 16, 2015 at 07:23:27PM +0100, Ian Jackson wrote: > No functional change, only code motion. > > Currently, contrary to this function's name, there are two sites where > efd->func() is called so one of them doesn't go through here just yet. > That will be dealt with in the next commit.

Re: [Xen-devel] [PATCH] libxl: include a XLU_Config in _libxlDriverConfig

2015-04-17 Thread Jim Fehlig
On 04/17/2015 11:44 AM, Olaf Hering wrote: Upcoming changes for vscsi will use libxlutil.so to prepare the configuration for libxl. The helpers needs a xlu struct for logging. Provide one and reuse the existing output as log target. Signed-off-by: Olaf Hering Cc: Jim Fehlig --- src/libxl/lib

Re: [Xen-devel] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Jim Fehlig
On 04/17/2015 11:59 AM, Olaf Hering wrote: On Fri, Apr 17, Olaf Hering wrote: If the domU configu has sdl enabled libvirtd crashes: libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed. Initialize the relevant defbool variables in libxl_de

Re: [Xen-devel] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Jim Fehlig
On 04/17/2015 11:19 AM, Olaf Hering wrote: If the domU configu has sdl enabled libvirtd crashes: libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed. The assertion seems harsh considering the offense... Initialize the relevant defbool v

Re: [Xen-devel] Question about the tools/misc/xen-hptool

2015-04-17 Thread Andrew Cooper
On 17/04/15 19:48, Meng Xu wrote: > Hi, > > I'm trying to use the xen-hptool to make one memory page offline. I > tried to search around to see how to use this tool but didn't find any > manual/tutorial about it. First off, let me say that I have never used this interface before, so the rest of th

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

2015-04-17 Thread Prashant Sreedharan
On Fri, 2015-04-17 at 15:12 -0400, David Miller wrote: > From: Konrad Rzeszutek Wilk > Date: Fri, 17 Apr 2015 15:04:48 -0400 > > > From 9e417af099e3cee2b219ab28ffc1e96b0564b213 Mon Sep 17 00:00:00 2001 > > From: Konrad Rzeszutek Wilk > > Date: Fri, 17 Apr 2015 14:55:47 -0400 > > Subject: [PATCH]

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

2015-04-17 Thread David Miller
From: Konrad Rzeszutek Wilk Date: Fri, 17 Apr 2015 15:04:48 -0400 > From 9e417af099e3cee2b219ab28ffc1e96b0564b213 Mon Sep 17 00:00:00 2001 > From: Konrad Rzeszutek Wilk > Date: Fri, 17 Apr 2015 14:55:47 -0400 > Subject: [PATCH] config: Enable NEED_DMA_MAP_STATE when SWIOTLB is selected > > A hu

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

2015-04-17 Thread Konrad Rzeszutek Wilk
On Fri, Apr 17, 2015 at 10:46:09AM -0700, Michael Chan wrote: > On Fri, 2015-04-17 at 13:19 -0400, David Miller wrote: > > So the gist of the situation is, that NEED_DMA_MAP_STATE can be 'n' in > > situations where we might actually need it to be 'y' based upon kernel > > comman line boot options g

[Xen-devel] converting gatewaydev= from domU.cfg to libvirt.xml fails

2015-04-17 Thread Olaf Hering
How should this be converted? /etc/init.d/boot.local tap=xentap tunctl -pt ${tap} ip addr add 1.1.1.1/29 dev ${tap} ip link set up dev ${tap} domU.cfg vif=[ 'mac=00:16:3e:13:01:00,ip=1.1.1.2,type=vif,gatewaydev=xentap,script=vif-route' ] The result from "convert-xml xen-xl domU,cfg" is:

[Xen-devel] Question about the tools/misc/xen-hptool

2015-04-17 Thread Meng Xu
Hi, I'm trying to use the xen-hptool to make one memory page offline. I tried to search around to see how to use this tool but didn't find any manual/tutorial about it. I had a look at the code of xen-hptool.c and tried the command 'xen-hptool mem-offline' but it does not work (probably because o

Re: [Xen-devel] Is it ok to routing periperal irq to any Domain0's vCPU on Xen ARM 4.5.x?

2015-04-17 Thread 신정섭
NO "Peripheral IRQ routing" means that Xen select itself one of domain0's vCPU to inject periperal IRQ. So below Simple peripheral IRQ routing Code is a Example of Peripheral IRQ routing. periperal IRQ is injected to Domain0' vcpu0 or vcpu1 without vGIC Information. I know that periperal

Re: [Xen-devel] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Olaf Hering wrote: > If the domU configu has sdl enabled libvirtd crashes: > libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion > `!libxl_defbool_is_default(db)' failed. > > Initialize the relevant defbool variables in libxl_device_vfb. Fix one crash, find anoth

Re: [Xen-devel] [PATCH] libxl: initialize allocated libxl_device_vfb array

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Olaf Hering wrote: > Its already allocated by calloc, but the init function sets ->devid. Scratch that one, libxlMakeVfb already calls libxl_device_vfb_init. Somehow I missed that. Olaf ___ Xen-devel mailing list Xen-devel@lists.xen.or

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

2015-04-17 Thread Michael Chan
On Fri, 2015-04-17 at 13:19 -0400, David Miller wrote: > So the gist of the situation is, that NEED_DMA_MAP_STATE can be 'n' in > situations where we might actually need it to be 'y' based upon kernel > comman line boot options given. > > Right? Yes. > > __

[Xen-devel] [PATCH] libxl: include a XLU_Config in _libxlDriverConfig

2015-04-17 Thread Olaf Hering
Upcoming changes for vscsi will use libxlutil.so to prepare the configuration for libxl. The helpers needs a xlu struct for logging. Provide one and reuse the existing output as log target. Signed-off-by: Olaf Hering Cc: Jim Fehlig --- src/libxl/libxl_conf.c | 6 ++ src/libxl/libxl_conf.h |

[Xen-devel] [PATCH] libxl: initialize allocated libxl_device_vfb array

2015-04-17 Thread Olaf Hering
Its already allocated by calloc, but the init function sets ->devid. Just in case anything cares. Signed-off-by: Olaf Hering Cc: Jim Fehlig --- src/libxl/libxl_conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 6feb7d9..8b76fc7 10064

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

2015-04-17 Thread David Miller
From: Ian Jackson Date: Fri, 17 Apr 2015 17:29:28 +0100 > Prashant Sreedharan writes ("Re: tg3 NIC driver bug in 3.14.x under Xen [and > 3 more messages]"): >> Ok this is what is causing the problem, the driver uses >> DEFINE_DMA_UNMAP_ADDR(), dma_unmap_addr_set() to keep a copy of the dma >> "m

[Xen-devel] [PATCH] libxl: initialize vfb defbools in libxlMakeVfb

2015-04-17 Thread Olaf Hering
If the domU configu has sdl enabled libvirtd crashes: libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed. Initialize the relevant defbool variables in libxl_device_vfb. Signed-off-by: Olaf Hering Cc: Jim Fehlig --- Seen in 1.2.14. src/

Re: [Xen-devel] [PATCH v7 2/5] sysctl: Add sysctl interface for querying PCI topology

2015-04-17 Thread Andrew Cooper
On 17/04/15 17:59, Boris Ostrovsky wrote: > Signed-off-by: Boris Ostrovsky > Acked-by: Daniel De Graaf Reviewed-by: Andrew Cooper ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

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

2015-04-17 Thread Andrew Cooper
On 17/04/15 17:59, Boris Ostrovsky wrote: > A number of changes to XEN_SYSCTL_numainfo interface: > > * Make sysctl NUMA topology query use fewer copies by combining some > fields into a single structure and copying distances for each node > in a single copy. > * NULL meminfo and distance handl

[Xen-devel] [PATCH v7 2/5] sysctl: Add sysctl interface for querying PCI topology

2015-04-17 Thread Boris Ostrovsky
Signed-off-by: Boris Ostrovsky Acked-by: Daniel De Graaf --- Changes in v7: * Break from the loop when -ENODEV is encountered docs/misc/xsm-flask.txt |1 + xen/common/sysctl.c | 59 +++ xen/include/public/sysctl.h | 30

[Xen-devel] [PATCH v7 0/5] Display IO topology when PXM data is available (plus some cleanup)

2015-04-17 Thread Boris Ostrovsky
Changes in v7: * Allow one of arguments to NUMA info sysctls to be NULL, in which case only the non-NULL buffer will be filled in by hypervisor (patches 1 and 4) * Properly handle -ENODEVS in PCI topology sysctl (patch 2) * Error handling changes in patch 5 Changes in v6: * PCI topology interfac

[Xen-devel] [PATCH v7 5/5] libxl: Add interface for querying hypervisor about PCI topology

2015-04-17 Thread Boris Ostrovsky
.. and use this new interface to display it along with CPU topology and NUMA information when 'xl info -n' command is issued The output will look like ... cpu_topology : cpu:coresocket node 0: 000 ... device topology: device node

[Xen-devel] [PATCH v7 3/5] libxl/libxc: Move libxl_get_cpu_topology()'s hypercall buffer management to libxc

2015-04-17 Thread Boris Ostrovsky
xc_cputopoinfo() is not expected to be used on a hot path and therefore hypercall buffer management can be pushed into libxc. This will simplify life for callers. Also update error reporting macros. Signed-off-by: Boris Ostrovsky Acked-by: Ian Campbell --- tools/libxc/include/xenctrl.h |

[Xen-devel] [PATCH v7 4/5] libxl/libxc: Move libxl_get_numainfo()'s hypercall buffer management to libxc

2015-04-17 Thread Boris Ostrovsky
xc_numainfo() is not expected to be used on a hot path and therefore hypercall buffer management can be pushed into libxc. This will simplify life for callers. Also update error logging macros. Signed-off-by: Boris Ostrovsky Acked-by: Ian Campbell --- Changes in v7: * Dropped '!!meminfo ^ !!di

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

2015-04-17 Thread Boris Ostrovsky
A number of changes to XEN_SYSCTL_numainfo interface: * Make sysctl NUMA topology query use fewer copies by combining some fields into a single structure and copying distances for each node in a single copy. * NULL meminfo and distance handles are a request for maximum number of nodes (num_n

Re: [Xen-devel] Question about DMA on 1:1 mapping dom0 of arm64

2015-04-17 Thread Chen Baozi
On Fri, Apr 17, 2015 at 02:21:45PM +0100, Ian Campbell wrote: > On Fri, 2015-04-17 at 19:24 +0800, Chen Baozi wrote: > > Hi all, > > > > According to my recent experience, there might be some problems of swiotlb > > dma map on 1:1 mapping arm64 dom0 with large memory. The issue is like > > below:

Re: [Xen-devel] Question about DMA on 1:1 mapping dom0 of arm64

2015-04-17 Thread Ian Campbell
On Fri, 2015-04-17 at 17:13 +0100, Stefano Stabellini wrote: > On Fri, 17 Apr 2015, Ian Campbell wrote: > > On Fri, 2015-04-17 at 15:34 +0100, Stefano Stabellini wrote: > > > > > If I set dom0_mem to a small value (e.g. 512M), which makes all > > > > > physical memory > > > > > of dom0 below 4G, e

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

2015-04-17 Thread Ian Jackson
Prashant Sreedharan writes ("Re: tg3 NIC driver bug in 3.14.x under Xen [and 3 more messages]"): > Ok this is what is causing the problem, the driver uses > DEFINE_DMA_UNMAP_ADDR(), dma_unmap_addr_set() to keep a copy of the dma > "mapping" and dma_unmap_addr() to get the "mapping" value. On most

Re: [Xen-devel] Question about DMA on 1:1 mapping dom0 of arm64

2015-04-17 Thread Stefano Stabellini
On Fri, 17 Apr 2015, Ian Campbell wrote: > On Fri, 2015-04-17 at 15:34 +0100, Stefano Stabellini wrote: > > > > If I set dom0_mem to a small value (e.g. 512M), which makes all > > > > physical memory > > > > of dom0 below 4G, everything goes fine. > > > > > > So you are getting allocated memory b

Re: [Xen-devel] crash in efi_runtime_call

2015-04-17 Thread Konrad Rzeszutek Wilk
On Fri, Apr 17, 2015 at 04:31:18PM +0200, Olaf Hering wrote: > On Fri, Apr 17, Konrad Rzeszutek Wilk wrote: > > > The /noexitboot will inhibit Xen from calling ExitBootServices. > > How is that supposed to be passed to xen.efi? Looks like I have no > cmdline interface. EFI Shell. Or you can ru

Re: [Xen-devel] Commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622: "x86 don't change affinity with interrupt unmasked", APCI errors and assorted pci trouble

2015-04-17 Thread Sander Eikelenboom
Friday, April 17, 2015, 5:46:56 PM, you wrote: > On 17/04/15 16:20, Jan Beulich wrote: > On 17.04.15 at 17:11, wrote: >>> Friday, April 17, 2015, 1:43:32 PM, you wrote: --- unstable.orig/xen/drivers/passthrough/amd/iommu_intr.c +++ unstable/xen/drivers/passthrough/amd/iommu_intr.c

Re: [Xen-devel] Commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622: "x86 don't change affinity with interrupt unmasked", APCI errors and assorted pci trouble

2015-04-17 Thread Andrew Cooper
On 17/04/15 16:20, Jan Beulich wrote: On 17.04.15 at 17:11, wrote: >> Friday, April 17, 2015, 1:43:32 PM, you wrote: >>> --- unstable.orig/xen/drivers/passthrough/amd/iommu_intr.c >>> +++ unstable/xen/drivers/passthrough/amd/iommu_intr.c >>> @@ -365,15 +365,17 @@ unsigned int amd_iommu_read_i

[Xen-devel] [PATCH] libxl: document foreground '-F' option of create command

2015-04-17 Thread Giuseppe Mazzotta
commit 482b29753946125bbcf892a5daa57b86620f68b1 Author: Giuseppe Mazzotta Date: Fri Apr 17 17:10:03 2015 +0200 libxl: document foreground '-F' option of create command Signed-off-by: Giuseppe Mazzotta diff --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c index 928488

[Xen-devel] [PATCH] AMD IOMMU: only translate remapped IO-APIC RTEs

2015-04-17 Thread Jan Beulich
1aeb1156fa ("x86 don't change affinity with interrupt unmasked") introducing RTE reads prior to the respective interrupt having got enabled for the first time uncovered a bug in 2ca9fbd739 ("AMD IOMMU: allocate IRTE entries instead of using a static mapping"): We obviously shouldn't be translating

Re: [Xen-devel] Commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622: "x86 don't change affinity with interrupt unmasked", APCI errors and assorted pci trouble

2015-04-17 Thread Jan Beulich
>>> On 17.04.15 at 17:11, wrote: > Friday, April 17, 2015, 1:43:32 PM, you wrote: >> --- unstable.orig/xen/drivers/passthrough/amd/iommu_intr.c >> +++ unstable/xen/drivers/passthrough/amd/iommu_intr.c >> @@ -365,15 +365,17 @@ unsigned int amd_iommu_read_ioapic_from_ >> unsigned int apic, unsi

Re: [Xen-devel] Commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622: "x86 don't change affinity with interrupt unmasked", APCI errors and assorted pci trouble

2015-04-17 Thread Sander Eikelenboom
Friday, April 17, 2015, 1:43:32 PM, you wrote: On 14.04.15 at 14:46, wrote: >> I just had a hunch .. could it be related to the kernel apci/irq refactoring >> series of Jiang Liu, that already caused a lot of trouble in 3.17, 3.18 and >> 3.19 >> with Xen. And yes that seems to be the case

Re: [Xen-devel] Question about DMA on 1:1 mapping dom0 of arm64

2015-04-17 Thread Ian Campbell
On Fri, 2015-04-17 at 15:34 +0100, Stefano Stabellini wrote: > > > If I set dom0_mem to a small value (e.g. 512M), which makes all physical > > > memory > > > of dom0 below 4G, everything goes fine. > > > > So you are getting allocated memory below 4G? > > > > You message on IRC suggested you we

Re: [Xen-devel] [PATCH v4 12/12] docs: add xl-psr.markdown

2015-04-17 Thread Chao Peng
On Thu, Apr 16, 2015 at 12:58:16PM +0100, Ian Campbell wrote: > On Thu, 2015-04-09 at 17:18 +0800, Chao Peng wrote: > > BTW, do you know if someone is planning to work on libvirt integration > for this stuff? As I know, there are people from Intel will take care of this. > (Aside: "cache-occupan

Re: [Xen-devel] Question about DMA on 1:1 mapping dom0 of arm64

2015-04-17 Thread Ian Campbell
On Fri, 2015-04-17 at 15:32 +0100, Stefano Stabellini wrote: > I think that given that dom0 is mapped 1:1 on ARM, the easiest and best > fix would be to simply allocate memory under 4G to begin with. Not necessarily best, see my reply (hint: dom0 might not have RAM under 4GB even if the host does)

Re: [Xen-devel] Question about DMA on 1:1 mapping dom0 of arm64

2015-04-17 Thread Stefano Stabellini
On Fri, 17 Apr 2015, Ian Campbell wrote: > On Fri, 2015-04-17 at 19:24 +0800, Chen Baozi wrote: > > Hi all, > > > > According to my recent experience, there might be some problems of swiotlb > > dma map on 1:1 mapping arm64 dom0 with large memory. The issue is like > > below: > > > > For those a

[Xen-devel] [PATCH v5 12/13] tools: add tools support for Intel CAT

2015-04-17 Thread Chao Peng
This is the xc/xl changes to support Intel Cache Allocation Technology(CAT). Two commands are introduced: - xl psr-cat-hwinfo Show CAT hardware information. - xl psr-cat-cbm-set [-s socket] Set cache capacity bitmasks(CBM) for a domain. - xl psr-cat-show Show CAT domain information. Examp

[Xen-devel] [PATCH v5 06/13] x86: expose CBM length and COS number information

2015-04-17 Thread Chao Peng
General CAT information such as maximum COS and CBM length are exposed to user space by a SYSCTL hypercall, to help user space to construct the CBM. Signed-off-by: Chao Peng Reviewed-by: Andrew Cooper --- xen/arch/x86/psr.c | 31 +++ xen/arch/x86/sysctl.c

[Xen-devel] [PATCH v5 13/13] docs: add xl-psr.markdown

2015-04-17 Thread Chao Peng
Add document to introduce basic concepts and terms in PSR family technologies and the xl interfaces. Signed-off-by: Chao Peng --- Changes in v5: * Address comments from Andrew/Ian. --- docs/man/xl.pod.1 | 10 +++- docs/misc/xl-psr.markdown | 134 +

[Xen-devel] [PATCH v5 07/13] x86: dynamically get/set CBM for a domain

2015-04-17 Thread Chao Peng
For CAT, COS is maintained in hypervisor only while CBM is exposed to user space directly to allow getting/setting domain's cache capacity. For each specified CBM, hypervisor will either use a existed COS which has the same CBM or allocate a new one if the same CBM is not found. If the allocation f

[Xen-devel] [PATCH v5 05/13] x86: add COS information for each domain

2015-04-17 Thread Chao Peng
In Xen's implementation, the CAT enforcement granularity is per domain. Due to the length of CBM and the number of COS may be socket-different, each domain has COS ID for each socket. The domain get COS=0 by default and at runtime its COS is then allocated dynamically when user specifies a CBM for

[Xen-devel] [PATCH v5 08/13] x86: add scheduling support for Intel CAT

2015-04-17 Thread Chao Peng
On context switch, write the the domain's Class of Service(COS) to MSR IA32_PQR_ASSOC, to notify hardware to use the new COS. For performance reason, the COS mask for current cpu is also cached in the local per-CPU variable. Signed-off-by: Chao Peng --- Changes in v5: * Remove the need to cache

[Xen-devel] [PATCH v5 11/13] tools/libxl: add command to show CMT hardware info

2015-04-17 Thread Chao Peng
Add dedicated one to show hardware information. [root@vmm-psr]xl psr-cmt-hwinfo Cache Monitoring Technology (CMT): Enabled : 1 Total RMID : 63 Supported monitor types: cache-occupancy total-mem-bandwidth local-mem-bandwidth Signed-off-by: Chao Peng --- docs/man/xl.pod.1 |

[Xen-devel] [PATCH v5 10/13] tools/libxl: minor name changes for CMT commands

2015-04-17 Thread Chao Peng
Use "-" instead of "_" for monitor types. Signed-off-by: Chao Peng --- tools/libxl/xl_cmdimpl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 394b55d..c666d84 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/

[Xen-devel] [PATCH v5 00/13] enable Cache Allocation Technology (CAT) for VMs

2015-04-17 Thread Chao Peng
Changes in v5: * Address comments from Andrew and Ian(Detail in patch). * Add socket_to_cpumask. * Add xl psr-cmt/cat-hwinfo. * Add some libxl CMT enhancement. Changes in v4: * Address comments from Andrew and Ian(Detail in patch). * Split COS/CBM management patch into 4 small patches. * Add docume

[Xen-devel] [PATCH v5 09/13] xsm: add CAT related xsm policies

2015-04-17 Thread Chao Peng
Add xsm policies for Cache Allocation Technology(CAT) related hypercalls to restrict the functions visibility to control domain only. Signed-off-by: Chao Peng Acked-by: Daniel De Graaf --- tools/flask/policy/policy/modules/xen/xen.if | 2 +- tools/flask/policy/policy/modules/xen/xen.te | 4 +++

[Xen-devel] [PATCH v5 01/13] x86: add socket_to_cpumask

2015-04-17 Thread Chao Peng
Maintain socket_to_cpumask which contains all the HT and core siblings in the same socket. Signed-off-by: Chao Peng --- xen/arch/x86/smpboot.c| 15 +++ xen/include/asm-x86/smp.h | 8 2 files changed, 23 insertions(+) diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/s

[Xen-devel] [PATCH v5 02/13] x86: improve psr scheduling code

2015-04-17 Thread Chao Peng
Switching RMID from previous vcpu to next vcpu only needs to write MSR_IA32_PSR_ASSOC once. Write it with the value of next vcpu is enough, no need to write '0' first. Idle domain has RMID set to 0 and because MSR is already updated lazily, so just switch it as it does. Also move the initializatio

[Xen-devel] [PATCH v5 04/13] x86: maintain COS to CBM mapping for each socket

2015-04-17 Thread Chao Peng
For each socket, a COS to CBM mapping structure is maintained for each COS. The mapping is indexed by COS and the value is the corresponding CBM. Different VMs may use the same CBM, a reference count is used to indicate if the CBM is available. Signed-off-by: Chao Peng Reviewed-by: Andrew Cooper

[Xen-devel] [PATCH v5 03/13] x86: detect and initialize Intel CAT feature

2015-04-17 Thread Chao Peng
Detect Intel Cache Allocation Technology(CAT) feature and store the cpuid information for later use. Currently only L3 cache allocation is supported. The L3 CAT features may vary among sockets so per-socket feature information is stored. The initialization can happen either at boot time or when CPU

Re: [Xen-devel] Question about DMA on 1:1 mapping dom0 of arm64

2015-04-17 Thread Stefano Stabellini
On Fri, 17 Apr 2015, Chen Baozi wrote: > Hi all, > > According to my recent experience, there might be some problems of swiotlb > dma map on 1:1 mapping arm64 dom0 with large memory. The issue is like below: > > For those arm64 server with large memory, it is possible to set dom0_mem > > 4G (e.g.

Re: [Xen-devel] crash in efi_runtime_call

2015-04-17 Thread Olaf Hering
On Fri, Apr 17, Konrad Rzeszutek Wilk wrote: > The /noexitboot will inhibit Xen from calling ExitBootServices. How is that supposed to be passed to xen.efi? Looks like I have no cmdline interface. Olaf ___ Xen-devel mailing list Xen-devel@lists.xen.or

Re: [Xen-devel] Commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622: "x86 don't change affinity with interrupt unmasked", APCI errors and assorted pci trouble

2015-04-17 Thread Sander Eikelenboom
Friday, April 17, 2015, 1:43:32 PM, you wrote: On 14.04.15 at 14:46, wrote: >> I just had a hunch .. could it be related to the kernel apci/irq refactoring >> series of Jiang Liu, that already caused a lot of trouble in 3.17, 3.18 and >> 3.19 >> with Xen. And yes that seems to be the case

[Xen-devel] [PATCH v2 18/19] xen: arm: Annotate registers trapped when CNTHCTL_EL2.EL1PCEN == 0

2015-04-17 Thread Ian Campbell
Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index c869b96..ad6ff05 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1653,6 +1653,12 @@ static void do_cp15

Re: [Xen-devel] crash in efi_runtime_call

2015-04-17 Thread Konrad Rzeszutek Wilk
On Fri, Apr 17, 2015 at 02:45:23PM +0100, Andrew Cooper wrote: > On 17/04/15 14:40, Konrad Rzeszutek Wilk wrote: > > On Fri, Apr 17, 2015 at 01:54:28PM +0100, Andrew Cooper wrote: > >> On 17/04/15 13:39, Jan Beulich wrote: > >> On 17.04.15 at 13:59, wrote: > On 17/04/15 12:17, Olaf Hering

[Xen-devel] [PATCH v2 12/19] xen: arm: Annotate the handlers for HSTR_EL2.T15

2015-04-17 Thread Ian Campbell
Signed-off-by: Ian Campbell --- v2: s/Tx/T15/ --- xen/arch/arm/traps.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index a2bae51..86b5655 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1720,6 +1720,11 @@ static vo

[Xen-devel] [PATCH v2 15/19] xen: arm: Annotate registers trapped by MDCR_EL2.TDA

2015-04-17 Thread Ian Campbell
Gather the affected handlers in a single place per trap type. Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 60 +- 1 file changed, 49 insertions(+), 11 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 7606bff.

[Xen-devel] [PATCH v2 16/19] xen: arm: Annotate registers trapped by MDCR_EL2.TPM and TPMCR

2015-04-17 Thread Ian Campbell
Signed-off-by: Ian Campbell --- xen/arch/arm/traps.c | 39 ++- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 97cde45..d4505b5 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -1

[Xen-devel] [PATCH v2 17/19] xen: arm: Remove CNTPCT_EL0 trap handling.

2015-04-17 Thread Ian Campbell
We set CNTHCTL_EL2.EL1PCTEN and therefore according to ARMv8 (DDI 0487A.d) D1-1510 Table D1-60 we are not trapping this. Signed-off-by: Ian Campbell Reviewed-by: Julien Grall --- xen/arch/arm/traps.c |1 - xen/arch/arm/vtimer.c | 30 -- 2 files changed, 31 del

[Xen-devel] [PATCH v2 00/19] xen: arm: cleanup traps.c

2015-04-17 Thread Ian Campbell
While working on reenabling 32-bit user space on arm63 I concluded that the trap handling in traps.c had grown into a twisty confusing mess. Lets try and sort that out. This series contains two halves (after a couple of preparatory cleanups). First clean up the goto maze which we've found ourselv

[Xen-devel] [PATCH v2 03/19] xen: arm: call inject_undef_exception directly

2015-04-17 Thread Ian Campbell
Reducing the amount of goto maze considerably. Signed-off-by: Ian Campbell Reviewed-by: Julien Grall --- xen/arch/arm/traps.c | 56 +++--- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c in

[Xen-devel] [PATCH v2 05/19] xen: arm: Add and use r/o+raz and w/o+wi helpers

2015-04-17 Thread Ian Campbell
Signed-off-by: Ian Campbell --- v2: Move last paramter of a handle_ro_raz call to next patch where it belongs. --- xen/arch/arm/traps.c | 52 -- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/ar

[Xen-devel] [PATCH v2 06/19] xen: arm: add minimum exception level argument to trap handler helpers

2015-04-17 Thread Ian Campbell
Removes a load of boiler plate. Signed-off-by: Ian Campbell --- v2: Move last parameter of a call to handle_ro_raz here where it belongs. Added asserts for valid min_el values --- xen/arch/arm/traps.c | 73 +++--- 1 file changed, 39 insertion

[Xen-devel] [PATCH v2 14/19] xen: arm: Annotate registers trapped by MDCR_EL2.TDOSA

2015-04-17 Thread Ian Campbell
Gather the affected handlers in a single place per trap type. Add some HSR_SYSREG and AArch32 defines for those registers (because I'd already typed them in when I realised I didn't need them). Signed-off-by: Ian Campbell --- v2: Move comment block in cp14_dbg handler from incorrect place in

[Xen-devel] [PATCH v2 07/19] xen: arm: Annotate trap handler for HSR_EL2.{TWI, TWE, TSC}

2015-04-17 Thread Ian Campbell
Reference the bit which enables the trap and the section/page which describes what that bit enables. These ones are pretty trivial, included for completeness. Signed-off-by: Ian Campbell --- v2: s/HSR_EL2/HCR_EL2/ --- xen/arch/arm/traps.c | 17 + 1 file changed, 17 insertions(

[Xen-devel] [PATCH v2 09/19] xen: arm: Annotate registers trapped by HCR_EL1.TIDCP

2015-04-17 Thread Ian Campbell
This traps variety of implementation defined registers, so add a note to the default case of the respective handler. Signed-off-by: Ian Campbell Reviewed-by: Julien Grall --- v2: Typo in subject --- xen/arch/arm/traps.c | 16 1 file changed, 16 insertions(+) diff --git a/xen

[Xen-devel] [PATCH v2 01/19] xen: arm: constify union hsr and struct hsr_* where possible.

2015-04-17 Thread Ian Campbell
Signed-off-by: Ian Campbell Reviewed-by: Julien Grall --- xen/arch/arm/traps.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index aaa9d93..69b9513 100644 --- a/xen/arch/arm/traps.c ++

[Xen-devel] [PATCH v2 08/19] xen: arm: implement handling of ACTLR_EL1 trap

2015-04-17 Thread Ian Campbell
While annotating ACTLR I noticed that we don't appear to handle the 64-bit version of this trap. Do so and annotate everything. Signed-off-by: Ian Campbell --- v2: s/TASC/TACR/ and s/HSR/HCR/ --- xen/arch/arm/traps.c | 20 xen/include/asm-arm/sysregs.h |1 + 2

[Xen-devel] [PATCH v2 19/19] xen: arm: Annotate source of ICC SGI register trapping

2015-04-17 Thread Ian Campbell
I was unable to find an ARMv8 ARM reference to this, so refer to the GIC Architecture Specification instead. ARMv8 ARM does cover other ways of trapping these accesses via ICH_HCR_EL2 but we don't use those and they trap additional registers as well. Signed-off-by: Ian Campbell Reviewed-by: Juli

[Xen-devel] [PATCH v2 10/19] xen: arm: implement handling of registers trapped by CPTR_EL2.TTA

2015-04-17 Thread Ian Campbell
Add explicit handler for 64-bit CP14 accesses, with more relevant debug message (as per other handlers) and to provide a place for a comment. Signed-off-by: Ian Campbell --- v2: Changed title from "xen: arm: Annotate registers trapped by CPTR_EL2.TTA" Add "And all other unknown registers"

[Xen-devel] [PATCH v2 13/19] xen: arm: Annotate registers trapped by MDCR_EL2.TDRA

2015-04-17 Thread Ian Campbell
DBGDRAR and DBGDSAR are actually two cp or sys registers each, one 32-bit and one 64-bit. The cpregs #define is suffixed "64" and annotations are added to both handlers. MDRAR_EL1 (arm64 version of DBGDRAR) wasn't handled, so add that here. Signed-off-by: Ian Campbell --- v2: Move comment next t

[Xen-devel] [PATCH v2 04/19] xen: arm: provide and use a handle_raz_wi helper

2015-04-17 Thread Ian Campbell
Reduces the use of goto in the trap handlers to none. Some explicitly 32-bit types become register_t here, but that's OK, on 32-bit they are 32-bit already and on 64-bit it is fine/harmless to set the larger register, a 32-bit guest won't see the top half in any case. Per section B1.2.1 (ARMv8 DD

Re: [Xen-devel] [PATCH v2 2/4] x86/MSI-X: access MSI-X table only after having enabled MSI-X

2015-04-17 Thread Jan Beulich
>>> On 15.04.15 at 19:41, wrote: > On Mon, Apr 13, 2015 at 10:05:14AM +0100, Jan Beulich wrote: >> >>> On 10.04.15 at 22:02, wrote: >> > On Wed, Mar 25, 2015 at 04:39:49PM +, Jan Beulich wrote: >> >> As done in Linux by f598282f51 ("PCI: Fix the NIU MSI-X problem in a >> >> better way") and i

[Xen-devel] [PATCH v2 11/19] xen: arm: Annotate handlers for CPTR_EL2.Tx

2015-04-17 Thread Ian Campbell
Also expand on the comment when writing CPTR_EL2 to mention that most of the bits we are setting are RES1 on arm64 anyway. Signed-off-by: Ian Campbell --- v2: s/PCTR/CPTR/ Expand the comment when writing to CPTR_EL2 --- xen/arch/arm/traps.c | 23 +-- 1 file changed, 21

[Xen-devel] [PATCH v2 02/19] xen: arm: Fix handling of ICC_{SGI1R, SGI0R, ASGI1R}_EL1

2015-04-17 Thread Ian Campbell
Having injected an undefined instruction we don't want to also advance pc. So return. The ICC_{SGI0R,ASGI1R}_EL1 case was previously missing a break, so would have fallen through to the default case and injected a second undef, corrupting SPSR_EL1 and ELR_EL1 for the guest. Signed-off-by: Ian Cam

Re: [Xen-devel] crash in efi_runtime_call

2015-04-17 Thread Jan Beulich
>>> On 17.04.15 at 15:40, wrote: > I actually did cobble a patch like this, but it is based on Daniel's > Multibootv2 > so it won't apply cleany. See attached patchset with various 'work-arounds'. > > Jan if you are OK with them (well the 'idea' behind them) I can refresh > it against staging an

Re: [Xen-devel] crash in efi_runtime_call

2015-04-17 Thread Andrew Cooper
On 17/04/15 14:40, Konrad Rzeszutek Wilk wrote: > On Fri, Apr 17, 2015 at 01:54:28PM +0100, Andrew Cooper wrote: >> On 17/04/15 13:39, Jan Beulich wrote: >> On 17.04.15 at 13:59, wrote: On 17/04/15 12:17, Olaf Hering wrote: > Since booting xen fails on my ProBook unless I specify "max

Re: [Xen-devel] [PATCH v2 2/3] xen: arm: propagate gic's #interrupt-cells property to dom0.

2015-04-17 Thread Ian Campbell
On Mon, 2015-03-16 at 16:01 +, Julien Grall wrote: > Hi Ian, > > On 12/03/15 17:17, Ian Campbell wrote: > > This is similar to 816f5bb1f074 "xen: arm: propagate gic's > > should propagate (rather than invent our own value) since this value > > is used to size fields within other properties wit

Re: [Xen-devel] crash in efi_runtime_call

2015-04-17 Thread Konrad Rzeszutek Wilk
On Fri, Apr 17, 2015 at 01:54:28PM +0100, Andrew Cooper wrote: > On 17/04/15 13:39, Jan Beulich wrote: > On 17.04.15 at 13:59, wrote: > >> On 17/04/15 12:17, Olaf Hering wrote: > >>> Since booting xen fails on my ProBook unless I specify "maxcpus=1" I > >>> tried the EFI firmware today. To my

Re: [Xen-devel] Archiving Xen on ARM and PVOPS subprojects

2015-04-17 Thread Stefano Stabellini
On Wed, 15 Apr 2015, Lars Kurth wrote: > Hi all, > I wanted to make the proposal to archive the following two subproject on the > grounds that they completed their goals > > a) http://xenproject.org/developers/teams/pvops.html > b) http://xenproject.org/developers/teams/arm-hypervisor.html > > I

Re: [Xen-devel] Question about DMA on 1:1 mapping dom0 of arm64

2015-04-17 Thread Ian Campbell
On Fri, 2015-04-17 at 19:24 +0800, Chen Baozi wrote: > Hi all, > > According to my recent experience, there might be some problems of swiotlb > dma map on 1:1 mapping arm64 dom0 with large memory. The issue is like below: > > For those arm64 server with large memory, it is possible to set dom0_me

Re: [Xen-devel] [PATCHv2 3/6] xen: generic xadd() for ticket locks

2015-04-17 Thread David Vrabel
On 17/04/15 14:09, Ian Campbell wrote: > On Fri, 2015-04-17 at 13:34 +0100, David Vrabel wrote: >> >> Can you use >> >> git://xenbits.xen.org/people/dvrabel/xen.git ticketlocks-v3 git://xenbits.xen.org/people/dvrabel/xen.git ticketlock-v3 > I tried that and it built and booted just fine on both

[Xen-devel] [PATCH 2/2] raisin: introduce seabios component

2015-04-17 Thread Stefano Stabellini
Build SeaBIOS as a separate component. Pass --with-system-seabios to the xen configure script. Signed-off-by: Stefano Stabellini --- components/seabios | 57 components/series |1 + components/xen |3 ++- defconfig |

[Xen-devel] [PATCH v2 1/2] raisin: add a component to build qemu_traditional

2015-04-17 Thread Stefano Stabellini
Introduce a component to build qemu-traditional out of xen-unstable. Do not compile qemu-traditional from xen-unstable by passing the right command line option to configure. Signed-off-by: Stefano Stabellini --- components/qemu_traditional | 49 +++ comp

[Xen-devel] [PATCH 0/2] raisin: build qemu-traditional and seabios

2015-04-17 Thread Stefano Stabellini
Hi all, This patch series builds qemu-traditional and seabios separately from the Xen tree. It also change the QEMU build to be more Xen specific, installing the QEMU binary under /usr/lib/xen/bin. Changes compared to the previous version of the qemu-traditional patch: - --enable-rombios (otherw

Re: [Xen-devel] [PATCHv2 3/6] xen: generic xadd() for ticket locks

2015-04-17 Thread Ian Campbell
On Fri, 2015-04-17 at 13:34 +0100, David Vrabel wrote: > On 17/04/15 13:32, Ian Campbell wrote: > > On Thu, 2015-04-16 at 16:28 +0100, Jan Beulich wrote: > > On 10.04.15 at 16:19, wrote: > >>> +#define xadd(ptr, v) generic_xaddl((ptr), (v)) > >> > >> I think it is at least confusing to call th

Re: [Xen-devel] crash in efi_runtime_call

2015-04-17 Thread Andrew Cooper
On 17/04/15 13:39, Jan Beulich wrote: On 17.04.15 at 13:59, wrote: >> On 17/04/15 12:17, Olaf Hering wrote: >>> Since booting xen fails on my ProBook unless I specify "maxcpus=1" I >>> tried the EFI firmware today. To my surprise it boots and finds all >>> cpus. But once some efi driver in do

Re: [Xen-devel] crash in efi_runtime_call

2015-04-17 Thread Jan Beulich
>>> On 17.04.15 at 13:59, wrote: > On 17/04/15 12:17, Olaf Hering wrote: >> Since booting xen fails on my ProBook unless I specify "maxcpus=1" I >> tried the EFI firmware today. To my surprise it boots and finds all >> cpus. But once some efi driver in dom0 is loaded xen crashes. The same >> happe

  1   2   >