From patchwork Tue Mar 5 22:09:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 778055 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:47:b0:33e:474f:8c56 with SMTP id k7csp13523wrx; Tue, 5 Mar 2024 14:10:56 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWvsrkzjCIIutoVA4BWkxLeeMSpDfizUjzwW2Vi/hagkDUjHuBJUlhAqoZckn5lIdM+Ri1vQ6du27CyUSUVWOgd X-Google-Smtp-Source: AGHT+IGmc4nidFOkq8mFn5g2VtvvPL6nj8JRUdZLJRr2RtmnkL/+z/nlroGXpRgtiYe2ldvuVQLp X-Received: by 2002:a05:6358:590a:b0:178:6db3:27d0 with SMTP id g10-20020a056358590a00b001786db327d0mr3067968rwf.30.1709676656569; Tue, 05 Mar 2024 14:10:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709676656; cv=none; d=google.com; s=arc-20160816; b=TccLglHmF/bUDvzz2zvt5GxebeA4mLIuCSmqQsQMoBWxYoGzzJBj/H2gy54Jx2PJfE t4LhhR5XFnA4N/nX7HE/HD3WLNOk9fvr6TqQaIRZx1/W2oeTxUY49UcDj+qvwsUsgIR7 /VwnWkoS9fd7puGyTKrsUteJZ4K/aHZSpBvwlTyEWW6njpCefnCuI+yhHrpJQhechZqG On5b7mPqNqWMgJjdKlLRKdtfBP6lndHKbdPrFFcenPPjEdIpg7xQuUkc/vzJocXwtMYT yLKaI9c/CDuof/GfKqiqRV0ThyS7ED5SIxUvAT5+3PvmgvBhPQAVJzUgrDsj9YsmVGF7 bDQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iIAUoqwZw8jjQEXl/6GyiIUaJ3twVU9qfT6FoSeBtUo=; fh=kEGtYlwZYjtLG3jCDb1HHuODxHSfMXDTVnLVpt9tybw=; b=l/Kx5+Lu6gvbsQtqQfaDDTupYipoNUhVuCzGMzX48cYRNP1qsodN6ElzZc1Jr3IBb4 WmPDAQTFMsxrnjFK4VMZp20C9phq9JusYmDKEr2CtbwSIINSOVEF+IdXb+bKAbpm8rGc G9iZV6uY96pxP/qaq9XJG1jT6uKg6RDK2MVQaE/VrY7aWN2lbc9bcxhe4z++h9sacwkl p6LWqMPvqkpf0jd7nu1LK01u277oQ+XME0djOlrUp/qhFGOCZ2dfEyUVYXuOpElyCUJC 3pb2uzRy9Umfc+OjUkLpK8aYGo/5EJChZOLqQ9pEM5OsyL1nQGek61CyespOAoNMfnnG ehdg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GVQuvzjO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id iv10-20020ad45cea000000b0068fe276cf6esi13486176qvb.330.2024.03.05.14.10.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Mar 2024 14:10:56 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GVQuvzjO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhcyx-0007AV-J4; Tue, 05 Mar 2024 17:09:55 -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 1rhcyw-00079r-7K for qemu-devel@nongnu.org; Tue, 05 Mar 2024 17:09:54 -0500 Received: from mail-ua1-x935.google.com ([2607:f8b0:4864:20::935]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhcyu-0000jj-Nw for qemu-devel@nongnu.org; Tue, 05 Mar 2024 17:09:53 -0500 Received: by mail-ua1-x935.google.com with SMTP id a1e0cc1a2514c-7d698a8d93cso3517681241.3 for ; Tue, 05 Mar 2024 14:09:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709676591; x=1710281391; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iIAUoqwZw8jjQEXl/6GyiIUaJ3twVU9qfT6FoSeBtUo=; b=GVQuvzjOg8/ZZhxnyS+eSqCQLBjKDeNAEKTlSNniVeU0gZAZJilJ4QLl8DVW6tc4uX xmIv8Nof604PciDkE1hRhU5pnxQ6VYtUOxesYyvGAW4N4OQOcZlLpO1xkqJSBbzCVexU XXNcWYJG2o0n4GWr2ABNT77ktb1SHqEktGgvgKpyBOGkNIm5BMBxjlrQFyyTS0QR1vuV TI6Do7NTRTPTPbhSMGPFaxKLX9PlJs3slqd2tadgjr/gTe9qgQUZPQPMvUKF5tO6nJTd qA2NpMlvyUqDvP7nRVVNsa7VsClJzbgJMKGNq8bKhVm3AC7cf6DmOfmSrKWHXjv/KzVn VxKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709676591; x=1710281391; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iIAUoqwZw8jjQEXl/6GyiIUaJ3twVU9qfT6FoSeBtUo=; b=eiDVacJAgvAzcozhtS4OMWN/MoA78cJQZmTskQB/Nw3jiHhLnlPQSZJ1U8uYisAtzg yXyngrcQnko9tvnDAnE6FfzO5BwiqKyMIsreMlO3mMxrasna5C0QyyjXIWsQVWhXqLbz Cm3GJGqAXGe/IUvTegzJ98jEScQQKLeBEONebUO2smR1XRc/9sQglhgjfG8F9dpdiA77 /woLXdbmiGc1XGutGP2ullfHMocsnl73Rhd932FfFBZmsZLDk1TpSHuXcCaj0HeN5J/p xrU5t/czUJg08mtS1WhnogcwSxdGcQ8WgSD8Z/Xi9V4JFxaSDlPAHFgl4JkFIC230KPY HIPg== X-Gm-Message-State: AOJu0YxprilpeDswg16GdkS879wYNZdVlsJRznGA1vXOW0jvEyuJpT25 S83y0Tvyhk9tQIjM72nFwrXEAW3eFoeFusRZTNjlR0JVyaE8rKU1yFwe4znlKdp9T3tHXeD3pgG dnrA= X-Received: by 2002:a05:6122:220d:b0:4c8:90e5:6792 with SMTP id bb13-20020a056122220d00b004c890e56792mr3806749vkb.7.1709676591258; Tue, 05 Mar 2024 14:09:51 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.193]) by smtp.gmail.com with ESMTPSA id m11-20020ac807cb000000b0042e6be98dbasm2997038qth.31.2024.03.05.14.09.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 14:09:50 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Markus Armbruster , Paolo Bonzini , Beraldo Leal , Eric Blake , Marcel Apfelbaum , =?utf-8?q?Alex_Benn=C3=A9e?= , Eduardo Habkost , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Manos Pitsidianakis , Wainer dos Santos Moschetta , Michael Tokarev , Yanan Wang , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 1/2] meson: Make qemu-system binary installation optional Date: Tue, 5 Mar 2024 23:09:37 +0100 Message-ID: <20240305220938.85410-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305220938.85410-1-philmd@linaro.org> References: <20240305220938.85410-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::935; envelope-from=philmd@linaro.org; helo=mail-ua1-x935.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org In order to allow qemu-system binaries to not be installed by default, add the 'install' key to target dictionaries in the execs[] array. Keep the current default: all binaries are installed. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index c59ca496f2..51b995f4c7 100644 --- a/meson.build +++ b/meson.build @@ -3913,14 +3913,16 @@ foreach target : target_dirs 'name': 'qemu-system-' + target_name, 'win_subsystem': 'console', 'sources': files('system/main.c'), - 'dependencies': [] + 'dependencies': [], + 'install': true }] if host_os == 'windows' and (sdl.found() or gtk.found()) execs += [{ 'name': 'qemu-system-' + target_name + 'w', 'win_subsystem': 'windows', 'sources': files('system/main.c'), - 'dependencies': [] + 'dependencies': [], + 'install': true }] endif if get_option('fuzzing') @@ -3930,6 +3932,7 @@ foreach target : target_dirs 'win_subsystem': 'console', 'sources': specific_fuzz.sources(), 'dependencies': specific_fuzz.dependencies(), + 'install': true }] endif else @@ -3937,7 +3940,8 @@ foreach target : target_dirs 'name': 'qemu-' + target_name, 'win_subsystem': 'console', 'sources': [], - 'dependencies': [] + 'dependencies': [], + 'install': true }] endif foreach exe: execs @@ -3947,7 +3951,7 @@ foreach target : target_dirs endif emulator = executable(exe_name, exe['sources'], - install: true, + install: exe['install'], c_args: c_args, dependencies: arch_deps + deps + exe['dependencies'], objects: lib.extract_all_objects(recursive: true), From patchwork Tue Mar 5 22:09:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 778056 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:47:b0:33e:474f:8c56 with SMTP id k7csp13561wrx; Tue, 5 Mar 2024 14:11:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVMUX7wJNHvP3v14weQMUEgcS8Pvpp0rsWTozrzH2slqJ8rSH3MMymAKWsYWvVQR1JCXmJyqqRTWnbiyo7reqvv X-Google-Smtp-Source: AGHT+IFtZAzeHGyp12K5x+6IvGIdx8CgDt+VDEpgC8JKOI5GujOv/enL6IclM4nvnT64/bnSuzMl X-Received: by 2002:a05:6358:78a:b0:17b:b830:2809 with SMTP id n10-20020a056358078a00b0017bb8302809mr3475611rwj.19.1709676661435; Tue, 05 Mar 2024 14:11:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709676661; cv=none; d=google.com; s=arc-20160816; b=ixzffnQuQKAbP5WCIpj1q31Bmu9vEuNeKdjqh3WWT3dEKwrmGM+wnIoq2UAq179cTe xheFnfNhac/V4Eqm13Ye19mK6teU2Pm9abH5D71ds8UjIc/noDDxl/3eOdk/VPc6zZZf TsK8zbBY7e0Koamrwy3n6jrcgcYmzYlWs3Q1qJz+UbZEFRvgO4tyLYjEgQGrImUb0p/p pL+mQqfvu1G0Z8vJYW4Y5cbU4csVnVUljkdpTL0JZjQbqw7qwupi0DamlZ1X9BBxYnWR /SnCnVrd31FoKa4F18sAeVFZIypTZGXeYAivUbiSoLWGl5zstFIa6HP/yYifUbYpLBvI 5Bzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=21zKJQxHw+9tb6jPZxlDkMDIp2DGhnFvj5Ft9MckQvg=; fh=V7WKNKSxDbw90nP5cRgBaHhdh9Wcgzg05Z0/9UKDXak=; b=NwQ9PbZRonyH+3EGciAc/L7uSigiXkz3+/8FusK6qkYWOorINRX4mWKS7c/cfZIoMU DyQT9YwuFWuoY4e/bvm3i3//BgKw8bfDPpJjILM2XDoTnHpU6l9fSkaftT6EYGTURGqL ls5JkA77tJjAihx9EgE2iakoEaF5ES3eW4KslNlwBuPP2kWfCo+soFkPkmlDkTmuOVCM kOZz7vOfzMEWDv16Vm0+TdBgjf3eq6nb8U+FrolQrPK0U6o8G7k5V96nXavPLwhcXQ3A N0GDIlLPlZaapkNy+jsIggoAVysY+B7gGtStVxyzxCX/wWLTTkWHyxpVYh9MNVRfCSY4 h5Uw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OE7ATzcd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s4-20020a0562140ca400b006904cabbb7bsi12538938qvs.26.2024.03.05.14.11.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Mar 2024 14:11:01 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OE7ATzcd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhczA-0007CA-Ev; Tue, 05 Mar 2024 17:10:08 -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 1rhcz8-0007BA-HL for qemu-devel@nongnu.org; Tue, 05 Mar 2024 17:10:06 -0500 Received: from mail-il1-x131.google.com ([2607:f8b0:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rhcz5-0000ks-9r for qemu-devel@nongnu.org; Tue, 05 Mar 2024 17:10:06 -0500 Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-365337ad3e7so21022135ab.0 for ; Tue, 05 Mar 2024 14:10:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709676602; x=1710281402; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=21zKJQxHw+9tb6jPZxlDkMDIp2DGhnFvj5Ft9MckQvg=; b=OE7ATzcd+cEjryfuaB67UBdRZbqdC3pxd1nA3SOPhosiNJIN0POs7tk5ftFCvf9d7n j2MMppeStW5OmDUjhESEkfJ+VlFhi4itsr1u9+nYyffx9M3O27Dn1OQG+BcHADI7kO/z N/nfUXuql+IM/BZucELtPW0P5T2+C/4iCJhbMD01gmIYOYAEA+59PK6O0I1bOYI7Ydy8 m0CD+5z5wohD5u+dKv7zCv0ZEsWr/AM9LjWerfvBnO3EbYJmndtGAoq2seO7IA4dlBHS 8ybErdNC8M4lLoi9/aWxjVzaZsnm7q8lCno/U8m4wMvRQM1dXHmk7DgYfSZhSv3qDCSo OuqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709676602; x=1710281402; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=21zKJQxHw+9tb6jPZxlDkMDIp2DGhnFvj5Ft9MckQvg=; b=RL1G16jO6NH/PY9abA4tePCTpXq275sxFJB1PffYrHiwnsgifVmThPvjc4kY+8H6We GeRHbCwzjQhdUOzKeP4HalpOQ2Zq1OHy5mtxTN9vpF+doVSWP7vwG2ZZLatttQCK2SZm b0WFrkO0u+Ioq6oF599Vd5dD85sZvYgqS1JEUfz4xGu38aPb7OnXOIFnAQJ80SmZGT43 avrpFRD1DYLO8/L/mKSI9vzXds39OPiccEfnm4XoP/sZuPPZ0cWZfHyAzIJoXgcI2ZqP bfJEiAtOnjob1fmRiZdW6tpIOde75yI4ZbRDXaT+zORqn8rv+cT9fZncR6cHgcOSfEyv LWdw== X-Gm-Message-State: AOJu0YxB5GtYVTCRWnrl6JRp85loCfJ7QN1YmjagxfhjzVRGTowQkMbg quqO29XASfVRb4oI6lyhVnm8TljMfpfVG4zMTVlz6FcUAnAXoKt4KGOsY1ocsxmBLQCyH9yjmGp ah1o= X-Received: by 2002:a05:6e02:17c5:b0:365:27ef:23d3 with SMTP id z5-20020a056e0217c500b0036527ef23d3mr18599007ilu.20.1709676601483; Tue, 05 Mar 2024 14:10:01 -0800 (PST) Received: from m1x-phil.lan ([176.187.210.193]) by smtp.gmail.com with ESMTPSA id l15-20020a056e021aaf00b0036426373792sm3267112ilv.87.2024.03.05.14.09.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Mar 2024 14:10:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Markus Armbruster , Paolo Bonzini , Beraldo Leal , Eric Blake , Marcel Apfelbaum , =?utf-8?q?Alex_Benn=C3=A9e?= , Eduardo Habkost , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Manos Pitsidianakis , Wainer dos Santos Moschetta , Michael Tokarev , Yanan Wang , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v4 2/2] target: Add system emulation aiming to target any architecture Date: Tue, 5 Mar 2024 23:09:38 +0100 Message-ID: <20240305220938.85410-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240305220938.85410-1-philmd@linaro.org> References: <20240305220938.85410-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::131; envelope-from=philmd@linaro.org; helo=mail-il1-x131.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Add the 'any'-architecture target. - Only consider 64-bit targets - Do not use any hardware accelerator (except qtest) - For architecture constants, use: . max of supported targets phys/virt address space . max of supported targets MMU modes . min of supported targets variable page bits Since this is an experiment, the binary is named 'x-qemu-system-🚧', and won't be installed. Build as: $ ../configure --target-list=any-softmmu \ --disable-hvf \ --disable-kvm \ --disable-nvmm \ --disable-tcg \ --disable-whpx \ --disable-xen \ --enable-experimental-system-binary-that-may-break-dont-do-this-distros Test as: $ ./x-qemu-system-🚧 -M none,accel=qtest -monitor stdio QEMU 6.2.50 monitor - type 'help' for more information (qemu) info mtree address-space: I/O 0000000000000000-000000000000ffff (prio 0, i/o): io address-space: memory 0000000000000000-ffffffffffffffff (prio 0, i/o): system (qemu) info qom-tree /machine (none-machine) /peripheral (container) /peripheral-anon (container) /unattached (container) /io[0] (memory-region) /sysbus (System) /system[0] (memory-region) (qemu) info qtree bus: main-system-bus type System (qemu) info cpus (qemu) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Signed-off-by: Philippe Mathieu-Daudé --- configure | 6 ++++++ configs/devices/any-softmmu/default.mak | 9 +++++++++ configs/targets/any-softmmu.mak | 3 +++ meson.build | 15 +++++++++++---- qapi/machine.json | 2 +- include/sysemu/arch_init.h | 1 + target/any/cpu-param.h | 13 +++++++++++++ target/any/cpu-qom.h | 12 ++++++++++++ target/any/cpu.h | 24 ++++++++++++++++++++++++ .gitlab-ci.d/buildtest.yml | 21 +++++++++++++++++++++ hw/any/meson.build | 5 +++++ hw/meson.build | 1 + meson_options.txt | 3 +++ scripts/meson-buildoptions.sh | 5 +++++ target/Kconfig | 1 + target/any/Kconfig | 4 ++++ target/any/meson.build | 7 +++++++ target/meson.build | 1 + tests/qtest/meson.build | 6 +++++- 19 files changed, 133 insertions(+), 6 deletions(-) create mode 100644 configs/devices/any-softmmu/default.mak create mode 100644 configs/targets/any-softmmu.mak create mode 100644 target/any/cpu-param.h create mode 100644 target/any/cpu-qom.h create mode 100644 target/any/cpu.h create mode 100644 hw/any/meson.build create mode 100644 target/any/Kconfig create mode 100644 target/any/meson.build diff --git a/configure b/configure index 3cd736b139..57f6c7038b 100755 --- a/configure +++ b/configure @@ -194,6 +194,7 @@ EXTRA_LDFLAGS="" # Distributions want to ensure that several features are compiled in, and it # is impossible without a --enable-foo that exits if a feature is not found. default_feature="" +target_system_any="" for opt do optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)') @@ -693,6 +694,8 @@ for opt do ;; --without-default-features) # processed above ;; + --enable-experimental-system-binary-that-may-break-dont-do-this-distros) target_system_any="yes" + ;; --static) static="yes" ;; --host=*|--build=*|\ @@ -834,6 +837,9 @@ fi for config in $mak_wilds; do target="$(basename "$config" .mak)" + if [ "$target" = any-softmmu ] && [ "$target_system_any" != yes ]; then + continue + fi if echo "$target_list_exclude" | grep -vq "$target"; then default_target_list="${default_target_list} $target" fi diff --git a/configs/devices/any-softmmu/default.mak b/configs/devices/any-softmmu/default.mak new file mode 100644 index 0000000000..dab0ce770e --- /dev/null +++ b/configs/devices/any-softmmu/default.mak @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +CONFIG_ISA_BUS=y +CONFIG_PCI=y +CONFIG_PCI_DEVICES=y +CONFIG_I2C=y +CONFIG_TPM=y +CONFIG_NUBUS=y +CONFIG_VIRTIO=y diff --git a/configs/targets/any-softmmu.mak b/configs/targets/any-softmmu.mak new file mode 100644 index 0000000000..2c6cf1edd4 --- /dev/null +++ b/configs/targets/any-softmmu.mak @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +TARGET_ARCH=any diff --git a/meson.build b/meson.build index 51b995f4c7..a4fe9f23d0 100644 --- a/meson.build +++ b/meson.build @@ -3051,7 +3051,9 @@ foreach target : target_dirs if default_targets continue endif - error('No accelerator available for target @0@'.format(target)) + if 'any-softmmu' not in target_dirs + error('No accelerator available for target @0@'.format(target)) + endif endif actual_target_dirs += target @@ -3909,16 +3911,21 @@ foreach target : target_dirs name_suffix: 'fa') if target.endswith('-softmmu') + if target_name == 'any' + qemu_system_name = 'x-qemu-system-🚧' + else + qemu_system_name = 'qemu-system-' + target_name + endif execs = [{ - 'name': 'qemu-system-' + target_name, + 'name': qemu_system_name, 'win_subsystem': 'console', 'sources': files('system/main.c'), 'dependencies': [], - 'install': true + 'install': target_name != 'any' }] if host_os == 'windows' and (sdl.found() or gtk.found()) execs += [{ - 'name': 'qemu-system-' + target_name + 'w', + 'name': qemu_system_name + 'w', 'win_subsystem': 'windows', 'sources': files('system/main.c'), 'dependencies': [], diff --git a/qapi/machine.json b/qapi/machine.json index bb5a178909..970aac2364 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -36,7 +36,7 @@ 'mips64el', 'mipsel', 'nios2', 'or1k', 'ppc', 'ppc64', 'riscv32', 'riscv64', 'rx', 's390x', 'sh4', 'sh4eb', 'sparc', 'sparc64', 'tricore', - 'x86_64', 'xtensa', 'xtensaeb' ] } + 'x86_64', 'xtensa', 'xtensaeb', 'any' ] } ## # @CpuS390State: diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h index 8850cb1a14..49bee75610 100644 --- a/include/sysemu/arch_init.h +++ b/include/sysemu/arch_init.h @@ -4,6 +4,7 @@ enum { QEMU_ARCH_ALL = -1, + QEMU_ARCH_ANY = -1, QEMU_ARCH_ALPHA = (1 << 0), QEMU_ARCH_ARM = (1 << 1), QEMU_ARCH_CRIS = (1 << 2), diff --git a/target/any/cpu-param.h b/target/any/cpu-param.h new file mode 100644 index 0000000000..42e38ae991 --- /dev/null +++ b/target/any/cpu-param.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef ANY_CPU_PARAM_H +#define ANY_CPU_PARAM_H + +#define TARGET_LONG_BITS 64 + +#define TARGET_PHYS_ADDR_SPACE_BITS 64 /* MAX(targets) */ +#define TARGET_VIRT_ADDR_SPACE_BITS 64 /* MAX(targets) */ + +#define TARGET_PAGE_BITS_VARY +#define TARGET_PAGE_BITS_MIN 10 /* MIN(targets)=ARMv5/ARMv6, ignoring AVR */ + +#endif diff --git a/target/any/cpu-qom.h b/target/any/cpu-qom.h new file mode 100644 index 0000000000..18d6a85de9 --- /dev/null +++ b/target/any/cpu-qom.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef QEMU_DUMMY_CPU_QOM_H +#define QEMU_DUMMY_CPU_QOM_H + +#include "hw/core/cpu.h" +#include "qom/object.h" + +#define TYPE_DUMMY_CPU "dummy-cpu" + +OBJECT_DECLARE_CPU_TYPE(DUMMYCPU, CPUClass, DUMMY_CPU) + +#endif diff --git a/target/any/cpu.h b/target/any/cpu.h new file mode 100644 index 0000000000..e8abb8891f --- /dev/null +++ b/target/any/cpu.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef TARGET_ANY_CPU_H +#define TARGET_ANY_CPU_H + +#include "cpu-qom.h" +#include "exec/cpu-defs.h" + +#define DUMMY_CPU_TYPE_SUFFIX "-" TYPE_DUMMY_CPU +#define DUMMY_CPU_TYPE_NAME(name) (name DUMMY_CPU_TYPE_SUFFIX) +#define CPU_RESOLVING_TYPE TYPE_DUMMY_CPU + +struct CPUArchState { + /* nothing here */ +}; + +struct ArchCPU { + CPUState parent_obj; + + CPUArchState env; +}; + +#include "exec/cpu-all.h" /* FIXME remove once exec/ headers cleaned */ + +#endif diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index a1c030337b..493a868bfc 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -729,3 +729,24 @@ pages: - public variables: QEMU_JOB_PUBLISH: 1 + +build-system-any: + extends: + - .native_build_job_template + needs: + - job: amd64-alpine-container + variables: + IMAGE: alpine + TARGETS: any-softmmu + MAKE_CHECK_ARGS: check-qtest + CONFIGURE_ARGS: + --disable-tools + --disable-hvf + --disable-kvm + --disable-nvmm + --disable-tcg + --disable-whpx + --disable-xen + --with-default-devices + --enable-qom-cast-debug + --enable-experimental-system-binary-that-may-break-dont-do-this-distros diff --git a/hw/any/meson.build b/hw/any/meson.build new file mode 100644 index 0000000000..60e1567e53 --- /dev/null +++ b/hw/any/meson.build @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +any_ss = ss.source_set() + +hw_arch += {'any': any_ss} diff --git a/hw/meson.build b/hw/meson.build index 463d702683..644eeee938 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -47,6 +47,7 @@ subdir('xenpv') subdir('fsi') subdir('alpha') +subdir('any') subdir('arm') subdir('avr') subdir('cris') diff --git a/meson_options.txt b/meson_options.txt index 0a99a059ec..afae66ad1c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -368,3 +368,6 @@ option('qemu_ga_version', type: 'string', value: '', option('hexagon_idef_parser', type : 'boolean', value : true, description: 'use idef-parser to automatically generate TCG code for the Hexagon frontend') + +option('experimental-system-binary-that-may-break-dont-do-this-distros', type : 'boolean', value : false, + description: 'build experimental qemu-system-any binary with no particular target architecture') diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 680fa3f581..85f5aec267 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -32,6 +32,9 @@ meson_options_help() { printf "%s\n" ' --enable-debug-stack-usage' printf "%s\n" ' measure coroutine stack usage' printf "%s\n" ' --enable-debug-tcg TCG debugging' + printf "%s\n" ' --enable-experimental-system-binary-that-may-break-dont-do-this-distros' + printf "%s\n" ' build experimental qemu-system-any binary with no' + printf "%s\n" ' particular target architecture' printf "%s\n" ' --enable-fdt[=CHOICE] Whether and how to find the libfdt library' printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)' printf "%s\n" ' --enable-fuzzing build fuzzing targets' @@ -306,6 +309,8 @@ _meson_option_parse() { --disable-docs) printf "%s" -Ddocs=disabled ;; --enable-dsound) printf "%s" -Ddsound=enabled ;; --disable-dsound) printf "%s" -Ddsound=disabled ;; + --enable-experimental-system-binary-that-may-break-dont-do-this-distros) printf "%s" -Dexperimental-system-binary-that-may-break-dont-do-this-distros=true ;; + --disable-experimental-system-binary-that-may-break-dont-do-this-distros) printf "%s" -Dexperimental-system-binary-that-may-break-dont-do-this-distros=false ;; --enable-fdt) printf "%s" -Dfdt=enabled ;; --disable-fdt) printf "%s" -Dfdt=disabled ;; --enable-fdt=*) quote_sh "-Dfdt=$2" ;; diff --git a/target/Kconfig b/target/Kconfig index 83da0bd293..09109c4884 100644 --- a/target/Kconfig +++ b/target/Kconfig @@ -1,4 +1,5 @@ source alpha/Kconfig +source any/Kconfig source arm/Kconfig source avr/Kconfig source cris/Kconfig diff --git a/target/any/Kconfig b/target/any/Kconfig new file mode 100644 index 0000000000..8840d70e55 --- /dev/null +++ b/target/any/Kconfig @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +config ANY + bool diff --git a/target/any/meson.build b/target/any/meson.build new file mode 100644 index 0000000000..4f5422d3a3 --- /dev/null +++ b/target/any/meson.build @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +any_ss = ss.source_set() +any_system_ss = ss.source_set() + +target_arch += {'any': any_ss} +target_system_arch += {'any': any_system_ss} diff --git a/target/meson.build b/target/meson.build index dee2ac47e0..c75b91e1b9 100644 --- a/target/meson.build +++ b/target/meson.build @@ -1,4 +1,5 @@ subdir('alpha') +subdir('any') subdir('arm') subdir('avr') subdir('cris') diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 6ea77893f5..e302d4153e 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -355,7 +355,11 @@ foreach dir : target_dirs endif target_base = dir.split('-')[0] - qtest_emulator = emulators['qemu-system-' + target_base] + if target_base == 'any' + qtest_emulator = emulators['x-qemu-system-🚧'] + else + qtest_emulator = emulators['qemu-system-' + target_base] + endif target_qtests = get_variable('qtests_' + target_base, []) + qtests_generic test_deps = roms