Re: [PATCH v6 05/16] target-i386: Use Hypervisor level in -machine pc,accel=kvm.

2012-10-09 Thread Marcelo Tosatti
On Mon, Sep 24, 2012 at 10:32:07AM -0400, Don Slutz wrote: > Also known as Paravirtualization level. > > This change is based on: > > Microsoft Hypervisor CPUID Leaves: > > http://msdn.microsoft.com/en-us/library/windows/hardware/ff542428%28v=vs.85%29.aspx > > Linux kernel change starts with:

Re: [PATCH v6 04/16] target-i386: Add x86_set_hyperv.

2012-10-09 Thread Marcelo Tosatti
On Tue, Oct 09, 2012 at 01:34:09PM -0300, Marcelo Tosatti wrote: > On Mon, Sep 24, 2012 at 10:32:06AM -0400, Don Slutz wrote: > > This is used to set the cpu object's hypervisor level to the default for > > Microsoft's Hypervisor. > > > > Signed-off-by: Don

Re: [PATCH v6 04/16] target-i386: Add x86_set_hyperv.

2012-10-09 Thread Marcelo Tosatti
On Mon, Sep 24, 2012 at 10:32:06AM -0400, Don Slutz wrote: > This is used to set the cpu object's hypervisor level to the default for > Microsoft's Hypervisor. > > Signed-off-by: Don Slutz > --- > target-i386/cpu.c |9 + > target-i386/cpu.h |2 ++ > 2 files changed, 11 insertion

Re: [PATCH v6 03/16] target-i386: Add cpu object access routines for Hypervisor level.

2012-10-09 Thread Marcelo Tosatti
On Mon, Sep 24, 2012 at 10:32:05AM -0400, Don Slutz wrote: > These are modeled after x86_cpuid_get_xlevel and x86_cpuid_set_xlevel. > > Signed-off-by: Don Slutz > --- > target-i386/cpu.c | 29 + > 1 files changed, 29 insertions(+), 0 deletions(-) > > diff --git a/t

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-10-09 Thread Marcelo Tosatti
On Tue, Oct 09, 2012 at 04:30:28PM +0200, Avi Kivity wrote: > On 10/09/2012 04:27 PM, Marcelo Tosatti wrote: > > On Tue, Oct 09, 2012 at 04:26:32PM +0200, Avi Kivity wrote: > >> On 10/09/2012 04:24 PM, Marcelo Tosatti wrote: > >> > On Tue, Oct 09, 2012 at 02:1

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-10-09 Thread Marcelo Tosatti
On Tue, Oct 09, 2012 at 04:26:32PM +0200, Avi Kivity wrote: > On 10/09/2012 04:24 PM, Marcelo Tosatti wrote: > > On Tue, Oct 09, 2012 at 02:12:18PM +0200, Avi Kivity wrote: > >> On 10/08/2012 07:30 PM, Marcelo Tosatti wrote: > >> > > >> > From Intel

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-10-09 Thread Marcelo Tosatti
On Tue, Oct 09, 2012 at 02:12:18PM +0200, Avi Kivity wrote: > On 10/08/2012 07:30 PM, Marcelo Tosatti wrote: > > > > From Intel's manual: > > > > • If an execution of WRMSR to the IA32_TIME_STAMP_COUNTER MSR adds (or > > subtracts) value X from the TSC, &

Re: Steal time in KVM

2012-10-08 Thread Marcelo Tosatti
On Mon, Oct 08, 2012 at 02:47:59PM -0500, Abhishek Gupta wrote: > I think this flag is enabled since I see that there is some information > > cat /proc/schedstat This is in the host? Then, yes, the host has schedstat enabled. Definition of steal time: the amount of time in which this vCPU did no

Re: Steal time in KVM

2012-10-08 Thread Marcelo Tosatti
On Mon, Oct 08, 2012 at 02:55:25AM -0500, Abhishek Gupta wrote: > Hi, > > I am trying to get the steal time with 2 VMs (each with 1 Vcpu) pinned > to same core. > > While finding documentation on this, I came across your patches and > posts related to the implementation of this feature, so I thou

Re: Failed to get host power management capabilities

2012-10-08 Thread Marcelo Tosatti
On Fri, Oct 05, 2012 at 06:22:58AM -0600, David Torres wrote: > Hi all, > > My name is David Torres, I am from Costa Rica. See this is the problem I have > with the KVM instalation: > > 2012-10-03 20:28:17.395+: 25793: warning : qemuCapsInit:856 : Failed to > get host power management capab

Re: [Question] Intercept CR3 access in EPT

2012-10-08 Thread Marcelo Tosatti
On Mon, Oct 08, 2012 at 04:15:57PM +0800, R wrote: > Hi, > > I am a student. And my teacher told me to monitor every process in guest. > So, I try to intercept every Cr3 access. However, if kvm is loaded > with EPT enable, Acesses to Cr3 would not cause VM-exit. Disable EPT by loading kvm-intel

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-10-08 Thread Marcelo Tosatti
On Wed, Sep 19, 2012 at 05:44:46PM +, Auld, Will wrote: > >From 9982bb73460b05c1328068aae047b14b2294e2da Mon Sep 17 00:00:00 2001 > From: Will Auld > Date: Wed, 12 Sep 2012 18:10:56 -0700 > Subject: [PATCH] Enabling IA32_TSC_ADJUST for guest VM > > CPUID.7.0.EBX[1]=1 indicates IA32_TSC_ADJUS

Re: [PATCH] KVM: x86: Convert kvm_arch_vcpu_reset into private kvm_vcpu_reset

2012-10-08 Thread Marcelo Tosatti
On Thu, Sep 20, 2012 at 07:43:08AM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > There are no external callers of this function as there is no concept of > resetting a vcpu from generic code. > > Signed-off-by: Jan Kiszka Applied, thanks. -- To unsubscribe from this list: send the line "uns

Re: [PATCH] KVM: x86: Make emulator_fix_hypercall static

2012-10-08 Thread Marcelo Tosatti
On Thu, Sep 20, 2012 at 07:43:17AM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > No users outside of kvm/x86.c. > > Signed-off-by: Jan Kiszka Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordo

Re: [Qemu-devel] [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-04 Thread Marcelo Tosatti
On Thu, Oct 04, 2012 at 04:30:26PM +0200, Jan Kiszka wrote: > On 2012-10-04 16:21, Anthony Liguori wrote: > > -no-kvm should be included too. > > Reminds me that we still need to agree on the final default accel strategy. Default accel=kvm for x86_64 targets, no fallback. Markus's argument is pr

Re: [Qemu-devel] [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-04 Thread Marcelo Tosatti
On Thu, Oct 04, 2012 at 05:36:38PM +0200, Andreas Färber wrote: > Am 04.10.2012 16:30, schrieb Jan Kiszka: > > On 2012-10-04 16:21, Anthony Liguori wrote: > >> -no-kvm should be included too. > > > > Reminds me that we still need to agree on the final default accel strategy. > > > >> > >> I just

Re: [Qemu-devel] [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-03 Thread Marcelo Tosatti
On Wed, Oct 03, 2012 at 07:24:48PM +0200, Jan Kiszka wrote: > On 2012-10-03 19:16, Anthony Liguori wrote: > > Jan Kiszka writes: > > > >> On 2012-10-03 17:03, Marcelo Tosatti wrote: > >>> On Wed, Oct 03, 2012 at 09:40:17AM -0500, Anthony Liguori w

Re: [patch 0/6] qemu-kvm compat

2012-10-03 Thread Marcelo Tosatti
On Wed, Oct 03, 2012 at 09:45:07AM -0500, Anthony Liguori wrote: > Marcelo Tosatti writes: > > > As discussed on yesterdays qemu call, follows qemu-kvm compat patches > > for qemu: > > > > - command line compatibility > > - allow configurable ram siz

Re: [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-03 Thread Marcelo Tosatti
On Wed, Oct 03, 2012 at 09:40:17AM -0500, Anthony Liguori wrote: > Marcelo Tosatti writes: > > > Commit 3ad763fcba5bd0ec5a79d4a9b6baeef119dd4a3d from qemu-kvm.git. > > > > From: Jan Kiszka > > > > Upstream is moving towards this mechanism, so start

Re: [PATCH 1/1] kvmclock: fix guest stop notification

2012-10-03 Thread Marcelo Tosatti
On Sun, Sep 30, 2012 at 09:50:07PM -0400, Amos Kong wrote: > - Original Message - > > On Thu, Sep 20, 2012 at 09:46:41AM -0300, Marcelo Tosatti wrote: > > > On Thu, Sep 20, 2012 at 01:55:20PM +0530, Amit Shah wrote: > > > > Commit f349c12c0434e29c79ecde8902

[patch 0/6] qemu-kvm compat

2012-10-03 Thread Marcelo Tosatti
As discussed on yesterdays qemu call, follows qemu-kvm compat patches for qemu: - command line compatibility - allow configurable ram size for cirrus -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo i

[patch 5/6] Emulate qemu-kvms drive parameter boot=on|off

2012-10-03 Thread Marcelo Tosatti
Commit 841280b6c224ea2c6edc2f5afc2add513c85181d from qemu-kvm.git. From: Jan Kiszka We do not want to maintain this option forever. It will be removed after a grace period of a few releases. So warn the user that this option has no effect and will become invalid soon. Signed-off-by: Marcelo

[patch 1/6] cirrus_vga: allow configurable vram size

2012-10-03 Thread Marcelo Tosatti
Allow RAM size to be configurable for cirrus, to allow migration compatibility from qemu-kvm. Signed-off-by: Marcelo Tosatti Index: qemu-compat-kvm/hw/cirrus_vga.c === --- qemu-compat-kvm.orig/hw/cirrus_vga.c +++ qemu-compat-kvm

[patch 6/6] Emulate qemu-kvms -tdf option

2012-10-03 Thread Marcelo Tosatti
Commit d527b774878defc27f317cdde19b5c54fd0d5666 from qemu-kvm.git. From: Jan Kiszka Add a warning that there is no effect anymore. Signed-off-by: Marcelo Tosatti Index: qemu-compat-kvm/vl.c === --- qemu-compat-kvm.orig/vl.c

[patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-03 Thread Marcelo Tosatti
Commit 3ad763fcba5bd0ec5a79d4a9b6baeef119dd4a3d from qemu-kvm.git. From: Jan Kiszka Upstream is moving towards this mechanism, so start using it in qemu-kvm already to configure the specific defaults: kvm enabled on, just like in-kernel irqchips. Signed-off-by: Marcelo Tosatti Index

[patch 4/6] Use global properties to emulate -no-kvm-pit-reinjection

2012-10-03 Thread Marcelo Tosatti
Commit 80019541e9c13fab476bee35edcef3e11646222c from qemu-kvm.git. From: Jan Kiszka Use global properties to emulate -no-kvm-pit-reinjection Signed-off-by: Marcelo Tosatti Index: qemu-compat-kvm/vl.c === --- qemu-compat-kvm.orig

[patch 3/6] Use machine options to emulate -no-kvm-pit

2012-10-03 Thread Marcelo Tosatti
Commit e81dda195556e72f8cd294998296c1051aab30a8 from qemu-kvm.git. From: Jan Kiszka Leave the related command line option in place, just issuing a warning that it has no function anymore. Signed-off-by: Marcelo Tosatti Index: qemu-compat-kvm/vl.c

Re: [Qemu-devel] [PATCH v10] kvm: notify host when the guest is panicked

2012-10-01 Thread Marcelo Tosatti
On Mon, Oct 01, 2012 at 03:57:40PM -0300, Luiz Capitulino wrote: > On Wed, 29 Aug 2012 13:18:54 +0800 > Wen Congyang wrote: > > > We can know the guest is panicked when the guest runs on xen. > > But we do not have such feature on kvm. > > What's the status of this series? > > It got lost in my

Re: qemu-kvm: remove "boot=on|off" drive parameter compatibility

2012-10-01 Thread Marcelo Tosatti
On Mon, Oct 01, 2012 at 08:19:29AM -0500, Anthony Liguori wrote: > Jan Kiszka writes: > > > On 2012-10-01 11:31, Marcelo Tosatti wrote: > > > > It's not just about default configs. We need to validate if the > > migration formats are truly compatible (qemu-kv

Re: qemu-kvm: remove "boot=on|off" drive parameter compatibility

2012-10-01 Thread Marcelo Tosatti
On Mon, Oct 01, 2012 at 12:21:18PM +0200, Jan Kiszka wrote: > On 2012-10-01 11:31, Marcelo Tosatti wrote: > > On Mon, Oct 01, 2012 at 10:05:21AM +0200, Jan Kiszka wrote: > >> On 2012-09-30 21:11, Marcelo Tosatti wrote: > >>> > >>> Option is deprecated

KVM: x86: retain pvclock guest stopped bit in guest memory

2012-10-01 Thread Marcelo Tosatti
Otherwise its possible for an unrelated KVM_REQ_UPDATE_CLOCK (such as due to CPU migration) to clear the bit. Noticed by Paolo Bonzini. Signed-off-by: Marcelo Tosatti diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 19047ea..7d47fb6 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm

Re: qemu-kvm: remove "boot=on|off" drive parameter compatibility

2012-10-01 Thread Marcelo Tosatti
On Mon, Oct 01, 2012 at 10:05:21AM +0200, Jan Kiszka wrote: > On 2012-09-30 21:11, Marcelo Tosatti wrote: > > > > Option is deprecated and warning has been in place for one year. > > Do we really care about such cosmetics? We care about removing qemu-kvm to null. >

Re: [PATCH 1/1] kvmclock: fix guest stop notification

2012-09-30 Thread Marcelo Tosatti
On Thu, Sep 20, 2012 at 09:46:41AM -0300, Marcelo Tosatti wrote: > On Thu, Sep 20, 2012 at 01:55:20PM +0530, Amit Shah wrote: > > Commit f349c12c0434e29c79ecde89029320c4002f7253 added the guest stop > > notification, but it did it in a way that the stop notification would >

qemu-kvm: remove "boot=on|off" drive parameter compatibility

2012-09-30 Thread Marcelo Tosatti
Option is deprecated and warning has been in place for one year. Signed-off-by: Marcelo Tosatti diff --git a/blockdev.c b/blockdev.c index 4a5266e..7c83baa 100644 --- a/blockdev.c +++ b/blockdev.c @@ -432,12 +432,6 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) return

Re: [libvirt] TSC scaling interface to management

2012-09-28 Thread Marcelo Tosatti
On Tue, Sep 25, 2012 at 11:08:58AM +0100, Daniel P. Berrange wrote: > On Wed, Sep 12, 2012 at 12:39:39PM -0300, Marcelo Tosatti wrote: > > > > > > HW TSC scaling is a feature of AMD processors that allows a > > multiplier to be specified to the TSC frequency exposed

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-09-28 Thread Marcelo Tosatti
On Fri, Sep 28, 2012 at 02:07:26AM +, Auld, Will wrote: > Marcelo, > > I tagged my comments below with "[auld]" to make it easier to read. > > Thanks, > > Will > > -Original Message- > From: Marcelo Tosatti [mailto:mtosa...@redhat.com] >

Re: [PATCH 1/2] KVM: PPC: e500: fix allocation size error on g2h_tlb1_map

2012-09-27 Thread Marcelo Tosatti
On Tue, Sep 25, 2012 at 09:46:01AM +0200, Alexander Graf wrote: > > On 23.08.2012, at 03:04, Scott Wood wrote: > > > We were only allocating half the bytes we need, which was made more > > obvious by a recent fix to the memset in clear_tlb1_bitmap(). > > > > Signed-off-by: Scott Wood > > Than

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-09-27 Thread Marcelo Tosatti
On Thu, Sep 27, 2012 at 08:31:22AM -0300, Marcelo Tosatti wrote: > On Thu, Sep 27, 2012 at 12:50:16AM +, Auld, Will wrote: > > Marcelo, > > > > I think I am missing something. There should be no needed changes to > > current algorithms that exist today. Does

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-09-27 Thread Marcelo Tosatti
) function must take ia32_tsc_adjust into account. guest_read_tsc (and the SVM equivalent) also. > > Thanks, > > Will > > -Original Message- > From: Marcelo Tosatti [mailto:mtosa...@redhat.com] > Sent: Wednesday, September 26, 2012 5:29 PM > To: Auld, Wi

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-09-26 Thread Marcelo Tosatti
On Wed, Sep 26, 2012 at 09:29:29PM -0300, Marcelo Tosatti wrote: > On Wed, Sep 26, 2012 at 10:58:46PM +, Auld, Will wrote: > > Avi, Still working on your suggestions. > > > > Marcelo, > > > > The purpose is to be able to run guests that implement this change

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-09-26 Thread Marcelo Tosatti
uests which should already make > >use of paravirt clock >interface, what is the point of exposing the feature? > > -Original Message- > From: Marcelo Tosatti [mailto:mtosa...@redhat.com] > Sent: Wednesday, September 26, 2012 2:35 PM > To: Auld, Will > Cc: kvm@vger

Re: [PATCH] Enabling IA32_TSC_ADJUST for guest VM

2012-09-26 Thread Marcelo Tosatti
On Wed, Sep 19, 2012 at 05:44:46PM +, Auld, Will wrote: > >From 9982bb73460b05c1328068aae047b14b2294e2da Mon Sep 17 00:00:00 2001 > From: Will Auld > Date: Wed, 12 Sep 2012 18:10:56 -0700 > Subject: [PATCH] Enabling IA32_TSC_ADJUST for guest VM > > CPUID.7.0.EBX[1]=1 indicates IA32_TSC_ADJUST

Re: [libvirt] TSC scaling interface to management

2012-09-22 Thread Marcelo Tosatti
On Fri, Sep 21, 2012 at 11:30:31PM +0300, Dor Laor wrote: > On 09/21/2012 05:51 AM, Marcelo Tosatti wrote: > >On Fri, Sep 21, 2012 at 12:02:46AM +0300, Dor Laor wrote: > >>On 09/12/2012 06:39 PM, Marcelo Tosatti wrote: > >>> > >>> > >>>HW TS

Re: [libvirt] TSC scaling interface to management

2012-09-20 Thread Marcelo Tosatti
On Fri, Sep 21, 2012 at 12:02:46AM +0300, Dor Laor wrote: > On 09/12/2012 06:39 PM, Marcelo Tosatti wrote: > > > > > >HW TSC scaling is a feature of AMD processors that allows a > >multiplier to be specified to the TSC frequency exposed to the guest. > > > >

Re: [PATCH v8 1/3] KVM: x86: export svm/vmx exit code and vector code to userspace

2012-09-20 Thread Marcelo Tosatti
On Mon, Sep 17, 2012 at 07:58:57AM -0700, Arnaldo Carvalho de Melo wrote: > Em Mon, Sep 17, 2012 at 04:31:13PM +0800, Dong Hao escreveu: > > From: Xiao Guangrong > > > > Exporting KVM exit information to userspace to be consumed by perf. > > > > [ Dong Hao : rebase it on acme's git tree ] > > Si

Re: [PATCH 1/1] kvmclock: fix guest stop notification

2012-09-20 Thread Marcelo Tosatti
running' is 0, > which indicates the VM was stopped. > > CC: Eric B Munson > CC: Raghavendra K T > CC: Andreas Färber > CC: Marcelo Tosatti > CC: Paolo Bonzini > CC: Laszlo Ersek > Signed-off-by: Amit Shah > --- > hw/kvm/clock.c | 21 +++--

Re: [PATCH 1/1] kvmclock: fix guest stop notification

2012-09-20 Thread Marcelo Tosatti
of 0 for the 'running' parameter when the VM is stopped, making > all the code added previously dead code. > > This patch reworks the code so that it's called when 'running' is 0, > which indicates the VM was stopped. > > CC: Eric B Munson > CC: Raghaven

Re: [PATCH v2 4/5] KVM: MMU: introduce page_fault_start and page_fault_end

2012-09-19 Thread Marcelo Tosatti
On Tue, Sep 18, 2012 at 04:15:32PM +0800, Xiao Guangrong wrote: > On 09/15/2012 11:25 PM, Marcelo Tosatti wrote: > > On Fri, Sep 14, 2012 at 05:59:06PM +0800, Xiao Guangrong wrote: > >> Wrap the common operations into these two functions > >> > >> Signed-off

Re: [PATCH] kvm: Fix kvmclock documentation to match reality

2012-09-17 Thread Marcelo Tosatti
On Sun, Sep 16, 2012 at 12:55:40PM +0200, Stefan Fritsch wrote: > Hi, > > I found the kvmclock documentation to be rather unhelpful. This > patch should fix it. > > Cheers, > Stefan > > Author: Stefan Fritsch > Date: Sun Sep 16 12:30:46 2012 +0200 > > kvm: Fix kvmclock documentation to m

Re: [PATCH] kvm: make processes waiting on vcpu mutex killable

2012-09-17 Thread Marcelo Tosatti
On Sun, Sep 16, 2012 at 11:50:30AM +0300, Michael S. Tsirkin wrote: > vcpu mutex can be held for unlimited time so > taking it with mutex_lock on an ioctl is wrong: > one process could be passed a vcpu fd and > call this ioctl on the vcpu used by another process, > it will then be unkillable until

Re: [PATCH 0/3] Prepare kvm for lto

2012-09-17 Thread Marcelo Tosatti
On Sun, Sep 16, 2012 at 03:10:56PM +0300, Avi Kivity wrote: > vmx.c has an lto-unfriendly bit, fix it up. > > While there, clean up our asm code. > > v2: add missing .global in case vmx_return and vmx_set_constant_host_state() > become > separated by lto > > Avi Kivity (3): > KVM: VMX: Ma

Re: [PATCH v3] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-17 Thread Marcelo Tosatti
On Mon, Sep 17, 2012 at 02:07:43AM +, Hao, Xudong wrote: > > -Original Message- > > From: Avi Kivity [mailto:a...@redhat.com] > > Sent: Friday, September 14, 2012 12:40 AM > > To: Marcelo Tosatti > > Cc: Hao, Xudong; kvm@vger.kernel.org; Zhang, Xiantao &

Re: [PATCH v2 4/5] KVM: MMU: introduce page_fault_start and page_fault_end

2012-09-15 Thread Marcelo Tosatti
On Fri, Sep 14, 2012 at 05:59:06PM +0800, Xiao Guangrong wrote: > Wrap the common operations into these two functions > > Signed-off-by: Xiao Guangrong Why? I think people are used to spin_lock(lock) sequence spin_unlock(lock) So its easy to verify whether access to data structures are protec

Re: [PATCH v2 5/5] KVM: MMU: introduce FNAME(prefetch_gpte)

2012-09-15 Thread Marcelo Tosatti
On Fri, Sep 14, 2012 at 06:13:11PM +0800, Xiao Guangrong wrote: > On 09/14/2012 05:59 PM, Xiao Guangrong wrote: > > > + return FNAME(prefetch_gpte)(vcpu, sp, spte, gptep[i], true); > > Sorry, this was wrong. Update this patch. > > [PATCH v2 5/5] KVM: MMU: introduce FNAME(prefetch_gpte)

Re: [PATCH v2 1/5] KVM: MMU: release noslot pfn on the fail path properly

2012-09-15 Thread Marcelo Tosatti
On Fri, Sep 14, 2012 at 05:57:22PM +0800, Xiao Guangrong wrote: > We can not directly call kvm_release_pfn_clean to release the pfn > since we can meet noslot pfn which is used to cache mmio info into > spte > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c |6 -- > ar

Re: [PATCH] KVM: Move some PPC ioctl definitions to the correct place

2012-09-15 Thread Marcelo Tosatti
On Fri, Sep 14, 2012 at 04:19:29PM +0200, Alexander Graf wrote: > > On 14.09.2012, at 09:44, Paul Mackerras wrote: > > > This moves the definitions of KVM_CREATE_SPAPR_TCE and > > KVM_ALLOCATE_RMA in include/linux/kvm.h from the section listing the > > vcpu ioctls to the section listing VM ioctls

Re: [PATCH v2 3/4] target-i386: Allow changing of Hypervisor CPUIDs.

2012-09-14 Thread Marcelo Tosatti
On Thu, Sep 13, 2012 at 02:43:55PM -0400, Don Slutz wrote: > On 09/12/12 13:55, Marcelo Tosatti wrote: > >The problem with integrating this is that it has little or > >no assurance from documentation. The Linux kernel source is a good > >source, then say "accordingly to

Re: [PATCHv4] KVM: optimize apic interrupt delivery

2012-09-14 Thread Marcelo Tosatti
On Thu, Sep 13, 2012 at 05:19:24PM +0300, Gleb Natapov wrote: > Most interrupt are delivered to only one vcpu. Use pre-build tables to > find interrupt destination instead of looping through all vcpus. In case > of logical mode loop only through vcpus in a logical cluster irq is sent > to. > > Si

Re: [PATCH v3] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-14 Thread Marcelo Tosatti
On Fri, Sep 14, 2012 at 08:54:40AM +, Hao, Xudong wrote: > > -Original Message- > > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > > Behalf Of Marcelo Tosatti > > Sent: Friday, September 14, 2012 12:29 AM > > To: Hao,

Re: [PATCH v3] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-13 Thread Marcelo Tosatti
On Thu, Sep 13, 2012 at 01:26:36PM -0300, Marcelo Tosatti wrote: > On Wed, Sep 12, 2012 at 04:10:24PM +0800, Xudong Hao wrote: > > Enable KVM FPU fully eager restore, if there is other FPU state which isn't > > tracked by CR0.TS bit. > > > > v3 changes from v2:

Re: [PATCH v3] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-13 Thread Marcelo Tosatti
On Wed, Sep 12, 2012 at 04:10:24PM +0800, Xudong Hao wrote: > Enable KVM FPU fully eager restore, if there is other FPU state which isn't > tracked by CR0.TS bit. > > v3 changes from v2: > - Make fpu active explicitly while guest xsave is enabling and non-lazy > xstate bit > exist. How about a "

Re: [PATCH 0/5] Optimize page table walk

2012-09-12 Thread Marcelo Tosatti
On Wed, Sep 12, 2012 at 05:29:49PM +0300, Avi Kivity wrote: > (resend due to mail server malfunction) > > The page table walk has gotten crufty over the years and is threatening to > become > even more crufty when SMAP is introduced. Clean it up (and optimize it) > somewhat. What is SMAP? --

Re: [PATCH v2 3/4] target-i386: Allow changing of Hypervisor CPUIDs.

2012-09-12 Thread Marcelo Tosatti
The problem with integrating this is that it has little or no assurance from documentation. The Linux kernel source is a good source, then say "accordingly to VMWare guest support code in version xyz" in the changelog. Also extracting this information in a text file (or comment in the code) woul

Re: [PATCH -v4] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-09-12 Thread Marcelo Tosatti
On Wed, Sep 05, 2012 at 07:30:01PM +0900, Takuya Yoshikawa wrote: > find_highest_vector() and count_vectors(): > - Instead of using magic values, define and use proper macros. > > find_highest_vector(): > - Remove likely() which is there only for historical reasons and not >doing correct bra

Re: [PATCH v6 12/12] KVM: indicate readonly access fault

2012-09-12 Thread Marcelo Tosatti
On Wed, Sep 12, 2012 at 06:34:33PM +0300, Avi Kivity wrote: > On 09/11/2012 05:39 PM, Marcelo Tosatti wrote: > > On Tue, Sep 11, 2012 at 12:18:22PM +0300, Avi Kivity wrote: > >> > The same can happen with slot deletion, for example. > >> > > >> > User

TSC scaling interface to management

2012-09-12 Thread Marcelo Tosatti
HW TSC scaling is a feature of AMD processors that allows a multiplier to be specified to the TSC frequency exposed to the guest. KVM also contains provision to trap TSC ("KVM: Infrastructure for software and hardware based TSC rate scaling" cc578287e3224d0da) or advance TSC frequency. This is

Re: [PATCH v6 12/12] KVM: indicate readonly access fault

2012-09-12 Thread Marcelo Tosatti
On Tue, Sep 11, 2012 at 11:39:01AM -0300, Marcelo Tosatti wrote: > On Tue, Sep 11, 2012 at 12:18:22PM +0300, Avi Kivity wrote: > > > The same can happen with slot deletion, for example. > > > > > > Userspace (which performed the modification which can result in fau

[PATCH 6/9] memory: Flush coalesced MMIO on mapping and state changes

2012-09-11 Thread Marcelo Tosatti
From: Jan Kiszka Flush pending coalesced MMIO before performing mapping or state changes that could affect the event orderings or route the buffered requests to a wrong region. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- memory.c |1 + 1 files changed, 1 insertions(+), 0

[PATCH 9/9] kvm: Rename irqchip_inject_ioctl to irq_set_ioctl

2012-09-11 Thread Marcelo Tosatti
From: Jan Kiszka This variable is no longer bound to irqchip, and the IOCTL sets the IRQ level, does not directly inject it. No functional changes. Reviewed-by: Peter Maydell Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- kvm-all.c | 10 +- 1 files changed, 5

[PATCH 5/9] memory: Fold memory_region_update_topology into memory_region_transaction_commit

2012-09-11 Thread Marcelo Tosatti
From: Jan Kiszka Simplify the code as we are using now only a subset of the original features of memory_region_update_topology. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- memory.c | 39 +++ 1 files changed, 11 insertions(+), 28

[PATCH 7/9] VGA: Flush coalesced MMIO on related MMIO/PIO accesses

2012-09-11 Thread Marcelo Tosatti
: Marcelo Tosatti --- hw/cirrus_vga.c |7 +++ hw/qxl.c|1 + hw/vga-isa-mm.c |1 + hw/vga.c|5 + hw/vmware_vga.c |1 + 5 files changed, 15 insertions(+), 0 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c index e8dcc6b..9a0a565 100644 --- a/hw

[PATCH 4/9] memory: Use transaction_begin/commit also for single-step operations

2012-09-11 Thread Marcelo Tosatti
after updating disabled or unregistered regions. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- memory.c | 40 +--- 1 files changed, 25 insertions(+), 15 deletions(-) diff --git a/memory.c b/memory.c index ae6547f..5fab415 100644 --- a

[PATCH 8/9] kvm: Stop flushing coalesced MMIO on vmexit

2012-09-11 Thread Marcelo Tosatti
From: Jan Kiszka The memory subsystem will now take care of flushing whenever affected regions are accessed or the memory mapping changes. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- kvm-all.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/kvm

[PATCH 2/9] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-09-11 Thread Marcelo Tosatti
). Signed-off-by: Peter Maydell Signed-off-by: Marcelo Tosatti --- kvm-all.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 39cff55..f9873db 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1237,10 +1237,6 @@ static int kvm_irqchip_create(KVMState

[PATCH 3/9] memory: Flush coalesced MMIO on selected region access

2012-09-11 Thread Marcelo Tosatti
. of the same device, by calling memory_region_set_flush_coalesced. Signed-off-by: Jan Kiszka Signed-off-by: Marcelo Tosatti --- memory.c | 24 memory.h | 26 ++ 2 files changed, 50 insertions(+), 0 deletions(-) diff --git a/memory.c b/memory.c

[PATCH 0/9] [PULL] qemu-kvm.git uq/master queue

2012-09-11 Thread Marcelo Tosatti
The following changes since commit e0a1e32dbc41e6b2aabb436a9417dfd32177a3dc: Merge branch 'usb.64' of git://git.kraxel.org/qemu (2012-09-11 18:06:56 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Jan Kiszka (7): memory: Flus

[PATCH 1/9] update-linux-headers.sh: Don't hard code list of architectures

2012-09-11 Thread Marcelo Tosatti
updated to add support for a new KVM architecture. Acked-by: Jan Kiszka Signed-off-by: Peter Maydell Signed-off-by: Marcelo Tosatti --- scripts/update-linux-headers.sh | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/scripts/update-linux-headers.sh b

Re: qemu-kvm loops after kernel udpate

2012-09-11 Thread Marcelo Tosatti
On Tue, Sep 11, 2012 at 08:11:36PM +0200, Jiri Slaby wrote: > Hi, > > it looks like an update from next-20120824 to next-20120910 makes kvm > defunct. When I try to run qemu, it loops forever without printing > anything on the monitor. > > -no-kvm makes it indeed work. > > Cmdline I use: > qemu-

Re: [PATCH v6 12/12] KVM: indicate readonly access fault

2012-09-11 Thread Marcelo Tosatti
On Tue, Sep 11, 2012 at 12:18:22PM +0300, Avi Kivity wrote: > > The same can happen with slot deletion, for example. > > > > Userspace (which performed the modification which can result in faults > > to non-existant/read-only/.../new-tag memslot), must handle the faults > > properly or avoid the

Re: [PATCH v6 12/12] KVM: indicate readonly access fault

2012-09-10 Thread Marcelo Tosatti
On Fri, Sep 07, 2012 at 05:56:39PM +0800, Xiao Guangrong wrote: > On 09/06/2012 10:09 PM, Avi Kivity wrote: > > On 08/22/2012 03:47 PM, Xiao Guangrong wrote: > >> On 08/22/2012 08:06 PM, Avi Kivity wrote: > >>> On 08/21/2012 06:03 AM, Xiao Guangrong wrote: > Introduce write_readonly_mem in mmi

Re: Sending a VM for restart (after it has been shutdown and saved)

2012-09-10 Thread Marcelo Tosatti
On Mon, Sep 03, 2012 at 06:35:24PM +0100, Michael Johns wrote: > Hi list, > > I have been hacking the KVM-QEMU code, but need some help to be able > to perform a particular operation. > > Currently, I perform some operations on the VM image after it has > received a shutdown call, and after the i

Re: [PULL] KVM updates

2012-09-10 Thread Marcelo Tosatti
On Mon, Sep 10, 2012 at 05:32:39PM +0200, Jan Kiszka wrote: > On 2012-09-10 17:25, Avi Kivity wrote: > > Please pull from: > > > > git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master > > > > to merge some kvm updates, most notably a port of qemu-kvm's pre-vfio device > > assignment. W

Re: KVM: x86: do not retain disabled or invalid pvclock address

2012-09-09 Thread Marcelo Tosatti
On Sun, Sep 09, 2012 at 05:08:31PM +0300, Avi Kivity wrote: > On 08/23/2012 02:16 PM, Marcelo Tosatti wrote: > > > > In case an invalid or disabled gpa is written to the SYSTEM_TIME > > MSR, do not retain its value. This is not documented behaviour, > > nor should

Re: [PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-09-05 Thread Marcelo Tosatti
On Thu, Aug 30, 2012 at 03:20:35PM -0400, Don Slutz wrote: > This is primarily done so that the guest will think it is running > under vmware when hypervisor=vmware is specified as a property of a > cpu. > > Also allow this to work in accel=tcg mode. > > The new cpu properties hyper_level, hyper_

[GIT PULL] KVM fixes for 3.6-rc3

2012-08-31 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 Alan Cox (1): kvm: Fix nonsense handling of compat ioctl Michael S. Tsirkin (1): KVM: x86: fix KVM_GET_MSR for PV EOI arch/x86/kvm/x86.c |3 +++ virt/kvm/kvm

[ANNOUNCE] qemu-kvm-1.2.0-rc2

2012-08-31 Thread Marcelo Tosatti
qemu-kvm-1.2.0-rc2 is now available. This release is based on the upstream qemu 1.2.0-rc2, plus device assignment. Please see the original QEMU 1.2.0-rc2 release announcement [1] for details. This release can be used with the kvm kernel modules provided by your distribution kernel, or by the mod

Re: [PATCH] KVM: VMX: invalidate vpid for invlpg instruction

2012-08-31 Thread Marcelo Tosatti
On Fri, Aug 31, 2012 at 06:10:48PM +0200, Davidlohr Bueso wrote: > For processors that support VPIDs we should invalidate the page table entry > specified by the lineal address. For this purpose add support for individual > address invalidations. Not necessary - a single context invalidation is pe

Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

2012-08-29 Thread Marcelo Tosatti
On Tue, Aug 28, 2012 at 06:57:56PM +0900, Takuya Yoshikawa wrote: > On Mon, 27 Aug 2012 17:25:42 -0300 > Marcelo Tosatti wrote: > > > On Fri, Aug 24, 2012 at 06:15:49PM +0900, Takuya Yoshikawa wrote: > > > Although returning -1 should be likely according to the likel

Re: [QEMU 1.2 PATCH] i386: kvm: have a predefined set of default KVM feature bits

2012-08-29 Thread Marcelo Tosatti
On Wed, Aug 29, 2012 at 06:10:04PM +0300, Michael S. Tsirkin wrote: > On Wed, Aug 29, 2012 at 12:04:25PM -0300, Eduardo Habkost wrote: > > We can't simply expose the GET_SUPPORTED_CPUID results directly to the > > guest, or the resulting guest-visible CPUID bits may change under the > > guest's fee

Re: [Qemu-devel] [PATCHv4 3/4] cpuid: disable pv eoi for 1.1 and older compat types

2012-08-29 Thread Marcelo Tosatti
On Wed, Aug 29, 2012 at 06:59:03AM -0300, Marcelo Tosatti wrote: > > I don't understand. What is the problem with the proposal? > > What will not work with our protocol? > > Can you give an example please? > > > > > > > > Too late for 1.2? > >

Re: [Qemu-devel] [PATCHv4 3/4] cpuid: disable pv eoi for 1.1 and older compat types

2012-08-29 Thread Marcelo Tosatti
On Wed, Aug 29, 2012 at 01:21:13AM +0300, Michael S. Tsirkin wrote: > On Tue, Aug 28, 2012 at 07:02:42PM -0300, Eduardo Habkost wrote: > > On Wed, Aug 29, 2012 at 12:35:28AM +0300, Michael S. Tsirkin wrote: > > > On Tue, Aug 28, 2012 at 04:13:38PM -0300, Eduardo Habkost wrote: > > > > On Tue, Aug 2

Re: [patch 3/3] KVM: move postcommit flush to x86, as mmio sptes are x86 specific

2012-08-28 Thread Marcelo Tosatti
On Mon, Aug 27, 2012 at 04:04:44PM +0800, Xiao Guangrong wrote: > On 08/25/2012 02:54 AM, Marcelo Tosatti wrote: > > Other arches do not need this. > > > > Signed-off-by: Marcelo Tosatti > > > &

Re: [patch 3/3] KVM: move postcommit flush to x86, as mmio sptes are x86 specific

2012-08-28 Thread Marcelo Tosatti
On Tue, Aug 28, 2012 at 09:30:24AM +0900, Takuya Yoshikawa wrote: > On Mon, 27 Aug 2012 16:06:01 -0300 > Marcelo Tosatti wrote: > > > > Any explanation why (old.base_gfn != new.base_gfn) case can be > > > omitted? > > > > (old.base_gfn != new.base

[patch 3/3 V2] KVM: move postcommit flush to x86, as mmio sptes are x86 specific

2012-08-28 Thread Marcelo Tosatti
Other arches do not need this. Signed-off-by: Marcelo Tosatti v2: fix incorrect deletion of mmio sptes on gpa move (noticed by Takuya) Index: kvm/arch/x86/kvm/x86.c === --- kvm.orig/arch/x86/kvm/x86.c +++ kvm/arch/x86/kvm/x86.c

Re: [PATCHv2 2/4] pc: refactor compat code

2012-08-28 Thread Marcelo Tosatti
On Tue, Aug 28, 2012 at 07:31:24PM +0300, Michael S. Tsirkin wrote: > On Tue, Aug 28, 2012 at 01:23:18PM -0300, Marcelo Tosatti wrote: > > On Mon, Aug 27, 2012 at 03:20:13PM +0300, Michael S. Tsirkin wrote: > > > In preparation to adding PV EOI migration for 1.2, > > > t

Re: [PATCHv2 2/4] pc: refactor compat code

2012-08-28 Thread Marcelo Tosatti
On Mon, Aug 27, 2012 at 03:20:13PM +0300, Michael S. Tsirkin wrote: > In preparation to adding PV EOI migration for 1.2, > trivially refactor some some compat code > to make it easier to add version specific > cpuid tweaks. > > Signed-off-by: Michael S. Tsirkin > --- > hw/pc_piix.c | 44

Re: [PATCH 00/13] Big real mode fixes

2012-08-28 Thread Marcelo Tosatti
On Tue, Aug 21, 2012 at 05:06:57PM +0300, Avi Kivity wrote: > It turns out that our big real mode implementation was based on a > miconception: > I believed that loading a segment register in real mode causes the limit to be > reset to 0x (thus undoing the effect), while in reality, the limit

Re: [PATCH for-3.6] kvm: fix KVM_GET_MSR for PV EOI

2012-08-27 Thread Marcelo Tosatti
On Mon, Aug 27, 2012 at 05:47:42PM -0300, Marcelo Tosatti wrote: > On Sun, Aug 26, 2012 at 06:00:29PM +0300, Michael S. Tsirkin wrote: > > KVM_GET_MSR was missing support for PV EOI, > > which is needed for migration. > > > > Signed-off-by: Michael S. Tsirkin >

Re: setting time in guest with ntpdate results in VM hang

2012-08-27 Thread Marcelo Tosatti
On Mon, Aug 27, 2012 at 01:23:05PM -0600, David Ahern wrote: > On 8/27/12 10:58 AM, Dale Swanston wrote: > >Good idea. I'll try that. > > > >But are there any tools available to determine what the VM is doing when > >it appears hung? I've looked but haven't found much on debug or > >diagnostics o

Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

2012-08-27 Thread Marcelo Tosatti
On Fri, Aug 24, 2012 at 06:15:49PM +0900, Takuya Yoshikawa wrote: > Although returning -1 should be likely according to the likely(), > the ASSERT in apic_find_highest_irr() will be triggered in such a case. > It seems that this optimization is not working as expected. > > This patch simplifies th

<    8   9   10   11   12   13   14   15   16   17   >