From: Marcelo Tosatti <mtosatti@redhat.com>
To: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
X86 <x86@kernel.org>, Avi Kivity <avi@redhat.com>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Alexander Graf <agraf@suse.de>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Gleb Natapov <gleb@redhat.com>,
Randy Dunlap <rdunlap@xenotime.net>,
linux-doc@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
KVM <kvm@vger.kernel.org>,
Virtualization <virtualization@lists.linux-foundation.org>,
Xen <xen-devel@lists.xensource.com>,
Sasha Levin <levinsasha928@gmail.com>,
Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Subject: Re: [PATCH RFC V5 3/6] kvm : Add unhalt msr to aid (live) migration
Date: Wed, 11 Apr 2012 21:15:17 -0300 [thread overview]
Message-ID: <20120412001517.GB32051@amt.cnet> (raw)
In-Reply-To: <20120323080723.14568.23068.sendpatchset@codeblue>
On Fri, Mar 23, 2012 at 01:37:26PM +0530, Raghavendra K T wrote:
> 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:
Unless there is a reason to use an MSR, should use a normal ioctl
such as KVM_{GET,SET}_MP_STATE.
next prev parent reply other threads:[~2012-04-12 0:19 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 ` [PATCH RFC V5 3/6] kvm : Add unhalt msr to aid (live) migration Raghavendra K T
2012-04-12 0:15 ` Marcelo Tosatti [this message]
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=20120412001517.GB32051@amt.cnet \
--to=mtosatti@redhat.com \
--cc=agraf@suse.de \
--cc=avi@redhat.com \
--cc=gleb@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=raghavendra.kt@linux.vnet.ibm.com \
--cc=rdunlap@xenotime.net \
--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
all inboxes | Powered by JetHome®