From patchwork Thu May 2 15:53:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651851 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B07D4C25B5C for ; Thu, 2 May 2024 15:54:58 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2Ykl-0000ns-6W; Thu, 02 May 2024 11:53:48 -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 1s2Ykg-0000lE-Qi for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:43 -0400 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 1s2Ykf-0002KE-1l for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8JVdQU2On7eQIfBAxvT9sPTYf2xDe1Uz1VwgTnnR8yk=; b=GCtc8heakuG4g2pQyF2sfYh109p7AwIhB89Iw83EUf4rib9SR60sGs9ueDcOUX9IYSU1+h W83g9gKfdYRct61fAz9DfCpdd+gQwrSAnepCpzca3y5is6tYhVX7MouTOHpLTw91WxOkJD SlZS/ppwX6UDJecSag+rN1cpnb7Zyhg= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-397-hh_5UNoVMRy-Pzd5RTdNjQ-1; Thu, 02 May 2024 11:53:38 -0400 X-MC-Unique: hh_5UNoVMRy-Pzd5RTdNjQ-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2dfc1e7ac17so53390431fa.0 for ; Thu, 02 May 2024 08:53:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665216; x=1715270016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8JVdQU2On7eQIfBAxvT9sPTYf2xDe1Uz1VwgTnnR8yk=; b=XkQTRF+7KMgvoRvoa+tFy/VuPT+yDh9EosZDYpxYk7fU7gOAbCP4Igrd4nXx1btvR3 bonX4aV3A3dTjOcZj13FA1H/ypeFfFT/Wzk12DEltfytxhls6XQ16A9XtCLmqxOEHcCB uYfhHpLhX+5fR5uI3ETGUIewOvCyV2nvOSxjLxnNTGd9zwgcpjhHIsnYcoYFT0X01wpy Bjed0u6InhJC5ao6GRKhPQtQA5C6xzLV/LNoFB/7EMpIq10N90VUE5KnT/TDgLWZob5m ud6vqq/gktlrRkOZqS2SDFPNgPMw4DWVIL93ouCP0yFFrUd04yZBSRkHKNxJhHcMw1x8 72pA== X-Gm-Message-State: AOJu0YydGAblioxX2HUX8WeHwhXA/ls94FAd2Y7lZp4rupjKtNsmrVlU zPHQQZEaA/hghizJ8OKa2H0jC6g0Irv7t8vrTc+vspZK/euC2IxsVbWd+xH025pYgD2KgVM+0GY 6AzlprbzPjEa4t04UdaHuuo7tF042jRBhcdr3B/6i6mbQNuXRaO36+sTfFoHNxEchS4O1wvbvt4 BDlEqVSl4bOlX310TeYyRJvoa0EARHI3vnfuP3 X-Received: by 2002:a2e:96c3:0:b0:2d6:c749:17bc with SMTP id d3-20020a2e96c3000000b002d6c74917bcmr133634ljj.31.1714665216557; Thu, 02 May 2024 08:53:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGAf/iclQ/L9YLGfbuEt42OL8kUv1omuj4y/Kk3M9JZdxIlifavoKYPGhcfdstO7xgos294lQ== X-Received: by 2002:a2e:96c3:0:b0:2d6:c749:17bc with SMTP id d3-20020a2e96c3000000b002d6c74917bcmr133601ljj.31.1714665215982; Thu, 02 May 2024 08:53:35 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id lc2-20020a170906dfe200b00a4e253c8735sm699808ejc.52.2024.05.02.08.53.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:53:35 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 01/13] fw_cfg: remove useless declarations from typedefs.h Date: Thu, 2 May 2024 17:53:19 +0200 Message-ID: <20240502155331.109297-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Only FWCfgState is used as part of APIs such as acpi_ghes_add_fw_cfg. Everything else need not be in typedefs.h. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- include/hw/nvram/fw_cfg.h | 2 ++ include/qemu/typedefs.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h index c1f81a5f13a..d173998803c 100644 --- a/include/hw/nvram/fw_cfg.h +++ b/include/hw/nvram/fw_cfg.h @@ -59,6 +59,8 @@ typedef struct fw_cfg_dma_access FWCfgDmaAccess; typedef void (*FWCfgCallback)(void *opaque); typedef void (*FWCfgWriteCallback)(void *opaque, off_t start, size_t len); +typedef struct FWCfgEntry FWCfgEntry; + struct FWCfgState { /*< private >*/ SysBusDevice parent_obj; diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 50c277cf0b4..949d3e1daf9 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -56,9 +56,6 @@ typedef struct DumpState DumpState; typedef struct Error Error; typedef struct EventNotifier EventNotifier; typedef struct FlatView FlatView; -typedef struct FWCfgEntry FWCfgEntry; -typedef struct FWCfgIoState FWCfgIoState; -typedef struct FWCfgMemState FWCfgMemState; typedef struct FWCfgState FWCfgState; typedef struct GraphicHwOps GraphicHwOps; typedef struct HostMemoryBackend HostMemoryBackend; From patchwork Thu May 2 15:53:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651859 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 07114C4345F for ; Thu, 2 May 2024 15:55:41 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2Ykt-0000sH-CS; Thu, 02 May 2024 11:53:55 -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 1s2Yki-0000nH-1r for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:44 -0400 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 1s2Ykg-0002KZ-Jo for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d9KEt6XMz/3aDUxWpJILF4vs1Zn9/lFwOUkcNdsMxQM=; b=e1q6ybL3Lh8SCnbUH9QWt6uAJ24LcSJ/3ll7JJ8DuTpL476Y46AORMD0vy2NUuTQEt9Ffw mugTAz4zwutEoRIa+lvhMepPX/iMchzP/LuqATk5FjfmQNr7ucKwkGWdzYiKI2Ta4FDIAW uY/P0a+2BB/Jx79XjwkTONAyw2U3c+k= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-130-xno0mZL-Ov65lm19mKQk_Q-1; Thu, 02 May 2024 11:53:40 -0400 X-MC-Unique: xno0mZL-Ov65lm19mKQk_Q-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a598111be0fso7233066b.1 for ; Thu, 02 May 2024 08:53:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665219; x=1715270019; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d9KEt6XMz/3aDUxWpJILF4vs1Zn9/lFwOUkcNdsMxQM=; b=BUZmvpqCmTS/zOt50T/scKOipEr3uPrVETyJalhf2ZDRx2dMcJagWi2Tn/k73R4Xpm EHE5diHgEJu48KXWoAiZng1r4SH77qab7mvoPFGrOpBvg9xHUDR5YxINHgD+flNCEInR ZEh6Ay18QyQCEvl3Mzrik5qP29gqQ4aqA1jKVdX5U8pRt8oh8wpHinWlMe0kYJR2PM0/ 7ZgQmfaMa1cpQdN1gklumrBRypkrJTKonJ52ia+OHI8hoXVToMS6JkRZfsz6D1dIKcd9 8NOY0op+Kw6lbXshOXvhX4za38BPvyI8jPiMQe9CN21YSGvwuQgLpiMMUmAcasH85gf/ BOFg== X-Gm-Message-State: AOJu0YwiEOLXN3eSUmk6l48Rln5KtR+N/WaciogJY6SXgoegbUC2BzeR fjY0dV/jMaNw09u8ldU0jS6wNhVpZwyaT26ieeEPXZHod5HfG+YPVUzso3AJmf2cKxe/KnRH/+6 NZYgomIgudW3wMB4CQ7IovB3kwyJlzcQqaOSL0XjA7BdZbVQBY2pXFJwClRUGMqgZL3Y/SzNmXk 0aZO+NZKX7WimEpjVoP0N7lymaGknX4RvJNJT6 X-Received: by 2002:a17:906:64b:b0:a58:eba0:b358 with SMTP id t11-20020a170906064b00b00a58eba0b358mr2138380ejb.53.1714665218745; Thu, 02 May 2024 08:53:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEyD93xJaJB8LxSgo67g39VaLDzkRn1yB3azhiICnIgXTEJnqWiNw3eHeOkhF341MX0uqyiKg== X-Received: by 2002:a17:906:64b:b0:a58:eba0:b358 with SMTP id t11-20020a170906064b00b00a58eba0b358mr2138367ejb.53.1714665218382; Thu, 02 May 2024 08:53:38 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id u3-20020a17090617c300b00a51da296f66sm694485eje.41.2024.05.02.08.53.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:53:38 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 02/13] qdev-core: remove DeviceListener from typedefs.h Date: Thu, 2 May 2024 17:53:20 +0200 Message-ID: <20240502155331.109297-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org It is needed in very few places, which already depend on other parts of qdev-core.h files. The benefit of having it in typedefs.h is small. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- include/hw/qdev-core.h | 1 + include/qemu/typedefs.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 9228e96c87e..5336728a23f 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -294,6 +294,7 @@ struct DeviceState { MemReentrancyGuard mem_reentrancy_guard; }; +typedef struct DeviceListener DeviceListener; struct DeviceListener { void (*realize)(DeviceListener *listener, DeviceState *dev); void (*unrealize)(DeviceListener *listener, DeviceState *dev); diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 949d3e1daf9..66f0b146c8c 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -47,7 +47,6 @@ typedef struct CpuInfoFast CpuInfoFast; typedef struct CPUJumpCache CPUJumpCache; typedef struct CPUState CPUState; typedef struct CPUTLBEntryFull CPUTLBEntryFull; -typedef struct DeviceListener DeviceListener; typedef struct DeviceState DeviceState; typedef struct DirtyBitmapSnapshot DirtyBitmapSnapshot; typedef struct DisplayChangeListener DisplayChangeListener; From patchwork Thu May 2 15:53:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651855 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2A57C4345F for ; Thu, 2 May 2024 15:55:16 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2Ykt-0000r1-4w; Thu, 02 May 2024 11:53:55 -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 1s2Ykl-0000oC-86 for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:49 -0400 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 1s2Yki-0002MM-Uu for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a8kMiIjPcXCK6rVyGUD5f/LiuS9wbS5Ss3aEExZnLck=; b=NnxWE0y8gb0vxct7zGtmSQUuuCqOxQSkEoSo3dRmYGbjJsA9iUM6RQW5Lj+Z0Y9EqXMZhM d9WCpleX5BuW3eWWaRZ3zSKGTreRLTk9szFJhMFVpJs20hgApmJr+7/BGj2stiuOtHCb7c GuD8tUMyapC/0MtcsEgz5gobxauGDt8= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-284-QrQ4QRgbNm-32EgHTcqP_g-1; Thu, 02 May 2024 11:53:42 -0400 X-MC-Unique: QrQ4QRgbNm-32EgHTcqP_g-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-572b993d8ffso668961a12.0 for ; Thu, 02 May 2024 08:53:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665221; x=1715270021; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a8kMiIjPcXCK6rVyGUD5f/LiuS9wbS5Ss3aEExZnLck=; b=iLpYpHJJ7tnz79D2TZkyuytjf8MoAt446Ea9OI3wTX5LQ84kN9NVzFlYM7lmjLhPR1 Znz1CPkAMu5uMXiw+v927q+L/QOKI7xemFc2LC6U+7AAlwRdIXkBGvai+OXHJUBQ042N SAVx/HJC9JwJcW20m4osuNdEfU9+OXoacuj/QH7s2lEatkOr6wNZxfD3PQ4QMO7UQ+Bh 6y1I3IUlb/qyG9YO4qNtdU0cyXKpesrDD/R48VVENn06fOA5GoyPTPrIgpY8aZfnaTZ5 5gKpPi06OHUjqbCDUBY5a3uwiBjP2nuPtTLPJYRxLvbJ2HFisS0Pd2RvUdy5wHnIrZsy szEA== X-Gm-Message-State: AOJu0Yy4haQVFsNKinIV2hpBoUPWN5v95P1Hl+EXjWnDHY/K5eds2V2P ZOXEifQ7znGM3mM6C25Umpm7f8flW1rdO3sjXcDAC/hriwWbJMSt33+l7H2z8q1kPxNuFM+daEf zoXNO4Wt/JR6veNWmQUQeibIUEm8JraL6T2RANSMLOg33HBKqQx8bBGQevzqAk+IVBcAHzlg32Y BENYrgNBU100ptPb7uUhWNIsRuU55p5ZFS7NQm X-Received: by 2002:a50:8aca:0:b0:56c:522f:53e1 with SMTP id k10-20020a508aca000000b0056c522f53e1mr2283655edk.17.1714665221435; Thu, 02 May 2024 08:53:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHo6mg01hmBODsUGJCUeguiwbjPalLzM3UicSNt6Y4jycoHlZCfBLGnvDff4piS5U/2oNvBjw== X-Received: by 2002:a50:8aca:0:b0:56c:522f:53e1 with SMTP id k10-20020a508aca000000b0056c522f53e1mr2283644edk.17.1714665221081; Thu, 02 May 2024 08:53:41 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id fd23-20020a056402389700b00572031756a8sm653037edb.16.2024.05.02.08.53.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:53:40 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 03/13] numa: remove types from typedefs.h Date: Thu, 2 May 2024 17:53:21 +0200 Message-ID: <20240502155331.109297-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Exactly nobody needs them there. Place the typedef in the header that defines the struct. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- include/qemu/typedefs.h | 2 -- include/sysemu/numa.h | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 66f0b146c8c..e0a0bc31e7f 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -81,8 +81,6 @@ typedef struct MSIMessage MSIMessage; typedef struct NetClientState NetClientState; typedef struct NetFilterState NetFilterState; typedef struct NICInfo NICInfo; -typedef struct NodeInfo NodeInfo; -typedef struct NumaNodeMem NumaNodeMem; typedef struct Object Object; typedef struct ObjectClass ObjectClass; typedef struct PCIBridge PCIBridge; diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h index 825cfe86bc1..04676141470 100644 --- a/include/sysemu/numa.h +++ b/include/sysemu/numa.h @@ -36,7 +36,7 @@ enum { #define UINT16_BITS 16 -struct NodeInfo { +typedef struct NodeInfo { uint64_t node_mem; struct HostMemoryBackend *node_memdev; bool present; @@ -45,12 +45,12 @@ struct NodeInfo { uint8_t lb_info_provided; uint16_t initiator; uint8_t distance[MAX_NODES]; -}; +} NodeInfo; -struct NumaNodeMem { +typedef struct NumaNodeMem { uint64_t node_mem; uint64_t node_plugged_mem; -}; +} NumaNodeMem; struct HMAT_LB_Data { uint8_t initiator; From patchwork Thu May 2 15:53:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651853 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EECA4C04FFE for ; Thu, 2 May 2024 15:55:10 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2Yl4-0000wG-Ld; Thu, 02 May 2024 11:54:06 -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 1s2Yko-0000og-H0 for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:52 -0400 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 1s2Ykm-0002Mb-3d for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gmAbnr6lvMxeU57acGRPp6vsIYEtlNzFQk94MJStruc=; b=TeSmF+h90O+cgVmiWaaYXdL+iZlGneE7crCAw+xeu4tg4M4KNSNsbi9/zCwvRttCXlHEVu 1XoqP26RdowihFZKAB3PrNp7pFI98eIxS6qEV7YlYsK9b+L8fheWUHVmIrb2SAQs9uMAWM 9X9bS+CAV9aR7TWOIl/OrZMUww9A+60= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-LTSnMjlCOJiQS0vWmOiaKg-1; Thu, 02 May 2024 11:53:46 -0400 X-MC-Unique: LTSnMjlCOJiQS0vWmOiaKg-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-572146eeed3so936467a12.2 for ; Thu, 02 May 2024 08:53:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665224; x=1715270024; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gmAbnr6lvMxeU57acGRPp6vsIYEtlNzFQk94MJStruc=; b=BB4tXHRWaiaGISun9sWJmgoZVk0V02ZslAmoeD8NWLAQiSDpbJn/xKhaDmBYjSlM9m HNQWvBOeTZixtqLWTbZozvX8bVl5Pr12IiuixH9MUuitlnuEdAteWSW/iZoYAcPS3Euz xSf+oI3bSh1CBcIx4aUnfT3SXjqq2qarTU3/Oo+uEY0Jd8V6n/A19wEOoJNuCxovULfw vYMRkmLUxK1FvWDOpXhH9lm3M84NQuRmhP2Y9L026ZyYfSl8tRkkOcUqIEptdqcbKMe0 7Wlz7PsD+SD6tkU2fykPKf7p2AWPtHeGaUs4coKa2P1hejDE50cd0G4aEYAEmuBzRcz+ WYBg== X-Gm-Message-State: AOJu0YxFPiwwjccFQMhUFyLE250axp6iv5oaV7vD/RyIXpWONtG/glbA yUh24vznF7cdkMvfam+4HZzxW0V8Ye269qPE7M+5y3pVe+oAbwRKvFY3m94O/Y1eVu88YLiBVdi nZnNRcVQm32E+Q8XH8gZGolWYzy1TPeITRbw+I0wO9yi788AxABjEZACcTm7o6x0rg/sZkDOtPx mhjYj8Y/qECNBEcnQ7Z43efnXI5IiFIXi37jHZ X-Received: by 2002:a50:d4d6:0:b0:571:fc02:1ce with SMTP id e22-20020a50d4d6000000b00571fc0201cemr3519076edj.38.1714665224258; Thu, 02 May 2024 08:53:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFo8DjgAksimvapgkbLAkiTCxuFt3cOP/K8OB9LzisarFgUf2sbwkvKhNO0HcoC22su501tXg== X-Received: by 2002:a50:d4d6:0:b0:571:fc02:1ce with SMTP id e22-20020a50d4d6000000b00571fc0201cemr3519069edj.38.1714665223900; Thu, 02 May 2024 08:53:43 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id ds9-20020a0564021cc900b005705bfeeb27sm657988edb.66.2024.05.02.08.53.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:53:43 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 04/13] net: remove AnnounceTimer from typedefs.h Date: Thu, 2 May 2024 17:53:22 +0200 Message-ID: <20240502155331.109297-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Exactly nobody needs it there. Place the typedef in the header that defines the struct. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- include/net/announce.h | 4 ++-- include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/net/announce.h b/include/net/announce.h index 3d90c83c237..72e7e501f7e 100644 --- a/include/net/announce.h +++ b/include/net/announce.h @@ -12,12 +12,12 @@ #include "qapi/qapi-types-net.h" #include "qemu/timer.h" -struct AnnounceTimer { +typedef struct AnnounceTimer { QEMUTimer *tm; AnnounceParameters params; QEMUClockType type; int round; -}; +} AnnounceTimer; /* Returns: update the timer to the next time point */ int64_t qemu_announce_timer_step(AnnounceTimer *timer); diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index e0a0bc31e7f..520f421397b 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -27,7 +27,6 @@ typedef struct AdapterInfo AdapterInfo; typedef struct AddressSpace AddressSpace; typedef struct AioContext AioContext; typedef struct Aml Aml; -typedef struct AnnounceTimer AnnounceTimer; typedef struct ArchCPU ArchCPU; typedef struct BdrvDirtyBitmap BdrvDirtyBitmap; typedef struct BdrvDirtyBitmapIter BdrvDirtyBitmapIter; From patchwork Thu May 2 15:53:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651849 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 446D6C04FFE for ; Thu, 2 May 2024 15:54:45 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2Yl0-0000uO-MG; Thu, 02 May 2024 11:54: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 1s2Ykp-0000oi-9n for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:52 -0400 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 1s2Ykn-0002Mh-PQ for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=boGg9/rmbZBhJJijlTtUdnXqVutZGINTHhkrDaVixoA=; b=YzgPuKvppcfJPo17ytumUasTH3SrAPg3MOnzhon7MoTF7SQVlwdS4wWiDqeirvMQNLx1MV 7tEb/om1uDPSGXHezU5ugVa0WGThCAQtPQ/1fekRnxzBwCgZAvyavJozJhonSfAtBBIkiA uVTKTUlaV3wg7qzQQdiN+jSkjCi30/g= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-b5tCyEX3MdCv_hWIlMHKiw-1; Thu, 02 May 2024 11:53:48 -0400 X-MC-Unique: b5tCyEX3MdCv_hWIlMHKiw-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-572b3091d68so775988a12.2 for ; Thu, 02 May 2024 08:53:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665226; x=1715270026; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=boGg9/rmbZBhJJijlTtUdnXqVutZGINTHhkrDaVixoA=; b=AgGlTVnuFi1Zkt5sq98XxCf3SKPA5SfXamtdNz2ZZoN1Hi2taUzoSK1ZGFRLwmm4vi 0ZT+PAPpkCgzFmKNWIFAMoCmz4wG+YcqDAzBMISHI/+Gh4gAdxl0dkeOz6kkPIETXqdk pLc4/QVS32I4nx2hhCWUE+66Pnf2esLqK4xzbzU5a293gY91DXEruw5emepLp1GWXTbx 2QcdgPAkbroyI2cZ+33r5pjZU/z6c6wyMzZOkAdo4BdAXOxqjIamhkfhtQ1XOBNgjvNW Palf4qnSIIblXdfHJ17CcJFK3x6j8BZKZoGcsUL/sbJgTMxfYzN53FxGmvE+amMnwZ7Q WrAA== X-Gm-Message-State: AOJu0YzOnHifOMsMMUCKk5EUHSN7rT2F/OuaPq7nMo1JxzLbEUWp1Udh BHSZPxo+/uAQ0U92KngG05AfblpZNZwA+EYP5iPYy8cGV/4wyeBGayM28AqQwT5vLKAj87L4OnB /FVDjqTEKYOADr7b9wT7iyOQq75qq5n/5xvtc8eJczyA5mQ+Vfkdzn7hUhuPmaaw35zb72TJzKq QXaGmgea6Ec+Zg/4ZqIHQCijAAAr4uBiu/hFlQ X-Received: by 2002:a50:c355:0:b0:570:1ddc:5e4f with SMTP id q21-20020a50c355000000b005701ddc5e4fmr3642857edb.8.1714665226585; Thu, 02 May 2024 08:53:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH5EJ8ohquXin+hLNXdcy+91JPwBmZIwrCI5MF0zIT8C1ZlHHP3vStIpbIaOpZmK5WA8/+rPg== X-Received: by 2002:a50:c355:0:b0:570:1ddc:5e4f with SMTP id q21-20020a50c355000000b005701ddc5e4fmr3642850edb.8.1714665226339; Thu, 02 May 2024 08:53:46 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id el4-20020a056402360400b005725ffd7305sm646743edb.75.2024.05.02.08.53.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:53:45 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 05/13] qemu-option: remove QemuOpt from typedefs.h Date: Thu, 2 May 2024 17:53:23 +0200 Message-ID: <20240502155331.109297-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org QemuOpt is basically an internal data structure. It has no business being defined except if you need functions from include/qemu/option.h. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- include/qemu/option.h | 2 ++ include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qemu/option.h b/include/qemu/option.h index b3498287823..01e673ae03f 100644 --- a/include/qemu/option.h +++ b/include/qemu/option.h @@ -54,6 +54,8 @@ enum QemuOptType { QEMU_OPT_SIZE, /* size, accepts (K)ilo, (M)ega, (G)iga, (T)era postfix */ }; +typedef struct QemuOpt QemuOpt; + typedef struct QemuOptDesc { const char *name; enum QemuOptType type; diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 520f421397b..4519f0cd613 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -108,7 +108,6 @@ typedef struct QEMUCursor QEMUCursor; typedef struct QEMUFile QEMUFile; typedef struct QemuLockable QemuLockable; typedef struct QemuMutex QemuMutex; -typedef struct QemuOpt QemuOpt; typedef struct QemuOpts QemuOpts; typedef struct QemuOptsList QemuOptsList; typedef struct QEMUSGList QEMUSGList; From patchwork Thu May 2 15:53:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651857 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93687C4345F for ; Thu, 2 May 2024 15:55:36 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2Yky-0000u1-Sp; Thu, 02 May 2024 11:54:01 -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 1s2Yks-0000rK-3b for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:55 -0400 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 1s2Ykq-0002N3-Mh for qemu-devel@nongnu.org; Thu, 02 May 2024 11:53:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OLWU8wT2XoRQ7J5Z8lyNBtluwjetfKCt3lDqz8dxc20=; b=Z8WkU8NuGqU4ihs9XVogwLH7c6mxrRlJr+hA4puFjkWoVUm2Cw6O/n7hxHZL9WCBEJMHMD 3uweP+kvvHJ+dMw4KUdIxapBp4rWYwaAvUeejL/T0iSF9n+bM7SeK3RVPJssk5Gfcld9YI atYgIW/+uZigYbTBwGuUcRQTnrowxp8= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-644-VbLlttJDO2aSY4AZpRirHQ-1; Thu, 02 May 2024 11:53:50 -0400 X-MC-Unique: VbLlttJDO2aSY4AZpRirHQ-1 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-572b993d8ffso669030a12.0 for ; Thu, 02 May 2024 08:53:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665229; x=1715270029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OLWU8wT2XoRQ7J5Z8lyNBtluwjetfKCt3lDqz8dxc20=; b=Y87lEp2i8Y/wNkTOaB6+JV5douHS2Ras085o0wPXuX/dxIC6h7hIG/e9cx+iHWoaW6 DC6FCOzzXXjgG4YMOlCAvdfeJmIrNEpojiag99Qb+ukxtXgx+BHTL0flAklu1iOXYuh7 K/EZKYJDDce1pBqdBtR6rGrlpS06U2tw9PHDGzD80rLxWzLQcEN3J/y3LDGx19PmsgW3 AaF+GCiWNhvukcg4hTTHd+PFi/yQfJBx8ExTuW5Nsy4DtI9ZmBVqXD1cmi4/2XqFnGFb Ksnxo2NVfIxSYH7iV6qq1EZ9re5qRxcoZAPgb4/cp/pqHqsgwQWM/0VWBGDXlvAOt2Rj lfag== X-Gm-Message-State: AOJu0YxZc4Mysf/2JVYWStuH0YA+4KQgcfv/RkDoQd4cBlTaYPKDZNOe 4mSEHfcPtowO9i01qWI3k92ZACHNVyx5LidyXYe0Wanvl+/JEkxDyRgSXTkcP1xjslAEaNP1dob KU9Q8X/xfq/Qsp049yf/7uSAnbIJj6Z9fCo91zs8sLhH5iwLFFzUy08iWzZ9K6MvZh8SXxgnJlh 21P3nnrReui2O/bRiH4kBbnAcf9pYeHKXI0Zyy X-Received: by 2002:a50:d5c2:0:b0:571:bed1:3a36 with SMTP id g2-20020a50d5c2000000b00571bed13a36mr1914865edj.38.1714665229289; Thu, 02 May 2024 08:53:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExy1Fa3bDNdmUFc2NqUJ4TZq1DBcJiqLtXDCK8R0XoRRC2bGdRXiIA/yrZ4SBZB4pjHY9EEQ== X-Received: by 2002:a50:d5c2:0:b0:571:bed1:3a36 with SMTP id g2-20020a50d5c2000000b00571bed13a36mr1914854edj.38.1714665229010; Thu, 02 May 2024 08:53:49 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id g21-20020aa7c595000000b005729337f955sm644797edq.97.2024.05.02.08.53.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:53:48 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 06/13] intc: remove PICCommonState from typedefs.h Date: Thu, 2 May 2024 17:53:24 +0200 Message-ID: <20240502155331.109297-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Move it to the existing "PIC related things" header, hw/intc/i8259.h. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- include/hw/intc/i8259.h | 2 ++ include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/intc/i8259.h b/include/hw/intc/i8259.h index c4125757753..1f2420231f1 100644 --- a/include/hw/intc/i8259.h +++ b/include/hw/intc/i8259.h @@ -3,6 +3,8 @@ /* i8259.c */ +typedef struct PICCommonState PICCommonState; + extern PICCommonState *isa_pic; /* diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 4519f0cd613..090e219248a 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -96,7 +96,6 @@ typedef struct PCIExpressDevice PCIExpressDevice; typedef struct PCIExpressHost PCIExpressHost; typedef struct PCIHostDeviceAddress PCIHostDeviceAddress; typedef struct PCIHostState PCIHostState; -typedef struct PICCommonState PICCommonState; typedef struct PostcopyDiscardState PostcopyDiscardState; typedef struct Property Property; typedef struct PropertyInfo PropertyInfo; From patchwork Thu May 2 15:53:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651858 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58ED8C04FFE for ; Thu, 2 May 2024 15:55:37 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2YlE-0000x9-Vc; Thu, 02 May 2024 11:54:18 -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 1s2Yl0-0000uf-Nc for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:02 -0400 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 1s2Ykw-0002Nb-8C for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KT/QFvRlHjzCcc4urMYslx+97zsa5gUvdtO4XnBpBY0=; b=OCkNtkXt7J8TSL2ZrKt3+trGY9HY9/PdyHL/WV2NJx/678v+BBpkH4Gs6BrjGJyZxXJ6gh lhBRgDa2tezsBfDcS7hzgYPbzTe5OBmHF6tSpYE5egqkydq3qb8sX7vJTPzNQ4OnA/wP8t IrZe+Ig0Rvuqr9xtqVobSXOekyFI6Vs= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-691-MjtwNKMBPb2yg3PUB6TxMQ-1; Thu, 02 May 2024 11:53:54 -0400 X-MC-Unique: MjtwNKMBPb2yg3PUB6TxMQ-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-51b0eed7614so6186247e87.1 for ; Thu, 02 May 2024 08:53:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665233; x=1715270033; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KT/QFvRlHjzCcc4urMYslx+97zsa5gUvdtO4XnBpBY0=; b=Yra8gUoGLGxm94xuRhUWFHmIH8ALxtOfNj/SU/SNJFJK3qWPoG+xUo05PpTioyPIXb qQ5xHsbdokiEjjm9/1Fl0RSP87UYARIrSfgAO+H8Vt5vtS4BkHCOL08tcKrhQasDpjAV UFWsYOfJo6KHHg93shBzV5+eSB5Z/FfBatt3KYyJ3TwVTcx0ojWA30roOQig+g5zDfZ/ ibiv8M6D+NJCCXkNc0v1wZdAvTgMD6bEHGaXwec2bDLwTo2zA+yrPVun/aqn7Q8H2WWh gbmyGVJxaRPA4nnY70rTsGFc0UYFUaE6uLeIV/Wp59xTC7eh3wDYmBcb4K7EiPa+zIS9 Mj+Q== X-Gm-Message-State: AOJu0YxbBrpdGpSB3kv/V3xKQ9fH0ut3M7NtnEgudfPxU5l7xOCowSti JX0r/78dHWq3NCSfaQ/ffenFExQ9TYeM3u8TpBg2kYfzkmYQrZG8+EPibV434LmK40Lc1cn+QP/ d6Kg0L6r2EHpUezU0lX9AxFD20dBvfzXOHYgzKQWkoFEQdF0n3PkFS34Kotv+7y4F+D64LYl0GZ oy4YB/pf/NEVhnbF/LuJ14ObrqTPPJMoByQa6s X-Received: by 2002:ac2:532a:0:b0:51f:3e0c:ace3 with SMTP id f10-20020ac2532a000000b0051f3e0cace3mr176282lfh.16.1714665232266; Thu, 02 May 2024 08:53:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFOTbe9PoKPyS6hYgOixwdpygg1srCpp6QkON/VCvK3r67HDyNTp6KkA1r9HAQxXGDomVKXsg== X-Received: by 2002:ac2:532a:0:b0:51f:3e0c:ace3 with SMTP id f10-20020ac2532a000000b0051f3e0cace3mr176254lfh.16.1714665231486; Thu, 02 May 2024 08:53:51 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id x19-20020a1709065ad300b00a55bbc4fd16sm689953ejs.48.2024.05.02.08.53.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:53:51 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 07/13] lockable: remove QemuLockable from typedefs.h Date: Thu, 2 May 2024 17:53:25 +0200 Message-ID: <20240502155331.109297-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Using QemuLockable almost always requires going through QEMU_MAKE_LOCKABLE(). Therefore, there is little point in having the typedef always present. Move it to lockable.h, with only a small adjustment to coroutine.h (which has a tricky co-dependency with lockable.h due to defining CoMutex *and* using QemuLockable as a part of the CoQueue API). Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- include/qemu/coroutine.h | 4 ++-- include/qemu/lockable.h | 4 ++-- include/qemu/typedefs.h | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index e6aff453017..ff3084538b8 100644 --- a/include/qemu/coroutine.h +++ b/include/qemu/coroutine.h @@ -84,6 +84,8 @@ static inline coroutine_fn void qemu_co_mutex_assert_locked(CoMutex *mutex) mutex->holder == qemu_coroutine_self()); } +#include "qemu/lockable.h" + /** * CoQueues are a mechanism to queue coroutines in order to continue executing * them later. They are similar to condition variables, but they need help @@ -281,8 +283,6 @@ void qemu_coroutine_inc_pool_size(unsigned int additional_pool_size); */ void qemu_coroutine_dec_pool_size(unsigned int additional_pool_size); -#include "qemu/lockable.h" - /** * Sends a (part of) iovec down a socket, yielding when the socket is full, or * Receives data into a (part of) iovec from a socket, diff --git a/include/qemu/lockable.h b/include/qemu/lockable.h index 9823220446d..62110d2eb74 100644 --- a/include/qemu/lockable.h +++ b/include/qemu/lockable.h @@ -18,11 +18,11 @@ typedef void QemuLockUnlockFunc(void *); -struct QemuLockable { +typedef struct QemuLockable { void *object; QemuLockUnlockFunc *lock; QemuLockUnlockFunc *unlock; -}; +} QemuLockable; static inline __attribute__((__always_inline__)) QemuLockable * qemu_make_lockable(void *x, QemuLockable *lockable) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 090e219248a..ab24ca2876c 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -105,7 +105,6 @@ typedef struct QEMUBH QEMUBH; typedef struct QemuConsole QemuConsole; typedef struct QEMUCursor QEMUCursor; typedef struct QEMUFile QEMUFile; -typedef struct QemuLockable QemuLockable; typedef struct QemuMutex QemuMutex; typedef struct QemuOpts QemuOpts; typedef struct QemuOptsList QemuOptsList; From patchwork Thu May 2 15:53:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651852 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 435CEC4345F for ; Thu, 2 May 2024 15:55:10 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2Yl3-0000w4-RC; Thu, 02 May 2024 11:54:07 -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 1s2Yl0-0000uc-MA for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:02 -0400 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 1s2Yky-0002Nu-48 for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lZJdvq9u+pJ5rwgcC5tolr3XsO6TG5/7lA6NafLezNw=; b=Wcq4ve/UJVLvoi5S9WOkB9D3uiSO85T/GV/0kgeNRaHo8b/Flxxm/UoN2tMZrXKcfkSEfO bSdGf7JJTTrJNTSqcq/yrsFiegowknljk6LJz4usITUHLPmOycEpDbZQ2FaLVdX8RvHqJz 5SxPcRT8HPGd8hS3nws1JC5qU3aFfes= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-189-UOI9T2-dMEuukaLLyGHJRw-1; Thu, 02 May 2024 11:53:57 -0400 X-MC-Unique: UOI9T2-dMEuukaLLyGHJRw-1 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5725f45da8eso620488a12.0 for ; Thu, 02 May 2024 08:53:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665236; x=1715270036; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lZJdvq9u+pJ5rwgcC5tolr3XsO6TG5/7lA6NafLezNw=; b=Vjvpo+7eeiJloy/Of2aiacyhRJ35H0Ie53+HpP9VM15nKChTGChkDJHHt8QayXfZ4K 0ziHRrtW3p7bGEMXGOaVXCK/9UnwzFB608iqGg8wDp0xcF4KeRDDyiG2rvOUwAONT6aY zbao7QVShpVMOyLqa+z6D1wN4X5VdPruJeEhFa2ZBgsY1/5zg42/L+bxVwZUkhVvm0Vg S88KoOPdMTpXbELXRylZ/OEuVxtaEyPtVPLyam0E3S19vHI8TaO7GapWXfWnoNARwqNh CBB6xs0m47oGx+eZWHRtaoEUqbUnPwz0Z1FQ6/8ntHaBxj6Yx7kYHyRTI+eLPHJxGqOq HqEw== X-Gm-Message-State: AOJu0YzC8Aib9XiKd9Tc/62nX6CgK172nKoO9m9HUqYFvDrLoBp7/AkI xyTRddldhvyjdgB/kPyN5zS3mRPShpLcGLAIK9iuUdIFReXnsWl6MklPRv5Y3dVgpeUx+MiLCIc 5x5cfQnBKoZ+qJiGYKfFkJt3xhwdQnIxhbCHLsGgcKmawz7vbeMJbPjPUXt6n0TuSbQmyyo/j8w QbfnRgmVUeILPiX1YI0kywJ/NyR2OoFuwB6DW3 X-Received: by 2002:a50:9f28:0:b0:568:c6a2:f427 with SMTP id b37-20020a509f28000000b00568c6a2f427mr1697489edf.27.1714665235876; Thu, 02 May 2024 08:53:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+vxRpf9L8OFjXnd7+Eax+UJbrfaZfG+jkCTnWqZMKhFx05cg9A/ERjvA1cjscqbve2A8KqA== X-Received: by 2002:a50:9f28:0:b0:568:c6a2:f427 with SMTP id b37-20020a509f28000000b00568c6a2f427mr1697480edf.27.1714665235523; Thu, 02 May 2024 08:53:55 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id fk4-20020a056402398400b005701eaa2023sm665014edb.72.2024.05.02.08.53.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:53:53 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 08/13] migration: remove PostcopyDiscardState from typedefs.h Date: Thu, 2 May 2024 17:53:26 +0200 Message-ID: <20240502155331.109297-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org It is defined and referred to exclusively from a .c file. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- include/qemu/typedefs.h | 1 - migration/postcopy-ram.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index ab24ca2876c..2b1948a19ac 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -96,7 +96,6 @@ typedef struct PCIExpressDevice PCIExpressDevice; typedef struct PCIExpressHost PCIExpressHost; typedef struct PCIHostDeviceAddress PCIHostDeviceAddress; typedef struct PCIHostState PCIHostState; -typedef struct PostcopyDiscardState PostcopyDiscardState; typedef struct Property Property; typedef struct PropertyInfo PropertyInfo; typedef struct QBool QBool; diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index eccff499cb2..34197795482 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -44,7 +44,7 @@ */ #define MAX_DISCARDS_PER_COMMAND 12 -struct PostcopyDiscardState { +typedef struct PostcopyDiscardState { const char *ramblock_name; uint16_t cur_entry; /* @@ -54,7 +54,7 @@ struct PostcopyDiscardState { uint64_t length_list[MAX_DISCARDS_PER_COMMAND]; unsigned int nsentwords; unsigned int nsentcmds; -}; +} PostcopyDiscardState; static NotifierWithReturnList postcopy_notifier_list; From patchwork Thu May 2 15:53:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651848 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 815EFC4345F for ; Thu, 2 May 2024 15:54:23 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2Yl9-0000wh-9c; Thu, 02 May 2024 11:54:13 -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 1s2Yl2-0000vZ-H2 for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:04 -0400 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 1s2Yl0-0002O6-Os for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665242; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zpuIfHd1pI+7vJT1eF7UBY58QTQrgHV52BgrnbSJIjI=; b=dT8p81BANOnxHDCiy+h2Roh8o9NT6qu7hHDdU+IFi/TFdpxKinCOEY5KU0jiFDsgd0p8HU Mp9yyF68R2bJv5d73Uj6hGiYdalALgz5D+BvEVzEoxzJHdfZJdxYSVy4i9yf+ROqJh5wqZ TBB8mQU7VUto+ImGik4c8n0WhRiSsvc= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-121-rL5WaxKeOtCYCvsr5N6UYg-1; Thu, 02 May 2024 11:54:00 -0400 X-MC-Unique: rL5WaxKeOtCYCvsr5N6UYg-1 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-572146eeed3so936584a12.2 for ; Thu, 02 May 2024 08:54:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665238; x=1715270038; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zpuIfHd1pI+7vJT1eF7UBY58QTQrgHV52BgrnbSJIjI=; b=Oh/QsVfoXGPU6QpwHc6MkAnluQsbjo6xgrLm7HfLSa8K4peFMQU75Noxt1VlN4XUk7 hsFI5brSTg2e6NeFzGFD0hFIBAxtfKUbtx9GNaiei03MCWzSLcJFC2Zy+Y+N6sUinH1E YozztpMvvTYweQ1mIfWHhiUYOuLADWSe/tlXR1zCGnorcKndKOvRe3aSfB/zrjuxpXql JtMiu8NrHnbTedZeEPa0PaQA27UX30DLdC8+h5T7Piis3MgtwBeskq9gWuLzWW8kUtDo uGcMf4UYUrhBVofoGWAhcUF577HyrZNHi3quySfDTsUHDmerYDlHQuM/TX0tLaC7Wb1X HC2g== X-Gm-Message-State: AOJu0YwFennoMCRj3jcw92j1Rr1tVm9PrvDnBLr6tTDZzUgLVnUY5gtF t4Jjk4cn5gZjyDgbN/7cT3WJtSlYLvgBjd0789sncBdKINX4luRLBewDDAQhFfKcVnFUfYU0AXY rehZiogeP59KfrVI4abFUqfYauWB+V9aRcLoie24LHAJ099+H8I5zzlWJ1RB/xacZ7qAPiPXLgL SxJ0B+/Q+dGl1uvmSD3OG/LlgTCt5AITrqPEpK X-Received: by 2002:a50:8acf:0:b0:572:404f:5199 with SMTP id k15-20020a508acf000000b00572404f5199mr3924476edk.5.1714665238422; Thu, 02 May 2024 08:53:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFrs4kA4vJBcXcm7Gg0HtbOS5cldCbqgzuZwnaSMejoqdyd37NMRo90fFmGHS9DhEg9iNihpg== X-Received: by 2002:a50:8acf:0:b0:572:404f:5199 with SMTP id k15-20020a508acf000000b00572404f5199mr3924462edk.5.1714665237993; Thu, 02 May 2024 08:53:57 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id ee53-20020a056402293500b0056fede24155sm656982edb.89.2024.05.02.08.53.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:53:57 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 09/13] monitor: remove MonitorDef from typedefs.h Date: Thu, 2 May 2024 17:53:27 +0200 Message-ID: <20240502155331.109297-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org MonitorDef is defined by hmp-target.h, and all users except one already include it; the reason why the stubs do not include it, is because hmp-target.h currently can only be used in files that are compiled per target. However, that is easily fixed. Because the benefit of having MonitorDef in typedefs.h is very small, do it and remove the type from typedefs.h. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- include/monitor/hmp-target.h | 11 +++++++---- include/qemu/typedefs.h | 1 - stubs/target-monitor-defs.c | 3 +-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/monitor/hmp-target.h b/include/monitor/hmp-target.h index d78e979f053..b679aaebbff 100644 --- a/include/monitor/hmp-target.h +++ b/include/monitor/hmp-target.h @@ -25,11 +25,10 @@ #ifndef MONITOR_HMP_TARGET_H #define MONITOR_HMP_TARGET_H +typedef struct MonitorDef MonitorDef; + +#ifdef COMPILING_PER_TARGET #include "cpu.h" - -#define MD_TLONG 0 -#define MD_I32 1 - struct MonitorDef { const char *name; int offset; @@ -37,6 +36,10 @@ struct MonitorDef { int val); int type; }; +#endif + +#define MD_TLONG 0 +#define MD_I32 1 const MonitorDef *target_monitor_defs(void); int target_get_monitor_def(CPUState *cs, const char *name, uint64_t *pval); diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 2b1948a19ac..b71a36d02b2 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -75,7 +75,6 @@ typedef struct MemoryRegionSection MemoryRegionSection; typedef struct MigrationIncomingState MigrationIncomingState; typedef struct MigrationState MigrationState; typedef struct Monitor Monitor; -typedef struct MonitorDef MonitorDef; typedef struct MSIMessage MSIMessage; typedef struct NetClientState NetClientState; typedef struct NetFilterState NetFilterState; diff --git a/stubs/target-monitor-defs.c b/stubs/target-monitor-defs.c index ac07b19064c..35a0a342772 100644 --- a/stubs/target-monitor-defs.c +++ b/stubs/target-monitor-defs.c @@ -1,6 +1,5 @@ #include "qemu/osdep.h" - -const MonitorDef *target_monitor_defs(void); +#include "monitor/hmp-target.h" const MonitorDef *target_monitor_defs(void) { From patchwork Thu May 2 15:53:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651850 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 390F9C4345F for ; Thu, 2 May 2024 15:54:46 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2YlL-0001Gk-IN; Thu, 02 May 2024 11:54:24 -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 1s2Yl3-0000wI-SA for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:07 -0400 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 1s2Yl2-0002OK-8D for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fT1y4KqRaxFcPgY6/amvw3l0h4xpM4rtBuLLxm77NYA=; b=P+7Tmp+uKoL7oYSfpBXDfav+QAERhcFdqUHMqbSy0wRK/kXHqzqRLCJ+SV5JjlzPrN9oa/ iSAU82Dwr+BAvYbjQHYNSfkbCjA2Wi/kYkJK3oCbCmGbv867qRaw1Vln+nkaAUIiTMbs3t fRUWc1yD07QeZeEWuv5uo9dVH+oW5xE= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-433-WXuQ5JOWN-GdqXLwqtev_g-1; Thu, 02 May 2024 11:54:02 -0400 X-MC-Unique: WXuQ5JOWN-GdqXLwqtev_g-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-572a0c5ece9so963916a12.2 for ; Thu, 02 May 2024 08:54:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665241; x=1715270041; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fT1y4KqRaxFcPgY6/amvw3l0h4xpM4rtBuLLxm77NYA=; b=nSPHu0q0dYllxCtsEJYMKr2PBdK7U4FDevpwxQEtzqgX1E5PyqGC3Y8KZViJMVChJ7 blgGwE/ePDS0Ca8B3uw3Vj7/4YtHX9l3JoSPTbejvuE0lttikrPO4ApfsE2XbUSBhyAg OIwudeDPJJr9S1wG+iqpomcUlFO8S5lhAbVbUGOV+gbraeZb/RAbpZRAfSIPFMwSlfh5 smoEMzxXnTkb3VoF2B6lv6ITxgVDGaUy2yXlbqG5HIvYL+fSyBYXA+62LxVeB4qbptPt lMHdrqytGs7NP8G2HJj1ehBGRSMTHLi16hDyCjp3OoMtszNfSvAiUTbpXr3WJL3JfKQa FYPw== X-Gm-Message-State: AOJu0YycQybQumkofvIC0jtwYH2ZMsD49YDSvsOV19sRv0pKKi+raPWp blQGvSwDCVed69tGx86+CdWjtmVKIK2U7tZZAWwmYdGt4/SQlOXT0uYxLYoGvxcK9YYR6Rrehkc ZD2cIA1IE/u9e9JyKXb7RcqKQumyCbWiVZOadQ28RMHxVrgO/xAvW7R2uA8/fxGixga2S6y5Z79 4DHKKRWOXf3ia3UaQPd6oVP6iGQQ+aUAlFWqPF X-Received: by 2002:a50:bac4:0:b0:56d:faa2:789b with SMTP id x62-20020a50bac4000000b0056dfaa2789bmr3721518ede.40.1714665240879; Thu, 02 May 2024 08:54:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFILstlQFGwN9u18nirD0qKSFlxWgCAkqc5qb3IYQ/XTi4JigOGYJEGMsYWZWlqMcJx+HAB6w== X-Received: by 2002:a50:bac4:0:b0:56d:faa2:789b with SMTP id x62-20020a50bac4000000b0056dfaa2789bmr3721503ede.40.1714665240509; Thu, 02 May 2024 08:54:00 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id 12-20020a0564021f4c00b00572707cfa09sm656409edz.9.2024.05.02.08.53.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:54:00 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 10/13] qapi/machine: remove types from typedefs.h Date: Thu, 2 May 2024 17:53:28 +0200 Message-ID: <20240502155331.109297-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org They are needed in very few places, which already depends on other generated QAPI files. The benefit of having these types in typedefs.h is small. Signed-off-by: Paolo Bonzini --- include/hw/core/cpu.h | 1 + include/qemu/typedefs.h | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 46b99a7ea55..a23d39f6a0c 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -28,6 +28,7 @@ #include "exec/memattrs.h" #include "exec/mmu-access-type.h" #include "exec/tlb-common.h" +#include "qapi/qapi-types-machine.h" #include "qapi/qapi-types-run-state.h" #include "qemu/bitmap.h" #include "qemu/rcu_queue.h" diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index b71a36d02b2..78598f27f32 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -37,12 +37,10 @@ typedef struct BusClass BusClass; typedef struct BusState BusState; typedef struct Chardev Chardev; typedef struct Clock Clock; -typedef struct CompatProperty CompatProperty; typedef struct ConfidentialGuestSupport ConfidentialGuestSupport; typedef struct CPUAddressSpace CPUAddressSpace; typedef struct CPUArchState CPUArchState; typedef struct CPUPluginState CPUPluginState; -typedef struct CpuInfoFast CpuInfoFast; typedef struct CPUJumpCache CPUJumpCache; typedef struct CPUState CPUState; typedef struct CPUTLBEntryFull CPUTLBEntryFull; From patchwork Thu May 2 15:53:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651854 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 47ED1C25B5C for ; Thu, 2 May 2024 15:55:12 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2YlP-0001PZ-15; Thu, 02 May 2024 11:54:27 -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 1s2Yl9-0000x7-Fm for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:13 -0400 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 1s2Yl7-0002Ob-Cv for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FtBhkmkXIzApssHVLlGMVUZMyVYQcct5zCRdK4CsSCk=; b=Gf4MGDLeiKfhfX5CokziMuEd3yvFJPhYKgWmmOMctOL+THFJD1evqFX5/cZ3keaKWAI8fY mL4AY8oBOsFp+Aqmz3ZVxSg6+rbx6y+rl0EzHNubnP/cue81+t0xqTCJOqTfBWrAAeXE2L pK89X1oQ7j+WzlS2symNmDLDmNMm5VA= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-113-tQaaipzpMgaB4uQl_aSkig-1; Thu, 02 May 2024 11:54:04 -0400 X-MC-Unique: tQaaipzpMgaB4uQl_aSkig-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a58d2d13937so194968866b.0 for ; Thu, 02 May 2024 08:54:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665243; x=1715270043; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FtBhkmkXIzApssHVLlGMVUZMyVYQcct5zCRdK4CsSCk=; b=VzivnNW4ihGLhmjmdhnVv77sIm8Ucr3QZtQhWgmdIu0GIjE15yIWuNANIZfLxL+DXh hT7g9KFkY5ENR+D7Xgf2mqj63pRIdzYiR78L01+mNw7ALrxjPJ4cqMR61nMNOiV8MLGC MRRRxJowwiLUjzVTFngjEZc4pq5LXiK5vI/+VdEyGGYEoSWQ2DRkzL6EM190oInqA8g3 QFlOk2a6IteJa95vsZzyqK5GxqC3j2DKIIhruB4GkyQg0WIx2f3mBJqQEWVjNVe5slcU IKSroF3vh+GDiiULOntfjLFUQSiik2AUBkdIc45LIDttEZUc2m1zifoxkriSZLPco+TW U9yg== X-Gm-Message-State: AOJu0YxQqoswPdzdSDCF5WYG5xHVgvLjMpIAZgohN1Ys3707vkLBh0px 5QOqG4ZBbdfLkpK0s4XpY0fwwlDmKkWgjnkbFRQSdNlWAwibP7QrTmeOPpdLpshwiRZSAO0ijRV 7DToz6ylt61bdLeFeo1CJmHpDFEvtsPjfoI38UYvK+GJ8zzAiI8j5p7NNMi0nFVpDAmErO6rwpr iZV4KeV18cUKYsRpNwIVG/U7VzBUSoRktRohXZ X-Received: by 2002:a50:aad1:0:b0:572:689f:6380 with SMTP id r17-20020a50aad1000000b00572689f6380mr5181856edc.3.1714665243239; Thu, 02 May 2024 08:54:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3fMzml2XGHmHQHsuK7d5oOdr2YwshJ3w5WHo5ccPlaqweuyij2bR6VrhziKlFFhlac3uLCw== X-Received: by 2002:a50:aad1:0:b0:572:689f:6380 with SMTP id r17-20020a50aad1000000b00572689f6380mr5181838edc.3.1714665242896; Thu, 02 May 2024 08:54:02 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id el4-20020a056402360400b005725ffd7305sm646956edb.75.2024.05.02.08.54.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:54:02 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 11/13] display: remove GraphicHwOps from typedefs.h Date: Thu, 2 May 2024 17:53:29 +0200 Message-ID: <20240502155331.109297-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Basically all uses of GraphicHwOps are defining an instance of it, which requires the full definition of the struct. It is pointless to have it in typedefs.h. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- hw/display/vga_int.h | 1 + include/qemu/typedefs.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index 876a1d3697b..f77c1c11457 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -25,6 +25,7 @@ #ifndef HW_VGA_INT_H #define HW_VGA_INT_H +#include "ui/console.h" #include "exec/ioport.h" #include "exec/memory.h" diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 78598f27f32..7e3597e94c5 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -53,7 +53,6 @@ typedef struct Error Error; typedef struct EventNotifier EventNotifier; typedef struct FlatView FlatView; typedef struct FWCfgState FWCfgState; -typedef struct GraphicHwOps GraphicHwOps; typedef struct HostMemoryBackend HostMemoryBackend; typedef struct I2CBus I2CBus; typedef struct I2SCodec I2SCodec; From patchwork Thu May 2 15:53:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651856 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BF75FC04FFE for ; Thu, 2 May 2024 15:55:17 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2YlP-0001RH-GK; Thu, 02 May 2024 11:54:27 -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 1s2YlB-00013G-CU for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:17 -0400 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 1s2Yl8-0002Oj-I3 for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NFofCkIX6ZCOAYjcqWsduwPTtWRGt+ZtQlacHrjsajI=; b=Tnk7fnQu57LGF+YF34g3/ux9JVCVdjTuuLlmaEE7PBv59p/dms+RB1vrfUxFc7uU34+W4+ xjz58Z4uDYiNIEd2of3ibUkGthnYf2eWVP0LngbvUDngrZAkr2yhYczkoHQgzkJ1aJvFqp lQHr5wy2pF/T+apZormEoyqJavPSGtQ= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-479-H09UaJtrOLW_JDS5E0CiLQ-1; Thu, 02 May 2024 11:54:07 -0400 X-MC-Unique: H09UaJtrOLW_JDS5E0CiLQ-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a58bca80981so439737166b.0 for ; Thu, 02 May 2024 08:54:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665246; x=1715270046; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NFofCkIX6ZCOAYjcqWsduwPTtWRGt+ZtQlacHrjsajI=; b=YmFh9rmgrT0q/Ut2K/J//Hu1wJIz2iABO3kzrtpu5wYNMzBpvmu/JYLVABAmdTKKuR 306cSOC0J94aKykiHBbU1Wt1GjnaYRspb4fhOw5wNKKOcKPCkiKiQIyzxF5/7SzjeZoJ ckEomehJspHF38/JAel45JOIJ2wP/Fk2TzGxIKtCfoRO8BN0J85m8GXmJqdHZ0MVRiVg UIdXLm7qVtzepCiE2TmQqQX6pIzeD1VUE91mF3009CTj5O3wcZT0fSqpgzpvX8oL3iUk dgJUsjl0/7s6BuLvZvg74fGI2eiu6RKOdK/BJey8bCsrX/ChnIdeKIhR6cL+3FF7rUah vSVA== X-Gm-Message-State: AOJu0YwhPaR+5heB4c2Jzzbe6Ph9CjScAvX+ZofekOvaKoAGtXYRh6gI CChNlXKAuwQpcliVUuGjNUN/pO+YJYgsH3pqfo2eqfGmhz5qfIKidciUBMHffVJz7p37yn3JR8S 4RA3egNkktOrsQu3Rl5yj97xNEEKfmK5Na3nuwXr6WG1QHTPhGPxGU/r2vpI/w+7JGk6FTliCzL +zdtVHdn5ylIjtHi/F5rDnrUws1bq3ZTiGbM7W X-Received: by 2002:a17:906:37c8:b0:a58:849f:4d18 with SMTP id o8-20020a17090637c800b00a58849f4d18mr4304485ejc.35.1714665245944; Thu, 02 May 2024 08:54:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEy2xl4oXlR5Uy/S1LKZDYXexegjbuDZq6qyaXqbSNnWvLJNEoK1oNy43kalRgsPt0Sipp5tw== X-Received: by 2002:a17:906:37c8:b0:a58:849f:4d18 with SMTP id o8-20020a17090637c800b00a58849f4d18mr4304476ejc.35.1714665245563; Thu, 02 May 2024 08:54:05 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id mj17-20020a170906af9100b00a58f1eff266sm690173ejb.189.2024.05.02.08.54.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:54:05 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 12/13] tcg: remove CPU* types from typedefs.h Date: Thu, 2 May 2024 17:53:30 +0200 Message-ID: <20240502155331.109297-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org hw/core/cpu.h is already using struct forward declarations in some cases to avoid inclusions, and otherwise CPUAddressSpace and CPUJumpCache are only used together with their definition. CPUTLBEntryFull is always used when their definition is available. Remove all three from typedefs.h. Signed-off-by: Paolo Bonzini --- accel/tcg/tb-jmp-cache.h | 4 ++-- include/hw/core/cpu.h | 10 ++++++++-- include/qemu/typedefs.h | 3 --- system/physmem.c | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/accel/tcg/tb-jmp-cache.h b/accel/tcg/tb-jmp-cache.h index 184bb3e3e2e..c3a505e394a 100644 --- a/accel/tcg/tb-jmp-cache.h +++ b/accel/tcg/tb-jmp-cache.h @@ -22,12 +22,12 @@ * non-NULL value of 'tb'. Strictly speaking pc is only needed for * CF_PCREL, but it's used always for simplicity. */ -struct CPUJumpCache { +typedef struct CPUJumpCache { struct rcu_head rcu; struct { TranslationBlock *tb; vaddr pc; } array[TB_JMP_CACHE_SIZE]; -}; +} CPUJumpCache; #endif /* ACCEL_TCG_TB_JMP_CACHE_H */ diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index a23d39f6a0c..1382a986158 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -85,6 +85,12 @@ DECLARE_CLASS_CHECKERS(CPUClass, CPU, typedef struct CPUWatchpoint CPUWatchpoint; +/* see physmem.c */ +struct CPUAddressSpace; + +/* see accel/tcg/tb-jmp-cache.h */ +struct CPUJumpCache; + /* see accel-cpu.h */ struct AccelCPUClass; @@ -473,12 +479,12 @@ struct CPUState { QemuMutex work_mutex; QSIMPLEQ_HEAD(, qemu_work_item) work_list; - CPUAddressSpace *cpu_ases; + struct CPUAddressSpace *cpu_ases; int num_ases; AddressSpace *as; MemoryRegion *memory; - CPUJumpCache *tb_jmp_cache; + struct CPUJumpCache *tb_jmp_cache; GArray *gdb_regs; int gdb_num_regs; diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 7e3597e94c5..d23020ed232 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -38,12 +38,9 @@ typedef struct BusState BusState; typedef struct Chardev Chardev; typedef struct Clock Clock; typedef struct ConfidentialGuestSupport ConfidentialGuestSupport; -typedef struct CPUAddressSpace CPUAddressSpace; typedef struct CPUArchState CPUArchState; typedef struct CPUPluginState CPUPluginState; -typedef struct CPUJumpCache CPUJumpCache; typedef struct CPUState CPUState; -typedef struct CPUTLBEntryFull CPUTLBEntryFull; typedef struct DeviceState DeviceState; typedef struct DirtyBitmapSnapshot DirtyBitmapSnapshot; typedef struct DisplayChangeListener DisplayChangeListener; diff --git a/system/physmem.c b/system/physmem.c index 1a81c226bae..6dc58b34bbb 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -158,12 +158,12 @@ static void tcg_commit(MemoryListener *listener); * @memory_dispatch: its dispatch pointer (cached, RCU protected) * @tcg_as_listener: listener for tracking changes to the AddressSpace */ -struct CPUAddressSpace { +typedef struct CPUAddressSpace { CPUState *cpu; AddressSpace *as; struct AddressSpaceDispatch *memory_dispatch; MemoryListener tcg_as_listener; -}; +} CPUAddressSpace; struct DirtyBitmapSnapshot { ram_addr_t start; From patchwork Thu May 2 15:53:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 13651861 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73926C4345F for ; Thu, 2 May 2024 15:56:14 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2YlQ-0001Yc-Cd; Thu, 02 May 2024 11:54:28 -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 1s2YlE-00017I-9d for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:18 -0400 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 1s2Yl9-0002P0-JY for qemu-devel@nongnu.org; Thu, 02 May 2024 11:54:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714665251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PBc91Al63eay/PNo3RVE1I5QeuiworYFdD0LlT+cZG4=; b=jTNp0e7vxDJdmWFS800v6XHiSjB7AqlNuzml1jQLnNAL1fSgI82ad+s7mSDy5EW4TbvHCW 4uzl5W9bqGPZLwGoxJ/kYuc382TgEX+GRJ9tw0hrv/WYBl/iC0NeyMIQtEMBayQUwMBhim 3uNA9Tjj/qFCFOoLJJFcDRzPsmbfLtE= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-660--OmuU557OrKqDm7he4i-hg-1; Thu, 02 May 2024 11:54:09 -0400 X-MC-Unique: -OmuU557OrKqDm7he4i-hg-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-571fdbf99f4so465158a12.3 for ; Thu, 02 May 2024 08:54:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714665248; x=1715270048; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PBc91Al63eay/PNo3RVE1I5QeuiworYFdD0LlT+cZG4=; b=t8JD6nUwBpqNSa+uYP6LPoVG0KMj7vZ1cdnWxGSWePG8CuOS8b6kC4TteuVBAEGjrQ edSB9mylLyzWOHYhUKpRbELt4uO4YbQb8+P0xjm/DnCujTSWPrEzyZUPE8Do3QpJsS+v AMY7gxXZxa7Q4hBP4d0AB7cvR9yH30GQXVMQDjNcrbFKnCEgty/sdopSX00VJHFyzo9s deGD4XDPhd1AqelniS0LFYJ7KT98F2kZASsi/q9GcVSUBuNL47+HVFS8lAHms+LY7KXw NMG/z/AH5/vrt6MQndax1cFANlH/TrxR8R3lcSCfcAgP+F1ziMu5hOJpUsc3TQIf78qJ a/YA== X-Gm-Message-State: AOJu0Yy/PBtP0wCwdWyCGn/YqOKLNSSuonaOb8F6Elbhtw1Yigf8noNU 1IzljgUTm5CJQjRD7vuwcfcb2kxF5vu0aM/mv4J+FmiZpJtNvYc7Ot5l8xKvfYV+Ns1cPNkmhnI EqH7tPSXfbvO/nj/PYW/yYb+5zdHb0yeyhruk+cBsd3dSPL+XGUr2hvcDeRHaPxhuWrRrksjYJG +5K9TPhcZBtN5DlPtxJBFUCbJAM2SAo+aQWehD X-Received: by 2002:a50:bb02:0:b0:56e:2cb6:480e with SMTP id y2-20020a50bb02000000b0056e2cb6480emr4816816ede.38.1714665248279; Thu, 02 May 2024 08:54:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGriFC25raM7vICZKZk1VvmSfhez5MMIgmve613I0TnVQrSmUVvmLJOXH1DZmvVCbu4QPQSAA== X-Received: by 2002:a50:bb02:0:b0:56e:2cb6:480e with SMTP id y2-20020a50bb02000000b0056e2cb6480emr4816802ede.38.1714665247940; Thu, 02 May 2024 08:54:07 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id w14-20020a056402128e00b0057278b1b139sm653698edv.29.2024.05.02.08.54.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:54:07 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 13/13] pci: remove some types from typedefs.h Date: Thu, 2 May 2024 17:53:31 +0200 Message-ID: <20240502155331.109297-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240502155331.109297-1-pbonzini@redhat.com> References: <20240502155331.109297-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.476, 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org For types that are embedded in structs defined by pci.h, the definition is pretty much required to be available. Remove them from typedefs.h. Signed-off-by: Paolo Bonzini --- include/hw/pci/pcie.h | 3 +++ include/hw/pci/pcie_aer.h | 38 ++++++++++++++++++------------------- include/hw/pci/pcie_sriov.h | 8 ++++---- include/qemu/typedefs.h | 5 ----- 4 files changed, 26 insertions(+), 28 deletions(-) diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h index 11f5a91bbb7..5eddb909769 100644 --- a/include/hw/pci/pcie.h +++ b/include/hw/pci/pcie.h @@ -27,6 +27,9 @@ #include "hw/pci/pcie_sriov.h" #include "hw/hotplug.h" +typedef struct PCIEPort PCIEPort; +typedef struct PCIESlot PCIESlot; + typedef enum { /* these bits must match the bits in Slot Control/Status registers. * PCI_EXP_HP_EV_xxx = PCI_EXP_SLTCTL_xxxE = PCI_EXP_SLTSTA_xxx diff --git a/include/hw/pci/pcie_aer.h b/include/hw/pci/pcie_aer.h index 4a9f0ea69dc..4d8c0e05077 100644 --- a/include/hw/pci/pcie_aer.h +++ b/include/hw/pci/pcie_aer.h @@ -25,8 +25,23 @@ /* definitions which PCIExpressDevice uses */ +/* error */ +typedef struct PCIEAERErr { + uint32_t status; /* error status bits */ + uint16_t source_id; /* bdf */ + +#define PCIE_AER_ERR_IS_CORRECTABLE 0x1 /* correctable/uncorrectable */ +#define PCIE_AER_ERR_MAYBE_ADVISORY 0x2 /* maybe advisory non-fatal */ +#define PCIE_AER_ERR_HEADER_VALID 0x4 /* TLP header is logged */ +#define PCIE_AER_ERR_TLP_PREFIX_PRESENT 0x8 /* TLP Prefix is logged */ + uint16_t flags; + + uint32_t header[4]; /* TLP header */ + uint32_t prefix[4]; /* TLP header prefix */ +} PCIEAERErr; + /* AER log */ -struct PCIEAERLog { +typedef struct PCIEAERLog { /* This structure is saved/loaded. So explicitly size them instead of unsigned int */ @@ -48,11 +63,11 @@ struct PCIEAERLog { /* Error log. log_max-sized array */ PCIEAERErr *log; -}; +} PCIEAERLog; /* aer error message: error signaling message has only error severity and source id. See 2.2.8.3 error signaling messages */ -struct PCIEAERMsg { +typedef struct PCIEAERMsg { /* * PCI_ERR_ROOT_CMD_{COR, NONFATAL, FATAL}_EN * = PCI_EXP_DEVCTL_{CERE, NFERE, FERE} @@ -60,7 +75,7 @@ struct PCIEAERMsg { uint32_t severity; uint16_t source_id; /* bdf */ -}; +} PCIEAERMsg; static inline bool pcie_aer_msg_is_uncor(const PCIEAERMsg *msg) @@ -69,21 +84,6 @@ pcie_aer_msg_is_uncor(const PCIEAERMsg *msg) msg->severity == PCI_ERR_ROOT_CMD_FATAL_EN; } -/* error */ -struct PCIEAERErr { - uint32_t status; /* error status bits */ - uint16_t source_id; /* bdf */ - -#define PCIE_AER_ERR_IS_CORRECTABLE 0x1 /* correctable/uncorrectable */ -#define PCIE_AER_ERR_MAYBE_ADVISORY 0x2 /* maybe advisory non-fatal */ -#define PCIE_AER_ERR_HEADER_VALID 0x4 /* TLP header is logged */ -#define PCIE_AER_ERR_TLP_PREFIX_PRESENT 0x8 /* TLP Prefix is logged */ - uint16_t flags; - - uint32_t header[4]; /* TLP header */ - uint32_t prefix[4]; /* TLP header prefix */ -}; - extern const VMStateDescription vmstate_pcie_aer_log; int pcie_aer_init(PCIDevice *dev, uint8_t cap_ver, uint16_t offset, diff --git a/include/hw/pci/pcie_sriov.h b/include/hw/pci/pcie_sriov.h index b77eb7bf58a..450cbef6c20 100644 --- a/include/hw/pci/pcie_sriov.h +++ b/include/hw/pci/pcie_sriov.h @@ -15,17 +15,17 @@ #include "hw/pci/pci.h" -struct PCIESriovPF { +typedef struct PCIESriovPF { uint16_t num_vfs; /* Number of virtual functions created */ uint8_t vf_bar_type[PCI_NUM_REGIONS]; /* Store type for each VF bar */ const char *vfname; /* Reference to the device type used for the VFs */ PCIDevice **vf; /* Pointer to an array of num_vfs VF devices */ -}; +} PCIESriovPF; -struct PCIESriovVF { +typedef struct PCIESriovVF { PCIDevice *pf; /* Pointer back to owner physical function */ uint16_t vf_number; /* Logical VF number of this function */ -}; +} PCIESriovVF; void pcie_sriov_pf_init(PCIDevice *dev, uint16_t offset, const char *vfname, uint16_t vf_dev_id, diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index d23020ed232..5d999e20d7c 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -78,13 +78,8 @@ typedef struct ObjectClass ObjectClass; typedef struct PCIBridge PCIBridge; typedef struct PCIBus PCIBus; typedef struct PCIDevice PCIDevice; -typedef struct PCIEAERErr PCIEAERErr; -typedef struct PCIEAERLog PCIEAERLog; -typedef struct PCIEAERMsg PCIEAERMsg; typedef struct PCIEPort PCIEPort; typedef struct PCIESlot PCIESlot; -typedef struct PCIESriovPF PCIESriovPF; -typedef struct PCIESriovVF PCIESriovVF; typedef struct PCIExpressDevice PCIExpressDevice; typedef struct PCIExpressHost PCIExpressHost; typedef struct PCIHostDeviceAddress PCIHostDeviceAddress;