Skip to contentSkip to conversation

CR4.TSD in guest kernel vs userland

DISCUSSION Dan Magenheimer 3 participants 3 messages Sep 21, 2009 – Sep 22, 2009

lore
Share & tools
lore
#0 lore raw

I was fretting about the overhead of emulating TSC in guest kernels. Is it possible (and relatively inexpensive) to change CR4.TSD on every transition between guest kernel and userland? I suspect not, but thought I'd check. If so, what about HVM vs PV and 32-bit vs 64-bit guest.

Thanks,
Dan

#1 lore raw

It's only likely to be reasonable for PV 64-bit guests, which transition via the hypervisor already for guest-kernel <-> guest-app transitions (i.e., those transition times suck already).

-- Keir

Quoted 14 lines · Dan Magenheimer

I was fretting about the overhead of emulating TSC in guest kernels. Is it possible (and relatively inexpensive) to change CR4.TSD on every transition between guest kernel and userland? I suspect not, but thought I'd check. If so, what about HVM vs PV and 32-bit vs 64-bit guest.

Thanks,
Dan

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

#2 lore raw
Quoted 4 lines
Quoted 1 line
Quoted 1 line

Keir Fraser <[email protected]> 22.09.09 08:34 >>>

It's only likely to be reasonable for PV 64-bit guests, which transition via the hypervisor already for guest-kernel <-> guest-app transitions (i.e., those transition times suck already).

But still, I don't think adding a serializing instruction that likely (I don't know of officially available numbers) takes hundreds of clocks is a good thing to do.

Jan

Quoted 7 lines · Dan Magenheimer
Quoted 6 lines

I was fretting about the overhead of emulating TSC in guest kernels. Is it possible (and relatively inexpensive) to change CR4.TSD on every transition between guest kernel and userland? I suspect not, but thought I'd check. If so, what about HVM vs PV and 32-bit vs 64-bit guest.