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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 1D87DC433F5 for ; Mon, 13 Sep 2021 12:00:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 C125B60F44 for ; Mon, 13 Sep 2021 12:00:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C125B60F44 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:58670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPkcz-00068K-9S for qemu-devel@archiver.kernel.org; Mon, 13 Sep 2021 08:00:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPkau-0002lu-IT for qemu-devel@nongnu.org; Mon, 13 Sep 2021 07:57:53 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:39563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPkar-0005lL-1t for qemu-devel@nongnu.org; Mon, 13 Sep 2021 07:57:52 -0400 Received: by mail-wr1-x436.google.com with SMTP id u15so8206957wru.6 for ; Mon, 13 Sep 2021 04:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/7nrEReoQoR7zRCQbazGzZCmxeeaU0xNt1erxfpNR44=; b=MLJywj489R6zX6kU0hKeVjBdhFwAfmFSmdwVIpIVSCmKJvN61hDPPWUCn1yPp9aW0Q c9FqnPGk7CGqNK4Ek668MjdAHTWUDxS+f3RMybdIDuxhVpFYUOqSR6EaoG5NJT2bgz8n Q687N6Cipp0D7GKSXqpekWG6bJpW+IrB62EOZfLnESfCpFHBzuk6W1ztW4HJjJa4a4nM aW6ajGTapSdXTea2XiusC3qQw2rNwxUa+Ho+mymiAuv0RkfFSKWGOKcbTvuRxjCfYviA GAXHLtROurGAoFgDpybFFcOFmQumUr2K+OInHRCRHVK31bSjCzgaU/PwqYzfhWefd8dG bEiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/7nrEReoQoR7zRCQbazGzZCmxeeaU0xNt1erxfpNR44=; b=5bsohNBM3O5osIDvS4C/vUy8IFQY6s3wj+tlgqdZLqMNuL/icqIMm1Y9o5z8CGah+T 3ejwFGcDchGFdADk4wKECVbSbqnACIR/aBGuLexFFtd0ZnxwD60hN9Z2px4j0ZSi/Sqd Q1a2kadFE9hqhxP5/RywvjCjIMaamxG4Ce2EhO8DU2mkMRE9LFt0bejX5/TMbv3Ei0RM EDE2fIxqlBbJ72C6ZCTHq1nQekW4+kTdZUyVsYvKLxNdpx8mmI+nYYeJH7u0RfuGcKRW a/bNePZpJGeAQlGWhqyuLLckNSGZ3ZrVaGRBRxFl/Z8rIvcyO9XVvdkLdnspqS2EK5BK +zpw== X-Gm-Message-State: AOAM532yn8aUgfCvYdbM5+FVgdAcsZsawEb9kiwUfkBa1PE6H/Cyitpy C3pASv3vUP2/g8NEINbFmCh3xce1Dvg= X-Google-Smtp-Source: ABdhPJxd6tGSyL8XGh61vt7niCCEaI/bb/Z2EsSvqg2E5W6WM0woEy5VjOL9nyQY7CmmfI45DdgBRw== X-Received: by 2002:a5d:504f:: with SMTP id h15mr12347812wrt.69.1631534267547; Mon, 13 Sep 2021 04:57:47 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n186sm6011037wme.31.2021.09.13.04.57.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 04:57:47 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 01/21] target/i386: add missing bits to CR4_RESERVED_MASK Date: Mon, 13 Sep 2021 13:57:22 +0200 Message-Id: <20210913115742.533197-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210913115742.533197-1-pbonzini@redhat.com> References: <20210913115742.533197-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , "Richard W . M . Jones" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Daniel P. Berrangé Booting Fedora kernels with -cpu max hangs very early in boot. Disabling the la57 CPUID bit fixes the problem. git bisect traced the regression to commit 213ff024a2f92020290296cb9dc29c2af3d4a221 (HEAD, refs/bisect/bad) Author: Lara Lazier Date: Wed Jul 21 17:26:50 2021 +0200 target/i386: Added consistency checks for CR4 All MBZ bits in CR4 must be zero. (APM2 15.5) Added reserved bitmask and added checks in both helper_vmrun and helper_write_crN. Signed-off-by: Lara Lazier Message-Id: <20210721152651.14683-2-laramglazier@gmail.com> Signed-off-by: Paolo Bonzini In this commit CR4_RESERVED_MASK is missing CR4_LA57_MASK and two others. Adding this lets Fedora kernels boot once again. Signed-off-by: Daniel P. Berrangé Tested-by: Richard W.M. Jones Message-Id: <20210831175033.175584-1-berrange@redhat.com> [Removed VMXE/SMXE, matching the commit message. - Paolo] Fixes: 213ff024a2 ("target/i386: Added consistency checks for CR4", 2021-07-22) Signed-off-by: Paolo Bonzini --- target/i386/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 6c50d3ab4f..21b33fbe2e 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -257,6 +257,7 @@ typedef enum X86Seg { | CR4_DE_MASK | CR4_PSE_MASK | CR4_PAE_MASK \ | CR4_MCE_MASK | CR4_PGE_MASK | CR4_PCE_MASK \ | CR4_OSFXSR_MASK | CR4_OSXMMEXCPT_MASK |CR4_UMIP_MASK \ + | CR4_LA57_MASK \ | CR4_FSGSBASE_MASK | CR4_PCIDE_MASK | CR4_OSXSAVE_MASK \ | CR4_SMEP_MASK | CR4_SMAP_MASK | CR4_PKE_MASK | CR4_PKS_MASK)) -- 2.31.1