Re: Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting

2021-04-13 Thread Wanpeng Li
On Wed, 7 Apr 2021 at 18:55, Michael Tokarev wrote: > > Hi! > > It looks like this commit: > > commit 87fa7f3e98a1310ef1ac1900e7ee7f9610a038bc > Author: Thomas Gleixner > Date: Wed Jul 8 21:51:54 2020 +0200 > > x86/kvm: Move context tracking where it belongs > > Context tracking for

Re: Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting

2021-04-09 Thread Wanpeng Li
On Thu, 8 Apr 2021 at 21:19, Thomas Gleixner wrote: > > On Tue, Apr 06 2021 at 21:47, Sean Christopherson wrote: > > On Tue, Apr 06, 2021, Michael Tokarev wrote: > >> broke kvm guest cpu time accounting - after this commit, when running > >> qemu-system-x86_64 -enable-kvm, the guest time (in

Re: Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting

2021-04-08 Thread Wanpeng Li
On Thu, 8 Apr 2021 at 21:19, Thomas Gleixner wrote: > > On Tue, Apr 06 2021 at 21:47, Sean Christopherson wrote: > > On Tue, Apr 06, 2021, Michael Tokarev wrote: > >> broke kvm guest cpu time accounting - after this commit, when running > >> qemu-system-x86_64 -enable-kvm, the guest time (in

Re: Commit "x86/kvm: Move context tracking where it belongs" broke guest time accounting

2021-04-07 Thread Wanpeng Li
On Wed, 7 Apr 2021 at 18:55, Michael Tokarev wrote: > > Hi! > > It looks like this commit: > > commit 87fa7f3e98a1310ef1ac1900e7ee7f9610a038bc > Author: Thomas Gleixner > Date: Wed Jul 8 21:51:54 2020 +0200 > > x86/kvm: Move context tracking where it belongs > > Context tracking for

Re: [Qemu-devel] [PATCH RESEND] i386/kvm: support guest access CORE cstate

2019-07-15 Thread Wanpeng Li
On Mon, 15 Jul 2019 at 17:16, Paolo Bonzini wrote: > > On 15/07/19 03:28, Wanpeng Li wrote: > > From: Wanpeng Li > > > > Allow guest reads CORE cstate when exposing host CPU power management > > capabilities > > to the guest. PKG cstate is restrict

[Qemu-devel] [PATCH RESEND v2] target-i386: adds PV_SCHED_YIELD CPUID feature bit

2019-07-10 Thread Wanpeng Li
From: Wanpeng Li Adds PV_SCHED_YIELD CPUID feature bit. Cc: Eduardo Habkost Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li --- Note: kvm part is merged v1 -> v2: * use bit 13 instead of bit 12 since bit 12 has user now target/i386/cpu.c | 2 +- 1 file changed, 1 insert

[Qemu-devel] [PATCH] target-i386: adds PV_SCHED_YIELD CPUID feature bit

2019-07-10 Thread Wanpeng Li
From: Wanpeng Li Adds PV_SCHED_YIELD CPUID feature bit. Cc: Eduardo Habkost Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off-by: Wanpeng Li --- Note: kvm part is merged v1 -> v2: * use bit 13 instead of bit 12 since bit 12 has user now target/i386/cpu.c | 2 +- 1 file changed, 1 insert

[Qemu-devel] [PATCH] target-i386: adds PV_SCHED_YIELD CPUID feature bit

2019-05-27 Thread Wanpeng Li
From: Wanpeng Li Adds PV_SCHED_YIELD CPUID feature bit. Signed-off-by: Wanpeng Li --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 5f07d68..f4c4b6b 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c

[Qemu-devel] [PATCH] kvm: support guest access CORE cstate

2019-05-21 Thread Wanpeng Li
From: Wanpeng Li Allow guest reads CORE cstate when exposing host CPU power management capabilities to the guest. PKG cstate is restricted to avoid a guest to get the whole package information in multi-tenant scenario. Cc: Eduardo Habkost Cc: Paolo Bonzini Cc: Radim Krčmář Signed-off

[Qemu-devel] [PATCH] i386: Enable IA32_MISC_ENABLE MWAIT bit when exposing mwait/monitor

2019-05-14 Thread Wanpeng Li
From: Wanpeng Li The CPUID.01H:ECX[bit 3] ought to mirror the value of the MSR IA32_MISC_ENABLE MWAIT bit and as userspace has control of them both, it is userspace's job to configure both bits to match on the initial setup. Cc: Eduardo Habkost Cc: Paolo Bonzini Cc: Radim Krčmář Signed

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2018-12-10 Thread Wanpeng Li
On Fri, 19 May 2017 at 16:10, Jay Zhou wrote: > > Hi Paolo and Wanpeng, > > On 2017/5/17 16:38, Wanpeng Li wrote: > > 2017-05-17 15:43 GMT+08:00 Paolo Bonzini : > >>> Recently, I have tested the performance before migration and after > >>> migrat

Re: [Qemu-devel] [PATCH] target-i386: adds PV_SEND_IPI CPUID feature bit

2018-08-07 Thread Wanpeng Li
Hi Eduardo, On Tue, 3 Jul 2018 at 05:43, Eduardo Habkost wrote: > > On Mon, Jul 02, 2018 at 06:22:51PM +0800, Wanpeng Li wrote: > > From: Wanpeng Li > > > > Adds PV_SEND_IPI CPUID feature bit. > > > > Thanks! > > Paolo, Radim: can I assume the bit

Re: [Qemu-devel] [PATCH] target-i386: adds PV_SEND_IPI CPUID feature bit

2018-07-23 Thread Wanpeng Li
Ping, On Tue, 3 Jul 2018 at 05:43, Eduardo Habkost wrote: > > On Mon, Jul 02, 2018 at 06:22:51PM +0800, Wanpeng Li wrote: > > From: Wanpeng Li > > > > Adds PV_SEND_IPI CPUID feature bit. > > > > Thanks! > > Paolo, Radim: can I assume the bit is already

[Qemu-devel] [PATCH v2] target-i386: coalesced PIO support for RTC

2018-07-11 Thread Wanpeng Li
-by: Wanpeng Li --- v1 -> v2: * add the original author accel/kvm/kvm-all.c | 56 +++ hw/timer/mc146818rtc.c| 8 +++ include/exec/memattrs.h | 1 + include/exec/memory.h | 5 + include/sysemu/kvm.h | 8 +++ linux-head

[Qemu-devel] [PATCH] target-i386: coalesced PIO support for RTC

2018-07-10 Thread Wanpeng Li
%92.72% 67.15us ( +- 7.93% ) After patch: IO Port Access Samples Samples% Time%Avg time 0x70:POUT1750945.42%42.08% 6.37us ( +- 20.37% ) Thanks to Peng Hao's initial patch. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Eduardo Habkost Signed-off-by: Wanpeng Li --- accel

Re: [Qemu-devel] [PATCH v3 1/2] kvm: support -dedicated cpu-pm=on|off

2018-07-04 Thread Wanpeng Li
On Wed, 20 Jun 2018 at 10:41, Michael S. Tsirkin wrote: > > On Wed, Jun 20, 2018 at 08:46:10AM +0800, Wanpeng Li wrote: > > On Wed, 20 Jun 2018 at 08:07, Michael S. Tsirkin wrote: > > > > > > On Tue, Jun 19, 2018 at 05:07:46PM -0500, Eric Blake wrote: > &g

[Qemu-devel] [PATCH] target-i386: adds PV_SEND_IPI CPUID feature bit

2018-07-02 Thread Wanpeng Li
From: Wanpeng Li Adds PV_SEND_IPI CPUID feature bit. Cc: Paolo Bonzini Cc: Eduardo Habkost Cc: Radim Krčmář Cc: Vitaly Kuznetsov Signed-off-by: Wanpeng Li --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

Re: [Qemu-devel] [PATCH v3 1/2] kvm: support -dedicated cpu-pm=on|off

2018-06-19 Thread Wanpeng Li
on' reads reasonably well. > > Yes but host resource what? I feel it says nothing at all about what > one can expect to find in this flag. > > > About the only other noun I could think of would be '-feature cpu-pm=on'. > > If we have nothing at all to say about what is grouping these things, > we don't need a new flag. We can make it a machine property. > > It's user's hint that some host resource is dedicated to a VM. The commit 633711e82 (kvm: rename KVM_HINTS_DEDICATED to KVM_HINTS_REALTIME) should be reverted according to several threads discussion I think. Regards, Wanpeng Li

Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-05-11 Thread Wanpeng Li
2018-05-12 5:57 GMT+08:00 Michael S. Tsirkin <m...@redhat.com>: > On Wed, Apr 18, 2018 at 09:09:19AM +0800, Wanpeng Li wrote: >> 2018-04-18 2:08 GMT+08:00 Michael S. Tsirkin <m...@redhat.com>: >> > On Tue, Apr 17, 2018 at 01:24:15AM -0700, Wanpeng Li wrote:

Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-04-17 Thread Wanpeng Li
2018-04-18 4:59 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>: > On Tue, Apr 17, 2018 at 01:24:15AM -0700, Wanpeng Li wrote: [.../...] >> >> +if (env->features[FEAT_KVM_HINTS] & KVM_HINTS_DEDICATED) { >> +int disable_exits =

Re: [Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-04-17 Thread Wanpeng Li
2018-04-18 2:08 GMT+08:00 Michael S. Tsirkin <m...@redhat.com>: > On Tue, Apr 17, 2018 at 01:24:15AM -0700, Wanpeng Li wrote: >> From: Wanpeng Li <wanpen...@tencent.com> >> >> This patch adds support for KVM_CAP_X86_DISABLE_EXITS. Provides usersp

[Qemu-devel] [PATCH RESEND v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-04-17 Thread Wanpeng Li
From: Wanpeng Li <wanpen...@tencent.com> This patch adds support for KVM_CAP_X86_DISABLE_EXITS. Provides userspace with per-VM capability(KVM_CAP_X86_DISABLE_EXITS) to not intercept MWAIT/HLT/PAUSE in order that to improve latency in some workloads. Cc: Paolo Bonzini <pbonz...@redha

[Qemu-devel] [PATCH v2] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-04-17 Thread Wanpeng Li
From: Wanpeng Li <wanpen...@tencent.com> This patch adds support for KVM_CAP_X86_DISABLE_EXITS. Provides userspace with per-VM capability(KVM_CAP_X86_DISABLE_EXITS) to not intercept MWAIT/HLT/PAUSE in order that to improve latency in some workloads. Cc: Paolo Bonzini <pbonz...@redha

Re: [Qemu-devel] [PATCH for-2.12] i386: Don't automatically enable FEAT_KVM_HINTS bits

2018-04-10 Thread Wanpeng Li
t; This adds a new FeatureWordInfo::no_autoenable_flags field, that > can be used to prevent FEAT_KVM_HINTS bits to be enabled > automatically. > > Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> > Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Thanks for the patch, Eduardo! Teste

Re: [Qemu-devel] [PATCH] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-04-10 Thread Wanpeng Li
Hi Paolo, 2018-03-27 3:43 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>: > On Sun, Mar 25, 2018 at 11:33:01AM +0800, Wanpeng Li wrote: >> 2018-03-24 4:18 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>: >> > On Fri, Mar 16, 2018 at 07:36:42AM -0700, Wanpeng Li

Re: [Qemu-devel] [PATCH] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-03-24 Thread Wanpeng Li
2018-03-24 4:18 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>: > On Fri, Mar 16, 2018 at 07:36:42AM -0700, Wanpeng Li wrote: >> From: Wanpeng Li <wanpen...@tencent.com> >> >> This patch adds support for KVM_CAP_X86_DISABLE_EXITS. Provides usersp

Re: [Qemu-devel] [PATCH] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-03-16 Thread Wanpeng Li
ble_exits = kvm_check_extension(cs->kvm_state, > KVM_CAP_X86_DISABLE_EXITS); > > ERROR: line over 90 characters > #58: FILE: target/i386/kvm.c:1009: > +if (kvm_vm_enable_cap(cs->kvm_state, KVM_CAP_X86_DISABLE_EXITS, 0, > disable_exits)) { > > total: 1 errors, 1 wa

[Qemu-devel] [PATCH] i386/kvm: add support for KVM_CAP_X86_DISABLE_EXITS

2018-03-16 Thread Wanpeng Li
From: Wanpeng Li <wanpen...@tencent.com> This patch adds support for KVM_CAP_X86_DISABLE_EXITS. Provides userspace with per-VM capability(KVM_CAP_X86_DISABLE_EXITS) to not intercept MWAIT/HLT/PAUSE in order that to improve latency in some workloads. Cc: Paolo Bonzini <pbonz...@redha

Re: [Qemu-devel] [PATCH v2] target-i386: add KVM_HINTS_DEDICATED performance hint

2018-03-09 Thread Wanpeng Li
2018-03-09 22:16 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>: > On Fri, Feb 09, 2018 at 06:15:25AM -0800, Wanpeng Li wrote: >> From: Wanpeng Li <wanpen...@tencent.com> >> >> Add KVM_HINTS_DEDICATED performance hint, guest checks this feature bit >> to d

Re: [Qemu-devel] [PATCH v2] target-i386: add KVM_HINTS_DEDICATED performance hint

2018-02-28 Thread Wanpeng Li
Ping, 2018-02-09 22:15 GMT+08:00 Wanpeng Li <kernel...@gmail.com>: > From: Wanpeng Li <wanpen...@tencent.com> > > Add KVM_HINTS_DEDICATED performance hint, guest checks this feature bit > to determine if they run on dedicated vCPUs, allowing optimizations such > as

Re: [Qemu-devel] [PATCH] i386: Allow monitor / mwait cpuid override

2018-02-28 Thread Wanpeng Li
gt; >>> Is there any plan for this patch? >>> >>> Or May I send a updated version based on yours? @Alex? >> Oh, did I drop the ball on this one? If that's the case, sure, go ahead. > Hi, it is probably best to implement this feature based on the > HINT_DEDI

Re: [Qemu-devel] [PATCH v2] target-i386: add KVM_HINTS_DEDICATED performance hint

2018-02-09 Thread Wanpeng Li
2018-02-09 22:31 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>: > On Fri, Feb 09, 2018 at 06:15:25AM -0800, Wanpeng Li wrote: >> From: Wanpeng Li <wanpen...@tencent.com> >> >> Add KVM_HINTS_DEDICATED performance hint, guest checks this feature bit >> to d

Re: [Qemu-devel] [PATCH] target-i386: adds PV_DEDICATED hint CPUID feature bit

2018-02-09 Thread Wanpeng Li
2018-02-09 16:41 GMT+08:00 Paolo Bonzini <bonz...@gnu.org>: > On 08/02/2018 10:44, Wanpeng Li wrote: >> From: Wanpeng Li <wanpen...@tencent.com> >> >> Add PV_DEDICATED hint cpuid feature bit. > > Please add a new feature word, since this is not a PV feature

Re: [Qemu-devel] [PATCH] target-i386: adds PV_DEDICATED hint CPUID feature bit

2018-02-09 Thread Wanpeng Li
2018-02-09 20:46 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>: > On Fri, Feb 09, 2018 at 08:24:26PM +0800, Wanpeng Li wrote: >> 2018-02-09 19:46 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>: >> > On Fri, Feb 09, 2018 at 09:41:41AM +0100, Paolo Bonzini wr

Re: [Qemu-devel] [PATCH] target-i386: adds PV_DEDICATED hint CPUID feature bit

2018-02-09 Thread Wanpeng Li
2018-02-09 19:46 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>: > On Fri, Feb 09, 2018 at 09:41:41AM +0100, Paolo Bonzini wrote: >> On 08/02/2018 19:12, Eduardo Habkost wrote: >> > On Thu, Feb 08, 2018 at 05:44:20PM +0800, Wanpeng Li wrote: >> >> Fro

Re: [Qemu-devel] [PATCH] target-i386: adds PV_DEDICATED hint CPUID feature bit

2018-02-08 Thread Wanpeng Li
2018-02-09 2:12 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>: > On Thu, Feb 08, 2018 at 05:44:20PM +0800, Wanpeng Li wrote: >> From: Wanpeng Li <wanpen...@tencent.com> >> >> Add PV_DEDICATED hint cpuid feature bit. >> > [...] >> diff --git

[Qemu-devel] [PATCH] target-i386: adds PV_DEDICATED hint CPUID feature bit

2018-02-08 Thread Wanpeng Li
From: Wanpeng Li <wanpen...@tencent.com> Add PV_DEDICATED hint cpuid feature bit. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: Eduardo Habkost <ehabk...@redhat.com> Signed-off-by: Wanpeng Li <wanpen...@tencent.com> --- target/i3

Re: [Qemu-devel] [PATCH] target-i386: adds PV_TLB_FLUSH CPUID feature bit

2017-11-09 Thread Wanpeng Li
2017-11-10 15:45 GMT+08:00 Wanpeng Li <kernel...@gmail.com>: > From: Wanpeng Li <wanpeng...@hotmail.com> > > Adds PV_TLB_FLUSH CPUID feature bit. > > Cc: Paolo Bonzini <pbonz...@redhat.com> > Cc: Radim Krčmář <rkrc...@redhat.com> > Cc: Richard Hende

[Qemu-devel] [PATCH] target-i386: adds PV_TLB_FLUSH CPUID feature bit

2017-11-09 Thread Wanpeng Li
From: Wanpeng Li <wanpeng...@hotmail.com> Adds PV_TLB_FLUSH CPUID feature bit. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: Richard Henderson <r...@twiddle.net> Cc: Eduardo Habkost <ehabk...@redhat.com> Signed-off-by: Wanp

Re: [Qemu-devel] qemu core file size

2017-11-06 Thread Wanpeng Li
2017-11-07 14:12 GMT+08:00 Alexey Kardashevskiy <a...@ozlabs.ru>: > On 07/11/17 17:02, Wanpeng Li wrote: >> Hi Alexey, >> 2017-11-07 13:46 GMT+08:00 Alexey Kardashevskiy <a...@ozlabs.ru>: >>> On 07/11/17 01:08, Paolo Bonzini wrote: >>>> On 06/11/2017

Re: [Qemu-devel] qemu core file size

2017-11-06 Thread Wanpeng Li
Hi Alexey, 2017-11-07 13:46 GMT+08:00 Alexey Kardashevskiy <a...@ozlabs.ru>: > On 07/11/17 01:08, Paolo Bonzini wrote: >> On 06/11/2017 13:18, Wanpeng Li wrote: >>> 2017-11-06 20:02 GMT+08:00 Paolo Bonzini <pbonz...@redhat.com>: >>>> On 06/11/2017 12:59

Re: [Qemu-devel] qemu core file size

2017-11-06 Thread Wanpeng Li
2017-11-06 22:08 GMT+08:00 Paolo Bonzini <pbonz...@redhat.com>: > On 06/11/2017 13:18, Wanpeng Li wrote: >> 2017-11-06 20:02 GMT+08:00 Paolo Bonzini <pbonz...@redhat.com>: >>> On 06/11/2017 12:59, Fam Zheng wrote: >>>>>> Could you p

Re: [Qemu-devel] qemu core file size

2017-11-06 Thread Wanpeng Li
ely are not in the RSS. Do you mean not use Memory API will avoid the fragmented heap? Regards, Wanpeng Li

Re: [Qemu-devel] qemu core file size

2017-11-06 Thread Wanpeng Li
2017-11-06 17:41 GMT+08:00 Paolo Bonzini <pbonz...@redhat.com>: > On 06/11/2017 10:11, Wanpeng Li wrote: >> Hi all, >> >> qemu core dump, max_core="unlimited", dump_guest_core=0, kill -11 pid >> to generate a qemu core file, the Rss of qemu itself

[Qemu-devel] qemu core file size

2017-11-06 Thread Wanpeng Li
Hi all, qemu core dump, max_core="unlimited", dump_guest_core=0, kill -11 pid to generate a qemu core file, the Rss of qemu itself is ~40MB, the core file is almost ~40MB in centos 6.x, but ~400MB in cents 7.x, any idea? Regards, Wanpeng Li

Re: [Qemu-devel] [PATCH v3] target-i386/cpu: Add new EPYC CPU model

2017-08-16 Thread Wanpeng Li
ed in kvm/qemu? Regards, Wanpeng Li > > Removed: xop, fma4, tbm > > Cc: Paolo Bonzini <pbonz...@redhat.com> > Cc: Richard Henderson <r...@twiddle.net> > Cc: Eduardo Habkost <ehabk...@redhat.com> > Cc: Tom Lendacky <thomas.lenda...@amd.com> > Signed-

Re: [Qemu-devel] [PATCH] target-i386 : fix a race condition result to lost INIT

2017-07-30 Thread Wanpeng Li
. Why we touch INIT pending if INIT is not latched in SMM? Regards, Wanpeng Li > > Signed-off-by: Peng Hao <peng.h...@zte.com.cn> > --- > target/i386/kvm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/i386/kvm.c b/target/i386/kvm.c

[Qemu-devel] [PATCH v3] KVM: Add async pf flag to KVM_GET/SET_VCPU_EVENTS interface

2017-06-28 Thread Wanpeng Li
From: Wanpeng Li <wanpeng...@hotmail.com> This patch adds async page fault flag to KVM_GET/SET_VCPU_EVENTS interface. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com> --- v2 -> v3: * ne

Re: [Qemu-devel] [PATCH] KVM: Add async pf flag to KVM_GET/SET_VCPU_EVENTS interface

2017-06-21 Thread Wanpeng Li
2017-06-22 0:28 GMT+08:00 Radim Krčmář <rkrc...@redhat.com>: > 2017-06-20 20:14-0700, Wanpeng Li: >> From: Wanpeng Li <wanpeng...@hotmail.com> >> >> This patch adds async pf flag to KVM_GET/SET_VCPU_EVENTS interface. >> >> Signed-off-by: Wanpeng Li

[Qemu-devel] [PATCH v2] KVM: Add async pf flag to KVM_GET/SET_VCPU_EVENTS interface

2017-06-21 Thread Wanpeng Li
From: Wanpeng Li <wanpeng...@hotmail.com> This patch adds async page fault flag to KVM_GET/SET_VCPU_EVENTS interface. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com> --- v1

[Qemu-devel] [PATCH] KVM: Add async pf flag to KVM_GET/SET_VCPU_EVENTS interface

2017-06-20 Thread Wanpeng Li
From: Wanpeng Li <wanpeng...@hotmail.com> This patch adds async pf flag to KVM_GET/SET_VCPU_EVENTS interface. Signed-off-by: Wanpeng Li <wanpeng...@hotmail.com> --- linux-headers/asm-x86/kvm.h | 2 ++ target/i386/cpu.h | 1 + target/i386/kvm.c | 6 +- 3 file

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-17 Thread Wanpeng Li
ll drop during live migration, it will keep a small value if live migration fails and w/o "lazy collapse small sptes into large sptes" codes, however, it will increase gradually if w/ the "lazy collapse small sptes into large sptes" codes. Regards, Wanpeng Li

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-16 Thread Wanpeng Li
misses #9.52% of all iTLB > cache hits (16.67%) > 1,152,784 iTLB-loads > (33.32%) > > 10.000703078 seconds time elapsed > ** Could you comment out the original "lazy collapse small spte

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-12 Thread Wanpeng Li
2017-05-11 22:18 GMT+08:00 Zhoujian (jay) <jianjay.z...@huawei.com>: > Hi Wanpeng, > >> 2017-05-11 21:43 GMT+08:00 Wanpeng Li <kernel...@gmail.com>: >> > 2017-05-11 20:24 GMT+08:00 Paolo Bonzini <pbonz...@redhat.com>: >> >> &g

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-11 Thread Wanpeng Li
2017-05-11 21:43 GMT+08:00 Wanpeng Li <kernel...@gmail.com>: > 2017-05-11 20:24 GMT+08:00 Paolo Bonzini <pbonz...@redhat.com>: >> >> >> On 11/05/2017 14:07, Zhoujian (jay) wrote: >>> -* Scan sptes if dirty logging has been stopped, dropping t

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-05-11 Thread Wanpeng Li
ld->flags & KVM_MEM_LOG_DIRTY_PAGES) && >> - !(new->flags & KVM_MEM_LOG_DIRTY_PAGES)) >> - kvm_mmu_zap_collapsible_sptes(kvm, new); This is an unlikely branch(unless guest live migration fails and continue to run on the source machi

Re: [Qemu-devel] [QEMU PATCH v2] kvmclock: advance clock by time window between vm_stop and pre_save

2017-02-07 Thread Wanpeng Li
ers dont? > > If you are correlating the clocks, then yes. > > Older Linux guests get upset (marking the TSC clocksource unstable > because the watchdog checks TSC vs kvmclock), but there is a workaround for it > in newer guests > (kvmclock interface to notify watchdog to not compl

Re: [Qemu-devel] [PATCH] target-i386: Report known CPUID[EAX=0xD, ECX=0]:EAX bits as migratable

2016-09-29 Thread Wanpeng Li
features by >> default. >> >> This adds a new field to FeatureWordInfo: migratable_flags, which >> will make those features be reported as migratable even if they >> don't have a property name defined. >> >> Reported-by: Wanpeng Li <wanpeng...@hotmail.com> >>

Re: [Qemu-devel] [PATCH v2] target-i386: fix losing XCR0 processor state component bits

2016-09-28 Thread Wanpeng Li
2016-09-29 1:05 GMT+08:00 Eduardo Habkost <ehabk...@redhat.com>: > On Wed, Sep 28, 2016 at 04:36:14PM +0800, Wanpeng Li wrote: [...] > > We still need to report unknown xstate components as unmigratable > (otherwise -cpu host will enable them automatically). See the fix > I

[Qemu-devel] [PATCH v2] target-i386: fix losing XCR0 processor state component bits

2016-09-28 Thread Wanpeng Li
From: Wanpeng Li <wanpeng...@hotmail.com> Commit 96193c22a "target-i386: Move xsave component mask to features array" leverages features array to handle XCR0 processor state component bits, however, it introduces a regression: warning: host doesn't support requested feature: CP

Re: [Qemu-devel] [PATCH] target-i386: fix losing XCR0 processor state component bits

2016-09-28 Thread Wanpeng Li
2016-09-28 15:54 GMT+08:00 Paolo Bonzini <bonz...@gnu.org>: [...] > I think the right place to add the test is x86_cpu_get_migratable_flags. I just sent out v2 to handle this, thanks for pointing out. Regards, Wanpeng Li

[Qemu-devel] [PATCH] target-i386: fix losing XCR0 processor state component bits

2016-09-27 Thread Wanpeng Li
From: Wanpeng Li <wanpeng...@hotmail.com> Commit 96193c22a "target-i386: Move xsave component mask to features array" leverages features array to handle XCR0 processor state component bits, however, it introduces a regression: warning: host doesn't support requested feature: CP

[Qemu-devel] [PATCH] hmp: fix qemu crash due to ioapic state dump w/ split irqchip

2016-09-22 Thread Wanpeng Li
From: Wanpeng Li <wanpeng...@hotmail.com> The qemu will crash when info ioapic through hmp if irqchip is split. Below message is splat: KVM_GET_IRQCHIP failed: Unknown error -6 This patch fix it by dumping the ioapic state from the qemu emulated ioapic if irqchip is split. Cc: Paolo B

[Qemu-devel] [PATCH v2] pc: apic: introduce APIC macro

2016-09-15 Thread Wanpeng Li
From: Wanpeng Li <wanpeng...@hotmail.com> Introduce a new APIC macro to replace APIC_COMMON macro in hw/intc/apic.c in order to capture access LAPIC in qemu even if LAPIC is emulated in kvm. Suggested-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Michael S. Tsirkin <m...

Re: [Qemu-devel] [PATCH] pc: apic: introduce APIC macro

2016-09-15 Thread Wanpeng Li
gt; "apic" in apic.c by TYPE_APIC. Will do, thanks for your review. Regards, Wanpeng Li

[Qemu-devel] [PATCH] pc: apic: introduce APIC macro

2016-09-14 Thread Wanpeng Li
From: Wanpeng Li <wanpeng...@hotmail.com> Introduce a new APIC macro to replace APIC_COMMON macro in hw/intc/apic.c in order to capture access LAPIC in qemu even if LAPIC is emulated in kvm. Suggested-by: Paolo Bonzini <pbonz...@redhat.com> Cc: Paolo Bonzini <pbonz...@redhat

[Qemu-devel] [PATCH v2] pc: apic: fix touch LAPIC when irqchip is split

2016-09-13 Thread Wanpeng Li
From: Wanpeng Li <wanpeng...@hotmail.com> Add -kernel_irqchip=split ./x86-run x86/eventinj.flat qemu-system-x86_64 -enable-kvm -machine kernel_irqchip=split -cpu host -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -kern

Re: [Qemu-devel] [PATCH] pc: apic: fix touch LAPIC when irqchip is split

2016-09-13 Thread Wanpeng Li
: pc: apic: fix touch LAPIC when irqchip is split... >> ERROR: suspect code indent for conditional statements (4, 9) >> #90: FILE: hw/i386/pc.c:164: >> +if (!kvm_irqchip_in_kernel()) { >> + intno = apic_get_interrupt(cpu->apic_state); > ^ > Should be 4 spaces here. > >> >> ERROR: suspect code indent for conditional statements (9, 13) >> #92: FILE: hw/i386/pc.c:166: >> + if (intno >= 0) { >> + return intno; > > Then this and later will be indented back by 1 column. You are right, thanks Fam. Regards, Wanpeng Li

[Qemu-devel] [PATCH] pc: apic: fix touch LAPIC when irqchip is split

2016-09-13 Thread Wanpeng Li
From: Wanpeng Li <wanpeng...@hotmail.com> Add -kernel_irqchip=split ./x86-run x86/eventinj.flat qemu-system-x86_64 -enable-kvm -machine kernel_irqchip=split -cpu host -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -kern

Re: [Qemu-devel] [PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-09-01 Thread Wanpeng Li
migration downtime to avoid customers' >> perception than total time, however, this feature will increase downtime >> when acquire the benefit of reducing total time, maybe it will be more >> acceptable if there is no downside for downtime. >> >> Regards, >> Wanpeng Li

Re: [Qemu-devel] [PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration

2016-08-31 Thread Wanpeng Li
feature will increase downtime when acquire the benefit of reducing total time, maybe it will be more acceptable if there is no downside for downtime. Regards, Wanpeng Li

Re: [Qemu-devel] [PATCH v1 0/7] KVM: Hyper-V SynIC timers

2015-12-01 Thread Wanpeng Li
2015-11-26 16:34 GMT+08:00 Andrey Smetanin <asmeta...@virtuozzo.com>: > > > On 11/26/2015 08:28 AM, Wanpeng Li wrote: >> >> 2015-11-25 23:20 GMT+08:00 Andrey Smetanin <asmeta...@virtuozzo.com>: >>> >>> Per Hyper-V specification (and as required

Re: [Qemu-devel] [PATCH v1 0/7] KVM: Hyper-V SynIC timers

2015-11-26 Thread Wanpeng Li
2015-11-26 16:34 GMT+08:00 Andrey Smetanin <asmeta...@virtuozzo.com>: > > > On 11/26/2015 08:28 AM, Wanpeng Li wrote: >> >> 2015-11-25 23:20 GMT+08:00 Andrey Smetanin <asmeta...@virtuozzo.com>: >>> >>> Per Hyper-V specification (and as required

Re: [Qemu-devel] [PATCH v1 0/7] KVM: Hyper-V SynIC timers

2015-11-25 Thread Wanpeng Li
format message > to the configured SynIC message slot and triggering the corresponding > synthetic interrupt. Could you post a link for this specification? Regards, Wanpeng Li

Re: [Qemu-devel] [PATCH 7/12] kvm/x86: added hyper-v crash data and ctl msr's get/set'ers

2015-08-18 Thread Wanpeng Li
the KVM_CAP_HYPERV_MSR_CRASH in this patchset. :( Regards, Wanpeng Li

Re: [Qemu-devel] [PATCH v5] i386: Introduce ARAT CPU feature

2015-06-23 Thread Wanpeng Li
to stopping of the timer in certain power states (which we do not even emulate IIRC). In that case, the OS is under risk of sleeping forever, thus need to look for a different wakeup source. HPET will always be the default broadcast event device I think. Regards, Wanpeng Li Live-migration or VM pausing

[Qemu-devel] [PATCH] target-i386: Intel xsaves

2014-12-02 Thread Wanpeng Li
Add xsaves related definition, it also add corresponding part to kvm_get/put, and vmstate. Signed-off-by: Wanpeng Li wanpeng...@linux.intel.com --- target-i386/cpu.h | 2 ++ target-i386/kvm.c | 15 +++ target-i386/machine.c | 3 ++- 3 files changed, 19 insertions(+), 1

[Qemu-devel] [PATCH v2] target-i386: Intel xsaves

2014-12-02 Thread Wanpeng Li
Add xsaves related definition, it also adds corresponding part to kvm_get/put, and vmstate. Signed-off-by: Wanpeng Li wanpeng...@linux.intel.com --- v1 - v2: * use a subsection instead of bumping the version number. target-i386/cpu.h | 2 ++ target-i386/kvm.c | 15

[Qemu-devel] [PATCH RESCEND v2] target-i386: Intel xsaves

2014-12-02 Thread Wanpeng Li
Add xsaves related definition, it also adds corresponding part to kvm_get/put, and vmstate. Signed-off-by: Wanpeng Li wanpeng...@linux.intel.com --- v1 - v2: * use a subsection instead of bumping the version number. target-i386/cpu.h | 2 ++ target-i386/kvm.c | 15

Re: [Qemu-devel] [question] Is there a plan to introduce a unified co-scheduling mechanism to CFS ?

2014-10-10 Thread Wanpeng Li
desired when several cooperating threads/task is running in guest. Is there a plane for this work? Please refer to gang scheduler. Regards, Wanpeng Li Thanks, Zhang Haoyu -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More

Re: [Qemu-devel] QEMU NUMA and memory allocation problem

2013-05-19 Thread Wanpeng Li
, Wanpeng Li Thanks, Wanlong Gao Hi, We just met a problem of QEMU memory allocation. Here is the description: On my host, I have two nodes, # numactl -H available: 2 nodes (0-1) node 0 cpus: 0 2 node 0 size: 4010 MB node 0 free: 3021 MB node 1 cpus: 1 3 node 1 size: 4030 MB node 1

Re: [Qemu-devel] [PATCH v5 0/3] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-11-14 Thread Wanpeng Li
On Thu, Nov 08, 2012 at 01:36:09PM +0800, Wanpeng Li wrote: This series aggressively refactors the PC machine initialization to be more modelled and less ad-hoc. The highlights of this series are: 1) Things like -m and -bios-name are now device model properties 2) The i440fx and piix3 are now

[Qemu-devel] [PATCH v5 0/3] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-11-07 Thread Wanpeng Li
This series aggressively refactors the PC machine initialization to be more modelled and less ad-hoc. The highlights of this series are: 1) Things like -m and -bios-name are now device model properties 2) The i440fx and piix3 are now modelled in a thorough fashion 3) i440fx_init is trivialized

[Qemu-devel] [PATCH v5 3/3] convert pci-host to QOM

2012-11-07 Thread Wanpeng Li
Take advantage of Andreas's pci-host patchset, add instance_init function to fully implement convert pci-host to QOM. Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/pci_host.c |9 + 1 files changed, 9 insertions(+), 0

[Qemu-devel] [PATCH 01/10] convert RTC as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert RTC as piix3 proper QOM child. RTC creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw

[Qemu-devel] [PATCH 04/10] convert PCSPK as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert PCSPK as piix3 proper QOM child. PCSPK creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/pcspk.c | 19 +-- hw/pcspk.h

[Qemu-devel] [PATCH 06/10] convert i8042 as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert i8042 as piix3 proper QOM child. I8042 creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/pc.c|9 ++--- hw/pckbd.c | 24

[Qemu-devel] [PATCH 07/10] convert VMPORT as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert VMPORT as piix3 proper QOM child. VMPORT creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/pc.c |1 - hw/pc.h |5 - hw

[Qemu-devel] [PATCH 08/10] convert VMMOUSE as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert VMMOUSE as piix3 proper QOM child. VMMOUSE creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/pc.c | 15 ++- hw/piix3.c

[Qemu-devel] [PATCH 10/10] convert IOAPIC as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert IOAPIC as piix3 proper QOM child. IOAPIC creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/ioapic.c |2 +- hw/ioapic.h

[Qemu-devel] [PATCH v5 2/3] merge pc_piix.c to pc.c

2012-11-07 Thread Wanpeng Li
things worse. Making things proper objects and using composition is the right way to share common devices. By pulling these files back together, we can start to fix some of this mess. Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/i386

[Qemu-devel] [PATCH 02/10] convert HPET as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert HPET as piix3 proper QOM child. HPET creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw

[Qemu-devel] [PATCH 05/10] convert PORT92 as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert PORT92 as piix3 proper QOM child. PORT92 creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/pc.c| 25 - hw

[Qemu-devel] [PATCH 00/10] piix3: create all child devices as proper QOM children

2012-11-07 Thread Wanpeng Li
child device in the PIIX3 ::init function. Anthony Liguori (3): convert RTC as piix3 proper QOM child convert HPET as piix3 proper QOM child convert PIT as piix3 proper QOM child Wanpeng Li (7): convert PCSPK as piix3 proper QOM child convert PORT92 as piix3 proper QOM child convert I8042

[Qemu-devel] [PATCH 03/10] convert PIT as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert PIT as piix3 proper QOM child. PIT creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw

[Qemu-devel] [PATCH 09/10] convert IDE as piix3 proper QOM child

2012-11-07 Thread Wanpeng Li
convert IDE as piix3 proper QOM child. IDE creation for the PIIX3 is done by calling object_init() with qdev_init() being called for each child device in the PIIX3 ::init function. Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/i440fx.c |6 ++ hw/ide.h |6

[Qemu-devel] [PATCH v5 0/3] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-07-23 Thread Wanpeng Li
::init today) will be called right before the guest starts up for the first time. Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com Change in v5: * drop patch convert MemoryRegion to QOM and prepare to create HPET, RTC and i8254 through composition

[Qemu-devel] [PATCH v5 3/3] convert pci-host to QOM

2012-07-23 Thread Wanpeng Li
From: Anthony Liguori aligu...@us.ibm.com makes pci_host a proper QOM type. Changelog: * against Andreas pci_host branch * make host bridge TypeInfos const * use PCI_HOST_BRIDGE() where appropriate Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw

[Qemu-devel] [PATCH v5 2/3] merge pc_piix.c to pc.c

2012-07-23 Thread Wanpeng Li
From: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/i386/Makefile.objs |1 - hw/pc.c | 695 + hw/pc.h | 46

[Qemu-devel] [PATCH v5 1/3] eliminate piix_pci.c and module i440fx and piix3

2012-07-23 Thread Wanpeng Li
the fact that the PMC is contained within the i440fx which we will now reflect in composition in the next few changesets. Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/i386/Makefile.objs |2 +- hw/i440fx.c | 434

  1   2   >