Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4381978pxu; Mon, 21 Dec 2020 11:00:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZlNmmFl0y81oWdI93Xc07hnZDsBEZMAP7/4JaWJOv4d2QsOjvsWonEi1r7FKce083yGXx X-Received: by 2002:a17:906:f949:: with SMTP id ld9mr10446008ejb.401.1608577222538; Mon, 21 Dec 2020 11:00:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608577222; cv=none; d=google.com; s=arc-20160816; b=AK7QXYE8J0Gz/fZKf6ru2iq16AEQp3rBguzavc65O1CYUgqnCiv/3k8C86+uM34rjW olnYQZ+K/1nfXGBq+fm4eUjpxydrLThCK4PrTK3ygthORXViXbdcbdb0jWTFqJI8QyGM 2SwHkRPxzDCmX38TMAx2Yrpt+u8f1mOGTkc+ilQIu+OEfkou0QIuVYW/2OVoSQS3n+nB 2n5Y1fKQTghzgWhOFV3W58nDuxW20gYKLNKFaPC+LNLEnnmBJ1MkjmTB9atT6L9EASvQ NP6JzZ0YWCV3H7Gk7HJHo8AHIS1gp7oT9/THZwNp7oZ5kkrbJmsRtsAAYCUssU26LhCr yHhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cElhcZNm2VH8i/cYThR7pA2axscEXIqRP6jzTA+ItnI=; b=EeQe4fBHQoWjqB1kPGUXlabm3qzLR6tZy/xaNSVNWJGMO0DGkjtFLl4U6SUtGiGCst BiV2sudyN+dsj90zhjyfdFePvgAP79yoZRIVU7aLwPECPY5FFOfSYueTzEOoj9AXl18C dFXhOHWxoM27U5PwMap/fKFyXae7EmiFZIz+aU3xYqV/PNtspLXo39VFCsczycmb0FsP 6yn+5631z+xqODnmcxl+c8eNGDFjEwGug2+9z31JCh4e/kXFG2hXlhD5CIErU8DyEoOv D/mG9SHrQ0tJDm2XagN2wcYfkBkJP1ePwYQbqOCF7gO4b1WLVvN8VwT+l9YeAZcUzEty I37Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kbsl16Km; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hk16si8086012ejb.8.2020.12.21.10.59.59; Mon, 21 Dec 2020 11:00:22 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=kbsl16Km; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726321AbgLUS6F (ORCPT + 99 others); Mon, 21 Dec 2020 13:58:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725811AbgLUS6E (ORCPT ); Mon, 21 Dec 2020 13:58:04 -0500 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92828C0613D6; Mon, 21 Dec 2020 10:57:24 -0800 (PST) Received: by mail-qt1-x82d.google.com with SMTP id a6so7317779qtw.6; Mon, 21 Dec 2020 10:57:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cElhcZNm2VH8i/cYThR7pA2axscEXIqRP6jzTA+ItnI=; b=kbsl16KmA3LValskyJ0UyOS4jCb+3f967y6f/GWmrtwQEdmmcBgFM4Fjo8ItNuZgmN jDrVV4Y3wjariyzCu9KQG3sHOLu/df4Fg5+Xa5hunvMUmHo3EjmC3JvyDcjxTXeCzBst fynuWEJRaNlfvgtM2TvtKutmuD11tjoDE0b/EGu3cpRaMZOn1KJPSn59opoRQQbRtrU5 0RT0UpIbBf/KeM97xfhxLfnjulULOg1Qx8cUfMt2FoYGa58QJ/UZ9nx8cUyUhMx/dsqY 2O4ceT9y70DWwaWS3wwA1l6+j24LseZPhKPU/9q1hi+j0QXUJaDoBi/KeegaUWo+aN42 SIUg== 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=cElhcZNm2VH8i/cYThR7pA2axscEXIqRP6jzTA+ItnI=; b=kC/oW54lGJNCl4tYPaRDQhJPWcsbs3+B66vuuAX23mAFsmcVSBSgyVUkJTMW5zEn+/ InZXGXhzn+AoReg+DBknJT6hWBAiX0fhGlYj4hyeD9ny8QgrvLSbhtWxO2svp/5FAfcN DrVDHA2jH8B3oXXXnV3oJUhqvVojWxl2jwOAWQrP+7UkS+wlLxEFNblHDUezhA4yHcHR InP6BPj0wjjZQMllHePFHpgogT84Rn70uiRT0pMCKEvG8oGxAngh2RetJ/SLYhhLId4p pgnAavKdVJGC32vQU62BLj3FliXKBSxFCztrxVKKCFyW0pCUJuXlFwYt4+Urp2pY9Qc5 SUIQ== X-Gm-Message-State: AOAM533rxZZHL9Xn+jnpzsltoq9Ue3M2Vi4Ugo93khyDKblV5iVGwqci UppGv0+bEsIffCV/LZCXcTipebh66+Lle3FH0Bg= X-Received: by 2002:ac8:5806:: with SMTP id g6mr17655674qtg.292.1608577043802; Mon, 21 Dec 2020 10:57:23 -0800 (PST) MIME-Version: 1.0 References: <20201220211109.129946-1-ubizjak@gmail.com> In-Reply-To: From: Uros Bizjak Date: Mon, 21 Dec 2020 19:57:12 +0100 Message-ID: Subject: Re: [PATCH v2] KVM/x86: Move definition of __ex to x86.h To: Sean Christopherson Cc: kvm@vger.kernel.org, LKML , Paolo Bonzini , Krish Sadhukhan Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 21, 2020 at 7:19 PM Sean Christopherson wrote: > > On Sun, Dec 20, 2020, Uros Bizjak wrote: > > Merge __kvm_handle_fault_on_reboot with its sole user > > There's also a comment in vmx.c above kvm_cpu_vmxoff() that should be updated. > Alternatively, and probably preferably for me, what about keeping the long > __kvm_handle_fault_on_reboot() name for the macro itself and simply moving the > __ex() macro? > > That would also allow keeping kvm_spurious_fault() and > __kvm_handle_fault_on_reboot() where they are (for no reason other than to avoid > code churn). Though I'm also ok if folks would prefer to move everything to > x86.h. The new patch is vaguely based on our correspondence on the prototype patch: --q-- Moving this to asm/kvm_host.h is a bit sketchy as __ex() isn't exactly the most unique name. arch/x86/kvm/x86.h would probably be a better destination as it's "private". __ex() is only used in vmx.c, nested.c and svm.c, all of which already include x86.h. --/q-- where you mentioned that x86.h would be a better destination for __ex(). IMO, __kvm_handle_fault_on_reboot also belongs in x86.h, as it deals with a low-level access to the processor, and there is really no reason for this #define to be available for the whole x86 architecture directory. I remember looking for the __kvm_handle_falult_on_reboot, and was surprised to find it in a global x86 include directory. I tried to keep __ex as a redefine to __kvm_hanlde_fault_on_reboot in x86.h, but it just looked weird, since __ex is the only user and the introductory document explains in detail, what __kvm_hanlde_fault_on_reboot (aka __ex) does. Uros.