From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Magenheimer Subject: RE: [PATCH 01/02] pvrdtscp: move the place of write_rdtscp_aux() Date: Fri, 11 Dec 2009 08:14:21 -0800 (PST) Message-ID: <5d279b8a-e744-4677-9ca9-167aad52ab5b@default> References: Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Xu, Dongxiao" , xen-devel@lists.xensource.com Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org I am OK with this patch [01/02] now (see other thread), though still would like the discussion to continue about the other patch [02/02]. Thanks, Dan > -----Original Message----- > From: Xu, Dongxiao [mailto:dongxiao.xu@intel.com] > Sent: Friday, December 11, 2009 8:31 AM > To: Dan Magenheimer; xen-devel@lists.xensource.com > Cc: Keir Fraser > Subject: RE: [Xen-devel][PATCH 01/02] pvrdtscp: move the place of > write_rdtscp_aux() >=20 >=20 > Dan Magenheimer wrote: > > This patch is wrong for TSC_MODE_PVRDTSCP. The original > > code should be left in __update_vcpu_system_time and > > the context switch code should write to TSC_AUX only > > if tsc_mode is *NOT* TSC_MODE_PVRDTSCP because the > > implementation of full rdtscp functionality and > > TSC_MODE_PVRDTSCP mode are incompatible. >=20 > Could you detail the wrong place? Appreciate for this! > In my patch, I have done save/restore for guest/host=20 > TSC_AUX MSR, so it will not break PVRDTSC logic.=20 > =20 > >=20 > > But I continue to question if this should be done at all. > > See other thread. > >=20 > >> -----Original Message----- > >> From: Xu, Dongxiao [mailto:dongxiao.xu@intel.com] > >> Sent: Friday, December 11, 2009 4:54 AM > >> To: xen-devel@lists.xensource.com > >> Cc: Keir Fraser > >> Subject: [Xen-devel][PATCH 01/02] pvrdtscp: move the place of > >> write_rdtscp_aux()=20 > >>=20 > >>=20 > >> Pvrdtscp: move write_rdtscp_aux() to paravirt_ctxt_switch_to() > >> - Currently write_rdtscp_aux() is placed in > >> update_vcpu_system_time(), which > >> is called by schedule() before context_switch(). This will > >> break the HVM guest > >> TSC_AUX state because at this point, MSR hasn't beed saved > >> for HVM guests.So > >> put the function in the point when a PV vcpu is really=20 > scheduled in. > >>=20 > >> Signed-off-by: Dongxiao Xu > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >