From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 97232C4332F for ; Mon, 7 Nov 2022 18:12:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xNJQ/M2ZCjQZ2yj0VpUA5idUO0RRKN5wi8T0yU2a2gA=; b=gdGYID/Vbd0vYc ZziTRm+CR6h3+SKUjzf/37QvW8R0iNGI9esDnfKo4EkgXzdkQVlHnn4ovrwetLfXC/vRzJ3fCQQPF uVwKhhUz2g+2NUjT5e8zrYBTBDduFh5vojXF0holkcnAA7Gsn5g2UkSRPrQ8q344fLS7aWUK4tIsl +la4P8SLOq8mgBZ8GzqKIOMJwN2AZwuhJXNL5esX+RU8BPOojvxDWEnQYFa054w0O69p3HQzaAAcp YqYCF0P9JzX0GY3H/itH6A8aIuX/s6Z6BRC+h+JyG9K/At1JwGjmWnQqSDMNOCrbFV03zIHLIIGB8 mKg2lvDC1DCexbwf2FSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1os6aO-00H4fO-5s; Mon, 07 Nov 2022 18:11:05 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1os6YD-00H3bJ-CE for linux-arm-kernel@lists.infradead.org; Mon, 07 Nov 2022 18:08:51 +0000 Received: by mail-wm1-x336.google.com with SMTP id v7so7406792wmn.0 for ; Mon, 07 Nov 2022 10:08:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Iyemd4HvK+DGYoF1NoBJb/8v7rlPpLIo+qNtTJ7A0Ww=; b=BZYjDsn/5DylRVSBVwNfJ49v8b0I/sVskWuhe3YR71vQtj5NDJzzp3iI6/QEi20uYL FfZ9yZ5wd4+4/poDHpX42prieA/ABkyC9CMQCh8Kecv0rC8XTeq3E1iJZPH8TjytnPdm 2KlApBArF0MjvFn6tfAVN1Px/03htSrzGTSD/rZimuCZerxfr5UZaOjlok3me3++Tac1 K28jTJyoLWZDWNcVKYmtEPRMBcnpqfotxiVKufkl0BqNoMln9J5KDjPL/ZHqGFGRkhzA cC0F9ou2jlvBM4qjHfFw/yQsFEv8QxoEYMTpdr5v19/00tG9yoLn+OiUMjV1ySZYM1SP 3mjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Iyemd4HvK+DGYoF1NoBJb/8v7rlPpLIo+qNtTJ7A0Ww=; b=4JW7FCq8jS8/Bug4WXJR+032OecB/k26uGWmWjZH3AwRSQu0k6ZQJSDJCrtg4zQqLY kNjGqQ0VIUtGbEoq4w21vxt4SqnW306vHHPM3Zq9rCwzASHGsYlvcTTqYUj7LQdyn2Vi WaDnoQmexVgrDCiUTizjVw62tEys4n9DIJHnEvYFU9CFnEKFTukhQWEa7gPp2pcfvf/H hgd5cZQ6V/OwCDwFkpRqpu6jhSTkpnupO2CNw/3S6p2mfpvTUg/u/BPKz/zTcXuLo2mQ rRB131JQE9dcJgEKFc/G2Wh4ojKFaK75XNPEkv/I8itTcyifFCHysDZga73KSCR0ceq3 D5qQ== X-Gm-Message-State: ACrzQf3+HJ0osSe9akme3kBFRZbR8/5p4k6Rae+nILOqk2mMUIrsg6+n GV48L4m4QYu7ae+MGxB3vmcirg== X-Google-Smtp-Source: AMsMyM5Hh1s5ndsMCASrivT9+H550/0X3uXptpk3+2XbPJSWiaha1BuW5q/Uu0FobiOLXQQyw1iRlA== X-Received: by 2002:a05:600c:1609:b0:3cf:4dc4:5a99 with SMTP id m9-20020a05600c160900b003cf4dc45a99mr34442575wmn.67.1667844527658; Mon, 07 Nov 2022 10:08:47 -0800 (PST) Received: from ?IPV6:2a02:6b6a:b4d7:0:ebf7:de38:f6bc:8fe8? ([2a02:6b6a:b4d7:0:ebf7:de38:f6bc:8fe8]) by smtp.gmail.com with ESMTPSA id l21-20020a05600c4f1500b003b4fdbb6319sm13186914wmq.21.2022.11.07.10.08.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Nov 2022 10:08:46 -0800 (PST) Message-ID: <71a41442-b1eb-d02e-53fe-c35dbcfc8416@bytedance.com> Date: Mon, 7 Nov 2022 18:08:45 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [v2 2/6] KVM: arm64: Add SMCCC paravirtualised lock calls Content-Language: en-US To: Punit Agrawal 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 References: <20221104062105.4119003-1-usama.arif@bytedance.com> <20221104062105.4119003-3-usama.arif@bytedance.com> <87cz9y3avq.fsf@stealth> From: Usama Arif In-Reply-To: <87cz9y3avq.fsf@stealth> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221107_100849_453034_4102E37F X-CRM114-Status: GOOD ( 18.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 07/11/2022 17:58, Punit Agrawal wrote: > Usama Arif 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 >> Signed-off-by: Usama Arif >> --- >> 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 >> + * Usama Arif >> + */ >> + >> +#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