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 X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DD78C38A24 for ; Thu, 7 May 2020 14:36:43 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id B7591208D6 for ; Thu, 7 May 2020 14:36:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="va8IcNz8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7591208D6 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 5FAB54B375; Thu, 7 May 2020 10:36:42 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6XVJb9eUZYOv; Thu, 7 May 2020 10:36:41 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 4C73B4B316; Thu, 7 May 2020 10:36:41 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 376F34B316 for ; Thu, 7 May 2020 10:36:40 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4ebmodWM+icm for ; Thu, 7 May 2020 10:36:39 -0400 (EDT) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 2DEE34B2C3 for ; Thu, 7 May 2020 10:36:39 -0400 (EDT) Received: by mail-wr1-f66.google.com with SMTP id x17so6682592wrt.5 for ; Thu, 07 May 2020 07:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2cUePzGWzDDGYMdSJecoGhzZI0bICDSzA7fgbQwoVdI=; b=va8IcNz8I2zqjE9CHsCzAnM6YWsHCkT+6BNuJ8fRsAg/QlH3lUCW+YkNknR8VqSvOG E/IC3lRkd0ZwHQalan9TG1D4/w2fUTyiZGxS/Q17YpXKcCbyWWsxSxx0xFlWxdzfx+ut ysYussSGR3GqsKtZzvNvKz5uEtHfKa8FYgUcDiMWE1hpFlB7r3M6eaEtZRKXOjsn7QfN oORfrpfCEN3NfkyQRARTPBZf4GQ7PEgSTsKIsFDcD3penmf6YN2IBJ8mFLFunzaBnjmu tuILSOMKhNChWN19gJNhOvmcEv+JElMcVgODP4coW1YiN9SIPkaGu9JYdaOSup2+p4YN 6M5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2cUePzGWzDDGYMdSJecoGhzZI0bICDSzA7fgbQwoVdI=; b=ncLXSKRW8YxO6HP+fEmJ0sPIpRShY1MMV2KKVnJ0CMyj2lEM8mNiIVAygbob4KmEP+ EeofNHYbPyX//LVQ1POcy1+/gIKrkPTjNwQAz64Fs7fjO+ihDid3nHBGoya4tGS+gpBg jKx2ajl8876rzbx2z87nkXVcr0nWFmAJq8kuQAte+UPUlWSKq3eRRTv/flkPZcOw35DN 4TdJKDArstUnudFv48rUy7zSq4aOsfXidgD+OvfzUIf4joBj9wCpoY1jDI2IV4OVXUDZ wYNu00ylNsirplvKlZ9wNfKrBfLD8IjZUkYXpQfBcsv+H0J6fZMJWvaXM7i//jUUDVVp 0kQw== X-Gm-Message-State: AGi0PubOx/v/tg+YMoQ9VoOOfmp/S0nk19gboZCYMvDmzLEaRw5/dyrF QkTRrPPkXa66fm8HZkUerHhWvQ== X-Google-Smtp-Source: APiQypIg/E6o9sgqmhLM4Cgv9qszquDB3MDl0xGyH0m0ulxsGd7+lcGC7cQvQySga4gTWRe+HpOBog== X-Received: by 2002:adf:f8c1:: with SMTP id f1mr15498170wrq.171.1588862197885; Thu, 07 May 2020 07:36:37 -0700 (PDT) Received: from google.com ([2a00:79e0:d:110:d6cc:2030:37c1:9964]) by smtp.gmail.com with ESMTPSA id h17sm8450409wmm.6.2020.05.07.07.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 07:36:37 -0700 (PDT) Date: Thu, 7 May 2020 15:36:33 +0100 From: Quentin Perret To: Marc Zyngier Subject: Re: [PATCH 01/15] arm64: kvm: Unify users of HVC instruction Message-ID: <20200507143633.GA169263@google.com> References: <20200430144831.59194-1-dbrazdil@google.com> <20200430144831.59194-2-dbrazdil@google.com> <878si3j13w.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <878si3j13w.wl-maz@kernel.org> Cc: Catalin Marinas , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Will Deacon , kvmarm@lists.cs.columbia.edu X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Thursday 07 May 2020 at 15:01:07 (+0100), Marc Zyngier wrote: > > /* > > - * u64 __kvm_call_hyp(void *hypfn, ...); > > + * u64 __kvm_call_hyp(unsigned long arg, ...); > > * > > * This is not really a variadic function in the classic C-way and care must > > * be taken when calling this to ensure parameters are passed in registers > > * only, since the stack will change between the caller and the callee. > > - * > > - * Call the function with the first argument containing a pointer to the > > - * function you wish to call in Hyp mode, and subsequent arguments will be > > - * passed as x0, x1, and x2 (a maximum of 3 arguments in addition to the > > - * function pointer can be passed). The function being called must be mapped > > - * in Hyp mode (see init_hyp_mode in arch/arm/kvm/arm.c). Return values are > > - * passed in x0. > > - * > > - * A function pointer with a value less than 0xfff has a special meaning, > > - * and is used to implement hyp stubs in the same way as in > > - * arch/arm64/kernel/hyp_stub.S. > > I don't think any of this becomes obsolete with this patch (apart from > the reference to 32bit), and only changes with patch #2. Or am I > misunderstanding something? Nope, I think you're right. To be fair, this patch has changed quite a bit since the first version (which did change that comment a little later IIRC), but David has done all the hard work on top so I'll let him answer that one. And David, feel free to take the authorship for this patch -- I barely recognize it (for the better), so it's more than fair if you get the credit :) Thanks, Quentin _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D5D3C38A24 for ; Thu, 7 May 2020 14:36:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id DB2FD2073A for ; Thu, 7 May 2020 14:36:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KUJPMlsC"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="va8IcNz8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB2FD2073A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=noGRUmFW1nxsi/KPO7p91EK2DaMFVYqKkVWD+Z3RC+g=; b=KUJPMlsC9I7ENL APE+vyPXZCFTFP5XLp1c0mqfatNkzob/PtsNCPIpggfnWpjvLZGo83JBK8gQkTZhn4cjxyPCgZXKF yR+deKu/pboY9Vc3bU+35FoUw/N1SCa6HiiSLeLSW2+vJNPiYlj4l6f54imOFzvjMAQYs4vUaY0Td /GUZ7llm4YT9bzYWemLhMpyVxe6ds8haMzoR4E9cncae1dtXHdeH1asCwUwqDjadLlkqF8fyB6bQ8 F0K1XEij5WucdIRXw9QVUSnZpIhyBm2eAYvR8gjNN1H9mc2cD7shtDEXPtIGZIZFh20h6wVqt3Ra0 woCENUE1GORwYnI5Gp/Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWhdk-0002V6-UG; Thu, 07 May 2020 14:36:44 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWhdf-0002SM-R8 for linux-arm-kernel@lists.infradead.org; Thu, 07 May 2020 14:36:42 +0000 Received: by mail-wr1-x442.google.com with SMTP id g13so6671035wrb.8 for ; Thu, 07 May 2020 07:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2cUePzGWzDDGYMdSJecoGhzZI0bICDSzA7fgbQwoVdI=; b=va8IcNz8I2zqjE9CHsCzAnM6YWsHCkT+6BNuJ8fRsAg/QlH3lUCW+YkNknR8VqSvOG E/IC3lRkd0ZwHQalan9TG1D4/w2fUTyiZGxS/Q17YpXKcCbyWWsxSxx0xFlWxdzfx+ut ysYussSGR3GqsKtZzvNvKz5uEtHfKa8FYgUcDiMWE1hpFlB7r3M6eaEtZRKXOjsn7QfN oORfrpfCEN3NfkyQRARTPBZf4GQ7PEgSTsKIsFDcD3penmf6YN2IBJ8mFLFunzaBnjmu tuILSOMKhNChWN19gJNhOvmcEv+JElMcVgODP4coW1YiN9SIPkaGu9JYdaOSup2+p4YN 6M5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2cUePzGWzDDGYMdSJecoGhzZI0bICDSzA7fgbQwoVdI=; b=jGhwDMGR8NIPAW+EOE0sFZKHva4luAb7MST+2uW3XuH3fNVnJRVyVCX14qNYMWRGZQ RWWbLP5BmsiG/ZL5LH+x3A77qOXb3sNiSixrxcJDsoqs2CeXURtoFWgkborKjZuX4LwL uF0OMs42JCuuGMAhIuImwFOPT+Aeq5HCACy732r4GXoKzXPH7ablrr5rvotNhH9LBUCj pKoLFVk/DhL5hE9y7Uwo8lT9x9oae8spTQAjFUMl2RBphphrfgobGre6nsAjzeA4htJb skcXND5WbQnMWn+MBouLczW+7dvDc2hcZejXo25pS1uMfhfO7FQnOqarxNY/AMJjW2PD 9YQA== X-Gm-Message-State: AGi0PuZCGEYWSQLkrSvEEwWbEZvzgnG0uNLOGsh/P92I+T5Tsc7vYDxD liGoeIQ65Rz8cu+XxialCM7qWQ== X-Google-Smtp-Source: APiQypIg/E6o9sgqmhLM4Cgv9qszquDB3MDl0xGyH0m0ulxsGd7+lcGC7cQvQySga4gTWRe+HpOBog== X-Received: by 2002:adf:f8c1:: with SMTP id f1mr15498170wrq.171.1588862197885; Thu, 07 May 2020 07:36:37 -0700 (PDT) Received: from google.com ([2a00:79e0:d:110:d6cc:2030:37c1:9964]) by smtp.gmail.com with ESMTPSA id h17sm8450409wmm.6.2020.05.07.07.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 07:36:37 -0700 (PDT) Date: Thu, 7 May 2020 15:36:33 +0100 From: Quentin Perret To: Marc Zyngier Subject: Re: [PATCH 01/15] arm64: kvm: Unify users of HVC instruction Message-ID: <20200507143633.GA169263@google.com> References: <20200430144831.59194-1-dbrazdil@google.com> <20200430144831.59194-2-dbrazdil@google.com> <878si3j13w.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <878si3j13w.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200507_073640_677057_47E9AECC X-CRM114-Status: GOOD ( 18.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Suzuki K Poulose , Catalin Marinas , linux-kernel@vger.kernel.org, James Morse , linux-arm-kernel@lists.infradead.org, David Brazdil , Will Deacon , kvmarm@lists.cs.columbia.edu, Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thursday 07 May 2020 at 15:01:07 (+0100), Marc Zyngier wrote: > > /* > > - * u64 __kvm_call_hyp(void *hypfn, ...); > > + * u64 __kvm_call_hyp(unsigned long arg, ...); > > * > > * This is not really a variadic function in the classic C-way and care must > > * be taken when calling this to ensure parameters are passed in registers > > * only, since the stack will change between the caller and the callee. > > - * > > - * Call the function with the first argument containing a pointer to the > > - * function you wish to call in Hyp mode, and subsequent arguments will be > > - * passed as x0, x1, and x2 (a maximum of 3 arguments in addition to the > > - * function pointer can be passed). The function being called must be mapped > > - * in Hyp mode (see init_hyp_mode in arch/arm/kvm/arm.c). Return values are > > - * passed in x0. > > - * > > - * A function pointer with a value less than 0xfff has a special meaning, > > - * and is used to implement hyp stubs in the same way as in > > - * arch/arm64/kernel/hyp_stub.S. > > I don't think any of this becomes obsolete with this patch (apart from > the reference to 32bit), and only changes with patch #2. Or am I > misunderstanding something? Nope, I think you're right. To be fair, this patch has changed quite a bit since the first version (which did change that comment a little later IIRC), but David has done all the hard work on top so I'll let him answer that one. And David, feel free to take the authorship for this patch -- I barely recognize it (for the better), so it's more than fair if you get the credit :) Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40374C38A2A for ; Thu, 7 May 2020 14:36:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1DE5120659 for ; Thu, 7 May 2020 14:36:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="va8IcNz8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728982AbgEGOgq (ORCPT ); Thu, 7 May 2020 10:36:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728765AbgEGOgj (ORCPT ); Thu, 7 May 2020 10:36:39 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69437C05BD43 for ; Thu, 7 May 2020 07:36:39 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id s8so6693257wrt.9 for ; Thu, 07 May 2020 07:36:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2cUePzGWzDDGYMdSJecoGhzZI0bICDSzA7fgbQwoVdI=; b=va8IcNz8I2zqjE9CHsCzAnM6YWsHCkT+6BNuJ8fRsAg/QlH3lUCW+YkNknR8VqSvOG E/IC3lRkd0ZwHQalan9TG1D4/w2fUTyiZGxS/Q17YpXKcCbyWWsxSxx0xFlWxdzfx+ut ysYussSGR3GqsKtZzvNvKz5uEtHfKa8FYgUcDiMWE1hpFlB7r3M6eaEtZRKXOjsn7QfN oORfrpfCEN3NfkyQRARTPBZf4GQ7PEgSTsKIsFDcD3penmf6YN2IBJ8mFLFunzaBnjmu tuILSOMKhNChWN19gJNhOvmcEv+JElMcVgODP4coW1YiN9SIPkaGu9JYdaOSup2+p4YN 6M5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2cUePzGWzDDGYMdSJecoGhzZI0bICDSzA7fgbQwoVdI=; b=GhanfNXz/bdnVYCgEFpcQIxOj62/vZJulzunEQECG/ZQYIpYrv1tOdZ1FAfrCW/n/5 Cj6i213ftHvzYm9rPl/x8HuZFMOEBPlV+sBWlcxEWV1uVjDbAuZiHKtJ1NJ1sHkFnWl0 c8PnI0Yl9RJKlDI1oh8QG44bAccstFjtuWBScDyAOrjcolWH6VrzfCXxGAbXl2ABUGfU ibIqjeHhiVqof4elRe+GOLrPqdI7wVBKYEWeo+PPNz7BZoQ+wn72+dvxyR93QLdsowZX 4q3SFbJYszTG1khszk8XkC7zPAA9Te+Ki+vzD8FaRIvD5twyY3ow0TVdtb4tAYLbx8ty QZcA== X-Gm-Message-State: AGi0PubO24QTmqdQgnqK0OaIAM5rk9lBiERNJYwQrXEV/qaQQnzEv/yi MH6cftFaeoy4gBT0V009SFNrKQ== X-Google-Smtp-Source: APiQypIg/E6o9sgqmhLM4Cgv9qszquDB3MDl0xGyH0m0ulxsGd7+lcGC7cQvQySga4gTWRe+HpOBog== X-Received: by 2002:adf:f8c1:: with SMTP id f1mr15498170wrq.171.1588862197885; Thu, 07 May 2020 07:36:37 -0700 (PDT) Received: from google.com ([2a00:79e0:d:110:d6cc:2030:37c1:9964]) by smtp.gmail.com with ESMTPSA id h17sm8450409wmm.6.2020.05.07.07.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 07:36:37 -0700 (PDT) Date: Thu, 7 May 2020 15:36:33 +0100 From: Quentin Perret To: Marc Zyngier Cc: David Brazdil , Catalin Marinas , James Morse , Julien Thierry , Suzuki K Poulose , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/15] arm64: kvm: Unify users of HVC instruction Message-ID: <20200507143633.GA169263@google.com> References: <20200430144831.59194-1-dbrazdil@google.com> <20200430144831.59194-2-dbrazdil@google.com> <878si3j13w.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878si3j13w.wl-maz@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 07 May 2020 at 15:01:07 (+0100), Marc Zyngier wrote: > > /* > > - * u64 __kvm_call_hyp(void *hypfn, ...); > > + * u64 __kvm_call_hyp(unsigned long arg, ...); > > * > > * This is not really a variadic function in the classic C-way and care must > > * be taken when calling this to ensure parameters are passed in registers > > * only, since the stack will change between the caller and the callee. > > - * > > - * Call the function with the first argument containing a pointer to the > > - * function you wish to call in Hyp mode, and subsequent arguments will be > > - * passed as x0, x1, and x2 (a maximum of 3 arguments in addition to the > > - * function pointer can be passed). The function being called must be mapped > > - * in Hyp mode (see init_hyp_mode in arch/arm/kvm/arm.c). Return values are > > - * passed in x0. > > - * > > - * A function pointer with a value less than 0xfff has a special meaning, > > - * and is used to implement hyp stubs in the same way as in > > - * arch/arm64/kernel/hyp_stub.S. > > I don't think any of this becomes obsolete with this patch (apart from > the reference to 32bit), and only changes with patch #2. Or am I > misunderstanding something? Nope, I think you're right. To be fair, this patch has changed quite a bit since the first version (which did change that comment a little later IIRC), but David has done all the hard work on top so I'll let him answer that one. And David, feel free to take the authorship for this patch -- I barely recognize it (for the better), so it's more than fair if you get the credit :) Thanks, Quentin