[PATCH] KVM: PPC: Book3S HV: Fix bug leading to deadlock in guest HPT updates

2012-05-10 Thread Paul Mackerras
When handling the H_BULK_REMOVE hypercall, we were forgetting to invalidate and unlock the hashed page table entry (HPTE) in the case where the page had been paged out. This fixes it by clearing the first doubleword of the HPTE in that case. This fixes a regression introduced in commit

Re: [PATCH 1/2] ppc64: Rudimentary Support for extra page sizes on server CPUs

2012-05-10 Thread Alexander Graf
On 04/27/2012 07:51 AM, Benjamin Herrenschmidt wrote: More recent Power server chips (i.e. based on the 64 bit hash MMU) support more than just the traditional 4k and 16M page sizes. This can get quite complicated, because which page sizes are supported, which combinations are supported within

Re: [PATCH 1/2] ppc64: Rudimentary Support for extra page sizes on server CPUs

2012-05-10 Thread Avi Kivity
On 05/10/2012 08:49 PM, Alexander Graf wrote: +#if defined(TARGET_PPC64) +if (def-sps) +memcpy(env-sps, def-sps, sizeof(*def-sps)); I never know if *def-... would dereference def or the complete construct. 'man operator' How about sizeof(env-sps)? How about env-sps =

Re: [PATCH 2/2] pseries: Correctly create ibm,segment-page-sizes property

2012-05-10 Thread Alexander Graf
On 04/27/2012 07:51 AM, Benjamin Herrenschmidt wrote: The core tcg/kvm code for ppc64 now has at least the outline capability to support pagesizes beyond the standard 4k and 16MB. The CPUState is initialized with information advertising the available pagesizes and their correct encodings, and