From nobody Tue Nov 26 08:24:18 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=1708716893; cv=none; d=zohomail.com; s=zohoarc; b=I2U5pNEAc88e9YcN9vzwLaoWB5DHEw8y/4xtg8NYEirpIVVD7hi43hIV5M8AukalWZ2faS2mpOBNSEii7BQ4HmF3UNsT0QqTMht5RiQBYJBJwP/4phRaBz+Q90gK2TNLLNySIf5F9TXHFqjdRgZeV9ZMXdHNQjUA/RV6aFqBv0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708716893; h=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=o3bEtATyp9tRxwVqQamHVsA7dwSgZbW9H9fEsU3qThM=; b=eqjX3gef99Ctj4fFYP35UtB8DLl/efsEyauel39qOBQ571OLWhttCzpsmU9839hcy5isdOODC5pfR0XX0dSI2+CbNf0iqlslsBNMaPP6j62PNDRdp620mQR7QldXz6RwXTIpCBZaZa3ZzGAKOI6vdozozY0qPWqUN7hw47Knk68= 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 1708716893184349.1394402880113; Fri, 23 Feb 2024 11:34:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdbJi-000174-L9; Fri, 23 Feb 2024 14:34:42 -0500 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 1rdawB-0005m6-4U for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdaw0-0005At-Ow for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:22 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-528-Y48CuBOZO0OWDsmoXEx3ZQ-1; Fri, 23 Feb 2024 14:10:07 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D77EE85A589; Fri, 23 Feb 2024 19:10:06 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id B6DBB10800; Fri, 23 Feb 2024 19:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708715410; 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=o3bEtATyp9tRxwVqQamHVsA7dwSgZbW9H9fEsU3qThM=; b=ANThoY3R3b0hfY55teEbMr2+wOeiBymfXwq64fzb3pbQRR0L23Z3lW9vDRSSaNqJwYpq2b uu1ISEt+Vb6kQyoStMkT9pjsd9pmtle3aAMxlvVKnt4ApquvQcCVNucDVc0tdH3m42+q/0 nD7UbpVfjVQBRA/MfDNqgCNFRFLJZDQ= X-MC-Unique: Y48CuBOZO0OWDsmoXEx3ZQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , Daniel Palmer Subject: [PULL 01/11] target/m68k: Fix exception frame format for 68010 Date: Fri, 23 Feb 2024 20:09:53 +0100 Message-ID: <20240223191003.6268-2-thuth@redhat.com> In-Reply-To: <20240223191003.6268-1-thuth@redhat.com> References: <20240223191003.6268-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, 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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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: 1708716895344100003 Content-Type: text/plain; charset="utf-8" From: Daniel Palmer From the 68010 a word with the frame format and exception vector are placed on the stack before the PC and SR. M68K_FEATURE_QUAD_MULDIV is currently checked to workout if to do this or not for the configured CPU but that flag isn't set for 68010 so currently the exception stack when 68010 is configured is incorrect. It seems like checking M68K_FEATURE_MOVEFROMSR_PRIV would do but adding a new flag that shows exactly what is going on here is maybe clearer. Add a new flag for the behaviour, M68K_FEATURE_EXCEPTION_FORMAT_VEC, and set it for 68010 and above, and then use it to control if the format and vector word are pushed/pop during exception entry/exit. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2164 Signed-off-by: Daniel Palmer Message-ID: <20240115101643.2165387-1-daniel@0x0f.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- target/m68k/cpu.h | 2 ++ target/m68k/cpu.c | 4 +++- target/m68k/op_helper.c | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 646cacbdf1..346427e144 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -550,6 +550,8 @@ enum m68k_features { M68K_FEATURE_TRAPCC, /* MOVE from SR privileged (from 68010) */ M68K_FEATURE_MOVEFROMSR_PRIV, + /* Exception frame with format+vector (from 68010) */ + M68K_FEATURE_EXCEPTION_FORMAT_VEC, }; =20 static inline bool m68k_feature(CPUM68KState *env, int feature) diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 8a8392e694..d5a71c6315 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -142,7 +142,8 @@ static void m68000_cpu_initfn(Object *obj) } =20 /* - * Adds BKPT, MOVE-from-SR *now priv instr, and MOVEC, MOVES, RTD + * Adds BKPT, MOVE-from-SR *now priv instr, and MOVEC, MOVES, RTD, + * format+vector in exception frame. */ static void m68010_cpu_initfn(Object *obj) { @@ -155,6 +156,7 @@ static void m68010_cpu_initfn(Object *obj) m68k_set_feature(env, M68K_FEATURE_BKPT); m68k_set_feature(env, M68K_FEATURE_MOVEC); m68k_set_feature(env, M68K_FEATURE_MOVEFROMSR_PRIV); + m68k_set_feature(env, M68K_FEATURE_EXCEPTION_FORMAT_VEC); } =20 /* diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index 47b4173bb9..956e76eb5f 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -52,7 +52,7 @@ throwaway: sp +=3D 2; env->pc =3D cpu_ldl_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); sp +=3D 4; - if (m68k_feature(env, M68K_FEATURE_QUAD_MULDIV)) { + if (m68k_feature(env, M68K_FEATURE_EXCEPTION_FORMAT_VEC)) { /* all except 68000 */ fmt =3D cpu_lduw_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); sp +=3D 2; @@ -256,7 +256,7 @@ static inline void do_stack_frame(CPUM68KState *env, ui= nt32_t *sp, uint16_t format, uint16_t sr, uint32_t addr, uint32_t retaddr) { - if (m68k_feature(env, M68K_FEATURE_QUAD_MULDIV)) { + if (m68k_feature(env, M68K_FEATURE_EXCEPTION_FORMAT_VEC)) { /* all except 68000 */ CPUState *cs =3D env_cpu(env); switch (format) { --=20 2.43.2 From nobody Tue Nov 26 08:24:18 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=1708716698; cv=none; d=zohomail.com; s=zohoarc; b=Is+C56YZVHjSwOVr+OsiETlWtIt8SIcjEd6daQ9V2rwE5sWs6PWyVSmWO0bNqMljm8Gaok8K7fJdldGzZW9KeEMsejKIlbCLxaBQx5iIive9cQna0eAfTR5RVFsrxjoY5lWIqEqI0ZoyO4+VniwPXlPTXTZYFR1tfOWYNAff5OM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708716698; h=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=hM/lKf8JPHxpGSr0QY2uGdTqxRYMo4aIX91DJySYzoc=; b=PpeAu7uyvdQ27lHSmj+/QQU0LvDYIod1yL8TVgRI56fQ5IAMNsB2H8vrSpovhWBbIwwrkFV9LCtU95ehaLah684eoQrzHgTQLpkgKcHBkG1MsxJB39YB7BP3bpgOJq1AqYjfAotXc5/gwL0l2D3oF0CDtDerxOajBF6CppC5h0Y= 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 170871669815459.46222220204106; Fri, 23 Feb 2024 11:31:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdbG4-0007GN-WB; Fri, 23 Feb 2024 14:30:57 -0500 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 1rdawB-0005m5-2g for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdaw0-0005Am-Ma for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:22 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-424-6vZfZHPFOey56eDjnTNEwQ-1; Fri, 23 Feb 2024 14:10:08 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2825938562C9; Fri, 23 Feb 2024 19:10:08 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2877110800; Fri, 23 Feb 2024 19:10:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708715410; 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=hM/lKf8JPHxpGSr0QY2uGdTqxRYMo4aIX91DJySYzoc=; b=KTq/v7UNNf8yyl7qcofA+ie23PKPahJKOg9octW7JnS0XZ30yXHRqDG9hMURPpxpMR6Zmj QmTI4/w0qBJnOhvr55cbUKJnsXtfSCITuhIRzYLFmpWZq3vvrwBH0YykBk3NplAbMW1qUt bmGLMqOQTUY+VxggoZ+KlRLpnLS3uqg= X-MC-Unique: 6vZfZHPFOey56eDjnTNEwQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , Bibo Mao Subject: [PULL 02/11] tests/cdrom-test: Add cdrom test for LoongArch virt machine Date: Fri, 23 Feb 2024 20:09:54 +0100 Message-ID: <20240223191003.6268-3-thuth@redhat.com> In-Reply-To: <20240223191003.6268-1-thuth@redhat.com> References: <20240223191003.6268-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, 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_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=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: 1708716699106100003 Content-Type: text/plain; charset="utf-8" From: Bibo Mao The cdrom test skips to execute on LoongArch system with command "make check", this patch enables cdrom test for LoongArch virt machine platform. With this patch, cdrom test passes to run on LoongArch virt machine type. Signed-off-by: Bibo Mao Message-ID: <20240217100230.134042-1-maobibo@loongson.cn> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/qtest/cdrom-test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c index 0945383789..5d89e62515 100644 --- a/tests/qtest/cdrom-test.c +++ b/tests/qtest/cdrom-test.c @@ -271,6 +271,11 @@ int main(int argc, char **argv) const char *virtmachine[] =3D { "virt", NULL }; add_cdrom_param_tests(virtmachine); } + } else if (g_str_equal(arch, "loongarch64")) { + if (qtest_has_device("virtio-blk-pci")) { + const char *virtmachine[] =3D { "virt", NULL }; + add_cdrom_param_tests(virtmachine); + } } else { const char *nonemachine[] =3D { "none", NULL }; add_cdrom_param_tests(nonemachine); --=20 2.43.2 From nobody Tue Nov 26 08:24:18 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=1708716698; cv=none; d=zohomail.com; s=zohoarc; b=KkrJFlLrWs+FJgskJOHkvAT+wbt7hsN5xg2W2XrxoLJe7pa0SGS6YH3nVp9eHVj7rEZpA5GvSYXRuoDz2kdKCGuZoz2AkCvP8WGYd5rrURvks+WPx2eMhGiRPVjJ5eBgz5UoNwEyrWNB9YG+yXQbrBBjhr+EO7mYSXvbh0is+HE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708716698; h=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=IezDwMYo04OSAJvi1EoNt37k9i5h7cpqiwzb+gmay2k=; b=CFZ/kp5TvDL9zj4cy71GUnhQ3eYZq12kU2cATbhKPAcAegCn7fciaIuGRweYK6iVFAkRvicGTIL69Yfl6APbhiZgFjpMZ2SR2jQeLIY4vqDv4VW+6zQINZzxUIFakSvsKtq9WoL1kjzOqxkVon6WfdxtwhYzLoUBgs9GIIlItcs= 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 1708716698188653.013494963379; Fri, 23 Feb 2024 11:31:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdbG5-0007GL-9K; Fri, 23 Feb 2024 14:30:57 -0500 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 1rdawK-0005oD-94 for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdaw2-0005BN-Ob for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:31 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-190-pirtAEIUN0-Ir5b2GzzLtQ-1; Fri, 23 Feb 2024 14:10:09 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 44E9B38562CE; Fri, 23 Feb 2024 19:10:09 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6D57210800; Fri, 23 Feb 2024 19:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708715413; 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=IezDwMYo04OSAJvi1EoNt37k9i5h7cpqiwzb+gmay2k=; b=C2+JXB1AAeDK/zK1VHa0XjWV+Abd4GQmCo2DlxizL3vrIMOCxT8tPTTK45vf66hIcxK+9n UJGROcsmIgZXH7caSg76qHpmt+NKdurVkR4sHai5pLGVj8BZr1hYg8KY9w4mX8u2dAzwan jLBtNOeizfrc5JcE+fJnm3C277Pglo0= X-MC-Unique: pirtAEIUN0-Ir5b2GzzLtQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 03/11] tests/qtest: Fix boot-serial-test when using --without-default-devices Date: Fri, 23 Feb 2024 20:09:55 +0100 Message-ID: <20240223191003.6268-4-thuth@redhat.com> In-Reply-To: <20240223191003.6268-1-thuth@redhat.com> References: <20240223191003.6268-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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: 1708716698829100001 Content-Type: text/plain; charset="utf-8" If "configure" has been run with "--without-default-devices", there is no e1000 device in the binaries, so the boot-serial-test currently fails in that case since it tries to use the e1000 with the sam460ex machine. Since we're testing the serial output here, and not the NIC, let's simply switch to the "pci-bridge" device here instead, which should always be there for PCI-based machines like the sam460ex. Message-ID: <20240219111030.384158-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/boot-serial-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index 6dd06aeaf4..e3b7d65fe5 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -156,7 +156,7 @@ static const testdef_t tests[] =3D { "Open Firmware" }, { "ppc64", "powernv8", "", "OPAL" }, { "ppc64", "powernv9", "", "OPAL" }, - { "ppc64", "sam460ex", "-device e1000", "8086 100e" }, + { "ppc64", "sam460ex", "-device pci-bridge,chassis_nr=3D2", "1b36 000= 1" }, { "i386", "isapc", "-cpu qemu32 -M graphics=3Doff", "SeaBIOS" }, { "i386", "pc", "-M graphics=3Doff", "SeaBIOS" }, { "i386", "q35", "-M graphics=3Doff", "SeaBIOS" }, --=20 2.43.2 From nobody Tue Nov 26 08:24:18 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=1708716809; cv=none; d=zohomail.com; s=zohoarc; b=UUti4V8qy1pmMuaLmLLRoaZBJGHftiLoFjBYafIydG57fVXZLdBto7m6b0GLNQipEsAwkR6phiffoaX1abzRxwr8Tgsn1ECaPIKQfKDnYvgMNIanFN6l/V2P25ycWCMF4JHU80gilgyIXopMVbhnWGu1GoWa2VcJgzYOqjnNRGY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708716809; 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=BbapVeWMgszox2EGK6ZOE8IV1r7Xf9US24FSdNFPj68=; b=QslAyZX3hojbY3XEGC6fiMIxIl6U5CYXI3thuOHoBAj24p2nu77n1G+d6wndDMk7O5q9yEN6LYwhtMhx2+Ac9O7o4wXr5NmWMPyxycwXlgt+c4ygsBjHzdnORF0PkwLucBleWZUzm4c0KPGrhdpT8W3i1cJ1g92AVaW2IGDDKsI= 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 1708716809709475.5363865963503; Fri, 23 Feb 2024 11:33:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdbHD-0008Cq-FR; Fri, 23 Feb 2024 14:32:12 -0500 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 1rdawL-0005ox-8N for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:36 -0500 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 1rdaw3-0005BV-Cq for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:32 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-423-XQpq2JpjMauUcTjCSE2n8g-1; Fri, 23 Feb 2024 14:10:11 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4952C38562D1; Fri, 23 Feb 2024 19:10:11 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id B18268CED; Fri, 23 Feb 2024 19:10:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708715414; 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=BbapVeWMgszox2EGK6ZOE8IV1r7Xf9US24FSdNFPj68=; b=Mp2QKafTPKg1huzYx4Czc32Tr655IjUZNYnuEunbO5U3vMBDDhJTEII2de7MbgCun6rhXN EshOh5Oy7zFH3D1ano5xpaf45yBLtzsRd0r+RX2ojT/rWm97S+iVNsiLxhCVz1GT/NxeR8 KIp5e/D2dI+DR/9KAcWA/uRx+6n7iqM= X-MC-Unique: XQpq2JpjMauUcTjCSE2n8g-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PULL 04/11] tests: skip dbus-display tests that need a console Date: Fri, 23 Feb 2024 20:09:56 +0100 Message-ID: <20240223191003.6268-5-thuth@redhat.com> In-Reply-To: <20240223191003.6268-1-thuth@redhat.com> References: <20240223191003.6268-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=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: 1708716811169100003 From: Marc-Andr=C3=A9 Lureau When compiling with "configure --without-default-devices", the dbus-display-test fails since it implicitly assumes that the machine comes with a default console. There doesn't seem to be an easy way to figure this during build time, so skip the tests requiring the Console interface at runtime. Reported-by: Thomas Huth Signed-off-by: Marc-Andr=C3=A9 Lureau Message-ID: <20240221073759.171443-1-marcandre.lureau@redhat.com> Tested-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/qtest/dbus-display-test.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/qtest/dbus-display-test.c b/tests/qtest/dbus-display-tes= t.c index 21edaa1e32..0390bdcb41 100644 --- a/tests/qtest/dbus-display-test.c +++ b/tests/qtest/dbus-display-test.c @@ -135,6 +135,13 @@ test_dbus_console_registered(GObject *source_object, NULL, #endif res, &err); + + if (g_error_matches(err, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD)) { + g_test_skip("The VM doesn't have a console!"); + g_main_loop_quit(test->loop); + return; + } + g_assert_no_error(err); =20 test->listener_conn =3D g_thread_join(test->thread); @@ -156,7 +163,7 @@ test_dbus_display_console(void) g_autoptr(GMainLoop) loop =3D NULL; QTestState *qts =3D NULL; int pair[2]; - TestDBusConsoleRegister test; + TestDBusConsoleRegister test =3D { 0, }; #ifdef WIN32 WSAPROTOCOL_INFOW info; g_autoptr(GVariant) listener =3D NULL; @@ -245,7 +252,6 @@ test_dbus_display_keyboard(void) &err)); g_assert_no_error(err); =20 - g_assert_cmpint(qtest_inb(qts, 0x64) & 0x1, =3D=3D, 0); g_assert_cmpint(qtest_inb(qts, 0x60), =3D=3D, 0); =20 @@ -256,6 +262,12 @@ test_dbus_display_keyboard(void) -1, NULL, &err); + if (g_error_matches(err, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD)) { + g_test_skip("The VM doesn't have a console!"); + qtest_quit(qts); + return; + } + g_assert_no_error(err); =20 /* may be should wait for interrupt? */ --=20 2.43.2 From nobody Tue Nov 26 08:24:18 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=1708716822; cv=none; d=zohomail.com; s=zohoarc; b=mal/7vXxnABd0+nRwWAVaYG7X16YGFT9ra35L6HFYcFcgs45oS4yAT4TlM4FkifuWNQAs5l/cYJYapWjKK0x+CXBQg35J1gbhFU9DKXVOoC1oLa99W9MGiORT/US7ND5fBjk0RFpE3e/z96tYMClPW7uu1fCDAwmT5NtkF6gSvI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708716822; h=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=H4xvxkfYdM98uQaXkVrzMYveIOlmHEFn0bASNZa3zAw=; b=JT3P4pHrbjzmCOhMFHHDoJ7m8tX98KF8J3z24/iQntjr5F4A/BtjpyyYySuxm/wOYK/AnBEMhi6qD3y5xCJzjSK0e+1IVDfoEZVrTNYJuG0n73T2Q/G+vgIx8fUS0tujzMEgKoD5EZhmHCFIym+faEhSnG3baeud2bCXVMAQHQM= 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 1708716822773665.5646586560805; Fri, 23 Feb 2024 11:33:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdbHx-0008WN-Gm; Fri, 23 Feb 2024 14:32:54 -0500 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 1rdawD-0005mL-0v for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdaw3-0005Bd-Hl for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:23 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-438-reE7yC61NjiBjMPEXfL5xw-1; Fri, 23 Feb 2024 14:10:12 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5BBB338562C9; Fri, 23 Feb 2024 19:10:12 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF15E8CED; Fri, 23 Feb 2024 19:10:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708715414; 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=H4xvxkfYdM98uQaXkVrzMYveIOlmHEFn0bASNZa3zAw=; b=UP5rROSSr5bKdVYx8BGxasu0c1I7HFHLqUvaj/orzPJhdBlkncp6OjCU3bWnlsKNH6wQOZ mzLfHA1QZn+0xWZ09WvWzx6CI1I31HRepvlyN7mGx3svqYkIfMPl3L5S5xlPDIFOfW4e40 Lpe9EEb4UkRcMo6g9ISGnd7j7WoFE40= X-MC-Unique: reE7yC61NjiBjMPEXfL5xw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 05/11] target/ppc/kvm: Replace variable length array in kvmppc_save_htab() Date: Fri, 23 Feb 2024 20:09:57 +0100 Message-ID: <20240223191003.6268-6-thuth@redhat.com> In-Reply-To: <20240223191003.6268-1-thuth@redhat.com> References: <20240223191003.6268-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, 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, 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: 1708716823146100001 Content-Type: text/plain; charset="utf-8" To be able to compile QEMU with -Wvla (to prevent potential security issues), we need to get rid of the variable length array in the kvmppc_save_htab() function. Replace it with a heap allocation instead. Message-ID: <20240221162636.173136-2-thuth@redhat.com> Reviewed-by: Peter Maydell Signed-off-by: Thomas Huth --- target/ppc/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 26fa9d0575..e7e39c3091 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2688,7 +2688,7 @@ int kvmppc_get_htab_fd(bool write, uint64_t index, Er= ror **errp) int kvmppc_save_htab(QEMUFile *f, int fd, size_t bufsize, int64_t max_ns) { int64_t starttime =3D qemu_clock_get_ns(QEMU_CLOCK_REALTIME); - uint8_t buf[bufsize]; + g_autofree uint8_t *buf =3D g_malloc(bufsize); ssize_t rc; =20 do { --=20 2.43.2 From nobody Tue Nov 26 08:24:18 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=1708717721; cv=none; d=zohomail.com; s=zohoarc; b=LCXBTHym9ihjuu/AY6VLa8l04KwJD2bOgHzKd4tRar9KjItU4TQYHbFbFrPw6s5Ot4YIo0PsUc0OnpqnhAl+q4YJhZxzQA/ByTPIcit6tKtD97RJVd0afe9IkmRF0yLLWg6wzQGohy0mMtqSlxTHa3RMAyuxBV6vTkRkY3kKzUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708717721; h=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=2D3ev6UlJKhuIqGPbecC1pstyHD2HZx+s/V5NY/sKwo=; b=QRnUqgVuanW+RUR9EjieCjawa5EF0bh07v8lbc5M5RI1k25RdVMOuO3qTYT3rg4tExugAGDAsz0b/ueA/zf3riEP2MwMhxzDcT7weVn26V+X2DQNqIBnttjIKlxonPz8vIc93Z14eilVdjRfxcuLrVWm0RYUnwYV0pqrzXaaqr4= 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 1708717721709194.68858927899407; Fri, 23 Feb 2024 11:48:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdbWR-0004f2-Ac; Fri, 23 Feb 2024 14:47:51 -0500 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 1rdawD-0005mM-3I for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdaw6-0005CU-Um for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:24 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-664-Wfnksaf9MI-7Z_nAGwqTYw-1; Fri, 23 Feb 2024 14:10:13 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8534885CE40; Fri, 23 Feb 2024 19:10:13 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id CEF288CED; Fri, 23 Feb 2024 19:10:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708715418; 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=2D3ev6UlJKhuIqGPbecC1pstyHD2HZx+s/V5NY/sKwo=; b=ZYvh1e81kxWkilQTmLt/F/LMbQxv6VFWDDMZsGB0Q4FTVec3lYFwExkSRVq+2kOyeQMONf F+Z4mxPFV3HJaNcqh5WeYisYDCnTPHvMHoKj422W/CmSLb83FOrTcIdslqkLglmdjvJ06s dXjq3arhgjIgZlo48hB2iskEcHyk+pM= X-MC-Unique: Wfnksaf9MI-7Z_nAGwqTYw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell Subject: [PULL 06/11] target/ppc/kvm: Replace variable length array in kvmppc_read_hptes() Date: Fri, 23 Feb 2024 20:09:58 +0100 Message-ID: <20240223191003.6268-7-thuth@redhat.com> In-Reply-To: <20240223191003.6268-1-thuth@redhat.com> References: <20240223191003.6268-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, 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, 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: 1708717723332100007 Content-Type: text/plain; charset="utf-8" HPTES_PER_GROUP is 8 and HASH_PTE_SIZE_64 is 16, so we don't waste too many bytes by always allocating the maximum amount of bytes on the stack here to get rid of the variable length array. Suggested-by: Peter Maydell Message-ID: <20240221162636.173136-3-thuth@redhat.com> Reviewed-by: Peter Maydell Signed-off-by: Thomas Huth --- target/ppc/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index e7e39c3091..bcf30a5400 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -2770,9 +2770,9 @@ void kvmppc_read_hptes(ppc_hash_pte64_t *hptes, hwadd= r ptex, int n) while (i < n) { struct kvm_get_htab_header *hdr; int m =3D n < HPTES_PER_GROUP ? n : HPTES_PER_GROUP; - char buf[sizeof(*hdr) + m * HASH_PTE_SIZE_64]; + char buf[sizeof(*hdr) + HPTES_PER_GROUP * HASH_PTE_SIZE_64]; =20 - rc =3D read(fd, buf, sizeof(buf)); + rc =3D read(fd, buf, sizeof(*hdr) + m * HASH_PTE_SIZE_64); if (rc < 0) { hw_error("kvmppc_read_hptes: Unable to read HPTEs"); } --=20 2.43.2 From nobody Tue Nov 26 08:24:18 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=1708718371; cv=none; d=zohomail.com; s=zohoarc; b=M7Py6rhgV+3RBAp0zpJ9EvpAPDgHsZqMe5cRBEZH+dlwEJECHVpGPt3s2Uizo/CjTn4lm4F2XsJIK2EW8iGfwx+KdY0cmJyr4k3decnZc+WqlAdIeyqvRy6zROzx1NeIfyN+eu2APxosXCXAeyDCzYQtYo7W5D86sxCISDwZumY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708718371; 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=G8VyCfIgJLlXJBKJ0ikRitCPzdkPenpH9LMlDgEm6ms=; b=Vx2aczyicuDIUKfIGAAhY0fyikiy7IkeY8uKWxI0z5DW7AyKk7dHLq6ifagLRxpGkwg00CxDR7qhYLUDrH0Bm11sj7zFPFRMkCY/CGR6mey4PxJvQg+mL3osMnflgU3bHiplkptTarKV45gM2c1Hii3W2AThK2AtnuA0GMtPlN0= 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 1708718371975419.13310646677485; Fri, 23 Feb 2024 11:59:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdbgm-0000bo-KI; Fri, 23 Feb 2024 14:58:32 -0500 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 1rdawD-0005mO-Fv for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdaw8-0005D0-Vv for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:25 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-212-pnSl-HSIPdKkfWo3etTC8w-1; Fri, 23 Feb 2024 14:10:15 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DFBF538562C9; Fri, 23 Feb 2024 19:10:14 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id D18708CED; Fri, 23 Feb 2024 19:10:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708715418; 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=G8VyCfIgJLlXJBKJ0ikRitCPzdkPenpH9LMlDgEm6ms=; b=cJ0/kKMnU1QFp0sM8c1Ggsqz16Xx3yH3URlNVxVK6zFT6lGEKsYAVBL8S+SVrrnbVxSlMO 1YFIfwwHtCBY+wLXP9xMDGkoPWekjaPhSLg1MWPQPZ+Q5AJPDowJ7POy9+dpuwZjRitIOk wIItg0+FiQosxeWG97WyluOUMv2r84M= X-MC-Unique: pnSl-HSIPdKkfWo3etTC8w-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 07/11] meson: Enable -Wvla Date: Fri, 23 Feb 2024 20:09:59 +0100 Message-ID: <20240223191003.6268-8-thuth@redhat.com> In-Reply-To: <20240223191003.6268-1-thuth@redhat.com> References: <20240223191003.6268-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, 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, 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: 1708718373448100001 From: Peter Maydell QEMU has historically used variable length arrays only very rarely. Variable length arrays are a potential security issue where an on-stack dynamic allocation isn't correctly size-checked, especially when the size comes from the guest. (An example problem of this kind from the past is CVE-2021-3527). Forbidding them entirely is a defensive measure against further bugs of this kind. Enable -Wvla to prevent any new uses from sneaking into the codebase. Signed-off-by: Peter Maydell Message-ID: <20240125173211.1786196-3-peter.maydell@linaro.org> [thuth: rebased to current master branch] Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240221162636.173136-4-thuth@redhat.com> Signed-off-by: Thomas Huth --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index c1dc83e4c0..0ef1654e86 100644 --- a/meson.build +++ b/meson.build @@ -592,6 +592,7 @@ warn_flags =3D [ '-Wstrict-prototypes', '-Wtype-limits', '-Wundef', + '-Wvla', '-Wwrite-strings', =20 # Then disable some undesirable warnings --=20 2.43.2 From nobody Tue Nov 26 08:24:18 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=1708718371; cv=none; d=zohomail.com; s=zohoarc; b=KvEuwlDU0Z/xDe19fbobXUmxijUWqKILERmQWbCpL6vMyU9QyWPcVNzNbKh7miHxRPEOEpXcdrDYEvO1/vzwEMVLKIep+DIoRECEtbkoihBA+NdcZcQ2aKyTJL08lP0ds06juNVCZIIarM5KFUGHSosno4k+JqvrJNxw+2y1gFk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708718371; 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=D6849bzPsRNSG+m7rBaT3t7p6WGO/m0rCc0KP5ao5Uw=; b=ZwY6ICZHVowqb3s1JfmxrbVTQkjvo/TQN8y45lEgvUjyK0at1o4sX9x360MS84KW9LThmXfQAYTyrkxV27qI1Wd8OdGZVWPuD2gJ4TitF8Era3p8K8UyscgxeXrWdeqrmrBGLv/kHz/w6b561pW9sPjMFvEcrj8UfSqf7ZGBIy0= 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 1708718371689479.60477311133013; Fri, 23 Feb 2024 11:59:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdbgp-0000ix-BL; Fri, 23 Feb 2024 14:58:35 -0500 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 1rdawG-0005nF-UQ for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:35 -0500 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 1rdawA-0005Dz-2V for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:28 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-479-TgeC-YOmPM2D_x9Y3H_vqg-1; Fri, 23 Feb 2024 14:10:16 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6EAE585A589; Fri, 23 Feb 2024 19:10:16 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35C698CED; Fri, 23 Feb 2024 19:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708715420; 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=D6849bzPsRNSG+m7rBaT3t7p6WGO/m0rCc0KP5ao5Uw=; b=g+lLdxVrYi2nRZaE1WgVuHno6yg7Gky3q64BRkUqwNNDmRV1Qjjzp0GsrhMOyfhX+AeSMe wQaPiMzeU3fKVPDDN+LLzHATm6VQTPFaqewSUCpj8VHTLpRk0RVuAeDhYDjAN+OlqlRTQO IgG0xawuUJBtBQu7ABBXpDHbP9qpd40= X-MC-Unique: TgeC-YOmPM2D_x9Y3H_vqg-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PULL 08/11] docs: Document that 32-bit Windows is unsupported Date: Fri, 23 Feb 2024 20:10:00 +0100 Message-ID: <20240223191003.6268-9-thuth@redhat.com> In-Reply-To: <20240223191003.6268-1-thuth@redhat.com> References: <20240223191003.6268-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, 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: 1708718373531100005 From: Peter Maydell Reviewed-by: Thomas Huth Reviewed-by: "Daniel P. Berrang=C3=A9" Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Peter Maydell Message-ID: <20240222130920.362517-2-peter.maydell@linaro.org> Signed-off-by: Thomas Huth --- docs/about/build-platforms.rst | 2 ++ docs/about/removed-features.rst | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst index f2a7aec56f..8fd7da140a 100644 --- a/docs/about/build-platforms.rst +++ b/docs/about/build-platforms.rst @@ -139,6 +139,8 @@ unprivileged accounts can create symlinks if Developer = Mode is enabled. When Developer Mode is not available/enabled, the SeCreateSymbolicLinkPriv= ilege privilege is required, or the process must be run as an administrator. =20 +Only 64-bit Windows is supported. + .. _Homebrew: https://brew.sh/ .. _MacPorts: https://www.macports.org/ .. _MSYS2: https://www.msys2.org/ diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.= rst index 54081a6c19..417a0e4fa1 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -659,6 +659,21 @@ This command didn't produce any output already. Remove= d with no replacement. The ``singlestep`` command has been replaced by the ``one-insn-per-tb`` command, which has the same behaviour but a less misleading name. =20 +Host Architectures +------------------ + +System emulation on 32-bit Windows hosts (removed in 9.0) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Windows 11 has no support for 32-bit host installs, and Windows 10 did +not support new 32-bit installs, only upgrades. 32-bit Windows support +has now been dropped by the MSYS2 project. QEMU also is deprecating +and dropping support for 32-bit x86 host deployments in +general. 32-bit Windows is therefore no longer a supported host for +QEMU. Since all recent x86 hardware from the past >10 years is +capable of the 64-bit x86 extensions, a corresponding 64-bit OS should +be used instead. + Guest Emulator ISAs ------------------- =20 --=20 2.43.2 From nobody Tue Nov 26 08:24:18 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=1708717147; cv=none; d=zohomail.com; s=zohoarc; b=nY0XJWx2XxyXx4Kxy/gGM0tawC9Drc6avuBLfhHE4SCrBafIAO0WolRjlfa6p+Ft7G6UFiUz1ffybVqQt+I/c3Hmo3Gday7UkpJZSzCh2FHJrhbbBDg74tbSNdxyyvwHzpUQb5FpJ+PwRUFyoxC02wA7EZHbjEK3zbG2yWf0Zgg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708717147; 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=DgAxyS6IW8O7GbuGWIGuj6wMTsF+Z7lreojznlOTU8E=; b=mKxJUmeFBjKrnLWCTGUDs+zXEbIF85tW/7J6m9vDAw4YI9vUJLJ8NmuJMgl5jssqduDZQRG8XVnLTIeUg+CT6i/8IjArYxsCJA2f4b+Y2Tc3yIIvlKhLEc0vxY7SY6ge34wZJuJQf19fUA1YaonrIkxwdr8w9mJlZ8U95nzoXBs= 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 1708717147714610.8587288886489; Fri, 23 Feb 2024 11:39:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdbNN-0001Sn-VC; Fri, 23 Feb 2024 14:38:30 -0500 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 1rdawG-0005nD-Pa for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdawA-0005E2-2Q for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:25 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-32-Afn-iO_3P6yO_6_NztL7Yw-1; Fri, 23 Feb 2024 14:10:18 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0D072800074; Fri, 23 Feb 2024 19:10:18 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id CEF7D8CED; Fri, 23 Feb 2024 19:10:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708715420; 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=DgAxyS6IW8O7GbuGWIGuj6wMTsF+Z7lreojznlOTU8E=; b=MR3bFY0U296iY51Ey/nHYzXd0nloNqUXOYTxwDeZhfzhNbhczFP3RR65g3+DU+CiQZbKaE ufIO56XXJ3XFpsVpBKupTgM8kCQy1n0BdL/kyl6DUuFYHjv7GzKG6BpOFXybJb2cACOV59 i/1zt5wRO7k4e+gvb70QXcPVeKR+O3M= X-MC-Unique: Afn-iO_3P6yO_6_NztL7Yw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PULL 09/11] .gitlab-ci.d: Drop cross-win32-system job Date: Fri, 23 Feb 2024 20:10:01 +0100 Message-ID: <20240223191003.6268-10-thuth@redhat.com> In-Reply-To: <20240223191003.6268-1-thuth@redhat.com> References: <20240223191003.6268-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, 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, 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: 1708717148166100003 From: Peter Maydell We don't support 32-bit Windows any more, so we don't need to defend it with this CI job. Signed-off-by: Peter Maydell Reviewed-by: Thomas Huth Reviewed-by: "Daniel P. Berrang=C3=A9" Reviewed-by: Alex Benn=C3=A9e Message-ID: <20240222130920.362517-3-peter.maydell@linaro.org> Signed-off-by: Thomas Huth --- .gitlab-ci.d/container-cross.yml | 5 - .gitlab-ci.d/crossbuilds.yml | 14 --- .../dockerfiles/fedora-win32-cross.docker | 111 ------------------ tests/lcitool/refresh | 5 - 4 files changed, 135 deletions(-) delete mode 100644 tests/docker/dockerfiles/fedora-win32-cross.docker diff --git a/.gitlab-ci.d/container-cross.yml b/.gitlab-ci.d/container-cros= s.yml index 8d235cbea0..e3103940a0 100644 --- a/.gitlab-ci.d/container-cross.yml +++ b/.gitlab-ci.d/container-cross.yml @@ -101,11 +101,6 @@ cris-fedora-cross-container: variables: NAME: fedora-cris-cross =20 -win32-fedora-cross-container: - extends: .container_job_template - variables: - NAME: fedora-win32-cross - win64-fedora-cross-container: extends: .container_job_template variables: diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index d19d98cde0..987ba9694b 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -159,20 +159,6 @@ cross-mips64el-kvm-only: IMAGE: debian-mips64el-cross EXTRA_CONFIGURE_OPTS: --disable-tcg --target-list=3Dmips64el-softmmu =20 -cross-win32-system: - extends: .cross_system_build_job - needs: - job: win32-fedora-cross-container - variables: - IMAGE: fedora-win32-cross - EXTRA_CONFIGURE_OPTS: --enable-fdt=3Dinternal - CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu m68k-softmmu - microblazeel-softmmu mips64el-softmmu nios2-softmmu - artifacts: - when: on_success - paths: - - build/qemu-setup*.exe - cross-win64-system: extends: .cross_system_build_job needs: diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/doc= ker/dockerfiles/fedora-win32-cross.docker deleted file mode 100644 index 08799219f9..0000000000 --- a/tests/docker/dockerfiles/fedora-win32-cross.docker +++ /dev/null @@ -1,111 +0,0 @@ -# THIS FILE WAS AUTO-GENERATED -# -# $ lcitool dockerfile --layers all --cross-arch mingw32 fedora-38 qemu -# -# https://gitlab.com/libvirt/libvirt-ci - -FROM registry.fedoraproject.org/fedora:38 - -RUN dnf install -y nosync && \ - printf '#!/bin/sh\n\ -if test -d /usr/lib64\n\ -then\n\ - export LD_PRELOAD=3D/usr/lib64/nosync/nosync.so\n\ -else\n\ - export LD_PRELOAD=3D/usr/lib/nosync/nosync.so\n\ -fi\n\ -exec "$@"\n' > /usr/bin/nosync && \ - chmod +x /usr/bin/nosync && \ - nosync dnf update -y && \ - nosync dnf install -y \ - bash \ - bc \ - bison \ - bzip2 \ - ca-certificates \ - ccache \ - ctags \ - dbus-daemon \ - diffutils \ - findutils \ - flex \ - gcc \ - gcovr \ - git \ - glib2-devel \ - glibc-langpack-en \ - hostname \ - llvm \ - make \ - meson \ - mtools \ - ninja-build \ - nmap-ncat \ - openssh-clients \ - pcre-static \ - python3 \ - python3-PyYAML \ - python3-numpy \ - python3-opencv \ - python3-pillow \ - python3-pip \ - python3-sphinx \ - python3-sphinx_rtd_theme \ - sed \ - socat \ - sparse \ - spice-protocol \ - swtpm \ - tar \ - tesseract \ - tesseract-langpack-eng \ - util-linux \ - which \ - xorriso \ - zstd && \ - nosync dnf autoremove -y && \ - nosync dnf clean all -y - -ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" -ENV LANG "en_US.UTF-8" -ENV MAKE "/usr/bin/make" -ENV NINJA "/usr/bin/ninja" -ENV PYTHON "/usr/bin/python3" - -RUN nosync dnf install -y \ - mingw32-SDL2 \ - mingw32-SDL2_image \ - mingw32-bzip2 \ - mingw32-curl \ - mingw32-gcc \ - mingw32-gcc-c++ \ - mingw32-gettext \ - mingw32-glib2 \ - mingw32-gnutls \ - mingw32-gtk3 \ - mingw32-libepoxy \ - mingw32-libgcrypt \ - mingw32-libjpeg-turbo \ - mingw32-libpng \ - mingw32-libtasn1 \ - mingw32-nettle \ - mingw32-nsis \ - mingw32-pixman \ - mingw32-pkg-config && \ - nosync dnf clean all -y && \ - rpm -qa | sort > /packages.txt && \ - mkdir -p /usr/libexec/ccache-wrappers && \ - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-c+= + && \ - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-cc= && \ - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-g+= + && \ - ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/i686-w64-mingw32-gcc - -ENV ABI "i686-w64-mingw32" -ENV MESON_OPTS "--cross-file=3D/usr/share/mingw/toolchain-mingw32.meson" -ENV QEMU_CONFIGURE_OPTS --cross-prefix=3Di686-w64-mingw32- -ENV DEF_TARGET_LIST i386-softmmu -# As a final step configure the user (if env is defined) -ARG USER -ARG UID -RUN if [ "${USER}" ]; then \ - id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index 0c93557ad6..fe7692c500 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -192,11 +192,6 @@ try: trailer=3Dcross_build("s390x-linux-gnu-", "s390x-softmmu,s390x-linux-use= r")) =20 - generate_dockerfile("fedora-win32-cross", "fedora-38", - cross=3D"mingw32", - trailer=3Dcross_build("i686-w64-mingw32-", - "i386-softmmu")) - generate_dockerfile("fedora-win64-cross", "fedora-38", cross=3D"mingw64", trailer=3Dcross_build("x86_64-w64-mingw32-", --=20 2.43.2 From nobody Tue Nov 26 08:24:18 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=1708716716; cv=none; d=zohomail.com; s=zohoarc; b=QFqYiX2AXtO1BVaL5SrQyfmwKg1qlxOl7vbQFhPCO3i+mty4Q/QAdC42ivCbgtjdhcaDLYG6ArgXRSIOKYcc3zNUJSNOMOqPqKwmrXPKOt+SSgrtm80HUxOg0FfcO8DNaelB+tYTa67nvTug/zR5hg5w7Os1//2OGpI6dS+SuHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708716716; 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=AuBn9YK65/VJijo7z361xypecvvLSdypK1RNAkg3cAg=; b=EC1M4EKDoBnz/hqhiiW1DDdCswSsn0ySr2gtVXU1XUodZgCgOpfDwZqGw20i2GxpKGcEThTGapKkxJ4sbsGULfm3UYngfq794Xw2+ZAOX1zI82FFmnMLqcTft+mAYyf3pIyCCWTURfMWp3uzoyfOhz7OLQUaPFdXHcN+xS7fO7w= 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 17087167165581012.7337061869049; Fri, 23 Feb 2024 11:31:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdbGq-0007Rf-Fr; Fri, 23 Feb 2024 14:31:45 -0500 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 1rdawH-0005nR-6B for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdawC-0005Fp-Of for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:28 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-164-HeE8df90NE-BtQ5AmfahDw-1; Fri, 23 Feb 2024 14:10:19 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 782E888CDCF; Fri, 23 Feb 2024 19:10:19 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74B1E8CED; Fri, 23 Feb 2024 19:10:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708715423; 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=AuBn9YK65/VJijo7z361xypecvvLSdypK1RNAkg3cAg=; b=g7Ytn+tjRDJ9eCnC7bjQhAB3QiBTVJVb/xgfvaXcoJlZNMhiBiKq7GczSJQW8DM/+Xsl65 8tkgd/HRT+FMUI7hgleDKSz6Cqpy21NxAXdyoY1NU/I8UF18E88sc13i/RRCc7EAiODCD9 db3Ru63XRsvDMlUo5HO+fR+Noo/qoUk= X-MC-Unique: HeE8df90NE-BtQ5AmfahDw-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 10/11] .gitlab-ci.d/windows.yml: Remove shared-msys2 abstraction Date: Fri, 23 Feb 2024 20:10:02 +0100 Message-ID: <20240223191003.6268-11-thuth@redhat.com> In-Reply-To: <20240223191003.6268-1-thuth@redhat.com> References: <20240223191003.6268-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, 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, 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: 1708716718764100003 From: Peter Maydell Now we don't build msys2-32bit we don't need the abstraction out of the common msys2 handling from the 32-vs-64-bit specifics. Collapse it down into the msys2-64bit job definition. Signed-off-by: Peter Maydell Reviewed-by: "Daniel P. Berrang=C3=A9" Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240222130920.362517-4-peter.maydell@linaro.org> Signed-off-by: Thomas Huth --- .gitlab-ci.d/windows.yml | 85 +++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 44 deletions(-) diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml index 8fc08218d2..f116b8012d 100644 --- a/.gitlab-ci.d/windows.yml +++ b/.gitlab-ci.d/windows.yml @@ -1,4 +1,4 @@ -.shared_msys2_builder: +msys2-64bit: extends: .base_job_template tags: - shared-windows @@ -14,9 +14,20 @@ stage: build timeout: 100m variables: + # Select the "64 bit, gcc and MSVCRT" MSYS2 environment + MSYSTEM: MINGW64 # This feature doesn't (currently) work with PowerShell, it stops # the echo'ing of commands being run and doesn't show any timing FF_SCRIPT_SECTIONS: 0 + # do not remove "--without-default-devices"! + # commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by usi= ng --without-default-devices" + # changed to compile QEMU with the --without-default-devices switch + # for this job, because otherwise the build could not complete within + # the project timeout. + CONFIGURE_ARGS: --target-list=3Dx86_64-softmmu --without-default-devi= ces -Ddebug=3Dfalse -Doptimization=3D0 + # qTests don't run successfully with "--without-default-devices", + # so let's exclude the qtests from CI for now. + TEST_ARGS: --no-suite qtest artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" expire_in: 7 days @@ -72,33 +83,35 @@ - .\msys64\usr\bin\bash -lc "pacman -Sy --noconfirm --needed bison diffutils flex git grep make sed - $MINGW_TARGET-binutils - $MINGW_TARGET-capstone - $MINGW_TARGET-ccache - $MINGW_TARGET-curl - $MINGW_TARGET-cyrus-sasl - $MINGW_TARGET-dtc - $MINGW_TARGET-gcc - $MINGW_TARGET-glib2 - $MINGW_TARGET-gnutls - $MINGW_TARGET-gtk3 - $MINGW_TARGET-libgcrypt - $MINGW_TARGET-libjpeg-turbo - $MINGW_TARGET-libnfs - $MINGW_TARGET-libpng - $MINGW_TARGET-libssh - $MINGW_TARGET-libtasn1 - $MINGW_TARGET-lzo2 - $MINGW_TARGET-nettle - $MINGW_TARGET-ninja - $MINGW_TARGET-pixman - $MINGW_TARGET-pkgconf - $MINGW_TARGET-python - $MINGW_TARGET-SDL2 - $MINGW_TARGET-SDL2_image - $MINGW_TARGET-snappy - $MINGW_TARGET-zstd - $EXTRA_PACKAGES " + mingw-w64-x86_64-binutils + mingw-w64-x86_64-capstone + mingw-w64-x86_64-ccache + mingw-w64-x86_64-curl + mingw-w64-x86_64-cyrus-sasl + mingw-w64-x86_64-dtc + mingw-w64-x86_64-gcc + mingw-w64-x86_64-glib2 + mingw-w64-x86_64-gnutls + mingw-w64-x86_64-gtk3 + mingw-w64-x86_64-libgcrypt + mingw-w64-x86_64-libjpeg-turbo + mingw-w64-x86_64-libnfs + mingw-w64-x86_64-libpng + mingw-w64-x86_64-libssh + mingw-w64-x86_64-libtasn1 + mingw-w64-x86_64-libusb + mingw-w64-x86_64-lzo2 + mingw-w64-x86_64-nettle + mingw-w64-x86_64-ninja + mingw-w64-x86_64-pixman + mingw-w64-x86_64-pkgconf + mingw-w64-x86_64-python + mingw-w64-x86_64-SDL2 + mingw-w64-x86_64-SDL2_image + mingw-w64-x86_64-snappy + mingw-w64-x86_64-spice + mingw-w64-x86_64-usbredir + mingw-w64-x86_64-zstd" - Write-Output "Running build at $(Get-Date -Format u)" - $env:CHERE_INVOKING =3D 'yes' # Preserve the current working directory - $env:MSYS =3D 'winsymlinks:native' # Enable native Windows symlink @@ -115,19 +128,3 @@ - ..\msys64\usr\bin\bash -lc "make check MTESTARGS=3D'$TEST_ARGS' || { c= at meson-logs/testlog.txt; exit 1; } ;" - ..\msys64\usr\bin\bash -lc "ccache --show-stats" - Write-Output "Finished build at $(Get-Date -Format u)" - -msys2-64bit: - extends: .shared_msys2_builder - variables: - MINGW_TARGET: mingw-w64-x86_64 - MSYSTEM: MINGW64 - # msys2 only ship these packages for 64-bit, not 32-bit - EXTRA_PACKAGES: $MINGW_TARGET-libusb $MINGW_TARGET-usbredir $MINGW_TAR= GET-spice - # do not remove "--without-default-devices"! - # commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by usi= ng --without-default-devices" - # changed to compile QEMU with the --without-default-devices switch - # for the msys2 64-bit job, due to the build could not complete within - CONFIGURE_ARGS: --target-list=3Dx86_64-softmmu --without-default-devi= ces -Ddebug=3Dfalse -Doptimization=3D0 - # qTests don't run successfully with "--without-default-devices", - # so let's exclude the qtests from CI for now. - TEST_ARGS: --no-suite qtest --=20 2.43.2 From nobody Tue Nov 26 08:24:18 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=1708717719; cv=none; d=zohomail.com; s=zohoarc; b=iV/hx49QAMZhOCIYPdWRo0ioXQydpd7YLz1WbApr5CvmE5Waey8NFqxiIm6EUVfMj1To9Koj0TU9BM42szmgCP1BVHG5yks7uj4BqWzyzQ+f/ged9uL6IYuLuxsG8gcO9KIx1+4EhZocNo+hfX0WxdGW5YpeqnMFhYO3f766xtY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708717719; h=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=KWnvkcpd64dmJIVKz8lboK1m9g0wbAxCnQNFypzKJRE=; b=PHZAHQ+mpvEgONAoJ1mqz6IIIU1filqRXLYqE5blUPa6IboR8E3sM6THWoejVs+1n5Y0vdp0YAIFVJmKi7CDPe0W/4FPEhuLMyYegCy1bZIRAN6d3zR3FKr3isk1QbSF2ug42O6ThHztt5HDTIyICUSNqiE2lLR2xjMMOFbhR3o= 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 1708717719741133.59947968029837; Fri, 23 Feb 2024 11:48:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdbWT-0004jH-5X; Fri, 23 Feb 2024 14:47:53 -0500 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 1rdawI-0005ns-Fy for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:35 -0500 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 1rdawG-0005HI-Ge for qemu-devel@nongnu.org; Fri, 23 Feb 2024 14:10:30 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-635-AaD5nQ2JOUKvzLGCW6cT-A-1; Fri, 23 Feb 2024 14:10:21 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0B8EE106D021; Fri, 23 Feb 2024 19:10:21 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.39.192.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id F163E8CED; Fri, 23 Feb 2024 19:10:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708715425; 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=KWnvkcpd64dmJIVKz8lboK1m9g0wbAxCnQNFypzKJRE=; b=PaT9srlu3cPNG/9JCAAUtbW9HyICIKU83NVuyKkcXIcyE4xZWJKXqgziQ/AeBU0TKoq27i yuHGKfv4RSwcicZQxEKjeyqYWd205Murla7ZLulzUdGD7q1pJQpDYzXxhuNy2ioDFi7yCm YFXRGOaRs2QjOCph5lRRvA2EhGtAeJQ= X-MC-Unique: AaD5nQ2JOUKvzLGCW6cT-A-1 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Peter Maydell , Paolo Bonzini Subject: [PULL 11/11] target/i386: do not filter processor tracing features except on KVM Date: Fri, 23 Feb 2024 20:10:03 +0100 Message-ID: <20240223191003.6268-12-thuth@redhat.com> In-Reply-To: <20240223191003.6268-1-thuth@redhat.com> References: <20240223191003.6268-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.066, 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: 1708717721408100003 Content-Type: text/plain; charset="utf-8" From: Paolo Bonzini The processor tracing features in cpu_x86_cpuid() are hardcoded to a set that should be safe on all processor that support PT virtualization. But as an additional check, x86_cpu_filter_features() also checks that the accelerator supports that safe subset, and if not it marks CPUID_7_0_EBX_INTEL_PT as unavailable. This check fails on accelerators other than KVM, but it is actually unnecessary to do it because KVM is the only accelerator that uses the safe subset. Everything else just provides nonzero values for CPUID leaf 0x14 (TCG/HVF because processor tracing is not supported; qtest because nothing is able to read CPUID anyway). Restricting the check to KVM fixes a warning with the qtest accelerator: $ qemu-system-x86_64 -display none -cpu max,mmx=3Doff -accel qtest qemu-system-x86_64: warning: TCG doesn't support requested feature: CPU= ID.07H:EBX.intel-pt [bit 25] The warning also happens in the test-x86-cpuid-compat qtest. Reported-by: Peter Maydell Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2096 Signed-off-by: Paolo Bonzini Message-ID: <20240221162910.101327-1-pbonzini@redhat.com> Fixes: d047402436 ("target/i386: Call accel-agnostic x86_cpu_get_supported_= cpuid()") Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- target/i386/cpu.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index bca776e1fe..7f90823676 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -6412,6 +6412,10 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index,= uint32_t count, break; } =20 + /* + * If these are changed, they should stay in sync with + * x86_cpu_filter_features(). + */ if (count =3D=3D 0) { *eax =3D INTEL_PT_MAX_SUBLEAF; *ebx =3D INTEL_PT_MINIMAL_EBX; @@ -7156,7 +7160,12 @@ static void x86_cpu_filter_features(X86CPU *cpu, boo= l verbose) mark_unavailable_features(cpu, w, unavailable_features, prefix); } =20 - if (env->features[FEAT_7_0_EBX] & CPUID_7_0_EBX_INTEL_PT) { + /* + * Check that KVM actually allows the processor tracing features that + * are advertised by cpu_x86_cpuid(). Keep these two in sync. + */ + if ((env->features[FEAT_7_0_EBX] & CPUID_7_0_EBX_INTEL_PT) && + kvm_enabled()) { uint32_t eax_0, ebx_0, ecx_0, edx_0_unused; uint32_t eax_1, ebx_1, ecx_1_unused, edx_1_unused; =20 --=20 2.43.2