[libvirt] [RFC PATCH] Add support for invtsc timer
Marcelo Tosatti
mtosatti at redhat.com
Fri May 9 06:58:35 UTC 2014
On Wed, May 07, 2014 at 07:35:13PM -0300, Marcelo Tosatti wrote:
> On Tue, May 06, 2014 at 03:27:20PM +0200, Ján Tomko wrote:
> > Not yet merged in upstream QEMU:
> > https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg05024.html
> >
> > Add support for invariant TSC timer running at constant rate in
> > all ACPI P-, C- and T-states.
> >
> > It can be enabled by specifying:
> > <clock>
> > <timer name='invtsc' present='yes'/>
> > </clock>
> > in the domain XML.
> >
> > Migration and saving the domain does not work with this timer.
> >
> > The support for this timer is indicated by bit 8 of EDX after calling
> > CPUID with 0x80000007. It does not show up in /proc/cpuinfo [1]
> > and since we're calling qemu without 'enforce', it doesn't error
> > out if the host doesn't support this.
>
> It is not a timer, really, but a CPU flag.
>
> > Alternatively, we could expose it in libvirt as a cpu flag:
> > <cpu mode='custom' match='exact'>
> > <model fallback='forbid'>qemu64</model>
> > <feature policy='require' name='invtsc'/>
> > </cpu>
>
> Would prefer that option. Can't one modify QEMU's "-cpu" parameters, via
> libvirt XML?
>
> > or maybe add +invtsc to qemu args when the 'nonstop_tsc' flag is
> > requested?
>
> No, since it blocks migration better not condition "+invtsc" on
> presence of 'nonstop_tsc' flag.
Simply adding
<feature name='invtsc'>
<cpuid function='0x80000007' edx='0x00000100'/>
</feature>
To cpu_map.xml is sufficient to allow users to enable
this feature on demand ?
Haven't thought about all the corner cases, though.
More information about the libvir-list
mailing list