Re: the arm cache coherency cluster "v2"

2015-03-18 Thread Andrew Jones
On Wed, Mar 18, 2015 at 03:08:20PM -0400, Andrew Jones wrote: > In reply to this message I'll send two series' one for KVM and > one for QEMU. The two series' are their respective component > complements, and attempt to implement cache coherency for arm > guests using emulated devices, where the em

[RFC PATCH 3/4] memory: add uncached flag

2015-03-18 Thread Andrew Jones
Add an 'uncached' flag, which will result in the KVM_MEM_UNCACHED flag getting set on KVM's corresponding memory slot. Signed-off-by: Andrew Jones --- include/exec/memory.h | 25 + kvm-all.c | 9 + memory.c | 15 +++ 3 files c

[RFC PATCH 0/4] support KVM_MEM_UNCACHED

2015-03-18 Thread Andrew Jones
Add support for the new KVM_MEM_UNCACHED flag, and flag appropriate memory. (Only flags vga/vram for now.) Andrew Jones (4): kvm-all: put kvm_mem_flags to more work HACK: linux header update memory: add uncached flag vga: flag vram as uncached hw/display/vga.c | 1 + include/ex

[RFC PATCH 4/4] vga: flag vram as uncached

2015-03-18 Thread Andrew Jones
Video RAM is typically mapped as uncached by guests. Flag it as such. Signed-off-by: Andrew Jones --- hw/display/vga.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/vga.c b/hw/display/vga.c index c0f7b343bbab5..5c8c249a8d780 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @

[RFC PATCH 2/4] HACK: linux header update

2015-03-18 Thread Andrew Jones
Should do a proper update-linux-headers.sh update. Signed-off-by: Andrew Jones --- linux-headers/linux/kvm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index 60a54c82a3b76..34c03cd80aa69 100644 --- a/linux-headers/linux/kvm.h +++ b

[RFC PATCH 1/4] kvm-all: put kvm_mem_flags to more work

2015-03-18 Thread Andrew Jones
Currently kvm_mem_flags just translates bools to bits, let's make it also determine the bools first. This avoids its parameter list growing each time we add a flag. Signed-off-by: Andrew Jones --- kvm-all.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff -

[RFC PATCH 3/3] arm/arm64: KVM: implement KVM_MEM_UNCACHED

2015-03-18 Thread Andrew Jones
When userspace tells us a memory region is uncached, then we need to pin all its pages and set them all to be uncached. Signed-off-by: Andrew Jones --- arch/arm/include/asm/kvm_mmu.h| 9 + arch/arm/include/uapi/asm/kvm.h | 1 + arch/arm/kvm/mmu.c| 71 +

[RFC PATCH 2/3] arm/arm64: KVM: decouple READONLY and UNCACHED

2015-03-18 Thread Andrew Jones
KVM_MEM_UNCACHED memory will no longer need caches to be flushed for memory as it's faulted in. Just use READONLY directly, in that case, now. Signed-off-by: Andrew Jones --- arch/arm/kvm/mmu.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/arch/arm/kvm/

[RFC PATCH 1/3] KVM: promote KVM_MEMSLOT_INCOHERENT to uapi

2015-03-18 Thread Andrew Jones
Also rename to KVM_MEM_UNCACHED. Signed-off-by: Andrew Jones --- Documentation/virtual/kvm/api.txt | 16 ++-- arch/arm/include/uapi/asm/kvm.h | 1 + arch/arm/kvm/arm.c| 1 + arch/arm/kvm/mmu.c| 4 ++-- arch/arm64/include/uapi/asm/kvm.h | 1 + inc

[RFC PATCH 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-03-18 Thread Andrew Jones
Introduce a new memory region flag, KVM_MEM_UNCACHED, which is needed by ARM. This flag informs KVM that the given memory region is typically mapped by the guest as uncached. KVM for ARM then maps that region as uncached for userspace as well, in order to keep coherency. Andrew Jones (3): KVM: p

the arm cache coherency cluster "v2"

2015-03-18 Thread Andrew Jones
In reply to this message I'll send two series' one for KVM and one for QEMU. The two series' are their respective component complements, and attempt to implement cache coherency for arm guests using emulated devices, where the emulator (qemu) uses cached memory for the device memory, but the guest

Re: the arm cache coherency cluster

2015-03-18 Thread Andrew Jones
On Fri, Mar 06, 2015 at 01:49:40PM -0500, Andrew Jones wrote: > In reply to this message I'll send two series' one for KVM and > one for QEMU. The two series' are their respective component > complements, and attempt to implement cache coherency for arm > guests using emulated devices, where the em

Re: [PATCH v2] target-arm: Store SPSR_EL1 state in banked_spsr[1] (SPSR_svc)

2015-03-18 Thread Alex Bennée
Christoffer Dall writes: > On Tue, Mar 17, 2015 at 07:32:15PM +, Peter Maydell wrote: >> The AArch64 SPSR_EL1 register is architecturally mandated to >> be mapped to the AArch32 SPSR_svc register. This means its >> state should live in QEMU's env->banked_spsr[1] field. >> Correct the various

Re: [PATCH v14 19/20] vfio: initialize the virqfd workqueue in VFIO generic code

2015-03-18 Thread Baptiste Reynal
Hello Alex, The module solution seems fine for me, I have no argument against it. I used your patch on my tests, they are running ok. Regards, Baptiste On Wed, Mar 18, 2015 at 12:04 AM, Alex Williamson wrote: > On Tue, 2015-03-17 at 16:29 -0600, Alex Williamson wrote: >> On Mon, 2015-03-02 at 1

Re: linux-next: manual merge of the kvm-arm tree with Linus' tree

2015-03-18 Thread Christoffer Dall
Hi Stephen, On Wed, Mar 18, 2015 at 02:41:11PM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the kvm-arm tree got a conflict in > virt/kvm/arm/vgic.c between commit ae705930fca6 ("arm/arm64: KVM: Keep > elrsr/aisr in sync with software model") from Linus' tree and commi