From nobody Wed Nov 27 14:42:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1698276632; cv=none; d=zohomail.com; s=zohoarc; b=NF1ajvuIT+iHbY05OuFWbrJBrywCBe+Dw1JQtfyFCLf6WwzzW2PY/sN20gaw8BNOVE04IHUM28jzP+MqwJ0aXRyKmJ7bZjNHC5+YEINO2mga3T0Rq8wMOQxi1xpTg6nyJC1nxDqcDSRfzPckIWxDE7X15yXMlpAsmY73JwMdOUo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698276632; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UY1wAEDNFydOtexdv37dGc4LgmSZcTd8TGDxaQVmZ0c=; b=VhM4HD218hOlEcytQnGAfpErcAfsRhKkBzBCuwl0cPdDsGfE+U4S1RGNroEYTsx9aZp8WiALg7PL77FAxZQB/WenczcBp+I45bqiNrojibVmo/8EmaxoVmLWRG/6yPQPr6Wq2NLpYzdnPoYyIGlM9gZ19345x7mexrXWzu6CRR4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1698276632874935.985631408084; Wed, 25 Oct 2023 16:30:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvnHw-0001Y8-C4; Wed, 25 Oct 2023 19:27:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvnHv-0001Xz-M1 for qemu-devel@nongnu.org; Wed, 25 Oct 2023 19:27:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvnHu-00052d-95 for qemu-devel@nongnu.org; Wed, 25 Oct 2023 19:27:47 -0400 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-159-dCzBCzcBNqapZJOUM4Ghrw-1; Wed, 25 Oct 2023 19:27:34 -0400 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-66d12cd3591so4453546d6.3 for ; Wed, 25 Oct 2023 16:27:34 -0700 (PDT) Received: from [172.19.0.201] ([192.80.84.35]) by smtp.gmail.com with ESMTPSA id c15-20020a0cd60f000000b00658266be23fsm4757135qvj.41.2023.10.25.16.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 16:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698276465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UY1wAEDNFydOtexdv37dGc4LgmSZcTd8TGDxaQVmZ0c=; b=UEI0CaTG9KtsN/atES14A1tPCOtzs+VzN5U89ZBe1NsNrKIQRKUvCd4rmbqDVpzyxk0idK pgqDOT4tqE6UmZe2td9xQ6l6Gly537PJagQbPKN2T/UDpipyDjz6+4WLXrSf1dFWfYkle6 AY4oD4iAxa5Yy+IQgq0mov5/VbisSrM= X-MC-Unique: dCzBCzcBNqapZJOUM4Ghrw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698276453; x=1698881253; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UY1wAEDNFydOtexdv37dGc4LgmSZcTd8TGDxaQVmZ0c=; b=W4fk9szCLBzqMidRzaMKs1fTibNGvTYBE/s0o7c6cN6g18OzZi5qdYP8zMbDGgUhMv g2NWbwuzfCwF0HGZRH2HdfCwuH9V/sXpA/Zw3i+RmTk/kg1Xxw/ImItNv7tHTHXWSBer ye7M1S1l99XIxNfNzTILY9FJVgfZuzNAjhdO2aPDGM/Eu1xJsZGEqrm4TZdPHFegx8Cb LGNdiLwHc5Ka248g1cgCMsYPWdn1pEgJvAWyVsqY6lDsg4MRqU5pJYDyrvnHRpM/yVf/ 2v/Rs/FIeTfGV+buPzkXNsRpmhldZgXnUfrW0Tr+wYOkHkHdWYYJivAOoc5wmXc9VbQJ Hynw== X-Gm-Message-State: AOJu0YzREVnlBPxBmW2scyybf4lU98rWgFE2f3B9dAWL3pK10FRr+IVE /xwuxb4Q8KHJjXT+HOG5suqrtdbs0nJKJa/DjnIAOVG0cyQDPtKYHyoxEH8XZZYo2+DWu0fhrMu czNJpLuozSwmc/qgu24g++C9iRCV3oOLTj0M2UdnLOVRg+zlK/0yoKpZkJ7nD1cypkIprQVu4Te M= X-Received: by 2002:a05:6214:c4b:b0:66d:66bd:e60a with SMTP id r11-20020a0562140c4b00b0066d66bde60amr14020578qvj.64.1698276452846; Wed, 25 Oct 2023 16:27:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHR/UY/yCIgMT9nKwzW0p/N3JR4nWvNX155Bqa/JOGwiWZesbg7WS41PGELxO1vS33zWlCrTg== X-Received: by 2002:a05:6214:c4b:b0:66d:66bd:e60a with SMTP id r11-20020a0562140c4b00b0066d66bde60amr14020558qvj.64.1698276452459; Wed, 25 Oct 2023 16:27:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Ani Sinha , "Michael S . Tsirkin" , David Hildenbrand Subject: [PULL 07/24] target/i386: check CPUID_PAE to determine 36 bit processor address space Date: Thu, 26 Oct 2023 01:27:00 +0200 Message-ID: <20231025232718.89428-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231025232718.89428-1-pbonzini@redhat.com> References: <20231025232718.89428-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698276633474100001 Content-Type: text/plain; charset="utf-8" From: Ani Sinha PAE mode in x86 supports 36 bit address space. Check the PAE CPUID on the guest processor and set phys_bits to 36 if PAE feature is set. This is in addition to checking the presence of PSE36 CPUID feature for setting 36 bit phys_bits. Signed-off-by: Ani Sinha Acked-by: Michael S. Tsirkin Reviewed-by: David Hildenbrand Message-ID: <20230912120650.371781-1-anisinha@redhat.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 070c02000fe..fc8484cb5e8 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7377,7 +7377,7 @@ static void x86_cpu_realizefn(DeviceState *dev, Error= **errp) return; } =20 - if (env->features[FEAT_1_EDX] & CPUID_PSE36) { + if (env->features[FEAT_1_EDX] & (CPUID_PSE36 | CPUID_PAE)) { cpu->phys_bits =3D 36; } else { cpu->phys_bits =3D 32; --=20 2.41.0