Re: [PATCH v2 04/10] KVM: arm/arm64: vgic: Allow HW irq to be encoded in LR

2015-07-21 Thread Marc Zyngier
On 17/07/15 20:50, Christoffer Dall wrote: On Wed, Jul 08, 2015 at 06:56:36PM +0100, Marc Zyngier wrote: Now that struct vgic_lr supports the LR_HW bit and carries a hwirq field, we can encode that information into the list registers. This patch provides implementations for both GICv2 and

Re: [PATCH v2 07/10] KVM: arm/arm64: vgic: Allow HW interrupts to be queued to a guest

2015-07-21 Thread Marc Zyngier
On 17/07/15 22:56, Christoffer Dall wrote: On Wed, Jul 08, 2015 at 06:56:39PM +0100, Marc Zyngier wrote: To allow a HW interrupt to be injected into a guest, we lookup the guest virtual interrupt in the irq_phys_map rbtree, and if we have s/rbtree/list/ a match, encode both interrupts in

Re: [PATCH v2 03/10] KVM: arm/arm64: vgic: Convert struct vgic_lr to use bitfields

2015-07-21 Thread Marc Zyngier
On 17/07/15 23:15, Christoffer Dall wrote: On Wed, Jul 08, 2015 at 06:56:35PM +0100, Marc Zyngier wrote: As we're about to cram more information in the vgic_lr structure (HW interrupt number and additional state information), we switch to a layout similar to the HW's: - use bitfields to save

Re: [PATCH v2 06/10] KVM: arm/arm64: vgic: Allow dynamic mapping of physical/virtual interrupts

2015-07-21 Thread Marc Zyngier
On 17/07/15 22:11, Christoffer Dall wrote: On Wed, Jul 08, 2015 at 06:56:38PM +0100, Marc Zyngier wrote: In order to be able to feed physical interrupts to a guest, we need to be able to establish the virtual-physical mapping between the two worlds. The mappings are kept in a set of RCU

[RFC PATCH 0/1] vfio-pci/iommu: Detach iommu group on remove path

2015-07-21 Thread Gerald Schaefer
Hi, during IOMMU API function testing on s390 I hit the following scenario: After binding a device to vfio-pci, the user completes the VFIO_SET_IOMMU ioctl and stops, see the sample C program below. Now the device is manually removed via echo 1 /sys/bus/pci/devices/.../remove, which completes

[RFC PATCH 1/1] vfio-pci/iommu: Detach iommu group on remove path

2015-07-21 Thread Gerald Schaefer
When a user completes the VFIO_SET_IOMMU ioctl and the vfio-pci device is removed thereafter (before any other ioctl like VFIO_GROUP_GET_DEVICE_FD), then the detach_dev callback of the underlying IOMMU API is never called. This patch adds a call to vfio_group_try_dissolve_container() to the

Re: [PATCH v2 10/10] KVM: arm/arm64: vgic: Allow non-shared device HW interrupts

2015-07-21 Thread Marc Zyngier
On 17/07/15 23:15, Christoffer Dall wrote: On Wed, Jul 08, 2015 at 06:56:42PM +0100, Marc Zyngier wrote: So far, the only use of the HW interrupt facility is the timer, implying that the active state is context-switched for each vcpu, as the device is is shared across all vcpus. This does

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Michael Ellerman
On Tue, 2015-07-21 at 15:55 +0200, Vlastimil Babka wrote: The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 (page allocator: do not check NUMA node ID when the caller knows the node is valid) as an optimized variant of alloc_pages_node(), that doesn't allow the node id to be

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread David Rientjes
On Tue, 21 Jul 2015, Vlastimil Babka wrote: The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 (page allocator: do not check NUMA node ID when the caller knows the node is valid) as an optimized variant of alloc_pages_node(), that doesn't allow the node id to be -1.

[PATCHv3 1/2] kvmtool: Introduce downscript option for virtio-net

2015-07-21 Thread Fan Du
To detach tap device automatically from bridge when exiting, just like what the reverse of script does. Signed-off-by: Fan Du fan...@intel.com --- include/kvm/virtio-net.h | 1 + virtio/net.c | 49 2 files changed, 38 insertions(+),

[PATCHv3 0/2] Fixes for kvmtool virtio-net part

2015-07-21 Thread Fan Du
Changelog: v2: - Rebase with Will kvmtool.git tree[1] - Drop patch2 from v1, as commit f83dc816a9c7 has already fix it v3: - Remove -Wunused-variable warnings Fan Du (2): kvmtool: Introduce downscript option for virtio-net kvmtool: Restrict virtio queue number to 1 when vhost on

[PATCHv3 2/2] kvmtool: Restrict virtio queue number to 1 when vhost on

2015-07-21 Thread Fan Du
vhost kernel driver does not support mutiple queue yet, Tweak queue number will fail with --net mode=tap,vhost=1,mq=2 as below when lkvm trying to set ring kick fd for queue 2: VHOST_SET_VRING_KICK failed: No buffer space available Error on this scenario, and overide with the default one queue

[PATCH v2 0/2] kvmtool: remaining musl-libc and clang fixes

2015-07-21 Thread Andre Przywara
Hi Will, thanks for applying the fixes. Here are the remaining patches which we talked about. I changed the PAGE_SIZE definition according to Szabolcs' comments (thanks for that!) and just added the -Wno-format-nonliteral option unconditionally to our list of warning options to appease clang.

[PATCH v2 2/2] avoid redefining PAGE_SIZE

2015-07-21 Thread Andre Przywara
PAGE_SIZE may have been defined by the C libary (musl-libc does that). So avoid redefining it here unconditionally, instead only use our definition if none has been provided by the libc. Signed-off-by: Andre Przywara andre.przyw...@arm.com --- include/kvm/kvm.h | 3 +++ 1 file changed, 3

[PATCH v2 1/2] Makefile: avoid non-literal printf format string warnings

2015-07-21 Thread Andre Przywara
The clang compiler by default dislikes non-literal format strings in *printf functions, so it complains about kvm__set_dir() in kvm.c and about the error reporting functions. Since a fix is not easy and the code itself is fine (just seems that the compiler is not smart enough to see that), let's

Re: [PATCHv3 2/2] kvmtool: Restrict virtio queue number to 1 when vhost on

2015-07-21 Thread Andre Przywara
Hi, On 21/07/15 07:18, Fan Du wrote: vhost kernel driver does not support mutiple queue yet, Tweak queue number will fail with --net mode=tap,vhost=1,mq=2 as below when lkvm trying to set ring kick fd for queue 2: VHOST_SET_VRING_KICK failed: No buffer space available Error on this

Re: [PATCHv3 1/2] kvmtool: Introduce downscript option for virtio-net

2015-07-21 Thread Andre Przywara
Hi, thanks for the rework, that looks good to me, some minor nits below. Not sure if that requires a new version, maybe Will can fix that up when he applies it. On 21/07/15 07:18, Fan Du wrote: To detach tap device automatically from bridge when exiting, just like what the reverse of script

[PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Vlastimil Babka
The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 (page allocator: do not check NUMA node ID when the caller knows the node is valid) as an optimized variant of alloc_pages_node(), that doesn't allow the node id to be -1. Unfortunately the name of the function can easily suggest

Re: [PATCH] mm: rename and document alloc_pages_exact_node

2015-07-21 Thread Christoph Lameter
On Tue, 21 Jul 2015, Vlastimil Babka wrote: The function alloc_pages_exact_node() was introduced in 6484eb3e2a81 (page allocator: do not check NUMA node ID when the caller knows the node is valid) as an optimized variant of alloc_pages_node(), that doesn't allow the node id to be -1.

Re: KVM call for agenda for 2015-07-21

2015-07-21 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please, send any topic that you are interested in covering. As there are no topics on the agenda, call is cancelled. Call details: By popular demand, a google calendar public entry with it