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 A9E04C77B73 for ; Mon, 5 Jun 2023 19:50:50 +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:References:Cc:To:Subject:From: 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=Hs/rh8UYzgwcosPXUqI4QPoUH3XtwG4qrte5DQzc19c=; b=vj11ilSKkE8rrx lfk/ac/c+M+hM6Uw7UjdQxKStot4b8Du/hdnGBu7s7p3Gvfpj/0QyNYMugAxgVCp0JMd8eYI/zqUe RbpVpVvRNyC+gQ3fp/tUEkKAGyqpo2TsqRxJtDQYMM3wjGIjWX6F4oyk6WDZlbTEA1+5J3FJ1n/ns p82yCnAiChc6fKTjMojmaxoBS88sH4otpi1PEp27pUqArWmMQFW89XA2Vhn8oGZ+oLPg/tduC4M1N rkaM5WuaD+7ug59pbXDknSU5PEthXxV6RVhvU8HixhmBLFuZAdyF7Wrg9LBeV7DjEhE29+pqF22Lv NyPBQhFQujqDAZcI1KXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6GDl-00GcBh-0b; Mon, 05 Jun 2023 19:50:29 +0000 Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6GDi-00GcA4-20 for linux-arm-kernel@lists.infradead.org; Mon, 05 Jun 2023 19:50:27 +0000 Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-33aa60f4094so16096845ab.1 for ; Mon, 05 Jun 2023 12:50:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685994624; x=1688586624; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=GpRhe2R0Es6IO0/dJ+FMneELYVcoyyiGXEcYyqBR1zU=; b=lxFaxaUW7Xtd/PdVCMFNnCcKWynLo7WvMj+7E+5Uwcr17Lq1HnUZwAsVch1NnmEobZ UkCEDe8ZKe+jmc9vpPb/AtaE6hoREmpr9fghJoLUyZW5vwiInanWyp6nigFGd7p6gQHr 8qL55KpcEh7YhXBMIzCa0sPSgbkclWTzO+vOXMfdJ3O9rq/HUIwyGdJGiXuHV2I27MR/ GL24iPlzvO4amOJXaErmeuUcPKezOIcKPAAC18Tas2V70q9GDUFEYIzEob7dViJMnon2 og9KJMcklsG0WV68R5n2SoNPOV8a5ZCDzD/zJjpfde+5fsRNTDMXz8vhqCmqRZ0McTTW 1bmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685994624; x=1688586624; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GpRhe2R0Es6IO0/dJ+FMneELYVcoyyiGXEcYyqBR1zU=; b=Gqg4/lGEGIc/Xx1nYR1tFFwKj7IdaYHgS+6XCsHZzJp/TiD+CV7waHAfLOtorE5N8+ 0QyLPnvjWDvC+0iXFaIpd3TEz/GU0bpI/xD2zA9ICL4TsALtC9EJMMsEOEXoXKRpl1Sv LM8S/hWkSb7a/3vcbTyTY7flXqpphH87q3u77gVfAle+0UNjdesxk1fc9ox/lA4pi0Fd mIfCVoaz+Ju3ZX3xuNmZJBxWqFupxg0wC2aDRxPzHec/K2kGRDLnVQrQuaMCGqdCpnhk CWjvmBumVzxf6MmJ6xiLZQi17tyMLBP4y1H1zYXqe3gIPe6HQAl7Mbs+CTlUIUeDVOpu 6gUA== X-Gm-Message-State: AC+VfDy+TVkAJZAok1mz6GY0urWckHaCNCUyQcqSQrzFIRB9gT3gJv/Q r50JT3jlCuK5oNqPnKbEVsL3DQ== X-Google-Smtp-Source: ACHHUZ7n6MVykFwFl4isVQ33tqsrNUEVf4D707qBep/3JqJhjnxPuhPyFAXg1/aDmVtrF3jwk3jcZA== X-Received: by 2002:a05:6e02:1152:b0:338:1382:ad12 with SMTP id o18-20020a056e02115200b003381382ad12mr340250ill.11.1685994624495; Mon, 05 Jun 2023 12:50:24 -0700 (PDT) Received: from [172.22.22.28] ([98.61.227.136]) by smtp.gmail.com with ESMTPSA id f19-20020a056638119300b0040fad79ac08sm2382351jas.89.2023.06.05.12.50.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jun 2023 12:50:24 -0700 (PDT) Message-ID: Date: Mon, 5 Jun 2023 14:50:22 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 From: Alex Elder Subject: Re: [PATCH v13 21/24] virt: gunyah: Add hypercalls for sending doorbell To: Elliot Berman , Srinivas Kandagatla , Prakruthi Deepak Heragu , Catalin Marinas , Will Deacon Cc: Murali Nalajala , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Dmitry Baryshkov , Bjorn Andersson , Konrad Dybcio , Arnd Bergmann , Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Bagas Sanjaya , Andy Gross , Jassi Brar , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20230509204801.2824351-1-quic_eberman@quicinc.com> <20230509204801.2824351-22-quic_eberman@quicinc.com> Content-Language: en-US In-Reply-To: <20230509204801.2824351-22-quic_eberman@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230605_125026_659230_D5838C5A X-CRM114-Status: GOOD ( 18.27 ) 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 5/9/23 3:47 PM, Elliot Berman wrote: > Gunyah doorbells allow two virtual machines to signal each other using > interrupts. Add the hypercalls needed to assert the interrupt. > > Signed-off-by: Elliot Berman Looks good. Reviewed-by: Alex Elder > --- > arch/arm64/gunyah/gunyah_hypercall.c | 25 +++++++++++++++++++++++++ > include/linux/gunyah.h | 3 +++ > 2 files changed, 28 insertions(+) > > diff --git a/arch/arm64/gunyah/gunyah_hypercall.c b/arch/arm64/gunyah/gunyah_hypercall.c > index 5f33f53e05a9..3d48c8650851 100644 > --- a/arch/arm64/gunyah/gunyah_hypercall.c > +++ b/arch/arm64/gunyah/gunyah_hypercall.c > @@ -33,6 +33,8 @@ EXPORT_SYMBOL_GPL(arch_is_gh_guest); > fn) > > #define GH_HYPERCALL_HYP_IDENTIFY GH_HYPERCALL(0x8000) > +#define GH_HYPERCALL_BELL_SEND GH_HYPERCALL(0x8012) > +#define GH_HYPERCALL_BELL_SET_MASK GH_HYPERCALL(0x8015) > #define GH_HYPERCALL_MSGQ_SEND GH_HYPERCALL(0x801B) > #define GH_HYPERCALL_MSGQ_RECV GH_HYPERCALL(0x801C) > #define GH_HYPERCALL_VCPU_RUN GH_HYPERCALL(0x8065) > @@ -55,6 +57,29 @@ void gh_hypercall_hyp_identify(struct gh_hypercall_hyp_identify_resp *hyp_identi > } > EXPORT_SYMBOL_GPL(gh_hypercall_hyp_identify); > > +enum gh_error gh_hypercall_bell_send(u64 capid, u64 new_flags, u64 *old_flags) > +{ > + struct arm_smccc_res res; > + > + arm_smccc_1_1_hvc(GH_HYPERCALL_BELL_SEND, capid, new_flags, 0, &res); > + > + if (res.a0 == GH_ERROR_OK && old_flags) > + *old_flags = res.a1; > + > + return res.a0; > +} > +EXPORT_SYMBOL_GPL(gh_hypercall_bell_send); > + > +enum gh_error gh_hypercall_bell_set_mask(u64 capid, u64 enable_mask, u64 ack_mask) > +{ > + struct arm_smccc_res res; > + > + arm_smccc_1_1_hvc(GH_HYPERCALL_BELL_SET_MASK, capid, enable_mask, ack_mask, 0, &res); > + > + return res.a0; > +} > +EXPORT_SYMBOL_GPL(gh_hypercall_bell_set_mask); > + > enum gh_error gh_hypercall_msgq_send(u64 capid, size_t size, void *buff, u64 tx_flags, bool *ready) > { > struct arm_smccc_res res; > diff --git a/include/linux/gunyah.h b/include/linux/gunyah.h > index cd5704a82c6a..1f1685518bf3 100644 > --- a/include/linux/gunyah.h > +++ b/include/linux/gunyah.h > @@ -171,6 +171,9 @@ static inline u16 gh_api_version(const struct gh_hypercall_hyp_identify_resp *gh > > void gh_hypercall_hyp_identify(struct gh_hypercall_hyp_identify_resp *hyp_identity); > > +enum gh_error gh_hypercall_bell_send(u64 capid, u64 new_flags, u64 *old_flags); > +enum gh_error gh_hypercall_bell_set_mask(u64 capid, u64 enable_mask, u64 ack_mask); > + > #define GH_HYPERCALL_MSGQ_TX_FLAGS_PUSH BIT(0) > > enum gh_error gh_hypercall_msgq_send(u64 capid, size_t size, void *buff, u64 tx_flags, bool *ready); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel