From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1LZg-0000w8-Ua for qemu-devel@nongnu.org; Wed, 07 Sep 2011 13:06:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1LZc-0004GM-Qi for qemu-devel@nongnu.org; Wed, 07 Sep 2011 13:06:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1LZc-0004GE-Ha for qemu-devel@nongnu.org; Wed, 07 Sep 2011 13:06:04 -0400 Message-ID: <4E67A478.9030505@redhat.com> Date: Wed, 07 Sep 2011 20:06:00 +0300 From: Avi Kivity MIME-Version: 1.0 References: <4E521EF9.7020404@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] KVM: emulate lapic tsc deadline timer for hvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Liu, Jinsong" Cc: "Tian, Kevin" , Marcelo Tosatti , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" On 09/07/2011 07:45 PM, Liu, Jinsong wrote: > Avi Kivity wrote: > >> > >> --- a/arch/x86/include/asm/msr-index.h > >> +++ b/arch/x86/include/asm/msr-index.h > >> @@ -229,6 +229,8 @@ > >> #define MSR_IA32_APICBASE_ENABLE (1<<11) > >> #define MSR_IA32_APICBASE_BASE (0xfffff<<12) > >> > >> +#define MSR_IA32_TSCDEADLINE 0x000006e0 > >> + > >> #define MSR_IA32_UCODE_WRITE 0x00000079 > >> #define MSR_IA32_UCODE_REV 0x0000008b > >> > > > > Need to add to msrs_to_save so live migration works. > > > > 2 questions: > 1). how about add to emulated_msrs instead of msrs_to_save? msrs_to_save modified at runtime and depend on capacibility of host cpu. Look at kvm_init_msrs_list(), it does the checks. > 2). do we need add code at qemu (kvm_get_msrs/ kvm_put_msrs) to expose MSR_IA32_TSCDEADLINE to userspace? > It should be automatic. Better check it though that you can live-migrate a guest that uses TSC deadline. Please add a testcase to kvm-unit-tests.git (there's x86/apic.c, can probably be added there easily). -- error compiling committee.c: too many arguments to function