From patchwork Mon Nov 6 11:44:56 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: 741387 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1039388wrr; Mon, 6 Nov 2023 03:51:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IH55WkZUT+qdIbIgw+qf/RMpOrpvJV/PXADRybr9oeJxtm4yW/k+Kxa6OH9AbLprBoGVKLY X-Received: by 2002:a05:6214:1c4e:b0:66d:303a:46bd with SMTP id if14-20020a0562141c4e00b0066d303a46bdmr15836117qvb.13.1699271463856; Mon, 06 Nov 2023 03:51:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699271463; cv=none; d=google.com; s=arc-20160816; b=zgH/EAzOIAvGF0qvsD+AFceV75XxRzvEf73ValYjUM7GttSw14qzwBP6zBb41QARJS qwYH1YLgYehhSIKk/JkECq0R1f3NF/cF0itPEBJhtz2bFOOvreWLtjujcQz2q45NRA9g efrLPsZtt6QEy6hNO9C7ZjZRDAuDjNdJqsXACW3Cih0CM53Ue9FTVOMKkL2sG1xOYw9H aAsUNGoHhkq5LervvKWij5hjwv9+DBQDevGRc/h6f6QLYsT7w8qZyJkq7erhvwS1A71T Fl6IAqDoVZZlS+xizwYzGBYUbb4RqTAZz4hWXFMU8JAeWHH4LQkKpihApQoHK2d42I5g xBHg== 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=3BSoJuKuhPIWxgpUTzeGX41F+jrs7TllF1pZBmedgz0=; fh=iyPtDenH/bpJiwn6+MxCUj0FPuOI6mBlLIyfrvrbZlI=; b=xxZcvEgQ3zy/1cno26RsNWFuHxO5JZ9XRgQtb2SKFUfPs60mj9T+LizPaFiELtBBwO vepU3JXin3k2PShoH9RLPIxynxWDcsZbOh2CXIWT0yE0mQnBm3yo8RhgMM/YsA5nAulh Fh3H7AR0r8QG1Vu5jMzzMWCaDKQX8K+3pb9Rnj5YkbUDzLgMerQervIHI15IpJyOmN9o Kj6qKzp+NVwMMREl1YVvVWAdZJTOy9TWXI5Ct+inATmhaRsvTCKxT2ugKtukFUWVoYQG s/HFFu8lreWDDKEkVlsSiD9990phmIy9VghiEGaLEpmf1EbWnWesbSZskxBdJWl0Leno sXwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ub1lGlM4; 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 ea5-20020ad458a5000000b0064f3b7ec231si5446634qvb.131.2023.11.06.03.51.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 03:51:03 -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=Ub1lGlM4; 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 1qzy2q-0002DT-G8; Mon, 06 Nov 2023 06:45:28 -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 1qzy2g-00028B-8F for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:45:26 -0500 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzy2Z-00054Z-PB for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:45:17 -0500 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2c504a5e1deso58172221fa.2 for ; Mon, 06 Nov 2023 03:45:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699271110; x=1699875910; 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=3BSoJuKuhPIWxgpUTzeGX41F+jrs7TllF1pZBmedgz0=; b=Ub1lGlM4ODorIGIjx8RevfCn8HyeeKDnmnZaVYeGPO5lZdgpIVJbl07LJN/D3hfKAt q3T87X83eYH69iSvCwRGYAwkc/xmye6DX4fdUsPXe+9hAcJxhP55D7AfagP8beTHO8T9 /hT4MfGd51Rfal2kqdLOIOVw4p8ZOLG9NP1i63bV2+rTX3j0pM25kvMP/DDSvGPVxEhP ULS7vzZqSFErFzQEPQmtouW+nWc9g+92IS0RvcZfXG0LucJF18mdme23sICBms+x7gNK Ec2RBH8383KYbS7WzJFABCL6MzPbnnmccEBSI8xd3FeWQzDKv6LqSMOMESwo9eUzHnVt xqpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699271110; x=1699875910; 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=3BSoJuKuhPIWxgpUTzeGX41F+jrs7TllF1pZBmedgz0=; b=a3ZsTKG/uB3o2MzteRgf8MGO40KghdnGyfkP03bpQ7yVGqcnkWtIV9im2eCWDppu+6 ua6EqDqoBzcXC8XBBPIK2QL/1X2MC6Ola6S324TTHS9NlK1gRXZz1FO5l0pGKgcs6WXQ nWgWt90Hs47mduWpjbIFF9U2wQ6NnqP6APTEJC8OF/Ju7stNbKFQgyKbdAvgIStaMWeW uLrtMhoadq+3giDMxJpLc5yFW2+b8GtfOt9AlYNPBtL0fUmvOjvRLYTNmhI7KStNCuhC X4vAeU+fib6e2P1o2pwck3CzBPB4akEzmIxx1/hJpAB2ux+IcbkC1+Lx3O3hkwQpNSru Iq9g== X-Gm-Message-State: AOJu0YwGtKWfNhjE/j4uo+2HPciFX/FQ5pYAX6t4pbXNaiuO2CXAfbf6 s/2L1uL0ZsVPkRrKnljQl+xzcyV1XTb/yNYollQ= X-Received: by 2002:a2e:90d7:0:b0:2c6:ee98:de83 with SMTP id o23-20020a2e90d7000000b002c6ee98de83mr9595619ljg.46.1699271109768; Mon, 06 Nov 2023 03:45:09 -0800 (PST) Received: from m1x-phil.lan (176-131-220-199.abo.bbox.fr. [176.131.220.199]) by smtp.gmail.com with ESMTPSA id p6-20020a05600c358600b004053a6b8c41sm11790429wmq.12.2023.11.06.03.45.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 Nov 2023 03:45:09 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Thomas Huth , David Hildenbrand , Halil Pasic , Eric Farman , Christian Borntraeger , qemu-s390x@nongnu.org, Ilya Leoshkevich , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 1/4] hw/s390x/css: Have css_do_sic() take S390CPU instead of CPUS390XState Date: Mon, 6 Nov 2023 12:44:56 +0100 Message-ID: <20231106114500.5269-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231106114500.5269-1-philmd@linaro.org> References: <20231106114500.5269-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::233; envelope-from=philmd@linaro.org; helo=mail-lj1-x233.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=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 "hw/s390x/css.h" is a header used by target-agnostic objects (such hw/s390x/virtio-ccw-gpu.c), thus can not use target-specific types, such CPUS390XState. Have css_do_sic() take S390CPU a pointer, which is target-agnostic. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/s390x/css.h | 2 +- hw/s390x/css.c | 3 ++- target/s390x/kvm/kvm.c | 2 +- target/s390x/tcg/misc_helper.c | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h index 75e5381613..ba72ee3dd2 100644 --- a/include/hw/s390x/css.h +++ b/include/hw/s390x/css.h @@ -233,7 +233,7 @@ typedef enum { } CssIoAdapterType; void css_adapter_interrupt(CssIoAdapterType type, uint8_t isc); -int css_do_sic(CPUS390XState *env, uint8_t isc, uint16_t mode); +int css_do_sic(S390CPU *cpu, uint8_t isc, uint16_t mode); uint32_t css_get_adapter_id(CssIoAdapterType type, uint8_t isc); void css_register_io_adapters(CssIoAdapterType type, bool swap, bool maskable, uint8_t flags, Error **errp); diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 95d1b3a3ce..bcedec2fc8 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -644,8 +644,9 @@ void css_conditional_io_interrupt(SubchDev *sch) } } -int css_do_sic(CPUS390XState *env, uint8_t isc, uint16_t mode) +int css_do_sic(S390CPU *cpu, uint8_t isc, uint16_t mode) { + CPUS390XState *env = &cpu->env; S390FLICState *fs = s390_get_flic(); S390FLICStateClass *fsc = s390_get_flic_class(fs); int r; diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c index 0f0e784b2a..1ddad0bec1 100644 --- a/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -1358,7 +1358,7 @@ static int kvm_sic_service_call(S390CPU *cpu, struct kvm_run *run) mode = env->regs[r1] & 0xffff; isc = (env->regs[r3] >> 27) & 0x7; - r = css_do_sic(env, isc, mode); + r = css_do_sic(cpu, isc, mode); if (r) { kvm_s390_program_interrupt(cpu, -r); } diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c index e85658ce22..56c7f00cf9 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -761,10 +761,11 @@ void HELPER(stpcifc)(CPUS390XState *env, uint32_t r1, uint64_t fiba, void HELPER(sic)(CPUS390XState *env, uint64_t r1, uint64_t r3) { + S390CPU *cpu = env_archcpu(env); int r; qemu_mutex_lock_iothread(); - r = css_do_sic(env, (r3 >> 27) & 0x7, r1 & 0xffff); + r = css_do_sic(cpu, (r3 >> 27) & 0x7, r1 & 0xffff); qemu_mutex_unlock_iothread(); /* css_do_sic() may actually return a PGM_xxx value to inject */ if (r) { From patchwork Mon Nov 6 11:44:57 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: 741389 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1040062wrr; Mon, 6 Nov 2023 03:53:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbY1nHLvg8aNqyV2ENPUzqLSeu2QmPGL65lNyIhqlV7zVzgr4JUglq8MI2KokTfonKEA0F X-Received: by 2002:a05:622a:1350:b0:41e:2423:f0be with SMTP id w16-20020a05622a135000b0041e2423f0bemr5455099qtk.40.1699271599307; Mon, 06 Nov 2023 03:53:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699271599; cv=none; d=google.com; s=arc-20160816; b=TP7L/dY9/eSps/79hNt5I9a7LBGYo6oIs1PYqhC/7M5esAeHSVb45D4qrkydZQmRGA /IUjjIkBytYHr6EXw5jL1dxTNPXAvpGkHz29SKb53PyYfo/lInfOBl2Ey9+Xitxb7K0K aq4D9DuzverOKL3/RpT1ivu2zoSiNnctySZ+LKcwM5QYaDBRmecZfjJK1MmqKytQ7iuI wdCATKokNso+EkZ2YzmvJH+gZ6GijIu36zmO+ZAxS4wD72QHVWuJKJib9qxfBH5VZbxt yWeFaQ9IA9OE0AOLkyjeOXEIXfzb3wdoikhMjSOWSwjbuzFF3RXrpZM2pPHO9vhcm5y7 imdw== 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=bQYHw6k/VszA0YDIuQME8N6TDwm343Fq2i1eGs6ZHqM=; fh=iyPtDenH/bpJiwn6+MxCUj0FPuOI6mBlLIyfrvrbZlI=; b=gnZNNVepeEh0jEtiFJilquCXDuix8QhXe0t5GNKi2/Dp/98WavFb8pbZ7JvIIlFmkJ AADyoiax4F2MbXPcPfPRCMP01apqgm8hk3RfivD3EGXYTQ+/ikLpHvOAHvOaUdTQMZ5k Vj+hrvmj07DawSx140vy2h7TqVjGQkUFWpm9MV2u9ucRKSb0L0eq1WXO25OQRy5yly83 ydIZeeZXzf7r+aQQuXBR6xXfJhyTcXc2nRfCzRvvGeEOL5VdUF0G6es/pToooH1jwaxT jeSUWFXhqRY1f7Pw/kGUizzsXirV3njPCBveuQqPZxnl4+fL/am+TgWUHIEuZPh/YsIB p92Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NB7lmMhO; 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 s25-20020a05622a1a9900b004180b2c7741si5248146qtc.85.2023.11.06.03.53.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 03:53:19 -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=NB7lmMhO; 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 1qzy2r-0002EN-C6; Mon, 06 Nov 2023 06:45:29 -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 1qzy2i-00028b-8R for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:45:26 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzy2g-00056H-HX for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:45:20 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4084de32db5so38525485e9.0 for ; Mon, 06 Nov 2023 03:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699271117; x=1699875917; 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=bQYHw6k/VszA0YDIuQME8N6TDwm343Fq2i1eGs6ZHqM=; b=NB7lmMhO6jLP5SC1OI42zvrjro/VbM33tncHEY2i76bIrJis4z+kKRJ5FZ9DfY3Mnz H8BmA4a6DgsLILzKXAPQvbVj0Zyupbyo2bU9du0bbJTyfaUCac4etmICSuoljostYQ9T NEA/f0goXH9ArioCHeF090O3myVXlolk2DdDgZDL4ekTzjWf9HC8LJWZIzP7y575hLmG B8jx9d1CQaMrfblIrhuh0qdxzTzqw168OS0PTGRvX1iIPdnPDvnDVOEqxztXN5l4YJ+2 rh+f6g9rk6IzTWlhIH9bA8lrW8j0FMKcwbvi2ZDwzN9e+wmTw4lsfmB75AaPz6oWqlf0 /1sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699271117; x=1699875917; 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=bQYHw6k/VszA0YDIuQME8N6TDwm343Fq2i1eGs6ZHqM=; b=WQEysMOCoLdGxVq8TP1VcPnIGRS+bDWeZp7FgqFgQt564HREnqZOEIdDGPLgNKw0YN ORlGu7pzixaUjPFsa+TtZt7fQc/0zSM43jMIIf9jR5hkSZAhAh0vqT3oVANFyBrr0ZqJ lAHYRym+X33z3nKptY33daBBiX+TcZ0wKDL5U/rgJscXHBBK+m7bBsKfFSo7XozvNmCC 4RioTY5arckwDzqOnSlooIMny4WSMnt0pU+ilB1DJgo4HJG7jG29sDoFw1x0Ybk4iBUW /bNoHgGoT5RsnvQkmOpuYgNfk1lQQ5NqrvFFvKQ3DiuJVwPP3QA33Yy+XazF+Ka/tI0t V0ug== X-Gm-Message-State: AOJu0YwjVaozCpiOvPAGDP0Hbw7/Ld2fIctnxm6zQ0UWNKXsORtHNK72 f4ynGUIXEDsaZundN5cDLURveLUGGDdhhKSGmzk= X-Received: by 2002:a05:600c:c0f:b0:409:5d7d:b26d with SMTP id fm15-20020a05600c0c0f00b004095d7db26dmr12085647wmb.15.1699271116243; Mon, 06 Nov 2023 03:45:16 -0800 (PST) Received: from m1x-phil.lan (176-131-220-199.abo.bbox.fr. [176.131.220.199]) by smtp.gmail.com with ESMTPSA id b15-20020a05600010cf00b00318147fd2d3sm9172759wrx.41.2023.11.06.03.45.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 Nov 2023 03:45:15 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Thomas Huth , David Hildenbrand , Halil Pasic , Eric Farman , Christian Borntraeger , qemu-s390x@nongnu.org, Ilya Leoshkevich , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/4] hw/s390x/sclp: Have sclp_service_call[_protected]() take S390CPU* Date: Mon, 6 Nov 2023 12:44:57 +0100 Message-ID: <20231106114500.5269-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231106114500.5269-1-philmd@linaro.org> References: <20231106114500.5269-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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=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 "hw/s390x/sclp.h" is a header used by target-agnostic objects (such hw/char/sclpconsole[-lm].c), thus can not use target-specific types, such CPUS390XState. Have sclp_service_call[_protected]() take a S390CPU pointer, which is target-agnostic. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/s390x/sclp.h | 5 ++--- hw/s390x/sclp.c | 7 ++++--- target/s390x/kvm/kvm.c | 2 +- target/s390x/tcg/misc_helper.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h index 9aef6d9370..e229b81a67 100644 --- a/include/hw/s390x/sclp.h +++ b/include/hw/s390x/sclp.h @@ -227,8 +227,7 @@ static inline int sccb_data_len(SCCB *sccb) void s390_sclp_init(void); void sclp_service_interrupt(uint32_t sccb); void raise_irq_cpu_hotplug(void); -int sclp_service_call(CPUS390XState *env, uint64_t sccb, uint32_t code); -int sclp_service_call_protected(CPUS390XState *env, uint64_t sccb, - uint32_t code); +int sclp_service_call(S390CPU *cpu, uint64_t sccb, uint32_t code); +int sclp_service_call_protected(S390CPU *cpu, uint64_t sccb, uint32_t code); #endif diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index d339cbb7e4..893e71a41b 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -269,9 +269,9 @@ static void sclp_execute(SCLPDevice *sclp, SCCB *sccb, uint32_t code) * service_interrupt call. */ #define SCLP_PV_DUMMY_ADDR 0x4000 -int sclp_service_call_protected(CPUS390XState *env, uint64_t sccb, - uint32_t code) +int sclp_service_call_protected(S390CPU *cpu, uint64_t sccb, uint32_t code) { + CPUS390XState *env = &cpu->env; SCLPDevice *sclp = get_sclp_device(); SCLPDeviceClass *sclp_c = SCLP_GET_CLASS(sclp); SCCBHeader header; @@ -296,8 +296,9 @@ out_write: return 0; } -int sclp_service_call(CPUS390XState *env, uint64_t sccb, uint32_t code) +int sclp_service_call(S390CPU *cpu, uint64_t sccb, uint32_t code) { + CPUS390XState *env = &cpu->env; SCLPDevice *sclp = get_sclp_device(); SCLPDeviceClass *sclp_c = SCLP_GET_CLASS(sclp); SCCBHeader header; diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c index 1ddad0bec1..a12fbfc026 100644 --- a/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -1174,7 +1174,7 @@ static void kvm_sclp_service_call(S390CPU *cpu, struct kvm_run *run, break; case ICPT_PV_INSTR: g_assert(s390_is_pv()); - sclp_service_call_protected(env, sccb, code); + sclp_service_call_protected(cpu, sccb, code); /* Setting the CC is done by the Ultravisor. */ break; case ICPT_INSTRUCTION: diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c index 56c7f00cf9..6aa7907438 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -102,7 +102,7 @@ uint64_t HELPER(stck)(CPUS390XState *env) uint32_t HELPER(servc)(CPUS390XState *env, uint64_t r1, uint64_t r2) { qemu_mutex_lock_iothread(); - int r = sclp_service_call(env, r1, r2); + int r = sclp_service_call(env_archcpu(env), r1, r2); qemu_mutex_unlock_iothread(); if (r < 0) { tcg_s390_program_interrupt(env, -r, GETPC()); From patchwork Mon Nov 6 11:44:58 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: 741388 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1039751wrr; Mon, 6 Nov 2023 03:52:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPRzrmCnzvdcyl4meNa5fotxvTZ+sCjBXNccpXwrhAs2DkjqATbkprCvgRvVesCl59rraC X-Received: by 2002:a05:6830:3149:b0:6b8:dc53:9efd with SMTP id c9-20020a056830314900b006b8dc539efdmr29859295ots.3.1699271535237; Mon, 06 Nov 2023 03:52:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699271535; cv=none; d=google.com; s=arc-20160816; b=N4aigfQCy9Z7jsmTBf05iKA5jbdrf0Q9qmlk/5h7qudXz2gIXN0QQJpq4ubpNN+7oP jlqPFKm4ysYoubvPEb3gIQ+Utm1R3/lIxSAhEV3MmkESCIWGhTIwa7vA/7J66858fnpX CpQ0Ojf8BtkSqnY3Jt4s2zS2UJGkPVCcLiLy9CVeuw/vGVtU7h+wP59XkujabnlKAVZa jzq9RLSnSoB0cnJw8l39e0tnZ5OXssVuu2Bb+TMme5kXUxP3J178F3Fhm/UAaiMaTdU/ h2PH4I9N3HO0KK9GMdkIWybU/N9uU9Gi1uHd6GaKJxXLWnMsF0ZH/YfQp5BdyYh+yEuH sv1g== 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=OScb+MD6WbCnK5YT/0hy0dsrhtV6qe8GNeuNwraSp7g=; fh=iyPtDenH/bpJiwn6+MxCUj0FPuOI6mBlLIyfrvrbZlI=; b=gN9OqoVPTqOZSPq3WKoKI3M83CDIa8w4uprRz3q/qGbbCKbbD4H3aIvASy4iIumpRe rXsWXTpzcm5Bt9bgMvxM7ruG6odZMAa6ySiFg6jBMFNr1KTWwH50bWlvO38o8jwVUdZO QVRfELyCqU89BjKD0bMtvfqo/tpegh9f5wbRxMsLygHA+joj3vp5CaI1DucteQhFN7Zv Tfb6lIEcvA6YbHbuXSim6pkwZs/eN1OPVOvsWbB0xzy4/Yzp0EZ1sg+vFEZVkdTnYr70 P3LRQ4sOyILbMOZG6Yi8Q+p6rf9cckjgkcvPUWTO/FOgC1FNK0HqaVAa7xqcuJysLVQk N7sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zvaOW7nT; 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 i16-20020ac85c10000000b00418d6b2d475si5678597qti.468.2023.11.06.03.52.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 03:52:15 -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=zvaOW7nT; 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 1qzy2s-0002FQ-1k; Mon, 06 Nov 2023 06:45: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 1qzy2p-0002C3-0P for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:45:27 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzy2m-00058A-8B for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:45:26 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4081ccf69dcso31458865e9.0 for ; Mon, 06 Nov 2023 03:45:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699271122; x=1699875922; 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=OScb+MD6WbCnK5YT/0hy0dsrhtV6qe8GNeuNwraSp7g=; b=zvaOW7nTPooBOgajabZDOEBejKDSo4LJBGr5sRYU2UEPGEN7mpaueH6X3GkAcfEVZZ iga3pgvA5McGL+3Sjx7yf6sky4FqyT6fGxJey1qWnKxF8lMl48VU7ZwgGOAgIYvZr0I4 eKTFbwGHrctUBVZPP1Qhbx01/JSNWtZNIEFEaJCHqkm9EbfSabFYtv91ZmPlGzskoApM Cvxqgdsne1le7iU+hdTBJ8IhyvbsU/6g/ycmLug2F3+x0MJy4kl7Mjqt9Y4P8CxrsFJd sV3btX/mNsM1R2qWG9Rl9Y6H+3Ekox0G1Gsk3eJVYt39++zHOKMEP4+B/qJc+mZIQsHE /eCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699271122; x=1699875922; 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=OScb+MD6WbCnK5YT/0hy0dsrhtV6qe8GNeuNwraSp7g=; b=aGZU6DBW1QQXQ23O5FjRBGFozA0Xh512mYkXy+iSGRORu80L5h/Sxj/5+ioS60Ig3k 7Zs9/4k6bZM6BfHiWQE+Rrq2E4Q4GlOGcr13EmKUVXytFm6wncPNVPRKr+5UPeS8N7g4 ltq1B2HdM2Sv3RsMh1WUZ4okxIcWftbNXCysuKHJn+nnRBEGbXV6OWcK2VBxOxalIAhW IIlKTnPYfQ+FFeuH0+ospL2ALbGWawFVI6DWNDyUQm36GCj32PCKHDOwmKYEhSKDOYlZ GUGRwFgFmnEFyQfZEB43IZMuues1p2ye3uFkzmcq+b85nMafP7RmhH8Sg4KIhwrh7Ir/ Nd1g== X-Gm-Message-State: AOJu0YzHt/2dAuxsGEkTFkiJwn7yZvL45AqiM+fiRO4ksnAmbg7D5nL2 5HEPjp224IElSL2YMitum0ZBX2IQJhzKY7KuTlw= X-Received: by 2002:a05:600c:1c90:b0:402:ebe1:7960 with SMTP id k16-20020a05600c1c9000b00402ebe17960mr13100183wms.2.1699271122597; Mon, 06 Nov 2023 03:45:22 -0800 (PST) Received: from m1x-phil.lan (176-131-220-199.abo.bbox.fr. [176.131.220.199]) by smtp.gmail.com with ESMTPSA id t10-20020a05600c198a00b004064ac107cfsm11920533wmq.39.2023.11.06.03.45.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 Nov 2023 03:45:22 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Thomas Huth , David Hildenbrand , Halil Pasic , Eric Farman , Christian Borntraeger , qemu-s390x@nongnu.org, Ilya Leoshkevich , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 3/4] target/s390x/cpu: Restrict cpu_get_tb_cpu_state() definition to TCG Date: Mon, 6 Nov 2023 12:44:58 +0100 Message-ID: <20231106114500.5269-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231106114500.5269-1-philmd@linaro.org> References: <20231106114500.5269-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=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 cpu_get_tb_cpu_state() is TCG specific. Another accelerator calling it would be a bug, so restrict the definition to TCG, along with "tcg_s390x.h" header inclusion. Signed-off-by: Philippe Mathieu-Daudé --- target/s390x/cpu.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 38d7197f4c..110902fa3c 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -29,7 +29,6 @@ #include "cpu_models.h" #include "exec/cpu-defs.h" #include "qemu/cpu-float.h" -#include "tcg/tcg_s390x.h" #include "qapi/qapi-types-machine-common.h" #define ELF_MACHINE_UNAME "S390X" @@ -383,6 +382,10 @@ static inline int cpu_mmu_index(CPUS390XState *env, bool ifetch) #endif } +#ifdef CONFIG_TCG + +#include "tcg/tcg_s390x.h" + static inline void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc, uint64_t *cs_base, uint32_t *flags) { @@ -405,6 +408,8 @@ static inline void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc, } } +#endif /* CONFIG_TCG */ + /* PER bits from control register 9 */ #define PER_CR9_EVENT_BRANCH 0x80000000 #define PER_CR9_EVENT_IFETCH 0x40000000 From patchwork Mon Nov 6 11:44:59 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: 741385 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1039060wrr; Mon, 6 Nov 2023 03:50:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSSLPQ0miSEjim20lzUfrVBO/N32/5fzQMK0shrrLSlBz5NmnxEa4d9i7RnbXW+ptTUoDS X-Received: by 2002:a05:620a:28c2:b0:778:9be8:2742 with SMTP id l2-20020a05620a28c200b007789be82742mr31668774qkp.3.1699271407717; Mon, 06 Nov 2023 03:50:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699271407; cv=none; d=google.com; s=arc-20160816; b=tptPh8/26iNuN+Bs6OAUX9RHhSfeO2aV/pTrhFHLG6ZtLTjIWIvwCpDl8tRT9fAtYK Ly8XiJXYF996sM1jmQVenhzrrhhDrzFfS9ptjtzPRiF9a/GMQZncOPTQVu3G/xNrpMBD +d9qzjm22M9m9p7NAy0LzVBgF/yoB/Bqo7w6z7H872/GZh7O0AL5DbBwPDmXP7BRWlCB XWuu79RTQVC3qgWHHnO4U4QBcmlEH6qScjepjDbU25GeqUTRvxa54NaiPqgavFBkBKBQ /Z4RcaBjKQIN169kQghxCCVLF1JxBgTNU5ES5SFzIa4x9VIJH9fme25VlGvMncE77I8s gMSA== 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=OtpMWqJgQmyK9oo87z+/dmy0LjL6tPcvJpCxuznxJKg=; fh=iyPtDenH/bpJiwn6+MxCUj0FPuOI6mBlLIyfrvrbZlI=; b=euKqzfY06NItWJE0axaBw7qa5dMdBx8zUY05lxu+LkuUp8HI/ZVujIt0sWlAIKmSzY B3PgnEn4QSkK3W8FnxJdcSlIPSRDHNt4+zFuZNk7NNDVMN1WljeYI92u+6AkLdBIYJO8 ffN3rHDMUHX1sJz7/OOCKF1MJavm4c/dZ4MJ7MQ7b6yWZrJ1y5LiC7fCHzRKY2D6+bQE XENtRZJ9AqmMu8Ov1swirRxCYZ3umWy7wy06+SvJIWsn0u/3Meb5bxLWpMPtO7iGw23I Air7OeiJyR9MnXSmxuqGBYUhBl0a0PXCzXeWB1qYgLxtAD3CRITaM6bPfaSW9D/S0mla By6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ZGuHa0G/"; 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 qs17-20020a05620a395100b00775c0be5457si5563241qkn.553.2023.11.06.03.50.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 03:50:07 -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="ZGuHa0G/"; 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 1qzy2v-0002I9-PK; Mon, 06 Nov 2023 06:45:33 -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 1qzy2u-0002HD-Bp for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:45:32 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzy2s-0005Cb-NZ for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:45:32 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-32d849cc152so3027061f8f.1 for ; Mon, 06 Nov 2023 03:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699271129; x=1699875929; 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=OtpMWqJgQmyK9oo87z+/dmy0LjL6tPcvJpCxuznxJKg=; b=ZGuHa0G/XgWogkipxro9H7ycU6Mj4SSCxKM0SvFpOOtcCSWF7h9/9rJSk4+d0J5kbR 9PLoLPUTaxZtd/mvn2Ka72Ejo9H2XrlU5W5VM93wjv1uCw/NXXSxJzZAIZrptC9FXo50 3HIzNoFPaZYTd+jzDgnN6yG0AKIYyQhz1g4TWdqrzqbUiCwYUWIxdddfnrpef30nF0ee iQdEb3MHmMKvfuJ4AqcKdgOq2Gy1pNqoqn8m16+Y0F1BknL1vA6kw/BToKtkrqLM0wEw zC56hswxM9QfuswZSDoKm0ZaHYwiQ19STa4DHweZxd3gdJz8nQzwmRKXCX/kvGilxY/C RJdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699271129; x=1699875929; 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=OtpMWqJgQmyK9oo87z+/dmy0LjL6tPcvJpCxuznxJKg=; b=Gg+S27He7EkP+67Hb6AYjdv8EAengWQsFstCFwI3/I43zVjSUWTG+LUMQPEzbp/o5R CNuVhfKl275XNkLzaU4a7DXpaTPVmyuvFNvQckv7/5KO+AcW87QcoK618QTv1l07AM1G dxb9dTWXi2royPV537+zdtZdEr2xOBBNGUgSwblj9jOrXunOrHtn7q0bSuAw2Zrpc7gf Scl1Q1TteMkr4hHBDCvyGIfnzvi9/Dqcacxdr/Xwi4nFrEaGb5LmF0SMSYxMn1XZ1HOA LSOSZVlSwq8JyNnNrEK2T87L877tAzGE4JE5V3jbKcwhhIjv+eiARDJwXws+jgANybBv oYGw== X-Gm-Message-State: AOJu0YzG2utCYw6u9hQR8nShjFVZ+2qx0GubHDpbu944GD+05j28X16L ptRVd59gOcX/q82fTXMacHObqhhTSrTtP2qtHNE= X-Received: by 2002:adf:d1c9:0:b0:32d:a0d3:d681 with SMTP id b9-20020adfd1c9000000b0032da0d3d681mr24726960wrd.43.1699271128939; Mon, 06 Nov 2023 03:45:28 -0800 (PST) Received: from m1x-phil.lan (176-131-220-199.abo.bbox.fr. [176.131.220.199]) by smtp.gmail.com with ESMTPSA id i8-20020adfb648000000b0032f7cfac0fesm6384945wre.51.2023.11.06.03.45.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 Nov 2023 03:45:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Thomas Huth , David Hildenbrand , Halil Pasic , Eric Farman , Christian Borntraeger , qemu-s390x@nongnu.org, Ilya Leoshkevich , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 4/4] target/s390x/cpu: Restrict CPUS390XState declaration to 'cpu.h' Date: Mon, 6 Nov 2023 12:44:59 +0100 Message-ID: <20231106114500.5269-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231106114500.5269-1-philmd@linaro.org> References: <20231106114500.5269-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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=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 "target/s390x/cpu-qom.h" has to be target-agnostic. However, it currently declares CPUS390XState, which is target-specific. Move that declaration to "cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu --- target/s390x/cpu-qom.h | 2 -- target/s390x/cpu.h | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h index fcd70daddf..ccf126b7a9 100644 --- a/target/s390x/cpu-qom.h +++ b/target/s390x/cpu-qom.h @@ -33,8 +33,6 @@ OBJECT_DECLARE_CPU_TYPE(S390CPU, S390CPUClass, S390_CPU) typedef struct S390CPUModel S390CPUModel; typedef struct S390CPUDef S390CPUDef; -typedef struct CPUArchState CPUS390XState; - typedef enum cpu_reset_type { S390_CPU_RESET_NORMAL, S390_CPU_RESET_INITIAL, diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 110902fa3c..942589c597 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -55,7 +55,7 @@ typedef struct PSW { uint64_t addr; } PSW; -struct CPUArchState { +typedef struct CPUArchState { uint64_t regs[16]; /* GP registers */ /* * The floating point registers are part of the vector registers. @@ -157,7 +157,7 @@ struct CPUArchState { /* currently processed sigp order */ uint8_t sigp_order; -}; +} CPUS390XState; static inline uint64_t *get_freg(CPUS390XState *cs, int nr) {