From: Maxim Levitsky <mlevitsk@redhat.com> To: qemu-devel@nongnu.org Cc: Richard Henderson <richard.henderson@linaro.org>, Marcelo Tosatti <mtosatti@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, kvm@vger.kernel.org, Maxim Levitsky <mlevitsk@redhat.com> Subject: [PATCH 0/2] RFC: Precise TSC migration Date: Mon, 30 Nov 2020 15:38:43 +0200 [thread overview] Message-ID: <20201130133845.233552-1-mlevitsk@redhat.com> (raw) Note that to use this feature you need the kernel patches which are posted to LKML and kvm@vger.kernel.org Currently the feature is disabled by default, and enabled with x-precise-tsc cpu feature. Also I changed the TSC and TSC adjust read/write code to go though a special function kvm_get_tsc/kvm_set_tsc regardless of enablement of this feature. The side effect of this is that now we upload to the kernel the TSC_ADJUST msr only on KVM_PUT_RESET_STATE reset level. This shouldn't matter as I don't think that qemu changes this msr on its own. For migration I added new state field 'tsc_nsec_info', where I save the 'nsec since epoch' timestamp, which is the only new thing that was added to the migration state. First patch in this series is temporary and it just updates the kernel headers to make qemu compile. When the feature is merged to the kernel, a kernel header sync will bring the same changes to the qemu, making this patch unnecessary. Best regards, Maxim Levitsky Maxim Levitsky (2): Update the kernel headers for 5.10-rc5 + TSC Implement support for precise TSC migration include/standard-headers/asm-x86/kvm_para.h | 1 + linux-headers/asm-x86/kvm.h | 2 + linux-headers/linux/kvm.h | 70 +++++++++- target/i386/cpu.c | 1 + target/i386/cpu.h | 4 + target/i386/kvm.c | 141 ++++++++++++++++---- target/i386/machine.c | 20 +++ 7 files changed, 211 insertions(+), 28 deletions(-) -- 2.26.2
WARNING: multiple messages have this Message-ID (diff)
From: Maxim Levitsky <mlevitsk@redhat.com> To: qemu-devel@nongnu.org Cc: Marcelo Tosatti <mtosatti@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Maxim Levitsky <mlevitsk@redhat.com>, Paolo Bonzini <pbonzini@redhat.com> Subject: [PATCH 0/2] RFC: Precise TSC migration Date: Mon, 30 Nov 2020 15:38:43 +0200 [thread overview] Message-ID: <20201130133845.233552-1-mlevitsk@redhat.com> (raw) Note that to use this feature you need the kernel patches which are posted to LKML and kvm@vger.kernel.org Currently the feature is disabled by default, and enabled with x-precise-tsc cpu feature. Also I changed the TSC and TSC adjust read/write code to go though a special function kvm_get_tsc/kvm_set_tsc regardless of enablement of this feature. The side effect of this is that now we upload to the kernel the TSC_ADJUST msr only on KVM_PUT_RESET_STATE reset level. This shouldn't matter as I don't think that qemu changes this msr on its own. For migration I added new state field 'tsc_nsec_info', where I save the 'nsec since epoch' timestamp, which is the only new thing that was added to the migration state. First patch in this series is temporary and it just updates the kernel headers to make qemu compile. When the feature is merged to the kernel, a kernel header sync will bring the same changes to the qemu, making this patch unnecessary. Best regards, Maxim Levitsky Maxim Levitsky (2): Update the kernel headers for 5.10-rc5 + TSC Implement support for precise TSC migration include/standard-headers/asm-x86/kvm_para.h | 1 + linux-headers/asm-x86/kvm.h | 2 + linux-headers/linux/kvm.h | 70 +++++++++- target/i386/cpu.c | 1 + target/i386/cpu.h | 4 + target/i386/kvm.c | 141 ++++++++++++++++---- target/i386/machine.c | 20 +++ 7 files changed, 211 insertions(+), 28 deletions(-) -- 2.26.2
next reply other threads:[~2020-11-30 13:40 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-30 13:38 Maxim Levitsky [this message] 2020-11-30 13:38 ` [PATCH 0/2] RFC: Precise TSC migration Maxim Levitsky 2020-11-30 13:38 ` [PATCH 1/2] Update the kernel headers for 5.10-rc5 + TSC Maxim Levitsky 2020-11-30 13:38 ` Maxim Levitsky 2020-11-30 13:38 ` [PATCH 2/2] Implement support for precise TSC migration Maxim Levitsky 2020-11-30 13:38 ` Maxim Levitsky -- strict thread matches above, loose matches on Subject: below -- 2020-11-30 13:35 [PATCH 0/2] RFC: Precise " Maxim Levitsky 2020-11-30 16:54 ` Andy Lutomirski 2020-11-30 16:59 ` Paolo Bonzini 2020-11-30 19:16 ` Marcelo Tosatti 2020-12-01 12:30 ` Maxim Levitsky 2020-12-01 19:48 ` Marcelo Tosatti 2020-12-03 11:39 ` Maxim Levitsky 2020-12-03 20:18 ` Marcelo Tosatti 2020-12-07 13:00 ` Maxim Levitsky 2020-12-01 13:48 ` Thomas Gleixner 2020-12-01 15:02 ` Marcelo Tosatti 2020-12-03 11:51 ` Maxim Levitsky 2020-12-01 14:01 ` Thomas Gleixner 2020-12-01 16:19 ` Andy Lutomirski 2020-12-03 11:57 ` Maxim Levitsky 2020-12-01 19:35 ` Thomas Gleixner 2020-12-03 11:41 ` Paolo Bonzini 2020-12-03 12:47 ` Maxim Levitsky
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201130133845.233552-1-mlevitsk@redhat.com \ --to=mlevitsk@redhat.com \ --cc=cohuck@redhat.com \ --cc=ehabkost@redhat.com \ --cc=kvm@vger.kernel.org \ --cc=mst@redhat.com \ --cc=mtosatti@redhat.com \ --cc=pbonzini@redhat.com \ --cc=qemu-devel@nongnu.org \ --cc=richard.henderson@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.