"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "target/ppc/kvm.c" between
qemu-6.0.0-rc1.tar.xz and qemu-6.0.0-rc2.tar.xz

About: QEMU is a generic machine/processor emulator and virtualizer. Release candidate.

kvm.c  (qemu-6.0.0-rc1.tar.xz):kvm.c  (qemu-6.0.0-rc2.tar.xz)
skipping to change at line 1817 skipping to change at line 1817
ret = 0; ret = 0;
break; break;
} }
} while (*line); } while (*line);
fclose(f); fclose(f);
return ret; return ret;
} }
uint32_t kvmppc_get_tbfreq(void) static uint32_t kvmppc_get_tbfreq_procfs(void)
{ {
char line[512]; char line[512];
char *ns; char *ns;
uint32_t retval = NANOSECONDS_PER_SECOND; uint32_t tbfreq_fallback = NANOSECONDS_PER_SECOND;
uint32_t tbfreq_procfs;
if (read_cpuinfo("timebase", line, sizeof(line))) { if (read_cpuinfo("timebase", line, sizeof(line))) {
return retval; return tbfreq_fallback;
} }
ns = strchr(line, ':'); ns = strchr(line, ':');
if (!ns) { if (!ns) {
return retval; return tbfreq_fallback;
} }
ns++; tbfreq_procfs = atoi(++ns);
/* 0 is certainly not acceptable by the guest, return fallback value */
return tbfreq_procfs ? tbfreq_procfs : tbfreq_fallback;
}
uint32_t kvmppc_get_tbfreq(void)
{
static uint32_t cached_tbfreq;
if (!cached_tbfreq) {
cached_tbfreq = kvmppc_get_tbfreq_procfs();
}
return atoi(ns); return cached_tbfreq;
} }
bool kvmppc_get_host_serial(char **value) bool kvmppc_get_host_serial(char **value)
{ {
return g_file_get_contents("/proc/device-tree/system-id", value, NULL, return g_file_get_contents("/proc/device-tree/system-id", value, NULL,
NULL); NULL);
} }
bool kvmppc_get_host_model(char **value) bool kvmppc_get_host_model(char **value)
{ {
 End of changes. 6 change blocks. 
6 lines changed or deleted 19 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)