[PATCH v3 00/14] KVM/ARM Implementation

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

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

2012-10-22 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 v3 02/14] ARM: Section based HYP idmap

2012-10-22 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 the 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 v3 03/14] ARM: Factor out cpuid implementor and part number

2012-10-22 Thread Christoffer Dall
Decoding the implementor and part number of the CPU id in the CPU ID register is needed by KVM, so we factor it out to share the code. Reviewed-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/arm/include/asm/cputype.h | 26

[PATCH v3 04/14] KVM: ARM: Initial skeleton to compile KVM support

2012-10-22 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 v3 05/14] KVM: ARM: Hypervisor inititalization

2012-10-22 Thread Christoffer Dall
Sets up KVM code to handle all exceptions taken to Hyp mode. When the kernel is booted in Hyp mode, calling hvc #0xff 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 disabled.

[PATCH v3 06/14] KVM: ARM: Memory virtualization setup

2012-10-22 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 v3 07/14] KVM: ARM: Inject IRQs and FIQs from userspace

2012-10-22 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 v3 08/14] KVM: ARM: World-switch implementation

2012-10-22 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 v3 09/14] KVM: ARM: Emulation framework and CP15 emulation

2012-10-22 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 v3 10/14] KVM: ARM: User space API for getting/setting co-proc registers

2012-10-22 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 v3 11/14] KVM: ARM: Demux CCSIDR in the userspace API

2012-10-22 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 v3 12/14] KVM: ARM: VFP userspace interface

2012-10-22 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 v3 14/14] KVM: ARM: Handle I/O aborts

2012-10-22 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 v3 00/13] KVM/ARM vGIC support

2012-10-22 Thread Christoffer Dall
The following series implements support for the virtual generic interrupt controller architecture for KVM/ARM. Changes since v2: - Get rid of hardcoded guest cpu and distributor physical addresses and instead provide the address through the KVM_SET_DEVICE_ADDRESS ioctl. - Fix level/edge

[PATCH v3 01/13] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl

2012-10-22 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 v3 02/13] ARM: KVM: Keep track of currently running vcpus

2012-10-22 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 tun in kvm_arch_vcpu_ioctl_run(), and allow the data to be retrived using either: -

[PATCH v3 03/13] ARM: KVM: Initial VGIC infrastructure support

2012-10-22 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com Wire the basic framework code for VGIC support. Nothing to enable yet. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/arm/include/asm/kvm_host.h |7

[PATCH v3 04/13] ARM: KVM: Initial VGIC MMIO support code

2012-10-22 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com Wire 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 --- arch/arm/include/asm/kvm_vgic.h |6 +-

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

2012-10-22 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 v3 06/13] ARM: KVM: VGIC distributor handling

2012-10-22 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 v3 07/13] ARM: KVM: VGIC virtual CPU interface management

2012-10-22 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 v3 08/13] ARM: KVM: vgic: retire queued, disabled interrupts

2012-10-22 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 v3 09/13] ARM: KVM: VGIC interrupt injection

2012-10-22 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 v3 10/13] ARM: KVM: VGIC control interface world switch

2012-10-22 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/include/asm/kvm_arm.h | 12 +++

[PATCH v3 11/13] ARM: KVM: VGIC initialisation code

2012-10-22 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. Signed-off-by: Marc Zyngier

[PATCH v3 12/13] ARM: KVM: vgic: reduce the number of vcpu kick

2012-10-22 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com If we have level interrupts already programmed to fire on a vcpu, there is no reason to kick it after injecting a new interrupt, as we're guaranteed that we'll exit when the level interrupt will be EOId (VGIC_LR_EOI is set). The exit will force a reload of

[PATCH v3 13/13] ARM: KVM: Add VGIC configuration option

2012-10-22 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 |7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH v3 0/5] KVM/ARM Architected Timers support

2012-10-22 Thread Christoffer Dall
The following series implements support for the architected generic timers for KVM/ARM. This is an unmodified repost of the previously submitted series. This patch series can also be pulled from: git://github.com/virtualopensystems/linux-kvm-arm.git branch:

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

2012-10-22 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 v3 2/5] ARM: KVM: arch_timers: Add minimal infrastructure

2012-10-22 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com Add some very minimal architected timer related infrastructure. For the moment, we just provide empty structures, and enable/disable access to the physical timer across world switch. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by:

[PATCH v3 4/5] ARM: KVM: arch_timers: Add timer world switch

2012-10-22 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 v3 5/5] ARM: KVM: arch_timers: Wire the init code and config option

2012-10-22 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 |7 +++

[PATCH v3 3/5] ARM: KVM: arch_timers: Add guest timer core support

2012-10-22 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com We can inject a timer interrupt into the guest as a result of three possible events: - The virtual timer interrupt has fired while we were still executing the guest - The timer interrupt hasn't fired, but it expired while we were doing the world switch

Re: 1.1.1 - 1.1.2 migrate /managedsave issue

2012-10-22 Thread Philipp Hahn
Hello Doug, On Saturday 20 October 2012 00:46:43 Doug Goldstein wrote: I'm using libvirt 0.10.2 and I had qemu-kvm 1.1.1 running all my VMs. ... I had upgraded to qemu-kvm 1.1.2 ... qemu: warning: error while loading state for instance 0x0 of device 'ram' load of migration failed That error

Re: [RFC PATCH v3 06/19] Implement -dimm command line option

2012-10-22 Thread Vasilis Liaskovitis
Hi, On Thu, Oct 18, 2012 at 02:33:02PM +0200, Avi Kivity wrote: On 10/18/2012 11:27 AM, Vasilis Liaskovitis wrote: On Wed, Oct 17, 2012 at 12:03:51PM +0200, Avi Kivity wrote: On 10/17/2012 11:19 AM, Vasilis Liaskovitis wrote: I don't think so, but probably there's a limit of DIMMs that

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Gleb Natapov
On Fri, Oct 19, 2012 at 03:37:32PM +0800, Xiao Guangrong wrote: After commit b3356bf0dbb349 (KVM: emulator: optimize rep ins handling), the pieces of io data can be collected and write them to the guest memory or MMIO together. Unfortunately, kvm splits the mmio access into 8 bytes and store

Re: [RFC PATCH v3 06/19] Implement -dimm command line option

2012-10-22 Thread Avi Kivity
On 10/19/2012 07:48 PM, Blue Swirl wrote: DIMMs would be allowed to be hotplugged in the generic mem-controller scheme only (unless it makes sense to allow hotplug in the remaining pmc DRBs and start using the generic scheme once we run out of emulated DRBs) 440fx seems a lost cause, so

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Xiao Guangrong
On 10/22/2012 05:16 PM, Gleb Natapov wrote: On Fri, Oct 19, 2012 at 03:37:32PM +0800, Xiao Guangrong wrote: After commit b3356bf0dbb349 (KVM: emulator: optimize rep ins handling), the pieces of io data can be collected and write them to the guest memory or MMIO together. Unfortunately, kvm

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Gleb Natapov
On Mon, Oct 22, 2012 at 07:09:38PM +0800, Xiao Guangrong wrote: On 10/22/2012 05:16 PM, Gleb Natapov wrote: On Fri, Oct 19, 2012 at 03:37:32PM +0800, Xiao Guangrong wrote: After commit b3356bf0dbb349 (KVM: emulator: optimize rep ins handling), the pieces of io data can be collected and

Re: 1.1.1 - 1.1.2 migrate /managedsave issue

2012-10-22 Thread Avi Kivity
On 10/22/2012 09:04 AM, Philipp Hahn wrote: Hello Doug, On Saturday 20 October 2012 00:46:43 Doug Goldstein wrote: I'm using libvirt 0.10.2 and I had qemu-kvm 1.1.1 running all my VMs. ... I had upgraded to qemu-kvm 1.1.2 ... qemu: warning: error while loading state for instance 0x0 of

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Jan Kiszka
On 2012-10-22 13:23, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 07:09:38PM +0800, Xiao Guangrong wrote: On 10/22/2012 05:16 PM, Gleb Natapov wrote: On Fri, Oct 19, 2012 at 03:37:32PM +0800, Xiao Guangrong wrote: After commit b3356bf0dbb349 (KVM: emulator: optimize rep ins handling), the

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Gleb Natapov
On Mon, Oct 22, 2012 at 01:35:56PM +0200, Jan Kiszka wrote: On 2012-10-22 13:23, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 07:09:38PM +0800, Xiao Guangrong wrote: On 10/22/2012 05:16 PM, Gleb Natapov wrote: On Fri, Oct 19, 2012 at 03:37:32PM +0800, Xiao Guangrong wrote: After commit

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Jan Kiszka
On 2012-10-22 13:43, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 01:35:56PM +0200, Jan Kiszka wrote: On 2012-10-22 13:23, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 07:09:38PM +0800, Xiao Guangrong wrote: On 10/22/2012 05:16 PM, Gleb Natapov wrote: On Fri, Oct 19, 2012 at 03:37:32PM +0800,

[PATCH] update-linux-headers.sh: Handle new kernel uapi/ directories

2012-10-22 Thread Peter Maydell
Recent kernels have moved to keeping the userspace headers in uapi/ subdirectories. This breaks the detection of whether an architecture has KVM support in the kernel because kvm.h has moved in the kernel source tree. Update the check to support both the old and new locations. Signed-off-by:

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Avi Kivity
On 10/22/2012 01:45 PM, Jan Kiszka wrote: Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer() is gone. So this will break new userspace, not old. By global you mean shared between devices (or memory regions)? Yes. We only have a single ring per VM, so we cannot flush

Re: [PATCH] kvm, async_pf: exit idleness when handling KVM_PV_REASON_PAGE_NOT_PRESENT

2012-10-22 Thread Avi Kivity
On 10/19/2012 06:11 PM, Sasha Levin wrote: KVM_PV_REASON_PAGE_NOT_PRESENT kicks cpu out of idleness, but we haven't marked that spot as an exit from idleness. Not doing so can cause RCU warnings such as: [ 732.788386] === [ 732.789803] [ INFO: suspicious RCU

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Jan Kiszka
On 2012-10-22 14:18, Avi Kivity wrote: On 10/22/2012 01:45 PM, Jan Kiszka wrote: Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer() is gone. So this will break new userspace, not old. By global you mean shared between devices (or memory regions)? Yes. We only have a

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Gleb Natapov
On Mon, Oct 22, 2012 at 02:45:37PM +0200, Jan Kiszka wrote: On 2012-10-22 14:18, Avi Kivity wrote: On 10/22/2012 01:45 PM, Jan Kiszka wrote: Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer() is gone. So this will break new userspace, not old. By global you mean

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Jan Kiszka
On 2012-10-22 14:53, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 02:45:37PM +0200, Jan Kiszka wrote: On 2012-10-22 14:18, Avi Kivity wrote: On 10/22/2012 01:45 PM, Jan Kiszka wrote: Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer() is gone. So this will break new

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Avi Kivity
On 10/22/2012 02:53 PM, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 02:45:37PM +0200, Jan Kiszka wrote: On 2012-10-22 14:18, Avi Kivity wrote: On 10/22/2012 01:45 PM, Jan Kiszka wrote: Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer() is gone. So this will break

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Avi Kivity
On 10/22/2012 02:45 PM, Jan Kiszka wrote: On 2012-10-22 14:18, Avi Kivity wrote: On 10/22/2012 01:45 PM, Jan Kiszka wrote: Indeed. git pull, recheck and call for kvm_flush_coalesced_mmio_buffer() is gone. So this will break new userspace, not old. By global you mean shared between devices

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Avi Kivity
On 10/22/2012 02:55 PM, Jan Kiszka wrote: Since the userspace change is needed the idea is dead, but if we could implement it I do not see how it can hurt the latency if it would be the only mechanism to use coalesced mmio buffer. Checking that the ring buffer is empty is cheap and if it is

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Gleb Natapov
On Mon, Oct 22, 2012 at 02:55:14PM +0200, Jan Kiszka wrote: On 2012-10-22 14:53, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 02:45:37PM +0200, Jan Kiszka wrote: On 2012-10-22 14:18, Avi Kivity wrote: On 10/22/2012 01:45 PM, Jan Kiszka wrote: Indeed. git pull, recheck and call for

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Gleb Natapov
On Mon, Oct 22, 2012 at 02:55:24PM +0200, Avi Kivity wrote: On 10/22/2012 02:53 PM, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 02:45:37PM +0200, Jan Kiszka wrote: On 2012-10-22 14:18, Avi Kivity wrote: On 10/22/2012 01:45 PM, Jan Kiszka wrote: Indeed. git pull, recheck and call for

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Avi Kivity
On 10/22/2012 03:01 PM, Gleb Natapov wrote: It's time where the guest cannot take interrupts, and time in a high priority guest thread that is spent processing low guest priority requests. Proposed fix has exactly same issue. Until all data is transfered to userspace no interrupt will be

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Jan Kiszka
On 2012-10-22 14:58, Avi Kivity wrote: On 10/22/2012 02:55 PM, Jan Kiszka wrote: Since the userspace change is needed the idea is dead, but if we could implement it I do not see how it can hurt the latency if it would be the only mechanism to use coalesced mmio buffer. Checking that the ring

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Gleb Natapov
On Mon, Oct 22, 2012 at 03:02:22PM +0200, Avi Kivity wrote: On 10/22/2012 03:01 PM, Gleb Natapov wrote: It's time where the guest cannot take interrupts, and time in a high priority guest thread that is spent processing low guest priority requests. Proposed fix has exactly same issue.

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Gleb Natapov
On Mon, Oct 22, 2012 at 03:05:58PM +0200, Jan Kiszka wrote: On 2012-10-22 14:58, Avi Kivity wrote: On 10/22/2012 02:55 PM, Jan Kiszka wrote: Since the userspace change is needed the idea is dead, but if we could implement it I do not see how it can hurt the latency if it would be the only

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Jan Kiszka
On 2012-10-22 15:08, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 03:05:58PM +0200, Jan Kiszka wrote: On 2012-10-22 14:58, Avi Kivity wrote: On 10/22/2012 02:55 PM, Jan Kiszka wrote: Since the userspace change is needed the idea is dead, but if we could implement it I do not see how it can

FW: cgroup blkio.weight working, but not for KVM guests

2012-10-22 Thread Ben Clay
Forwarding this to the KVM general list.  I doubt you folks can help me with libvirt, but I was wondering if there’s some way to verify if the cache=none parameter is being respected for my KVM guest’s disk image, or if there are any other configuration/debug steps appropriate for KVM + virtio +

KVM call agenda for 2012-10-23

2012-10-22 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: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Avi Kivity
On 10/19/2012 09:37 AM, Xiao Guangrong wrote: After commit b3356bf0dbb349 (KVM: emulator: optimize rep ins handling), the pieces of io data can be collected and write them to the guest memory or MMIO together. Unfortunately, kvm splits the mmio access into 8 bytes and store them to

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Gleb Natapov
On Mon, Oct 22, 2012 at 03:25:49PM +0200, Jan Kiszka wrote: On 2012-10-22 15:08, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 03:05:58PM +0200, Jan Kiszka wrote: On 2012-10-22 14:58, Avi Kivity wrote: On 10/22/2012 02:55 PM, Jan Kiszka wrote: Since the userspace change is needed the idea

Re: How to do fast accesses to LAPIC TPR under kvm?

2012-10-22 Thread Avi Kivity
On 10/20/2012 12:39 AM, Stefan Fritsch wrote: On Thursday 18 October 2012, Avi Kivity wrote: On 10/18/2012 11:35 AM, Gleb Natapov wrote: You misunderstood the description. V_INTR_MASKING=1 means that CR8 writes are not propagated to real HW APIC. But KVM does not trap access to CR8

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Jan Kiszka
On 2012-10-22 16:00, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 03:25:49PM +0200, Jan Kiszka wrote: On 2012-10-22 15:08, Gleb Natapov wrote: On Mon, Oct 22, 2012 at 03:05:58PM +0200, Jan Kiszka wrote: On 2012-10-22 14:58, Avi Kivity wrote: On 10/22/2012 02:55 PM, Jan Kiszka wrote: Since the

Re: [PATCH RFC V2 0/5] Separate consigned (expected steal) from steal time.

2012-10-22 Thread Rik van Riel
On 10/16/2012 10:23 PM, Michael Wolf wrote: In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported in accounting tools such as top or vmstat. This can cause confusion for the end user. How do s390 and Power

Re: [PATCH] KVM: x86: fix vcpu-mmio_fragments overflow

2012-10-22 Thread Avi Kivity
On 10/22/2012 04:00 PM, Gleb Natapov wrote: Yes, with frame buffer is seems to be the case. One can imagine ROMD device that is MMIO on write but still can be accessed for read from kernel, but it cannot be coalesced even if coalesced buffer is flushed on every exit. You cannot enable

Re: [PATCH 0/3] KVM_VCPU_GET_REG_LIST API

2012-10-22 Thread Will Deacon
On Mon, Oct 22, 2012 at 04:09:06AM +0100, Rusty Russell wrote: Christoffer Dall c.d...@virtualopensystems.com writes: On Fri, Oct 19, 2012 at 2:19 AM, Rusty Russell ru...@rustcorp.com.au wrote: Wait, what? kvm/arm isn't in kvm-next? Christoffer, is there anything I can help with?

Re: [PATCH 0/3] KVM_VCPU_GET_REG_LIST API

2012-10-22 Thread Christoffer Dall
On Mon, Oct 22, 2012 at 1:45 PM, Will Deacon will.dea...@arm.com wrote: On Mon, Oct 22, 2012 at 04:09:06AM +0100, Rusty Russell wrote: Christoffer Dall c.d...@virtualopensystems.com writes: On Fri, Oct 19, 2012 at 2:19 AM, Rusty Russell ru...@rustcorp.com.au wrote: Wait, what? kvm/arm

3.7-rc2 build failure on s390x

2012-10-22 Thread Alexander Graf
Hi Christian, During our normal Factory kernel builds, s390x seems to choke: /home/abuild/rpmbuild/BUILD/kernel-default-3.7.rc2/linux-3.7-rc2/arch/s390/include/asm/kvm_para.h:147:99: error: redefinition of 'kvm_arch_para_features'

fsfreeze support in qemu-ga win32

2012-10-22 Thread Abbas
(resending as plain-text) To Michael Roth and KVM devs, It is finally nice to be able to have a guest agent for Windows. I really appreciate your collective efforts. Is it possible to have fs-freeze-thaw support in it too? Trying to use Libvirt's snapshot feature with --quiesce switch which

Re: [PATCH] vhost-blk: Add vhost-blk support v2

2012-10-22 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Oct 18, 2012 at 02:50:56PM +1030, Rusty Russell wrote: Asias He as...@redhat.com writes: +#define BLK_HDR 0 What's this for, exactly? Please add a comment. The block headr is in the first and separate buffer. Please don't assume