From nobody Mon May 20 00:22:04 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=1682429996; cv=none; d=zohomail.com; s=zohoarc; b=Xbt7MfGc30h52aX+umqzziYFPFkfHf5ngjIn24o1Nf8ZY8TvNELx8qkW/Slo4WHarK+AfW3Hn6lzcZOYO9WTpUq7LDMz12MdzPDD62fHJrs5FJvwb7sR9a/YyZtfuTOWH1jtGpUXDAjQvD8zQzTPf5vGXlY4QrayThdNrWafKYg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682429996; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3+ZM3KQoncTdei9rootHBy/08sRrht5xW3bbZSEsOQM=; b=hRyYUmICKQdK0zN2sr69c5dGmm6HEbygcXxSc0b/SFoKN20MmMCntk3kcARH3+4ZfCpLos5eMjjMqZZM8PDTOVpYydMhKSf+BBeX+jLlQ4r29PPgAPyb0oP0IUZaJpdItq7jnTIcGZ5n1cNzfXl1c2vtWLjqd0Dq0DeHVDnqi9k= 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 1682429996214851.8803428275922; Tue, 25 Apr 2023 06:39:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prItB-00039x-RY; Tue, 25 Apr 2023 09:39:25 -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 1prIsq-00033f-R2 for qemu-devel@nongnu.org; Tue, 25 Apr 2023 09:39:05 -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 1prIsp-0003Ir-0n for qemu-devel@nongnu.org; Tue, 25 Apr 2023 09:39:04 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-61-TwtY83DzO0qLmKc1QSoGRQ-1; Tue, 25 Apr 2023 09:38:59 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A216F8EE588; Tue, 25 Apr 2023 13:38:57 +0000 (UTC) Received: from thuth.com (dhcp-192-205.str.redhat.com [10.33.192.205]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7677D1121314; Tue, 25 Apr 2023 13:38:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682429941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3+ZM3KQoncTdei9rootHBy/08sRrht5xW3bbZSEsOQM=; b=aRwhOYKiwT0L/vpNoACDW09yNAoiGYMqR9xxrKe8TnMZZAuxACI4EaHoFeJR8BQJ1aevCW w2kC0+vABs9tU6uxu5AF0mhQW1JuCQa9Ow0RK3Rv6rpYGZetmE3XLhEkBu67cF8mFbIs8b iI7UAzr5bhDOxcmkIQsXjK9JBSgRn/c= X-MC-Unique: TwtY83DzO0qLmKc1QSoGRQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, Paolo Bonzini , Eduardo Habkost Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Yanan Wang , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [RFC PATCH 1/3] cpu: Add a way to detect 32-bit mode from argv0 Date: Tue, 25 Apr 2023 15:38:49 +0200 Message-Id: <20230425133851.489283-2-thuth@redhat.com> In-Reply-To: <20230425133851.489283-1-thuth@redhat.com> References: <20230425133851.489283-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.171, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: 1682429998300100005 Content-Type: text/plain; charset="utf-8" In the future, we might want to avoid compiling certain targets separately for 32-bit mode (i.e. -i386, -arm and -ppc) where the 64-bit variant is a superset of the 32-bit variant. But it would be good to provide a way to mimic the 32-bit behavior via the program name in case the users need this compatibility for some scenarios. Thus add a function that checks for the old 32-bit program names and sets a flag accordingly. Signed-off-by: Thomas Huth --- include/hw/core/cpu.h | 10 ++++++++++ cpu.c | 13 +++++++++++++ softmmu/vl.c | 1 + 3 files changed, 24 insertions(+) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 397fd3ac68..8fc15b7797 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -470,6 +470,15 @@ extern __thread CPUState *current_cpu; extern bool mttcg_enabled; #define qemu_tcg_mttcg_enabled() (mttcg_enabled) =20 +/** + * qemu_target_only_32bits: + * Check whether the target is 32 bits only (like i386 in contrast to x86_= 64). + * + * Returns: %true if we are running with a 32-bit only target + */ +extern bool target_only_32bits; +#define qemu_target_only_32bits() (target_only_32bits) + /** * cpu_paging_enabled: * @cpu: The CPU whose state is to be inspected. @@ -1009,6 +1018,7 @@ void cpu_exec_unrealizefn(CPUState *cpu); */ bool target_words_bigendian(void); =20 +void cpu_init_target_only_32bits(const char *argv0); void page_size_init(void); =20 #ifdef NEED_CPU_H diff --git a/cpu.c b/cpu.c index 9105c85404..0b498f3a53 100644 --- a/cpu.c +++ b/cpu.c @@ -47,6 +47,8 @@ uintptr_t qemu_host_page_size; intptr_t qemu_host_page_mask; =20 +bool target_only_32bits =3D (TARGET_LONG_BITS =3D=3D 32); + #ifndef CONFIG_USER_ONLY static int cpu_common_post_load(void *opaque, int version_id) { @@ -427,6 +429,17 @@ bool target_words_bigendian(void) #endif } =20 +/* + * This is used for 64-bit targets that can also run in restricted 32-bit + * mode, e.g. if running as qemu-system-i386 instead of qemu-system-x86_64 + */ +void cpu_init_target_only_32bits(const char *argv0) +{ + target_only_32bits |=3D g_str_has_suffix(argv0, "-i386") || + g_str_has_suffix(argv0, "-arm") || + g_str_has_suffix(argv0, "-ppc"); +} + void page_size_init(void) { /* NOTE: we can always suppose that qemu_host_page_size >=3D diff --git a/softmmu/vl.c b/softmmu/vl.c index fb6c221e8e..51b35a6f0b 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2677,6 +2677,7 @@ void qemu_init(int argc, char **argv) =20 error_init(argv[0]); qemu_init_exec_dir(argv[0]); + cpu_init_target_only_32bits(argv[0]); =20 qemu_init_arch_modules(); =20 --=20 2.31.1 From nobody Mon May 20 00:22:04 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=1682430015; cv=none; d=zohomail.com; s=zohoarc; b=d7OP0QIz5mbxR0mzJCYP0+KOtLDuZxxBhZLWtyKNcrkS9Mck6CBBAVuDVwbBJmEP/4gwqCcheoBmaLCNOYallT3+svq6BfX/3FHWdw1qUF2kHm7Xr5crbYrfLSROz91tit2Ox4GARaf+nN3/JN3AgdrJvSH+IDF37lVk7/vLdjA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682430015; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tPPS70WFjcy2JwT8P5XtO5CMpg/f2RRQN7faqVv2JXE=; b=IMtoZJt8AIJdLFqK/l45j4s5MjENLoGjDkQ2UHR5VW/AjExaVFjIq2KCKGJRRQU1VbF3YsHDKCpyxQO3DJBpuz7PjyXtb0E0khuiNeYW1NbuPcWnzejgy0gm6U29Q59i1PWA7UHraJS06GNsTL8ufgGOTzFUgpE/gdRHnHf5ZMY= 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 1682430015628402.6746118193481; Tue, 25 Apr 2023 06:40:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prItC-0003AO-6G; Tue, 25 Apr 2023 09:39:26 -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 1prIss-00035G-46 for qemu-devel@nongnu.org; Tue, 25 Apr 2023 09:39:06 -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 1prIsp-0003Iz-0n for qemu-devel@nongnu.org; Tue, 25 Apr 2023 09:39:05 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-197-UjoxOrgEPd-3QDCBvpwcIQ-1; Tue, 25 Apr 2023 09:38:59 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 14BB63822DE3; Tue, 25 Apr 2023 13:38:59 +0000 (UTC) Received: from thuth.com (dhcp-192-205.str.redhat.com [10.33.192.205]) by smtp.corp.redhat.com (Postfix) with ESMTP id DCC731121318; Tue, 25 Apr 2023 13:38:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682429941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tPPS70WFjcy2JwT8P5XtO5CMpg/f2RRQN7faqVv2JXE=; b=R3w6Rf76dseFKQFtFdfobgRt6i06ei9ykPqi98ID5oTRzLDMADGZccoJEOncWiDPVr5X5A SOAuvbl4u/JgufokgQETwyLoPDTtly7kWNLyTQC9dgmpMd0Uq7oVqA2acM+vL0r91OSRda auRryI86jMqh44LTOzST9DJSpbnDRoo= X-MC-Unique: UjoxOrgEPd-3QDCBvpwcIQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, Paolo Bonzini , Eduardo Habkost Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Yanan Wang , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [RFC PATCH 2/3] target/i386/cpu: Allow to limit the 64-bit binary to 32-bit mode only Date: Tue, 25 Apr 2023 15:38:50 +0200 Message-Id: <20230425133851.489283-3-thuth@redhat.com> In-Reply-To: <20230425133851.489283-1-thuth@redhat.com> References: <20230425133851.489283-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.171, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: 1682430016310100001 Content-Type: text/plain; charset="utf-8" qemu-system-x86_64 is pretty much a proper superset of qemu-system-i386, so in the long run, it does not make too much sense that we continuously build two binaries here. However, some people still might want to start QEMU in a mode that limits the environment to 32-bit. Thus allow qemu-system-x86_64 to run in 32-bit mode if the binary name ends in "-i386". Signed-off-by: Thomas Huth --- target/i386/cpu.h | 4 ++-- target/i386/cpu.c | 28 +++++++++++++--------------- target/i386/gdbstub.c | 8 +------- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index d243e290d3..5cb2eb3493 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -40,8 +40,8 @@ #define TARGET_HAS_PRECISE_SMC =20 #ifdef TARGET_X86_64 -#define I386_ELF_MACHINE EM_X86_64 -#define ELF_MACHINE_UNAME "x86_64" +#define I386_ELF_MACHINE (qemu_target_only_32bits() ? EM_386 : EM_X86_64) +#define ELF_MACHINE_UNAME (qemu_target_only_32bits() ? "i686" : "x86_64") #else #define I386_ELF_MACHINE EM_386 #define ELF_MACHINE_UNAME "i686" diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 2e30e348a1..f713005476 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -5093,11 +5093,9 @@ uint64_t x86_cpu_get_supported_feature_word(FeatureW= ord w, } else { return ~0; } -#ifndef TARGET_X86_64 - if (w =3D=3D FEAT_8000_0001_EDX) { + if (qemu_target_only_32bits() && w =3D=3D FEAT_8000_0001_EDX) { r &=3D ~CPUID_EXT2_LM; } -#endif if (migratable_only) { r &=3D x86_cpu_get_migratable_flags(w); } @@ -5267,11 +5265,11 @@ static void x86_cpu_load_model(X86CPU *cpu, X86CPUM= odel *model) =20 static gchar *x86_gdb_arch_name(CPUState *cs) { -#ifdef TARGET_X86_64 - return g_strdup("i386:x86-64"); -#else - return g_strdup("i386"); -#endif + if (qemu_target_only_32bits()) { + return g_strdup("i386"); + } else { + return g_strdup("i386:x86-64"); + } } =20 static void x86_cpu_cpudef_class_init(ObjectClass *oc, void *data) @@ -7295,13 +7293,13 @@ static void x86_cpu_common_class_init(ObjectClass *= oc, void *data) #endif /* !CONFIG_USER_ONLY */ =20 cc->gdb_arch_name =3D x86_gdb_arch_name; -#ifdef TARGET_X86_64 - cc->gdb_core_xml_file =3D "i386-64bit.xml"; - cc->gdb_num_core_regs =3D 66; -#else - cc->gdb_core_xml_file =3D "i386-32bit.xml"; - cc->gdb_num_core_regs =3D 50; -#endif + if (qemu_target_only_32bits()) { + cc->gdb_core_xml_file =3D "i386-32bit.xml"; + cc->gdb_num_core_regs =3D 50; + } else { + cc->gdb_core_xml_file =3D "i386-64bit.xml"; + cc->gdb_num_core_regs =3D 66; + } cc->disas_set_info =3D x86_disas_set_info; =20 dc->user_creatable =3D true; diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c index ebb000df6a..35a56b317c 100644 --- a/target/i386/gdbstub.c +++ b/target/i386/gdbstub.c @@ -72,15 +72,9 @@ static const int gpr_map32[8] =3D { 0, 1, 2, 3, 4, 5, 6,= 7 }; #define IDX_CTL_CR8_REG (IDX_CTL_REGS + 4) #define IDX_CTL_EFER_REG (IDX_CTL_REGS + 5) =20 -#ifdef TARGET_X86_64 -#define GDB_FORCE_64 1 -#else -#define GDB_FORCE_64 0 -#endif - static int gdb_read_reg_cs64(uint32_t hflags, GByteArray *buf, target_ulon= g val) { - if ((hflags & HF_CS64_MASK) || GDB_FORCE_64) { + if ((hflags & HF_CS64_MASK) || !qemu_target_only_32bits()) { return gdb_get_reg64(buf, val); } return gdb_get_reg32(buf, val); --=20 2.31.1 From nobody Mon May 20 00:22:04 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=1682430007; cv=none; d=zohomail.com; s=zohoarc; b=WA/lj+3nmgsnqbwD2l2tlq7oUEqEjtp1LiUKnHwAD47TnV2uKKAXeYKJ6PaHRoPcxk15MWrzRpUCFEvWewhf0/AtbO3Pm9jLaRqtQFgSHJNqVVHWLOJiUbXOpT+bTLd2mRUS4jgcAFqGlwtRu0nfU6flkYVDuO7MxM4eeuhIneY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682430007; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gpMZCL+ZRNMIhkrQnoWgZUYc+TvsezBIyUL4VHR6XQE=; b=NNQ1EkFwK0U9xSQ0PiL3M0K+qFLGppxJ3KFJ1KqFC7Vjg7flpWfDSwlU9I4vqr+h7I/e5/MeQXs+N3RR5dieNb/zFhiNN7AdWIp2iP7b1prQZUcIJGfrWv8JOZH1SLIPX++8wZ63c1TtN9DnUdM69RMA3Ftdggamh+6Jrd3eV0w= 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 1682430007064175.2355171145639; Tue, 25 Apr 2023 06:40:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prItA-00038e-9q; Tue, 25 Apr 2023 09:39:24 -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 1prIss-00035I-JM for qemu-devel@nongnu.org; Tue, 25 Apr 2023 09:39:06 -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 1prIsq-0003KR-Id for qemu-devel@nongnu.org; Tue, 25 Apr 2023 09:39:06 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-349-k428LqqBMKqLCdORPKuOuw-1; Tue, 25 Apr 2023 09:39:01 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7A224280D59B; Tue, 25 Apr 2023 13:39:00 +0000 (UTC) Received: from thuth.com (dhcp-192-205.str.redhat.com [10.33.192.205]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F8ED1121314; Tue, 25 Apr 2023 13:38:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682429943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gpMZCL+ZRNMIhkrQnoWgZUYc+TvsezBIyUL4VHR6XQE=; b=NjUWvjr4zfAV+i+RNZDRsazP42dOS07bnxIQ8x+Ey6U+7T/xIxUV+5AYGpM/cZXFHJFLST 3Gupo+CbsoGc26Aogd7h1Dmk9fdwJYO7ffKZELAdxpnpzWVu6515eGtsc8cSnDnYGOVOnH LqIdC2mjgUh/n6O4rZ4P8hqiEvo2owA= X-MC-Unique: k428LqqBMKqLCdORPKuOuw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Paolo Bonzini , Eduardo Habkost Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Yanan Wang , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [RFC PATCH 3/3] docs/about/deprecated: Deprecate the qemu-system-i386 binary Date: Tue, 25 Apr 2023 15:38:51 +0200 Message-Id: <20230425133851.489283-4-thuth@redhat.com> In-Reply-To: <20230425133851.489283-1-thuth@redhat.com> References: <20230425133851.489283-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.171, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: 1682430008262100001 Content-Type: text/plain; charset="utf-8" Aside from not supporting KVM on 32-bit hosts, the qemu-system-x86_64 binary is a proper superset of the qemu-system-i386 binary. And with the 32-bit x86 host support being deprecated now, it is possible to deprecate the qemu-system-i386 binary now, too. With regards to 32-bit KVM support in the x86 Linux kernel, the developers confirmed that they do not need a recent qemu-system-i386 binary here: https://lore.kernel.org/kvm/Y%2ffkTs5ajFy0hP1U@google.com/ Signed-off-by: Thomas Huth Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Wilfred Mallawa --- docs/about/deprecated.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 1ca9dc33d6..c205816c7d 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -34,6 +34,22 @@ deprecating the build option and no longer defend it in = CI. The ``--enable-gcov`` build option remains for analysis test case coverage. =20 +``qemu-system-i386`` binary (since 8.1) +''''''''''''''''''''''''''''''''''''''' + +The ``qemu-system-i386`` binary was mainly useful for running with KVM +on 32-bit x86 hosts, but most Linux distributions already removed their +support for 32-bit x86 kernels, so hardly anybody still needs this. The +``qemu-system-x86_64`` binary is a proper superset and can be used to +run 32-bit guests by selecting a 32-bit CPU model, including KVM support +on x86_64 hosts. Thus users are recommended to reconfigure their systems +to use the ``qemu-system-x86_64`` binary instead. If a 32-bit CPU guest +environment should be enforced, you can switch off the "long mode" CPU +flag with ``-cpu max,lm=3Doff``, or rename/symlink ``qemu-system-x86_64`` +to ``qemu-system-i386`` -- QEMU will then run with the 64-bit extensions +disabled. + + System emulator command line arguments -------------------------------------- =20 --=20 2.31.1