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.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_DBL_ABUSE_MALW,USER_AGENT_SANE_1 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 81E5AC35246 for ; Fri, 31 Jan 2020 18:55:39 +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 5A87820707 for ; Fri, 31 Jan 2020 18:55:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="R+9lsbbh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A87820707 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.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=8jU50ltISMfjyhTDyckheqQVEQLkN7yN0a+cbgtt/hA=; b=R+9lsbbh0H8mJU hz4O77R3mjPsC31kphkiWa0+kFBwHmqlsVzytFTA3qNzNQbsqR7MfHg4Un0Lqcr91N9saumJwSlVv Ik7EOgKlxUB8C7F9J+TErgySXpTXFXby8s5z71s0JAkx5Hn5wMXquVtiVkI4h845F2axpaCsn/YOc +0JTNyaBE9BC6kgNoFheBVj1XTcvrCe+cnEc4855CFG1xThdpipQHX23O09y2W500rtugNR0Gqp3/ H3iHzDjI6bqeNiJMsNhxMFCLRPO05xQB8L1OaYNayCIcR2FObK3/wuTEGIZToryhix9KB5QHw4x8p ++AfkMnG77sDhZrQDlnw==; 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 1ixbS5-0008Sf-CQ; Fri, 31 Jan 2020 18:55:37 +0000 Received: from mga04.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixbS2-0008SJ-Dr for linux-arm-kernel@lists.infradead.org; Fri, 31 Jan 2020 18:55:35 +0000 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2020 10:55:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,386,1574150400"; d="scan'208";a="253419672" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by fmsmga004.fm.intel.com with ESMTP; 31 Jan 2020 10:55:32 -0800 Date: Fri, 31 Jan 2020 10:55:32 -0800 From: Sean Christopherson To: Paolo Bonzini Subject: Re: [PATCH 5/5] KVM: x86: Set kvm_x86_ops only after ->hardware_setup() completes Message-ID: <20200131185531.GB18946@linux.intel.com> References: <20200130001023.24339-1-sean.j.christopherson@intel.com> <20200130001023.24339-6-sean.j.christopherson@intel.com> <44e0c550-7dcc-bfed-07c4-907e61d476a1@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <44e0c550-7dcc-bfed-07c4-907e61d476a1@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200131_105534_476999_C93A0CC9 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. 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: Wanpeng Li , Janosch Frank , kvm@vger.kernel.org, David Hildenbrand , Marc Zyngier , Joerg Roedel , Cornelia Huck , linux-mips@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Mackerras , Christian Borntraeger , James Morse , linux-arm-kernel@lists.infradead.org, Vitaly Kuznetsov , Suzuki K Poulose , kvmarm@lists.cs.columbia.edu, Julien Thierry , Jim Mattson 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 Thu, Jan 30, 2020 at 06:44:09AM +0100, Paolo Bonzini wrote: > On 30/01/20 01:10, Sean Christopherson wrote: > > Set kvm_x86_ops with the vendor's ops only after ->hardware_setup() > > completes to "prevent" using kvm_x86_ops before they are ready, i.e. to > > generate a null pointer fault instead of silently consuming unconfigured > > state. > > What about even copying kvm_x86_ops by value, so that they can be > accessed with "kvm_x86_ops.callback()" and save one memory access? Oooh, I like that idea. And {svm,vmx}_x86_ops could be marked __initdata to save a few bytes and force all the runtime stuff through kvm_x86_ops. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel