Re: windows 2008 guest causing rcu_shed to emit NMI

2013-01-25 Thread Marcelo Tosatti
On Fri, Jan 25, 2013 at 10:45:02AM +0300, Andrey Korolyov wrote: On Thu, Jan 24, 2013 at 4:20 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Thu, Jan 24, 2013 at 01:54:03PM +0300, Andrey Korolyov wrote: Thank you Marcelo, Host node locking up sometimes later than yesterday, bur problem

Re: windows 2008 guest causing rcu_shed to emit NMI

2013-01-24 Thread Marcelo Tosatti
On Thu, Jan 24, 2013 at 01:54:03PM +0300, Andrey Korolyov wrote: Thank you Marcelo, Host node locking up sometimes later than yesterday, bur problem still here, please see attached dmesg. Stuck process looks like root 19251 0.0 0.0 228476 12488 ?D14:42 0:00 /usr/bin/kvm

[GIT PULL] KVM fixes for 3.8-rc4

2013-01-24 Thread Marcelo Tosatti
Linus, Please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git master To receive the following KVM bug fixes Alexander Graf (1): KVM: PPC: Emulate dcbf arch/powerpc/kvm/emulate.c |2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line

Re: [PATCH 0/9] some more vmx real mode emulation fixes and cleanups

2013-01-24 Thread Marcelo Tosatti
On Mon, Jan 21, 2013 at 03:36:40PM +0200, Gleb Natapov wrote: Gleb Natapov (9): KVM: VMX: remove special CPL cache access during transition to real mode. KVM: VMX: reset CPL only on CS register write. KVM: VMX: if unrestricted guest is enabled vcpu state is always valid.

Re: [PATCH 2/2] x86, apicv: Add Posted Interrupt supporting

2013-01-24 Thread Marcelo Tosatti
On Thu, Dec 13, 2012 at 03:29:40PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Posted Interrupt allows APIC interrupts to inject into guest directly without any vmexit. - When delivering a interrupt to guest, if target vcpu is running, update Posted-interrupt

Re: [PATCH v2 06/12] KVM: MMU: introduce a static table to map guest access to spte access

2013-01-24 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 06:07:20PM +0800, Xiao Guangrong wrote: It makes set_spte more clean and reduces branch prediction Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/mmu.c | 37 ++--- 1 files changed, 26 insertions(+),

Re: [PATCH v12 0/3] x86, apicv: Add APIC virtualization support

2013-01-23 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 10:47:23PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com APIC virtualization is a new feature which can eliminate most of VM exit when vcpu handle a interrupt: APIC register virtualization: APIC read access doesn't cause APIC-access VM

Re: [PATCH v12 0/3] x86, apicv: Add APIC virtualization support

2013-01-23 Thread Marcelo Tosatti
|4 + virt/kvm/irq_comm.c | 25 +++ virt/kvm/kvm_main.c |5 + 14 files changed, 667 insertions(+), 54 deletions(-) Reviewed-by: Marcelo Tosatti mtosa...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message

Re: [PATCH 0/9] some more vmx real mode emulation fixes and cleanups

2013-01-23 Thread Marcelo Tosatti
(-) -- 1.7.10.4 Reviewed-by: Marcelo Tosatti mtosa...@redhat.com -- 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: windows 2008 guest causing rcu_shed to emit NMI

2013-01-23 Thread Marcelo Tosatti
On Tue, Jan 22, 2013 at 09:00:25PM +0300, Andrey Korolyov wrote: Hi, problem described in the title happens on heavy I/O pressure on the host, without idle=poll trace almost always is the same, involving mwait, with poll and nohz=off RIP varies from time to time, at the previous hang it was

Re: [Qemu-devel] [PATCH for-1.4 01/12] kvm: Add fake KVM_FEATURE_CLOCKSOURCE_STABLE_BIT for builds withou KVM

2013-01-22 Thread Marcelo Tosatti
On Tue, Jan 22, 2013 at 05:59:14AM +0100, Andreas Färber wrote: Am 22.01.2013 02:43, schrieb Marcelo Tosatti: On Thu, Jan 17, 2013 at 06:59:27PM -0200, Eduardo Habkost wrote: Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Cc: kvm@vger.kernel.org Cc: Michael S. Tsirkin m

Re: [PATCH 2/2] x86, apicv: Add Posted Interrupt supporting

2013-01-22 Thread Marcelo Tosatti
On Thu, Dec 13, 2012 at 03:29:40PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Posted Interrupt allows APIC interrupts to inject into guest directly without any vmexit. - When delivering a interrupt to guest, if target vcpu is running, update Posted-interrupt

Re: [PATCH v11 2/3] x86, apicv: add virtual x2apic support

2013-01-22 Thread Marcelo Tosatti
On Tue, Jan 22, 2013 at 05:55:53PM +0200, Gleb Natapov wrote: On Tue, Jan 22, 2013 at 12:21:47PM +, Zhang, Yang Z wrote: +static void vmx_set_msr_bitmap(struct kvm_vcpu *vcpu) +{ +unsigned long *msr_bitmap; + +if (apic_x2apic_mode(vcpu-arch.apic))

Re: [PATCH v2 8/8] KVM: x86 emulator: convert a few freestanding emulations to fastop

2013-01-22 Thread Marcelo Tosatti
Missing signed off by. On Sat, Jan 19, 2013 at 07:51:57PM +0200, Avi Kivity wrote: --- arch/x86/kvm/emulate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 2/3] tcm_vhost: Optimize gup in vhost_scsi_map_to_sgl

2013-01-21 Thread Marcelo Tosatti
On Mon, Jan 21, 2013 at 04:05:27PM +0800, Asias He wrote: We can get all the pages in one time instead of calling gup N times. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/tcm_vhost.c | 33 - 1 file changed, 20 insertions(+), 13 deletions(-)

Re: [PATCH v11 2/3] x86, apicv: add virtual x2apic support

2013-01-21 Thread Marcelo Tosatti
On Wed, Jan 16, 2013 at 06:21:11PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com basically to benefit from apicv, we need to enable virtualized x2apic mode. Currently, we only enable it when guest is really using x2apic. Also, clear MSR bitmap for corresponding x2apic

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

2013-01-21 Thread Marcelo Tosatti
On Wed, Jan 16, 2013 at 06:21:12PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into existing interrupr injection

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

2013-01-21 Thread Marcelo Tosatti
On Mon, Jan 21, 2013 at 07:03:00AM +0200, Gleb Natapov wrote: @@ -115,6 +116,42 @@ static void update_handled_vectors(struct kvm_ioapic *ioapic) smp_wmb(); } +void set_eoi_exitmap(struct kvm_vcpu *vcpu) +{ This function is exported from the file and need to have more

Re: [PATCH v11 2/3] x86, apicv: add virtual x2apic support

2013-01-21 Thread Marcelo Tosatti
On Mon, Jan 21, 2013 at 10:21:14PM +0200, Gleb Natapov wrote: } + + vcpu-arch.apic_base = value; Simpler to have if (apic_x2apic_mode(apic)) { ... kvm_x86_ops-set_virtual_x2apic_mode(vcpu, true); } else { kvm_x86_ops-set_virtual_x2apic_mode(vcpu, false);

Re: [PATCH v11 2/3] x86, apicv: add virtual x2apic support

2013-01-21 Thread Marcelo Tosatti
On Mon, Jan 21, 2013 at 11:34:20PM +0200, Gleb Natapov wrote: On Mon, Jan 21, 2013 at 07:21:13PM -0200, Marcelo Tosatti wrote: On Mon, Jan 21, 2013 at 10:21:14PM +0200, Gleb Natapov wrote: } + + vcpu-arch.apic_base = value; Simpler to have

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

2013-01-21 Thread Marcelo Tosatti
On Mon, Jan 21, 2013 at 11:18:28PM +0200, Gleb Natapov wrote: On Mon, Jan 21, 2013 at 07:05:43PM -0200, Marcelo Tosatti wrote: + struct vcpu_vmx *vmx = to_vmx(vcpu); + + if (WARN_ONCE((vector 255), + KVM VMX: vector (%d) out of range\n, vector)) + return

Re: [PATCH v11 2/3] x86, apicv: add virtual x2apic support

2013-01-21 Thread Marcelo Tosatti
On Mon, Jan 21, 2013 at 08:16:18PM -0200, Marcelo Tosatti wrote: On Mon, Jan 21, 2013 at 11:34:20PM +0200, Gleb Natapov wrote: On Mon, Jan 21, 2013 at 07:21:13PM -0200, Marcelo Tosatti wrote: On Mon, Jan 21, 2013 at 10:21:14PM +0200, Gleb Natapov wrote: } + + vcpu

Re: [PULL 3.8 0/1] ppc patch queue 2013-01-18 for 3.8

2013-01-21 Thread Marcelo Tosatti
On Fri, Jan 18, 2013 at 12:48:25AM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc against 3.8. Please pull. It contains a bug fix for an issue that Ben Collins ran into, where a guest would just abort because it traps during an unknown instruction.

Re: [PATCH v6 1/3] KVM: x86: clean up reexecute_instruction

2013-01-21 Thread Marcelo Tosatti
On Sun, Jan 13, 2013 at 11:44:12PM +0800, Xiao Guangrong wrote: Little cleanup for reexecute_instruction, also use gpa_to_gfn in retry_instruction Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com Applied series, thanks. -- To unsubscribe from this list: send the line

Re: [PULL 3.8 0/1] ppc patch queue 2013-01-18 for 3.8

2013-01-21 Thread Marcelo Tosatti
On Fri, Jan 18, 2013 at 12:48:25AM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc against 3.8. Please pull. It contains a bug fix for an issue that Ben Collins ran into, where a guest would just abort because it traps during an unknown instruction.

Re: Locking problem in KVM (or MM)

2013-01-17 Thread Marcelo Tosatti
Appears to be related to https://lkml.org/lkml/2013/1/15/542 On Wed, Jan 16, 2013 at 02:41:25PM -0800, Stephen Hemminger wrote: Lockdep splat, appears to be KVM related with 3.8-rc1 [24428.429305] [24428.429308] = [24428.429309] [ INFO: possible

Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1

2013-01-17 Thread Marcelo Tosatti
On Thu, Jan 17, 2013 at 11:20:43AM +0800, Xiao Guangrong wrote: On 01/17/2013 03:07 AM, Marcelo Tosatti wrote: On Fri, Jan 11, 2013 at 06:25:18PM +0900, Takuya Yoshikawa wrote: Patches 1 to 3 are trivial. Patch 4 is the main cause of the increased lines, but I think the new code makes

Re: [PATCH v6 1/3] KVM: x86: clean up reexecute_instruction

2013-01-17 Thread Marcelo Tosatti
(+), 7 deletions(-) Reviewed-by: Marcelo Tosatti mtosa...@redhat.com -- 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: KVM: Questions and comments on make_all_cpus_request

2013-01-16 Thread Marcelo Tosatti
On Tue, Jan 15, 2013 at 07:43:40PM -0500, Christoffer Dall wrote: Hi KVM guys, I've had a bit of challenges figuring out the exact functinality and synchronization of vcpu-requests and friends. In lack of a better method, I wrote some comments as a patch. I think this code really

Re: [PATCH 0/4] KVM: Clean up and optimize __kvm_set_memory_region() - part1

2013-01-16 Thread Marcelo Tosatti
KVM: set_memory_region: Identify the requested change explicitly virt/kvm/kvm_main.c | 94 --- 1 files changed, 59 insertions(+), 35 deletions(-) -- 1.7.5.4 Reviewed-by: Marcelo Tosatti mtosa...@redhat.com BTW, while at it, its

[uq/master PATCH] vmxcap: bit 9 of VMX_PROCBASED_CTLS2 is 'virtual interrupt delivery'

2013-01-11 Thread Marcelo Tosatti
Bit 9 of MSR_IA32_VMX_PROCBASED_CTLS2 is virtual interrupt delivery. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap index cbe6440..0b23f77 100755 --- a/scripts/kvm/vmxcap +++ b/scripts/kvm/vmxcap @@ -147,6 +147,7 @@ controls

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-11 Thread Marcelo Tosatti
On Fri, Jan 11, 2013 at 04:18:22AM +0800, Xiao Guangrong wrote: On 01/11/2013 03:48 AM, Marcelo Tosatti wrote: On Fri, Jan 11, 2013 at 02:05:33AM +0800, Xiao Guangrong wrote: On 01/11/2013 01:26 AM, Marcelo Tosatti wrote: On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-11 Thread Marcelo Tosatti
On Fri, Jan 11, 2013 at 02:16:11AM +0800, Xiao Guangrong wrote: On 01/11/2013 01:30 AM, Marcelo Tosatti wrote: On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry

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

2013-01-11 Thread Marcelo Tosatti
Move inside irq_lock protection. void kvm_unregister_irq_ack_notifier(struct kvm *kvm, @@ -270,6 +291,7 @@ void kvm_unregister_irq_ack_notifier(struct kvm *kvm, hlist_del_init_rcu(kian-link); mutex_unlock(kvm-irq_lock); synchronize_rcu(); +

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

2013-01-11 Thread Marcelo Tosatti
On Fri, Jan 11, 2013 at 08:46:35AM -0700, Alex Williamson wrote: On Fri, 2013-01-11 at 08:45 +, Pandarathil, Vijaymohan R wrote: -Original Message- From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Wednesday, January 09, 2013 11:05 AM To: Pandarathil,

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-11 Thread Marcelo Tosatti
On Fri, Jan 11, 2013 at 02:26:51AM -0500, Christoffer Dall wrote: On 10/01/2013, at 20.10, Scott Wood scottw...@freescale.com wrote: On 01/10/2013 06:35:02 PM, Marcelo Tosatti wrote: On Thu, Jan 10, 2013 at 04:40:12PM -0600, Scott Wood wrote: On 01/10/2013 04:28:01 PM, Marcelo Tosatti

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-11 Thread Marcelo Tosatti
Can you make KVM_SET_ARM_DEVICE address extensible? Add some reserved space and a flags field. Can't we do this for the new ioctl that we all would agree on rather than the interim one that's only a short term solution for a greater problem? Alex OK. -- To unsubscribe from this

Re: [PATCH v5 6/5] KVM: x86: clear write_fault_to_shadow_pgtable explicitly

2013-01-11 Thread Marcelo Tosatti
On Fri, Jan 11, 2013 at 10:12:58PM +0800, Xiao Guangrong wrote: On 01/11/2013 09:15 PM, Marcelo Tosatti wrote: This is cryptic. Its not obvious at all for someone modifying the code, for example. Can you please clear it explicitly? Sure, this is the patch to apply your idea

Re: [PATCH] emulator: simple ALU tests

2013-01-10 Thread Marcelo Tosatti
On Fri, Jan 04, 2013 at 04:17:04PM +0200, Avi Kivity wrote: Signed-off-by: Avi Kivity avi.kiv...@gmail.com --- x86/emulator.c | 26 ++ 1 file changed, 26 insertions(+) Applied, thanks. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: [PATCH 0/2] KVM: s390: Bugfixes for virtio-ccw.

2013-01-10 Thread Marcelo Tosatti
On Mon, Jan 07, 2013 at 03:51:50PM +0100, Cornelia Huck wrote: Hi, Christian discovered some problems with regard to serialization in the virtio-ccw guest driver. Per-device data structures might contain data obtained by channel programs issued later on, leading to confusing behaviour. We

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-10 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry all the instructions except it accesses on error pfn For example, some cases are nested-write-protect - if the page

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-10 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry all the instructions except it accesses on error pfn For example, some cases are nested-write-protect - if the page

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

2013-01-10 Thread Marcelo Tosatti
--- arch/x86/kvm/mmu.c| 56 +++- arch/x86/kvm/x86.c| 12 --- virt/kvm/kvm_main.c |1 - 5 files changed, 37 insertions(+), 44 deletions(-) -- 1.7.5.4 Reviewed-by: Marcelo Tosatti mtosa...@redhat.com

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

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

Re: [PATCH] KVM: trace: Fix exit decoding.

2013-01-10 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 01:00:01PM +0100, Cornelia Huck wrote: trace_kvm_userspace_exit has been missing the KVM_EXIT_WATCHDOG exit. CC: Bharat Bhushan r65...@freescale.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- include/trace/events/kvm.h | 2 +- 1 file changed, 1

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

2013-01-10 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 04:23:10PM +0100, Christian Borntraeger wrote: commit b080935c8638e08134629d0a9ebdf35669bec14d kvm: Directly account vtime to system on guest switch also removed the irq_disable/enable around kvm guest switch, which is correct in itself. Unfortunately, there is a

Re: [PATCH v5 5/5] KVM: x86: improve reexecute_instruction

2013-01-10 Thread Marcelo Tosatti
On Fri, Jan 11, 2013 at 02:05:33AM +0800, Xiao Guangrong wrote: On 01/11/2013 01:26 AM, Marcelo Tosatti wrote: On Tue, Jan 08, 2013 at 02:38:36PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry

Re: [PATCH v9 1/3] x86, apicv: add APICv register virtualization support

2013-01-10 Thread Marcelo Tosatti
On Thu, Jan 10, 2013 at 03:26:06PM +0800, Yang Zhang wrote: - APIC read doesn't cause VM-Exit - APIC write becomes trap-like Signed-off-by: Kevin Tian kevin.t...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch/x86/include/asm/vmx.h |2 ++ arch/x86/kvm/lapic.c

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

2013-01-10 Thread Marcelo Tosatti
Hi, Getting into good shape. On Thu, Jan 10, 2013 at 03:26:08PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Marcelo Tosatti
On Wed, Jan 09, 2013 at 10:37:20PM +0100, Alexander Graf wrote: We can start to introduce (and fix ARM) with a generic ioctl in the MPIC patches then. The ioctl is already generic, except for its name. It's making a few wrong assumptions: * maximum size of value is u64

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Marcelo Tosatti
On Wed, Jan 09, 2013 at 03:15:43PM -0600, Scott Wood wrote: On 01/09/2013 02:12:16 PM, Alexander Graf wrote: On 09.01.2013, at 20:50, Scott Wood wrote: On 01/09/2013 10:48:47 AM, Alexander Graf wrote: On 09.01.2013, at 17:26, Christoffer Dall wrote: Renames the KVM_SET_DEVICE_ADDRESS

Re: [kvmarm] [PATCH v5.1 0/2] KVM: ARM: Rename KVM_SET_DEVICE_ADDRESS

2013-01-10 Thread Marcelo Tosatti
On Thu, Jan 10, 2013 at 04:40:12PM -0600, Scott Wood wrote: On 01/10/2013 04:28:01 PM, Marcelo Tosatti wrote: On Wed, Jan 09, 2013 at 10:37:20PM +0100, Alexander Graf wrote: We can start to introduce (and fix ARM) with a generic ioctl in the MPIC patches then. The ioctl

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

2013-01-09 Thread Marcelo Tosatti
On Wed, Jan 09, 2013 at 08:07:31AM +, Zhang, Yang Z wrote: if(check_request(KVM_REQ_, )) { ioapic_lock(); (*) update local EOI exit bitmap from IOAPIC In my patch, it traverses IOAPIC entry once and only updates target vcpus's eoi exit bitmap.

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

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

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

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

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

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

[GIT PULL] KVM fixes for 3.8-rc2

2013-01-08 Thread Marcelo Tosatti
Bhushan (1): powerpc: Corrected include header path in kvm_para.h Gleb Natapov (1): Merge branch 'kvm-ppc-3.8' of https://github.com/agraf/linux-2.6 into master Li Zhong (1): Add rcu user eqs exception hooks for async page fault Marcelo Tosatti (1): KVM: x86: use dynamic

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

2013-01-07 Thread Marcelo Tosatti
On Mon, Jan 07, 2013 at 10:02:36AM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into existing interrupr injection

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

2013-01-07 Thread Marcelo Tosatti
On Tue, Dec 18, 2012 at 04:26:47PM +0900, Takuya Yoshikawa wrote: This is needed to make kvm_mmu_slot_remove_write_access() rmap based: otherwise we may end up using invalid rmap's. Signed-off-by: Takuya Yoshikawa yoshikawa_takuya...@lab.ntt.co.jp Why? memslot-arch.rmap[] has been properly

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

2013-01-07 Thread Marcelo Tosatti
On Tue, Dec 18, 2012 at 04:25:58PM +0900, Takuya Yoshikawa wrote: This patch set makes kvm_mmu_slot_remove_write_access() rmap based and adds conditional rescheduling to it. The motivation for this change is of course to reduce the mmu_lock hold time when we start dirty logging for a large

Re: [PATCH v4 5/5] KVM: x86: improve reexecute_instruction

2013-01-07 Thread Marcelo Tosatti
On Sat, Jan 05, 2013 at 04:16:37PM +0800, Xiao Guangrong wrote: On 01/05/2013 06:44 AM, Marcelo Tosatti wrote: index b0a3678..44c6992 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4756,15 +4756,8 @@ static int handle_emulation_failure(struct kvm_vcpu *vcpu) static

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

2013-01-07 Thread Marcelo Tosatti
CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. Using values other than those can cause failures on operations that check CPL. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 55dfc37..dd2a85c 100644

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

2013-01-07 Thread Marcelo Tosatti
On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: ioapic_write (or any other ioapic update) lock() perform update make_all_vcpus_request(KVM_REQ_UPDATE_EOI_BITMAP) (*) unlock() (*) Similarly to TLB flush. The advantage is that all work becomes vcpu local. The end

Re: [PATCH] KVM: mmu: remove unused trace event

2013-01-07 Thread Marcelo Tosatti
On Tue, Dec 25, 2012 at 02:34:06PM +0200, Gleb Natapov wrote: trace_kvm_mmu_delay_free_pages() is no longer used. Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/arch/x86/kvm/mmutrace.h b/arch/x86/kvm/mmutrace.h Applied, thanks. -- To unsubscribe from this list: send the line

Re: [PATCH v5 0/7] s390: Host support for channel I/O.

2013-01-07 Thread Marcelo Tosatti
On Thu, Dec 20, 2012 at 03:32:05PM +0100, Cornelia Huck wrote: Hi, here's the next iteration of the host patches to support channel I/O against kvm/next. Changes from v4 are on the style side; mainly using defines instead of magic numbers and using helper functions for decoding

Re: [PATCH] KVM: MMU: simplify folding of dirty bit into accessed_dirty

2013-01-07 Thread Marcelo Tosatti
On Thu, Dec 27, 2012 at 02:44:58PM +0200, Gleb Natapov wrote: MMU code tries to avoid if()s HW is not able to predict reliably by using bitwise operation to streamline code execution, but in case of a dirty bit folding this gives us nothing since write_fault is checked right before the folding

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

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

Re: [RESEND PATCH] pci-assign: Enable MSIX on device to match guest

2013-01-07 Thread Marcelo Tosatti
On Mon, Jan 07, 2013 at 06:01:19PM +0200, Michael S. Tsirkin wrote: On Sun, Jan 06, 2013 at 09:30:31PM -0700, Alex Williamson wrote: When a guest enables MSIX on a device we evaluate the MSIX vector table, typically find no unmasked vectors and don't switch the device to MSIX mode. This

Re: [PATCH v4 3/5] KVM: x86: clean up reexecute_instruction

2013-01-04 Thread Marcelo Tosatti
On Fri, Jan 04, 2013 at 09:55:40PM +0800, Xiao Guangrong wrote: Little cleanup for reexecute_instruction, also use gpa_to_gfn in retry_instruction Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/x86.c | 13 ++--- 1 files changed, 6 insertions(+),

Re: [PATCH v4 5/5] KVM: x86: improve reexecute_instruction

2013-01-04 Thread Marcelo Tosatti
On Fri, Jan 04, 2013 at 09:56:59PM +0800, Xiao Guangrong wrote: The current reexecute_instruction can not well detect the failed instruction emulation. It allows guest to retry all the instructions except it accesses on error pfn For example, some cases are nested-write-protect - if the page

Re: [PATCHv2 0/6] more VMX real mode emulation fixes

2013-01-03 Thread Marcelo Tosatti
On Thu, Dec 20, 2012 at 04:57:41PM +0200, Gleb Natapov wrote: This series goes on top of my previous one: Fix emulate_invalid_guest_state=0 part 2. It does not only fixes bugs, but also does a nice cleanup of VMX real mode emulation. All real mode segment register mangling is now contained in

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

2013-01-03 Thread Marcelo Tosatti
CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. Using values other than those can cause failures on operations that check CPL. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 55dfc37..849f5f2 100644

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

2013-01-03 Thread Marcelo Tosatti
On Thu, Jan 03, 2013 at 10:11:53AM +0200, Gleb Natapov wrote: FreeBSD 9.1 with -smp 2. I cannot reproduce. I do see boot failure on the next branch with 9.[01] 64 bit -smp 2 here, but it is caused but segment registers been all incorrect on a secondary vcpu and this patch does not help.

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

2013-01-03 Thread Marcelo Tosatti
Andy, Mike, can you confirm whether this fixes the percpu allocation failures when loading kvm.ko? TIA Use dynamic percpu allocations for the shared msrs structure, to avoid using the limited reserved percpu space. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86

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

2013-01-03 Thread Marcelo Tosatti
On Thu, Jan 03, 2013 at 09:39:14PM +0200, Avi Kivity wrote: Avi Kivity (7): KVM: x86 emulator: framework for streamlining arithmetic opcodes KVM: x86 emulator: Support for declaring single operand fastops KVM: x86 emulator: introduce NoWrite flag KVM: x86 emulator: mark CMP,

Re: Guest performance is reduced after live migration

2013-01-02 Thread Marcelo Tosatti
Can you describe more details of the test you are performing? If transparent hugepages are being used then there is the possibility that there has been no time for khugepaged to back guest memory with huge pages, in the destination (don't recall the interface for retrieving number of hugepages

Re: [PATCH][TRIVIAL] kvm_para: fix typo in hypercall comments

2013-01-02 Thread Marcelo Tosatti
On Mon, Dec 10, 2012 at 03:31:51PM -0600, Jesse Larrew wrote: Correct a typo in the comment explaining hypercalls. Signed-off-by: Jesse Larrew jlar...@linux.vnet.ibm.com --- arch/x86/include/asm/kvm_para.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. -- To

Re: Guest performance is reduced after live migration

2013-01-02 Thread Marcelo Tosatti
On Wed, Jan 02, 2013 at 11:56:11PM +, Mark Petersen wrote: I don't think it's related to huge pages... I was using phoronix-test-suite to run benchmarks. The 'batch/compilation' group shows the slowdown for all tests, the 'batch/computation' show some performance degradation, but not

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

2013-01-01 Thread Marcelo Tosatti
On Sat, Dec 22, 2012 at 02:31:10PM +0200, Avi Kivity wrote: On Wed, Dec 19, 2012 at 3:29 PM, Marcelo Tosatti mtosa...@redhat.comwrote: CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. Using values other than those can cause failures on operations that check

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

2013-01-01 Thread Marcelo Tosatti
On Wed, Dec 26, 2012 at 03:33:16PM +0200, Gleb Natapov wrote: On Wed, Dec 26, 2012 at 11:25:24AM -0200, Marcelo Tosatti wrote: On Wed, Dec 26, 2012 at 07:25:49AM +0200, Gleb Natapov wrote: On Tue, Dec 25, 2012 at 07:37:10PM -0200, Marcelo Tosatti wrote: On Tue, Dec 25, 2012 at 02:48:08PM

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

2013-01-01 Thread Marcelo Tosatti
On Thu, Dec 27, 2012 at 06:25:25AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2012-12-27: On Thu, Dec 27, 2012 at 02:24:04AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2012-12-21: On Fri, Dec 21, 2012 at 09:39:20AM -0200, Marcelo Tosatti wrote: On Fri, Dec 21, 2012 at 09:51

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

2012-12-26 Thread Marcelo Tosatti
On Wed, Dec 26, 2012 at 07:25:49AM +0200, Gleb Natapov wrote: On Tue, Dec 25, 2012 at 07:37:10PM -0200, Marcelo Tosatti wrote: On Tue, Dec 25, 2012 at 02:48:08PM +0200, Gleb Natapov wrote: On Sat, Dec 22, 2012 at 02:31:10PM +0200, Avi Kivity wrote: On Wed, Dec 19, 2012 at 3:29 PM

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

2012-12-25 Thread Marcelo Tosatti
On Tue, Dec 25, 2012 at 02:48:08PM +0200, Gleb Natapov wrote: On Sat, Dec 22, 2012 at 02:31:10PM +0200, Avi Kivity wrote: On Wed, Dec 19, 2012 at 3:29 PM, Marcelo Tosatti mtosa...@redhat.comwrote: CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. Using

Re: [Qemu-devel] [PATCH v12 0/8] pv event to notify host when the guest is panicked

2012-12-25 Thread Marcelo Tosatti
On Thu, Dec 20, 2012 at 03:53:59PM +0800, Hu Tao wrote: Hi, Any comments? As far as i can see, items 2 and 3 of https://lkml.org/lkml/2012/11/12/588 Have not been addressed. https://lkml.org/lkml/2012/11/20/653 contains discussions on those items. 2) Format of the interface for other

Re: [Qemu-devel] [PATCH v12 0/8] pv event to notify host when the guest is panicked

2012-12-25 Thread Marcelo Tosatti
On Thu, Dec 20, 2012 at 03:53:59PM +0800, Hu Tao wrote: Hi, Any comments? Did you verify possibilities listed at https://lkml.org/lkml/2012/11/20/653 ? If so, a summary in the patchset would be helpful. On Wed, Dec 12, 2012 at 02:13:43PM +0800, Hu Tao wrote: This series implements a new

Re: [PATCH 2/7] KVM: VMX: relax check for CS register in rmode_segment_valid()

2012-12-22 Thread Marcelo Tosatti
On Sat, Dec 22, 2012 at 09:02:41AM +0200, Gleb Natapov wrote: On Fri, Dec 21, 2012 at 09:17:16PM -0200, Marcelo Tosatti wrote: On Wed, Dec 12, 2012 at 07:10:50PM +0200, Gleb Natapov wrote: rmode_segment_valid() checks if segment descriptor can be used to enter vm86 mode. VMX spec mandates

Re: [PATCH 2/7] KVM: VMX: relax check for CS register in rmode_segment_valid()

2012-12-22 Thread Marcelo Tosatti
On Sat, Dec 22, 2012 at 12:55:43PM -0200, Marcelo Tosatti wrote: On Sat, Dec 22, 2012 at 09:02:41AM +0200, Gleb Natapov wrote: On Fri, Dec 21, 2012 at 09:17:16PM -0200, Marcelo Tosatti wrote: On Wed, Dec 12, 2012 at 07:10:50PM +0200, Gleb Natapov wrote: rmode_segment_valid() checks

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

2012-12-21 Thread Marcelo Tosatti
On Fri, Dec 21, 2012 at 09:51:40AM +0200, Gleb Natapov wrote: On Thu, Dec 20, 2012 at 08:59:11PM -0200, Marcelo Tosatti wrote: On Mon, Dec 17, 2012 at 01:30:49PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC

Re: [PATCH 2/7] KVM: VMX: relax check for CS register in rmode_segment_valid()

2012-12-21 Thread Marcelo Tosatti
On Wed, Dec 12, 2012 at 07:10:50PM +0200, Gleb Natapov wrote: rmode_segment_valid() checks if segment descriptor can be used to enter vm86 mode. VMX spec mandates that in vm86 mode CS register will be of type data, not code. Lets allow guest entry with vm86 mode if the only problem with CS

Re: [PATCH 0/7] Fix emulate_invalid_guest_state=0 part 2

2012-12-21 Thread Marcelo Tosatti
for instructions kvm does not know how to emulate. Patch 2 of the series should fix that. Patch 3 is exactly same as 4/4 from previous series. Other patches are clean-ups. Can't see how guest_state_valid() can affect emulate_invalid_guest_state=0. For the cleanups, Reviewed-by: Marcelo Tosatti mtosa

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

2012-12-20 Thread Marcelo Tosatti
On Thu, Dec 20, 2012 at 08:42:06AM +0200, Gleb Natapov wrote: On Wed, Dec 19, 2012 at 10:59:36PM -0200, Marcelo Tosatti wrote: On Mon, Dec 17, 2012 at 01:30:49PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC

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

2012-12-20 Thread Marcelo Tosatti
On Thu, Dec 20, 2012 at 08:51:32AM +0200, Gleb Natapov wrote: On Wed, Dec 19, 2012 at 11:26:30PM -0200, Marcelo Tosatti wrote: On Mon, Dec 17, 2012 at 01:30:49PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC

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

2012-12-20 Thread Marcelo Tosatti
On Thu, Dec 20, 2012 at 11:01:42AM -0200, Marcelo Tosatti wrote: On Thu, Dec 20, 2012 at 08:51:32AM +0200, Gleb Natapov wrote: On Wed, Dec 19, 2012 at 11:26:30PM -0200, Marcelo Tosatti wrote: On Mon, Dec 17, 2012 at 01:30:49PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh

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

2012-12-20 Thread Marcelo Tosatti
On Thu, Dec 20, 2012 at 02:02:32PM +0900, Takuya Yoshikawa wrote: On Wed, 19 Dec 2012 08:42:57 -0700 Alex Williamson alex.william...@redhat.com wrote: Please let me know if you can identify one of these as the culprit. They're all very simple, but there's always a chance I've missed a hard

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

2012-12-20 Thread Marcelo Tosatti
On Mon, Dec 17, 2012 at 01:30:49PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into existing interrupr injection

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

2012-12-20 Thread Marcelo Tosatti
On Mon, Dec 17, 2012 at 01:30:49PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into existing interrupr injection

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

2012-12-20 Thread Marcelo Tosatti
On Thu, Dec 20, 2012 at 03:12:32PM +0200, Gleb Natapov wrote: On Thu, Dec 20, 2012 at 10:53:16AM -0200, Marcelo Tosatti wrote: On Thu, Dec 20, 2012 at 08:42:06AM +0200, Gleb Natapov wrote: On Wed, Dec 19, 2012 at 10:59:36PM -0200, Marcelo Tosatti wrote: On Mon, Dec 17, 2012 at 01:30:49PM

KVM: VMX: fix incorrect cached cpl value with real/v8086 modes

2012-12-19 Thread Marcelo Tosatti
CPL is always 0 when in real mode, and always 3 when virtual 8086 mode. Using values other than those can cause failures on operations that check CPL. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a4ecf7c..3abe433 100644

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

2012-12-19 Thread Marcelo Tosatti
On Mon, Dec 17, 2012 at 01:30:49PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into existing interrupr injection

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

2012-12-19 Thread Marcelo Tosatti
On Mon, Dec 17, 2012 at 01:30:49PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Virtual interrupt delivery avoids KVM to inject vAPIC interrupts manually, which is fully taken care of by the hardware. This needs some special awareness into existing interrupr injection

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