ppc patch queue - 2015-11-11

Highlights:
   - Updated SLOF version for "pseries machine
   - Bugfix / cleanup for KVM hash page table allocation
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWQqhbAAoJEGw4ysog2bOSTDwP/1tHwIbEyCLZortSZxyqsszo
 7Dz/WJv+DcZuTHvlmE4gyAwumwy5sgUSrloe2RbDlMPoBxW362g0kCJ4Vg1Mpvvh
 L2tlVfSOMpJH9TIMwqCGANmLzeycQrVYMc6daZg65j7Jg+4mf6/i0PD3qiS5CRbW
 fq3yiGdUtEUNnOKqPM9hi0n4LwcjkJL49CFYiwVbN+rkmi7ekv/cDxNbUYtmRb9L
 DLdRaojV/YNxix5lM+h6BaCYzPfY1kZlxmUixJ3hK2gDDZlov4YESnWg8kMwul5p
 V0wefxdXlf49DpX1WCwcAfK2+wjFfhfylGuNaChcN3u0tyti0K6Y4nDBzraTQq2/
 HrcX2vmg5WHYD6pDwf4nRAKPUG4bHO5cDc3bZw1HQnmA7NWiq87i7IYRw5+rqsG0
 qRBE+108V7JhED0vA6MuAqRHfJcy8cfYM0CkP8v//Nmt3cJvcUQKyPa/LvZLlKxB
 tATECT2BOoOc5ENvJBwkn6XkGyvwrSZ3J3i1fJfbhNvQtvwXEKGRrncD7u6IxKTR
 wA+acAeRSiqXTdye35F9zJHwlOocbh9fOjOlRADUOUlJUdNJD0kRTTAOFtaDDjS2
 vUUgkpip4vxPsuhIbqmeW17Hy0Kp/+CI3nNMnunjtJy6TOyrnPiUy+izv/9ucSqM
 zcPPmapi2YHL5QIoDxcI
 =eHBD
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-next-20151111' into staging

ppc patch queue - 2015-11-11

Highlights:
  - Updated SLOF version for "pseries machine
  - Bugfix / cleanup for KVM hash page table allocation

# gpg: Signature made Wed 11 Nov 2015 02:30:51 GMT using RSA key ID 20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-next-20151111:
  spapr: Handle failure of KVM_PPC_ALLOCATE_HTAB ioctl
  ppc: Let kvmppc_reset_htab() return 0 for !CONFIG_KVM
  pseries: Update SLOF firmware image to qemu-slof-20151103
  ppc: Add/Re-introduce MMU model definitions needed by PR KVM

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2015-11-11 09:34:18 +00:00
commit 3c07587d49
7 changed files with 33 additions and 7 deletions

View File

@ -1021,9 +1021,19 @@ static void spapr_alloc_htab(sPAPRMachineState *spapr)
* RAM */
shift = kvmppc_reset_htab(spapr->htab_shift);
if (shift > 0) {
/* Kernel handles htab, we don't need to allocate one */
if (shift < 0) {
/*
* For HV KVM, host kernel will return -ENOMEM when requested
* HTAB size can't be allocated.
*/
error_setg(&error_abort, "Failed to allocate HTAB of requested size, try with smaller maxmem");
} else if (shift > 0) {
/*
* Kernel handles htab, we don't need to allocate one
*
* Older kernels can fall back to lower HTAB shift values,
* but we don't allow booting of such guests.
*/
if (shift != spapr->htab_shift) {
error_setg(&error_abort, "Failed to allocate HTAB of requested size, try with smaller maxmem");
}
@ -1055,7 +1065,9 @@ static void spapr_reset_htab(sPAPRMachineState *spapr)
int index;
shift = kvmppc_reset_htab(spapr->htab_shift);
if (shift > 0) {
if (shift < 0) {
error_setg(&error_abort, "Failed to reset HTAB");
} else if (shift > 0) {
if (shift != spapr->htab_shift) {
error_setg(&error_abort, "Requested HTAB allocation failed during reset");
}

View File

@ -17,7 +17,7 @@
- SLOF (Slimline Open Firmware) is a free IEEE 1275 Open Firmware
implementation for certain IBM POWER hardware. The sources are at
https://github.com/aik/SLOF, and the image currently in qemu is
built from git tag qemu-slof-20150813.
built from git tag qemu-slof-20151103.
- sgabios (the Serial Graphics Adapter option ROM) provides a means for
legacy x86 software to communicate with an attached serial console as

Binary file not shown.

@ -1 +1 @@
Subproject commit 811277ac91f674a9273e2b529791e9b75350f3e8
Subproject commit b4c93802a5b2c72f096649c497ec9ff5708e4456

View File

@ -122,9 +122,15 @@ enum powerpc_mmu_t {
/* Architecture 2.06 variant */
POWERPC_MMU_2_06 = POWERPC_MMU_64 | POWERPC_MMU_1TSEG
| POWERPC_MMU_AMR | 0x00000003,
/* Architecture 2.06 "degraded" (no 1T segments) */
POWERPC_MMU_2_06a = POWERPC_MMU_64 | POWERPC_MMU_AMR
| 0x00000003,
/* Architecture 2.07 variant */
POWERPC_MMU_2_07 = POWERPC_MMU_64 | POWERPC_MMU_1TSEG
| POWERPC_MMU_AMR | 0x00000004,
/* Architecture 2.07 "degraded" (no 1T segments) */
POWERPC_MMU_2_07a = POWERPC_MMU_64 | POWERPC_MMU_AMR
| 0x00000004,
#endif /* defined(TARGET_PPC64) */
};

View File

@ -180,7 +180,7 @@ static inline int kvmppc_remove_spapr_tce(void *table, int pfd,
static inline int kvmppc_reset_htab(int shift_hint)
{
return -1;
return 0;
}
static inline uint64_t kvmppc_rma_size(uint64_t current_size,

View File

@ -1295,7 +1295,9 @@ void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUPPCState *env)
case POWERPC_MMU_64B:
case POWERPC_MMU_2_03:
case POWERPC_MMU_2_06:
case POWERPC_MMU_2_06a:
case POWERPC_MMU_2_07:
case POWERPC_MMU_2_07a:
dump_slb(f, cpu_fprintf, env);
break;
#endif
@ -1435,7 +1437,9 @@ hwaddr ppc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)
case POWERPC_MMU_64B:
case POWERPC_MMU_2_03:
case POWERPC_MMU_2_06:
case POWERPC_MMU_2_06a:
case POWERPC_MMU_2_07:
case POWERPC_MMU_2_07a:
return ppc_hash64_get_phys_page_debug(env, addr);
#endif
@ -1939,7 +1943,9 @@ void ppc_tlb_invalidate_all(CPUPPCState *env)
case POWERPC_MMU_64B:
case POWERPC_MMU_2_03:
case POWERPC_MMU_2_06:
case POWERPC_MMU_2_06a:
case POWERPC_MMU_2_07:
case POWERPC_MMU_2_07a:
#endif /* defined(TARGET_PPC64) */
tlb_flush(CPU(cpu), 1);
break;
@ -2013,7 +2019,9 @@ void ppc_tlb_invalidate_one(CPUPPCState *env, target_ulong addr)
case POWERPC_MMU_64B:
case POWERPC_MMU_2_03:
case POWERPC_MMU_2_06:
case POWERPC_MMU_2_06a:
case POWERPC_MMU_2_07:
case POWERPC_MMU_2_07a:
/* tlbie invalidate TLBs for all segments */
/* XXX: given the fact that there are too many segments to invalidate,
* and we still don't have a tlb_flush_mask(env, n, mask) in QEMU,