Re: [PATCH 0/4] Alter steal-time reporting in the guest

2013-03-06 Thread Marcelo Tosatti
On Wed, Mar 06, 2013 at 10:29:12AM -0600, Michael Wolf wrote: On Wed, 2013-03-06 at 12:13 +0400, Glauber Costa wrote: On 03/06/2013 05:41 AM, Marcelo Tosatti wrote: On Tue, Mar 05, 2013 at 02:22:08PM -0600, Michael Wolf wrote: Sorry for the delay in the response. I did not see the email

Re: [PATCH 0/4] Alter steal-time reporting in the guest

2013-03-06 Thread Marcelo Tosatti
On Wed, Mar 06, 2013 at 10:27:13AM -0600, Michael Wolf wrote: On Tue, 2013-03-05 at 22:41 -0300, Marcelo Tosatti wrote: On Tue, Mar 05, 2013 at 02:22:08PM -0600, Michael Wolf wrote: Sorry for the delay in the response. I did not see the email right away. On Mon, 2013-02-18 at 22

Re: [PATCH v2] KVM: x86: Convert INIT and SIPI signals into synchronously handled requests

2013-03-05 Thread Marcelo Tosatti
On Mon, Mar 04, 2013 at 10:41:43PM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com A VCPU sending INIT or SIPI to some other VCPU races for setting the remote VCPU's mp_state. When we were unlucky, KVM_MP_STATE_INIT_RECEIVED was overwritten by kvm_emulate_halt and, thus, got

Re: [PATCH v5 0/6] kvm: Make ioeventfd usable on s390.

2013-03-05 Thread Marcelo Tosatti
On Thu, Feb 28, 2013 at 12:33:15PM +0100, Cornelia Huck wrote: v5 of the ioeventfd patch set, this time with a proper return code from __diag_virtio_hypercall(), otherwise unchanged. v4 - v5: - Proper return code in __diag_virtio_hypercall() v3 - v4: - Pass cookies in virtio-ccw notify

Re: [PATCH v2] KVM: x86: Convert INIT and SIPI signals into synchronously handled requests

2013-03-05 Thread Marcelo Tosatti
On Tue, Mar 05, 2013 at 08:16:41PM -0300, Marcelo Tosatti wrote: On Mon, Mar 04, 2013 at 10:41:43PM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com A VCPU sending INIT or SIPI to some other VCPU races for setting the remote VCPU's mp_state. When we were unlucky

Re: [PATCH v2] KVM: x86: Convert INIT and SIPI signals into synchronously handled requests

2013-03-05 Thread Marcelo Tosatti
On Tue, Mar 05, 2013 at 08:16:41PM -0300, Marcelo Tosatti wrote: On Mon, Mar 04, 2013 at 10:41:43PM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com A VCPU sending INIT or SIPI to some other VCPU races for setting the remote VCPU's mp_state. When we were unlucky

Re: [PATCH v2] KVM: nVMX: Reset RFLAGS on VM-exit

2013-03-05 Thread Marcelo Tosatti
On Mon, Mar 04, 2013 at 11:00:38AM +0200, Gleb Natapov wrote: On Sun, Mar 03, 2013 at 08:47:11PM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com Ouch, how could this work so well that far? We need to clear RFLAGS to the reset value as specified by the SDM. Particularly,

Re: [PATCH] s3: wake up on RTC event

2013-03-05 Thread Marcelo Tosatti
On Tue, Mar 05, 2013 at 10:16:18AM +0100, Paolo Bonzini wrote: The S3 test requires user interaction to terminate. Set up the RTC alarm instead, so that the test will end after one second. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- x86/s3.c | 36

Re: [PATCH v2] KVM: nVMX: Fix content of MSR_IA32_VMX_ENTRY/EXIT_CTLS

2013-03-05 Thread Marcelo Tosatti
On Mon, Mar 04, 2013 at 05:15:48PM +0100, Jan Kiszka wrote: Properly set those bits to 1 that the spec demands in case bit 55 of VMX_BASIC is 0 - like in our case. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Changes in v2: - use symbolic constants arch/x86/include/asm/vmx.h

Re: [PATCH 4/4] Add a timer to allow the separation of consigned from steal time.

2013-03-05 Thread Marcelo Tosatti
On Tue, Mar 05, 2013 at 02:17:57PM -0600, Michael Wolf wrote: Sorry for the delay in the response. I did not see your question. On Mon, 2013-02-18 at 20:57 -0300, Marcelo Tosatti wrote: On Tue, Feb 05, 2013 at 03:49:41PM -0600, Michael Wolf wrote: Add a helper routine to scheduler/core.c

Re: [PATCH 0/4] Alter steal-time reporting in the guest

2013-03-05 Thread Marcelo Tosatti
On Tue, Mar 05, 2013 at 02:22:08PM -0600, Michael Wolf wrote: Sorry for the delay in the response. I did not see the email right away. On Mon, 2013-02-18 at 22:11 -0300, Marcelo Tosatti wrote: On Mon, Feb 18, 2013 at 05:43:47PM +0100, Frederic Weisbecker wrote: 2013/2/5 Michael Wolf m

Re: virtio PCI on KVM without IO BARs

2013-03-04 Thread Marcelo Tosatti
On Thu, Feb 28, 2013 at 05:24:33PM +0200, Michael S. Tsirkin wrote: OK we talked about this a while ago, here's a summary and some proposals: At the moment, virtio PCI uses IO BARs for all accesses. The reason for IO use is the cost of different VM exit types of transactions and their

Re: [PATCH v5 6/6] KVM: s390: Wire up ioeventfd.

2013-03-04 Thread Marcelo Tosatti
On Thu, Feb 28, 2013 at 12:33:21PM +0100, Cornelia Huck wrote: Enable ioeventfd support on s390 and hook up diagnose 500 virtio-ccw notifications. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- arch/s390/kvm/Kconfig| 1 + arch/s390/kvm/Makefile | 2 +-

Re: [PATCH v12 rebased 2/8] start vm after resetting it

2013-03-01 Thread Marcelo Tosatti
On Wed, Feb 20, 2013 at 04:13:49PM +0800, Hu Tao wrote: On Thu, Feb 07, 2013 at 11:50:28PM -0200, Marcelo Tosatti wrote: On Wed, Jan 23, 2013 at 03:19:23PM +0800, Hu Tao wrote: From: Wen Congyang we...@cn.fujitsu.com The guest should run after resetting it, but it does not run if its

Re: [PATCH v12 rebased] kvm: notify host when the guest is panicked

2013-03-01 Thread Marcelo Tosatti
On Thu, Feb 28, 2013 at 04:54:25PM +0800, Hu Tao wrote: diff --git a/arch/x86/include/uapi/asm/kvm_para.h b/arch/x86/include/uapi/asm/kvm_para.h index 06fdbd9..c15ef33 100644 --- a/arch/x86/include/uapi/asm/kvm_para.h +++ b/arch/x86/include/uapi/asm/kvm_para.h @@ -96,5 +96,7 @@

Re: KVM guest OS reports zero CPU frequency via /proc/cpuinfo

2013-03-01 Thread Marcelo Tosatti
https://lists.gnu.org/archive/html/qemu-devel/2012-10/msg02269.html On Wed, Feb 20, 2013 at 01:25:04AM +0400, Dmitry Krivenok wrote: Hello, I encountered an odd issue with running VMWare .vmdk image inside KVM. I run KVM as follows qemu-kvm -hda ./guest.vmdk -m 4096 and guest OS

Re: [Bisected][-next-20130204+] [x86/kvm] udevd:[97]: segfault at ffffffffff5fd020 ip 00007fff069e277f sp 00007fff068c9ef8 error d

2013-02-27 Thread Marcelo Tosatti
On Sun, Feb 24, 2013 at 04:23:44PM -0500, Peter Hurley wrote: On Tue, 2013-02-19 at 10:26 +0200, Gleb Natapov wrote: On Mon, Feb 18, 2013 at 08:12:21PM -0500, Peter Hurley wrote: On Mon, 2013-02-18 at 19:59 -0300, Marcelo Tosatti wrote: On Wed, Feb 13, 2013 at 06:57:09AM -0500, Peter

Re: [PATCH 0/6] KVM: Clean up and optimize set_memory_region() - part2

2013-02-27 Thread Marcelo Tosatti
deletions(-) -- 1.7.4.1 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: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-25 Thread Marcelo Tosatti
On Mon, Feb 25, 2013 at 11:13:25AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-02-25: On Mon, Feb 25, 2013 at 11:04:25AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-02-25: On Mon, Feb 25, 2013 at 08:42:52AM +, Zhang, Yang Z wrote: Avi Kivity wrote on 2013-02-25:

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-25 Thread Marcelo Tosatti
On Mon, Feb 25, 2013 at 06:55:58AM +, Zhang, Yang Z wrote: p1) cpu0 cpu1vcpu0 test_and_set_bit(PIR-A) set KVM_REQ_EVENT process REQ_EVENT

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-25 Thread Marcelo Tosatti
On Mon, Feb 25, 2013 at 03:34:19PM +0200, Gleb Natapov wrote: On Mon, Feb 25, 2013 at 11:13:25AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-02-25: On Mon, Feb 25, 2013 at 11:04:25AM +, Zhang, Yang Z wrote: Gleb Natapov wrote on 2013-02-25: On Mon, Feb 25, 2013 at

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-25 Thread Marcelo Tosatti
On Mon, Feb 25, 2013 at 11:00:21AM -0300, Marcelo Tosatti wrote: I see a couple of possible solutions: 1. Do what Avi said. Make KVM_IRQ_LINE_STATUS be synchronous. Cons: current QEMU uses KVM_IRQ_LINE_STATUS always and it means that it will be slow on newer kernels Can add a capability

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-25 Thread Marcelo Tosatti
On Mon, Feb 25, 2013 at 07:40:07PM +0200, Gleb Natapov wrote: On Mon, Feb 25, 2013 at 11:17:39AM -0300, Marcelo Tosatti wrote: On Mon, Feb 25, 2013 at 11:00:21AM -0300, Marcelo Tosatti wrote: I see a couple of possible solutions: 1. Do what Avi said. Make KVM_IRQ_LINE_STATUS

Re: [PATCH] x86: kvmclock: Do not setup kvmclock vsyscall in the absence of that clock

2013-02-25 Thread Marcelo Tosatti
pvclock_vcpu_time_info *vcpu_time; unsigned int size; + if (!hv_clock) + return 0; + size = PAGE_ALIGN(sizeof(struct pvclock_vsyscall_time_info)*NR_CPUS); preempt_disable(); -- 1.7.3.4 Reviewed-by: Marcelo Tosatti mtosa...@redhat.com -- To unsubscribe

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-24 Thread Marcelo Tosatti
On Sun, Feb 24, 2013 at 01:17:59PM +, Zhang, Yang Z wrote: Marcelo Tosatti wrote on 2013-02-24: On Sat, Feb 23, 2013 at 03:16:11PM +, Zhang, Yang Z wrote: Marcelo Tosatti wrote on 2013-02-23: On Sat, Feb 23, 2013 at 02:05:28PM +, Zhang, Yang Z wrote: Marcelo Tosatti wrote

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-24 Thread Marcelo Tosatti
On Sun, Feb 24, 2013 at 01:55:07PM +, Zhang, Yang Z wrote: contexts, but only two use locks. See following logic, I think the problem you mentioned will not happened with current logic. get lock if test_pir (this will ensure there is no in flight IPI for same interrupt. Since we are

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-24 Thread Marcelo Tosatti
On Sun, Feb 24, 2013 at 04:19:17PM +0200, Gleb Natapov wrote: On Sun, Feb 24, 2013 at 01:55:07PM +, Zhang, Yang Z wrote: I do not think it fixes it. There is no guaranty that IPI will be processed by remote cpu while sending cpu is still in locked section, so the same race may happen

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-23 Thread Marcelo Tosatti
On Fri, Feb 22, 2013 at 09:42:32PM +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 v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-23 Thread Marcelo Tosatti
On Sat, Feb 23, 2013 at 02:05:28PM +, Zhang, Yang Z wrote: Marcelo Tosatti wrote on 2013-02-23: On Fri, Feb 22, 2013 at 09:42:32PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Posted Interrupt allows APIC interrupts to inject into guest directly without any

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-23 Thread Marcelo Tosatti
On Sat, Feb 23, 2013 at 04:35:30PM +0200, Gleb Natapov wrote: On Sat, Feb 23, 2013 at 02:05:28PM +, Zhang, Yang Z wrote: +return test_bit(vector, (unsigned long *)pi_desc-pir); +} + +static void pi_set_pir(int vector, struct pi_desc *pi_desc) +{ +

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-23 Thread Marcelo Tosatti
On Thu, Feb 21, 2013 at 08:00:25PM -0600, Scott Wood wrote: On 02/21/2013 05:03:32 PM, Marcelo Tosatti wrote: On Wed, Feb 20, 2013 at 07:28:52PM -0600, Scott Wood wrote: On 02/20/2013 06:14:37 PM, Marcelo Tosatti wrote: On Wed, Feb 20, 2013 at 05:53:20PM -0600, Scott Wood wrote

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-23 Thread Marcelo Tosatti
On Sat, Feb 23, 2013 at 05:31:44PM +0200, Gleb Natapov wrote: On Sat, Feb 23, 2013 at 11:48:54AM -0300, Marcelo Tosatti wrote: 1. orig_irr = read irr from vapic page 2. if (orig_irr != 0) 3.return false; 4. kvm_make_request(KVM_REQ_EVENT) 5. bool injected

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-23 Thread Marcelo Tosatti
On Sat, Feb 23, 2013 at 03:16:11PM +, Zhang, Yang Z wrote: Marcelo Tosatti wrote on 2013-02-23: On Sat, Feb 23, 2013 at 02:05:28PM +, Zhang, Yang Z wrote: Marcelo Tosatti wrote on 2013-02-23: On Fri, Feb 22, 2013 at 09:42:32PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh

Re: [PATCH v4 2/2] KVM: VMX: Add Posted Interrupt supporting

2013-02-23 Thread Marcelo Tosatti
On Sat, Feb 23, 2013 at 09:42:14PM +0200, Gleb Natapov wrote: explanation why its believed to be benign (given how the injection return value is interpreted) could also work. Its ugly, though... murphy is around. The race above is not benign. It will report interrupt as coalesced while in

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-23 Thread Marcelo Tosatti
On Thu, Feb 21, 2013 at 08:00:25PM -0600, Scott Wood wrote: On 02/21/2013 05:03:32 PM, Marcelo Tosatti wrote: On Wed, Feb 20, 2013 at 07:28:52PM -0600, Scott Wood wrote: On 02/20/2013 06:14:37 PM, Marcelo Tosatti wrote: On Wed, Feb 20, 2013 at 05:53:20PM -0600, Scott Wood wrote

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-21 Thread Marcelo Tosatti
On Wed, Feb 20, 2013 at 07:28:52PM -0600, Scott Wood wrote: On 02/20/2013 06:14:37 PM, Marcelo Tosatti wrote: On Wed, Feb 20, 2013 at 05:53:20PM -0600, Scott Wood wrote: It is then not necessary to set device attributes on a live guest and deal with the complications associated

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-21 Thread Marcelo Tosatti
On Wed, Feb 20, 2013 at 07:28:52PM -0600, Scott Wood wrote: On 02/20/2013 06:14:37 PM, Marcelo Tosatti wrote: On Wed, Feb 20, 2013 at 05:53:20PM -0600, Scott Wood wrote: It is then not necessary to set device attributes on a live guest and deal with the complications associated

Re: [PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller

2013-02-20 Thread Marcelo Tosatti
On Sat, Feb 16, 2013 at 01:56:14PM +1100, Paul Mackerras wrote: On Fri, Feb 15, 2013 at 05:59:11PM -0600, Scott Wood wrote: On 02/15/2013 05:18:31 PM, Paul Mackerras wrote: On Fri, Feb 15, 2013 at 02:05:41PM -0600, Scott Wood wrote: On 02/14/2013 06:01:08 PM, Paul Mackerras wrote: From:

Re: [PATCH v2][QEMU] vmxcap: Report APIC register emulation and RDTSCP control

2013-02-20 Thread Marcelo Tosatti
On Mon, Feb 18, 2013 at 07:56:54AM +0100, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- This time I've checked twice that I'm no longer missing a field. Applied, thanks. -- To unsubscribe from this list: send the line

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-20 Thread Marcelo Tosatti
On Mon, Feb 18, 2013 at 05:01:40PM -0600, Scott Wood wrote: On 02/18/2013 06:21:59 AM, Gleb Natapov wrote: Copying Christoffer since ARM has in kernel irq chip too. On Wed, Feb 13, 2013 at 11:49:15PM -0600, Scott Wood wrote: Currently, devices that are emulated inside KVM are configured in

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-20 Thread Marcelo Tosatti
On Wed, Feb 20, 2013 at 03:09:49PM +0200, Gleb Natapov wrote: On Tue, Feb 19, 2013 at 03:16:37PM -0600, Scott Wood wrote: On 02/19/2013 06:24:18 AM, Gleb Natapov wrote: On Mon, Feb 18, 2013 at 05:01:40PM -0600, Scott Wood wrote: The ability to set/get attributes is needed. Sorry, but get

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-20 Thread Marcelo Tosatti
On Wed, Feb 20, 2013 at 06:28:24PM -0300, Marcelo Tosatti wrote: On Wed, Feb 20, 2013 at 03:09:49PM +0200, Gleb Natapov wrote: On Tue, Feb 19, 2013 at 03:16:37PM -0600, Scott Wood wrote: On 02/19/2013 06:24:18 AM, Gleb Natapov wrote: On Mon, Feb 18, 2013 at 05:01:40PM -0600, Scott Wood

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-20 Thread Marcelo Tosatti
On Wed, Feb 20, 2013 at 05:20:50PM -0600, Scott Wood wrote: On 02/20/2013 03:17:27 PM, Marcelo Tosatti wrote: On Mon, Feb 18, 2013 at 05:01:40PM -0600, Scott Wood wrote: On 02/18/2013 06:21:59 AM, Gleb Natapov wrote: Copying Christoffer since ARM has in kernel irq chip too. On Wed, Feb

[GIT PULL] KVM updates for the 3.9 merge window

2013-02-20 Thread Marcelo Tosatti
nested_vmx_exit_handled_msr Jesse Larrew (1): x86: kvm_para: fix typo in hypercall comments Marcelo Tosatti (3): KVM: VMX: fix incorrect cached cpl value with real/v8086 modes x86: pvclock kvm: align allocation size to page size Revert KVM: MMU: lazily drop large spte Mihai Caraman (2

Re: [PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller

2013-02-20 Thread Marcelo Tosatti
On Wed, Feb 20, 2013 at 06:20:51PM -0600, Scott Wood wrote: On 02/20/2013 01:58:54 PM, Marcelo Tosatti wrote: This is probably a stupid question, but why the KVM_SET_IRQCHIP/KVM_SET_GSI_ROUTING interface is not appropriate for your purposes? x86 sets up a default GSI-IRQCHIP PIN mapping

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-20 Thread Marcelo Tosatti
On Wed, Feb 20, 2013 at 05:53:20PM -0600, Scott Wood wrote: Why exactly you need to set attributes Scott? That's best answered by looking at patch 6/6 and discussing the actual attributes that are defined so far. The need to set the base address of the registers is straightforward. When

Re: [PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller

2013-02-20 Thread Marcelo Tosatti
On Wed, Feb 20, 2013 at 06:20:51PM -0600, Scott Wood wrote: On 02/20/2013 01:58:54 PM, Marcelo Tosatti wrote: This is probably a stupid question, but why the KVM_SET_IRQCHIP/KVM_SET_GSI_ROUTING interface is not appropriate for your purposes? x86 sets up a default GSI-IRQCHIP PIN mapping

Re: [RFC PATCH 1/6] kvm: add device control API

2013-02-20 Thread Marcelo Tosatti
On Wed, Feb 20, 2013 at 05:53:20PM -0600, Scott Wood wrote: Why exactly you need to set attributes Scott? That's best answered by looking at patch 6/6 and discussing the actual attributes that are defined so far. The need to set the base address of the registers is straightforward. When

[uq/master PATCH] target-i386: kvm: save/restore steal time MSR

2013-02-19 Thread Marcelo Tosatti
Read and write steal time MSR, so that reporting is functional across migration. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 7577e4f..17c7293 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -792,6 +792,7 @@ typedef struct

Re: [PATCH 4/4] Add a timer to allow the separation of consigned from steal time.

2013-02-18 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 03:49:41PM -0600, Michael Wolf wrote: Add a helper routine to scheduler/core.c to allow the kvm module to retrieve the cpu hardlimit settings. The values will be used to set up a timer that is used to separate the consigned from the steal time. 1) Can you please

Re: [Bisected][-next-20130204+] [x86/kvm] udevd:[97]: segfault at ffffffffff5fd020 ip 00007fff069e277f sp 00007fff068c9ef8 error d

2013-02-18 Thread Marcelo Tosatti
On Wed, Feb 13, 2013 at 06:57:09AM -0500, Peter Hurley wrote: On Wed, 2013-02-13 at 12:51 +0200, Gleb Natapov wrote: On Tue, Feb 12, 2013 at 04:39:03PM -0800, H. Peter Anvin wrote: On 02/12/2013 04:26 PM, Peter Hurley wrote: With -next-20130204+ in ubuntu 12.10 VM (so the 80x25 VGA

Re: [PULL 00/14] ppc patch queue 2013-02-15

2013-02-18 Thread Marcelo Tosatti
Pulled, thanks. On Fri, Feb 15, 2013 at 01:16:16AM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Highlights of this queue drop are: - BookE: Fast mapping support for 4k backed memory - BookE: Handle alignment interrupts

Re: [PATCH 0/4] Alter steal-time reporting in the guest

2013-02-18 Thread Marcelo Tosatti
On Mon, Feb 18, 2013 at 05:43:47PM +0100, Frederic Weisbecker wrote: 2013/2/5 Michael Wolf m...@linux.vnet.ibm.com: In the case of where you have a system that is running in a capped or overcommitted environment the user may see steal time being reported in accounting tools such as top or

x86: pvclock kvm: align allocation size to page size

2013-02-18 Thread Marcelo Tosatti
To match whats mapped via vsyscalls to userspace. Reported-by: Peter Hurley pe...@hurleysoftware.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index 220a360..5bedbdd 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch

Re: [PATCH v6] KVM: nVMX: Improve I/O exit handling

2013-02-18 Thread Marcelo Tosatti
On Mon, Feb 18, 2013 at 12:32:37PM +0200, Gleb Natapov wrote: On Mon, Feb 18, 2013 at 11:21:16AM +0100, Jan Kiszka wrote: This prevents trapping L2 I/O exits if L1 has neither unconditional nor bitmap-based exiting enabled. Furthermore, it implements I/O bitmap handling. Signed-off-by:

Re: [PATCH] KVM: nVMX: Trap unconditionally if msr bitmap access fails

2013-02-18 Thread Marcelo Tosatti
On Sun, Feb 17, 2013 at 10:56:36AM +0200, Gleb Natapov wrote: On Thu, Feb 14, 2013 at 07:46:27PM +0100, Jan Kiszka wrote: This avoids basing decisions on uninitialized variables, potentially leaking kernel data to the L1 guest. Signed-off-by: Jan Kiszka jan.kis...@siemens.com

Re: [PULL 00/14] ppc patch queue 2013-02-15

2013-02-18 Thread Marcelo Tosatti
Pulled, thanks. On Fri, Feb 15, 2013 at 01:16:16AM +0100, Alexander Graf wrote: Hi Marcelo / Gleb, This is my current patch queue for ppc. Please pull. Highlights of this queue drop are: - BookE: Fast mapping support for 4k backed memory - BookE: Handle alignment interrupts

Re: KVM: x86: switch unhandled MSR printk's to tracepoints

2013-02-12 Thread Marcelo Tosatti
On Tue, Feb 12, 2013 at 02:33:17PM +0200, Gleb Natapov wrote: On Mon, Feb 11, 2013 at 09:50:09PM -0200, Marcelo Tosatti wrote: Such messages in the system log very often cause confusion because users understand the kvm: unhandled MSR messages as errors. They are errors. Linux compiled

KVM: x86: switch unhandled MSR printk's to tracepoints

2013-02-11 Thread Marcelo Tosatti
Such messages in the system log very often cause confusion because users understand the kvm: unhandled MSR messages as errors. Switch to trace points, making the information available on demand. diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h index fe5e00e..c461368 100644 ---

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

2013-02-08 Thread Marcelo Tosatti
On Fri, Feb 08, 2013 at 02:28:44PM +0200, Gleb Natapov wrote: On Thu, Feb 07, 2013 at 07:49:47PM -0200, Marcelo Tosatti wrote: On Thu, Feb 07, 2013 at 04:01:11PM +0200, Gleb Natapov wrote: On Wed, Feb 06, 2013 at 08:49:23PM -0200, Marcelo Tosatti wrote: Second is that interrupt may

Re: [PATCH v3 5/5] KVM: MMU: fast drop all spte on the pte_list

2013-02-08 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 04:55:37PM +0800, Xiao Guangrong wrote: If a shadow page is being zapped or a host page is going to be freed, kvm will drop all the reverse-mappings on the shadow page or the gfn. Currently, it drops the reverse-mapping one by one - it deletes the first reverse

Re: [PATCH v3 0/3] KVM: MMU: simple cleanups

2013-02-08 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 03:26:21PM +0800, Xiao Guangrong wrote: There are the simple cleanups for MMU, no function / logic changed. Marcelo, Gleb, please apply them after applying [PATCH v3] KVM: MMU: lazily drop large spte Changelog: no change, just split them from the previous patchset

Re: [PATCH v3 1/5] KVM: MMU: introduce mmu_spte_establish

2013-02-08 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 04:53:19PM +0800, Xiao Guangrong wrote: There is little different between walking parent pte and walking ramp: all spte in rmap must be present but this is not true on parent pte list, in kvm_mmu_alloc_page, we always link the parent list before set the spte to present

Re: Q: Why not use struct mm_struct to manage guest physical addresses in new port?

2013-02-08 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 11:02:32AM -0800, David Daney wrote: Hi, I am starting to working on a port of KVM to an architecture that has a dual TLB. The Guest Virtual Addresses (GVA) are translated to Guest Physical Addresses (GPA) by the first TLB, then a second TLB translates the GPA to a

Re: [PATCH] KVM: Remove user_alloc from struct kvm_memory_slot

2013-02-08 Thread Marcelo Tosatti
will be removed later. Signed-off-by: Takuya Yoshikawa yoshikawa_takuya...@lab.ntt.co.jp 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

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

2013-02-07 Thread Marcelo Tosatti
On Thu, Feb 07, 2013 at 04:01:11PM +0200, Gleb Natapov wrote: On Wed, Feb 06, 2013 at 08:49:23PM -0200, Marcelo Tosatti wrote: Second is that interrupt may be reported as delivered, but it will be coalesced (possible only with the self IPI with the same vector): Starting

Re: [PATCH v12 rebased] kvm: notify host when the guest is panicked

2013-02-07 Thread Marcelo Tosatti
Hi, On Wed, Jan 23, 2013 at 03:19:21PM +0800, Hu Tao wrote: We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when the guest is panicked. If

Re: [PATCH v12 rebased 2/8] start vm after resetting it

2013-02-07 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 03:19:23PM +0800, Hu Tao wrote: From: Wen Congyang we...@cn.fujitsu.com The guest should run after resetting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when resetting the guest,

Re: [PATCH v12 rebased 1/8] preserve cpu runstate

2013-02-07 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 03:19:22PM +0800, Hu Tao wrote: This patch enables preservation of cpu runstate during save/load vm. So when a vm is restored from snapshot, the cpu runstate is restored, too. See following example: # save two vms: one is running, the other is paused (qemu) info

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

2013-02-07 Thread Marcelo Tosatti
On Thu, Feb 07, 2013 at 03:52:24PM +0200, Gleb Natapov wrote: Its not a bad idea to have a new KVM_REQ_ bit for PIR processing (just as the current patches do). Without the numbers I do not see why. KVM_REQ_EVENT already means... counting... many things. Its a well defined request, to sync

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

2013-02-06 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 09:32:50AM +0200, Gleb Natapov wrote: On Mon, Feb 04, 2013 at 06:47:30PM -0200, Marcelo Tosatti wrote: On Mon, Feb 04, 2013 at 05:59:52PM -0200, Marcelo Tosatti wrote: On Mon, Feb 04, 2013 at 07:13:01PM +0200, Gleb Natapov wrote: On Mon, Feb 04, 2013 at 12:43:45PM

Re: [PATCH V5] target-i386: Enabling IA32_TSC_ADJUST for QEMU KVM guest VMs

2013-02-06 Thread Marcelo Tosatti
On Wed, Feb 06, 2013 at 10:22:32PM +, Auld, Will wrote: Marcelo, Hi, I have been watching for this patch in the upstream but have not seen it yet. What version of QEMU should it be in? Thanks, Will Will, its in the GIT tree:

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

2013-02-06 Thread Marcelo Tosatti
On Wed, Feb 06, 2013 at 08:49:23PM -0200, Marcelo Tosatti wrote: On Tue, Feb 05, 2013 at 09:32:50AM +0200, Gleb Natapov wrote: On Mon, Feb 04, 2013 at 06:47:30PM -0200, Marcelo Tosatti wrote: On Mon, Feb 04, 2013 at 05:59:52PM -0200, Marcelo Tosatti wrote: On Mon, Feb 04, 2013 at 07:13

Re: [PATCH v3] KVM: MMU: lazily drop large spte

2013-02-06 Thread Marcelo Tosatti
On Tue, Feb 05, 2013 at 03:11:09PM +0800, Xiao Guangrong wrote: Currently, kvm zaps the large spte if write-protected is needed, the later read can fault on that spte. Actually, we can make the large spte readonly instead of making them un-present, the page fault caused by read access can be

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

2013-02-06 Thread Marcelo Tosatti
According the SDM, software should not touch the IRR when target vcpu is running. Instead, use locked way to access PIR. So your solution may wrong. Then your apicv patches are broken, because they do exactly that. Which code is broken? The one that updates IRR directly on the

Re: [PATCH v2] KVM: VMX: disable SMEP feature when guest is in non-paging mode

2013-02-05 Thread Marcelo Tosatti
On Mon, Feb 04, 2013 at 11:50:43AM +0800, Dongxiao Xu wrote: Changes from v1 to v2: - Modify commit message and comments according to Gleb's suggestions. SMEP is disabled if CPU is in non-paging mode in hardware. However KVM always uses paging mode to emulate guest non-paging mode with

Re: [PATCH] KVM: VMX: add missing exit names to VMX_EXIT_REASONS array

2013-02-05 Thread Marcelo Tosatti
Applied, thanks. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] KVM: Remove duplicate text in api.txt

2013-02-05 Thread Marcelo Tosatti
On Thu, Jan 31, 2013 at 12:06:08PM -0800, Geoff Levand wrote: Signed-off-by: Geoff Levand ge...@infradead.org --- Saw this in v3.8-rc5, please apply. Documentation/virtual/kvm/api.txt | 13 - 1 file changed, 13 deletions(-) Applied, thanks. -- To unsubscribe from this

Re: [PATCH 0/8] KVM: Reduce mmu_lock hold time when zapping mmu pages

2013-02-04 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 07:12:31PM +0900, Takuya Yoshikawa wrote: This patch set mitigates another mmu_lock hold time issue. Although this is not enough and I'm thinking of additional work already, this alone can reduce the lock hold time to some extent. Takuya Yoshikawa (8): KVM: MMU:

Re: [PATCH 0/8] KVM: Reduce mmu_lock hold time when zapping mmu pages

2013-02-04 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 06:44:52PM +0800, Xiao Guangrong wrote: On 01/23/2013 06:12 PM, Takuya Yoshikawa wrote: This patch set mitigates another mmu_lock hold time issue. Although this is not enough and I'm thinking of additional work already, this alone can reduce the lock hold time to

Re: [PATCH 8/8] KVM: MMU: Move free_zapped_mmu_pages() out of the protection of mmu_lock

2013-02-04 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 07:18:11PM +0900, Takuya Yoshikawa wrote: We noticed that kvm_mmu_zap_all() could take hundreds of milliseconds for zapping mmu pages with mmu_lock held. Although we need to do conditional rescheduling for completely fixing this issue, we can reduce the hold time to

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

2013-02-04 Thread Marcelo Tosatti
On Mon, Feb 04, 2013 at 11:55:53AM +0200, Gleb Natapov wrote: On Sun, Feb 03, 2013 at 10:57:00PM -0200, Marcelo Tosatti wrote: On Thu, Jan 31, 2013 at 03:55:56PM +0200, Gleb Natapov wrote: On Thu, Jan 31, 2013 at 11:44:43AM -0200, Marcelo Tosatti wrote: On Thu, Jan 31, 2013 at 03:38:37PM

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

2013-02-04 Thread Marcelo Tosatti
On Mon, Feb 04, 2013 at 07:13:01PM +0200, Gleb Natapov wrote: On Mon, Feb 04, 2013 at 12:43:45PM -0200, Marcelo Tosatti wrote: Any example how software relies on such two-interrupts-queued-in-IRR/ISR behaviour? Don't know about guests, but KVM relies on it to detect interrupt

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

2013-02-04 Thread Marcelo Tosatti
On Mon, Feb 04, 2013 at 05:59:52PM -0200, Marcelo Tosatti wrote: On Mon, Feb 04, 2013 at 07:13:01PM +0200, Gleb Natapov wrote: On Mon, Feb 04, 2013 at 12:43:45PM -0200, Marcelo Tosatti wrote: Any example how software relies on such two-interrupts-queued-in-IRR/ISR behaviour

Re: [PATCH v3] KVM: set_memory_region: Identify the requested change explicitly

2013-02-04 Thread Marcelo Tosatti
On Tue, Jan 29, 2013 at 11:00:07AM +0900, Takuya Yoshikawa wrote: KVM_SET_USER_MEMORY_REGION forces __kvm_set_memory_region() to identify what kind of change is being requested by checking the arguments. The current code does this checking at various points in code and each condition being

Re: Investigating abnormal stealtimes

2013-02-04 Thread Marcelo Tosatti
Nice! - 'Steal time' is the amount of time taken while vcpu is able to run but not runnable. Maybe 'vmexit latency' is a better name. - Perhaps it would be good to subtract the time the thread was involuntarily scheduled out due 'timeslice' expiration. Otherwise, running a CPU

Re: [PATCH 6/6] Revert KVM: MMU: split kvm_mmu_free_page

2013-02-04 Thread Marcelo Tosatti
On Wed, Jan 30, 2013 at 04:45:05PM +0200, Gleb Natapov wrote: This reverts commit bd4c86eaa6ff10abc4e00d0f45d2a28b10b09df4. There is not user for kvm_mmu_isolate_page() any more. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/mmu.c | 21 +++-- Applied all

Re: [PATCH 0/2] KVM: set_memory_region: Cleanup and new restriction

2013-02-04 Thread Marcelo Tosatti
On Thu, Jan 31, 2013 at 12:15:01PM +0200, Gleb Natapov wrote: On Wed, Jan 30, 2013 at 07:38:37PM +0900, Takuya Yoshikawa wrote: Patch 1: just rebased for this series. Patch 2: an API change, so please let me know if you notice any problems. Takuya Yoshikawa (2): KVM:

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

2013-02-03 Thread Marcelo Tosatti
On Thu, Jan 31, 2013 at 03:55:56PM +0200, Gleb Natapov wrote: On Thu, Jan 31, 2013 at 11:44:43AM -0200, Marcelo Tosatti wrote: On Thu, Jan 31, 2013 at 03:38:37PM +0200, Gleb Natapov wrote: On Thu, Jan 31, 2013 at 11:32:45AM -0200, Marcelo Tosatti wrote: On Thu, Jan 31, 2013 at 11:43:48AM

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

2013-01-31 Thread Marcelo Tosatti
On Thu, Jan 31, 2013 at 11:43:48AM +0200, Gleb Natapov wrote: On Wed, Jan 30, 2013 at 09:03:11PM -0200, Marcelo Tosatti wrote: Posted interrupt patch: 2) Must move IN_GUEST_MODE assignment after local_irq_disable, in vcpu_enter_guest function. Otherwise: cpu0

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

2013-01-31 Thread Marcelo Tosatti
On Thu, Jan 31, 2013 at 03:38:37PM +0200, Gleb Natapov wrote: On Thu, Jan 31, 2013 at 11:32:45AM -0200, Marcelo Tosatti wrote: On Thu, Jan 31, 2013 at 11:43:48AM +0200, Gleb Natapov wrote: On Wed, Jan 30, 2013 at 09:03:11PM -0200, Marcelo Tosatti wrote: Posted interrupt patch: 2

Re: windows 2008 guest causing rcu_shed to emit NMI

2013-01-30 Thread Marcelo Tosatti
On Wed, Jan 30, 2013 at 11:21:08AM +0300, Andrey Korolyov wrote: On Wed, Jan 30, 2013 at 3:15 AM, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Jan 29, 2013 at 02:35:02AM +0300, Andrey Korolyov wrote: On Mon, Jan 28, 2013 at 5:56 PM, Andrey Korolyov and...@xdel.ru wrote: On Mon, Jan

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

2013-01-30 Thread Marcelo Tosatti
On Fri, Jan 25, 2013 at 12:40:21AM +, Zhang, Yang Z wrote: Marcelo Tosatti wrote on 2013-01-25: 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

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

2013-01-30 Thread Marcelo Tosatti
On Wed, Jan 30, 2013 at 09:03:11PM -0200, Marcelo Tosatti wrote: On Fri, Jan 25, 2013 at 12:40:21AM +, Zhang, Yang Z wrote: Marcelo Tosatti wrote on 2013-01-25: On Thu, Dec 13, 2012 at 03:29:40PM +0800, Yang Zhang wrote: From: Yang Zhang yang.z.zh...@intel.com Posted Interrupt

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

2013-01-29 Thread Marcelo Tosatti
On Mon, Jan 28, 2013 at 10:07:15PM -0200, Marcelo Tosatti wrote: On Fri, Jan 25, 2013 at 10:46:31AM +0800, Xiao Guangrong wrote: On 01/25/2013 08:15 AM, Marcelo Tosatti wrote: On Wed, Jan 23, 2013 at 06:07:20PM +0800, Xiao Guangrong wrote: It makes set_spte more clean and reduces branch

Re: [PATCH v2 03/12] KVM: MMU: simplify mmu_set_spte

2013-01-29 Thread Marcelo Tosatti
On Tue, Jan 29, 2013 at 10:55:24AM +0800, Xiao Guangrong wrote: On 01/29/2013 08:21 AM, Marcelo Tosatti wrote: On Wed, Jan 23, 2013 at 06:05:29PM +0800, Xiao Guangrong wrote: In order to detecting spte remapping, we can simply check whether the spte has already been pointing to the pfn even

Re: [PATCH] kvm: Fix irqfd resampler list walk

2013-01-28 Thread Marcelo Tosatti
On Mon, Jan 28, 2013 at 08:25:00AM -0700, Alex Williamson wrote: On Mon, 2012-12-10 at 18:16 -0200, Marcelo Tosatti wrote: On Thu, Dec 06, 2012 at 02:44:59PM -0700, Alex Williamson wrote: Typo for the next pointer means we're walking random data here. Signed-off-by: Alex Williamson

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

2013-01-28 Thread Marcelo Tosatti
|3 + virt/kvm/ioapic.c | 39 + virt/kvm/ioapic.h |4 + virt/kvm/irq_comm.c | 25 +++ virt/kvm/kvm_main.c |5 + 14 files changed, 647 insertions(+), 59 deletions(-) Reviewed-by: Marcelo Tosatti mtosa...@redhat.com

Re: [PATCH v2 03/12] KVM: MMU: simplify mmu_set_spte

2013-01-28 Thread Marcelo Tosatti
On Wed, Jan 23, 2013 at 06:05:29PM +0800, Xiao Guangrong wrote: In order to detecting spte remapping, we can simply check whether the spte has already been pointing to the pfn even if the spte is not the last spte, for middle spte is pointing to the kernel pfn which can not be mapped to

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

2013-01-28 Thread Marcelo Tosatti
On Fri, Jan 25, 2013 at 10:46:31AM +0800, Xiao Guangrong wrote: On 01/25/2013 08:15 AM, Marcelo Tosatti wrote: 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

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