Re: [PATCH] kvm: don't take vcpu mutex for obviously invalid vcpu ioctls

2014-09-23 Thread Gleb Natapov
On Mon, Sep 22, 2014 at 09:29:19PM +0200, Paolo Bonzini wrote: Il 22/09/2014 21:20, Christian Borntraeger ha scritto: while using trinity to fuzz KVM, we noticed long stalls on invalid ioctls. Lets bail out early on invalid ioctls. or similar? Okay. David, can you explain how you found

[PATCH] KVM: x86: Remove debug assertion of non-PAE reserved bits

2014-09-23 Thread Nadav Amit
Commit 346874c9507a (KVM: x86: Fix CR3 reserved bits) removed non-PAE reserved bits which were not according to Intel SDM. However, residue was left in a debug assertion (CR3_NONPAE_RESERVED_BITS). Remove it. Signed-off-by: Nadav Amit na...@cs.technion.ac.il --- arch/x86/kvm/paging_tmpl.h | 3

Re: [PATCH v4] kvm: Fix page ageing bugs

2014-09-23 Thread Paolo Bonzini
Il 22/09/2014 23:54, Andres Lagar-Cavilla ha scritto: @@ -1406,32 +1406,24 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp, struct rmap_iterator uninitialized_var(iter); int young = 0; - /* - * In case of absence of EPT Access and Dirty Bits

Re: [PATCH] x86: kvm: use alternatives for VMCALL vs. VMMCALL if kernel text is read-only

2014-09-23 Thread Paolo Bonzini
Il 22/09/2014 21:43, Borislav Petkov ha scritto: On x86_64, kernel text mappings are mapped read-only with CONFIG_DEBUG_RODATA. Hmm, that depends on DEBUG_KERNEL. I think you're actually talking about distro kernels which enable CONFIG_DEBUG_RODATA, right? This is for guest kernels, so

Re: [PATCH] KVM: x86: Remove debug assertion of non-PAE reserved bits

2014-09-23 Thread Paolo Bonzini
Il 23/09/2014 09:01, Nadav Amit ha scritto: Commit 346874c9507a (KVM: x86: Fix CR3 reserved bits) removed non-PAE reserved bits which were not according to Intel SDM. However, residue was left in a debug assertion (CR3_NONPAE_RESERVED_BITS). Remove it. Signed-off-by: Nadav Amit

Re: [PATCH] x86, kvm: use macros to compute bank MSRs

2014-09-23 Thread Paolo Bonzini
Il 23/09/2014 04:44, Chen Yucong ha scritto: Avoid open coded calculations for bank MSRs by using well-defined macros that hide the index of higher bank MSRs. No semantic changes. Signed-off-by: Chen Yucong sla...@gmail.com --- arch/x86/kvm/x86.c |8 1 file changed, 4

Re: [PATCH] kvm: don't take vcpu mutex for obviously invalid vcpu ioctls

2014-09-23 Thread Christian Borntraeger
On 09/23/2014 08:49 AM, Gleb Natapov wrote: On Mon, Sep 22, 2014 at 09:29:19PM +0200, Paolo Bonzini wrote: Il 22/09/2014 21:20, Christian Borntraeger ha scritto: while using trinity to fuzz KVM, we noticed long stalls on invalid ioctls. Lets bail out early on invalid ioctls. or similar?

[PATCH kvm-kmod] adjust timekeeping compatibility code

2014-09-23 Thread Paolo Bonzini
kvm_get_xtime_nsec could overflow. If we make kvm_get_boot_base_ns compute the equivalent of 3.17's base_mono+offs_boot formula (instead of just offs_boot), we can avoid that and drop kvm_get_xtime_nsec altogether. Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---

Re: [PATCH] kvm: don't take vcpu mutex for obviously invalid vcpu ioctls

2014-09-23 Thread Paolo Bonzini
Il 23/09/2014 10:06, Christian Borntraeger ha scritto: Yes. Davids explanation also makes sense as a commit message. Paolo, if you use David patch with a better description of the why I am fine with this patch. Done, thanks everybody! Paolo -- To unsubscribe from this list: send the line

Re: [PATCH] x86: kvm: use alternatives for VMCALL vs. VMMCALL if kernel text is read-only

2014-09-23 Thread Borislav Petkov
On Tue, Sep 23, 2014 at 10:00:12AM +0200, Paolo Bonzini wrote: Il 22/09/2014 21:43, Borislav Petkov ha scritto: On x86_64, kernel text mappings are mapped read-only with CONFIG_DEBUG_RODATA. Hmm, that depends on DEBUG_KERNEL. I think you're actually talking about distro kernels

Re: [RFC patch 0/6] vfio based pci pass-through for qemu/KVM on s390

2014-09-23 Thread Alexander Graf
On 23.09.14 00:28, Alex Williamson wrote: On Tue, 2014-09-23 at 00:08 +0200, Alexander Graf wrote: On 22.09.14 22:47, Alex Williamson wrote: On Fri, 2014-09-19 at 13:54 +0200, frank.blasc...@de.ibm.com wrote: This set of patches implements a vfio based solution for pci pass-through on the

Re: [PATCH] KVM: EVENTFD: Only conditionally remove inclusion of irq.h

2014-09-23 Thread Paolo Bonzini
Il 22/09/2014 23:33, Christoffer Dall ha scritto: Commit c77dcac KVM: Move more code under CONFIG_HAVE_KVM_IRQFD added functionality that depends on definitions in ioapic.h when __KVM_HAVE_IOAPIC is defined. At the same time, 0ba0951 KVM: EVENTFD: remove inclusion of irq.h removed the

Important security message : NNRKIHLKWS

2014-09-23 Thread Apple
Your security is very important to us. Please take a moment to read this information. We have made some changes to our Online Banking system to increase security on your account, and to safeguard your transactions, ensuring that you are safe when banking online. We recommend you to update

[GIT PULL] Another KVM fix for 3.17

2014-09-23 Thread Paolo Bonzini
Linus, The following changes since commit f3670394c29ff3730638762c1760fd2f624e6d7b: Revert x86/efi: Fixup GOT in all boot code paths (2014-09-22 23:05:49 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus for you to fetch changes up

[PATCHv7 00/26] VFIO support for platform and AMBA devices on ARM

2014-09-23 Thread Antonios Motakis
This patch series aims to implement VFIO support for platform devices that reside behind an IOMMU. Examples of such devices are devices behind an ARM SMMU, or behind a Samsung Exynos System MMU. This version of the patch series introduces numerous fixes and cleanups based on the feedback received

[PATCHv7 17/26] vfio/platform: support MMAP of MMIO regions

2014-09-23 Thread Antonios Motakis
Allow to memory map the MMIO regions of the device so userspace can directly access them. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/vfio/platform/vfio_platform_common.c | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) diff

[PATCHv7 10/26] vfio: platform: probe to devices on the platform bus

2014-09-23 Thread Antonios Motakis
Driver to bind to Linux platform devices, and callbacks to discover their resources to be used by the main VFIO PLATFORM code. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/vfio/platform/vfio_platform.c | 96 +++

[PATCHv7 25/26] vfio: initialize the virqfd workqueue in VFIO generic code

2014-09-23 Thread Antonios Motakis
Now we have finally completely decoupled virqfd from VFIO_PCI. We can initialize it from the VFIO generic code, in order to safely use it from multiple independent VFIO bus drivers. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/vfio/pci/vfio_pci.c | 8

[PATCHv7 23/26] vfio: add local lock in virqfd instead of depending on VFIO PCI

2014-09-23 Thread Antonios Motakis
Virqfd just needs to keep accesses to any struct *virqfd safe, but this comes into play only when creating or destroying eventfds, so sharing the same spinlock with the VFIO bus driver is not necessary. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com ---

[PATCHv7 22/26] vfio: move eventfd support code for VFIO_PCI to a separate file

2014-09-23 Thread Antonios Motakis
The virqfd functionality that is used by VFIO_PCI to implement interrupt masking and unmasking via an eventfd, is generic enough and can be reused by another driver. Move it to a separate file in order to allow the code to be shared. Also properly export virqfd_enable and virqfd_disable in the

[PATCHv7 24/26] vfio: pass an opaque pointer on virqfd initialization

2014-09-23 Thread Antonios Motakis
VFIO_PCI passes the VFIO device structure *vdev via eventfd to the handler that implements masking/unmasking of IRQs via an eventfd. We can replace it in the virqfd infrastructure with an opaque type so we can make use of the mechanism from other VFIO bus drivers. Signed-off-by: Antonios Motakis

[PATCHv7 26/26] vfio/platform: implement IRQ masking/unmasking via an eventfd

2014-09-23 Thread Antonios Motakis
With this patch the VFIO user will be able to set an eventfd that can be used in order to mask and unmask IRQs of platform devices. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/vfio/platform/vfio_platform_irq.c | 48 +--

[PATCHv7 20/26] vfio/platform: trigger an interrupt via eventfd

2014-09-23 Thread Antonios Motakis
This patch allows to set an eventfd for a patform device's interrupt, and also to trigger the interrupt eventfd from userspace for testing. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/vfio/platform/vfio_platform_irq.c | 89 ++-

[PATCHv7 21/26] vfio/platform: support for maskable and automasked interrupts

2014-09-23 Thread Antonios Motakis
Adds support to mask interrupts, and also for automasked interrupts. Level sensitive interrupts are exposed as automasked interrupts and are masked and disabled automatically when they fire. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com ---

[PATCHv7 19/26] vfio/platform: initial interrupts support code

2014-09-23 Thread Antonios Motakis
This patch is a skeleton for the VFIO_DEVICE_SET_IRQS IOCTL, around which most IRQ functionality is implemented in VFIO. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/vfio/platform/vfio_platform_common.c | 41 ++--

Re: [PATCHv7 01/26] iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXEC

2014-09-23 Thread Will Deacon
Hi Antonios, On Tue, Sep 23, 2014 at 03:46:00PM +0100, Antonios Motakis wrote: Exposing the XN flag of the SMMU driver as IOMMU_NOEXEC instead of IOMMU_EXEC makes it enforceable, since for IOMMUs that don't support the XN flag pages will always be executable. Signed-off-by: Antonios Motakis

[PATCHv7 16/26] vfio/platform: read and write support for the device fd

2014-09-23 Thread Antonios Motakis
VFIO returns a file descriptor which we can use to manipulate the memory regions of the device. Usually, the user will mmap memory regions that are addressable on page boundaries, however for memory regions where this is not the case we cannot provide mmap functionality due to security concerns.

[PATCHv7 14/26] vfio/platform: return info for bound device

2014-09-23 Thread Antonios Motakis
A VFIO userspace driver will start by opening the VFIO device that corresponds to an IOMMU group, and will use the ioctl interface to get the basic device info, such as number of memory regions and interrupts, and their properties. This patch enables the VFIO_DEVICE_GET_INFO ioctl call.

[PATCHv7 15/26] vfio/platform: return info for device memory mapped IO regions

2014-09-23 Thread Antonios Motakis
This patch enables the IOCTLs VFIO_DEVICE_GET_REGION_INFO ioctl call, which allows the user to learn about the available MMIO resources of a device. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/vfio/platform/vfio_platform_common.c | 84 +--

[PATCHv7 18/26] vfio/platform: return IRQ info

2014-09-23 Thread Antonios Motakis
Return information for the interrupts exposed by the device. This patch extends VFIO_DEVICE_GET_INFO with the number of IRQs and enables VFIO_DEVICE_GET_IRQ_INFO. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/vfio/platform/Makefile| 2 +-

[PATCHv7 13/26] vfio: amba: add the VFIO for AMBA devices module to Kconfig

2014-09-23 Thread Antonios Motakis
Enable building the VFIO AMBA driver. VFIO_AMBA depends on VFIO_PLATFORM, since it is sharing a portion of the code, and it is essentially implemented as a platform device whose resources are discovered via AMBA specific APIs in the kernel. Signed-off-by: Antonios Motakis

[PATCHv7 09/26] vfio/platform: initial skeleton of VFIO support for platform devices

2014-09-23 Thread Antonios Motakis
This patch forms the common skeleton code for platform devices support with VFIO. This will include the core functionality of VFIO_PLATFORM, however binding to the device and discovering the device resources will be done with the help of a separate file where any Linux platform bus specific code

[PATCHv7 11/26] vfio: platform: add the VFIO PLATFORM module to Kconfig

2014-09-23 Thread Antonios Motakis
Enable building the VFIO PLATFORM driver that allows to use Linux platform devices with VFIO. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/vfio/Kconfig | 1 + drivers/vfio/Makefile | 1 + drivers/vfio/platform/Kconfig | 9 +

[PATCHv7 12/26] vfio: amba: VFIO support for AMBA devices

2014-09-23 Thread Antonios Motakis
Add support for discovering AMBA devices with VFIO and handle them similarly to Linux platform devices. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/vfio/platform/vfio_amba.c | 108 ++ include/uapi/linux/vfio.h | 1 +

[PATCHv7 05/26] vfio: introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag

2014-09-23 Thread Antonios Motakis
We introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag to the VFIO dma map call, and expose its availability via the capability VFIO_IOMMU_PROT_NOEXEC. This way the user can control whether the XN flag will be set on the requested mappings. The IOMMU_NOEXEC flag needs to be available for all the IOMMUs of

[PATCHv7 08/26] driver core: amba: add documentation for binding path 'driver_override'

2014-09-23 Thread Antonios Motakis
Add documentation for alternative binding path 'driver_override' for AMBA devices. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- Documentation/ABI/testing/sysfs-bus-amba | 20 1 file changed, 20 insertions(+) create mode 100644

[PATCHv7 06/26] vfio/iommu_type1: implement the VFIO_DMA_MAP_FLAG_NOEXEC flag

2014-09-23 Thread Antonios Motakis
Some IOMMU drivers, such as the ARM SMMU driver, make available the IOMMU_NOEXEC flag, to set the page tables for a device as XN (execute never). This affects devices such as the ARM PL330 DMA Controller, which respects this flag and will refuse to fetch DMA instructions from memory where the XN

[PATCHv7 07/26] driver core: amba: add device binding path 'driver_override'

2014-09-23 Thread Antonios Motakis
As already demonstrated with PCI [1] and the platform bus [2], a driver_override property in sysfs can be used to bypass the id matching of a device to a AMBA driver. This can be used by VFIO to bind to any AMBA device requested by the user. [1]

[PATCHv7 04/26] vfio/iommu_type1: support for platform bus devices on ARM

2014-09-23 Thread Antonios Motakis
This allows to make use of the VFIO_IOMMU_TYPE1 driver with platform devices on ARM. The driver can then be used with an Exynos SMMU, or ARM SMMU driver. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/vfio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1

[PATCHv7 03/26] iommu/arm-smmu: add IOMMU_CAP_NOEXEC to the ARM SMMU driver

2014-09-23 Thread Antonios Motakis
The ARM SMMU supports the IOMMU_NOEXEC protection flag. Add the corresponding IOMMU capability. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/iommu/arm-smmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c

[PATCHv7 02/26] iommu: add capability IOMMU_CAP_NOEXEC

2014-09-23 Thread Antonios Motakis
Some IOMMUs accept an IOMMU_NOEXEC protection flag in addition to IOMMU_READ and IOMMU_WRITE. Expose this as an IOMMU capability. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h

[PATCHv7 01/26] iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXEC

2014-09-23 Thread Antonios Motakis
Exposing the XN flag of the SMMU driver as IOMMU_NOEXEC instead of IOMMU_EXEC makes it enforceable, since for IOMMUs that don't support the XN flag pages will always be executable. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com --- drivers/iommu/arm-smmu.c | 9 +

Re: [PATCH v6 3/3] ivshmem: add check on protocol version in QEMU

2014-09-23 Thread Stefan Hajnoczi
On Mon, Sep 08, 2014 at 12:49:48PM +0300, Michael S. Tsirkin wrote: On Mon, Sep 08, 2014 at 11:17:50AM +0200, David Marchand wrote: Send a protocol version as the first message from server, clients must close communication if they don't support this protocol version. What's the motivation

Re: [PATCH v4] kvm: Fix page ageing bugs

2014-09-23 Thread Andres Lagar-Cavilla
On Tue, Sep 23, 2014 at 12:49 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 22/09/2014 23:54, Andres Lagar-Cavilla ha scritto: @@ -1406,32 +1406,24 @@ static int kvm_age_rmapp(struct kvm *kvm, unsigned long *rmapp, struct rmap_iterator uninitialized_var(iter); int young = 0;

Re: [PATCH v4] kvm: Fix page ageing bugs

2014-09-23 Thread Paolo Bonzini
Il 23/09/2014 19:04, Andres Lagar-Cavilla ha scritto: I'm not sure. The addition is not always by PAGE_SIZE, since it depends on the current level we are iterating at in the outer kvm_handle_hva_range(). IOW, could be PMD_SIZE or even PUD_SIZE, and is_large_pte() enough to tell? This is

[PATCH 1/2] kvm: Fix powerpc compile slippage.

2014-09-23 Thread Andres Lagar-Cavilla
After kvm: Fix page ageing bugs Signed-off-by: Andres Lagar-Cavilla andre...@google.com --- arch/powerpc/include/asm/kvm_ppc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h index fb86a22..d4a92d7

Re: [PATCH 1/2] kvm: Fix powerpc compile slippage.

2014-09-23 Thread Andres Lagar-Cavilla
On Tue, Sep 23, 2014 at 10:58 AM, Andres Lagar-Cavilla andre...@google.com wrote: After kvm: Fix page ageing bugs Signed-off-by: Andres Lagar-Cavilla andre...@google.com I can resend without the 1/2 (git n00b growing pains). Otherwise that should fix the kbuild error. Apologies for that.

Re: [PATCH 1/2] kvm: Fix powerpc compile slippage.

2014-09-23 Thread Paolo Bonzini
Il 23/09/2014 20:03, Andres Lagar-Cavilla ha scritto: I can resend without the 1/2 (git n00b growing pains). Otherwise that should fix the kbuild error. Apologies for that. No problem, kvm/queue is there for this reason. It can be rebased, so I'll just squash this into the patch. Paolo -- To

Using physical disks in a VM

2014-09-23 Thread Boylan, Ross
I have a couple of SATA disks (software RAID on some partitions) with a system that has become unreliable on them. I plan to add more disks and install a new system on them (Debian wheezy). I will still need to run things on the old OS (simultaneously running the new OS) to migrate. Is there

KVM: remove Kconfig symbol KVM_VFIO?

2014-09-23 Thread Paul Bolle
Will, Your commit 80ce1639727e (KVM: VFIO: register kvm_device_ops dynamically) is included in linux-next since next-20140918. It removes the last usage of CONFIG_KVM_VFIO. After that commit setting KVM_VFIO is pointless. Is the patch to remove the Kconfig symbol KVM_VFIO from the tree queued

[PATCH] kvm/x86/mmu: Pass gfn and level to rmapp callback.

2014-09-23 Thread Andres Lagar-Cavilla
Callbacks don't have to do extra computation to learn what the caller (lvm_handle_hva_range()) knows very well. Useful for debugging/tracing/printk/future. Signed-off-by: Andres Lagar-Cavilla andre...@google.com --- arch/x86/kvm/mmu.c | 38 ++

Re: [PATCH] kvm/x86/mmu: Pass gfn and level to rmapp callback.

2014-09-23 Thread Paolo Bonzini
Il 23/09/2014 21:34, Andres Lagar-Cavilla ha scritto: Callbacks don't have to do extra computation to learn what the caller (lvm_handle_hva_range()) knows very well. Useful for debugging/tracing/printk/future. Signed-off-by: Andres Lagar-Cavilla andre...@google.com --- arch/x86/kvm/mmu.c

Re: KVM: remove Kconfig symbol KVM_VFIO?

2014-09-23 Thread Paolo Bonzini
Il 23/09/2014 21:09, Paul Bolle ha scritto: Will, Your commit 80ce1639727e (KVM: VFIO: register kvm_device_ops dynamically) is included in linux-next since next-20140918. It removes the last usage of CONFIG_KVM_VFIO. After that commit setting KVM_VFIO is pointless. Is the patch to remove

Re: [PATCH v2 03/13] powerpc/spapr: vfio: Implement spapr_tce_iommu_ops

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 13:00 +1000, Alexey Kardashevskiy wrote: Modern IBM POWERPC systems support multiple IOMMU tables per PE so we need a more reliable way (compared to container_of()) to get a PE pointer from the iommu_table struct pointer used in IOMMU functions. At the moment IOMMU

Re: [PATCH RFC] virtio-pci: share config interrupt between virtio devices

2014-09-23 Thread Stefan Fritsch
On Sunday 21 September 2014 13:21:06, Michael S. Tsirkin wrote: On Sun, Sep 21, 2014 at 11:36:44AM +0200, Stefan Fritsch wrote: On Sunday 21 September 2014 11:09:14, Michael S. Tsirkin wrote: On Thu, Sep 18, 2014 at 09:18:37PM +0200, Stefan Fritsch wrote: On Monday 01 September 2014

Re: [PATCH v2 04/13] powerpc/powernv: Convert/move set_bypass() callback to take_ownership()

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 13:00 +1000, Alexey Kardashevskiy wrote: At the moment the iommu_table struct has a set_bypass() which enables/ disables DMA bypass on IODA2 PHB. This is exposed to POWERPC IOMMU code which calls this callback when external IOMMU users such as VFIO are about to get over a

Re: [PATCH v2 13/13] vfio: powerpc/spapr: Enable Dynamic DMA windows

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 13:01 +1000, Alexey Kardashevskiy wrote: This defines and implements VFIO IOMMU API which lets the userspace create and remove DMA windows. This updates VFIO_IOMMU_SPAPR_TCE_GET_INFO to return the number of available windows and page mask. This adds

Re: [PATCHv7 01/26] iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXEC

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 15:58 +0100, Will Deacon wrote: Hi Antonios, On Tue, Sep 23, 2014 at 03:46:00PM +0100, Antonios Motakis wrote: Exposing the XN flag of the SMMU driver as IOMMU_NOEXEC instead of IOMMU_EXEC makes it enforceable, since for IOMMUs that don't support the XN flag pages

Re: [PATCHv7 05/26] vfio: introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 16:46 +0200, Antonios Motakis wrote: We introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag to the VFIO dma map call, and expose its availability via the capability VFIO_IOMMU_PROT_NOEXEC. This way the user can control whether the XN flag will be set on the requested mappings.

Re: [PATCHv7 05/26] vfio: introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 16:21 -0600, Alex Williamson wrote: On Tue, 2014-09-23 at 16:46 +0200, Antonios Motakis wrote: We introduce the VFIO_DMA_MAP_FLAG_NOEXEC flag to the VFIO dma map call, and expose its availability via the capability VFIO_IOMMU_PROT_NOEXEC. This way the user can control

Re: [PATCHv7 06/26] vfio/iommu_type1: implement the VFIO_DMA_MAP_FLAG_NOEXEC flag

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 16:46 +0200, Antonios Motakis wrote: Some IOMMU drivers, such as the ARM SMMU driver, make available the IOMMU_NOEXEC flag, to set the page tables for a device as XN (execute never). This affects devices such as the ARM PL330 DMA Controller, which respects this flag and

Re: [PATCHv7 07/26] driver core: amba: add device binding path 'driver_override'

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 16:46 +0200, Antonios Motakis wrote: As already demonstrated with PCI [1] and the platform bus [2], a driver_override property in sysfs can be used to bypass the id matching of a device to a AMBA driver. This can be used by VFIO to bind to any AMBA device requested by the

Re: [PATCHv7 10/26] vfio: platform: probe to devices on the platform bus

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 16:46 +0200, Antonios Motakis wrote: Driver to bind to Linux platform devices, and callbacks to discover their resources to be used by the main VFIO PLATFORM code. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com ---

Re: [PATCHv7 13/26] vfio: amba: add the VFIO for AMBA devices module to Kconfig

2014-09-23 Thread Alex Williamson
On Tue, 2014-09-23 at 16:46 +0200, Antonios Motakis wrote: Enable building the VFIO AMBA driver. VFIO_AMBA depends on VFIO_PLATFORM, since it is sharing a portion of the code, and it is essentially implemented as a platform device whose resources are discovered via AMBA specific APIs in the

[PATCH 1/1] kvm, mem-hotplug: Add arch specific mmu notifier to handle apic access migration.

2014-09-23 Thread Tang Chen
Hi Paolo, I'm not sure if this patch is following your comment. Please review. And all the other comments are followed. If this patch is OK, I'll send v8 soon. Thanks. We are handling L1 and L2 share one apic access page situation when migrating apic access page. We should do some handling

Re: [PATCH v4] kvm: Fix page ageing bugs

2014-09-23 Thread Wanpeng Li
Hi Andres, On Mon, Sep 22, 2014 at 02:54:42PM -0700, Andres Lagar-Cavilla wrote: 1. We were calling clear_flush_young_notify in unmap_one, but we are within an mmu notifier invalidate range scope. The spte exists no more (due to range_start) and the accessed bit info has already been propagated