Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1221240imm; Tue, 5 Jun 2018 10:54:54 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKm7d6eUsaHcww0XRrlHlTvnMNI6x25LvDn19PP7zZxlf4v4N6VShbT4rI/EwW2R345t94/ X-Received: by 2002:a17:902:20c9:: with SMTP id v9-v6mr27443664plg.206.1528221294407; Tue, 05 Jun 2018 10:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528221294; cv=none; d=google.com; s=arc-20160816; b=vo6twxpHSwqOIeVjc37D3jBcpNxTt7MoCbNSJ7cf9sNZzW/wKNtjp6XF+sJxXLeOvs UFhYAJdy9nYc7PqbT6Bfv1+blK7mT5YYc48h9GOmSYoL1OmHLlobtirL9SDg+sV1nXFP zAQbSpgiKzFw6fTXorLfoUx6YAAY8Mkcb4sGDI1qQ4uilfljv9OZa25OEBIMh1WrN9Z1 tGOw08hANYa8QmlwkjI849m5K3BiNuefInzdrDcD9OfGFDxOs6Pim5SsfLRRiZjSVIqq uKIaOus4IyQpKvGNRP9r8oFxvwt+enMfzgp8rYWpWY83N1fkoABW/3yBK1KSSRFlX6GI eeCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=yPVmgFOPegvnPyF35z7Hn5eH8MeOUfBgsAoDVNo4TXM=; b=yO5itaGdBclP5RfoE0T5kLqi5Tn3JiWLSg2/8g3OKHpzudK/bEi1YsybXkRtUcwNQ1 LSTE9lBf+fw+V72OYMzM1io7P+gVoleOy/wDcgIIlS2kLN90NlqU2UTNujk60F1+X2IV NdRCcVtytI8dieN9Nk5DQ3B7hwZlu2MZHzG0PSsiGxQz8w7kOrO2NZ4SRb1h1InwVBsU CYg7fEUe616demdwIvxRBpJ4D3UHJnHu3B3AeM9KRHX2dLQKtVNKnGeFaQbCpNOQBvMm mpkFoS264IhMcr6E+rtZEhp68jSCVHPwejtLI69FJXRP1tLVB7LP05uPSdxASRCu0il/ GYEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gsYBDBB3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id d14-v6si20449260plr.244.2018.06.05.10.54.40; Tue, 05 Jun 2018 10:54:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gsYBDBB3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1753167AbeFERxO (ORCPT + 99 others); Tue, 5 Jun 2018 13:53:14 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:38515 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753120AbeFERwz (ORCPT ); Tue, 5 Jun 2018 13:52:55 -0400 Received: by mail-pf0-f193.google.com with SMTP id b74-v6so1682888pfl.5 for ; Tue, 05 Jun 2018 10:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yPVmgFOPegvnPyF35z7Hn5eH8MeOUfBgsAoDVNo4TXM=; b=gsYBDBB32R4NaeqNqjgqdr8I7fZ6f9lgIHUiWVBFrWyI0RTB48eNVbzfeq9LhlSVUz 7Vm7ANTI5DmlCodM8qIIraqvR7JbOzFWO7PQNrhazuJF0ecArYTUCPuvHvJ42sZgDbeV DSNhsyM7br8/jEr7UMTK7XmSf9OLlP2bv60JeupS9bJPc8kl5+/fZUa/pvSKPAp76BL2 yCljaT+eQO1qNdZ1lcEghVi33K8PoDi0GVsUJ8VkQuLIArjUp4LBc3Li5/0sdToDBII2 LRhcQevYghcQYnSGTyMjPBXaLchWo7oeIqJmlwHVryISrzBw9oI1yywnCAB3OLJ/1W9y XM1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yPVmgFOPegvnPyF35z7Hn5eH8MeOUfBgsAoDVNo4TXM=; b=Ibc/GfuW0P0P5NfRsXsbsV9mZuBjdMOp8SbN1sC6LTWEllhjANOVQbQmGkLgo4Xdux ye8JHz7GFxbgLuj5ygQB+in+5FlQ2fLysSeIT5h79zOdZdJZ2kXLr4eHlO1wtL6lZt3t jr+HxirXm1KEN0OAFQOK2YTddOn1E2SNnV0yEo1h03tbsjy+2mikKazdd6waJGKp5Wm6 vj4iZIx077ihtly5rdQwUwYrCyiyhoxItt41SkwKBKX4U/AIpRz0NZzkL3kM4yWlgPaP C+sX7kmzegC7aFKb5BJUS/w+7XxFwHA/x4odzXt+KXVJM1smLo6eWBrHm3ZS9fGnPnVR /0nQ== X-Gm-Message-State: APt69E10FvC0ETLa29fA7XxqN90WRnez3FbMIDoN3G5L3RufoLUiQUKC IycXMqRbrVSTIgTsJzTpXYr9B2Oy+ZyPYLzxEAecPA== X-Received: by 2002:a62:1747:: with SMTP id 68-v6mr16062755pfx.69.1528221174667; Tue, 05 Jun 2018 10:52:54 -0700 (PDT) MIME-Version: 1.0 References: <20180605170532.170361-1-ndesaulniers@google.com> <20180605170532.170361-3-ndesaulniers@google.com> <26c7fd1c-ab40-368f-c2e3-43a6b45157fd@zytor.com> <0dd024cd-e05a-0d67-c1bf-1a532714bb1a@zytor.com> In-Reply-To: <0dd024cd-e05a-0d67-c1bf-1a532714bb1a@zytor.com> From: Nick Desaulniers Date: Tue, 5 Jun 2018 10:52:42 -0700 Message-ID: Subject: Re: [PATCH v2 2/2] x86: paravirt: make native_save_fl extern inline To: hpa@zytor.com Cc: Andrew Morton , Ard Biesheuvel , Andrey Ryabinin , akataria@vmware.com, boris.ostrovsky@oracle.com, brijesh.singh@amd.com, Cao jin , Greg KH , "J. Kiszka" , jarkko.sakkinen@linux.intel.com, jgross@suse.com, Josh Poimboeuf , kirill.shutemov@linux.intel.com, mingo@redhat.com, mjg59@google.com, Matthias Kaehlcke , Philippe Ombredanne , rostedt@goodmis.org, Thomas Gleixner , thomas.lendacky@amd.com, Thiebaud Weksteen , linux-efi@vger.kernel.org, LKML , x86@kernel.org, virtualization@lists.linux-foundation.org, Alistair Strachan , Manoj Gupta , Greg Hackmann , sedat.dilek@gmail.com, tstellar@redhat.com, Kees Cook , Masahiro Yamada , Michal Marek , Linux Kbuild mailing list , geert@linux-m68k.org, Will Deacon , mawilcox@microsoft.com, Arnd Bergmann , David Rientjes Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/05/18 10:28, H. Peter Anvin wrote: > On 06/05/18 10:05, Nick Desaulniers wrote: >> + >> +/* >> + * void native_restore_fl(unsigned long flags) >> + * %rdi: flags >> + */ >> +ENTRY(native_restore_fl) >> + push %_ASM_DI >> + popf >> + ret >> +ENDPROC(native_restore_fl) >> +EXPORT_SYMBOL(native_restore_fl) >> > > To work on i386, this would have to be %_ASM_AX in that case. ? Does the kernel have a different calling convention for 32b x86? How does that work? regparm=3? Does that need to be added to the declaration? > Something like this added to might be useful; then you can > simply: > > push %_ASM_ARG1 > > Version with fixed typo... Oh, nice, thanks! I'll pick this up and add it to my patch set for v3 (or did you want me to review/sign-off now?) I can pick up Sedat's suggestion. -- Thanks, ~Nick Desaulniers