<div dir="ltr"><div dir="ltr">I tested the patch (applying to v7.10.0) and it works on my M1 MacBook Air. Thanks.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 12, 2022 at 1:32 AM Andrea Bolognani <<a href="mailto:abologna@redhat.com">abologna@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Feb 10, 2022 at 10:08:42AM +0100, Andrea Bolognani wrote:<br>
> +++ b/src/util/virhostcpu.c<br>
> @@ -928,8 +928,14 @@ virHostCPUGetInfo(virArch hostarch G_GNUC_UNUSED,<br>
>      *mhz = cpu_freq;<br>
>  # else<br>
>      if (sysctlbyname("hw.cpufrequency", &cpu_freq, &cpu_freq_len, NULL, 0) < 0) {<br>
> -        virReportSystemError(errno, "%s", _("cannot obtain CPU freq"));<br>
> -        return -1;<br>
> +        if (errno == ENOENT) {<br>
> +            /* The hw.cpufrequency sysctl is not implemented on Apple Silicon.<br>
> +             * In that case, we report 0 instead of erroring out */<br>
> +            cpu_freq = 0;<br>
> +        } else {<br>
> +            virReportSystemError(errno, "%s", _("cannot obtain CPU freq"));<br>
> +            return -1;<br>
> +        }<br>
>      }<br>
<br>
Menci, can you please confirm this works for you before I push? I<br>
have no way of verifying that on my own. Thanks!<br>
<br>
-- <br>
Andrea Bolognani / Red Hat / Virtualization<br>
<br>
</blockquote></div>