Re: [PATCH] tcm_vhost: Add vhost_scsi as an alias for tcm_vhost

2013-04-30 Thread Michael S. Tsirkin
On Sat, Apr 27, 2013 at 11:42:09AM +0800, Asias He wrote: > Signed-off-by: Asias He Nicholas, thoughts? How about we move tcm_vhost.c to scsi.c call module vhost_scsi and add tcm_vhost as an alias? If not - want this alias in? > --- > drivers/vhost/tcm_vhost.c | 1 + > 1 file changed, 1 insert

virtio performance analysis

2013-04-30 Thread nitesh narayan lal
Hi, I am currently working on the virtio performance analysis in PowerPC . I was looking at the virtio front-end code and had done tracing by adding WARN_ON condition in skb_recv_done(),xmit_skb_done( ) and virtqueue_kick(). What I had seen is virtqueue_kick() internally it calls iowrite16() which

[PATCH] kvm: always define KVM_CAP_READONLY_MEM

2013-04-30 Thread Jordan Justen
Don't use #ifdef __KVM_HAVE_READONLY_MEM when defining KVM_CAP_READONLY_MEM. Signed-off-by: Jordan Justen Cc: Xiao Guangrong Cc: Jan Kiszka --- include/uapi/linux/kvm.h |2 -- 1 file changed, 2 deletions(-) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 3c56ba3..26

[PATCH] kvm: Add compat_ioctl for device control API

2013-04-30 Thread Scott Wood
This API shouldn't have 32/64-bit issues, but VFS assumes it does unless told otherwise. Signed-off-by: Scott Wood --- virt/kvm/kvm_main.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 54a14fa..ee0adad 100644 --- a/virt/kvm/kvm_main.c +

[PATCH 1/2] kvm/ppc/mpic: fix mmio region lists when multiple guests used

2013-04-30 Thread Scott Wood
Keeping a linked list of statically defined objects doesn't work very well when we have multiple guests. :-P Switch to an array of constant objects. This fixes a hang when multiple guests are used. Signed-off-by: Scott Wood --- arch/powerpc/kvm/mpic.c | 52 +--

[PATCH 2/2] kvm/ppc/mpic: remove users

2013-04-30 Thread Scott Wood
This is an unused (no pun intended) leftover from when this code did reference counting. Signed-off-by: Scott Wood --- arch/powerpc/kvm/mpic.c |1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/kvm/mpic.c b/arch/powerpc/kvm/mpic.c index 80ea3cb..c30a04b 100644 --- a/arch/powerpc/

[PATCH] vfio: Set container device mode

2013-04-30 Thread Alex Williamson
Minor 0 is the VFIO container device (/dev/vfio/vfio). On it's own the container does not provide a user with any privileged access. It only supports API version check and extension check ioctls. Only by attaching a VFIO group to the container does it gain any access. Set the mode of the contai

Re: Booting physically installed Windows while in Arch (AHCI support in OVMF?)

2013-04-30 Thread Evert Heylen
Bump. I'm currently in such a state I won't be able to sleep well before I make some progress on this. I've already described my situation quite precisly, if one needs even more information, just ask. I've now also tried with a separate img containing DUET, so I can use the default seabios to boo

Re: [PATCH 1/4] ARM: KVM: be more thorough when invalidating TLBs

2013-04-30 Thread Marc Zyngier
On 30/04/13 18:17, Christoffer Dall wrote: > On Tue, Apr 30, 2013 at 7:17 AM, Marc Zyngier wrote: >> The KVM/ARM MMU code doesn't take care of invalidating TLBs before >> freeing a {pte,pmd} table. This could cause problems if the page >> is reallocated and then speculated into by another CPU. >>

Re: [PATCH 4/4] ARM: KVM: fix use of S2_PGD_SIZE

2013-04-30 Thread Marc Zyngier
On 30/04/13 18:56, Christoffer Dall wrote: > On Tue, Apr 30, 2013 at 06:52:24PM +0100, Marc Zyngier wrote: >> On 30/04/13 18:40, Christoffer Dall wrote: >>> On Tue, Apr 30, 2013 at 7:17 AM, Marc Zyngier wrote: S2_PGD_SIZE describe the number of pages a used by a stage-2 PGD, not the size

Re: [PATCH 4/4] ARM: KVM: fix use of S2_PGD_SIZE

2013-04-30 Thread Christoffer Dall
On Tue, Apr 30, 2013 at 06:52:24PM +0100, Marc Zyngier wrote: > On 30/04/13 18:40, Christoffer Dall wrote: > > On Tue, Apr 30, 2013 at 7:17 AM, Marc Zyngier wrote: > >> S2_PGD_SIZE describe the number of pages a used by a stage-2 PGD, > >> not the size of the PGD. > >> > >> Fix the VM_BUG_ON() cal

Re: [PATCH 4/4] ARM: KVM: fix use of S2_PGD_SIZE

2013-04-30 Thread Marc Zyngier
On 30/04/13 18:40, Christoffer Dall wrote: > On Tue, Apr 30, 2013 at 7:17 AM, Marc Zyngier wrote: >> S2_PGD_SIZE describe the number of pages a used by a stage-2 PGD, >> not the size of the PGD. >> >> Fix the VM_BUG_ON() call that doesn't check much when S2_PGD_SIZE >> is equal to 1. >> >> Signed-

Re: [PATCH 4/4] ARM: KVM: fix use of S2_PGD_SIZE

2013-04-30 Thread Christoffer Dall
On Tue, Apr 30, 2013 at 7:17 AM, Marc Zyngier wrote: > S2_PGD_SIZE describe the number of pages a used by a stage-2 PGD, > not the size of the PGD. > > Fix the VM_BUG_ON() call that doesn't check much when S2_PGD_SIZE > is equal to 1. > > Signed-off-by: Marc Zyngier > --- > arch/arm/kvm/mmu.c |

Re: [PATCH 1/4] ARM: KVM: be more thorough when invalidating TLBs

2013-04-30 Thread Christoffer Dall
On Tue, Apr 30, 2013 at 7:17 AM, Marc Zyngier wrote: > The KVM/ARM MMU code doesn't take care of invalidating TLBs before > freeing a {pte,pmd} table. This could cause problems if the page > is reallocated and then speculated into by another CPU. > > Reported-by: Catalin Marinas > Signed-off-by:

any reason kvm_main.c doesn't use debugfs_remove_recursive?

2013-04-30 Thread Robert P. J. Day
poking around in the KVM code and ran across this in kvm_main.c: ... snip ... out_dir: debugfs_remove_recursive(kvm_debugfs_dir); out: return r; } static void kvm_exit_debug(void) { struct kvm_stats_debugfs_item *p; for (p = debugfs_entries; p->name; ++p)

[PATCH 02/15] ARM: KVM: arch_timer: use symbolic constants

2013-04-30 Thread Christoffer Dall
From: Mark Rutland In clocksource/arm_arch_timer.h we define useful symbolic constants. Let's use them to make the KVM arch_timer code clearer. Signed-off-by: Mark Rutland Acked-by: Marc Zyngier Cc: Christoffer Dall Signed-off-by: Christoffer Dall --- arch/arm/kvm/arch_timer.c |7 --

[PATCH 08/15] ARM: KVM: switch to a dual-step HYP init code

2013-04-30 Thread Christoffer Dall
From: Marc Zyngier Our HYP init code suffers from two major design issues: - it cannot support CPU hotplug, as we tear down the idmap very early - it cannot perform a TLB invalidation when switching from init to runtime mappings, as pages are manipulated from PL1 exclusively The hotplug proble

[PATCH 04/15] ARM: KVM: fix HYP mapping limitations around zero

2013-04-30 Thread Christoffer Dall
From: Marc Zyngier The current code for creating HYP mapping doesn't like to wrap around zero, which prevents from mapping anything into the last page of the virtual address space. It doesn't take much effort to remove this limitation, making the code more consistent with the rest of the kernel

[PATCH 09/15] ARM: KVM: perform HYP initilization for hotplugged CPUs

2013-04-30 Thread Christoffer Dall
From: Marc Zyngier Now that we have the necessary infrastructure to boot a hotplugged CPU at any point in time, wire a CPU notifier that will perform the HYP init for the incoming CPU. Note that this depends on the platform code and/or firmware to boot the incoming CPU with HYP mode enabled and

[PATCH 12/15] KVM: ARM: Fix API documentation for ONE_REG encoding

2013-04-30 Thread Christoffer Dall
Unless I'm mistaken, the size field was encoded 4 bits off and a wrong value was used for 64-bit FP registers. Signed-off-by: Christoffer Dall --- Documentation/virtual/kvm/api.txt | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/virtual/kvm/api.tx

[PATCH 13/15] ARM: KVM: define KVM_ARM_MAX_VCPUS unconditionally

2013-04-30 Thread Christoffer Dall
From: Arnd Bergmann The CONFIG_KVM_ARM_MAX_VCPUS symbol is needed in order to build the kernel/context_tracking.c code, which includes the vgic data structures implictly through the kvm headers. Definining the symbol to zero on builds without KVM resolves this build error: In file included from

[PATCH 11/15] ARM: KVM: promote vfp_host pointer to generic host cpu context

2013-04-30 Thread Christoffer Dall
From: Marc Zyngier We use the vfp_host pointer to store the host VFP context, should the guest start using VFP itself. Actually, we can use this pointer in a more generic way to store CPU speficic data, and arm64 is using it to dump the whole host state before switching to the guest. Simply ren

[PATCH 15/15] ARM: KVM: iterate over all CPUs for CPU compatibility check

2013-04-30 Thread Christoffer Dall
From: Andre Przywara kvm_target_cpus() checks the compatibility of the used CPU with KVM, which is currently limited to ARM Cortex-A15 cores. However by calling it only once on any random CPU it assumes that all cores are the same, which is not necessarily the case (for example in Big.Little). [

[PATCH 14/15] KVM: ARM: Fix spelling in error message

2013-04-30 Thread Christoffer Dall
s/unkown/unknown/ Signed-off-by: Christoffer Dall --- arch/arm/kvm/handle_exit.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kvm/handle_exit.c b/arch/arm/kvm/handle_exit.c index 26ad173..3d74a0b 100644 --- a/arch/arm/kvm/handle_exit.c +++ b/arch/arm/kvm/handle

[PATCH 10/15] ARM: KVM: add architecture specific hook for capabilities

2013-04-30 Thread Christoffer Dall
From: Marc Zyngier Most of the capabilities are common to both arm and arm64, but we still need to handle the exceptions. Introduce kvm_arch_dev_ioctl_check_extension, which both architectures implement (in the 32bit case, it just returns 0). Signed-off-by: Marc Zyngier Signed-off-by: Christof

[PATCH 07/15] ARM: KVM: rework HYP page table freeing

2013-04-30 Thread Christoffer Dall
From: Marc Zyngier There is no point in freeing HYP page tables differently from Stage-2. They now have the same requirements, and should be dealt with the same way. Promote unmap_stage2_range to be The One True Way, and get rid of a number of nasty bugs in the process (good thing we never actua

[PATCH 05/15] ARM: KVM: move to a KVM provided HYP idmap

2013-04-30 Thread Christoffer Dall
From: Marc Zyngier After the HYP page table rework, it is pretty easy to let the KVM code provide its own idmap, rather than expecting the kernel to provide it. It takes actually less code to do so. Acked-by: Will Deacon Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dall --- arch/ar

[PATCH 06/15] ARM: KVM: enforce maximum size for identity mapped code

2013-04-30 Thread Christoffer Dall
From: Marc Zyngier We're about to move to an init procedure where we rely on the fact that the init code fits in a single page. Make sure we align the idmap text on a vector alignment, and that the code is not bigger than a single page. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer Dal

[PATCH 03/15] ARM: KVM: simplify HYP mapping population

2013-04-30 Thread Christoffer Dall
From: Marc Zyngier The way we populate HYP mappings is a bit convoluted, to say the least. Passing a pointer around to keep track of the current PFN is quite odd, and we end-up having two different PTE accessors for no good reason. Simplify the whole thing by unifying the two PTE accessors, pass

[PATCH 01/15] ARM: KVM: add support for minimal host vs guest profiling

2013-04-30 Thread Christoffer Dall
From: Marc Zyngier In order to be able to correctly profile what is happening on the host, we need to be able to identify when we're running on the guest, and log these events differently. Perf offers a simple way to register callbacks into KVM. Mimic what x86 does and enjoy being able to profil

[GIT PULL v2] KVM/ARM Changes for 3.10

2013-04-30 Thread Christoffer Dall
Hi Marcelo and Gleb, These are the changes for KVM/ARM for 3.10. The patches depend on the cleanup branch, which you've already merged. Main thing is the reworking of Hyp idmaps, which is now handled by KVM instead of arm/mm and includes several nasty bug fixes from Marc in the progress. [v2]

Re: [PATCH 3/4] ARM: KVM: relax cache maintainance when building page pables

2013-04-30 Thread Will Deacon
On Tue, Apr 30, 2013 at 03:17:25PM +0100, Marc Zyngier wrote: > Patch 5a677ce044f1 (ARM: KVM: switch to a dual-step HYP init code) > introduced code that flushes page tables to the point of coherency. > This is overkill (point of unification is enough), and actually > not required if running on a S

[PATCH 4/4] ARM: KVM: fix use of S2_PGD_SIZE

2013-04-30 Thread Marc Zyngier
S2_PGD_SIZE describe the number of pages a used by a stage-2 PGD, not the size of the PGD. Fix the VM_BUG_ON() call that doesn't check much when S2_PGD_SIZE is equal to 1. Signed-off-by: Marc Zyngier --- arch/arm/kvm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch

[PATCH 3/4] ARM: KVM: relax cache maintainance when building page pables

2013-04-30 Thread Marc Zyngier
Patch 5a677ce044f1 (ARM: KVM: switch to a dual-step HYP init code) introduced code that flushes page tables to the point of coherency. This is overkill (point of unification is enough), and actually not required if running on a SMP capable platform. Change this code to use clean_dcache_area(), whi

[PATCH 2/4] ARM: KVM: remove dead prototype for __kvm_tlb_flush_vmid

2013-04-30 Thread Marc Zyngier
__kvm_tlb_flush_vmid has been renamed to __kvm_tlb_flush_vmid_ipa, and the old prototype should have been removed when the code was modified. Signed-off-by: Marc Zyngier --- arch/arm/include/asm/kvm_asm.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/include/asm/kvm_asm.h b/arch/

[PATCH 1/4] ARM: KVM: be more thorough when invalidating TLBs

2013-04-30 Thread Marc Zyngier
The KVM/ARM MMU code doesn't take care of invalidating TLBs before freeing a {pte,pmd} table. This could cause problems if the page is reallocated and then speculated into by another CPU. Reported-by: Catalin Marinas Signed-off-by: Marc Zyngier --- arch/arm/kvm/interrupts.S | 2 ++ arch/arm/kv

[PATCH 0/4] ARM: KVM: random mmu related fixes for 3.10

2013-04-30 Thread Marc Zyngier
This patch series fixes a number of of KVM/ARM issues that have either been spotted during the review of the arm64 code, or while reworking related code. Only the first patch fixes a potential (if unlikely) problem, the others are either cosmetic or performance related. Tested on TC-2. Marc Zyng

Re: KVM call agenda for 2013-04-30

2013-04-30 Thread Juan Quintela
Juan Quintela wrote: > Hi > > Please send in any agenda topics you are interested in. As there are no agenda, call got dropped. Happy hacking, Juan. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at h

Re: [PATCH] KVM: nVMX: Replace kvm_set_cr0 with vmx_set_cr0 in load_vmcs12_host_state

2013-04-30 Thread Jan Kiszka
On 2013-04-30 13:46, Gleb Natapov wrote: > On Sun, Apr 28, 2013 at 12:20:38PM +0200, Jan Kiszka wrote: >> On 2013-02-23 22:35, Jan Kiszka wrote: >>> From: Jan Kiszka >>> >>> Likely a typo, but a fatal one as kvm_set_cr0 performs checks on the >>> state transition that may prevent loading L1's cr0.

Re: [PATCH] KVM: nVMX: Replace kvm_set_cr0 with vmx_set_cr0 in load_vmcs12_host_state

2013-04-30 Thread Gleb Natapov
On Sun, Apr 28, 2013 at 12:20:38PM +0200, Jan Kiszka wrote: > On 2013-02-23 22:35, Jan Kiszka wrote: > > From: Jan Kiszka > > > > Likely a typo, but a fatal one as kvm_set_cr0 performs checks on the > > state transition that may prevent loading L1's cr0. > > > > Signed-off-by: Jan Kiszka > > --

Re: [GIT PULL] KVM/ARM Changes for 3.10

2013-04-30 Thread Marcelo Tosatti
On Mon, Apr 29, 2013 at 07:52:41PM -0700, Christoffer Dall wrote: > On Mon, Apr 29, 2013 at 7:11 PM, Marcelo Tosatti wrote: > > On Sun, Apr 28, 2013 at 10:29:07PM -0700, Christoffer Dall wrote: > >> Hi Marcelo and Gleb, > >> > >> These are the changes for KVM/ARM for 3.10. > >> > >> The patches de

Re: [PATCH v3 08/32] arm64: KVM: architecture specific MMU backend

2013-04-30 Thread Marc Zyngier
On 29/04/13 18:35, Catalin Marinas wrote: > On Mon, Apr 08, 2013 at 05:17:10PM +0100, Marc Zyngier wrote: >> diff --git a/arch/arm64/include/asm/kvm_mmu.h >> b/arch/arm64/include/asm/kvm_mmu.h >> new file mode 100644 >> index 000..2eb2230 >> --- /dev/null >> +++ b/arch/arm64/include/asm/kvm_mm

Re: [PATCH] kvm/ppc/mpic: remove default routes from documentation

2013-04-30 Thread Alexander Graf
On 30.04.2013, at 02:07, Scott Wood wrote: > The default routes were removed from the code during patchset > respinning, but were not removed from the documentation. > > Signed-off-by: Scott Wood Thanks, applied to kvm-ppc-queue. Alex > --- > Documentation/virtual/kvm/devices/mpic.txt |

Re: [PATCH v5 0/8] In-kernel XICS interrupt controller emulation

2013-04-30 Thread Alexander Graf
On 28.04.2013, at 14:05, Paul Mackerras wrote: > On Sun, Apr 28, 2013 at 11:50:49AM +0200, Alexander Graf wrote: >> >> On 27.04.2013, at 10:36, Paul Mackerras wrote: >> >>> On Fri, Apr 26, 2013 at 04:30:37PM +0200, Alexander Graf wrote: Very nice patch set. I've applie 1-7 of it to kvm-ppc