Re: [Xen-devel] [PATCH for-4.5 v8 4/7] xen: Add vmware_port support

2015-01-26 Thread Jan Beulich
>>> On 26.01.15 at 21:19, wrote: > On 01/26/15 11:46, Jan Beulich wrote: >> As stated before - if feasible, 8 would seem the best option. The >> second best one would be to support all four I/O insns (assuming >> VMware supports all of them too) with any legal (even if pointless >> or redundant) p

Re: [Xen-devel] EFI GetNextVariableName crashes when running under Xen, but not under Linux. efi-rs=0 works. No memmap issues

2015-01-26 Thread Jan Beulich
(re-adding xen-devel) >>> On 27.01.15 at 01:32, wrote: > On 27/01/2015 00:02, Daniel Kiper wrote: >> On Mon, Jan 26, 2015 at 05:00:41PM +, Jan Beulich wrote: >> On 26.01.15 at 17:27, wrote: Anyhow I am bit stuck: 1) It works with Linux, so what is it that Linux does that

[Xen-devel] Some questions about Interrupt and event channel about Xen on ARM.

2015-01-26 Thread 신정섭
Hi I'm studying about Xen 4.4.0 and Xen 4.5.0 on ARM I have some questions about Interrupt and event channel on ARM. 1.In Xen 4.4.X and Xen 4.5.0 (GIC v2), all pirq(physical irq) are go to pcpu0 (physical cpu). After pirq, Xen run in pcpu0 only inject virq(virtual irq) to vcpu0 of Dom0.I th

Re: [Xen-devel] [PATCH RFC] p2m: p2m_mmio_direct set RW permissions

2015-01-26 Thread Tian, Kevin
> From: Elena Ufimtseva [mailto:elena.ufimts...@oracle.com] > Sent: Tuesday, January 27, 2015 1:31 AM > > On Mon, Jan 26, 2015 at 05:06:12PM +, Jan Beulich wrote: > > >>> On 26.01.15 at 17:57, wrote: > > > On Fri, Jan 23, 2015 at 10:50:23AM +, Jan Beulich wrote: > > >> >>> On 22.01.15 at

[Xen-devel] [PATCH v7 1/5] x86: allow reading MSR_IA32_TSC with XENPF_resource_op

2015-01-26 Thread Chao Peng
Memory bandwidth monitoring requires system time information returned along with the monitoring counter to verify the correctness of the counter value and to calculate the time elapsed between two samplings. Add MSR_IA32_TSC to the read path and it returns scaled system time(ns) instead of raw tim

[Xen-devel] [PATCH v7 0/5] enable Memory Bandwidth Monitoring (MBM) for VMs

2015-01-26 Thread Chao Peng
Changes from v6: * Obfuscate the read value of MSR_IA32_TSC by adding a booting random; * Minor coding style/comments adjustment; Changes from v5: * Remove common IRQ disable flag but instead disable IRQ when other MSR read followed by MSR_IA32_TSC read; * Add comments for special handle for MSR

[Xen-devel] [PATCH v7 3/5] tools: correct coding style for psr

2015-01-26 Thread Chao Peng
- space: remove space after '(' or before ')' in 'if' condition; - indention: align function definition/call arguments; Signed-off-by: Chao Peng Acked-by: Wei Liu --- tools/libxc/include/xenctrl.h | 10 +- tools/libxc/xc_psr.c | 10 +- tools/libxl/libxl.h | 11

[Xen-devel] [PATCH v7 5/5] tools, docs: add total/local memory bandwith monitoring

2015-01-26 Thread Chao Peng
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 --- Changes in v6: 1. Remove DISABLE_IRQ flag as hypervisor disable IRQ for MSR_IA32_TSC im

[Xen-devel] [PATCH v7 2/5] tools: add routine to get CMT L3 event mask

2015-01-26 Thread Chao Peng
This is the tools side wrapper for XEN_SYSCTL_PSR_CMT_get_l3_event_mask of XEN_SYSCTL_psr_cmt_op. Signed-off-by: Chao Peng --- tools/libxc/include/xenctrl.h | 1 + tools/libxc/xc_psr.c | 17 + tools/libxl/libxl.h | 1 + tools/libxl/libxl_psr.c | 15

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

2015-01-26 Thread Chao Peng
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 --- tools/libxl/libxl_psr.c | 44 +-- tools/libxl/xl_cmdimpl.c | 54

Re: [Xen-devel] VM-exit instruction length and #GP fault on IN.

2015-01-26 Thread Tian, Kevin
> From: Don Slutz [mailto:dsl...@verizon.com] > Sent: Tuesday, January 27, 2015 4:31 AM > > The question is about the VM-exit instruction length field. > > This is accessed in xen via: > >__vmread(VM_EXIT_INSTRUCTION_LEN, &inst_len); > > an example of which is in routine get_instruction_len

[Xen-devel] [linux-3.10 test] 33812: regressions - FAIL

2015-01-26 Thread xen . org
flight 33812 linux-3.10 real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/33812/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-libvirt 5 xen-boot fail REGR. vs. 26303 test-amd64-i386-xl

[Xen-devel] Porting libvchan to use the Windows PV Drivers

2015-01-26 Thread Christian Refvik
Hi guys, I'm a new Xen developer. However, I've been looking at porting the libvchan library so that it uses the Windows PV Drivers that are currently checked in. As far as libvchan is concerned, (I think) I understand it fairly well. I've even started to create some documentation which I'm

[Xen-devel] xen4.5 dom0pvh test failed

2015-01-26 Thread Yuzhou (C)
Hi all, I want to test xen 4.5.0 + linux 3.17.4+ dom0pvh=1, but boot failed. I add dom0_mem=max:2GB dom0pvh=1 to xen boot params. I find some mails about dom0 as pvh mode, however I do not find the useful answer that solve this problem. And, I have tested xen 4.5.0 + linux 3.1

[Xen-devel] [libvirt test] 33811: regressions - FAIL

2015-01-26 Thread xen . org
flight 33811 libvirt real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/33811/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-libvirt 5 libvirt-build fail REGR. vs. 33422 Tests which did not succe

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

2015-01-26 Thread xen . org
flight 33805 qemu-mainline real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/33805/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf 5 xen-build fail REGR. vs. 33480 test-amd64-i386-rhe

[Xen-devel] [PATCH v5 2/2] x86/xen: allow privcmd hypercalls to be preempted on 64-bit

2015-01-26 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" Xen has support for splitting heavy work work into a series of hypercalls, called multicalls, and preempting them through what Xen calls continuation [0]. Despite this though without CONFIG_PREEMPT preemption won't happen, without preemption a system can become pretty us

[Xen-devel] [PATCH v5 1/2] xen: add xen_is_preemptible_hypercall()

2015-01-26 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" On kernels with voluntary or no preemption we can run into situations where a hypercall issued through userspace will linger around as it addresses sub-operatiosn in kernel context (multicalls). Such operations can trigger soft lockup detection. We want to address a way

[Xen-devel] [PATCH v5 0/2] x86/xen: add xen hypercall preemption

2015-01-26 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" This v5 nukes tracing as David said it was useless, it also only adds support for 64-bit as its the only thing I can test, and slightly modifies the documentation in code as to why we want this. The no krobe thing is left in place as I haven't heard confirmation its kosh

Re: [Xen-devel] [RFC v4 1/2] x86/xen: add xen_is_preemptible_hypercall()

2015-01-26 Thread Luis R. Rodriguez
On Thu, Jan 22, 2015 at 05:40:45PM -0800, Andy Lutomirski wrote: > On Thu, Jan 22, 2015 at 4:29 PM, Luis R. Rodriguez > wrote: > > From: "Luis R. Rodriguez" > > > > On kernels with voluntary or no preemption we can run > > into situations where a hypercall issued through userspace > > will linger

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

2015-01-26 Thread xen . org
flight 33797 xen-unstable real [real] http://www.chiark.greenend.org.uk/~xensrcts/logs/33797/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-winxpsp3-vcpus1 7 windows-install fail REGR. vs. 33637 test-amd64-i386-xl-

[Xen-devel] [PATCH RFC] libxl: set disk defaults in remove/destroy functions

2015-01-26 Thread Jim Fehlig
The attached patch is a hack I cooked up to fix one of the libvirt-TCK Xen failures. The test (200-disk-hotplug.t) attempts to hot add and remove a disk from a running domain. The add works fine, but remove fails with libxl: debug: libxl.c:3858:libxl_device_disk_remove: ao 0x7f9b9c0015a0: create

Re: [Xen-devel] QEMU 2.2.0 in Xen 4.6

2015-01-26 Thread Eric Shelton
On Mon, Jan 26, 2015 at 9:37 AM, Stefano Stabellini wrote: > On Fri, 23 Jan 2015, Eric Shelton wrote: >> On Jan 23, 2015 10:10 AM, "Stefano Stabellini" >> wrote: >> > >> > On Fri, 23 Jan 2015, Ian Campbell wrote: >> > > On Fri, 2015-01-23 at 14:42 +, Stefano Stabellini wrote: >> > > >> > > >

[Xen-devel] [PATCH] Introduce a p2m class.

2015-01-26 Thread Ed White
Use the class to differentiate between host and nested p2m's, and potentially other classes in the future. Fix p2m class checks that implicitly assume nested and host are the only two classes that will ever exist. Signed-off-by: Ed White --- xen/arch/x86/hvm/hvm.c | 2 +- xen/arch/x8

Re: [Xen-devel] [PATCHv4 10/14] xen/gntdev: convert priv->lock to a mutex

2015-01-26 Thread Stefano Stabellini
On Mon, 26 Jan 2015, David Vrabel wrote: > On 26/01/15 18:57, Stefano Stabellini wrote: > > > >> @@ -443,14 +443,14 @@ static void mn_invl_range_start(struct mmu_notifier > >> *mn, > >>struct gntdev_priv *priv = container_of(mn, struct gntdev_priv, mn); > >>struct grant_map *map; > >> >

Re: [Xen-devel] [PATCH RFC 0/5] Split off mini-os to a separate tree

2015-01-26 Thread Anil Madhavapeddy
On 26 Jan 2015, at 18:49, Thomas Leonard wrote: > > On 26 January 2015 at 17:56, Anil Madhavapeddy wrote: >> On 26 Jan 2015, at 17:42, Martin Lucina wrote: >>> >>> tal...@gmail.com said: In case it's useful: for the standalone version of Mini-OS used by Mirage, I had to include these

[Xen-devel] VM-exit instruction length and #GP fault on IN.

2015-01-26 Thread Don Slutz
The question is about the VM-exit instruction length field. This is accessed in xen via: __vmread(VM_EXIT_INSTRUCTION_LEN, &inst_len); an example of which is in routine get_instruction_length(). Is it architecturally defined that #GP intercept vmexits on IN and OUT actually set this field?

Re: [Xen-devel] [PATCH for-4.5 v8 4/7] xen: Add vmware_port support

2015-01-26 Thread Don Slutz
On 01/26/15 11:46, Jan Beulich wrote: On 26.01.15 at 16:58, wrote: >> On 01/22/15 03:32, Jan Beulich wrote: >> On 21.01.15 at 18:52, wrote: On 01/16/15 05:09, Jan Beulich wrote: On 03.10.14 at 00:40, wrote: ... > > As stated before - if feasible, 8 would seem the best o

Re: [Xen-devel] [PATCHv4 12/14] xen-blkback: safely unmap grants in case they are still in use

2015-01-26 Thread Roger Pau Monné
El 26/01/15 a les 18.01, David Vrabel ha escrit: > From: Jennifer Herbert > > Use gnttab_unmap_refs_async() to wait until the mapped pages are no > longer in use before unmapping them. > > This allows blkback to use network storage which may retain refs to > pages in queued skbs after the block

Re: [Xen-devel] [PATCHv4 10/14] xen/gntdev: convert priv->lock to a mutex

2015-01-26 Thread David Vrabel
On 26/01/15 18:57, Stefano Stabellini wrote: > >> @@ -443,14 +443,14 @@ static void mn_invl_range_start(struct mmu_notifier >> *mn, >> struct gntdev_priv *priv = container_of(mn, struct gntdev_priv, mn); >> struct grant_map *map; >> >> -spin_lock(&priv->lock); >> +mutex_lock(&

Re: [Xen-devel] [PATCHv4 09/14] xen/grant-table: add a mechanism to safely unmap pages that are in use

2015-01-26 Thread Stefano Stabellini
On Mon, 26 Jan 2015, David Vrabel wrote: > From: Jennifer Herbert > > Introduce gnttab_unmap_refs_async() that can be used to safely unmap > pages that may be in use (ref count > 1). If the pages are in use the > unmap is deferred and retried later. This polling is not very clever > but it shou

[Xen-devel] [PATCH v2 21/29] Ovmf/Xen: move XenBusDxe to abstract XENIO_PROTOCOL

2015-01-26 Thread Ard Biesheuvel
While Xen on Intel uses a virtual PCI device to communicate the base address of the grant table, the ARM implementation uses a DT node, which is fundamentally incompatible with the way XenBusDxe is implemented, i.e., as a UEFI Driver Model implementation for a PCI device. Contributed-under: TianoC

[Xen-devel] [PATCH v2 27/29] ArmVirtualizationPkg: add XenIoMmioLib

2015-01-26 Thread Ard Biesheuvel
This adds a XenIoMmioLib declaration and implementation that can be invoked to install the XENIO_PROTOCOL and a corresponding grant table address on a EFI handle. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVirtualizationPkg/ArmVirt

[Xen-devel] [PATCH v2 20/29] Ovmf/Xen: add separate driver for Xen PCI device

2015-01-26 Thread Ard Biesheuvel
Prepare for making XenBusDxe suitable for use with non-PCI devices (such as the DT node exposed by Xen on ARM) by introducing a separate DXE driver that binds to the Xen virtual PCI device and exposes the abstract XENIO_PROTOCOL for XenBusDxe to bind against. Contributed-under: TianoCore Contribut

[Xen-devel] [PATCH v2 29/29] ArmVirtualizationPkg: add platform description for Xen guests

2015-01-26 Thread Ard Biesheuvel
This adds the .dsc and .fdf descriptions to build a UEFI image that is bootable by a Xen guest on 64-bit ARM (AArch64) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationXen.dsc | 279 +++

[Xen-devel] [PATCH v2 28/29] ArmVirtualizationPkg/VirtFdtDxe: wire up XenBusDxe to "xen, xen" DT node

2015-01-26 Thread Ard Biesheuvel
This patchs adds support to VirtFdtDxe for the Xen DT node which contains the base address of the Grant Table. This data is communicated to XenBusDxe using a XENIO_PROTOCOL instance. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVirtu

[Xen-devel] [PATCH v2 26/29] Ovfm/Xen: add a Vendor Hardware device path GUID for the XenBus root

2015-01-26 Thread Ard Biesheuvel
On non-PCI Xen guests (such as ARM), the XenBus root is not a PCI device but an abstract 'platform' device. Add a dedicated Vendor Hardware device path GUID to identify this node. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- OvmfPkg/Include/Guid/XenBu

[Xen-devel] [PATCH v2 22/29] Ovmf/Xen: implement XenHypercallLib for ARM

2015-01-26 Thread Ard Biesheuvel
This patch adds an implementation of XenHypercallLib for both AArch64 and AArch32 execution modes on ARM systems. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- OvmfPkg/Include/IndustryStandard/Xen/arch-arm/xen.h| 436 ++

[Xen-devel] [PATCH v2 14/29] ArmVirtualizationPkg: Xen/PV relocatable platformlib instance

2015-01-26 Thread Ard Biesheuvel
Add a ArmPlatformLib instance that can deal with the self relocation and truly dynamic discovery of system RAM base and size. Signed-off-by: Ard Biesheuvel --- .../ArmVirtualizationPkg/Library/ArmXenRelocatablePlatformLib/AARCH64/MemnodeParser.S | 232 +

[Xen-devel] [PATCH v2 15/29] Ovmf/Xen: move Xen interface version to

2015-01-26 Thread Ard Biesheuvel
Tiancore has its private copy of the Xen headers, and all drivers that depend on it should use the same Xen interface version, so let's move the #define to xen.h itself. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Stefano Stabellini Acked-by: Laszlo Ersek Signed-off-by:

[Xen-devel] [PATCH v2 25/29] Ovmf/Xen: implement dummy RealTimeClockLib for Xen

2015-01-26 Thread Ard Biesheuvel
This implements a dummy RealTimeClockLib for Xen, as there is no guest interface to access the time kept by Xen that can be shared between UEFI and the OS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- OvmfPkg/Library/XenRealTimeClockLib/XenRealTimeClo

[Xen-devel] [PATCH v2 24/29] Ovmf/Xen: add Xen PV console SerialPortLib driver

2015-01-26 Thread Ard Biesheuvel
This implements a SerialPortLib instance that wires up to the PV console ring used by domU guests. Also imports the required upstream Xen io/console.h header. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- OvmfPkg/Include/IndustryStandard/Xen/io/console

[Xen-devel] [PATCH v2 13/29] ArmVirtualizationPkg: allow patchable PCD for FV base address

2015-01-26 Thread Ard Biesheuvel
Allow the use of a patchable PCD for gArmTokenSpaceGuid.PcdFvBaseAddress by moving it from the [FixedPcd] to the [Pcd] section in the INF file of PlatformPeiLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVirtualizationPkg/Library/

[Xen-devel] [PATCH v2 17/29] Ovmf/Xen: refactor XenBusDxe hypercall implementation

2015-01-26 Thread Ard Biesheuvel
This refactors the Xen hypercall implementation that is part of the XenBusDxe driver, in preparation of splitting it off entirely into a XenHypercallLib library. This involves: - removing the dependency on XENBUS_DEVICE* pointers in the XenHypercall() prototypes - moving the discovered hyperpage

[Xen-devel] [PATCH v2 19/29] Ovmf/Xen: introduce XENIO_PROTOCOL

2015-01-26 Thread Ard Biesheuvel
This introduces the abstract XENIO_PROTOCOL that will be used to communicate the Xen grant table address to drivers supporting this protocol. Primary purpose is allowing us to change the XenBusDxe implementation so that it can support non-PCI Xen implementations such as Xen on ARM. Contributed-und

[Xen-devel] [PATCH v2 23/29] Ovmf/Xen: add ARM and AArch64 support to XenBusDxe

2015-01-26 Thread Ard Biesheuvel
This patch adds support to XenBusDxe for executing on ARM and AArch64 machines (the former only when built with GCC). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- OvmfPkg/XenBusDxe/AtomicsGcc.c | 44 Ovmf

[Xen-devel] [PATCH v2 16/29] Ovmf/Xen: fix pointer to int cast in XenBusDxe

2015-01-26 Thread Ard Biesheuvel
On ARM, xen_pfn_t is 64 bits but the size of a pointer is only 32 bits, so casting between them needs to go via (UINTN). Also move the xen_pfn_t cast outside the shift so that we can avoid shifting 64-bit quantities on 32-bit architectures, which may require runtime library support. Contributed-un

[Xen-devel] [PATCH v2 10/29] ArmPlatformPkg/PrePi: allow unicore PrePi on multicore capable CPU

2015-01-26 Thread Ard Biesheuvel
Under virtualization, typically, the guest is entered with only a single CPU turned on, and any remaining CPUs are started by the OS using PSCI. So refactor the PrePi code in such a way that we can implement a unicore flavor which can be allowed to execute on a MPcore CPU. Contributed-under: Tiano

[Xen-devel] [PATCH v2 18/29] Ovmf/Xen: move XenBusDxe hypercall code to separate library

2015-01-26 Thread Ard Biesheuvel
This moves all of the Xen hypercall code that was private to XenBusDxe to a new library class XenHypercallLib. This will allow us to reimplement it for ARM, and to export the Xen hypercall functionality to other parts of the code, such as a Xen console SerialPortLib driver. Contributed-under: Tian

[Xen-devel] [PATCH v2 07/29] ArmVirtualizationPkg: use a HOB to store device tree blob

2015-01-26 Thread Ard Biesheuvel
Instead of using a dynamic PCD, store the device tree address in a HOB so that we can also run under a configuration that does not support dynamic PCDs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualization

[Xen-devel] [PATCH v2 02/29] ArmPkg: allow patchable PCDs for memory, FD and FV addresses

2015-01-26 Thread Ard Biesheuvel
In order to allow a runtime self relocating PrePi instance, change the allowable PCD types for the following PCDs: gArmTokenSpaceGuid.PcdSystemMemoryBase gArmTokenSpaceGuid.PcdSystemMemorySize gArmTokenSpaceGuid.PcdFdBaseAddress gArmTokenSpaceGuid.PcdFvBaseAddress to include PcdsPatchable

[Xen-devel] [PATCH v2 00/29] Xen/ARM guest support

2015-01-26 Thread Ard Biesheuvel
This series implements support for executing Tianocore inside a Xen guest domain on 64-bit ARM systems (AArch64) The first part addresses ARM platform specifics, primarily to allow a Tianocore binary image to be runtime relocatable, and execute from DRAM. The second part refactors the XenBus supp

[Xen-devel] [PATCH v2 11/29] ArmPlatformPkg/PrePi: add a relocatable version of PrePi

2015-01-26 Thread Ard Biesheuvel
This patch introduces a relocatable PrePi, which can execute from arbitrary offsets in RAM. This is intendend to be run from a boot loader which passes a description of the actual platform in a device tree, for instance. Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/PrePi/AArch64/ModuleEntryP

[Xen-devel] [PATCH v2 09/29] ArmPlatformPkg/PrePi: allow use of patchable PCDs

2015-01-26 Thread Ard Biesheuvel
Avoid using FixedPcdGetXX () to reference system memory and FD base address PCDs so that the platform can choose to use patchable PCDs instead. This allows a runtime self-relocating PrePi to poke alternate values into them that can only be discovered at runtime. Contributed-under: TianoCore Contri

[Xen-devel] [PATCH v2 08/29] ArmVirtualizationPkg: add padding to FDT allocation

2015-01-26 Thread Ard Biesheuvel
Our primary user QEMU/mach-virt presents us with a FDT blob padded to 64 KB with plenty of room to set additional properties. However, in the general case, we should only add properties after making sure there is enough room available. Contributed-under: TianoCore Contribution Agreement 1.0 Signed

[Xen-devel] [PATCH v2 12/29] ArmVirtualizationPkg: implement custom MemoryInitPeiLib

2015-01-26 Thread Ard Biesheuvel
This implements a MemoryInitPeiLib instance that differs from the stock ArmPlatformPkg version only in the fact that it does not remove the memory used by the flash device (FD). The reason is that, when using PrePi, the DXE core is started immediately and never returns so there is no reason to pres

[Xen-devel] [PATCH v2 06/29] ArmVirtualizationPkg: move early UART discovery to PlatformPeim

2015-01-26 Thread Ard Biesheuvel
This is partially motivated by the desire to use PrePi in a virt environment, and in that configuration, ArmPlatformInitializeSystemMemory() is never called. But actually, this is a more suitable place anyway. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek Revie

[Xen-devel] [PATCH v2 03/29] ArmPlatformPkg: allow patchable PCD for FD base address

2015-01-26 Thread Ard Biesheuvel
This moves the reference to gArmTokenSpaceGuid.PcdFdBaseAddress from the [FixedPcd] to the [Pcd] section in the INF file of PrePiArmPlatformGlobalVariableLib so that its users may choose to use a patchable PCD instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Bies

[Xen-devel] [PATCH v2 05/29] ArmVirtualizationPkg: allow patchable PCD for device tree base address

2015-01-26 Thread Ard Biesheuvel
To allow a runtime self relocating PrePi instance to discover the base address of the device tree at runtime, allow the use of a patchable PCD for gArmVirtualizationTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress. We will not be using the build time patch tool in this case, but using a patchable PCD

[Xen-devel] [PATCH v2 04/29] ArmVirtualizationPkg: add GICv3 detection to VirtFdtDxe

2015-01-26 Thread Ard Biesheuvel
This adds support for detecting the presence of a GICv3 interrupt controller from the device tree, and recording its distributor base address in a PCD. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin Acked-by: Laszlo Ersek Signed-off-by: Ard Biesheuvel --- A

[Xen-devel] [PATCH v2 01/29] ArmPkg: allow HYP timer interrupt to be omitted

2015-01-26 Thread Ard Biesheuvel
The DT binding for the ARM generic timer describes the secure, non-secure, virtual and hypervisor timer interrupts, respectively. However, under virtualization, only the virtual timer is usable, and the device tree may omit the hypervisor timer interrupt. (Other timer interrupts cannot be omitted s

Re: [Xen-devel] [PATCHv4 10/14] xen/gntdev: convert priv->lock to a mutex

2015-01-26 Thread Stefano Stabellini
On Mon, 26 Jan 2015, David Vrabel wrote: > Unmapping may require sleeping and we unmap while holding priv->lock, so > convert it to a mutex. > > Signed-off-by: David Vrabel > --- > drivers/xen/gntdev.c | 40 > 1 file changed, 20 insertions(+), 20 deleti

Re: [Xen-devel] [PATCH RFC 0/5] Split off mini-os to a separate tree

2015-01-26 Thread Thomas Leonard
On 26 January 2015 at 17:56, Anil Madhavapeddy wrote: > On 26 Jan 2015, at 17:42, Martin Lucina wrote: >> >> tal...@gmail.com said: >>> In case it's useful: for the standalone version of Mini-OS used by >>> Mirage, I had to include these directories too: >>> >>> 1. xen/include/public >>> 2. xen/c

Re: [Xen-devel] [PATCHv4 03/14] xen/grant-table: pre-populate kernel unmap ops for xen_gnttab_unmap_refs()

2015-01-26 Thread Stefano Stabellini
On Mon, 26 Jan 2015, David Vrabel wrote: > When unmapping grants, instead of converting the kernel map ops to > unmap ops on the fly, pre-populate the set of unmap ops. > > This allows the grant unmap for the kernel mappings to be trivially > batched in the future. > > Signed-off-by: David Vrabel

Re: [Xen-devel] [PATCH RFC 0/5] Split off mini-os to a separate tree

2015-01-26 Thread Anil Madhavapeddy
On 26 Jan 2015, at 18:21, Martin Lucina wrote: > > a...@recoil.org said: >> On 26 Jan 2015, at 17:42, Martin Lucina wrote: >>> >>> tal...@gmail.com said: In case it's useful: for the standalone version of Mini-OS used by Mirage, I had to include these directories too: 1. xe

Re: [Xen-devel] [PATCH RFC 0/5] Split off mini-os to a separate tree

2015-01-26 Thread Martin Lucina
a...@recoil.org said: > On 26 Jan 2015, at 17:42, Martin Lucina wrote: > > > > tal...@gmail.com said: > >> In case it's useful: for the standalone version of Mini-OS used by > >> Mirage, I had to include these directories too: > >> > >> 1. xen/include/public > >> 2. xen/common/libfdt > >> 3. xen

[Xen-devel] [OSSTEST PATCH 1/3] ap-common: Have ap-push for linux trees use refs/heads/

2015-01-26 Thread Ian Jackson
As per the docs in README.dev. Signed-off-by: Ian Jackson --- ap-common |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ap-common b/ap-common index e2c3e42..014dd76 100644 --- a/ap-common +++ b/ap-common @@ -136,7 +136,7 @@ info_linux_tree () { : ${BASE_TREE_LINUX_

[Xen-devel] [OSSTEST PATCH 3/3] linux-3.16: New branch

2015-01-26 Thread Ian Jackson
Test this too. We fetch this from the Canonical Kernel Team (ckt) repo, but do not encode `ckt' in the branch name, in case this becomes a proper stable tree. (I have set up this branch on the osstest with the mg-branch-setup script in this version of this tree.) Signed-off-by: Ian Jackson ---

[Xen-devel] [OSSTEST PATCH 2/3] mg-branch-setup: New script

2015-01-26 Thread Ian Jackson
Also, update the README.dev accordingly Signed-off-by: Ian Jackson --- README.dev | 77 +++- mg-branch-setup | 106 +++ 2 files changed, 134 insertions(+), 49 deletions(-) create mode 100755 mg-branc

Re: [Xen-devel] [PATCH RFC 0/5] Split off mini-os to a separate tree

2015-01-26 Thread Anil Madhavapeddy
On 26 Jan 2015, at 17:42, Martin Lucina wrote: > > tal...@gmail.com said: >> In case it's useful: for the standalone version of Mini-OS used by >> Mirage, I had to include these directories too: >> >> 1. xen/include/public >> 2. xen/common/libfdt >> 3. xen/include/xen/libfdt >> 4. config >> >>

Re: [Xen-devel] [PATCH RFC 0/5] Split off mini-os to a separate tree

2015-01-26 Thread Martin Lucina
tal...@gmail.com said: > In case it's useful: for the standalone version of Mini-OS used by > Mirage, I had to include these directories too: > > 1. xen/include/public > 2. xen/common/libfdt > 3. xen/include/xen/libfdt > 4. config > > ( https://github.com/talex5/xen/tree/minios-releases ) Ah, so

Re: [Xen-devel] [PATCH 12/14] xen-blkback: safely unmap grants in case they are still in use

2015-01-26 Thread Jens Axboe
On 01/26/2015 08:02 AM, David Vrabel wrote: On 19/01/15 15:51, David Vrabel wrote: From: Jenny Herbert Use gnttab_unmap_refs_async() to wait until the mapped pages are no longer in use before unmapping them. This allows blkback to use network storage which may retain refs to pages in queued s

Re: [Xen-devel] [PATCH RFC] p2m: p2m_mmio_direct set RW permissions

2015-01-26 Thread Elena Ufimtseva
On Mon, Jan 26, 2015 at 05:06:12PM +, Jan Beulich wrote: > >>> On 26.01.15 at 17:57, wrote: > > On Fri, Jan 23, 2015 at 10:50:23AM +, Jan Beulich wrote: > >> >>> On 22.01.15 at 18:34, wrote: > >> > (XEN) d56f - d5fff000 (reserved) > >> > >> So this is where one of th

Re: [Xen-devel] EFI GetNextVariableName crashes when running under Xen, but not under Linux. efi-rs=0 works. No memmap issues

2015-01-26 Thread Konrad Rzeszutek Wilk
On Mon, Jan 26, 2015 at 04:36:03PM +, Andrew Cooper wrote: > On 26/01/15 16:27, Konrad Rzeszutek Wilk wrote: > > Hey Jan, Andrew, > > > > I am hoping you can help me in directing me where I ought to go next > > in debugging this. > > > > This is a Lenovo Thinkpad x230 with the latest BIOS and X

[Xen-devel] [PATCHv4 10/14] xen/gntdev: convert priv->lock to a mutex

2015-01-26 Thread David Vrabel
Unmapping may require sleeping and we unmap while holding priv->lock, so convert it to a mutex. Signed-off-by: David Vrabel --- drivers/xen/gntdev.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/xen/gntdev.c b/drivers/xen

[Xen-devel] [PATCHv4 14/14] xen/gntdev: provide find_special_page VMA operation

2015-01-26 Thread David Vrabel
For a PV guest, use the find_special_page op to find the right page. To handle VMAs being split, remember the start of the original VMA so the correct index in the pages array can be calculated. Signed-off-by: David Vrabel --- drivers/xen/gntdev.c | 12 1 file changed, 12 insertio

[Xen-devel] [PATCHv4 12/14] xen-blkback: safely unmap grants in case they are still in use

2015-01-26 Thread David Vrabel
From: Jennifer Herbert Use gnttab_unmap_refs_async() to wait until the mapped pages are no longer in use before unmapping them. This allows blkback to use network storage which may retain refs to pages in queued skbs after the block I/O has completed. Signed-off-by: Jennifer Herbert Signed-off

[Xen-devel] [PATCHv4 11/14] xen/gntdev: safely unmap grants in case they are still in use

2015-01-26 Thread David Vrabel
From: Jennifer Herbert Use gnttab_unmap_refs_async() to wait until the mapped pages are no longer in use before unmapping them. This allows userspace programs to safely use Direct I/O and AIO to a network filesystem which may retain refs to pages in queued skbs after the filesystem I/O has compl

[Xen-devel] [PATCHv4 13/14] xen/gntdev: mark userspace PTEs as special on x86 PV guests

2015-01-26 Thread David Vrabel
In an x86 PV guest, get_user_pages_fast() on a userspace address range containing foreign mappings does not work correctly because the M2P lookup of the MFN from a userspace PTE may return the wrong page. Force get_user_pages_fast() to fail on such addresses by marking the PTEs as special. If Xen

Re: [Xen-devel] [PATCH RFC] p2m: p2m_mmio_direct set RW permissions

2015-01-26 Thread Jan Beulich
>>> On 26.01.15 at 17:57, wrote: > On Fri, Jan 23, 2015 at 10:50:23AM +, Jan Beulich wrote: >> >>> On 22.01.15 at 18:34, wrote: >> > (XEN) d56f - d5fff000 (reserved) >> >> So this is where one of the RMRRs sits in (and also where >> the faults occur according to the two

[Xen-devel] [PATCH v2] libxl_set_memory_target: retain the same maxmem offset on top of the current target

2015-01-26 Thread Stefano Stabellini
In libxl_set_memory_target when setting the new maxmem, retain the same offset on top of the current target. The offset includes memory allocated by QEMU for rom files. Signed-off-by: Stefano Stabellini --- Changes in v2: - remove LIBXL_MAXMEM_CONSTANT from LIBXL__LOG_ERRNO. --- tools/libxl/li

[Xen-devel] [PATCHv4 07/14] xen: mark grant mapped pages as foreign

2015-01-26 Thread David Vrabel
From: Jennifer Herbert Use the "foreign" page flag to mark pages that have a grant map. Use page->private to store information of the grant (the granting domain and the grant reference). Signed-off-by: Jennifer Herbert Signed-off-by: David Vrabel --- arch/x86/xen/p2m.c|7 ---

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

2015-01-26 Thread David Vrabel
From: Jennifer 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). This allows blkback to use iSCSI disks provided by

[Xen-devel] [PATCHv4 05/14] x86/xen: require ballooned pages for grant maps

2015-01-26 Thread David Vrabel
From: Jennifer Herbert Ballooned pages are always used for grant maps which means the original frame does not need to be saved in page->index nor restored after the grant unmap. This allows the workaround in netback for the conflicting use of the (unionized) page->index and page->pfmemalloc to b

[Xen-devel] [PATCHv4 02/14] mm: add 'foreign' alias for the 'pinned' page flag

2015-01-26 Thread David Vrabel
From: Jennifer Herbert The foreign page flag will be used by Xen guests to mark pages that have grant mappings of frames from other (foreign) guests. The foreign flag is an alias for the existing (Xen-specific) pinned flag. This is safe because pinned is only used on pages used for page tables

[Xen-devel] [PATCHv4 03/14] xen/grant-table: pre-populate kernel unmap ops for xen_gnttab_unmap_refs()

2015-01-26 Thread David Vrabel
When unmapping grants, instead of converting the kernel map ops to unmap ops on the fly, pre-populate the set of unmap ops. This allows the grant unmap for the kernel mappings to be trivially batched in the future. Signed-off-by: David Vrabel --- arch/arm/include/asm/xen/page.h |2 +- arch/

[Xen-devel] [PATCHv4 01/14] mm: provide a find_special_page vma operation

2015-01-26 Thread David Vrabel
The optional find_special_page VMA operation is used to lookup the pages backing a VMA. This is useful in cases where the normal mechanisms for finding the page don't work. This is only called if the PTE is special. One use case is a Xen PV guest mapping foreign pages into userspace. In a Xen P

[Xen-devel] [PATCHv4 04/14] xen: remove scratch frames for ballooned pages and m2p override

2015-01-26 Thread David Vrabel
The scratch frame mappings for ballooned pages and the m2p override are broken. Remove them in preparation for replacing them with simpler mechanisms that works. The scratch pages did not ensure that the page was not in use. In particular, the foreign page could still be in use by hardware. If

[Xen-devel] [PATCHv4 00/14] xen: fix many long-standing grant mapping bugs

2015-01-26 Thread David Vrabel
This series fixes a number of long-standing bugs in the handling of grant maps. Refer to the following for all the details. http://xenbits.xen.org/people/dvrabel/grant-improvements-C.pdf In summary, the important uses that this enables are: 1. Block backends can use networked storage safely.

[Xen-devel] [PATCHv4 06/14] xen/grant-table: add helpers for allocating pages

2015-01-26 Thread David Vrabel
Add gnttab_alloc_pages() and gnttab_free_pages() to allocate/free pages suitable to for granted maps. Signed-off-by: David Vrabel --- drivers/block/xen-blkback/blkback.c |8 drivers/net/xen-netback/interface.c |7 +++ drivers/xen/gntdev.c|4 ++-- drivers/

[Xen-devel] [PATCHv4 09/14] xen/grant-table: add a mechanism to safely unmap pages that are in use

2015-01-26 Thread David Vrabel
From: Jennifer Herbert Introduce gnttab_unmap_refs_async() that can be used to safely unmap pages that may be in use (ref count > 1). If the pages are in use the unmap is deferred and retried later. This polling is not very clever but it should be good enough if the cases where the delay is nec

Re: [Xen-devel] [PATCH RFC] p2m: p2m_mmio_direct set RW permissions

2015-01-26 Thread Elena Ufimtseva
On Fri, Jan 23, 2015 at 10:50:23AM +, Jan Beulich wrote: > >>> On 22.01.15 at 18:34, wrote: > > On Thu, Jan 22, 2015 at 04:42:52PM +0100, Roger Pau Monné wrote: > >> El 22/01/15 a les 16.18, Elena Ufimtseva ha escrit: > >> > > >> > - jbeul...@suse.com wrote: > >> > > >> > On 22.01.15

[Xen-devel] [PATCH] libxl_set_memory_target: only remove videoram from absolute targets

2015-01-26 Thread Stefano Stabellini
If the new target is relative to the current target, do not remove videoram again: it has already been removed from the current target. Signed-off-by: Stefano Stabellini --- Changes in v2: - add videoram when setting maxmem. --- tools/libxl/libxl.c | 12 ++-- 1 file changed, 6 insert

Re: [Xen-devel] [PATCH for-4.5 v8 4/7] xen: Add vmware_port support

2015-01-26 Thread Jan Beulich
>>> On 26.01.15 at 16:58, wrote: > On 01/22/15 03:32, Jan Beulich wrote: > On 21.01.15 at 18:52, wrote: >>> On 01/16/15 05:09, Jan Beulich wrote: >>> On 03.10.14 at 00:40, wrote: > + > +/* Only adjust byte_cnt 1 time */ > +if ( bytes[0] == 0x66 ) /* operan

[Xen-devel] Xen Project Document Day this Wednesday, January 28: The Great 4.5 Clean-Up

2015-01-26 Thread Russ Pavlicek
We want to begin this year by making sure that our documentation is correct for the recent 4.5 release. Do you have new feature information? Do you see old information which will confuse new users (especially those which rely on the xm command instead of xl)? Do you know of best practices which

Re: [Xen-devel] EFI GetNextVariableName crashes when running under Xen, but not under Linux. efi-rs=0 works. No memmap issues

2015-01-26 Thread Andrew Cooper
On 26/01/15 16:27, Konrad Rzeszutek Wilk wrote: > Hey Jan, Andrew, > > I am hoping you can help me in directing me where I ought to go next > in debugging this. > > This is a Lenovo Thinkpad x230 with the latest BIOS and Xen 4.6 (todays > 'staging' + my patches). Initially when I installed Xen the

[Xen-devel] open-coded page list manipulation in shadow code

2015-01-26 Thread Jan Beulich
Tim, in the course of adding >16Tb support to the hypervisor, I ran into issues with you having added several open-coded page list accesses while breaking up non-order-0 allocations there. I looked at that code for quite a while, but wasn't really able to figure how to properly convert these. In p

[Xen-devel] EFI GetNextVariableName crashes when running under Xen, but not under Linux. efi-rs=0 works. No memmap issues

2015-01-26 Thread Konrad Rzeszutek Wilk
Hey Jan, Andrew, I am hoping you can help me in directing me where I ought to go next in debugging this. This is a Lenovo Thinkpad x230 with the latest BIOS and Xen 4.6 (todays 'staging' + my patches). Initially when I installed Xen the first time it would hang when loading the efi_vars module in

Re: [Xen-devel] [PATCH for-4.5 v8 4/7] xen: Add vmware_port support

2015-01-26 Thread Don Slutz
On 01/22/15 03:32, Jan Beulich wrote: On 21.01.15 at 18:52, wrote: >> On 01/16/15 05:09, Jan Beulich wrote: >> On 03.10.14 at 00:40, wrote: This is a new domain_create() flag, DOMCRF_vmware_port. It is passed to domctl as XEN_DOMCTL_CDF_vmware_port. >>> Can you explain why a H

Re: [Xen-devel] Problem building xon with cross-compiler

2015-01-26 Thread Jan Beulich
>>> On 26.01.15 at 16:38, wrote: > I try to compile xen-4.5.0 in the uclibc buildroot. Of course a first step would be to try to build in a more conventional environment. > On "make xen" I get this error: > > mkdir -p compat/.xlat > grep -v '^[[:blank:]]*#' xlat.lst | sed -ne 's,@arch@,x86_32,g

  1   2   >