From patchwork Fri Oct 20 16:36:28 2023 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: 736266 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp401065wrl; Fri, 20 Oct 2023 09:40:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDIomjikuRxkcsd8yzkbJ4FjHgrYI/GlL3haVL1JbiqDQezYbabPj7EPnA7LHwbLYuG04d X-Received: by 2002:ac8:5b86:0:b0:418:178d:a10f with SMTP id a6-20020ac85b86000000b00418178da10fmr2757371qta.29.1697820036386; Fri, 20 Oct 2023 09:40:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697820036; cv=none; d=google.com; s=arc-20160816; b=Fuj/9hv4enkUE3zaq29HyS4m7Y25X5KroQ8DlGGJKomp4p4Arlo0StR0aiUkLL2c17 Ky9G+BLGUM4ywHb6SZQSyBWcXM+oySMvVTQLMYN06700J1SOl9TcYU9+Jj69JKOul0We 8AhWnvfld0lz7egEQOlhu9hvOByRZBEM1uBvLwQ/dC71br8Zwtl189cGNbppl7x/g44c p4+iUYBsYq8/tIb7fLkoaEQZbvo2sKSaSKsF+28+eblsISPV4RoD4/JEQOAnGWllo5vq wEPV6OfjNSYzcigKMZRoTrCtQy8wekJ59vyusu9uxdg3ZqY0NgCVaPSwe8o0x5OEbwIA VP3A== 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=Z4zSU56YOB/kPm9j9X/WOBopNqbVDhMN21ij6wb+YZU=; fh=oZ6L1yuWB6YDZmAcQyPUwD6mml29vQS2pd5Tujn9RoI=; b=DeRBXeYmEcV0T4jNlyP2VMEPpvNJyuq6EtDybI2JWEHSN2OMu0+Px9/52I94S9uoYZ 3FOC3JEMfhEwvMd17CQabAfNh4e9F0gKE315AYteu8xAX9jJSONb2Y6swsGO+DLxJoPu 2BysEPcArlirBTFqKuHaLtdxBxv0KkaDgzk2gLN1lytWei5n3zrokVW3KfEyMMqTJdPU /v7rXGMDqu3uHFq58Hz2MgdZYF0BLSBe9EJA3EWkmCF0OsfTnin/u5wrcz3srLWz4zaH O5e7DjAC9Wdb9AW2A57pqhdNZhlo6PGbKhvT38J7nNSxc+9THKsghA/nI5CwxTtHLO7O abeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nC4nxVkm; 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 h12-20020ac87d4c000000b004164a723a70si1627377qtb.212.2023.10.20.09.40.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2023 09:40:36 -0700 (PDT) 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=nC4nxVkm; 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 1qtsVe-0003eZ-NP; Fri, 20 Oct 2023 12:38:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtsVK-0003C5-Mq for qemu-devel@nongnu.org; Fri, 20 Oct 2023 12:37:47 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtsVG-0002UN-JX for qemu-devel@nongnu.org; Fri, 20 Oct 2023 12:37:41 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-9bf86b77a2aso158840866b.0 for ; Fri, 20 Oct 2023 09:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697819856; x=1698424656; 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=Z4zSU56YOB/kPm9j9X/WOBopNqbVDhMN21ij6wb+YZU=; b=nC4nxVkmIUF/RiOdg6XFUMMai707JJJLRu29GsLiUhzMoFyb6cAJw6nm7Cf3yCufYm WhzpuAaZt9mIRI0gCuL2fUUS4YTOfhbzsbiFRLB9WcYVkFUS5xILE7B0a84c3EN+f4tI GdEvnwtrhqkCo9EoJj6z3jeZCxVWbnlzmtV/8jG8cVzAKQ4IjmnZeymAY1FngTq1qyOY x0qLHD1If9ePbPnXv3735cHjl/ol+iigzDXGKqxAUtns0+GD2Iuvs7X3zuD+V8bopvBc sF7tvQQGJOqgsL9/7DG6CO3CMO7IvuSdIimez9Hw0XiCktpZSHuoR0c5NdnOy2i6T49j umCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697819856; x=1698424656; 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=Z4zSU56YOB/kPm9j9X/WOBopNqbVDhMN21ij6wb+YZU=; b=AzJGrwdVpBFCYvweXKkkD1j5e+ikALBOTcz0l68TxATr03gPIOkrs4Lj088tOhUuN5 JiFV2b+ybQXE1kmgXcDcid4IrgdwbP3FvC1OZkqyTCqRn0Ewh2SXwpVZaej5rHS3Cin/ huVYbUwCrUQceMv94CKzV5E+tsIkfjlb8mrofH6sxBLS54Lyz+Xb+Z3CBRNRwHGicR4/ uG8zUGQEmAEuw8XwoIydIzbQTFKDhn//35oZe8upOhED3SVvuAnK6TtbMucCU6S5bdLB WDpbZ1e+7+c4aDuVVYD6Y0DfcDFDzJklWdXyyz/9UpJM4V/koUXN/YJ8K/zMx36gwJoo +uWw== X-Gm-Message-State: AOJu0YxJ0OXPBxMtFOXUX3fHY+nHC0DTI9oIvHDdxFxO42yYZD6dRBtY mYBdLPk+C91MTUtLs96SMphyODziijoPVbblB98= X-Received: by 2002:a17:907:97c2:b0:9c5:45f8:c529 with SMTP id js2-20020a17090797c200b009c545f8c529mr1549786ejc.20.1697819855974; Fri, 20 Oct 2023 09:37:35 -0700 (PDT) Received: from m1x-phil.lan (tbo33-h01-176-171-212-97.dsl.sta.abo.bbox.fr. [176.171.212.97]) by smtp.gmail.com with ESMTPSA id z15-20020a17090655cf00b0099bc038eb2bsm1782737ejp.58.2023.10.20.09.37.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Oct 2023 09:37:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Richard Henderson , Paolo Bonzini , Alistair Francis , qemu-arm@nongnu.org, qemu-riscv@nongnu.org, "Edgar E. Iglesias" , qemu-ppc@nongnu.org, Eduardo Habkost , "Michael S. Tsirkin" , qemu-s390x@nongnu.org, Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , Zhao Liu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Christian Borntraeger , Halil Pasic , Eric Farman , David Hildenbrand , Ilya Leoshkevich Subject: [PATCH 06/19] cpus: Filter for target specific CPU (s390x) Date: Fri, 20 Oct 2023 18:36:28 +0200 Message-ID: <20231020163643.86105-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231020163643.86105-1-philmd@linaro.org> References: <20231020163643.86105-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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 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: 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 Enforce qemu_get_cpu() to return S390X CPUs in S390X specific files. Mechanical change using the following coccinelle script: @@ expression index; @@ - qemu_get_cpu(index, NULL) + qemu_get_cpu(index, TYPE_S390_CPU) Signed-off-by: Philippe Mathieu-Daudé --- hw/s390x/ipl.c | 2 +- hw/s390x/s390-virtio-ccw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 14cd0a1f7b..377f43416c 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -671,7 +671,7 @@ void s390_ipl_get_reset_request(CPUState **cs, enum s390_reset *reset_type) { S390IPLState *ipl = get_ipl_device(); - *cs = qemu_get_cpu(ipl->reset_cpu_index, NULL); + *cs = qemu_get_cpu(ipl->reset_cpu_index, TYPE_S390_CPU); if (!*cs) { /* use any CPU */ *cs = first_cpu; diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 7628b746a8..3bb4b13c5e 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -583,7 +583,7 @@ static HotplugHandler *s390_get_hotplug_handler(MachineState *machine, static void s390_nmi(NMIState *n, int cpu_index, Error **errp) { - CPUState *cs = qemu_get_cpu(cpu_index, NULL); + CPUState *cs = qemu_get_cpu(cpu_index, TYPE_S390_CPU); s390_cpu_restart(S390_CPU(cs)); }