spapr.c (58969eeece99abd6d31d530ad371e789419ec9bf) spapr.c (26cd35b8613881c410d5226e6dc56e7bfb4b83d1)
1/*
2 * QEMU PowerPC pSeries Logical Partition (aka sPAPR) hardware System Emulator
3 *
4 * Copyright (c) 2004-2007 Fabrice Bellard
5 * Copyright (c) 2007 Jocelyn Mayer
6 * Copyright (c) 2010 David Gibson, IBM Corporation.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy

--- 249 unchanged lines hidden (view full) ---

258}
259
260/* Populate the "ibm,pa-features" property */
261static void spapr_populate_pa_features(sPAPRMachineState *spapr,
262 PowerPCCPU *cpu,
263 void *fdt, int offset,
264 bool legacy_guest)
265{
1/*
2 * QEMU PowerPC pSeries Logical Partition (aka sPAPR) hardware System Emulator
3 *
4 * Copyright (c) 2004-2007 Fabrice Bellard
5 * Copyright (c) 2007 Jocelyn Mayer
6 * Copyright (c) 2010 David Gibson, IBM Corporation.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy

--- 249 unchanged lines hidden (view full) ---

258}
259
260/* Populate the "ibm,pa-features" property */
261static void spapr_populate_pa_features(sPAPRMachineState *spapr,
262 PowerPCCPU *cpu,
263 void *fdt, int offset,
264 bool legacy_guest)
265{
266 CPUPPCState *env = &cpu->env;
267 uint8_t pa_features_206[] = { 6, 0,
268 0xf6, 0x1f, 0xc7, 0x00, 0x80, 0xc0 };
269 uint8_t pa_features_207[] = { 24, 0,
270 0xf6, 0x1f, 0xc7, 0xc0, 0x80, 0xf0,
271 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
272 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
273 0x80, 0x00, 0x80, 0x00, 0x00, 0x00 };
274 uint8_t pa_features_300[] = { 66, 0,

--- 35 unchanged lines hidden (view full) ---

310 if (ppc_check_compat(cpu, CPU_POWERPC_LOGICAL_3_00, 0, cpu->compat_pvr)) {
311 pa_features = pa_features_300;
312 pa_size = sizeof(pa_features_300);
313 }
314 if (!pa_features) {
315 return;
316 }
317
266 uint8_t pa_features_206[] = { 6, 0,
267 0xf6, 0x1f, 0xc7, 0x00, 0x80, 0xc0 };
268 uint8_t pa_features_207[] = { 24, 0,
269 0xf6, 0x1f, 0xc7, 0xc0, 0x80, 0xf0,
270 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
271 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
272 0x80, 0x00, 0x80, 0x00, 0x00, 0x00 };
273 uint8_t pa_features_300[] = { 66, 0,

--- 35 unchanged lines hidden (view full) ---

309 if (ppc_check_compat(cpu, CPU_POWERPC_LOGICAL_3_00, 0, cpu->compat_pvr)) {
310 pa_features = pa_features_300;
311 pa_size = sizeof(pa_features_300);
312 }
313 if (!pa_features) {
314 return;
315 }
316
318 if (env->ci_large_pages) {
317 if (ppc_hash64_has(cpu, PPC_HASH64_CI_LARGEPAGE)) {
319 /*
320 * Note: we keep CI large pages off by default because a 64K capable
321 * guest provisioned with large pages might otherwise try to map a qemu
322 * framebuffer (or other kind of memory mapped PCI BAR) using 64K pages
323 * even if that qemu runs on a 4k host.
324 * We dd this bit back here if we are confident this is not an issue
325 */
326 pa_features[3] |= 0x20;

--- 4003 unchanged lines hidden ---
318 /*
319 * Note: we keep CI large pages off by default because a 64K capable
320 * guest provisioned with large pages might otherwise try to map a qemu
321 * framebuffer (or other kind of memory mapped PCI BAR) using 64K pages
322 * even if that qemu runs on a 4k host.
323 * We dd this bit back here if we are confident this is not an issue
324 */
325 pa_features[3] |= 0x20;

--- 4003 unchanged lines hidden ---