All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gavin Shan <gshan@redhat.com>
To: Marc Zyngier <maz@misterjones.org>, Mark Rutland <mark.rutland@arm.com>
Cc: catalin.marinas@arm.com, will@kernel.org,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] kvm/arm64: Rename HSR to ESR
Date: Tue, 30 Jun 2020 09:14:44 +1000	[thread overview]
Message-ID: <1cc51ce6-0e94-03e5-85e1-66d074bb50f4@redhat.com> (raw)
In-Reply-To: <9080c56e3f54d7661a57c5e2a771363f@misterjones.org>

On 6/30/20 3:00 AM, Marc Zyngier wrote:
> On 2020-06-29 11:32, Mark Rutland wrote:
>> On Mon, Jun 29, 2020 at 07:18:40PM +1000, Gavin Shan wrote:
>>> kvm/arm32 isn't supported since commit 541ad0150ca4 ("arm: Remove
>>> 32bit KVM host support"). So HSR isn't meaningful since then. This
>>> renames HSR to ESR accordingly. This shouldn't cause any functional
>>> changes:
>>>
>>>    * Rename kvm_vcpu_get_hsr() to kvm_vcpu_get_esr() to make the
>>>      function names self-explanatory.
>>>    * Rename variables from @hsr to @esr to make them self-explanatory.
>>>
>>> Signed-off-by: Gavin Shan <gshan@redhat.com>
>>
>> At a high-level, I agree that we should move to the `esr` naming to
>> match the architecture and minimize surprise. However, I think there are
>> some ABI changes here, which *are* funcitonal changes, and those need to
>> be avoided.
>>
>> [...]
>>
>>> diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h
>>> index ba85bb23f060..d54345573a88 100644
>>> --- a/arch/arm64/include/uapi/asm/kvm.h
>>> +++ b/arch/arm64/include/uapi/asm/kvm.h
>>> @@ -140,7 +140,7 @@ struct kvm_guest_debug_arch {
>>>  };
>>>
>>>  struct kvm_debug_exit_arch {
>>> -    __u32 hsr;
>>> +    __u32 esr;
>>>      __u64 far;    /* used for watchpoints */
>>>  };
>>
>> This is userspace ABI, and changing this *will* break userspace. This
>> *is* a functional change.
>>
>> NAK to this specifically. At best these should be a comment here that
>> this is naming is legacym but must stay for ABI reasons.
>>
>> [...]
>>
>>> diff --git a/arch/arm64/kvm/trace_arm.h b/arch/arm64/kvm/trace_arm.h
>>> index 4c71270cc097..ee4f691b16ff 100644
>>> --- a/arch/arm64/kvm/trace_arm.h
>>> +++ b/arch/arm64/kvm/trace_arm.h
>>> @@ -42,7 +42,7 @@ TRACE_EVENT(kvm_exit,
>>>          __entry->vcpu_pc        = vcpu_pc;
>>>      ),
>>>
>>> -    TP_printk("%s: HSR_EC: 0x%04x (%s), PC: 0x%08lx",
>>> +    TP_printk("%s: ESR_EC: 0x%04x (%s), PC: 0x%08lx",
>>>            __print_symbolic(__entry->ret, kvm_arm_exception_type),
>>>            __entry->esr_ec,
>>>            __print_symbolic(__entry->esr_ec, kvm_arm_exception_class),
>>
>> Likewise, isn't all the tracepoint format stuff ABI? I'm not comfortable
>> that we can change this.
> 
> Tracepoints are ABI, and they cannot change. As it is, this patch
> isn't acceptable (the worse offender being the uapi change though).
> 

Yes, I was reluctant to make the changes regarding the uapi/tracepoint,
which is part of the ABI. I will drop the changes in v2.

Thanks,
Gavin

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

WARNING: multiple messages have this Message-ID (diff)
From: Gavin Shan <gshan@redhat.com>
To: Marc Zyngier <maz@misterjones.org>, Mark Rutland <mark.rutland@arm.com>
Cc: catalin.marinas@arm.com, will@kernel.org,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] kvm/arm64: Rename HSR to ESR
Date: Tue, 30 Jun 2020 09:14:44 +1000	[thread overview]
Message-ID: <1cc51ce6-0e94-03e5-85e1-66d074bb50f4@redhat.com> (raw)
In-Reply-To: <9080c56e3f54d7661a57c5e2a771363f@misterjones.org>

On 6/30/20 3:00 AM, Marc Zyngier wrote:
> On 2020-06-29 11:32, Mark Rutland wrote:
>> On Mon, Jun 29, 2020 at 07:18:40PM +1000, Gavin Shan wrote:
>>> kvm/arm32 isn't supported since commit 541ad0150ca4 ("arm: Remove
>>> 32bit KVM host support"). So HSR isn't meaningful since then. This
>>> renames HSR to ESR accordingly. This shouldn't cause any functional
>>> changes:
>>>
>>>    * Rename kvm_vcpu_get_hsr() to kvm_vcpu_get_esr() to make the
>>>      function names self-explanatory.
>>>    * Rename variables from @hsr to @esr to make them self-explanatory.
>>>
>>> Signed-off-by: Gavin Shan <gshan@redhat.com>
>>
>> At a high-level, I agree that we should move to the `esr` naming to
>> match the architecture and minimize surprise. However, I think there are
>> some ABI changes here, which *are* funcitonal changes, and those need to
>> be avoided.
>>
>> [...]
>>
>>> diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h
>>> index ba85bb23f060..d54345573a88 100644
>>> --- a/arch/arm64/include/uapi/asm/kvm.h
>>> +++ b/arch/arm64/include/uapi/asm/kvm.h
>>> @@ -140,7 +140,7 @@ struct kvm_guest_debug_arch {
>>>  };
>>>
>>>  struct kvm_debug_exit_arch {
>>> -    __u32 hsr;
>>> +    __u32 esr;
>>>      __u64 far;    /* used for watchpoints */
>>>  };
>>
>> This is userspace ABI, and changing this *will* break userspace. This
>> *is* a functional change.
>>
>> NAK to this specifically. At best these should be a comment here that
>> this is naming is legacym but must stay for ABI reasons.
>>
>> [...]
>>
>>> diff --git a/arch/arm64/kvm/trace_arm.h b/arch/arm64/kvm/trace_arm.h
>>> index 4c71270cc097..ee4f691b16ff 100644
>>> --- a/arch/arm64/kvm/trace_arm.h
>>> +++ b/arch/arm64/kvm/trace_arm.h
>>> @@ -42,7 +42,7 @@ TRACE_EVENT(kvm_exit,
>>>          __entry->vcpu_pc        = vcpu_pc;
>>>      ),
>>>
>>> -    TP_printk("%s: HSR_EC: 0x%04x (%s), PC: 0x%08lx",
>>> +    TP_printk("%s: ESR_EC: 0x%04x (%s), PC: 0x%08lx",
>>>            __print_symbolic(__entry->ret, kvm_arm_exception_type),
>>>            __entry->esr_ec,
>>>            __print_symbolic(__entry->esr_ec, kvm_arm_exception_class),
>>
>> Likewise, isn't all the tracepoint format stuff ABI? I'm not comfortable
>> that we can change this.
> 
> Tracepoints are ABI, and they cannot change. As it is, this patch
> isn't acceptable (the worse offender being the uapi change though).
> 

Yes, I was reluctant to make the changes regarding the uapi/tracepoint,
which is part of the ABI. I will drop the changes in v2.

Thanks,
Gavin


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-06-29 23:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-29  9:18 [PATCH 0/2] Refactor ESR related functions Gavin Shan
2020-06-29  9:18 ` Gavin Shan
2020-06-29  9:18 ` [PATCH 1/2] kvm/arm64: Rename HSR to ESR Gavin Shan
2020-06-29  9:18   ` Gavin Shan
2020-06-29  9:44   ` Andrew Scull
2020-06-29  9:44     ` Andrew Scull
2020-06-29 10:32   ` Mark Rutland
2020-06-29 10:32     ` Mark Rutland
2020-06-29 11:05     ` Mark Rutland
2020-06-29 11:05       ` Mark Rutland
2020-06-29 17:00     ` Marc Zyngier
2020-06-29 17:00       ` Marc Zyngier
2020-06-29 23:14       ` Gavin Shan [this message]
2020-06-29 23:14         ` Gavin Shan
2020-06-29  9:18 ` [PATCH 2/2] kvm/arm64: Detach ESR operator from vCPU struct Gavin Shan
2020-06-29  9:18   ` Gavin Shan
2020-06-29  9:59   ` Andrew Scull
2020-06-29  9:59     ` Andrew Scull
2020-06-30  0:28     ` Gavin Shan
2020-06-30  0:28       ` Gavin Shan
2020-06-29 11:00   ` Mark Rutland
2020-06-29 11:00     ` Mark Rutland
2020-06-30  0:16     ` Gavin Shan
2020-06-30  0:16       ` Gavin Shan
2020-06-30  8:00       ` Mark Rutland
2020-06-30  8:00         ` Mark Rutland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1cc51ce6-0e94-03e5-85e1-66d074bb50f4@redhat.com \
    --to=gshan@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@misterjones.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.