From: Dan Magenheimer Subject: RE: [PATCH] mask cpuid TSC invariant bit for various circumstances (Take 2) Date: Mon, 9 Nov 2009 10:16:55 -0800 (PST) Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="__12577906478417034abhmt017.oracle.com" 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: Keir Fraser , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org --__12577906478417034abhmt017.oracle.com Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable > On 06/11/2009 14:23, "Dan Magenheimer"=20 > wrote: >=20 > >> I think I pushed you into changing this in a way I like even > >> less. :-) I can > >> live with your original patch, so I'll check that in after all. > >>=20 > >> -- Keir > >=20 > > But note that you were correct that the original patch > > didn't work with HVM domains, I presume because the xc cpuid > > policy code doesn't initialize 0x80000007. That's why > > I pulled the code out of the loop in domain_cpuid and > > then entirely out to time.c >=20 > Even if it didn't initialise 0x80000007 --- which actually I=20 > am sure it > does, as DEF_MAX_EXT is defined as 0x80000008 in=20 > xc_cpuid_x86.c --- then the > result will be we return all zeroes for that leaf. And that's=20 > safe. So I > think the original patch is fine for HVM guests too. >=20 > -- Keir Thought I'd wait until the final patch showed up in xen-unstable so I could test it before shooting off my mouth ;-) With the original (and your checked in) patch, it appears that the Invariant TSC bit is *always* zero for hvm. One of the points of the patch was to leave it unmasked (i.e. pass it through unchanged) under certain conditions. So... I think we need another patch now in xc_cpuid_x86. diff -r 42e268da38b9 tools/libxc/xc_cpuid_x86.c --- a/tools/libxc/xc_cpuid_x86.c=09Mon Nov 09 08:19:55 2009 +0000 +++ b/tools/libxc/xc_cpuid_x86.c=09Mon Nov 09 11:13:58 2009 -0700 @@ -237,6 +237,7 @@ static void xc_cpuid_hvm_policy( case 0x80000004: /* ... continued */ case 0x80000005: /* AMD L1 cache/TLB info (dumped by Intel policy) */ case 0x80000006: /* AMD L2/3 cache/TLB info ; Intel L2 cache features = */ + case 0x80000007: /* Intel/AMD Power Management (e.g. Invariant TSC) */ break; =20 default: --__12577906478417034abhmt017.oracle.com Content-Type: application/octet-stream; name="xc_cpuid.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="xc_cpuid.patch" ZGlmZiAtciA0MmUyNjhkYTM4YjkgdG9vbHMvbGlieGMveGNfY3B1aWRfeDg2LmMKLS0tIGEvdG9v bHMvbGlieGMveGNfY3B1aWRfeDg2LmMJTW9uIE5vdiAwOSAwODoxOTo1NSAyMDA5ICswMDAwCisr KyBiL3Rvb2xzL2xpYnhjL3hjX2NwdWlkX3g4Ni5jCU1vbiBOb3YgMDkgMTE6MTM6NTggMjAwOSAt MDcwMApAQCAtMjM3LDYgKzIzNyw3IEBAIHN0YXRpYyB2b2lkIHhjX2NwdWlkX2h2bV9wb2xpY3ko CiAgICAgY2FzZSAweDgwMDAwMDA0OiAvKiAuLi4gY29udGludWVkICAgICAgICAgKi8KICAgICBj YXNlIDB4ODAwMDAwMDU6IC8qIEFNRCBMMSBjYWNoZS9UTEIgaW5mbyAoZHVtcGVkIGJ5IEludGVs IHBvbGljeSkgKi8KICAgICBjYXNlIDB4ODAwMDAwMDY6IC8qIEFNRCBMMi8zIGNhY2hlL1RMQiBp bmZvIDsgSW50ZWwgTDIgY2FjaGUgZmVhdHVyZXMgKi8KKyAgICBjYXNlIDB4ODAwMDAwMDc6IC8q IEludGVsL0FNRCBQb3dlciBNYW5hZ2VtZW50IChlLmcuIEludmFyaWFudCBUU0MpICovCiAgICAg ICAgIGJyZWFrOwogCiAgICAgZGVmYXVsdDoK --__12577906478417034abhmt017.oracle.com Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --__12577906478417034abhmt017.oracle.com--