From: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
To: Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>, X86 <x86@kernel.org>,
KVM <kvm@vger.kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
LKML <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-doc@vger.kernel.org, Xen <xen-devel@lists.xensource.com>,
Avi Kivity <avi@redhat.com>,
Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
Virtualization <virtualization@lists.linux-foundation.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Sasha Levin <levinsasha928@gmail.com>
Subject: [PATCH RFC V5 3/6] kvm : Add unhalt msr to aid (live) migration
Date: Fri, 23 Mar 2012 13:37:26 +0530 [thread overview]
Message-ID: <20120323080723.14568.23068.sendpatchset@codeblue> (raw)
In-Reply-To: <20120323080503.14568.43092.sendpatchset@codeblue>
From: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Currently guest does not need to know pv_unhalt state and intended to be
used via GET/SET_MSR ioctls during migration.
Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
---
diff --git a/arch/x86/include/asm/kvm_para.h b/arch/x86/include/asm/kvm_para.h
index 9234f13..46f9751 100644
--- a/arch/x86/include/asm/kvm_para.h
+++ b/arch/x86/include/asm/kvm_para.h
@@ -40,6 +40,7 @@
#define MSR_KVM_SYSTEM_TIME_NEW 0x4b564d01
#define MSR_KVM_ASYNC_PF_EN 0x4b564d02
#define MSR_KVM_STEAL_TIME 0x4b564d03
+#define MSR_KVM_PV_UNHALT 0x4b564d04
struct kvm_steal_time {
__u64 steal;
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index bd5ef91..38e6c47 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -784,12 +784,13 @@ EXPORT_SYMBOL_GPL(kvm_rdpmc);
* kvm-specific. Those are put in the beginning of the list.
*/
-#define KVM_SAVE_MSRS_BEGIN 9
+#define KVM_SAVE_MSRS_BEGIN 10
static u32 msrs_to_save[] = {
MSR_KVM_SYSTEM_TIME, MSR_KVM_WALL_CLOCK,
MSR_KVM_SYSTEM_TIME_NEW, MSR_KVM_WALL_CLOCK_NEW,
HV_X64_MSR_GUEST_OS_ID, HV_X64_MSR_HYPERCALL,
HV_X64_MSR_APIC_ASSIST_PAGE, MSR_KVM_ASYNC_PF_EN, MSR_KVM_STEAL_TIME,
+ MSR_KVM_PV_UNHALT,
MSR_IA32_SYSENTER_CS, MSR_IA32_SYSENTER_ESP, MSR_IA32_SYSENTER_EIP,
MSR_STAR,
#ifdef CONFIG_X86_64
@@ -1606,7 +1607,9 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
kvm_make_request(KVM_REQ_STEAL_UPDATE, vcpu);
break;
-
+ case MSR_KVM_PV_UNHALT:
+ vcpu->pv_unhalted = (u32) data;
+ break;
case MSR_IA32_MCG_CTL:
case MSR_IA32_MCG_STATUS:
case MSR_IA32_MC0_CTL ... MSR_IA32_MC0_CTL + 4 * KVM_MAX_MCE_BANKS - 1:
@@ -1917,6 +1920,9 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
case MSR_KVM_STEAL_TIME:
data = vcpu->arch.st.msr_val;
break;
+ case MSR_KVM_PV_UNHALT:
+ data = (u64)vcpu->pv_unhalted;
+ break;
case MSR_IA32_P5_MC_ADDR:
case MSR_IA32_P5_MC_TYPE:
case MSR_IA32_MCG_CAP:
next prev parent reply other threads:[~2012-03-23 8:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-23 8:05 [PATCH RFC V5 0/6] kvm : Paravirt-spinlock support for KVM guests Raghavendra K T
2012-03-23 8:06 ` [PATCH RFC V5 1/6] debugfs: Add support to print u32 array in debugfs Raghavendra K T
2012-03-30 20:49 ` [Xen-devel] " Konrad Rzeszutek Wilk
2012-03-30 21:11 ` Greg KH
2012-03-23 8:07 ` [PATCH RFC V5 2/6] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks Raghavendra K T
2012-04-12 0:06 ` Marcelo Tosatti
2012-04-12 0:29 ` Marcelo Tosatti
2012-04-17 7:06 ` Raghavendra K T
2012-04-17 3:49 ` Raghavendra K T
2012-03-23 8:07 ` Raghavendra K T [this message]
2012-04-12 0:15 ` [PATCH RFC V5 3/6] kvm : Add unhalt msr to aid (live) migration Marcelo Tosatti
2012-04-17 7:17 ` Raghavendra K T
2012-03-23 8:08 ` [PATCH RFC V5 4/6] kvm guest : Added configuration support to enable debug information for KVM Guests Raghavendra K T
2012-03-23 8:08 ` [PATCH RFC V5 5/6] kvm : pv-ticketlocks support for linux guests running on KVM hypervisor Raghavendra K T
2012-03-23 8:08 ` [PATCH RFC V5 6/6] Documentation/kvm : Add documentation on Hypercalls and features used for PV spinlock Raghavendra K T
2012-03-28 18:32 ` [PATCH RFC V5 0/6] kvm : Paravirt-spinlock support for KVM guests Raghavendra K T
2012-04-12 0:26 ` Marcelo Tosatti
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=20120323080723.14568.23068.sendpatchset@codeblue \
--to=raghavendra.kt@linux.vnet.ibm.com \
--cc=avi@redhat.com \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=vatsa@linux.vnet.ibm.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xensource.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).