Re: [PATCH 5/6 v5] deal with guest panicked event accoring to -onpanic parameter

2012-07-03 Thread Wen Congyang
At 06/28/2012 04:26 PM, Jan Kiszka Wrote: On 2012-06-28 03:15, Wen Congyang wrote: At 06/27/2012 10:39 PM, Jan Kiszka Wrote: On 2012-06-27 09:02, Wen Congyang wrote: When the guest is panicked, it will write 0x1 to the port KVM_PV_PORT. So if qemu reads 0x1 from this port, we can do the

[PATCH] mm: mmu_notifier: fix freed page still mapped in secondary MMU

2012-07-03 Thread Xiao Guangrong
mmu_notifier_release is called when the process is exiting, it will delete all the mmu notifiers, but, in this time, the page belonged to the process is still present at the page table and listed in the LRU list, so this race will happen: CPU 0 CPU 1 mmu_notifier_release:

[PATCH 1/3] KVM: fix fault page leak

2012-07-03 Thread Xiao Guangrong
fault_page is forgot to be freed Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- virt/kvm/kvm_main.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 02cb440..157226d 100644 --- a/virt/kvm/kvm_main.c +++

[PATCH 2/3] KVM: MMU: fix shrinking page from the empty mmu

2012-07-03 Thread Xiao Guangrong
Fix: [ 3190.059226] BUG: unable to handle kernel NULL pointer dereference at (null) [ 3190.062224] IP: [a02aac66] mmu_page_zap_pte+0x10/0xa7 [kvm] [ 3190.063760] PGD 104f50067 PUD 112bea067 PMD 0 [ 3190.065309] Oops: [#1] SMP DEBUG_PAGEALLOC [ 3190.066860] CPU 1 [

[PATCH 3/3] KVM: MMU: track the refcount when unmap the page

2012-07-03 Thread Xiao Guangrong
It will trigger a WARN_ON if the page has been freed but it is still used in mmu, it can help us to detect mm bug early Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git

Re: [PATCH 5/6 v5] deal with guest panicked event accoring to -onpanic parameter

2012-07-03 Thread Jan Kiszka
On 2012-07-03 08:07, Wen Congyang wrote: At 06/28/2012 04:26 PM, Jan Kiszka Wrote: On 2012-06-28 03:15, Wen Congyang wrote: At 06/27/2012 10:39 PM, Jan Kiszka Wrote: On 2012-06-27 09:02, Wen Congyang wrote: When the guest is panicked, it will write 0x1 to the port KVM_PV_PORT. So if qemu

Re: [RFC PATCH] Expose tsc deadline timer feature to guest

2012-07-03 Thread Jan Kiszka
On 2012-07-02 13:08, Liu, Jinsong wrote: Eduardo, Jan, Andreas As we sync 3 months ago, I wait until qemu1.1 done, then re-write patch based on qemu1.1. Now it's time to re-write my patch based on qemu1.1. Attached is a RFC patch for exposing tsc deadline timer to guest. I have checked

Re: [PATCH 5/6 v5] deal with guest panicked event accoring to -onpanic parameter

2012-07-03 Thread Wen Congyang
At 07/03/2012 02:36 PM, Jan Kiszka Wrote: On 2012-07-03 08:07, Wen Congyang wrote: At 06/28/2012 04:26 PM, Jan Kiszka Wrote: On 2012-06-28 03:15, Wen Congyang wrote: At 06/27/2012 10:39 PM, Jan Kiszka Wrote: On 2012-06-27 09:02, Wen Congyang wrote: When the guest is panicked, it will write

Re: kvm segfaults and bad page state in 3.4.0

2012-07-03 Thread Xiao Guangrong
Hi Fengguang, I can reproduce this bug in my test case, and have posted a patch to fix it which can found at: http://marc.info/?l=linux-mmm=134129723504527w=2 Could you please try it? On 06/04/2012 07:46 PM, Fengguang Wu wrote: Hi, I'm running lots of kvm instances for doing kernel boot

Re: [PATCH 5/6 v5] deal with guest panicked event accoring to -onpanic parameter

2012-07-03 Thread Jan Kiszka
On 2012-07-03 08:43, Wen Congyang wrote: I'm not talking about changing the interface to the guest, I'm talking about how to model it in QEMU. And that difference would be transparent to the guest. I pointed you to examples like hw/kvm/clock.c. OK, I will read the code in hw/kvm/clock.c

Re: kvm segfaults and bad page state in 3.4.0

2012-07-03 Thread Fengguang Wu
Hi Guangrong, On Tue, Jul 03, 2012 at 02:41:02PM +0800, Xiao Guangrong wrote: Hi Fengguang, I can reproduce this bug in my test case, and have posted a patch to fix it which can found at: http://marc.info/?l=linux-mmm=134129723504527w=2 Could you please try it? Thank you very much! I'm

Biweekly KVM Test report, kernel ae7a2a3f... qemu a212f79f...

2012-07-03 Thread Ren, Yongjie
Hi All, This is KVM upstream test result against kvm.git next branch and qemu-kvm.git master branch. kvm.git next branch: ae7a2a3fb6f8b784c2752863f4f1f20c656f76fb based on kernel 3.5.0-rc1 qemu-kvm.git master branch: a212f79fc4596570124fb864425b980c157cd001 We found 1 new bug

Re: [PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-07-03 Thread Marcelo Tosatti
On Mon, Jun 04, 2012 at 10:37:24AM +0530, Nikunj A. Dadhania wrote: flush_tlb_others_ipi depends on lot of statics in tlb.c. Replicated the flush_tlb_others_ipi as kvm_flush_tlb_others to further adapt to paravirtualization. Use the vcpu state information inside the kvm_flush_tlb_others to

Re: [PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-07-03 Thread Marcelo Tosatti
On Mon, Jun 04, 2012 at 10:37:24AM +0530, Nikunj A. Dadhania wrote: flush_tlb_others_ipi depends on lot of statics in tlb.c. Replicated the flush_tlb_others_ipi as kvm_flush_tlb_others to further adapt to paravirtualization. Use the vcpu state information inside the kvm_flush_tlb_others to

Re: [PATCH v2 5/7] KVM: Introduce PV kick in flush tlb

2012-07-03 Thread Marcelo Tosatti
On Mon, Jun 04, 2012 at 10:38:17AM +0530, Nikunj A. Dadhania wrote: In place of looping continuously introduce a halt if we do not succeed after some time. For vcpus that were running an IPI is sent. In case, it went to sleep between this, we will be doing flush_on_enter(harmless). But as a

Re: [ANNOUNCE] qemu-kvm-1.1.0

2012-07-03 Thread Michael Tokarev
On 03.07.2012 03:32, Marcelo Tosatti wrote: qemu-kvm-1.1.0 is now available. This release is based on the upstream qemu 1.1.0, plus kvm-specific enhancements. Please see the original QEMU 1.1.0 release announcement [1] for details. Why the recent fixes from Jan hasn't been applied? I mean

Re: [PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-07-03 Thread Nikunj A Dadhania
On Tue, 3 Jul 2012 04:55:35 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: if (!zero_mask) goto again; Can you please measure increased vmentry/vmexit overhead? x86/vmexit.c of git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git should help. Sure will get back with

Re: [PATCH v2 5/7] KVM: Introduce PV kick in flush tlb

2012-07-03 Thread Nikunj A Dadhania
On Tue, 3 Jul 2012 05:07:13 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Jun 04, 2012 at 10:38:17AM +0530, Nikunj A. Dadhania wrote: In place of looping continuously introduce a halt if we do not succeed after some time. For vcpus that were running an IPI is sent. In case,

Re: [PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-07-03 Thread Nikunj A Dadhania
On Tue, 3 Jul 2012 05:11:35 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Jun 04, 2012 at 10:37:24AM +0530, Nikunj A. Dadhania wrote: arch/x86/include/asm/kvm_para.h |3 +- arch/x86/include/asm/tlbflush.h |9 ++ arch/x86/kernel/kvm.c |1 +

[PATCH v9 00/16] KVM/ARM Implementation

2012-07-03 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 kvm/next, specifically commit:

[PATCH v9 01/16] ARM: add mem_type prot_pte accessor

2012-07-03 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com The KVM hypervisor mmu code requires requires access to the mem_type prot_pte field when setting up page tables pointing to a device. Unfortunately, the mem_type structure is opaque. Add an accessor (get_mem_type_prot_pte()) to retrieve the prot_pte value.

[PATCH v9 02/16] ARM: Add config option ARM_VIRT_EXT

2012-07-03 Thread Christoffer Dall
Select this option for ARM processors equipped with hardware Virtualization Extensions. Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/arm/mm/Kconfig | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index

[PATCH v9 03/16] ARM: Section based HYP idmap

2012-07-03 Thread Christoffer Dall
Add a HYP pgd to the core code (so it can benefit all Linux hypervisors). Populate this 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 and re-create it through hyp_idmap_setup. Make

[PATCH v9 04/16] KVM: Move KVM_IRQ_LINE to arch-generic code

2012-07-03 Thread Christoffer Dall
Handle KVM_IRQ_LINE and KVM_IRQ_LINE_STATUS in the generic kvm_vm_ioctl() function and call into kvm_vm_ioctl_irq_line(). Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/ia64/kvm/kvm-ia64.c | 33 ++--- arch/x86/kvm/x86.c | 33

[PATCH v9 05/16] KVM: Guard mmu_notifier specific code with CONFIG_MMU_NOTIFIER

2012-07-03 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com In order to avoid compilation failure when KVM is not compiled in, guard the mmu_notifier specific sections with both CONFIG_MMU_NOTIFIER and KVM_ARCH_WANT_MMU_NOTIFIER, like it is being done in the rest of the KVM code. Signed-off-by: Marc Zyngier

[PATCH v9 06/16] ARM: KVM: Initial skeleton to compile KVM support

2012-07-03 Thread Christoffer Dall
Targets KVM support for Cortex A-15 processors. Contains no real functionality but all the framework components, make files, header files and some tracing functionality. Most functionality is in arch/arm/kvm/* or arch/arm/include/asm/kvm_*.h. “Nothing to see here. Move along, move along...

[PATCH v9 07/16] ARM: KVM: Support Cortex-A15 VCPUs reset

2012-07-03 Thread Christoffer Dall
Reset all core and cp15 registers to their architecturally defined reset values at VCPU init time. Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/arm/include/asm/kvm_arm.h |6 ++ arch/arm/kvm/exports.c |2 + arch/arm/kvm/reset.c | 100

[PATCH v9 08/16] ARM: KVM: Hypervisor inititalization

2012-07-03 Thread Christoffer Dall
Sets up the required registers to run code in HYP-mode from the kernel. By setting the HVBAR the kernel can execute code in Hyp-mode with the MMU disabled. The HVBAR initially points to initialization code, which initializes other Hyp-mode registers and enables the MMU for Hyp-mode. Afterwards,

[PATCH v9 10/16] ARM: KVM: Memory virtualization setup

2012-07-03 Thread Christoffer Dall
From: Christoffer Dall cd...@cs.columbia.edu 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

[PATCH v9 11/16] ARM: KVM: Inject IRQs and FIQs from userspace

2012-07-03 Thread Christoffer Dall
From: Christoffer Dall cd...@cs.columbia.edu Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl. This ioctl is used since the sematics are in fact two lines that can be either raised or lowered on the VCPU - the IRQ and FIQ lines. KVM needs to know which VCPU it must operate on

[PATCH v9 12/16] ARM: KVM: World-switch implementation

2012-07-03 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 v9 13/16] ARM: KVM: Emulation framework and CP15 emulation

2012-07-03 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 v9 14/16] ARM: KVM: Handle guest faults in KVM

2012-07-03 Thread Christoffer Dall
Handles the guest faults in KVM by mapping in corresponding user pages in the 2nd stage page tables. Introduces new ARM-specific kernel memory types, PAGE_KVM_GUEST and pgprot_guest variables used to map 2nd stage memory for KVM guests. Leverages MMU notifiers on KVM/ARM by supporting the

[PATCH v9 15/16] ARM: KVM: Handle I/O aborts

2012-07-03 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 v9 16/16] ARM: KVM: Guest wait-for-interrupts (WFI) support

2012-07-03 Thread Christoffer Dall
From: Christoffer Dall cd...@cs.columbia.edu When the guest executes a WFI instruction the operation is trapped to KVM, which emulates the instruction in software. There is no correlation between a guest executing a WFI instruction and actually putting the hardware into a low-power mode, since a

Re: [RFC PATCH 0/6] option to not remove files inside -mem-path dir (v2)

2012-07-03 Thread Daniel P. Berrange
On Mon, Jul 02, 2012 at 04:54:03PM -0300, Eduardo Habkost wrote: On Mon, Jul 02, 2012 at 07:56:58PM +0100, Daniel P. Berrange wrote: On Mon, Jul 02, 2012 at 03:06:32PM -0300, Eduardo Habkost wrote: Resending series, after fixing some coding style issues. Does anybody has any feedback

Re: [PATCH v3 4/5] Sysfs: Export VMCSINFO via sysfs

2012-07-03 Thread Yanfei Zhang
于 2012年06月29日 10:58, Greg KH 写道: On Thu, Jun 28, 2012 at 04:37:38AM -0700, Greg KH wrote: On Thu, Jun 28, 2012 at 05:54:30PM +0800, Yanfei Zhang wrote: 于 2012年06月28日 03:22, Greg KH 写道: On Wed, Jun 27, 2012 at 04:54:54PM +0800, Yanfei Zhang wrote: This patch export offsets of fields via

A question about how kvm switch context to guest

2012-07-03 Thread Zhengwang Ruan
Hi kashyapc all, I see a piece of code in vmx_vcpu_run as below, is it used to switch context to a guest? Kvm don't used vmlaunch or vmresume to launch or resume a guest? Why does kvm need to manually switch context by filling registers using stored register copies? === asm(

Re: [PATCH v9 12/16] ARM: KVM: World-switch implementation

2012-07-03 Thread Avi Kivity
On 07/03/2012 12:01 PM, Christoffer Dall wrote: 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

KVM call minutes June 29

2012-07-03 Thread Juan Quintela
Isaku reminds me that I forgot to pust that minutes: 2012-06-19 -- - migration * xbrle: ok * huge memory: needs migration-thread, but should be ok * postcopy: ask for latency: maximum/avg/std deviation ask for vcpu utilization RDMA? * xbrle don't fix all

Re: A question about how kvm switch context to guest

2012-07-03 Thread Avi Kivity
On 07/03/2012 12:50 PM, Zhengwang Ruan wrote: Hi kashyapc all, I see a piece of code in vmx_vcpu_run as below, is it used to switch context to a guest? Kvm don't used vmlaunch or vmresume to launch or resume a guest? You trimmed the bit that contains vmlaunch/vmresume. Why does kvm need

Re: [Qemu-devel] KVM call agenda for Tuesday, July 3rd

2012-07-03 Thread Kevin Wolf
Am 02.07.2012 19:33, schrieb Eric Blake: On 07/02/2012 04:16 AM, Juan Quintela wrote: Hi Please send in any agenda items you are interested in covering. Can we discuss the future of 'getfd', the possibility of 'pass-fd', or even the enhancement of all existing monitor commands to take an

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-07-03 Thread Peter Lieven
Further output from my testing. Working: Linux 2.6.38 with included kvm module Linux 3.0.0 with included kvm module Not-Working: Linux 3.2.0 with included kvm module Linux 2.6.28 with kvm-kmod 3.4 Linux 3.0.0 with kvm-kmod 3.4 Linux 3.2.0 with kvm-kmod 3.4 I can trigger the race with any of

Re: [PATCH v9 16/16] ARM: KVM: Guest wait-for-interrupts (WFI) support

2012-07-03 Thread Avi Kivity
On 07/03/2012 12:02 PM, Christoffer Dall wrote: From: Christoffer Dall cd...@cs.columbia.edu When the guest executes a WFI instruction the operation is trapped to KVM, which emulates the instruction in software. There is no correlation between a guest executing a WFI instruction and actually

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-07-03 Thread Avi Kivity
On 07/03/2012 04:01 PM, Peter Lieven wrote: Further output from my testing. Working: Linux 2.6.38 with included kvm module Linux 3.0.0 with included kvm module Not-Working: Linux 3.2.0 with included kvm module Linux 2.6.28 with kvm-kmod 3.4 Linux 3.0.0 with kvm-kmod 3.4 Linux 3.2.0

Re: [Android-virt] [PATCH v9 16/16] ARM: KVM: Guest wait-for-interrupts (WFI) support

2012-07-03 Thread Peter Maydell
On 3 July 2012 14:10, Avi Kivity a...@redhat.com wrote: Or you could just call kvm_vcpu_block() here without having the variable. But eventually you'll need it since you want to expose wfi state to userspace for live migration. You could just always wake the cpu when migrating: the

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-07-03 Thread Peter Lieven
On 03.07.2012 15:13, Avi Kivity wrote: On 07/03/2012 04:01 PM, Peter Lieven wrote: Further output from my testing. Working: Linux 2.6.38 with included kvm module Linux 3.0.0 with included kvm module Not-Working: Linux 3.2.0 with included kvm module Linux 2.6.28 with kvm-kmod 3.4 Linux 3.0.0

Re: [Qemu-devel] KVM call agenda for Tuesday, July 3rd

2012-07-03 Thread Corey Bryant
On 07/03/2012 08:33 AM, Kevin Wolf wrote: Am 02.07.2012 19:33, schrieb Eric Blake: On 07/02/2012 04:16 AM, Juan Quintela wrote: Hi Please send in any agenda items you are interested in covering. Can we discuss the future of 'getfd', the possibility of 'pass-fd', or even the enhancement

[PATCH 0/2] virtio-blk spec: document topology info, add WCE toggle

2012-07-03 Thread Paolo Bonzini
Hi Rusty, here are two improvements to the virtio-blk spec. The first documents the status quo of an extension that has already been supported in QEMU for several releases, but never made it to the official spec. The second adds support for toggling the cache mode between writethrough and

[PATCH 1/2] virtio-blk spec: document topology info

2012-07-03 Thread Paolo Bonzini
Current QEMU and Linux drivers can export queue parameters via the virtio-blk configuration space. Document this, since the next patch will have to add another configuration field after these. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- virtio-spec.lyx | 85

[PATCH 2/2] virtio-blk spec: writeback cache enable improvements

2012-07-03 Thread Paolo Bonzini
This patch introduces two improvements to writeback cache handling in the virtio-blk spec. 1) The VIRTIO_BLK_F_FLUSH feature is renamed to VIRTIO_BLK_F_WCE, and QEMU's behavior is documented explicitly as part of the spec: the host negotiates the feature only if its cache is writeback. The

[PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-03 Thread Paolo Bonzini
This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, which exposes the cache mode in the configuration space and lets the driver modify it. The cache mode is exposed via sysfs. Even if the host does not support the new feature, the cache mode is visible (thanks to the existing

[QEMU PATCH 0/2] virtio-blk: writeback cache enable improvements

2012-07-03 Thread Paolo Bonzini
These patches let virtio-blk use the new support for toggling the cache mode between writethrough and writeback. The first patch introduces a new feature bit and configuration field to do this. The second patch disables writeback caching for guests that do not negotiate VIRTIO_BLK_F_WCACHE

[PATCH 2/2] virtio-blk: disable write cache if not negotiated

2012-07-03 Thread Paolo Bonzini
If the guest does not support flushes, we should run in writethrough mode. The setting is temporary until the next reset, so that for example the BIOS will run in writethrough mode while Linux will run with a writeback cache. VIRTIO_BLK_F_FLUSH has been introduced in Linux 2.6.32 (in 2009) and

[PATCH 1/2] virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE

2012-07-03 Thread Paolo Bonzini
Introduce a new feature bit and configuration field that provide support for toggling the cache mode between writethrough and writeback. Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with the spec. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/virtio-blk.c | 16

Re: [Android-virt] [PATCH v9 16/16] ARM: KVM: Guest wait-for-interrupts (WFI) support

2012-07-03 Thread Avi Kivity
On 07/03/2012 04:14 PM, Peter Maydell wrote: On 3 July 2012 14:10, Avi Kivity a...@redhat.com wrote: Or you could just call kvm_vcpu_block() here without having the variable. But eventually you'll need it since you want to expose wfi state to userspace for live migration. You could just

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-07-03 Thread Avi Kivity
On 07/03/2012 04:15 PM, Peter Lieven wrote: On 03.07.2012 15:13, Avi Kivity wrote: On 07/03/2012 04:01 PM, Peter Lieven wrote: Further output from my testing. Working: Linux 2.6.38 with included kvm module Linux 3.0.0 with included kvm module Not-Working: Linux 3.2.0 with included kvm

Re: UIP flag not cleared

2012-07-03 Thread Paolo Bonzini
Il 15/06/2012 17:38, nicolas.oc...@free.fr ha scritto: Hi list, I am having troubles porting my os to qemu/kvm environment. It's about the RTC (real-time clock) There is a flag (UIP flag) which is supposed to show when RTC can be read or not. We wait 10ms for that flag to be cleared,

Re: [PATCH stable-1.1] qemu-kvm: Add missing default machine options

2012-07-03 Thread Marcelo Tosatti
On Mon, Jul 02, 2012 at 09:34:46AM +0200, Jan Kiszka wrote: qemu-kvm-specific machine defaults were missing for pc-0.15 and pc-1.0. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/pc_piix.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) Applied both stable patches,

Re: [PATCH v9 00/16] KVM/ARM Implementation

2012-07-03 Thread Avi Kivity
On 07/03/2012 11:59 AM, Christoffer Dall wrote: 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 kvm/next,

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-03 Thread Paolo Bonzini
Il 02/07/2012 08:41, Rusty Russell ha scritto: With the same workload in guest, the guest fires 200K requests to host with merges enabled in guest (echo 0 /sys/block/vdb/queue/nomerges), while the guest fires 4K requests to host with merges disabled in guest (echo 2

Re: [PATCH 1/2] virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE

2012-07-03 Thread Kevin Wolf
Am 03.07.2012 15:20, schrieb Paolo Bonzini: Introduce a new feature bit and configuration field that provide support for toggling the cache mode between writethrough and writeback. Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with the spec. My spec (and my kernel as

Re: [Android-virt] [PATCH v9 16/16] ARM: KVM: Guest wait-for-interrupts (WFI) support

2012-07-03 Thread Peter Maydell
On 3 July 2012 14:24, Avi Kivity a...@redhat.com wrote: On 07/03/2012 04:14 PM, Peter Maydell wrote: You could just always wake the cpu when migrating: the architecture allows WFI to return early for any reason it likes including implementation convenience. Seems reasonable. I imagine wfi

Re: [PATCH 2/2] virtio-blk: disable write cache if not negotiated

2012-07-03 Thread Kevin Wolf
Am 03.07.2012 15:20, schrieb Paolo Bonzini: If the guest does not support flushes, we should run in writethrough mode. The setting is temporary until the next reset, so that for example the BIOS will run in writethrough mode while Linux will run with a writeback cache. VIRTIO_BLK_F_FLUSH

Re: [PATCH 2/2] virtio-blk: disable write cache if not negotiated

2012-07-03 Thread Paolo Bonzini
Il 03/07/2012 15:49, Kevin Wolf ha scritto: If the guest does not support flushes, we should run in writethrough mode. The setting is temporary until the next reset, so that for example the BIOS will run in writethrough mode while Linux will run with a writeback cache.

Re: [Android-virt] [PATCH v9 00/16] KVM/ARM Implementation

2012-07-03 Thread Peter Maydell
On 3 July 2012 14:29, Avi Kivity a...@redhat.com wrote: On 07/03/2012 11:59 AM, Christoffer Dall wrote: Additionally a few major milestones are coming up shortly: - Support Thumb MMIO emulation and test MMIO emulation code (under way) - Merge Marc Zyngier's patch series for VGIC and timers

Re: [PATCH 1/2] virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE

2012-07-03 Thread Paolo Bonzini
Il 03/07/2012 15:46, Kevin Wolf ha scritto: Introduce a new feature bit and configuration field that provide support for toggling the cache mode between writethrough and writeback. Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with the spec. My spec (and my kernel

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-03 Thread Asias He
On 07/03/2012 09:31 PM, Paolo Bonzini wrote: Il 02/07/2012 08:41, Rusty Russell ha scritto: With the same workload in guest, the guest fires 200K requests to host with merges enabled in guest (echo 0 /sys/block/vdb/queue/nomerges), while the guest fires 4K requests to host with merges

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-03 Thread Ronen Hod
On 06/18/2012 02:14 PM, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias Heas...@redhat.com wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias Heas...@redhat.com wrote: This patch introduces

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-03 Thread Dor Laor
On 07/03/2012 05:22 PM, Ronen Hod wrote: On 06/18/2012 02:14 PM, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias Heas...@redhat.com wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias

Re: [ANNOUNCE] qemu-kvm-1.1.0

2012-07-03 Thread Marcelo Tosatti
On Tue, Jul 03, 2012 at 12:13:19PM +0400, Michael Tokarev wrote: On 03.07.2012 03:32, Marcelo Tosatti wrote: qemu-kvm-1.1.0 is now available. This release is based on the upstream qemu 1.1.0, plus kvm-specific enhancements. Please see the original QEMU 1.1.0 release announcement [1] for

RE: [PATCH v11 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel

2012-07-03 Thread Yoder Stuart-B08248
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Monday, July 02, 2012 7:18 AM To: Yoder Stuart-B08248 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org Subject: Re: [PATCH v11 4/8] KVM: PPC: Add

Re: [PATCH v7 00/10] KVM: MMU: fast page fault

2012-07-03 Thread Marcelo Tosatti
On Wed, Jun 20, 2012 at 03:56:29PM +0800, Xiao Guangrong wrote: Changlog: - always atomicly update the spte if it can be updated out of mmu-lock - rename spte_can_be_writable() to spte_is_locklessly_modifiable() - cleanup and comment spte_write_protect() Performance result: (The benchmark

RE: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation

2012-07-03 Thread Yoder Stuart-B08248
-Original Message- From: Wood Scott-B07421 Sent: Monday, July 02, 2012 12:25 PM To: Alexander Graf Cc: Yoder Stuart-B08248; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Tabi Timur-B04825 Subject: Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation

[PATCH v12 7/8] powerpc/fsl-soc: use CONFIG_EPAPR_PARAVIRT for hcalls

2012-07-03 Thread Stuart Yoder
From: Scott Wood scottw...@freescale.com Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com --- v12: no changes arch/powerpc/sysdev/fsl_msi.c |9 +++-- arch/powerpc/sysdev/fsl_soc.c |2 ++ 2 files changed, 9 insertions(+), 2

[PATCH v12 1/8] PPC: epapr: create define for return code value of success

2012-07-03 Thread Stuart Yoder
From: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com --- v12: no changes arch/powerpc/include/asm/epapr_hcalls.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/epapr_hcalls.h

[PATCH v12 0/8] KVM: PPC: Add ePAPR idle hcall support

2012-07-03 Thread Stuart Yoder
From: Stuart Yoder stuart.yo...@freescale.com v12 has a couple of updates to address feedback -use new CURRENT_THREAD_INFO macro in epapr_hcalls.S -use EV_HCALL_TOKEN to create epapr hcall token A prerequisite to applying this patch is the patch: PPC: use CURRENT_THREAD_INFO instead of

[PATCH v12 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation

2012-07-03 Thread Stuart Yoder
From: Liu Yu-B13201 yu@freescale.com Signed-off-by: Liu Yu yu@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com --- v12: no changes arch/powerpc/include/asm/epapr_hcalls.h | 22 +- arch/powerpc/include/asm/fsl_hcalls.h | 36

[PATCH v12 5/8] KVM: PPC: ev_idle hcall support for e500 guests

2012-07-03 Thread Stuart Yoder
From: Liu Yu-B13201 yu@freescale.com Signed-off-by: Liu Yu yu@freescale.com [varun: 64-bit changes] Signed-off-by: Varun Sethi varun.se...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com --- v12: use new CURRENT_THREAD_INFO macro

[PATCH v12 2/8] KVM: PPC: use definitions in epapr header for hcalls

2012-07-03 Thread Stuart Yoder
From: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com --- v12: no changes arch/powerpc/include/asm/kvm_para.h | 21 +++-- arch/powerpc/kernel/kvm.c |2 +- arch/powerpc/kvm/powerpc.c | 10 +- 3

[PATCH v12 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel

2012-07-03 Thread Stuart Yoder
From: Liu Yu-B13201 yu@freescale.com And add a new flag definition in kvm_ppc_pvinfo to indicate whether the host supports the EV_IDLE hcall. Signed-off-by: Liu Yu yu@freescale.com [stuart.yo...@freescale.com: cleanup,fixes for conditions allowing idle] Signed-off-by: Stuart Yoder

[PATCH v12 3/8] KVM: PPC: add pvinfo for hcall opcodes on e500mc/e5500

2012-07-03 Thread Stuart Yoder
From: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Liu Yu yu@freescale.com [stuart: factored this out from idle hcall support in host patch] Signed-off-by: Stuart Yoder stuart.yo...@freescale.com --- v12: no changes arch/powerpc/kvm/powerpc.c | 10 +- 1 files changed, 9

[PATCH v12 6/8] PPC: select EPAPR_PARAVIRT for all users of epapr hcalls

2012-07-03 Thread Stuart Yoder
From: Stuart Yoder stuart.yo...@freescale.com Signed-off-by: Stuart Yoder stuart.yo...@freescale.com --- v12: no changes arch/powerpc/platforms/Kconfig |1 + drivers/tty/Kconfig|1 + drivers/virt/Kconfig |1 + 3 files changed, 3 insertions(+), 0 deletions(-)

Re: [Android-virt] [PATCH v9 16/16] ARM: KVM: Guest wait-for-interrupts (WFI) support

2012-07-03 Thread Avi Kivity
On 07/03/2012 04:49 PM, Peter Maydell wrote: On 3 July 2012 14:24, Avi Kivity a...@redhat.com wrote: On 07/03/2012 04:14 PM, Peter Maydell wrote: You could just always wake the cpu when migrating: the architecture allows WFI to return early for any reason it likes including implementation

Re: RFD: virtio balloon API use (was Re: [PATCH 5 of 5] virtio: expose added descriptors immediately)

2012-07-03 Thread Rafael Aquini
On Tue, Jul 03, 2012 at 10:17:46AM +0930, Rusty Russell wrote: On Mon, 2 Jul 2012 13:08:19 -0300, Rafael Aquini aqu...@redhat.com wrote: As 'locking in balloon', may I assume the approach I took for the compaction case is OK and aligned to address these concerns of yours? If not, do not

Re: race condition in qemu-kvm-1.0.1

2012-07-03 Thread Marcelo Tosatti
On Wed, Jun 27, 2012 at 12:35:22PM +0200, Peter Lieven wrote: Hi, we recently came across multiple VMs racing and stopping working. It seems to happen when the system is at 100% cpu. One way to reproduce this is: qemu-kvm-1.0.1 with vnc-thread enabled cmdline (or similar):

Re: [PATCH v3 02/26] KVM: Split cpuid register access from computation

2012-07-03 Thread Marcelo Tosatti
On Wed, Jun 27, 2012 at 06:24:50PM +0300, Avi Kivity wrote: Introduce kvm_cpuid() to perform the leaf limit check and calculate register values, and let kvm_emulate_cpuid() just handle reading and writing the registers from/to the vcpu. This allows us to reuse kvm_cpuid() in a context where

Re: [PATCH] apic: fix kvm build on UP without IOAPIC

2012-07-03 Thread Marcelo Tosatti
On Sun, Jul 01, 2012 at 06:05:06PM +0300, Michael S. Tsirkin wrote: On UP i386, when APIC is disabled # CONFIG_X86_UP_APIC is not set # CONFIG_PCI_IOAPIC is not set code looking at apicdrivers never has any effect but it still gets compiled in. In particular, this causes build failures

Re: [Qemu-devel] plan for device assignment upstream

2012-07-03 Thread Blue Swirl
On Mon, Jul 2, 2012 at 9:43 AM, Avi Kivity a...@redhat.com wrote: On 07/02/2012 12:30 PM, Jan Kiszka wrote: On 2012-07-02 11:18, Michael S. Tsirkin wrote: I've been thinking hard about Jan's patches for device assignment. Basically while I thought it makes sense to make all devices:

Re: [PATCH 1/6] file_ram_alloc(): coding style fixes

2012-07-03 Thread Blue Swirl
On Mon, Jul 2, 2012 at 6:06 PM, Eduardo Habkost ehabk...@redhat.com wrote: Cc: Blue Swirl blauwir...@gmail.com Signed-off-by: Eduardo Habkost ehabk...@redhat.com Acked-by: Blue Swirl blauwir...@gmail.com --- exec.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 2/6] file_ram_alloc(): use g_strdup_printf() instead of asprintf()

2012-07-03 Thread Blue Swirl
On Mon, Jul 2, 2012 at 6:06 PM, Eduardo Habkost ehabk...@redhat.com wrote: Cc: Blue Swirl blauwir...@gmail.com Signed-off-by: Eduardo Habkost ehabk...@redhat.com Acked-by: Blue Swirl blauwir...@gmail.com --- exec.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-)

[PATCH v3 1/2] kvm: Extend irqfd to support level interrupts

2012-07-03 Thread Alex Williamson
In order to inject a level interrupt from an external source using an irqfd, we need to allocate a new irq_source_id. This allows us to assert and (later) de-assert an interrupt line independently from users of KVM_IRQ_LINE and avoid lost interrupts. We also add what may appear like a bit of

[PATCH v3 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-07-03 Thread Alex Williamson
This new ioctl enables an eventfd to be triggered when an EOI is written for a specified irqchip pin. By default this is a simple notification, but we can also tie the eoifd to a level irqfd, which enables the irqchip pin to be automatically de-asserted on EOI. This mode is particularly useful

Re: [PATCH v12 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel

2012-07-03 Thread Alexander Graf
On 03.07.2012, at 17:48, Stuart Yoder wrote: From: Liu Yu-B13201 yu@freescale.com And add a new flag definition in kvm_ppc_pvinfo to indicate whether the host supports the EV_IDLE hcall. Signed-off-by: Liu Yu yu@freescale.com [stuart.yo...@freescale.com: cleanup,fixes for

RE: [PATCH v12 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel

2012-07-03 Thread Yoder Stuart-B08248
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Tuesday, July 03, 2012 2:34 PM To: Yoder Stuart-B08248 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org Subject: Re: [PATCH v12 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel On 03.07.2012,

Re: [PATCH v12 0/8] KVM: PPC: Add ePAPR idle hcall support

2012-07-03 Thread Alexander Graf
On 03.07.2012, at 17:48, Stuart Yoder wrote: From: Stuart Yoder stuart.yo...@freescale.com v12 has a couple of updates to address feedback -use new CURRENT_THREAD_INFO macro in epapr_hcalls.S -use EV_HCALL_TOKEN to create epapr hcall token A prerequisite to applying this patch is

Re: [PATCH v9 00/16] KVM/ARM Implementation

2012-07-03 Thread Marcelo Tosatti
On Tue, Jul 03, 2012 at 04:29:27PM +0300, Avi Kivity wrote: On 07/03/2012 11:59 AM, Christoffer Dall wrote: 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

Re: [PATCH v9 04/16] KVM: Move KVM_IRQ_LINE to arch-generic code

2012-07-03 Thread Marcelo Tosatti
On Tue, Jul 03, 2012 at 04:59:54AM -0400, Christoffer Dall wrote: Handle KVM_IRQ_LINE and KVM_IRQ_LINE_STATUS in the generic kvm_vm_ioctl() function and call into kvm_vm_ioctl_irq_line(). Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/ia64/kvm/kvm-ia64.c | 33

Re: [PATCHv2 kvm] kvm_pv_eoi: add flag support

2012-07-03 Thread Marcelo Tosatti
On Sun, Jul 01, 2012 at 06:08:30PM +0300, Michael S. Tsirkin wrote: Support the new PV EOI flag in kvm - it recently got merged into kvm.git. Set by default with -cpu kvm. Set for -cpu qemu by adding +kvm_pv_eoi. Clear by adding -kvm_pv_eoi to -cpu option. Signed-off-by: Michael S. Tsirkin

Re: [PATCH 3/3] KVM: MMU: track the refcount when unmap the page

2012-07-03 Thread Marcelo Tosatti
On Tue, Jul 03, 2012 at 02:32:14PM +0800, Xiao Guangrong wrote: It will trigger a WARN_ON if the page has been freed but it is still used in mmu, it can help us to detect mm bug early Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c |8 1

  1   2   >