NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/47967: DTrace does not work while running under QEMU



On Wed, Jun 26, 2013 at 05:35:00PM +0000, riz%NetBSD.org@localhost wrote:
> >Synopsis:       tsc_freq is 0 when running under QEMU so DTrace crashes at 
> >load
...
>  static void
> +cpu_probe_qemu(struct cpu_info *ci)
> +{
> +       if (memcmp("QEMU Virtual CPU", cpu_brand_string, 16) != 0)
> +               return;
> +
> +       /* if QEMU does not implement MSR_TSC, disable the TSC */
> +       ci->ci_feat_val[0] &= ~CPUID_MSR;
> +       cpu_feature[0] &= ~CPUID_MSR;
> +}

Surely it would be much better to probe for the symptom, rather
than a random string.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index