{"id":2196397,"url":"http://patchwork.ozlabs.org/api/1.0/covers/2196397/?format=json","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.0/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260213175032.32121-1-philmd@linaro.org>","date":"2026-02-13T17:50:27","name":"[v4,0/5] system: Make qemu_arch_available() common code","submitter":{"id":85046,"url":"http://patchwork.ozlabs.org/api/1.0/people/85046/?format=json","name":"Philippe Mathieu-Daudé","email":"philmd@linaro.org"},"series":[{"id":492127,"url":"http://patchwork.ozlabs.org/api/1.0/series/492127/?format=json","date":"2026-02-13T17:50:27","name":"system: Make qemu_arch_available() common code","version":4,"mbox":"http://patchwork.ozlabs.org/series/492127/mbox/"}],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=QM2Gabh7;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fCKVL1QhMz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 04:51:36 +1100 (AEDT)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vqxJQ-0006IL-FX; Fri, 13 Feb 2026 12:50:40 -0500","from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1vqxJO-0006Hk-Sc\n for qemu-devel@nongnu.org; Fri, 13 Feb 2026 12:50:38 -0500","from mail-wm1-x332.google.com ([2a00:1450:4864:20::332])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1vqxJN-00065j-Dg\n for qemu-devel@nongnu.org; Fri, 13 Feb 2026 12:50:38 -0500","by mail-wm1-x332.google.com with SMTP id\n 5b1f17b1804b1-4806e0f6b69so9651085e9.3\n for <qemu-devel@nongnu.org>; Fri, 13 Feb 2026 09:50:36 -0800 (PST)","from localhost.localdomain (88-187-86-199.subs.proxad.net.\n [88.187.86.199]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-4835dcfafcdsm359844685e9.9.2026.02.13.09.50.33\n (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);\n Fri, 13 Feb 2026 09:50:34 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1771005035; x=1771609835; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=5AlmTMgCyk+2AUmH7VML5lKoAxWR5LTdLAyVu7t5Yig=;\n b=QM2Gabh7zrL0VslcafAOUah+dxybF7wLof/bjvn6BZ6lLDZDu7ZOJAY4Imj/YRApTm\n ulkfkYAm0ZwIixEJGo0TdtLLP/2VeG9zqv0QEbDVL6OCLnDJAo6KUgl6efq+zP8tXiZ2\n ArGYglFsFpReRZTrCibMbi5pLNlyq/+oUoArLqp0jhcUeAbGTsjeRozyTPX8EY5/K8DE\n nGhmUvdEpL7CY0ape2cFJuKjM/uNzHVit37m09Jd8eimHmZZ0dRtY31m9KLaQJZt5x9T\n a1zjBReIsH3nq/1arv8FhNyK0GPfLgMgQHHdtJMk2tPUc+8FnpQ+Nt0Q7ADKGqUqvCF0\n WZuw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771005035; x=1771609835;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=5AlmTMgCyk+2AUmH7VML5lKoAxWR5LTdLAyVu7t5Yig=;\n b=B2aWJcFIY0Br3UvH9IoHm9nXpdXq+pOg4NzEyGEuoSJZl2tDY89nOnp9VUCN8N1uXL\n Vw9rF/67kWErcfZj4nTmiXRVINxAVTG20sHGiDNVphOnrw3hXaRPkp6XnfsN/oTdi6Hx\n B5ojxt/BUyBOrpDkKgzNkVnuyXUgzSUJUk0y647LS1mYNlJX4aSqoaqVNtrJvFi2E78F\n KFJ1RCdalpr6FyMqxqwPD9Ob3rrcpDQN4y1aLbPndDm+7y4NMYHHhFWXyFWDCHSpbqqh\n P8GFWEchLH1yLniYpRScy0JH9GIDtdHJOgop7WT789t73YI2wAon07S8GGR+V+IYFnhn\n X+cA==","X-Gm-Message-State":"AOJu0YwSBJ21ZyGFGb04Kt6+ohp08/bpv4oq1WmfdFQUQsoFnkellMKD\n U1EgwzzkBOOXvmWP2nNIXoFTG6ndh+3mEafv18a9vvDOyFi9GeW00vGnnBdzknDzt9U7hrbOgsP\n 3SGsY8U4=","X-Gm-Gg":"AZuq6aI6guSwE6kQUgnTmRBjGrWV/QAPbRm5GEus8PyD0RhQaxeWU7FEOEq+eXMGsio\n A+vNEaVpoSJCw45AtWNzL6hsOOQGHUO9l7SRnxlVgKvqEf1L/mOhdRQLaA10xXxhiCcB3k7+UET\n QgydFCl7v+zvb3USTCsox+Y5gcc1EMALXJQXfGjpdvfFSf541xdBGzdZVVRE3BLe6fA+uqPcm6p\n D3Xv+8oBfA7bL0fVhPbAUJt6wcerwj1lIyil9JrpaOS3aCtMjtxrqJBflyRATJH0Ib92URhbeg/\n yW34CR3/RcKUNyv2vDi7KGR5+TWctUpjL7juFqzqtIqpniicc8o3jEfb8EGZ75K79Bc316uJpBR\n 3q1PxepRJLh2jVmsxMVU4OjtBNXvz9ohj6bXax9j++VX3ikoKudXtJWdJ5CNhl5MYq/6QSkzDWF\n OR4s7m+Va0JMD+jnDFNUt9jyLcN92lEUQvfmm+YYX+PBHpFgwkLNxmwQOz7RRPSkWJaOqAda/Q","X-Received":"by 2002:a05:600c:c16b:b0:47e:e20e:bb9c with SMTP id\n 5b1f17b1804b1-48371042fb1mr57129795e9.8.1771005034699;\n Fri, 13 Feb 2026 09:50:34 -0800 (PST)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>","To":"qemu-devel@nongnu.org","Cc":"Markus Armbruster <armbru@redhat.com>, qemu-s390x@nongnu.org,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>, Fam Zheng <fam@euphon.net>,\n\t=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n\t=?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>,\n Thomas Huth <thuth@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>,\n\t=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Manos Pitsidianakis <manos.pitsidianakis@linaro.org>","Subject":"[PATCH v4 0/5] system: Make qemu_arch_available() common code","Date":"Fri, 13 Feb 2026 18:50:27 +0100","Message-ID":"<20260213175032.32121-1-philmd@linaro.org>","X-Mailer":"git-send-email 2.52.0","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"8bit","Received-SPF":"pass client-ip=2a00:1450:4864:20::332;\n envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no","X-Spam_action":"no action","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"qemu development <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"- Avoid qemu_arch_available() in hw/\n- Document qemu_arch_available(),\n- define QEMU_ARCH_* based on SYS_EMU_TARGET_*, allowing\n  (via with TargetInfo API) to compile arch_init.c as common,\n- restrict qemu_arch_available() scope to system/ sub-directory.\n\n---\nv4: New approach\nv3: Return directly within switch\nv2: Prefer switch over array (pbo)\n\nPhilippe Mathieu-Daudé (5):\n  qemu: Document qemu_arch_available() method\n  qemu/target_info: Add target_s390x() helper\n  hw/scsi/disk: Prefer target_s390x() over qemu_arch_available()\n  system: Make qemu_arch_available() common code\n  system: Reduce 'arch_init.h' scope\n\n meson.build                |  2 --\n include/qemu/target-info.h |  7 ++++++\n include/system/arch_init.h | 30 -----------------------\n system/arch_init.h         | 50 ++++++++++++++++++++++++++++++++++++++\n hw/scsi/scsi-disk.c        |  4 +--\n system/arch_init.c         |  6 +++--\n target-info.c              |  5 ++++\n system/meson.build         |  2 +-\n 8 files changed, 69 insertions(+), 37 deletions(-)\n delete mode 100644 include/system/arch_init.h\n create mode 100644 system/arch_init.h"}