Re: [RFC PATCH v3 5/6] kvm/ppc/mpic: in-kernel MPIC emulation

2013-04-08 Thread Paul Mackerras
On Tue, Apr 02, 2013 at 08:57:52PM -0500, Scott Wood wrote: Hook the MPIC code up to the KVM interfaces, add locking, etc. [snip] @@ -2164,6 +2164,15 @@ static int kvm_ioctl_create_device(struct kvm *kvm, bool test = cd-flags KVM_CREATE_DEVICE_TEST; switch (cd-type) {

[PATCH] KVM: x86: fix memory leak in vmx_init

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Free vmx_msr_bitmap_longmode_x2apic and vmx_msr_bitmap_longmode if kvm_init() fails. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/kvm/vmx.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/vmx.c

Re: [PATCH 0/2] virtio-serial: set up vqs on demand

2013-04-08 Thread Amit Shah
On (Thu) 12 Jan 2012 [09:20:05], zanghongy...@huawei.com wrote: From: Hongyong Zang zanghongy...@huawei.com Virtio-serial set up (max_ports+1)*2 vqs when device probes, but may not all io_ports are used. These patches create vqs of port0 and control port when probing the device, then

Re: [PATCH] KVM: x86: fix memory leak in vmx_init

2013-04-08 Thread Gleb Natapov
On Mon, Apr 08, 2013 at 03:26:33PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Free vmx_msr_bitmap_longmode_x2apic and vmx_msr_bitmap_longmode if kvm_init() fails. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- Applied, thanks. arch/x86/kvm/vmx.c |4 +++-

Re: [PATCH V3 0/2] tcm_vhost endpoint

2013-04-08 Thread Michael S. Tsirkin
On Wed, Apr 03, 2013 at 02:17:36PM +0800, Asias He wrote: Hello mst, How about this one? Asias He (2): tcm_vhost: Use vq-private_data to indicate if the endpoint is setup tcm_vhost: Initialize vq-last_used_idx when set endpoint drivers/vhost/tcm_vhost.c | 145

Re: [PATCH V3 1/2] tcm_vhost: Use vq-private_data to indicate if the endpoint is setup

2013-04-08 Thread Michael S. Tsirkin
On Wed, Apr 03, 2013 at 02:17:37PM +0800, Asias He wrote: Currently, vs-vs_endpoint is used indicate if the endpoint is setup or not. It is set or cleared in vhost_scsi_set_endpoint() or vhost_scsi_clear_endpoint() under the vs-dev.mutex lock. However, when we check it in

Re: [PATCH V3 2/2] tcm_vhost: Initialize vq-last_used_idx when set endpoint

2013-04-08 Thread Michael S. Tsirkin
On Wed, Apr 03, 2013 at 02:17:38PM +0800, Asias He wrote: This patch fixes guest hang when booting seabios and guest. [0.576238] scsi0 : Virtio SCSI HBA [0.616754] virtio_scsi virtio1: request:id 0 is not a head! vq-last_used_idx is initialized only when /dev/vhost-scsi is

[PATCH] KVM: VMX: Add missing braces to avoid redundant error check

2013-04-08 Thread Jan Kiszka
The code was already properly aligned, now also add the braces to avoid that err is checked even if alloc_apic_access_page didn't run and change it. Found via Coccinelle by Fengguang Wu. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/x86/kvm/vmx.c |3 ++- 1 files changed, 2

Re: [PATCH] KVM: x86: Fix memory leak in vmx.c

2013-04-08 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 12:39:47PM -0700, Andrew Honig wrote: If userspace creates and destroys multiple VMs within the same process we leak 20k of memory in the userspace process context per VM. This patch frees the memory in kvm_arch_destroy_vm. If the process exits without closing the VM

Working of VXLAN

2013-04-08 Thread normal user
Hi all, I am not sure whether this is a correct list to ask the question, If don't please redirect me to the correct one. I want to know how can use VXLAN driver for KVM guests. I am looking for the standard setup steps to just setup a working environment. I am not interested in the OVS

Re: [PATCH] KVM: VMX: Add missing braces to avoid redundant error check

2013-04-08 Thread Gleb Natapov
On Mon, Apr 08, 2013 at 11:07:46AM +0200, Jan Kiszka wrote: The code was already properly aligned, now also add the braces to avoid Are you saying kvm is not written in Python? that err is checked even if alloc_apic_access_page didn't run and change it. Found via Coccinelle by Fengguang Wu.

Re: [PATCH v2 0/4] KVM minor fixups

2013-04-08 Thread Gleb Natapov
On Fri, Apr 05, 2013 at 07:20:30PM +, Geoff Levand wrote: Hi Paolo, I fixed up the series as requested. -Geoff V2: o Removed arm patches. o Moved kvm_spurious_fault to arch/x86/kvm/x86.c. o Fixed commit comments. The following changes since commit

Re: [PATCH 01/11] KVM: nVMX: Stats counters for nVMX

2013-04-08 Thread Gleb Natapov
On Sun, Mar 10, 2013 at 06:03:55PM +0200, Abel Gordon wrote: Add new counters to measure how many vmread/vmwrite/vmlaunch/vmresume/vmclear instructions were trapped and emulated by L0 stat counters are deprecated in favor of trace points. Adding kvmnested trace system is very welcome though.

[PATCH 0/7 v3] KVM :PPC: Userspace Debug support

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This patchset adds the userspace debug support for booke/bookehv. this is tested on powerpc e500v2/e500mc devices. We are now assuming that debug resource will not be used by kernel for its own debugging. It will be used for only kernel user

[PATCH 1/7 v3] KVM: PPC: debug stub interface parameter defined

2013-04-08 Thread Bharat Bhushan
This patch defines the interface parameter for KVM_SET_GUEST_DEBUG ioctl support. Follow up patches will use this for setting up hardware breakpoints, watchpoints and software breakpoints. Also kvm_arch_vcpu_ioctl_set_guest_debug() is brought one level below. This is because I am not sure what is

[PATCH 2/7 v3] Rename EMULATE_DO_PAPR to EMULATE_EXIT_USER

2013-04-08 Thread Bharat Bhushan
Instruction emulation return EMULATE_DO_PAPR when it requires exit to userspace on book3s. Similar return is required for booke. EMULATE_DO_PAPR reads out to be confusing so it is renamed to EMULATE_EXIT_USER. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com ---

[PATCH 3/7 v3] KVM: extend EMULATE_EXIT_USER to support different exit reasons

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com Currently the instruction emulator code returns EMULATE_EXIT_USER and common code initializes the run-exit_reason = .. and vcpu-arch.hcall_needed = .. with one fixed reason. But there can be different reasons when emulator need to exit to user

[PATCH 4/7 v3] booke: exit to user space if emulator request

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This allows the exit to user space if emulator request by returning EMULATE_EXIT_USER. This will be used in subsequent patches in list Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/kvm/booke.c |3 +++ 1 files

[PATCH 5/7 v3] KVM: PPC: exit to user space on ehpriv instruction

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com ehpriv instruction is used for setting software breakpoints by user space. This patch adds support to exit to user space with run-debug have relevant information. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com ---

[PATCH 6/7 v3] powerpc: export debug register save function for KVM

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com KVM need this function when switching from vcpu to user-space thread. My subsequent patch will use this function. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- arch/powerpc/include/asm/switch_to.h |4

[PATCH 7/7 v3] KVM: PPC: Add userspace debug stub support

2013-04-08 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com This patch adds the debug stub support on booke/bookehv. Now QEMU debug stub can use hw breakpoint, watchpoint and software breakpoint to debug guest. Debug registers are saved/restored on vcpu_put()/vcpu_get(). Also the debug registers are saved

Re: [RFC PATCH v3 1/6] kvm: add device control API

2013-04-08 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 06:47:45PM -0500, Scott Wood wrote: On 04/04/2013 05:41:35 AM, Gleb Natapov wrote: On Tue, Apr 02, 2013 at 08:57:48PM -0500, Scott Wood wrote: +struct kvm_device_attr { + __u32 flags; /* no flags currently defined */ + __u32 group; /*

Re: [RFC PATCH v3 1/6] kvm: add device control API

2013-04-08 Thread Gleb Natapov
On Fri, Apr 05, 2013 at 12:02:06PM +1100, Paul Mackerras wrote: On Thu, Apr 04, 2013 at 01:41:35PM +0300, Gleb Natapov wrote: Since now each device has its own fd is it an advantage to enforce common interface between different devices? If we do so though why not handle file creation,

Re: [RFC PATCH v3 5/6] kvm/ppc/mpic: in-kernel MPIC emulation

2013-04-08 Thread Gleb Natapov
On Thu, Apr 04, 2013 at 06:33:38PM -0500, Scott Wood wrote: On 04/04/2013 12:59:02 AM, Gleb Natapov wrote: On Wed, Apr 03, 2013 at 03:58:04PM -0500, Scott Wood wrote: KVM_DEV_MPIC_* could go elsewhere if you want to avoid cluttering the main kvm.h. The arch header would be OK, since the

Re: Virtualbox svga card in KVM

2013-04-08 Thread Stefan Hajnoczi
On Fri, Apr 05, 2013 at 04:52:05PM -0700, Sriram Murthy wrote: For starters, virtual box has better SVGA WDDM drivers that allows for a much richer display when the VM display is local. What does much richer display mean? Stefan -- To unsubscribe from this list: send the line unsubscribe kvm

Re: 答复: [Qemu-devel] qemu crashed when starting vm(kvm) with vnc connect

2013-04-08 Thread Stefan Hajnoczi
On Sun, Apr 07, 2013 at 04:58:07AM +, Zhanghaoyu (A) wrote: I start a kvm VM with vnc(using the zrle protocol) connect, sometimes qemu program crashed during starting period, received signal SIGABRT. Trying about 20 times, this crash may be reproduced. I guess the cause memory

Re: [PATCH 03/11] KVM: nVMX: Detect shadow-vmcs capability

2013-04-08 Thread Gleb Natapov
On Sun, Mar 10, 2013 at 06:04:55PM +0200, Abel Gordon wrote: Add logic required to detect if shadow-vmcs is supported by the processor. Introduce a new kernel module parameter to specify if L0 should use shadow vmcs (or not) to run L1. Signed-off-by: Abel Gordon ab...@il.ibm.com ---

RE: [PATCH v7 4/7] KVM: Add reset/restore rtc_status support

2013-04-08 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-04-07: On Sun, Apr 07, 2013 at 01:16:51PM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-04-07: On Sun, Apr 07, 2013 at 01:05:02PM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-04-07: On Sun, Apr 07, 2013 at 12:39:32PM +, Zhang, Yang Z wrote:

Re: [PATCH 04/11] KVM: nVMX: Introduce vmread and vmwrite bitmaps

2013-04-08 Thread Gleb Natapov
On Sun, Mar 10, 2013 at 06:05:25PM +0200, Abel Gordon wrote: Prepare vmread and vmwrite bitmaps according to a pre-specified list of fields. These lists are intended to specifiy most frequent accessed fields so we can minimize the number of fields that are copied from/to the software

Re: [Qemu-devel] [PATCH uq/master v2 1/2] kvm: reset state from the CPU's reset method

2013-04-08 Thread Gleb Natapov
On Tue, Apr 02, 2013 at 04:29:32PM +0300, Gleb Natapov wrote: static void kvm_sw_tlb_put(PowerPCCPU *cpu) { CPUPPCState *env = cpu-env; diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index 23fe51f..6321384 100644 --- a/target-s390x/cpu.c +++ b/target-s390x/cpu.c @@

reply: reply: [Qemu-devel] qemu crashed when starting vm(kvm) with vnc connect

2013-04-08 Thread Zhanghaoyu (A)
On Sun, Apr 07, 2013 at 04:58:07AM +, Zhanghaoyu (A) wrote: I start a kvm VM with vnc(using the zrle protocol) connect, sometimes qemu program crashed during starting period, received signal SIGABRT. Trying about 20 times, this crash may be reproduced. I guess the cause memory

Monitoring MMIO to PCI Passthrough devices?

2013-04-08 Thread Andre Richter
Hi all, I'm quite new to KVM/QEMU internals. On recent x86 setups (Sandy/Ivy Bridge with vt-x and vt-d), if I attach a PCI device via PCI-Passthrough to a VM, I can directly do MMIO with the device's registers or whatsoever hides behind it's BAR addresses. I wonder if there is a way for the

Re: [PATCH v7 4/7] KVM: Add reset/restore rtc_status support

2013-04-08 Thread Gleb Natapov
On Mon, Apr 08, 2013 at 11:21:34AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-04-07: On Sun, Apr 07, 2013 at 01:16:51PM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-04-07: On Sun, Apr 07, 2013 at 01:05:02PM +, Zhang, Yang Z wrote: Gleb Natapov wrote on

RE: [PATCH v7 4/7] KVM: Add reset/restore rtc_status support

2013-04-08 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-04-08: On Mon, Apr 08, 2013 at 11:21:34AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-04-07: On Sun, Apr 07, 2013 at 01:16:51PM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-04-07: On Sun, Apr 07, 2013 at 01:05:02PM +, Zhang, Yang Z wrote:

Re: [Qemu-devel] [PATCH uq/master v2 1/2] kvm: reset state from the CPU's reset method

2013-04-08 Thread Paolo Bonzini
Il 08/04/2013 14:19, Gleb Natapov ha scritto: Does this compile with kvm support disabled? Oops, sorry, I thought I had replied to this email (with hmm, let me check). Well, it does not: CCs390x-softmmu/target-s390x/cpu.o /users/gleb/work/qemu/target-s390x/cpu.c: In function

KVM call agenda for 2013-04-09

2013-04-08 Thread Juan Quintela
Hi Please send in any agenda topics you are interested in. Later, 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 http://vger.kernel.org/majordomo-info.html

Re: Monitoring MMIO to PCI Passthrough devices?

2013-04-08 Thread Alex Williamson
On Mon, 2013-04-08 at 14:34 +0200, Andre Richter wrote: Hi all, I'm quite new to KVM/QEMU internals. On recent x86 setups (Sandy/Ivy Bridge with vt-x and vt-d), if I attach a PCI device via PCI-Passthrough to a VM, I can directly do MMIO with the device's registers or whatsoever hides

[PATCH v8 0/7] Use eoi to track RTC interrupt delivery status

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the pending_eoi set to number of vcpu that received the

[PATCH v8 1/7] KVM: Add vcpu info to ioapic_update_eoi()

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Add vcpu info to ioapic_update_eoi, so we can know which vcpu issued this EOI. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/kvm/lapic.c |2 +- virt/kvm/ioapic.c| 12 ++-- virt/kvm/ioapic.h|3 ++- 3 files changed,

[PATCH v8 2/7] KVM: Introduce struct rtc_status

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com rtc_status is used to track RTC interrupt delivery status. The pending_eoi will be increased by vcpu who received RTC interrupt and will be decreased when EOI to this interrupt. Also, we use dest_map to record the destination vcpu to avoid the case that

[PATCH v8 3/7] KVM: Return destination vcpu on interrupt injection

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Add a new parameter to know vcpus who received the interrupt. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/kvm/lapic.c | 25 - arch/x86/kvm/lapic.h |5 +++-- virt/kvm/ioapic.c|2 +- virt/kvm/ioapic.h

[PATCH v8 4/7] KVM: Add reset/restore rtc_status support

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/kvm/lapic.c |9 +++ arch/x86/kvm/lapic.h |2 + virt/kvm/ioapic.c| 60 ++ virt/kvm/ioapic.h|1 + 4 files changed, 72

[PATCH v8 5/7] KVM: Force vmexit with virtual interrupt delivery

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Need the EOI to track interrupt deliver status, so force vmexit on EOI for rtc interrupt when enabling virtual interrupt delivery. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- virt/kvm/ioapic.c |2 +- 1 files changed, 1 insertions(+), 1

[PATCH v8 6/7] KVM: Let ioapic know the irq line status

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Userspace may deliver RTC interrupt without query the status. So we want to track RTC EOI for this case. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/kvm/i8254.c |4 ++-- arch/x86/kvm/x86.c |6 --

[PATCH v8 7/7] KVM: Use eoi to track RTC interrupt delivery status

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Current interrupt coalescing logci which only used by RTC has conflict with Posted Interrupt. This patch introduces a new mechinism to use eoi to track interrupt: When delivering an interrupt to vcpu, the pending_eoi set to number of vcpu that received the

[PATCH v8 0/7] KVM: VMX: Add Posted Interrupt supporting

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com The follwoing patches are adding the Posted Interrupt supporting to KVM: The first patch enables the feature 'acknowledge interrupt on vmexit'.Since it is required by Posted interrupt, we need to enable it firstly. And the subsequent patches are adding the

[PATCH v8 1/7] KVM: VMX: Enable acknowledge interupt on vmexit

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com The acknowledge interrupt on exit feature controls processor behavior for external interrupt acknowledgement. When this control is set, the processor acknowledges the interrupt controller to acquire the interrupt vector on VM exit. After enabling this

[PATCH v8 2/7] KVM: VMX: Register a new IPI for posted interrupt

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Posted Interrupt feature requires a special IPI to deliver posted interrupt to guest. And it should has a high priority so the interrupt will not be blocked by others. Normally, the posted interrupt will be consumed by vcpu if target vcpu is running and

[PATCH v8 3/7] KVM: VMX: Check the posted interrupt capability

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Detect the posted interrupt feature. If it exists, then set it in vmcs_config. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/include/asm/vmx.h |4 ++ arch/x86/kvm/vmx.c | 82 +--- 2

[PATCH v8 4/7] KVM: Call common update function when ioapic entry changed.

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Both TMR and EOI exit bitmap need to be updated when ioapic changed or vcpu's id/ldr/dfr changed. So use common function instead eoi exit bitmap specific function. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/ia64/kvm/lapic.h|6 --

[PATCH v8 7/7] KVM: VMX: Use posted interrupt to deliver virtual interrupt

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com If posted interrupt is avaliable, then uses it to inject virtual interrupt to guest. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/kvm/lapic.c | 29 ++--- arch/x86/kvm/vmx.c |2 +- arch/x86/kvm/x86.c |

[PATCH v8 6/7] KVM: VMX: Add the algorithm of deliver posted interrupt

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com Only deliver the posted interrupt when target vcpu is running and there is no previous interrupt pending in pir. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/include/asm/kvm_host.h |2 + arch/x86/kvm/lapic.c| 13

[PATCH v8 5/7] KVM: Set TMR when programming ioapic entry

2013-04-08 Thread Yang Zhang
From: Yang Zhang yang.z.zh...@intel.com We already know the trigger mode of a given interrupt when programming the ioapice entry. So it's not necessary to set it in each interrupt delivery. Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/kvm/lapic.c | 15 +--

Re: [PATCH V7 0/5] virtio-scsi multiqueue

2013-04-08 Thread Rusty Russell
Asias He as...@redhat.com writes: On Sat, Apr 06, 2013 at 09:40:13AM +0100, James Bottomley wrote: Well, I haven't had time to look at anything other than the patch I commented on. I'm happy with your fix, so you can add my acked by to that one. Since it's going through the virtio tree,

Re: [Qemu-devel] [PATCH uq/master v2 1/2] kvm: reset state from the CPU's reset method

2013-04-08 Thread Andreas Färber
Am 08.04.2013 14:19, schrieb Gleb Natapov: On Tue, Apr 02, 2013 at 04:29:32PM +0300, Gleb Natapov wrote: static void kvm_sw_tlb_put(PowerPCCPU *cpu) { CPUPPCState *env = cpu-env; diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c index 23fe51f..6321384 100644 ---

Warning with vhost_net kref.h:42 handle_tx

2013-04-08 Thread Juhani Rautiainen
Hi! I've just built server to use it with KVM. Almost immediately I got this warning with one of my virtual servers (two currently). Apr 7 04:44:02 base kernel: [ cut here ] Apr 7 04:44:02 base kernel: WARNING: at include/linux/kref.h:42 handle_tx+0x613/0x680

Re: Virtualbox svga card in KVM

2013-04-08 Thread Sriram Murthy
By richer display, I meant support for different resolution and color depth (including support for nonstandard resolutions as well). -Sriram - Original Message - From: Stefan Hajnoczi stefa...@gmail.com To: Sriram Murthy srira...@yahoo.com Cc: kvm@vger.kernel.org kvm@vger.kernel.org;

Re: [Qemu-devel] Virtualbox svga card in KVM

2013-04-08 Thread Peter Maydell
On 6 April 2013 00:52, Sriram Murthy srira...@yahoo.com wrote: (actually, the virtualbox SVGA card is based off of the KVM VGA card) Is it possible to implement it as an extension to the VGA card device, or has it diverged incompatibly such that it has to be its own separate device model?

Re: [Qemu-devel] [PATCH uq/master v2 0/2] Add some tracepoints for clarification of the cause of troubles

2013-04-08 Thread Stefan Hajnoczi
On Fri, Mar 29, 2013 at 01:24:25PM +0900, Kazuya Saito wrote: This series adds tracepoints for helping us clarify the cause of troubles. Virtualization on Linux is composed of some components such as qemu, kvm, libvirt, and so on. So it is very important to clarify firstly and swiftly the

Re: [Qemu-devel] Virtualbox svga card in KVM

2013-04-08 Thread Sriram Murthy
The Virtualbox SVGA card was derived out of the KVM VGA card, so there are quite a few similarities (I am deliberately being vague here as I am still in the process of discovering the features of both these cards completely). Having said that, the APIs and the data structures themselves have

[PATCH v3 00/32] Port of KVM to arm64

2013-04-08 Thread Marc Zyngier
This series contains the third version of KVM for arm64. It depends on the following branches/series: - git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64.git soc-armv8-model Catalin's platform support branch for v8 models - git://github.com/columbia/linux-kvm-arm.git

[PATCH v3 01/32] arm64: add explicit symbols to ESR_EL1 decoding

2013-04-08 Thread Marc Zyngier
The ESR_EL1 decoding process is a bit cryptic, and KVM has also a need for the same constants. Add a new esr.h file containing the appropriate exception classes constants, and change entry.S to use it. Fix a small bug in the EL1 breakpoint check while we're at it. Signed-off-by: Marc Zyngier

[PATCH v3 02/32] arm64: KVM: define HYP and Stage-2 translation page flags

2013-04-08 Thread Marc Zyngier
Add HYP and S2 page flags, for both normal and device memory. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/pgtable-hwdef.h | 13 + arch/arm64/include/asm/pgtable.h | 12 2 files

[PATCH v3 06/32] arm64: KVM: Basic ESR_EL2 helpers and vcpu register access

2013-04-08 Thread Marc Zyngier
Implements helpers for dealing with the EL2 syndrome register as well as accessing the vcpu registers. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_emulate.h | 163 +++ 1

[PATCH v3 05/32] arm64: KVM: system register definitions for 64bit guests

2013-04-08 Thread Marc Zyngier
Define the saved/restored registers for 64bit guests. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_asm.h | 68 1 file changed, 68 insertions(+) create mode 100644

[PATCH v3 03/32] arm64: KVM: HYP mode idmap support

2013-04-08 Thread Marc Zyngier
Add the necessary infrastructure for identity-mapped HYP page tables. Idmap-ed code must be in the .hyp.idmap.text linker section. The rest of the HYP ends up in .hyp.text. Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/kernel/vmlinux.lds.S | 16 1 file

[PATCH v3 04/32] arm64: KVM: EL2 register definitions

2013-04-08 Thread Marc Zyngier
Define all the useful bitfields for EL2 registers. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_arm.h | 243 +++ 1 file changed, 243 insertions(+) create mode 100644

[PATCH v3 29/32] arm64: KVM: 32bit guest fault injection

2013-04-08 Thread Marc Zyngier
Add fault injection capability for 32bit guests. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/kvm/inject_fault.c | 79 ++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git

[PATCH v3 28/32] arm64: KVM: 32bit specific register world switch

2013-04-08 Thread Marc Zyngier
Allow registers specific to 32bit guests to be saved/restored during the world switch. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/kvm/hyp.S | 70 1 file changed, 70

[PATCH v3 09/32] arm64: KVM: user space interface

2013-04-08 Thread Marc Zyngier
Provide the kvm.h file that defines the user space visible interface. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/uapi/asm/kvm.h | 117 ++ 1 file changed, 117 insertions(+)

[PATCH v3 32/32] arm64: KVM: MAINTAINERS update

2013-04-08 Thread Marc Zyngier
Elect myself as the KVM/arm64 maintainer. Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 836a618..c6e0170 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4628,6 +4628,15 @@ F:

[PATCH v3 31/32] arm64: KVM: userspace API documentation

2013-04-08 Thread Marc Zyngier
Unsurprisingly, the arm64 userspace API is extremely similar to the 32bit one, the only significant difference being the ONE_REG register mapping. Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- Documentation/virtual/kvm/api.txt | 55 +-- 1 file changed,

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

2013-04-08 Thread Marc Zyngier
Define the arm64 specific MMU backend: - HYP/kernel VA offset - S2 4/64kB definitions - S2 page table populating and flushing - icache cleaning Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_mmu.h | 136

[PATCH v3 14/32] arm64: KVM: MMIO access backend

2013-04-08 Thread Marc Zyngier
Define the necessary structures to perform an MMIO access. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_mmio.h | 59 +++ 1 file changed, 59 insertions(+) create mode

[PATCH v3 12/32] arm64: KVM: virtual CPU reset

2013-04-08 Thread Marc Zyngier
Provide the reset code for a virtual CPU booted in 64bit mode. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/kvm/reset.c | 76 ++ 1 file changed, 76 insertions(+) create mode

[PATCH v3 18/32] arm64: KVM: Exit handling

2013-04-08 Thread Marc Zyngier
Handle the exit of a VM, decoding the exit reason from HYP mode and calling the corresponding handler. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/kvm/handle_exit.c | 119 +++ 1

[PATCH v3 16/32] arm64: KVM: hypervisor initialization code

2013-04-08 Thread Marc Zyngier
Provide EL2 with page tables and stack, and set the vectors to point to the full blown world-switch code. Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_host.h | 13 + arch/arm64/kvm/hyp-init.S | 112 ++ 2 files

[PATCH v3 17/32] arm64: KVM: HYP mode world switch implementation

2013-04-08 Thread Marc Zyngier
The HYP mode world switch in all its glory. Implements save/restore of host/guest registers, EL2 trapping, IPA resolution, and additional services (tlb invalidation). Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com ---

[PATCH v3 10/32] arm64: KVM: system register handling

2013-04-08 Thread Marc Zyngier
Provide 64bit system register handling, modeled after the cp15 handling for ARM. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_coproc.h | 51 +++ arch/arm64/include/uapi/asm/kvm.h | 29 ++

[PATCH v3 21/32] arm64: KVM: PSCI implementation

2013-04-08 Thread Marc Zyngier
Wire the PSCI backend into the exit handling code. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_host.h | 2 +- arch/arm64/include/asm/kvm_psci.h | 23 +++

[PATCH v3 15/32] arm64: KVM: guest one-reg interface

2013-04-08 Thread Marc Zyngier
Let userspace play with the guest registers. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/kvm/guest.c | 254 + 1 file changed, 254 insertions(+) create mode 100644

[PATCH v3 23/32] arm64: KVM: define 32bit specific registers

2013-04-08 Thread Marc Zyngier
Define the 32bit specific registers (SPSRs, cp15...). Most CPU registers are directly mapped to a 64bit register (r0-x0...). Only the SPSRs have separate registers. cp15 registers are also mapped into their 64bit counterpart in most cases. Reviewed-by: Christopher Covington c...@codeaurora.org

[PATCH v3 22/32] arm64: KVM: Build system integration

2013-04-08 Thread Marc Zyngier
Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/Kconfig | 2 ++ arch/arm64/Makefile | 2 +- arch/arm64/kvm/Kconfig | 59 + arch/arm64/kvm/Makefile | 19

[PATCH v3 11/32] arm64: KVM: CPU specific system registers handling

2013-04-08 Thread Marc Zyngier
Add the support code for CPU specific system registers. Not much here yet. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/kvm/sys_regs_generic_v8.c | 85 1 file changed, 85 insertions(+)

[PATCH v3 20/32] arm64: KVM: Plug the arch timer

2013-04-08 Thread Marc Zyngier
Add support for the in-kernel timer emulation. The include file is a complete duplicate of the 32bit one - something to fix at one point. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm/kvm/arch_timer.c | 1 +

[PATCH v3 07/32] arm64: KVM: fault injection into a guest

2013-04-08 Thread Marc Zyngier
Implement the injection of a fault (undefined, data abort or prefetch abort) into a 64bit guest. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/kvm/inject_fault.c | 118 ++ 1 file

[PATCH v3 19/32] arm64: KVM: Plug the VGIC

2013-04-08 Thread Marc Zyngier
Add support for the in-kernel GIC emulation. The include file is a complete duplicate of the 32bit one - something to fix at one point. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_vgic.h | 156

[PATCH v3 13/32] arm64: KVM: kvm_arch and kvm_vcpu_arch definitions

2013-04-08 Thread Marc Zyngier
Provide the architecture dependent structures for VM and vcpu abstractions. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_host.h | 186 ++ 1 file changed, 186

[PATCH v3 26/32] arm64: KVM: 32bit handling of coprocessor traps

2013-04-08 Thread Marc Zyngier
Provide the necessary infrastructure to trap coprocessor accesses that occur when running 32bit guests. Also wire SMC and HVC trapped in 32bit mode while were at it. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com ---

[PATCH v3 25/32] arm64: KVM: 32bit conditional execution emulation

2013-04-08 Thread Marc Zyngier
As conditional instructions can trap on AArch32, add the thinest possible emulation layer to keep 32bit guests happy. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_emulate.h | 13 ++-

[PATCH v3 24/32] arm64: KVM: 32bit GP register access

2013-04-08 Thread Marc Zyngier
Allow access to the 32bit register file through the usual API. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/include/asm/kvm_emulate.h | 17 +++- arch/arm64/kvm/Makefile | 2 +- arch/arm64/kvm/regmap.c

[PATCH v3 27/32] arm64: KVM: CPU specific 32bit coprocessor access

2013-04-08 Thread Marc Zyngier
Enable handling of CPU specific 32bit coprocessor access. Not much here either. Reviewed-by: Christopher Covington c...@codeaurora.org Signed-off-by: Marc Zyngier marc.zyng...@arm.com --- arch/arm64/kvm/sys_regs_generic_v8.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH v3 30/32] arm64: KVM: enable initialization of a 32bit vcpu

2013-04-08 Thread Marc Zyngier
Wire the init of a 32bit vcpu by allowing 32bit modes in pstate, and providing sensible defaults out of reset state. This feature is of course conditioned by the presence of 32bit capability on the physical CPU, and is checked by the KVM_CAP_ARM_EL1_32BIT capability. Signed-off-by: Marc Zyngier

Re: [Qemu-devel] [PATCH uq/master v2 1/2] kvm: reset state from the CPU's reset method

2013-04-08 Thread Gleb Natapov
On Mon, Apr 08, 2013 at 04:36:47PM +0200, Andreas Färber wrote: Am 08.04.2013 14:19, schrieb Gleb Natapov: On Tue, Apr 02, 2013 at 04:29:32PM +0300, Gleb Natapov wrote: static void kvm_sw_tlb_put(PowerPCCPU *cpu) { CPUPPCState *env = cpu-env; diff --git a/target-s390x/cpu.c

Re: [PATCH] KVM: x86: Fix memory leak in vmx.c

2013-04-08 Thread Andrew Honig
On Mon, Apr 8, 2013 at 2:24 AM, Gleb Natapov g...@redhat.com wrote: On Thu, Apr 04, 2013 at 12:39:47PM -0700, Andrew Honig wrote: If userspace creates and destroys multiple VMs within the same process we leak 20k of memory in the userspace process context per VM. This patch frees the memory

Re: [PATCH] KVM: x86: Fix memory leak in vmx.c

2013-04-08 Thread Gleb Natapov
On Mon, Apr 08, 2013 at 10:11:52AM -0700, Andrew Honig wrote: On Mon, Apr 8, 2013 at 2:24 AM, Gleb Natapov g...@redhat.com wrote: On Thu, Apr 04, 2013 at 12:39:47PM -0700, Andrew Honig wrote: If userspace creates and destroys multiple VMs within the same process we leak 20k of memory in the

Re: [PULL 0/7] ppc patch queue 2013-03-22

2013-04-08 Thread Scott Wood
On 03/31/2013 06:05:40 AM, Alexander Graf wrote: On 31.03.2013, at 12:49, Gleb Natapov wrote: On Tue, Mar 26, 2013 at 11:37:42AM -0500, Scott Wood wrote: On 03/25/2013 08:33:12 PM, Gleb Natapov wrote: On Tue, Mar 26, 2013 at 12:35:09AM +0100, Alexander Graf wrote: On 26.03.2013, at 00:16,

We've been accepted to Google Summer of Code 2013

2013-04-08 Thread Stefan Hajnoczi
Good news! QEMU.org has been accepted to Google Summer of Code 2013. This means students can begin considering our list of QEMU, kvm kernel module, and libvirt project ideas: http://qemu-project.org/Google_Summer_of_Code_2013 Student applications open April 22 at 19:00 UTC. You can already

Re: KVM Guest Lock up (100%) again!

2013-04-08 Thread Phil Daws
Hello all, Another lock up again this evening :( am wondering whether should consider upgrading the kernel to 3.7.10 and the latest version of KVM. Thoughts ? Thanks. - Original Message - To: kvm@vger.kernel.org Sent: Thursday, 4 April, 2013 3:36:11 PM Subject: KVM Guest Lock up (100%)

Re: [PATCH V3 1/2] tcm_vhost: Use vq-private_data to indicate if the endpoint is setup

2013-04-08 Thread Nicholas A. Bellinger
On Mon, 2013-04-08 at 10:10 +0300, Michael S. Tsirkin wrote: On Wed, Apr 03, 2013 at 02:17:37PM +0800, Asias He wrote: Currently, vs-vs_endpoint is used indicate if the endpoint is setup or not. It is set or cleared in vhost_scsi_set_endpoint() or vhost_scsi_clear_endpoint() under the

  1   2   >