Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp788787ybj; Thu, 7 May 2020 07:40:56 -0700 (PDT) X-Google-Smtp-Source: APiQypJN563RTMUnfjglW2cq1SEqe62DVg9AxjAe7rxfITSHkP2veR3JRwrxfL8gWGx8ZuNPzmc/ X-Received: by 2002:a17:906:4e02:: with SMTP id z2mr12170866eju.212.1588862456335; Thu, 07 May 2020 07:40:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588862456; cv=none; d=google.com; s=arc-20160816; b=PDXzzyhE17nFw2V5+35fiTlixTs/+xRpnKrJCiaUmbFXyKkb/BuYbe4Jf1RNiEtvFt G/jqwZFUCogSNkGL0mzQpzRKVSunG+S/rcBpVwWYErl1L/2O+ztE6nNhpf4wCXs+3pag R13ijzlxyXQ5pwhVrXxYl4IXNYhBIsJMLkT7nz09tlC/q/LCGXAVmbc+xFS53di9StNU RUD+V2h339kHBZO0Js9w/niH9iR96UjNu6jxvibm50pdOImj8zz44z/bjohmxUmwwfAO pa5K1XXKhdZUl+k7+ZrjCH+L3tGh6/uSiWtn3YSbTtEVc/tc+83S+/orMN0h0WZjmzts rhEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=2cUePzGWzDDGYMdSJecoGhzZI0bICDSzA7fgbQwoVdI=; b=vJUjc1DzVx6je0tZGoSFBjyfdHFjlBqJF17qjcxnJzrQoCR5hTbqZhOvXpq/4SIvaL S9h4eur3EKnJdolFQi/5TWfMVdPpiJ01IyFp2OEZVyi4xrtJ32DwgFTfHoLpOJrgmFjm e1ELwQMc34HepqW39uJJfo91mB4tRNoFhwMBW5SQvQ1IeyXVjvArVB+LvvuJc17nWLyk R8w9DhG5SAEV4FE27OT72GP9DfFNfIxnRfJlYBGdu/pM7KlBX4+fXpzDBlSig4gDXVoV JOw/M7wYJZy9OH8jfRLHxNxKd4YxVH2i1lRmaoJqaU7+pfbsiVpvvs+YC/uMUGQ2sltW xJ/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=va8IcNz8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h21si3143631ejc.152.2020.05.07.07.40.33; Thu, 07 May 2020 07:40:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=va8IcNz8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728381AbgEGOgp (ORCPT + 99 others); Thu, 7 May 2020 10:36:45 -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-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