[PATCH] remove unused variable from walk_addr_generic()

2013-01-08 Thread Gleb Natapov
Fix compilation warning. Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index a7b24cf..2ad76b9 100644 --- a/arch/x86/kvm/paging_tmpl.h +++ b/arch/x86/kvm/paging_tmpl.h @@ -151,7 +151,7 @@ static int FNAME(walk_addr_generic)(struct

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Wanlong Gao
On 12/28/2012 06:32 PM, Jason Wang wrote: +} else if (nc-peer-info-type != NET_CLIENT_OPTIONS_KIND_TAP) { +ret = -1; +} else { +ret = tap_detach(nc-peer); +} + +return ret; +} + +static void virtio_net_set_queues(VirtIONet *n) +{ +int i; + +

Re: KVM: x86: use dynamic percpu allocations for shared msrs area

2013-01-08 Thread Gleb Natapov
On Thu, Jan 03, 2013 at 11:41:39AM -0200, Marcelo Tosatti wrote: Andy, Mike, can you confirm whether this fixes the percpu allocation failures when loading kvm.ko? TIA Use dynamic percpu allocations for the shared msrs structure, to avoid using the limited reserved percpu space.

Re: [PATCH 11/12] virtio-net: migration support for multiqueue

2013-01-08 Thread Jason Wang
On 01/08/2013 03:10 PM, Michael S. Tsirkin wrote: On Fri, Dec 28, 2012 at 06:32:03PM +0800, Jason Wang wrote: This patch add migration support for multiqueue virtio-net. The version were bumped to 12. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c | 45

Re: [PATCH 07/12] virtio: introduce virtio_queue_del()

2013-01-08 Thread Jason Wang
On 01/08/2013 03:14 PM, Michael S. Tsirkin wrote: On Fri, Dec 28, 2012 at 06:31:59PM +0800, Jason Wang wrote: Some device (such as virtio-net) needs the ability to destroy or re-order the virtqueues, this patch adds a helper to do this. Signed-off-by: Jason Wang jasowang Actually del_queue

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 05:07 PM, Wanlong Gao wrote: On 12/28/2012 06:32 PM, Jason Wang wrote: +} else if (nc-peer-info-type != NET_CLIENT_OPTIONS_KIND_TAP) { +ret = -1; +} else { +ret = tap_detach(nc-peer); +} + +return ret; +} + +static void

Re: Installation of Windows 8 hangs with KVM

2013-01-08 Thread Stefan Pietsch
* Ren, Yongjie yongjie@intel.com [2013-01-07 09:38]: you met issue only for 32bit Win8 (not 64 bit Win8), right? I think it's the same issue as the below bug I reported. https://bugs.launchpad.net/qemu/+bug/1007269 You can try with '-cpu coreduo' or '-cpu core2duo' in qemu-kvm command

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Wanlong Gao
On 01/08/2013 05:29 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao wrote: On 12/28/2012 06:32 PM, Jason Wang wrote: +} else if (nc-peer-info-type != NET_CLIENT_OPTIONS_KIND_TAP) { +ret = -1; +} else { +ret = tap_detach(nc-peer); +} + +return

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 05:49 PM, Wanlong Gao wrote: On 01/08/2013 05:29 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao wrote: On 12/28/2012 06:32 PM, Jason Wang wrote: +} else if (nc-peer-info-type != NET_CLIENT_OPTIONS_KIND_TAP) { +ret = -1; +} else { +ret =

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Wanlong Gao
On 01/08/2013 05:29 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao wrote: On 12/28/2012 06:32 PM, Jason Wang wrote: +} else if (nc-peer-info-type != NET_CLIENT_OPTIONS_KIND_TAP) { +ret = -1; +} else { +ret = tap_detach(nc-peer); +} + +return

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Wanlong Gao
On 01/08/2013 05:51 PM, Jason Wang wrote: On 01/08/2013 05:49 PM, Wanlong Gao wrote: On 01/08/2013 05:29 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao wrote: On 12/28/2012 06:32 PM, Jason Wang wrote: +} else if (nc-peer-info-type != NET_CLIENT_OPTIONS_KIND_TAP) { +

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 07:32:39PM -0200, Marcelo Tosatti wrote: On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: ioapic_write (or any other ioapic update) lock() perform update make_all_vcpus_request(KVM_REQ_UPDATE_EOI_BITMAP) (*) unlock() (*) Similarly to TLB

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 06:00 PM, Wanlong Gao wrote: On 01/08/2013 05:51 PM, Jason Wang wrote: On 01/08/2013 05:49 PM, Wanlong Gao wrote: On 01/08/2013 05:29 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao wrote: On 12/28/2012 06:32 PM, Jason Wang wrote: +} else if (nc-peer-info-type !=

Re: [PATCH 0/7] KVM: Alleviate mmu_lock hold time when we start dirty logging

2013-01-08 Thread Takuya Yoshikawa
On Mon, 7 Jan 2013 18:36:42 -0200 Marcelo Tosatti mtosa...@redhat.com wrote: Looks good, except patch 1 - a) don't understand why it is necessary and What's really necessary is to make sure that we don't call the function for a deleted slot. My explanation was wrong. b) not confident

[PATCH 0/7 -v2] KVM: Alleviate mmu_lock hold time when we start dirty logging

2013-01-08 Thread Takuya Yoshikawa
Changelog v1-v2: The condition in patch 1 was changed like this: npages (mem-flags KVM_MEM_LOG_DIRTY_PAGES) This patch set makes kvm_mmu_slot_remove_write_access() rmap based and adds conditional rescheduling to it. The motivation for this change is of course to reduce the mmu_lock hold

[PATCH 1/7] KVM: Write protect the updated slot only when dirty logging is enabled

2013-01-08 Thread Takuya Yoshikawa
Calling kvm_mmu_slot_remove_write_access() for a deleted slot does nothing but search for non-existent mmu pages which have mappings to that deleted memory; this is safe but a waste of time. Since we want to make the function rmap based in a later patch, in a manner which makes it unsafe to be

[PATCH 2/7] KVM: MMU: Remove unused parameter level from __rmap_write_protect()

2013-01-08 Thread Takuya Yoshikawa
No longer need to care about the mapping level in this function. Signed-off-by: Takuya Yoshikawa yoshikawa_takuya...@lab.ntt.co.jp --- arch/x86/kvm/mmu.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 01d7c2a..bee3509

[PATCH 3/7] KVM: MMU: Make kvm_mmu_slot_remove_write_access() rmap based

2013-01-08 Thread Takuya Yoshikawa
This makes it possible to release mmu_lock and reschedule conditionally in a later patch. Although this may increase the time needed to protect the whole slot when we start dirty logging, the kernel should not allow the userspace to trigger something that will hold a spinlock for such a long time

[PATCH 4/7] KVM: Remove unused slot_bitmap from kvm_mmu_page

2013-01-08 Thread Takuya Yoshikawa
Not needed any more. Signed-off-by: Takuya Yoshikawa yoshikawa_takuya...@lab.ntt.co.jp --- Documentation/virtual/kvm/mmu.txt |7 --- arch/x86/include/asm/kvm_host.h |5 - arch/x86/kvm/mmu.c| 10 -- 3 files changed, 0 insertions(+), 22 deletions(-)

[PATCH 5/7] KVM: Make kvm_mmu_change_mmu_pages() take mmu_lock by itself

2013-01-08 Thread Takuya Yoshikawa
No reason to make callers take mmu_lock since we do not need to protect kvm_mmu_change_mmu_pages() and kvm_mmu_slot_remove_write_access() together by mmu_lock in kvm_arch_commit_memory_region(): the former calls kvm_mmu_commit_zap_page() and flushes TLBs by itself. Note: we do not need to protect

[PATCH 6/7] KVM: Make kvm_mmu_slot_remove_write_access() take mmu_lock by itself

2013-01-08 Thread Takuya Yoshikawa
Better to place mmu_lock handling and TLB flushing code together since this is a self-contained function. Signed-off-by: Takuya Yoshikawa yoshikawa_takuya...@lab.ntt.co.jp --- arch/x86/kvm/mmu.c |3 +++ arch/x86/kvm/x86.c |5 + 2 files changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 7/7] KVM: MMU: Conditionally reschedule when kvm_mmu_slot_remove_write_access() takes a long time

2013-01-08 Thread Takuya Yoshikawa
If the userspace starts dirty logging for a large slot, say 64GB of memory, kvm_mmu_slot_remove_write_access() needs to hold mmu_lock for a long time such as tens of milliseconds. This patch controls the lock hold time by asking the scheduler if we need to reschedule for others. One penalty for

Re: KVM: VMX: fix incorrect cached cpl value with real/v8086 modes (v3)

2013-01-08 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 07:27:06PM -0200, Marcelo Tosatti wrote: CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. Using values other than those can cause failures on operations that check CPL. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Reviewed-by: Gleb

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Wanlong Gao
On 01/08/2013 06:14 PM, Jason Wang wrote: On 01/08/2013 06:00 PM, Wanlong Gao wrote: On 01/08/2013 05:51 PM, Jason Wang wrote: On 01/08/2013 05:49 PM, Wanlong Gao wrote: On 01/08/2013 05:29 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao wrote: On 12/28/2012 06:32 PM, Jason Wang

Re: [PATCH v3 0/7] Streamline arithmetic instruction emulation

2013-01-08 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 04:18:47PM +0200, Avi Kivity wrote: The current arithmetic instruction emulation is fairly clumsy: after decode, each instruction gets a switch (size), and for every size we fetch the operands, prepare flags, emulate the instruction, then store back the flags and

Re: [PATCH 1/7] KVM: Write protect the updated slot only when we start dirty logging

2013-01-08 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 06:11:46PM -0200, Marcelo Tosatti wrote: On Tue, Dec 18, 2012 at 04:26:47PM +0900, Takuya Yoshikawa wrote: This is needed to make kvm_mmu_slot_remove_write_access() rmap based: otherwise we may end up using invalid rmap's. Signed-off-by: Takuya Yoshikawa

[PATCH] KVM: trace: Fix exit decoding.

2013-01-08 Thread Cornelia Huck
trace_kvm_userspace_exit has been missing the KVM_EXIT_WATCHDOG exit. CC: Bharat Bhushan r65...@freescale.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- include/trace/events/kvm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events/kvm.h

RE: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-08: On Mon, Jan 07, 2013 at 07:32:39PM -0200, Marcelo Tosatti wrote: On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: ioapic_write (or any other ioapic update) lock() perform update make_all_vcpus_request(KVM_REQ_UPDATE_EOI_BITMAP) (*) unlock()

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 12:43:22AM +, Zhang, Yang Z wrote: Marcelo Tosatti wrote on 2013-01-08: On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: ioapic_write (or any other ioapic update) lock() perform update make_all_vcpus_request(KVM_REQ_UPDATE_EOI_BITMAP) (*)

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 12:03:32PM +0200, Gleb Natapov wrote: On Mon, Jan 07, 2013 at 07:32:39PM -0200, Marcelo Tosatti wrote: On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: ioapic_write (or any other ioapic update) lock() perform update

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 12:57:42PM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-01-08: On Mon, Jan 07, 2013 at 07:32:39PM -0200, Marcelo Tosatti wrote: On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: ioapic_write (or any other ioapic update) lock() perform update

Re: KVM call agenda for 2013-01-08

2013-01-08 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please send in any agenda topics you are interested in. As there are no agenda, no call. Happy New Year to Everybody! Later, Juan. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org

[PATCH 0/1] s390 bug in 3.8-rc

2013-01-08 Thread Christian Borntraeger
Marcelo, Gleb, Frederic, sorry for spotting this so late. Here is a fix for a bug in kvm on s390 with 3.8-rc. Due to all the subtle considerations regarding RCU, this is an RFC. Christian Borntraeger (1): s390/kvm: Fix BUG in include/linux/kvm_host.h:745 arch/s390/kvm/kvm-s390.c | 2 ++ 1

[RFC/PATCH 1/1] s390/kvm: Fix BUG in include/linux/kvm_host.h:745

2013-01-08 Thread Christian Borntraeger
commit b080935c8638e08134629d0a9ebdf35669bec14d kvm: Directly account vtime to system on guest switch also removed the irq_disable/enable around kvm guest switch, which is correct in itself. Unfortunately, there is a BUG ON that (correctly) checks for preemptible to cover the call to rcu

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Gleb Natapov
On Tue, Jan 08, 2013 at 11:57:59AM -0200, Marcelo Tosatti wrote: On Tue, Jan 08, 2013 at 12:57:42PM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-01-08: On Mon, Jan 07, 2013 at 07:32:39PM -0200, Marcelo Tosatti wrote: On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote:

Re: [RFC/PATCH 1/1] s390/kvm: Fix BUG in include/linux/kvm_host.h:745

2013-01-08 Thread Frederic Weisbecker
2013/1/8 Christian Borntraeger borntrae...@de.ibm.com: commit b080935c8638e08134629d0a9ebdf35669bec14d kvm: Directly account vtime to system on guest switch also removed the irq_disable/enable around kvm guest switch, which is correct in itself. Unfortunately, there is a BUG ON that

[GIT PULL] KVM fixes for 3.8-rc2

2013-01-08 Thread Marcelo Tosatti
Linus, Please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git master To receive the following KVM bug fixes Alexander Graf (1): Merge commit 'origin/master' into kvm-ppc-3.8 Andreas Schwab (1): KVM: PPC: Book3S HV: Fix compilation without CONFIG_PPC_POWERNV Bharat

[PATCH v5 00/14] KVM/ARM Implementation

2013-01-08 Thread Christoffer Dall
The following series implements KVM support for ARM processors, specifically on the Cortex-A15 platform. Work is done in collaboration between Columbia University, Virtual Open Systems and ARM/Linaro. The patch series applies to Linux 3.8-rc2 with kvm/next merged:

[PATCH v5 01/14] ARM: Add page table and page defines needed by KVM

2013-01-08 Thread Christoffer Dall
KVM uses the stage-2 page tables and the Hyp page table format, so we define the fields and page protection flags needed by KVM. The nomenclature is this: - page_hyp:PL2 code/data mappings - page_hyp_device: PL2 device mappings (vgic access) - page_s2: Stage-2 code/data page

[PATCH v5 02/14] ARM: Section based HYP idmap

2013-01-08 Thread Christoffer Dall
Add a method (hyp_idmap_setup) to populate a hyp pgd with an identity mapping of the code contained in the .hyp.idmap.text section. Offer a method to drop this identity mapping through hyp_idmap_teardown. Make all the above depend on CONFIG_ARM_VIRT_EXT and CONFIG_ARM_LPAE. Cc: Will Deacon

[PATCH v5 03/14] KVM: ARM: Initial skeleton to compile KVM support

2013-01-08 Thread Christoffer Dall
Targets KVM support for Cortex A-15 processors. Contains all the framework components, make files, header files, some tracing functionality, and basic user space API. Only supported core is Cortex-A15 for now. Most functionality is in arch/arm/kvm/* or arch/arm/include/asm/kvm_*.h.

[PATCH v5 05/14] KVM: ARM: Memory virtualization setup

2013-01-08 Thread Christoffer Dall
This commit introduces the framework for guest memory management through the use of 2nd stage translation. Each VM has a pointer to a level-1 table (the pgd field in struct kvm_arch) which is used for the 2nd stage translations. Entries are added when handling guest faults (later patch) and the

[PATCH v5 06/14] KVM: ARM: Inject IRQs and FIQs from userspace

2013-01-08 Thread Christoffer Dall
From: Christoffer Dall cd...@cs.columbia.edu All interrupt injection is now based on the VM ioctl KVM_IRQ_LINE. This works semantically well for the GIC as we in fact raise/lower a line on a machine component (the gic). The IOCTL uses the follwing struct. struct kvm_irq_level { union {

[PATCH v5 07/14] KVM: ARM: World-switch implementation

2013-01-08 Thread Christoffer Dall
Provides complete world-switch implementation to switch to other guests running in non-secure modes. Includes Hyp exception handlers that capture necessary exception information and stores the information on the VCPU and KVM structures. The following Hyp-ABI is also documented in the code:

[PATCH v5 08/14] KVM: ARM: Emulation framework and CP15 emulation

2013-01-08 Thread Christoffer Dall
Adds a new important function in the main KVM/ARM code called handle_exit() which is called from kvm_arch_vcpu_ioctl_run() on returns from guest execution. This function examines the Hyp-Syndrome-Register (HSR), which contains information telling KVM what caused the exit from the guest. Some of

[PATCH v5 09/14] KVM: ARM: User space API for getting/setting co-proc registers

2013-01-08 Thread Christoffer Dall
The following three ioctls are implemented: - KVM_GET_REG_LIST - KVM_GET_ONE_REG - KVM_SET_ONE_REG Now we have a table for all the cp15 registers, we can drive a generic API. The register IDs carry the following encoding: ARM registers are mapped using the lower 32 bits. The upper 16 of

[PATCH v5 11/14] KVM: ARM: VFP userspace interface

2013-01-08 Thread Christoffer Dall
From: Rusty Russell rusty.russ...@linaro.org We use space #18 for floating point regs. Reviewed-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- Documentation/virtual/kvm/api.txt |6 +

[PATCH v5 14/14] KVM: ARM: Add maintainer entry for KVM/ARM

2013-01-08 Thread Christoffer Dall
Add an entry in the MAINTAINERS file for KVM/ARM. Cc: Russell King li...@arm.linux.org.uk Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- MAINTAINERS |8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fa309ab..8349bac 100644 ---

[PATCH v5 13/14] KVM: ARM: Handle I/O aborts

2013-01-08 Thread Christoffer Dall
When the guest accesses I/O memory this will create data abort exceptions and they are handled by decoding the HSR information (physical address, read/write, length, register) and forwarding reads and writes to QEMU which performs the device emulation. Certain classes of load/store operations do

[PATCH v5 12/14] KVM: ARM: Handle guest faults in KVM

2013-01-08 Thread Christoffer Dall
Handles the guest faults in KVM by mapping in corresponding user pages in the 2nd stage page tables. We invalidate the instruction cache by MVA whenever we map a page to the guest (no, we cannot only do it when we have an iabt because the guest may happily read/write a page before hitting the

[PATCH v5 00/12] KVM/ARM vGIC support

2013-01-08 Thread Christoffer Dall
The following series implements support for the virtual generic interrupt controller architecture for KVM/ARM. This patch series can also be pulled from: git://github.com/virtualopensystems/linux-kvm-arm.git branch: kvm-arm-v15-vgic Changes since v4: - Large number of commenting

[PATCH v5 01/12] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2013-01-08 Thread Christoffer Dall
On ARM (and possibly other architectures) some bits are specific to the model being emulated for the guest and user space needs a way to tell the kernel about those bits. An example is mmio device base addresses, where KVM must know the base address for a given device to properly emulate mmio

[PATCH v5 02/12] ARM: KVM: Keep track of currently running vcpus

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com When an interrupt occurs for the guest, it is sometimes necessary to find out which vcpu was running at that point. Keep track of which vcpu is being run in kvm_arch_vcpu_ioctl_run(), and allow the data to be retrieved using either: -

[PATCH v5 03/12] ARM: gic: define GICH offsets for VGIC support

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com The GICH_* constants are defined by the GIC HW spec, and even though they only be used by KVM to begin with, define them generically in gic.h. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com

[PATCH v5 04/12] ARM: KVM: Initial VGIC infrastructure code

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com Wire the basic framework code for VGIC support and the initial in-kernel MMIO support code for the VGIC, used for the distributor emulation. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com ---

[PATCH v5 06/12] ARM: KVM: VGIC distributor handling

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com Add the GIC distributor emulation code. A number of the GIC features are simply ignored as they are not required to boot a Linux guest. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com ---

[PATCH v5 07/12] ARM: KVM: VGIC virtual CPU interface management

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com Add VGIC virtual CPU interface code, picking pending interrupts from the distributor and stashing them in the VGIC control interface list registers. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall

[PATCH v5 08/12] ARM: KVM: vgic: retire queued, disabled interrupts

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com An interrupt may have been disabled after being made pending on the CPU interface (the classic case is a timer running while we're rebooting the guest - the interrupt would kick as soon as the CPU interface gets enabled, with deadly consequences). The

[PATCH v5 09/12] ARM: KVM: VGIC interrupt injection

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com Plug the interrupt injection code. Interrupts can now be generated from user space. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/arm/include/asm/kvm_vgic.h |8 +++

[PATCH v5 10/12] ARM: KVM: VGIC control interface world switch

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com Enable the VGIC control interface to be save-restored on world switch. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/arm/kernel/asm-offsets.c | 12 ++

[PATCH v5 11/12] ARM: KVM: VGIC initialisation code

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com Add the init code for the hypervisor, the virtual machine, and the virtual CPUs. An interrupt handler is also wired to allow the VGIC maintenance interrupts, used to deal with level triggered interrupts and LR underflows. A CPU hotplug notifier is

[PATCH v5 12/12] ARM: KVM: Add VGIC configuration option

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com It is now possible to select the VGIC configuration option. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/arm/kvm/Kconfig |8 1 file changed, 8 insertions(+) diff

[PATCH v5 0/4] KVM/ARM Architected Timers support

2013-01-08 Thread Christoffer Dall
The following series implements support for the architected generic timers for KVM/ARM. This patch series can also be pulled from: git://github.com/virtualopensystems/linux-kvm-arm.git branch: kvm-arm-v15-vgic-timers Changes since v1-v4: - Get virtual IRQ number from DT -

[PATCH v5 1/4] ARM: arch_timers: switch to physical timers if HYP mode is available

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com If we're booted in HYP mode, it is possible that we'll run some kind of virtualized environment. In this case, it is a better to switch to the physical timers, and leave the virtual timers to guests. Signed-off-by: Marc Zyngier marc.zyng...@arm.com ---

[PATCH v5 2/4] ARM: KVM: arch_timers: Add guest timer core support

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com Add some the architected timer related infrastructure, and support timer interrupt injection, which can happen as a resultof three possible events: - The virtual timer interrupt has fired while we were still executing the guest - The timer interrupt

[PATCH v5 3/4] ARM: KVM: arch_timers: Add timer world switch

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com Do the necessary save/restore dance for the timers in the world switch code. In the process, allow the guest to read the physical counter, which is useful for its own clock_event_device. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by:

[PATCH v5 4/4] ARM: KVM: arch_timers: Wire the init code and config option

2013-01-08 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com It is now possible to select CONFIG_KVM_ARM_TIMER to enable the KVM architected timer support. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/arm/kvm/Kconfig |8

[PATCH v5 10/14] KVM: ARM: Demux CCSIDR in the userspace API

2013-01-08 Thread Christoffer Dall
The Cache Size Selection Register (CSSELR) selects the current Cache Size ID Register (CCSIDR). You write which cache you are interested in to CSSELR, and read the information out of CCSIDR. Which cache numbers are valid is known by reading the Cache Level ID Register (CLIDR). To export this

[PATCH v5 05/12] ARM: KVM: VGIC accept vcpu and dist base addresses from user space

2013-01-08 Thread Christoffer Dall
User space defines the model to emulate to a guest and should therefore decide which addresses are used for both the virtual CPU interface directly mapped in the guest physical address space and for the emulated distributor interface, which is mapped in software by the in-kernel VGIC support.

[PATCH v5 04/14] KVM: ARM: Hypervisor initialization

2013-01-08 Thread Christoffer Dall
Sets up KVM code to handle all exceptions taken to Hyp mode. When the kernel is booted in Hyp mode, calling an hvc instruction with r0 pointing to the new vectors, the HVBAR is changed to the the vector pointers. This allows subsystems (like KVM here) to execute code in Hyp-mode with the MMU

Re: FreeBSD-amd64 fails to start with SMP on quemu-kvm

2013-01-08 Thread Artur Samborski
W dniu 08.01.2013 00:00, Marcelo Tosatti pisze: On Mon, Jan 07, 2013 at 06:13:22PM +0100, Artur Samborski wrote: Hello, When i try to run FreeBSD-amd64 on more than 1 vcpu in quemu-kvm (Fedora Core 17) eg. to run FreeBSD-9.0-RELEASE-amd64 with: qemu-kvm -m 1024m -cpu host -smp 2 -cdrom

Shadow page table gfn-pfn mappings

2013-01-08 Thread siddhesh phadke
Hello, I have few question in kvm code.I can see in code that though EPT is used,some of the shadow page table code is still used foe example __direct_map() in tdp_page_fault. I guess it is used to keep track of gfn-pfn mappings. Have I understood it correct? I was trying to find out if there is

Re: [PATCH v5 01/12] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2013-01-08 Thread Scott Wood
On 01/08/2013 12:41:30 PM, Christoffer Dall wrote: On ARM (and possibly other architectures) some bits are specific to the model being emulated for the guest and user space needs a way to tell the kernel about those bits. An example is mmio device base addresses, where KVM must know the

Re: [PATCH v5 01/12] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2013-01-08 Thread Christoffer Dall
On Tue, Jan 8, 2013 at 5:36 PM, Scott Wood scottw...@freescale.com wrote: On 01/08/2013 12:41:30 PM, Christoffer Dall wrote: On ARM (and possibly other architectures) some bits are specific to the model being emulated for the guest and user space needs a way to tell the kernel about those

Re: [PATCH v5 01/12] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2013-01-08 Thread Scott Wood
On 01/08/2013 05:17:05 PM, Christoffer Dall wrote: On Tue, Jan 8, 2013 at 5:36 PM, Scott Wood scottw...@freescale.com wrote: On 01/08/2013 12:41:30 PM, Christoffer Dall wrote: +struct kvm_device_address { + __u64 id; + __u64 addr; +}; What about this is really specific to

Re: [PATCH v5 01/12] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2013-01-08 Thread Christoffer Dall
On Tue, Jan 8, 2013 at 6:29 PM, Scott Wood scottw...@freescale.com wrote: On 01/08/2013 05:17:05 PM, Christoffer Dall wrote: On Tue, Jan 8, 2013 at 5:36 PM, Scott Wood scottw...@freescale.com wrote: On 01/08/2013 12:41:30 PM, Christoffer Dall wrote: +struct kvm_device_address { +

Re: [PATCH v5 01/12] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2013-01-08 Thread Scott Wood
On 01/08/2013 05:49:40 PM, Christoffer Dall wrote: On Tue, Jan 8, 2013 at 6:29 PM, Scott Wood scottw...@freescale.com wrote: On 01/08/2013 05:17:05 PM, Christoffer Dall wrote: This *could* look something like this: struct kvm_device_param { u64 dev_id; u64 param_id; u64

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 07:24 PM, Wanlong Gao wrote: On 01/08/2013 06:14 PM, Jason Wang wrote: On 01/08/2013 06:00 PM, Wanlong Gao wrote: On 01/08/2013 05:51 PM, Jason Wang wrote: On 01/08/2013 05:49 PM, Wanlong Gao wrote: On 01/08/2013 05:29 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao

[PATCH 1/2] VFIO-AER: Vfio-pci driver changes for supporting AER

2013-01-08 Thread Pandarathil, Vijaymohan R
- New ioctl which is used to pass the eventfd that is signaled when an error occurs in the vfio_pci_device - Register pci_error_handler for the vfio_pci driver - When the device encounters an error, the error handler registered by the vfio_pci driver

[PATCH 2/2] QEMU-AER: Qemu changes to support AER for VFIO-PCI devices

2013-01-08 Thread Pandarathil, Vijaymohan R
- Create eventfd per vfio device assigned to a guest and register an event handler - This fd is passed to the vfio_pci driver through a new ioctl - When the device encounters an error, the eventfd is signaled and the qemu eventfd handler gets invoked.

[PATCH 0/2] AER-KVM: Error containment of VFIO devices assigned to KVM guests

2013-01-08 Thread Pandarathil, Vijaymohan R
Add support for error containment when a VFIO device assigned to a KVM guest encounters an error. This is for PCIe devices/drivers that support AER functionality. When the host OS is notified of an error in a device either through the firmware first approach or through an interrupt handled by the

[PATCH] virtio-spec: fix two typos

2013-01-08 Thread akong
From: Amos Kong ak...@redhat.com VIRTIO_NET_F_VTRL_VQ - VIRTIO_NET_F_CTRL_VQ VIRTIO_NET_CTRL_MQ is defined to 4 in kernel code Signed-off-by: Amos Kong ak...@redhat.com --- virtio-spec.lyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virtio-spec.lyx b/virtio-spec.lyx