Message ID | 20221130230934.1014142-8-seanjc@google.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 58023C4321E for <linux-riscv@archiver.kernel.org>; Wed, 30 Nov 2022 23:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID :References:Mime-Version:In-Reply-To:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XPjKxLEc+hd0KhBQo+DXpd6sxNTW1Qpe/9+o552Ftjs=; b=pUwJbBfCqWHm6Y OG6xkqjkXkIjcpz1MzuKuHfFY4Q4FmeWx+AW1U/008xkNOICa1Sx72BmRaL8aHAqnB+NiMHd2eIfH 4iLw4VpFHFNFQuWE+qGt7pGJuFjGH6epbfiXpV6qSYlB/M7eVwFycs8cH6/ZOIUDFUcNWQWfN5npC z+htn5OB/61/PAsN1QL0iSuvKNlSqsPUUDVcap9js7SPo4d6nsZ2gNjpMs0GWk0xZA7+8D80H5qSd IHKjOsnB6oz964Nyg1tSupJH6aFpdE6A7BNgIp1pOPlWkbiggsYPX9vcL5DpBc/KrteG7t26YIMTM byhqdBzl3BfzmupO6Bzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0WrU-003Nph-6G; Wed, 30 Nov 2022 23:51:32 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0WUd-003E7h-PV for linux-riscv@bombadil.infradead.org; Wed, 30 Nov 2022 23:27:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Cc:To:From:Subject: Message-ID:References:Mime-Version:In-Reply-To:Date:Reply-To:Sender: Content-Transfer-Encoding:Content-ID:Content-Description; bh=g1stMgF+unVz+1wniuTG4sBb8H6V2BLTtzNNraJ+L2g=; b=XaamwT3EGvV8Na6LMd5kTW1SkV Dgj43nw2SzxlCIlyDor3UxigVXzhqaoSFS/9h/kwwjbMEfS9ya+KbyZJXL3gSSGqel6vbIKD8jQaR ZjsO6MF/ZXaasr8s8G+TFOv/IJkWBiRFQOlzknTPdpGXqTXOZ9UrG8xOCnt8uWpPDxo6Vpxxw8c3C H6M/SXmv92pAt0swII6mCMYlOW5igVdWnfGFB8BuQBlIE+Zm6lrApOVTnZLi/QJH3VhNWwkmj4SQh +1RIKkAmr1waW+Urm06yCPkBw4O+bym5zsttDclphXfGwwM46nvEw72KSo4TSb1nc7yGNeagvQwuG yQBODRGA==; Received: from mail-pg1-x54a.google.com ([2607:f8b0:4864:20::54a]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0WDG-006B6m-50 for linux-riscv@lists.infradead.org; Wed, 30 Nov 2022 23:10:05 +0000 Received: by mail-pg1-x54a.google.com with SMTP id e37-20020a635025000000b00476bfca5d31so52171pgb.21 for <linux-riscv@lists.infradead.org>; Wed, 30 Nov 2022 15:09:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=g1stMgF+unVz+1wniuTG4sBb8H6V2BLTtzNNraJ+L2g=; b=Qu2Gj2AQMSdn5ynZ5uRxUGFqbeHyl2Ed5IXeJ2cS9b8RyxUmxP+UPpwD4AXe0Ud2wQ GLE5fpqUn5yzNfMmkf1QqZp6YlOWxyIHZvzY2PTHyliCph5U92Ri7VRil5QNW2hbhlro eqLV3fzPciK364AgPpAWure/pils1YFI032lNHB5vYzqLYNGO/HTaCFu4SnHfGbx0IJL YzVxc9OdZl6JuUto8jah8ZZUeY5Nlgmu8NeURLW2FfXGR4hkpIETaC3DDgh3Y+VWw9aT wnj+XTBDiyARsefNZ1R+h94oYnfXDMDFEaIxFxgvi52xPOyDG50iBdiNI6MjV0enlZkj ltag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=g1stMgF+unVz+1wniuTG4sBb8H6V2BLTtzNNraJ+L2g=; b=kb7y8hC4/Mt9bCvLWNeC6720RU9UHkz/1sxbwbqQss89nBsGtCqK6/FsCcLsj9i62N z1J51H9cbvGV/SMXsvkPQJvXu6QR78npDdse6h5VkJ8abemKq0aNKnJAoccE0f5MNrnY T3/j63GAdpoGfpmQNbfEYXyoWJvjBQ37Mpd1cu/LFX4vYLohuCuZc+oxGE9OHCzMRbmn nr9dkVNQvFg2Nzq2p5s8M82eCHoxBUyRHu6pcyaCjkiPTQjfncGNHsgd2Bgyqq6S7x9e ym9CcXosGfxNoM/0E3JC9xeaySlUrSQkpdG0vUdDgNeJBlLjigjxpT1RrUD/JRD9n8Nt JrqQ== X-Gm-Message-State: ANoB5pnaVUjEKAZsKrppQ4zvymylgNWHYHk2R4TMPwYg4MXLJd49uGov 7+0pSmlhuVJIia+bP05h/m1783zgnS4= X-Google-Smtp-Source: AA0mqf66P6cZGe+dew2XFgeia1skilH4V8u9knhT3C8CLrninF2nDNQmOIJQuI+E9fZev+1MNEWaGc+MIJs= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:9a47:b0:189:acf9:87af with SMTP id x7-20020a1709029a4700b00189acf987afmr3514511plv.160.1669849789646; Wed, 30 Nov 2022 15:09:49 -0800 (PST) Date: Wed, 30 Nov 2022 23:08:51 +0000 In-Reply-To: <20221130230934.1014142-1-seanjc@google.com> Mime-Version: 1.0 References: <20221130230934.1014142-1-seanjc@google.com> X-Mailer: git-send-email 2.38.1.584.g0f3c55d4c2-goog Message-ID: <20221130230934.1014142-8-seanjc@google.com> Subject: [PATCH v2 07/50] KVM: x86: Do timer initialization after XCR0 configuration From: Sean Christopherson <seanjc@google.com> To: Paolo Bonzini <pbonzini@redhat.com>, Marc Zyngier <maz@kernel.org>, Huacai Chen <chenhuacai@kernel.org>, Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>, Anup Patel <anup@brainfault.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Christian Borntraeger <borntraeger@linux.ibm.com>, Janosch Frank <frankja@linux.ibm.com>, Claudio Imbrenda <imbrenda@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Sean Christopherson <seanjc@google.com>, Vitaly Kuznetsov <vkuznets@redhat.com>, David Woodhouse <dwmw2@infradead.org>, Paul Durrant <paul@xen.org> Cc: James Morse <james.morse@arm.com>, Alexandru Elisei <alexandru.elisei@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Oliver Upton <oliver.upton@linux.dev>, Atish Patra <atishp@atishpatra.org>, David Hildenbrand <david@redhat.com>, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Yuan Yao <yuan.yao@intel.com>, Cornelia Huck <cohuck@redhat.com>, Isaku Yamahata <isaku.yamahata@intel.com>, " =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= " <philmd@linaro.org>, Fabiano Rosas <farosas@linux.ibm.com>, Michael Ellerman <mpe@ellerman.id.au>, Kai Huang <kai.huang@intel.com>, Chao Gao <chao.gao@intel.com>, Thomas Gleixner <tglx@linutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221130_230958_812911_963735B8 X-CRM114-Status: GOOD ( 11.69 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-riscv.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-riscv>, <mailto:linux-riscv-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-riscv/> List-Post: <mailto:linux-riscv@lists.infradead.org> List-Help: <mailto:linux-riscv-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-riscv>, <mailto:linux-riscv-request@lists.infradead.org?subject=subscribe> Reply-To: Sean Christopherson <seanjc@google.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" <linux-riscv-bounces@lists.infradead.org> Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org |
Series |
KVM: Rework kvm_init() and hardware enabling
|
expand
|
Context | Check | Description |
---|---|---|
conchuod/tree_selection | fail | Guessing tree name failed |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f18f579ebde8..a873618564cd 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -9326,13 +9326,13 @@ int kvm_arch_init(void *opaque) if (r) goto out_free_percpu; - kvm_timer_init(); - if (boot_cpu_has(X86_FEATURE_XSAVE)) { host_xcr0 = xgetbv(XCR_XFEATURE_ENABLED_MASK); kvm_caps.supported_xcr0 = host_xcr0 & KVM_SUPPORTED_XCR0; } + kvm_timer_init(); + if (pi_inject_timer == -1) pi_inject_timer = housekeeping_enabled(HK_TYPE_TIMER); #ifdef CONFIG_X86_64
Move kvm_arch_init()'s call to kvm_timer_init() down a few lines below the XCR0 configuration code. A future patch will move hardware setup into kvm_arch_init() and slot in vendor hardware setup before the call to kvm_timer_init() so that timer initialization (among other stuff) doesn't need to be unwound if vendor setup fails. XCR0 setup on the other hand needs to happen before vendor hardware setup. Signed-off-by: Sean Christopherson <seanjc@google.com> --- arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)