Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-07 Thread Avi Kivity
On 08/07/2012 03:14 PM, David Gibson wrote: On Tue, Aug 07, 2012 at 11:46:35AM +0300, Avi Kivity wrote: On 08/07/2012 04:32 AM, David Gibson wrote: On Tue, Aug 07, 2012 at 06:57:57AM +1000, Benjamin Herrenschmidt wrote: On Mon, 2012-08-06 at 13:13 +1000, David Gibson wrote: So, I'm still

Re: [PATCH 6/8] KVM: PPC: E500: Implement MMU notifiers

2012-08-07 Thread Avi Kivity
On 08/07/2012 01:57 PM, Alexander Graf wrote: The e500 target has lived without mmu notifiers ever since it got introduced, but fails for the user space check on them with hugetlbfs. So in order to get that one working, implement mmu notifiers in a reasonably dumb fashion and be happy. On

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Avi Kivity
On 08/07/2012 01:57 PM, Alexander Graf wrote: Some archs need to ensure that their icache is flushed when mapping a new page. Add a callback to the generic code for an arch to implement any cache flush logic it may need. Signed-off-by: Alexander Graf ag...@suse.de --- virt/kvm/kvm_main.c

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Avi Kivity
On 08/07/2012 04:44 PM, Alexander Graf wrote: Is this the correct place? Who says the caller of hva_to_pfn() is going to map it? I don't think anyone is. However, we need the struct page, and all the generic kvm mm code tries hard to hide it from its users. The alternative would be

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Avi Kivity
On 08/07/2012 05:08 PM, Alexander Graf wrote: On 07.08.2012, at 15:58, Avi Kivity a...@redhat.com wrote: On 08/07/2012 04:44 PM, Alexander Graf wrote: Is this the correct place? Who says the caller of hva_to_pfn() is going to map it? I don't think anyone is. However, we need

Re: [PATCH 6/8] KVM: PPC: E500: Implement MMU notifiers

2012-08-07 Thread Avi Kivity
On 08/07/2012 04:52 PM, Alexander Graf wrote: +/* MMU Notifiers */ + +int kvm_unmap_hva(struct kvm *kvm, unsigned long hva) +{ +/* Is this a guest page? */ +if (!hva_to_memslot(kvm, hva)) +return 0; + +/* + * Flush all shadow tlb entries

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Avi Kivity
On 08/07/2012 05:14 PM, Alexander Graf wrote: On 07.08.2012, at 16:10, Avi Kivity a...@redhat.com wrote: On 08/07/2012 05:08 PM, Alexander Graf wrote: On 07.08.2012, at 15:58, Avi Kivity a...@redhat.com wrote: On 08/07/2012 04:44 PM, Alexander Graf wrote: Is this the correct

Re: [PATCH 7/8] KVM: Add page map arch callback

2012-08-07 Thread Avi Kivity
On 08/07/2012 05:24 PM, Alexander Graf wrote: Pre-map? How? In arch code before you install the page in a pte/tlbe. So how do I get to the struct page in there? pfn_to_page() -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-06 Thread Avi Kivity
On 08/05/2012 10:30 PM, Eric Northup wrote: On Sun, Aug 5, 2012 at 5:58 AM, Gleb Natapov g...@redhat.com wrote: APIC code has a lot of checks for apic presence and apic HW/SW enable state. Most common configuration is when each vcpu has in kernel apic and it is fully enabled. This path series

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-06 Thread Avi Kivity
On 08/05/2012 10:00 PM, Stefan Priebe wrote: Am 05.08.2012 17:52, schrieb Stefan Priebe: Am 05.08.2012 12:29, schrieb Avi Kivity: On 08/05/2012 01:08 PM, Stefan Priebe wrote: Am 01.08.2012 11:53, schrieb Avi Kivity: On 08/01/2012 12:42 PM, Stefan Priebe - Profihost AG wrote: Am 01.08.2012 11

Re: [PATCHv5 4/4] KVM: emulator: optimize rep ins handling.

2012-08-06 Thread Avi Kivity
On 07/30/2012 05:38 PM, Gleb Natapov wrote: Optimize rep ins by allowing emulator to write back more than one datum at a time. Introduce new operand type OP_MEM_STR which tells writeback() that dst contains pointer to an array that should be written back as opposite to just one data element.

Re: [PATCHv5 4/4] KVM: emulator: optimize rep ins handling.

2012-08-06 Thread Avi Kivity
On 08/06/2012 11:58 AM, Gleb Natapov wrote: On Mon, Aug 06, 2012 at 11:50:20AM +0300, Avi Kivity wrote: On 07/30/2012 05:38 PM, Gleb Natapov wrote: Optimize rep ins by allowing emulator to write back more than one datum at a time. Introduce new operand type OP_MEM_STR which tells writeback

Re: [PATCH 0/3] KVM: Integrate rmap and rmap_pde

2012-08-06 Thread Avi Kivity
On 08/01/2012 11:59 AM, Takuya Yoshikawa wrote: This has been already discussed on other threads and the concept itself is not so controversial. But since I know that the last patch of this series conflicts with Paul's recent work, I want to find a way to synchronize with his work at this

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

2012-08-06 Thread Avi Kivity
On 07/24/2012 11:43 PM, Alex Williamson wrote: This new ioctl enables an eventfd to be triggered when an EOI is written for a specified irqchip pin. The first user of this will be external device assignment through VFIO, using a level irqfd for asserting a PCI INTx interrupt and this

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

2012-08-06 Thread Avi Kivity
On 08/06/2012 01:17 PM, Avi Kivity wrote: +4.77 KVM_EOIFD + +Capability: KVM_CAP_EOIFD +Architectures: x86 +Type: vm ioctl +Parameters: struct kvm_eoifd (in) +Returns: 0 on success, 0 on error + +KVM_EOIFD allows userspace to receive interrupt EOI notification +through an eventfd

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

2012-08-06 Thread Avi Kivity
On 08/06/2012 01:38 PM, Avi Kivity wrote: Regarding the implementation, instead of a linked list, would an array of counters parallel to the bitmap make it simpler? Or even, replace the bitmap with an array of counters. -- error compiling committee.c: too many arguments to function

Re: [PATCHv5 4/4] KVM: emulator: optimize rep ins handling.

2012-08-06 Thread Avi Kivity
On 08/06/2012 02:05 PM, Gleb Natapov wrote: On Mon, Aug 06, 2012 at 12:28:05PM +0300, Avi Kivity wrote: On 08/06/2012 11:58 AM, Gleb Natapov wrote: On Mon, Aug 06, 2012 at 11:50:20AM +0300, Avi Kivity wrote: On 07/30/2012 05:38 PM, Gleb Natapov wrote: Optimize rep ins by allowing emulator

Re: [PATCHv5 4/4] KVM: emulator: optimize rep ins handling.

2012-08-06 Thread Avi Kivity
On 08/06/2012 02:49 PM, Gleb Natapov wrote: On Mon, Aug 06, 2012 at 02:39:52PM +0300, Avi Kivity wrote: On 08/06/2012 02:05 PM, Gleb Natapov wrote: On Mon, Aug 06, 2012 at 12:28:05PM +0300, Avi Kivity wrote: On 08/06/2012 11:58 AM, Gleb Natapov wrote: On Mon, Aug 06, 2012 at 11:50:20AM

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-06 Thread Avi Kivity
On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote: But still i got the segfault and core dump - this is my main problem? I mean qemu-kvm master isn't declared as stable. So i don't care about the slowness here. What can we do about the core dump and crash? Okay, I reproduced it;

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-06 Thread Avi Kivity
On 08/06/2012 03:12 PM, Avi Kivity wrote: On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote: But still i got the segfault and core dump - this is my main problem? I mean qemu-kvm master isn't declared as stable. So i don't care about the slowness here. What can we do about

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-06 Thread Avi Kivity
On 08/06/2012 03:37 PM, Avi Kivity wrote: On 08/06/2012 03:12 PM, Avi Kivity wrote: On 08/06/2012 11:46 AM, Stefan Priebe - Profihost AG wrote: But still i got the segfault and core dump - this is my main problem? I mean qemu-kvm master isn't declared as stable. So i don't care about

Re: [PATCH v2 02/10] KVM: introduce KVM_PFN_ERR_FAULT

2012-08-06 Thread Avi Kivity
On 08/03/2012 10:37 AM, Xiao Guangrong wrote: After that, the exported and un-inline function, get_fault_pfn, can be removed +#define KVM_PFN_ERR_FAULT(-EFAULT) + IMO this symbol isn't needed, just use -EFAULT (and -EHWPOISON etc.) directly. Just document it in hva_to_pfn(), since

Re: [PATCH v2 02/10] KVM: introduce KVM_PFN_ERR_FAULT

2012-08-06 Thread Avi Kivity
On 08/06/2012 04:01 PM, Avi Kivity wrote: On 08/03/2012 10:37 AM, Xiao Guangrong wrote: After that, the exported and un-inline function, get_fault_pfn, can be removed +#define KVM_PFN_ERR_FAULT (-EFAULT) + IMO this symbol isn't needed, just use -EFAULT (and -EHWPOISON etc.) directly

Re: [PATCH v2 01/10] KVM: iommu: fix releasing unmapped page

2012-08-06 Thread Avi Kivity
On 08/03/2012 10:36 AM, Xiao Guangrong wrote: There are two bugs: - the 'error page' is forgot to be released [ it is unneeded after commit a2766325cf9f9, for backport, we still do kvm_release_pfn_clean for the error pfn ] - guest pages are always released regardless of the unmapped

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-06 Thread Avi Kivity
On 08/05/2012 03:58 PM, Gleb Natapov wrote: APIC code has a lot of checks for apic presence and apic HW/SW enable state. Most common configuration is when each vcpu has in kernel apic and it is fully enabled. This path series uses jump labels to turn checks to nops in the common case. Okay,

Re: [PATCH 0/3] KVM: Integrate rmap and rmap_pde

2012-08-06 Thread Avi Kivity
On 08/01/2012 11:59 AM, Takuya Yoshikawa wrote: This has been already discussed on other threads and the concept itself is not so controversial. But since I know that the last patch of this series conflicts with Paul's recent work, I want to find a way to synchronize with his work at this

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-05 Thread Avi Kivity
On 08/02/2012 11:29 PM, Benjamin Herrenschmidt wrote: On Thu, 2012-08-02 at 16:05 +0300, Avi Kivity wrote: Yeah, we stumbled over this chunk as well. So you're saying we should delay the reset by invoking a self-signal if we're in such an operation? Yes. Qemu of course already supports

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-05 Thread Avi Kivity
On 08/04/2012 01:32 AM, Benjamin Herrenschmidt wrote: On Fri, 2012-08-03 at 15:05 -0300, Marcelo Tosatti wrote: See kvm_arch_process_async_events() call to qemu_system_reset_request() in target-i386/kvm.c. The whole thing is fragile, though: we rely on the order events are processed

Re: Nested kvm_intel broken on pre 3.3 hosts

2012-08-05 Thread Avi Kivity
On 08/03/2012 01:57 PM, Stefan Bader wrote: No, you're backporting the entire feature. All we need is to expose RDPMC intercept to the guest. Oh well, I thought that was the thing you asked for... Sorry for being unclear. It should be sufficient to backport the bits in

Re: [PATCH] update KVM_SAVE_MSRS_BEGIN to correct value

2012-08-05 Thread Avi Kivity
On 08/03/2012 09:08 PM, Marcelo Tosatti wrote: On Wed, Aug 01, 2012 at 05:01:42PM +0300, Gleb Natapov wrote: When MSR_KVM_PV_EOI_EN was added to msrs_to_save array KVM_SAVE_MSRS_BEGIN was not updated accordingly. Signed-off-by: Gleb Natapov g...@redhat.com Applied, thanks. This should go

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-05 Thread Avi Kivity
On 08/05/2012 01:08 PM, Stefan Priebe wrote: Am 01.08.2012 11:53, schrieb Avi Kivity: On 08/01/2012 12:42 PM, Stefan Priebe - Profihost AG wrote: Am 01.08.2012 11:33, schrieb Avi Kivity: So here are 3 backtraces from booting the rescue system: http://pastebin.com/raw.php?i=xCy2pEcP To me

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-05 Thread Avi Kivity
On 08/05/2012 03:58 PM, Gleb Natapov wrote: APIC code has a lot of checks for apic presence and apic HW/SW enable state. Most common configuration is when each vcpu has in kernel apic and it is fully enabled. This path series uses jump labels to turn checks to nops in the common case.

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-05 Thread Avi Kivity
On 08/05/2012 04:35 PM, Gleb Natapov wrote: On Sun, Aug 05, 2012 at 04:33:02PM +0300, Avi Kivity wrote: On 08/05/2012 03:58 PM, Gleb Natapov wrote: APIC code has a lot of checks for apic presence and apic HW/SW enable state. Most common configuration is when each vcpu has in kernel apic

Re: [PATCH 0/8] use jump labels to streamline common APIC configuration

2012-08-05 Thread Avi Kivity
On 08/05/2012 04:48 PM, Gleb Natapov wrote: During guest boot up, some of these jump keys will change, no? Does this mean a stop_machine() or equivalent? I'm worried about real-time response or one guest being affected by another. Yes, SW enable bit changes during boot. The jump

Re: [PATCH 3/8] KVM: mark apic enabled on start up.

2012-08-05 Thread Avi Kivity
On 08/05/2012 03:58 PM, Gleb Natapov wrote: According to SDM apic is enabled on start up. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/lapic.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index

Re: [PATCH 4/8] Export jump_label_rate_limit()

2012-08-05 Thread Avi Kivity
On 08/05/2012 03:58 PM, Gleb Natapov wrote: CC: Jason Baron jba...@redhat.com CC: Ingo Molnar mi...@elte.hu CC: Peter Zijlstra a.p.zijls...@chello.nl Signed-off-by: Gleb Natapov g...@redhat.com --- kernel/jump_label.c |1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH 5/8] KVM: use jump label to optimize checking for HW enabled APIC in APIC_BASE MSR.

2012-08-05 Thread Avi Kivity
On 08/05/2012 03:58 PM, Gleb Natapov wrote: Usually all APICs are HW enabled so the check can be optimized out. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/lapic.c | 29 - arch/x86/kvm/lapic.h |1 + arch/x86/kvm/x86.c |1 + 3 files

Re: [PATCH 3/8] KVM: mark apic enabled on start up.

2012-08-05 Thread Avi Kivity
On 08/05/2012 05:17 PM, Gleb Natapov wrote: On Sun, Aug 05, 2012 at 05:14:59PM +0300, Avi Kivity wrote: On 08/05/2012 03:58 PM, Gleb Natapov wrote: According to SDM apic is enabled on start up. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/lapic.c |3 ++- 1 file

Re: [PATCH 5/8] KVM: use jump label to optimize checking for HW enabled APIC in APIC_BASE MSR.

2012-08-05 Thread Avi Kivity
On 08/05/2012 05:42 PM, Gleb Natapov wrote: On Sun, Aug 05, 2012 at 05:35:21PM +0300, Avi Kivity wrote: On 08/05/2012 03:58 PM, Gleb Natapov wrote: Usually all APICs are HW enabled so the check can be optimized out. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/lapic.c

Re: [PATCHv5 4/4] KVM: emulator: optimize rep ins handling.

2012-08-05 Thread Avi Kivity
On 07/30/2012 05:38 PM, Gleb Natapov wrote: Optimize rep ins by allowing emulator to write back more than one datum at a time. Introduce new operand type OP_MEM_STR which tells writeback() that dst contains pointer to an array that should be written back as opposite to just one data element.

Re: [PATCHv5 4/4] KVM: emulator: optimize rep ins handling.

2012-08-05 Thread Avi Kivity
On 08/05/2012 06:18 PM, Gleb Natapov wrote: On Sun, Aug 05, 2012 at 06:03:12PM +0300, Avi Kivity wrote: On 07/30/2012 05:38 PM, Gleb Natapov wrote: Optimize rep ins by allowing emulator to write back more than one datum at a time. Introduce new operand type OP_MEM_STR which tells writeback

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-05 Thread Avi Kivity
On 08/02/2012 11:29 PM, Benjamin Herrenschmidt wrote: On Thu, 2012-08-02 at 16:05 +0300, Avi Kivity wrote: Yeah, we stumbled over this chunk as well. So you're saying we should delay the reset by invoking a self-signal if we're in such an operation? Yes. Qemu of course already supports

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-05 Thread Avi Kivity
On 08/04/2012 01:32 AM, Benjamin Herrenschmidt wrote: On Fri, 2012-08-03 at 15:05 -0300, Marcelo Tosatti wrote: See kvm_arch_process_async_events() call to qemu_system_reset_request() in target-i386/kvm.c. The whole thing is fragile, though: we rely on the order events are processed

Re: [PATCH 0/3] KVM: Integrate rmap and rmap_pde

2012-08-02 Thread Avi Kivity
On 08/01/2012 11:59 AM, Takuya Yoshikawa wrote: This has been already discussed on other threads and the concept itself is not so controversial. Looks good. But since I know that the last patch of this series conflicts with Paul's recent work, I want to find a way to synchronize with his

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Avi Kivity
On 08/01/2012 06:17 AM, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want to make sure we are on the right track first before proposing an actual patch as we would like

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Avi Kivity
On 08/02/2012 03:59 PM, Alexander Graf wrote: On 02.08.2012, at 14:35, Avi Kivity wrote: On 08/01/2012 06:17 AM, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want

Re: Nested kvm_intel broken on pre 3.3 hosts

2012-08-02 Thread Avi Kivity
On 08/02/2012 06:19 PM, Stefan Bader wrote: I started to pick #7 (#6 is in to have things in-sync between SVM and VMX). Most other patches then were needed as dependencies. The only difference here is #2 which I found being applied together with #1 (which is a dependency). Since #2 is rather

Re: KVM: x86: fix pvclock guest stopped flag reporting

2012-08-02 Thread Avi Kivity
On 08/02/2012 06:33 PM, Marcelo Tosatti wrote: kvm_guest_time_update unconditionally clears hv_clock.flags field, so the notification never reaches the guest. Fix it by allowing PVCLOCK_GUEST_STOPPED to passthrough. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

Re: KVM: x86: fix pvclock guest stopped flag reporting

2012-08-02 Thread Avi Kivity
On 08/02/2012 06:43 PM, Marcelo Tosatti wrote: On Thu, Aug 02, 2012 at 06:42:25PM +0300, Avi Kivity wrote: On 08/02/2012 06:33 PM, Marcelo Tosatti wrote: kvm_guest_time_update unconditionally clears hv_clock.flags field, so the notification never reaches the guest. Fix

Re: [PATCH 0/3] KVM: Integrate rmap and rmap_pde

2012-08-02 Thread Avi Kivity
On 08/01/2012 11:59 AM, Takuya Yoshikawa wrote: This has been already discussed on other threads and the concept itself is not so controversial. Looks good. But since I know that the last patch of this series conflicts with Paul's recent work, I want to find a way to synchronize with his

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Avi Kivity
On 08/01/2012 06:17 AM, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want to make sure we are on the right track first before proposing an actual patch as we would like

Re: Reset problem vs. MMIO emulation, hypercalls, etc...

2012-08-02 Thread Avi Kivity
On 08/02/2012 03:59 PM, Alexander Graf wrote: On 02.08.2012, at 14:35, Avi Kivity wrote: On 08/01/2012 06:17 AM, Benjamin Herrenschmidt wrote: Hi Avi ! We identified a problem on powerpc which seems to actually be a generic issue, and Alex suggested we propose a generic fix. I want

Re: [RFC PATCH] KVM: Only print vcpu_unimpl when DEBUG is set

2012-08-01 Thread Avi Kivity
On 08/01/2012 06:19 AM, Marcelo Tosatti wrote: On Thu, Jul 26, 2012 at 02:22:48PM +0200, Markus Trippelsdorf wrote: Every time I start qemu-kvm on my system the following line is added to the syslog: vcpu0 unhandled rdmsr: 0xc0010001 AFAICS all calls to vcpu_unimpl only contain debugging

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-01 Thread Avi Kivity
On 07/31/2012 08:37 PM, Stefan Priebe wrote: Now i got it working - sorry used old gdb. This is the backtrace: Core was generated by `/usr/bin/qemu-system-x86_64 -id 103 -chardev socket,id=qmp,path=/var/run/qemu-s'. Program terminated with signal 11, Segmentation fault. #0

Re: QEMU CPU model versioning/compatibility (was Re: KVM call minutes July 31th)

2012-08-01 Thread Avi Kivity
On 07/31/2012 06:14 PM, Eduardo Habkost wrote: On Tue, Jul 31, 2012 at 04:32:05PM +0200, Juan Quintela wrote: - 1.2 plans for CPU model versioning/compatibility (eduardo) (global properties vs QOM vs qdev) how to do it ? configuration file? moving back to the code? different external

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-01 Thread Avi Kivity
On 08/01/2012 12:24 PM, Stefan Priebe - Profihost AG wrote: Hi, ok i found a faster way to trigger this. Just boot the ubuntu rescue system. So here are 3 backtraces from booting the rescue system: http://pastebin.com/raw.php?i=xCy2pEcP To me they all look the same. They are. What

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-01 Thread Avi Kivity
On 08/01/2012 12:42 PM, Stefan Priebe - Profihost AG wrote: Am 01.08.2012 11:33, schrieb Avi Kivity: So here are 3 backtraces from booting the rescue system: http://pastebin.com/raw.php?i=xCy2pEcP To me they all look the same. They are. What version of qemu are you using? latest stable

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-08-01 Thread Avi Kivity
On 07/30/2012 07:39 PM, Avi Kivity wrote: On 07/30/2012 05:07 PM, Chris Clayton wrote: With kernel 3.5.0 with b2da15ac26a0c00 reverted, I have just had 15 clean invocations of vanilla qemu-kvm-1.1.1. So that commit would seem to be the problem. Just to be sure, I've run some more tests

[PATCH master/3.5.y] KVM: VMX: Fix ds/es corruption on i386 with preemption

2012-08-01 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/vmx.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index c39b607..c00f03d 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1488,13 +1488,6 @@ static

Re: Nested kvm_intel broken on pre 3.3 hosts

2012-08-01 Thread Avi Kivity
: commit fee84b079d5ddee2247b5c1f53162c330c622902 Author: Avi Kivity a...@redhat.com Date: Thu Nov 10 14:57:25 2011 +0200 KVM: VMX: Intercept RDPMC Intercept RDPMC and forward it to the PMU emulation code. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Gleb

Re: Nested kvm_intel broken on pre 3.3 hosts

2012-08-01 Thread Avi Kivity
On 08/01/2012 05:26 PM, Stefan Bader wrote: According to Intel SDM there was never CPU that didn't support RDPMC exiting. Looks like unfortunate nested VMX bug. Moreover, that same commit fixes the bug in nested vmx. So if you update your host kernel to the same version as your L1 guest

Re: [PATCH 0/10] nEPT v2: Nested EPT support for Nested VMX

2012-08-01 Thread Avi Kivity
On 08/01/2012 05:36 PM, Nadav Har'El wrote: The following patches add nested EPT support to Nested VMX. This is the second version of this patch set. Most of the issues from the previous reviews were handled, and in particular there is now a new variant of paging_tmpl for EPT page tables.

Re: Nested kvm_intel broken on pre 3.3 hosts

2012-08-01 Thread Avi Kivity
On 08/01/2012 06:07 PM, Nadav Har'El wrote: On Wed, Aug 01, 2012, Avi Kivity wrote about Re: Nested kvm_intel broken on pre 3.3 hosts: Right - it's not just kvm-as-a-guest that will trip on this. But there's no point in everyone backporting it on their own. If you're doing the backport

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-01 Thread Avi Kivity
On 08/01/2012 02:29 PM, Stefan Priebe - Profihost AG wrote: Please try qemu-kvm.git master and report. Can't get the latest version running. 1st it doesn't know the -id parameter. I don't know it either, what is it? 2nd parameter -vnc unix:/var/run/qemu-server/103.vnc,x509,password does

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-31 Thread Avi Kivity
On 07/31/2012 02:36 AM, Marcelo Tosatti wrote: On Mon, Jul 30, 2012 at 07:39:31PM +0300, Avi Kivity wrote: On 07/30/2012 05:07 PM, Chris Clayton wrote: With kernel 3.5.0 with b2da15ac26a0c00 reverted, I have just had 15 clean invocations of vanilla qemu-kvm-1.1.1. So that commit would seem

Re: [Qemu-devel] 9p broken?

2012-07-31 Thread Avi Kivity
On 07/31/2012 09:51 AM, Aneesh Kumar K.V wrote: Avi Kivity a...@redhat.com writes: Having an annoying bug on i386 kvm I decided to debug it buy running an i386 guest on my x86_64 host, use 9p to access a guest image, and run it using nested kvm. However, 9p appears to be broken: first

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-31 Thread Avi Kivity
On 07/31/2012 01:29 AM, Alex Williamson wrote: If the region size is zero, then both memory_region_del_subregion() (assuming the region is parented) and munmap() do nothing. So you could call this unconditionally. I suppose parenting them is the key. I'm counting on memory_region_size

Re: Testing tracer wakeup_rt: .. no entries found ..FAILED!

2012-07-31 Thread Avi Kivity
On 07/31/2012 03:17 PM, Fengguang Wu wrote: It's good to quickly get to the root cause :) Can we possibly detect whether we are in a virtual machine and hence skip this particular test case? cpu_has(boot_cpu, X86_FEATURE_HYPERVISOR) -- error compiling committee.c: too many arguments to

Re: How does QEMU communicate with KVM?

2012-07-31 Thread Avi Kivity
On 07/30/2012 08:47 AM, Richard Yao wrote: Is there any documentation on how QEMU communicates with KVM? See Documentation/virtual/kvm/api.txt. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: Testing tracer wakeup_rt: .. no entries found ..FAILED!

2012-07-31 Thread Avi Kivity
On 07/31/2012 03:43 PM, Steven Rostedt wrote: On Tue, 2012-07-31 at 15:37 +0300, Avi Kivity wrote: On 07/31/2012 03:17 PM, Fengguang Wu wrote: It's good to quickly get to the root cause :) Can we possibly detect whether we are in a virtual machine and hence skip this particular test

Re: [Qemu-devel] 9p broken?

2012-07-31 Thread Avi Kivity
On 07/31/2012 04:30 PM, Aneesh Kumar K.V wrote: Did this help ? http://mid.gmane.org/1343719453-26768-1-git-send-email-aneesh.ku...@linux.vnet.ibm.com It did: thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-07-31 Thread Avi Kivity
On 07/31/2012 02:59 PM, Stefan Priebe - Profihost AG wrote: Hello list, i hope it is correct to list the maintainers of kvm. While trying to install ubuntu 12.04 amd64 on a kvm based vm the KVM process segfaults while ubuntu tries to detect the HW: kvm[2978]: segfault at 7fb90d9035e0 ip

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-31 Thread Avi Kivity
On 07/31/2012 07:29 PM, Marcelo Tosatti wrote: So the same problem should happen with %fs and %gs, no? AFAICS: depends on CONFIG_X86_32_LAZY_GS for GS, unconditional for FS. This fs/gs were already in there, I wonder how it wasn't broken before. Something's fishy here. x86_64 is

Re: [PATCH stub] kvm: caching API for interrupts

2012-07-30 Thread Avi Kivity
On 07/29/2012 11:00 PM, Michael S. Tsirkin wrote: I've been looking at adding caching for IRQs so that we don't need to scan all VCPUs on each interrupt. One issue I had a problem with, is how the cache structure can be used from both a thread (to fill out the cache) and interrupt (to

9p broken?

2012-07-30 Thread Avi Kivity
Having an annoying bug on i386 kvm I decided to debug it buy running an i386 guest on my x86_64 host, use 9p to access a guest image, and run it using nested kvm. However, 9p appears to be broken: first, the configure test fails (patch sent). Second, while mount works, ls on the mount point

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-30 Thread Avi Kivity
On 07/30/2012 05:00 PM, Chris Clayton wrote: On 07/29/12 20:10, Chris Clayton wrote: Possible culprit: b2da15ac26a0c00. That commit isn't in qermu-kvm-1.1.1. It is in kernel. Sorry, so it is. With kernel 3.5.0 with b2da15ac26a0c00 reverted, I have just had 15 clean invocations of

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-30 Thread Avi Kivity
On 07/30/2012 05:07 PM, Chris Clayton wrote: With kernel 3.5.0 with b2da15ac26a0c00 reverted, I have just had 15 clean invocations of vanilla qemu-kvm-1.1.1. So that commit would seem to be the problem. Just to be sure, I've run some more tests today. No crashes occurred in 20 runs of

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-29 Thread Avi Kivity
On 07/27/2012 10:04 PM, Chris Clayton wrote: On 07/27/12 19:08, Eric Northup wrote: Could you include the output of info registers at the point where it crashed? Here you go: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb6a78b40 (LWP 13249)]

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-29 Thread Avi Kivity
On 07/26/2012 11:15 PM, Nicholas A. Bellinger wrote: Example..? If there is a better way to handle ioctl compat I'd certainly like to hear about it. r = ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_ASSIGN_DEV_IRQ); if (r == -1) ... if (r) // ioctl(fd, KVM_ASSIGN_DEV_IRQ, ...) is

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-29 Thread Avi Kivity
On 07/26/2012 08:40 PM, Alex Williamson wrote: On Thu, 2012-07-26 at 19:34 +0300, Avi Kivity wrote: On 07/25/2012 08:03 PM, Alex Williamson wrote: +/* + * Resource setup + */ +static void vfio_unmap_bar(VFIODevice *vdev, int nr) +{ +VFIOBAR *bar = vdev-bars[nr]; +uint64_t

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-29 Thread Avi Kivity
On 07/29/2012 05:03 PM, Chris Clayton wrote: On 07/29/12 13:42, Avi Kivity wrote: On 07/27/2012 10:04 PM, Chris Clayton wrote: On 07/27/12 19:08, Eric Northup wrote: Could you include the output of info registers at the point where it crashed? Here you go: Program received signal SIGSEGV

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-29 Thread Avi Kivity
On 07/29/2012 05:18 PM, Avi Kivity wrote: I think you are saying that the problem isn't in kvm, so where would you recommend I continue investigations. I'm not seeing a crash with any other applications. What might have happened is that the movdqu instruction faulted (as it's an fpu

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-29 Thread Avi Kivity
On 07/29/2012 05:18 PM, Avi Kivity wrote: On 07/29/2012 05:03 PM, Chris Clayton wrote: On 07/29/12 13:42, Avi Kivity wrote: On 07/27/2012 10:04 PM, Chris Clayton wrote: On 07/27/12 19:08, Eric Northup wrote: Could you include the output of info registers at the point where it crashed

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-29 Thread Avi Kivity
On 07/29/2012 06:47 PM, Avi Kivity wrote: What might have happened is that the movdqu instruction faulted (as it's an fpu instruction), and on the way back from the fault, ds and es didn't get restored correctly. You can test this by writing a trivial version of g_str_equal() somewhere

Re: [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-26 Thread Avi Kivity
On 07/25/2012 10:53 PM, Alex Williamson wrote: On Wed, 2012-07-25 at 22:30 +0300, Avi Kivity wrote: On 07/25/2012 08:03 PM, Alex Williamson wrote: This adds PCI based device assignment to Qemu using the Linux VFIO userspace driver interface. After setting up VFIO device access, devices

Re: [PATCH v2 3/3] KVM: remove dummy pages

2012-07-26 Thread Avi Kivity
On 07/26/2012 06:58 AM, Xiao Guangrong wrote: Currently, kvm allocates some pages and use them as error indicators, it wastes memory and is not good for scalability Base on Avi's suggestion, we use the error codes instead of these pages to indicate the error conditions +static pfn_t

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-26 Thread Avi Kivity
On 07/26/2012 05:34 AM, Nicholas A. Bellinger wrote: In that case, respinning a -v5 for tcm_vhost to start from ABI=0 and will post an updated patch shortly. The main thing I would like to confirm is that this only versions the tcm_vhost ioctls? In that case a single version number works.

Re: [PATCH 1/2] KVM: PIC: call ack notifiers for irqs that are dropped form irr

2012-07-26 Thread Avi Kivity
On 07/26/2012 10:00 AM, Gleb Natapov wrote: After commit 242ec97c358256 PIT interrupts are no longer delivered after PIC reset. It happens because PIT injects interrupt only if previous one was acked, but since on PIC reset it is dropped from irr it will never be delivered and hence

Re: [PATCH 1/2] KVM: PIC: call ack notifiers for irqs that are dropped form irr

2012-07-26 Thread Avi Kivity
On 07/26/2012 12:11 PM, Gleb Natapov wrote: On Thu, Jul 26, 2012 at 12:09:36PM +0300, Avi Kivity wrote: On 07/26/2012 10:00 AM, Gleb Natapov wrote: After commit 242ec97c358256 PIT interrupts are no longer delivered after PIC reset. It happens because PIT injects interrupt only if previous

Re: [PATCH] KVM: emulator: drop unneeded call to get_segment()

2012-07-26 Thread Avi Kivity
On 07/25/2012 03:49 PM, Gleb Natapov wrote: setup_syscalls_segments() calls get_segment() and than overwrites all but one of the structure fields and this one should also be overwritten anyway, so we can drop call to get_segment() and avoid a couple of vmreads on vmx. Also drop zeroing ss/cs

Re: [PATCH v2] KVM: Move KVM_IRQ_LINE to arch-generic code

2012-07-26 Thread Avi Kivity
On 07/24/2012 03:51 PM, 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(). This is even more relevant when KVM/ARM also uses this ioctl. Applied, thanks. -- error compiling committee.c: too many

Re: [PATCH 0/3] KVM: s390: Trace events support.

2012-07-26 Thread Avi Kivity
On 07/23/2012 06:20 PM, Cornelia Huck wrote: Avi, Marcelo, here's a patch set that introduces trace events for kvm/s390. It's split into two parts: - Trace points for architecture-defined events, like intercepts. This patch calls into the disassembler via the interface provided by

Re: [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-26 Thread Avi Kivity
On 07/26/2012 12:28 PM, Andreas Hartmann wrote: Avi Kivity wrote: On 07/25/2012 10:53 PM, Alex Williamson wrote: On Wed, 2012-07-25 at 22:30 +0300, Avi Kivity wrote: On 07/25/2012 08:03 PM, Alex Williamson wrote: This adds PCI based device assignment to Qemu using the Linux VFIO userspace

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-26 Thread Avi Kivity
On 07/26/2012 12:52 PM, Chris Clayton wrote: On 07/19/12 19:23, Chris Clayton wrote: On 07/19/12 13:17, Avi Kivity wrote: On 07/19/2012 03:14 PM, Chris Clayton wrote: Change of diagnostics, unfortunately. qemu-kvm-1.0.1 can, in fact, crash on 3.5.0-rc6 (and rc7). I didn't get it earlier

Re: Can we force a KVM VCPU in Guest Mode to Exit to User Mode From User Mode ?

2012-07-26 Thread Avi Kivity
On 07/26/2012 12:38 PM, Mian M. Hamayun wrote: snip This mechanism 'seems' to work fine when both vcpu threads are in User Mode. But when booting an SMP Guest, the boot processor (BSP) initially executes the bootstrap code while the non-boot processors (APs) are waiting for initial

Re: Can we force a KVM VCPU in Guest Mode to Exit to User Mode From User Mode ?

2012-07-26 Thread Avi Kivity
On 07/26/2012 01:34 PM, Mian M. Hamayun wrote: On 07/26/2012 12:06 PM, Avi Kivity wrote: On 07/26/2012 12:38 PM, Mian M. Hamayun wrote: snip This mechanism 'seems' to work fine when both vcpu threads are in User Mode. But when booting an SMP Guest, the boot processor (BSP) initially

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-26 Thread Avi Kivity
On 07/26/2012 01:29 PM, Jan Kiszka wrote: It looks like general memory corruption. Is this repeatable? What's the guest uptime when it happens (i.e. is it immediate?) Jan, why are we calling cpu_set_apic_tpr() with kvm_irqchip_in_kernel? To sync the userspace state with what the kernel

Re: [PATCH 0/3] KVM: s390: Trace events support.

2012-07-26 Thread Avi Kivity
On 07/26/2012 01:47 PM, Cornelia Huck wrote: On Thu, 26 Jul 2012 12:35:10 +0300 Avi Kivity a...@redhat.com wrote: On 07/23/2012 06:20 PM, Cornelia Huck wrote: Avi, Marcelo, here's a patch set that introduces trace events for kvm/s390. It's split into two parts: - Trace points

Re: qemu-kvm-1.1.0 crashing with kernel 3.5.0-rc6

2012-07-26 Thread Avi Kivity
On 07/26/2012 02:58 PM, Chris Clayton wrote: It looks like general memory corruption. Is this repeatable? What's the guest uptime when it happens (i.e. is it immediate?) I've just done 10 runs of WinXP SP3 and 5 of them crashed. Three crashed early as XP was starting up - well before the

Re: [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it

2012-07-26 Thread Avi Kivity
On 07/26/2012 03:56 PM, liu ping fan wrote: On Wed, Jul 25, 2012 at 5:08 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 25/07/2012 05:31, Liu Ping Fan ha scritto: From: Liu Ping Fan pingf...@linux.vnet.ibm.com rwlock: qemu_device_tree_mutex rd side: --device_del(destruction of device

<    3   4   5   6   7   8   9   10   11   12   >