From: David Gibson <hidden> Date: 2016-11-23 05:14:17
Hi Paul,
I'm still chasing this confusion about the CAS bit to send the real
HPT resizing patches. However, in the meantime, here are some
preliminary cleanups.
These cleanups stand on their own, although I wrote them in the
context of writing the HPT resizing code, and are prerequisites for
those patches.
David Gibson (2):
kvm: Move KVM_PPC_PVINFO_FLAGS_EV_IDLE definition next to its
structure
powerpc/kvm: Corectly report KVM_CAP_PPC_ALLOC_HTAB
arch/powerpc/kvm/powerpc.c | 5 ++++-
include/uapi/linux/kvm.h | 5 +++--
2 files changed, 7 insertions(+), 3 deletions(-)
--
2.7.4
From: David Gibson <hidden> Date: 2016-11-23 05:14:18
The KVM_PPC_PVINFO_FLAGS_EV_IDLE macro defines a bit for use in the flags
field of struct kvm_ppc_pvinfo. However, changes since that was introduced
have moved it away from that structure definition, which is confusing.
Move it back next to the structure it belongs with.
Signed-off-by: David Gibson <redacted>
---
include/uapi/linux/kvm.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
@@ -651,6 +651,9 @@ struct kvm_enable_cap {};/* for KVM_PPC_GET_PVINFO */++#define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0)+structkvm_ppc_pvinfo{/* out */__u32flags;
@@ -682,8 +685,6 @@ struct kvm_ppc_smmu_info {structkvm_ppc_one_seg_page_sizesps[KVM_PPC_PAGE_SIZES_MAX_SZ];};-#define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0)-#define KVMIO 0xAE/* machine type bits, to be used as argument to KVM_CREATE_VM */
From: David Gibson <hidden> Date: 2016-11-23 05:14:20
At present KVM on powerpc always reports KVM_CAP_PPC_ALLOC_HTAB as enabled.
However, the ioctl() it advertises (KVM_PPC_ALLOCATE_HTAB) only actually
works on KVM HV. On KVM PR it will fail with ENOTTY.
qemu already has a workaround for this, so it's not breaking things in
practice, but it would be better to advertise this correctly.
Signed-off-by: David Gibson <redacted>
---
arch/powerpc/kvm/powerpc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
From: Paul Mackerras <hidden> Date: 2016-11-24 03:38:01
On Wed, Nov 23, 2016 at 04:14:05PM +1100, David Gibson wrote:
Hi Paul,
I'm still chasing this confusion about the CAS bit to send the real
HPT resizing patches. However, in the meantime, here are some
preliminary cleanups.
These cleanups stand on their own, although I wrote them in the
context of writing the HPT resizing code, and are prerequisites for
those patches.
David Gibson (2):
kvm: Move KVM_PPC_PVINFO_FLAGS_EV_IDLE definition next to its
structure
powerpc/kvm: Corectly report KVM_CAP_PPC_ALLOC_HTAB
arch/powerpc/kvm/powerpc.c | 5 ++++-
include/uapi/linux/kvm.h | 5 +++--
2 files changed, 7 insertions(+), 3 deletions(-)
Thanks, series applied to my kvm-ppc-next branch.
Paul.