All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] rename function name and enable 32bit vcpu events
@ 2018-10-11 19:07 ` Dongjiu Geng
  0 siblings, 0 replies; 15+ messages in thread
From: Dongjiu Geng @ 2018-10-11 19:07 UTC (permalink / raw)
  To: christoffer.dall, marc.zyngier, suzuki.poulose, peter.maydell,
	drjones, james.morse, linux-arm-kernel, kvmarm, linux-kernel,
	kvm
  Cc: gengdongjiu

Rename the kvm_arch_dev_ioctl_check_extension() to 
kvm_arch_vm_ioctl_check_extension, because the name
is not reasonable; 

Enable the 32 bit vcpu events support.

Change since v2:
1. Address Suzuki's comments to update the patch commit messages

change since v1:
1. Update patch commit messages.

Dongjiu Geng (2):
  arm/arm64: KVM: rename function kvm_arch_dev_ioctl_check_extension()
  arm/arm64: KVM: enable 32 bits kvm vcpu events support

 arch/arm/include/asm/kvm_host.h   | 2 +-
 arch/arm64/include/asm/kvm_host.h | 2 +-
 arch/arm64/kvm/reset.c            | 5 ++---
 virt/kvm/arm/arm.c                | 3 ++-
 4 files changed, 6 insertions(+), 6 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v3 0/2] rename function name and enable 32bit vcpu events
@ 2018-10-11 19:07 ` Dongjiu Geng
  0 siblings, 0 replies; 15+ messages in thread
From: Dongjiu Geng @ 2018-10-11 19:07 UTC (permalink / raw)
  To: christoffer.dall, marc.zyngier, suzuki.poulose, peter.maydell,
	drjones, james.morse, linux-arm-kernel, kvmarm, linux-kernel,
	kvm
  Cc: gengdongjiu

Rename the kvm_arch_dev_ioctl_check_extension() to 
kvm_arch_vm_ioctl_check_extension, because the name
is not reasonable; 

Enable the 32 bit vcpu events support.

Change since v2:
1. Address Suzuki's comments to update the patch commit messages

change since v1:
1. Update patch commit messages.

Dongjiu Geng (2):
  arm/arm64: KVM: rename function kvm_arch_dev_ioctl_check_extension()
  arm/arm64: KVM: enable 32 bits kvm vcpu events support

 arch/arm/include/asm/kvm_host.h   | 2 +-
 arch/arm64/include/asm/kvm_host.h | 2 +-
 arch/arm64/kvm/reset.c            | 5 ++---
 virt/kvm/arm/arm.c                | 3 ++-
 4 files changed, 6 insertions(+), 6 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v3 0/2] rename function name and enable 32bit vcpu events
@ 2018-10-11 19:07 ` Dongjiu Geng
  0 siblings, 0 replies; 15+ messages in thread
From: Dongjiu Geng @ 2018-10-11 19:07 UTC (permalink / raw)
  To: linux-arm-kernel

Rename the kvm_arch_dev_ioctl_check_extension() to 
kvm_arch_vm_ioctl_check_extension, because the name
is not reasonable; 

Enable the 32 bit vcpu events support.

Change since v2:
1. Address Suzuki's comments to update the patch commit messages

change since v1:
1. Update patch commit messages.

Dongjiu Geng (2):
  arm/arm64: KVM: rename function kvm_arch_dev_ioctl_check_extension()
  arm/arm64: KVM: enable 32 bits kvm vcpu events support

 arch/arm/include/asm/kvm_host.h   | 2 +-
 arch/arm64/include/asm/kvm_host.h | 2 +-
 arch/arm64/kvm/reset.c            | 5 ++---
 virt/kvm/arm/arm.c                | 3 ++-
 4 files changed, 6 insertions(+), 6 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v3 1/2] arm/arm64: KVM: rename function kvm_arch_dev_ioctl_check_extension()
  2018-10-11 19:07 ` Dongjiu Geng
  (?)
@ 2018-10-11 19:07   ` Dongjiu Geng
  -1 siblings, 0 replies; 15+ messages in thread
From: Dongjiu Geng @ 2018-10-11 19:07 UTC (permalink / raw)
  To: christoffer.dall, marc.zyngier, suzuki.poulose, peter.maydell,
	drjones, james.morse, linux-arm-kernel, kvmarm, linux-kernel,
	kvm
  Cc: gengdongjiu

Rename kvm_arch_dev_ioctl_check_extension() to
kvm_arch_vm_ioctl_check_extension(), because it does
not have any relationship with device.

Renaming this function can make code readable.

Cc: James Morse <james.morse@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
---
I remeber James also mentioned that rename this function.
---
 arch/arm/include/asm/kvm_host.h   | 2 +-
 arch/arm64/include/asm/kvm_host.h | 2 +-
 arch/arm64/kvm/reset.c            | 4 ++--
 virt/kvm/arm/arm.c                | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
index 3ad482d..3ee29db 100644
--- a/arch/arm/include/asm/kvm_host.h
+++ b/arch/arm/include/asm/kvm_host.h
@@ -273,7 +273,7 @@ static inline void __cpu_init_stage2(void)
 	kvm_call_hyp(__init_stage2_translation);
 }
 
-static inline int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
+static inline int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 {
 	return 0;
 }
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 3d6d733..c20537f 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -53,7 +53,7 @@
 
 int __attribute_const__ kvm_target_cpu(void);
 int kvm_reset_vcpu(struct kvm_vcpu *vcpu);
-int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext);
+int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext);
 void __extended_idmap_trampoline(phys_addr_t boot_pgd, phys_addr_t idmap_start);
 
 struct kvm_arch {
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index e37c78b..fd37c53 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -55,12 +55,12 @@ static bool cpu_has_32bit_el1(void)
 }
 
 /**
- * kvm_arch_dev_ioctl_check_extension
+ * kvm_arch_vm_ioctl_check_extension
  *
  * We currently assume that the number of HW registers is uniform
  * across all CPUs (see cpuinfo_sanity_check).
  */
-int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
+int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 {
 	int r;
 
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index c92053b..40e79ea 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -240,7 +240,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 		r = 1;
 		break;
 	default:
-		r = kvm_arch_dev_ioctl_check_extension(kvm, ext);
+		r = kvm_arch_vm_ioctl_check_extension(kvm, ext);
 		break;
 	}
 	return r;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v3 1/2] arm/arm64: KVM: rename function kvm_arch_dev_ioctl_check_extension()
@ 2018-10-11 19:07   ` Dongjiu Geng
  0 siblings, 0 replies; 15+ messages in thread
From: Dongjiu Geng @ 2018-10-11 19:07 UTC (permalink / raw)
  To: christoffer.dall, marc.zyngier, suzuki.poulose, peter.maydell,
	drjones, james.morse, linux-arm-kernel, kvmarm, linux-kernel,
	kvm
  Cc: gengdongjiu

Rename kvm_arch_dev_ioctl_check_extension() to
kvm_arch_vm_ioctl_check_extension(), because it does
not have any relationship with device.

Renaming this function can make code readable.

Cc: James Morse <james.morse@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
---
I remeber James also mentioned that rename this function.
---
 arch/arm/include/asm/kvm_host.h   | 2 +-
 arch/arm64/include/asm/kvm_host.h | 2 +-
 arch/arm64/kvm/reset.c            | 4 ++--
 virt/kvm/arm/arm.c                | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
index 3ad482d..3ee29db 100644
--- a/arch/arm/include/asm/kvm_host.h
+++ b/arch/arm/include/asm/kvm_host.h
@@ -273,7 +273,7 @@ static inline void __cpu_init_stage2(void)
 	kvm_call_hyp(__init_stage2_translation);
 }
 
-static inline int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
+static inline int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 {
 	return 0;
 }
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 3d6d733..c20537f 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -53,7 +53,7 @@
 
 int __attribute_const__ kvm_target_cpu(void);
 int kvm_reset_vcpu(struct kvm_vcpu *vcpu);
-int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext);
+int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext);
 void __extended_idmap_trampoline(phys_addr_t boot_pgd, phys_addr_t idmap_start);
 
 struct kvm_arch {
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index e37c78b..fd37c53 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -55,12 +55,12 @@ static bool cpu_has_32bit_el1(void)
 }
 
 /**
- * kvm_arch_dev_ioctl_check_extension
+ * kvm_arch_vm_ioctl_check_extension
  *
  * We currently assume that the number of HW registers is uniform
  * across all CPUs (see cpuinfo_sanity_check).
  */
-int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
+int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 {
 	int r;
 
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index c92053b..40e79ea 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -240,7 +240,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 		r = 1;
 		break;
 	default:
-		r = kvm_arch_dev_ioctl_check_extension(kvm, ext);
+		r = kvm_arch_vm_ioctl_check_extension(kvm, ext);
 		break;
 	}
 	return r;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v3 1/2] arm/arm64: KVM: rename function kvm_arch_dev_ioctl_check_extension()
@ 2018-10-11 19:07   ` Dongjiu Geng
  0 siblings, 0 replies; 15+ messages in thread
From: Dongjiu Geng @ 2018-10-11 19:07 UTC (permalink / raw)
  To: linux-arm-kernel

Rename kvm_arch_dev_ioctl_check_extension() to
kvm_arch_vm_ioctl_check_extension(), because it does
not have any relationship with device.

Renaming this function can make code readable.

Cc: James Morse <james.morse@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
---
I remeber James also mentioned that rename this function.
---
 arch/arm/include/asm/kvm_host.h   | 2 +-
 arch/arm64/include/asm/kvm_host.h | 2 +-
 arch/arm64/kvm/reset.c            | 4 ++--
 virt/kvm/arm/arm.c                | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h
index 3ad482d..3ee29db 100644
--- a/arch/arm/include/asm/kvm_host.h
+++ b/arch/arm/include/asm/kvm_host.h
@@ -273,7 +273,7 @@ static inline void __cpu_init_stage2(void)
 	kvm_call_hyp(__init_stage2_translation);
 }
 
-static inline int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
+static inline int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 {
 	return 0;
 }
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 3d6d733..c20537f 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -53,7 +53,7 @@
 
 int __attribute_const__ kvm_target_cpu(void);
 int kvm_reset_vcpu(struct kvm_vcpu *vcpu);
-int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext);
+int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext);
 void __extended_idmap_trampoline(phys_addr_t boot_pgd, phys_addr_t idmap_start);
 
 struct kvm_arch {
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index e37c78b..fd37c53 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -55,12 +55,12 @@ static bool cpu_has_32bit_el1(void)
 }
 
 /**
- * kvm_arch_dev_ioctl_check_extension
+ * kvm_arch_vm_ioctl_check_extension
  *
  * We currently assume that the number of HW registers is uniform
  * across all CPUs (see cpuinfo_sanity_check).
  */
-int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
+int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 {
 	int r;
 
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index c92053b..40e79ea 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -240,7 +240,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 		r = 1;
 		break;
 	default:
-		r = kvm_arch_dev_ioctl_check_extension(kvm, ext);
+		r = kvm_arch_vm_ioctl_check_extension(kvm, ext);
 		break;
 	}
 	return r;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v3 2/2] arm/arm64: KVM: enable 32 bits kvm vcpu events support
  2018-10-11 19:07 ` Dongjiu Geng
  (?)
@ 2018-10-11 19:07   ` Dongjiu Geng
  -1 siblings, 0 replies; 15+ messages in thread
From: Dongjiu Geng @ 2018-10-11 19:07 UTC (permalink / raw)
  To: christoffer.dall, marc.zyngier, suzuki.poulose, peter.maydell,
	drjones, james.morse, linux-arm-kernel, kvmarm, linux-kernel,
	kvm
  Cc: gengdongjiu

The commit 539aee0edb9f ("KVM: arm64: Share the parts of
get/set events useful to 32bit") shares the get/set events
helper for arm64 and arm32, it is better also share the check
for vcpu events capability to enable 32 bit kvm vcpu events
support.

User space will check whether KVM supports vcpu events by checking
the KVM_CAP_VCPU_EVENTS extension

Cc: James Morse <james.morse@arm.com>
Reviewed-by : Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
---
For the 32 bits kvm migration, it needs to enable the vcpu events,
this patch will enable it. The user space QEMU patch is here:
https://patchwork.ozlabs.org/patch/975615/
---
 arch/arm64/kvm/reset.c | 1 -
 virt/kvm/arm/arm.c     | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index fd37c53..e50245e 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -82,7 +82,6 @@ int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 		break;
 	case KVM_CAP_SET_GUEST_DEBUG:
 	case KVM_CAP_VCPU_ATTRIBUTES:
-	case KVM_CAP_VCPU_EVENTS:
 		r = 1;
 		break;
 	default:
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index 40e79ea..64e5d97 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -212,6 +212,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 	case KVM_CAP_READONLY_MEM:
 	case KVM_CAP_MP_STATE:
 	case KVM_CAP_IMMEDIATE_EXIT:
+	case KVM_CAP_VCPU_EVENTS:
 		r = 1;
 		break;
 	case KVM_CAP_ARM_SET_DEVICE_ADDR:
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v3 2/2] arm/arm64: KVM: enable 32 bits kvm vcpu events support
@ 2018-10-11 19:07   ` Dongjiu Geng
  0 siblings, 0 replies; 15+ messages in thread
From: Dongjiu Geng @ 2018-10-11 19:07 UTC (permalink / raw)
  To: christoffer.dall, marc.zyngier, suzuki.poulose, peter.maydell,
	drjones, james.morse, linux-arm-kernel, kvmarm, linux-kernel,
	kvm
  Cc: gengdongjiu

The commit 539aee0edb9f ("KVM: arm64: Share the parts of
get/set events useful to 32bit") shares the get/set events
helper for arm64 and arm32, it is better also share the check
for vcpu events capability to enable 32 bit kvm vcpu events
support.

User space will check whether KVM supports vcpu events by checking
the KVM_CAP_VCPU_EVENTS extension

Cc: James Morse <james.morse@arm.com>
Reviewed-by : Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
---
For the 32 bits kvm migration, it needs to enable the vcpu events,
this patch will enable it. The user space QEMU patch is here:
https://patchwork.ozlabs.org/patch/975615/
---
 arch/arm64/kvm/reset.c | 1 -
 virt/kvm/arm/arm.c     | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index fd37c53..e50245e 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -82,7 +82,6 @@ int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 		break;
 	case KVM_CAP_SET_GUEST_DEBUG:
 	case KVM_CAP_VCPU_ATTRIBUTES:
-	case KVM_CAP_VCPU_EVENTS:
 		r = 1;
 		break;
 	default:
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index 40e79ea..64e5d97 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -212,6 +212,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 	case KVM_CAP_READONLY_MEM:
 	case KVM_CAP_MP_STATE:
 	case KVM_CAP_IMMEDIATE_EXIT:
+	case KVM_CAP_VCPU_EVENTS:
 		r = 1;
 		break;
 	case KVM_CAP_ARM_SET_DEVICE_ADDR:
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v3 2/2] arm/arm64: KVM: enable 32 bits kvm vcpu events support
@ 2018-10-11 19:07   ` Dongjiu Geng
  0 siblings, 0 replies; 15+ messages in thread
From: Dongjiu Geng @ 2018-10-11 19:07 UTC (permalink / raw)
  To: linux-arm-kernel

The commit 539aee0edb9f ("KVM: arm64: Share the parts of
get/set events useful to 32bit") shares the get/set events
helper for arm64 and arm32, it is better also share the check
for vcpu events capability to enable 32 bit kvm vcpu events
support.

User space will check whether KVM supports vcpu events by checking
the KVM_CAP_VCPU_EVENTS extension

Cc: James Morse <james.morse@arm.com>
Reviewed-by : Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
---
For the 32 bits kvm migration, it needs to enable the vcpu events,
this patch will enable it. The user space QEMU patch is here:
https://patchwork.ozlabs.org/patch/975615/
---
 arch/arm64/kvm/reset.c | 1 -
 virt/kvm/arm/arm.c     | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index fd37c53..e50245e 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -82,7 +82,6 @@ int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 		break;
 	case KVM_CAP_SET_GUEST_DEBUG:
 	case KVM_CAP_VCPU_ATTRIBUTES:
-	case KVM_CAP_VCPU_EVENTS:
 		r = 1;
 		break;
 	default:
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index 40e79ea..64e5d97 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -212,6 +212,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
 	case KVM_CAP_READONLY_MEM:
 	case KVM_CAP_MP_STATE:
 	case KVM_CAP_IMMEDIATE_EXIT:
+	case KVM_CAP_VCPU_EVENTS:
 		r = 1;
 		break;
 	case KVM_CAP_ARM_SET_DEVICE_ADDR:
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v3 2/2] arm/arm64: KVM: enable 32 bits kvm vcpu events support
  2018-10-11 19:07   ` Dongjiu Geng
@ 2018-10-12 11:35     ` James Morse
  -1 siblings, 0 replies; 15+ messages in thread
From: James Morse @ 2018-10-12 11:35 UTC (permalink / raw)
  To: Dongjiu Geng
  Cc: christoffer.dall, marc.zyngier, suzuki.poulose, peter.maydell,
	drjones, linux-arm-kernel, kvmarm, linux-kernel, kvm

Hi Dongjiu Geng,

On 11/10/2018 20:07, Dongjiu Geng wrote:
> The commit 539aee0edb9f ("KVM: arm64: Share the parts of
> get/set events useful to 32bit") shares the get/set events
> helper for arm64 and arm32, 

Oops. I evidently didn't test this bit. Looks like I just depended on the symbol
to be defined, I didn't check the CAP was exposed.


> it is better also share the check
> for vcpu events capability to enable 32 bit kvm vcpu events
> support.

not just better, necessary for correctly-written user-space to know the feature
is supported. This last bit would be clearer as: "but forgot to share the cap
extension code."


Thanks for catching this!

Acked-by: James Morse <james.morse@arm.com>


Thanks,

James


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v3 2/2] arm/arm64: KVM: enable 32 bits kvm vcpu events support
@ 2018-10-12 11:35     ` James Morse
  0 siblings, 0 replies; 15+ messages in thread
From: James Morse @ 2018-10-12 11:35 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Dongjiu Geng,

On 11/10/2018 20:07, Dongjiu Geng wrote:
> The commit 539aee0edb9f ("KVM: arm64: Share the parts of
> get/set events useful to 32bit") shares the get/set events
> helper for arm64 and arm32, 

Oops. I evidently didn't test this bit. Looks like I just depended on the symbol
to be defined, I didn't check the CAP was exposed.


> it is better also share the check
> for vcpu events capability to enable 32 bit kvm vcpu events
> support.

not just better, necessary for correctly-written user-space to know the feature
is supported. This last bit would be clearer as: "but forgot to share the cap
extension code."


Thanks for catching this!

Acked-by: James Morse <james.morse@arm.com>


Thanks,

James

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v3 1/2] arm/arm64: KVM: rename function kvm_arch_dev_ioctl_check_extension()
  2018-10-11 19:07   ` Dongjiu Geng
@ 2018-10-12 15:45     ` James Morse
  -1 siblings, 0 replies; 15+ messages in thread
From: James Morse @ 2018-10-12 15:45 UTC (permalink / raw)
  To: Dongjiu Geng
  Cc: christoffer.dall, marc.zyngier, suzuki.poulose, peter.maydell,
	drjones, linux-arm-kernel, kvmarm, linux-kernel, kvm

Hi Dongjiu Geng,

On 11/10/2018 20:07, Dongjiu Geng wrote:
> Rename kvm_arch_dev_ioctl_check_extension() to
> kvm_arch_vm_ioctl_check_extension(), because it does
> not have any relationship with device.
> 
> Renaming this function can make code readable.

Lots of things in the kernel are misnamed, its not normally worth fixing them.

But it confused me, so:
Acked-by: James Morse <james.morse@arm.com>


Thanks,

James

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v3 1/2] arm/arm64: KVM: rename function kvm_arch_dev_ioctl_check_extension()
@ 2018-10-12 15:45     ` James Morse
  0 siblings, 0 replies; 15+ messages in thread
From: James Morse @ 2018-10-12 15:45 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Dongjiu Geng,

On 11/10/2018 20:07, Dongjiu Geng wrote:
> Rename kvm_arch_dev_ioctl_check_extension() to
> kvm_arch_vm_ioctl_check_extension(), because it does
> not have any relationship with device.
> 
> Renaming this function can make code readable.

Lots of things in the kernel are misnamed, its not normally worth fixing them.

But it confused me, so:
Acked-by: James Morse <james.morse@arm.com>


Thanks,

James

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v3 2/2] arm/arm64: KVM: enable 32 bits kvm vcpu events support
@ 2018-10-12 15:36 ` gengdongjiu
  0 siblings, 0 replies; 15+ messages in thread
From: gengdongjiu @ 2018-10-12 15:36 UTC (permalink / raw)
  To: James Morse
  Cc: christoffer.dall, marc.zyngier, suzuki.poulose, peter.maydell,
	drjones, linux-arm-kernel, kvmarm, linux-kernel, kvm

Hi James,

> Hi Dongjiu Geng,
> 
> On 11/10/2018 20:07, Dongjiu Geng wrote:
> > The commit 539aee0edb9f ("KVM: arm64: Share the parts of get/set
> > events useful to 32bit") shares the get/set events helper for arm64
> > and arm32,
> 
> Oops. I evidently didn't test this bit. Looks like I just depended on the symbol to be defined, I didn't check the CAP was exposed.

Yes, you do not check the CAP when you test it.

> 
> 
> > it is better also share the check
> > for vcpu events capability to enable 32 bit kvm vcpu events support.
> 
> not just better, necessary for correctly-written user-space to know the feature is supported. This last bit would be clearer as: "but forgot to
> share the cap extension code."

Ok, will update it.

> 
> 
> Thanks for catching this!

You are welcome

> 
> Acked-by: James Morse <james.morse@arm.com>
> 
> 
> Thanks,
> 
> James


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v3 2/2] arm/arm64: KVM: enable 32 bits kvm vcpu events support
@ 2018-10-12 15:36 ` gengdongjiu
  0 siblings, 0 replies; 15+ messages in thread
From: gengdongjiu @ 2018-10-12 15:36 UTC (permalink / raw)
  To: James Morse
  Cc: christoffer.dall, marc.zyngier, suzuki.poulose, peter.maydell,
	drjones, linux-arm-kernel, kvmarm, linux-kernel, kvm

Hi James,

> Hi Dongjiu Geng,
> 
> On 11/10/2018 20:07, Dongjiu Geng wrote:
> > The commit 539aee0edb9f ("KVM: arm64: Share the parts of get/set
> > events useful to 32bit") shares the get/set events helper for arm64
> > and arm32,
> 
> Oops. I evidently didn't test this bit. Looks like I just depended on the symbol to be defined, I didn't check the CAP was exposed.

Yes, you do not check the CAP when you test it.

> 
> 
> > it is better also share the check
> > for vcpu events capability to enable 32 bit kvm vcpu events support.
> 
> not just better, necessary for correctly-written user-space to know the feature is supported. This last bit would be clearer as: "but forgot to
> share the cap extension code."

Ok, will update it.

> 
> 
> Thanks for catching this!

You are welcome

> 
> Acked-by: James Morse <james.morse@arm.com>
> 
> 
> Thanks,
> 
> James


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-10-12 15:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-11 19:07 [PATCH v3 0/2] rename function name and enable 32bit vcpu events Dongjiu Geng
2018-10-11 19:07 ` Dongjiu Geng
2018-10-11 19:07 ` Dongjiu Geng
2018-10-11 19:07 ` [PATCH v3 1/2] arm/arm64: KVM: rename function kvm_arch_dev_ioctl_check_extension() Dongjiu Geng
2018-10-11 19:07   ` Dongjiu Geng
2018-10-11 19:07   ` Dongjiu Geng
2018-10-12 15:45   ` James Morse
2018-10-12 15:45     ` James Morse
2018-10-11 19:07 ` [PATCH v3 2/2] arm/arm64: KVM: enable 32 bits kvm vcpu events support Dongjiu Geng
2018-10-11 19:07   ` Dongjiu Geng
2018-10-11 19:07   ` Dongjiu Geng
2018-10-12 11:35   ` James Morse
2018-10-12 11:35     ` James Morse
2018-10-12 15:36 gengdongjiu
2018-10-12 15:36 ` gengdongjiu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.