linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] arm64: KVM: rename the capability to set guest SError syndrome
  2018-08-20 18:37 [PATCH] arm64: KVM: rename the capability to set guest SError syndrome Dongjiu Geng
@ 2018-08-20 11:15 ` Marc Zyngier
  2018-08-20 12:29   ` gengdongjiu
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Zyngier @ 2018-08-20 11:15 UTC (permalink / raw)
  To: Dongjiu Geng, christoffer.dall, linux-arm-kernel, kvmarm,
	linux-kernel, kvm

Hi Dongjiu,

On 20/08/18 19:37, Dongjiu Geng wrote:
> In the documentation description, this capability's name is
> KVM_CAP_ARM_SET_SERROR_ESR, but in the header file this
> capability's name is KVM_CAP_ARM_INJECT_SERROR_ESR, so it
> is better to use a same name.
> 
> Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
> ---
> In the Documentation/virtual/kvm/api.txt:
> 
> +8.19 KVM_CAP_ARM_SET_SERROR_ESR
> 
> In the include/uapi/linux/kvm.h:
> +#define KVM_CAP_ARM_INJECT_SERROR_ESR 156
> 
> So in above two files, the capability's name is not same, it
> is better to use a same name.
> ---
>  arch/arm64/kvm/reset.c   | 2 +-
>  include/uapi/linux/kvm.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
> index e37c78b..57dc6be 100644
> --- a/arch/arm64/kvm/reset.c
> +++ b/arch/arm64/kvm/reset.c
> @@ -77,7 +77,7 @@ int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
>  	case KVM_CAP_ARM_PMU_V3:
>  		r = kvm_arm_support_pmu_v3();
>  		break;
> -	case KVM_CAP_ARM_INJECT_SERROR_ESR:
> +	case KVM_CAP_ARM_SET_SERROR_ESR:
>  		r = cpus_have_const_cap(ARM64_HAS_RAS_EXTN);
>  		break;
>  	case KVM_CAP_SET_GUEST_DEBUG:
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 07548de..fab7525 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -951,7 +951,7 @@ struct kvm_ppc_resize_hpt {
>  #define KVM_CAP_HYPERV_TLBFLUSH 155
>  #define KVM_CAP_S390_HPAGE_1M 156
>  #define KVM_CAP_NESTED_STATE 157
> -#define KVM_CAP_ARM_INJECT_SERROR_ESR 158
> +#define KVM_CAP_ARM_SET_SERROR_ESR 158
>  
>  #ifdef KVM_CAP_IRQ_ROUTING
>  
> 

I'd prefer you fix the documentation rather than the code, as this would
pointlessly break existing code.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

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

* Re: [PATCH] arm64: KVM: rename the capability to set guest SError syndrome
  2018-08-20 11:15 ` Marc Zyngier
@ 2018-08-20 12:29   ` gengdongjiu
  0 siblings, 0 replies; 3+ messages in thread
From: gengdongjiu @ 2018-08-20 12:29 UTC (permalink / raw)
  To: Marc Zyngier, christoffer.dall, linux-arm-kernel, kvmarm,
	linux-kernel, kvm

On 2018/8/20 19:15, Marc Zyngier wrote:
> I'd prefer you fix the documentation rather than the code, as this would
> pointlessly break existing code.

Ok, sure. I will, thanks a lot.


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

* [PATCH] arm64: KVM: rename the capability to set guest SError syndrome
@ 2018-08-20 18:37 Dongjiu Geng
  2018-08-20 11:15 ` Marc Zyngier
  0 siblings, 1 reply; 3+ messages in thread
From: Dongjiu Geng @ 2018-08-20 18:37 UTC (permalink / raw)
  To: christoffer.dall, marc.zyngier, linux-arm-kernel, kvmarm,
	linux-kernel, kvm, gengdongjiu

In the documentation description, this capability's name is
KVM_CAP_ARM_SET_SERROR_ESR, but in the header file this
capability's name is KVM_CAP_ARM_INJECT_SERROR_ESR, so it
is better to use a same name.

Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
---
In the Documentation/virtual/kvm/api.txt:

+8.19 KVM_CAP_ARM_SET_SERROR_ESR

In the include/uapi/linux/kvm.h:
+#define KVM_CAP_ARM_INJECT_SERROR_ESR 156

So in above two files, the capability's name is not same, it
is better to use a same name.
---
 arch/arm64/kvm/reset.c   | 2 +-
 include/uapi/linux/kvm.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
index e37c78b..57dc6be 100644
--- a/arch/arm64/kvm/reset.c
+++ b/arch/arm64/kvm/reset.c
@@ -77,7 +77,7 @@ int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
 	case KVM_CAP_ARM_PMU_V3:
 		r = kvm_arm_support_pmu_v3();
 		break;
-	case KVM_CAP_ARM_INJECT_SERROR_ESR:
+	case KVM_CAP_ARM_SET_SERROR_ESR:
 		r = cpus_have_const_cap(ARM64_HAS_RAS_EXTN);
 		break;
 	case KVM_CAP_SET_GUEST_DEBUG:
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 07548de..fab7525 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -951,7 +951,7 @@ struct kvm_ppc_resize_hpt {
 #define KVM_CAP_HYPERV_TLBFLUSH 155
 #define KVM_CAP_S390_HPAGE_1M 156
 #define KVM_CAP_NESTED_STATE 157
-#define KVM_CAP_ARM_INJECT_SERROR_ESR 158
+#define KVM_CAP_ARM_SET_SERROR_ESR 158
 
 #ifdef KVM_CAP_IRQ_ROUTING
 
-- 
2.7.4


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

end of thread, other threads:[~2018-08-20 12:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-20 18:37 [PATCH] arm64: KVM: rename the capability to set guest SError syndrome Dongjiu Geng
2018-08-20 11:15 ` Marc Zyngier
2018-08-20 12:29   ` gengdongjiu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).