Skip to contentSkip to conversation

emulated tsc and frequency info

DISCUSSION Juergen Gross 2 participants 5 messages Jul 20, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

with xen 4.0 and xen-unstable I see weird tsc information in my HVM-domain with PV-driver, if xen chooses to emulate tsc (d->arch.vtsc is set):

In the shared info page the tsc_to_system_mul is still reflecting the host cpu frequency instead of the emulated 1 GHz.

The reason is quite simple: tsc_set_info() is never called with a gtsc_khz value other than 0. I wonder which solution is the correct one:
- if tsc_set_info() is called with gtsc_khz=0, assume 1 GHz (my favorite).
- don't use 0 as default value for gtsc_khz when calling tsc_set_info() (this would require changes in the tools, too).
- let the domU check the vtsc-flag in cpuid-info and assume 1 GHz then (very ugly in my opinion).

Any thoughts?

Juergen

Signature · 5 lines
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: [email protected]
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html
#1 lore raw
Quoted 9 lines · Juergen Gross

with xen 4.0 and xen-unstable I see weird tsc information in my HVM-domain with PV-driver, if xen chooses to emulate tsc (d->arch.vtsc is set):

In the shared info page the tsc_to_system_mul is still reflecting the host cpu frequency instead of the emulated 1 GHz.

The reason is quite simple: tsc_set_info() is never called with a gtsc_khz value other than 0. I wonder which solution is the correct one:
- if tsc_set_info() is called with gtsc_khz=0, assume 1 GHz (my favorite).

That sounds best to me. Cc'ing Dan as he may have an opinion.

-- Keir

#2 lore raw
Quoted 4 lines · Keir Fraser
Quoted 2 lines · Juergen Gross

with xen 4.0 and xen-unstable I see weird tsc information in my HVM-domain with PV-driver, if xen chooses to emulate tsc (d->arch.vtsc is set):

correction: only xen 4.0 is affected!
xen-unstable does the scaling correctly.

Quoted 20 lines
Quoted 7 lines

In the shared info page the tsc_to_system_mul is still reflecting the host cpu frequency instead of the emulated 1 GHz.

The reason is quite simple: tsc_set_info() is never called with a gtsc_khz value other than 0. I wonder which solution is the correct one:
- if tsc_set_info() is called with gtsc_khz=0, assume 1 GHz (my favorite).

That sounds best to me. Cc'ing Dan as he may have an opinion.

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 5 lines
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: [email protected]
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html
#3 lore raw
Quoted 5 lines · Juergen Gross
Quoted 2 lines
Quoted 2 lines

with xen 4.0 and xen-unstable I see weird tsc information in my HVM-domain with PV-driver, if xen chooses to emulate tsc (d->arch.vtsc is set):

correction: only xen 4.0 is affected!
xen-unstable does the scaling correctly.

Is it still a problem with the latest 4.0.1 RC (or tip of xen-4.0-testing)?

-- Keir

#4 lore raw
Quoted 9 lines · Keir Fraser
Quoted 5 lines · Juergen Gross
Quoted 2 lines
Quoted 2 lines

with xen 4.0 and xen-unstable I see weird tsc information in my HVM-domain with PV-driver, if xen chooses to emulate tsc (d->arch.vtsc is set):

correction: only xen 4.0 is affected!
xen-unstable does the scaling correctly.

Is it still a problem with the latest 4.0.1 RC (or tip of xen-4.0-testing)?

Looking at hvm_get_guest_tsc() it should be okay, too. Sorry for the noise :-(

Juergen

Signature · 5 lines
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: [email protected]
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html