From: Usama Arif <usama.arif@bytedance.com>
To: Punit Agrawal <punit.agrawal@bytedance.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
linux-doc@vger.kernel.org,
virtualization@lists.linux-foundation.org, linux@armlinux.org.uk,
yezengruan@huawei.com, catalin.marinas@arm.com, will@kernel.org,
maz@kernel.org, steven.price@arm.com, mark.rutland@arm.com,
bagasdotme@gmail.com, fam.zheng@bytedance.com,
liangma@liangbit.com
Subject: Re: [v2 2/6] KVM: arm64: Add SMCCC paravirtualised lock calls
Date: Mon, 7 Nov 2022 18:08:45 +0000 [thread overview]
Message-ID: <71a41442-b1eb-d02e-53fe-c35dbcfc8416@bytedance.com> (raw)
In-Reply-To: <87cz9y3avq.fsf@stealth>
On 07/11/2022 17:58, Punit Agrawal wrote:
> Usama Arif <usama.arif@bytedance.com> writes:
>
>> Add a new SMCCC compatible hypercalls for PV lock features:
>> ARM_SMCCC_KVM_FUNC_PV_LOCK: 0xC6000002
>>
>> Also add the header file which defines the ABI for the paravirtualized
>> lock features we're about to add.
>>
>> Signed-off-by: Zengruan Ye <yezengruan@huawei.com>
>> Signed-off-by: Usama Arif <usama.arif@bytedance.com>
>> ---
>> arch/arm64/include/asm/pvlock-abi.h | 17 +++++++++++++++++
>> include/linux/arm-smccc.h | 8 ++++++++
>> tools/include/linux/arm-smccc.h | 8 ++++++++
>> 3 files changed, 33 insertions(+)
>> create mode 100644 arch/arm64/include/asm/pvlock-abi.h
>>
>> diff --git a/arch/arm64/include/asm/pvlock-abi.h b/arch/arm64/include/asm/pvlock-abi.h
>> new file mode 100644
>> index 000000000000..3f4574071679
>> --- /dev/null
>> +++ b/arch/arm64/include/asm/pvlock-abi.h
>> @@ -0,0 +1,17 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +/*
>> + * Copyright(c) 2019 Huawei Technologies Co., Ltd
>> + * Author: Zengruan Ye <yezengruan@huawei.com>
>> + * Usama Arif <usama.arif@bytedance.com>
>> + */
>> +
>> +#ifndef __ASM_PVLOCK_ABI_H
>> +#define __ASM_PVLOCK_ABI_H
>> +
>> +struct pvlock_vcpu_state {
>> + __le64 preempted;
>> + /* Structure must be 64 byte aligned, pad to that size */
>> + u8 padding[56];
>> +} __packed;
>
> For structure alignment, I'd have expected to see the use of "aligned"
> attribute. Is there any benefit in using padding to achieve alignment?
>
Just made it consistent with pvclock-abi.h. If its more appropriate, can
change to aligned in next patchset:
diff --git a/arch/arm64/include/asm/pvlock-abi.h
b/arch/arm64/include/asm/pvlock-abi.h
index 3f4574071679..bacec4cb927a 100644
--- a/arch/arm64/include/asm/pvlock-abi.h
+++ b/arch/arm64/include/asm/pvlock-abi.h
@@ -11,7 +11,6 @@
struct pvlock_vcpu_state {
__le64 preempted;
/* Structure must be 64 byte aligned, pad to that size */
- u8 padding[56];
-} __packed;
+} __attribute__((aligned(64)));
> [...]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-11-07 18:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 6:20 [v2 0/6] KVM: arm64: implement vcpu_is_preempted check Usama Arif
2022-11-04 6:21 ` [v2 1/6] KVM: arm64: Document PV-lock interface Usama Arif
2022-11-07 17:56 ` Punit Agrawal
2022-11-07 18:05 ` Usama Arif
2022-11-04 6:21 ` [v2 2/6] KVM: arm64: Add SMCCC paravirtualised lock calls Usama Arif
2022-11-07 17:58 ` Punit Agrawal
2022-11-07 18:08 ` Usama Arif [this message]
2022-11-04 6:21 ` [v2 3/6] KVM: arm64: Support pvlock preempted via shared structure Usama Arif
2022-11-07 18:02 ` Punit Agrawal
2022-11-07 18:09 ` Usama Arif
2022-11-04 6:21 ` [v2 4/6] KVM: arm64: Provide VCPU attributes for PV lock Usama Arif
2022-11-04 6:21 ` [v2 5/6] KVM: arm64: Support the VCPU preemption check Usama Arif
2022-11-04 6:21 ` [v2 6/6] KVM: selftests: add tests for PV time specific hypercall Usama Arif
2022-11-04 9:02 ` [v2 0/6] KVM: arm64: implement vcpu_is_preempted check Marc Zyngier
2022-11-06 16:35 ` Marc Zyngier
2022-11-07 12:00 ` [External] " Usama Arif
2022-11-18 0:20 ` Marc Zyngier
2022-11-24 13:55 ` Usama Arif
2022-12-05 13:43 ` Usama Arif
2023-01-17 10:50 ` Usama Arif
2022-11-07 18:24 ` Punit Agrawal
2022-11-09 19:38 ` Usama Arif
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=71a41442-b1eb-d02e-53fe-c35dbcfc8416@bytedance.com \
--to=usama.arif@bytedance.com \
--cc=bagasdotme@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=fam.zheng@bytedance.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=liangma@liangbit.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=punit.agrawal@bytedance.com \
--cc=steven.price@arm.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=will@kernel.org \
--cc=yezengruan@huawei.com \
/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 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).