From patchwork Thu Apr 4 19:47:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 785828 Delivered-To: patch@linaro.org Received: by 2002:adf:f001:0:b0:33e:7753:30bd with SMTP id j1csp1006733wro; Thu, 4 Apr 2024 12:48:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUMVtJHOhuGanpodvbMRf5NBu8jkJ905YMe0MHRU1uLuG77e4lq4KRaKxaBxq8QA2t6vdMJeaZoqnbyjDIQ2Kad X-Google-Smtp-Source: AGHT+IENSl7M+T91WvbfPfHKSOvm6QCnx21uIwY0J27yb9B/KsNQ9yO64gaCj159Y2Izv/Or02jq X-Received: by 2002:a0c:8bc9:0:b0:699:3954:2a3a with SMTP id a9-20020a0c8bc9000000b0069939542a3amr1408991qvc.42.1712260139629; Thu, 04 Apr 2024 12:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712260139; cv=none; d=google.com; s=arc-20160816; b=VXnlTg/Ce6Gr6CptJpo7wPn5DuWsBJyWIM9jFjM62ocq73sCxyWtk86PY0mwGWuu9K V6n2FpxjzU/uy/K3NRM0gzQCQNuVn7+jZqqW9RBuC7+edxBoBVtAgGifwDmP8G6CZcKm 6U6jpgCa1dUY03rhb8aQc1gZ1+EQTRSnSY4yl0/Y9j8QExmeTeybio0Fz9oHPO8TEJEZ 6iGsegHKFvyzgNlxfIOk6Bm21idgkXYGT4lIFOGHEyRZbzLllV58eorPtnoRC6dWBh25 SQ+OmvHCUsLE7ua5fwn1i+dF6RGYIlbTgK87TA/eJLmcRuSQrG7FzkEkmP66vs7nBYkn ZPAQ== 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=hKv08uQvIwv4CwaxEI6a9mBVsBiKx/3Avu57+y233jE=; fh=rNtKOo6T+KwX99mrAO5TGWwJgywmpYHtBgVj0rt3Gpo=; b=P/IWWTVDqSy8NNCXvj1SSwZhVjRGZH5FQWBu+FkxJ6y4aQOnG04ofn/K8Vsf6zfKCJ XuTsM9hbO0wiYnSlWVD6T2VMOHF0C7okgsFLBBxoLv41fbScVmoYdCXsqMHk0AIw+J8k uukNlInUfJxg5mclAp2vWxj4DJbQfLAou++lRCcsZIJT7OTFM+GxEIKdZaha09UUK0zL S2SuFK6YHONqpNn2qKWny6RDeh5MXOlSKExdDD17TAMelpYCtiaFfRKKR78mk8t0bGw7 9k/BeOWat3S0GIIvRY55b+/NVWDD1aKoMBM7EEC1vcsxAyXKl2q+KdnvtzoZMkVwXbqF csWA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nBTXWU+l; 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 d8-20020a0cdb08000000b006915cc2afedsi44523qvk.244.2024.04.04.12.48.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2024 12:48:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nBTXWU+l; 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 1rsT4b-0006ZZ-TD; Thu, 04 Apr 2024 15:48:33 -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 1rsT4a-0006Z9-2l for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:32 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsT4Y-0000NC-I3 for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:31 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-343dc588c86so107202f8f.3 for ; Thu, 04 Apr 2024 12:48:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712260109; x=1712864909; 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=hKv08uQvIwv4CwaxEI6a9mBVsBiKx/3Avu57+y233jE=; b=nBTXWU+lNHnQhbi1YvOHsVUtslROe4BkznU2x1aPg6FHbUNOCcaFfkNgzyfAvR9mkr WjUlQAUPgiHvNRHlaukNVJh1gOiFd+pF7Bz3UUrEu3JMmPeUSV9ggUlpiNo3OirYiJa3 suO9+sR9Xkd6Ahlwezv7bsk0C8z09Xl0sCAwFKFeIg8KSDKTGucfX2TzTalqUltez3HQ pF4HjAViktDhHBOOwtazAmzH9BcScI7F/WAnT7QQyZ6InTInd/weTo6g/CHz0rtN+W9c GtNBRISayy92MKvJl1ysnHwZ743aW4vzZCA05LBHNtjC3LXruY8uspO4W+MVL3PGayLm /9jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712260109; x=1712864909; 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=hKv08uQvIwv4CwaxEI6a9mBVsBiKx/3Avu57+y233jE=; b=c3q1+gwD/gtvnU/g2UNOHx2i0rYTFilQYwWf0HCObVLbYS/RjX5m4arEvnXfX50cux FIKlZC8JZx5rFe8SBXmDFq7vgtiFKuf9ligYqI3T5SMjQxOnZjm5ZovZPooilwXAWlz6 l1t7ajQoMa8GEufgYU608b3ixhaKKxAKEfLp4oBQe9k4oKUJV5IoaVCYIDZ/rIaMxICk stxCouNfAlTshD03IF9em325EXR+/P4vvctm+J71Q5+S1BtNOAfFtZesZRniStuxLf7l cettSULH4cL6ccnqf6Ej0EVenGdEbAbZMEUmn7flDrmMFFG2CmWiJhaP8zze2ADFxX3i +o2w== X-Forwarded-Encrypted: i=1; AJvYcCUBtcLw1IMOJWcU0vAh+asqXIxypP1KNNyQbX1Ia43H414j6CXQCCQsba+ie+oLjMwLAlbb5Yrq/4Xdwnz1dhlXtc5h2pw= X-Gm-Message-State: AOJu0YxjqGC+wi7/+XTaFgMXm9fgt4xJha7x2WNkWTfiRUpZVLdTi27i zmybcHLgRxhXD5WWfWxr9wVL2S6udGOb7+KrJqrlYrg/eVAgP5N4/m5AYBIgY28= X-Received: by 2002:a5d:4589:0:b0:343:6ca4:97e8 with SMTP id p9-20020a5d4589000000b003436ca497e8mr2590444wrq.45.1712260109059; Thu, 04 Apr 2024 12:48:29 -0700 (PDT) Received: from m1x-phil.lan ([176.187.216.111]) by smtp.gmail.com with ESMTPSA id r18-20020adfce92000000b00343d1d09550sm159871wrn.60.2024.04.04.12.48.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 04 Apr 2024 12:48:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , Peter Maydell Subject: [PATCH-for-9.1 5/7] hw/core: Restrict reset handlers API to system emulation Date: Thu, 4 Apr 2024 21:47:55 +0200 Message-ID: <20240404194757.9343-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240404194757.9343-1-philmd@linaro.org> References: <20240404194757.9343-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Headers in include/sysemu/ are specific to system emulation and should not be used in user emulation. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/reset.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/core/reset.c b/hw/core/reset.c index d50da7e304..167c8bf1a9 100644 --- a/hw/core/reset.c +++ b/hw/core/reset.c @@ -24,7 +24,9 @@ */ #include "qemu/osdep.h" +#ifndef CONFIG_USER_ONLY #include "sysemu/reset.h" +#endif #include "hw/resettable.h" #include "hw/core/resetcontainer.h" @@ -43,6 +45,7 @@ static ResettableContainer *get_root_reset_container(void) return root_reset_container; } +#ifndef CONFIG_USER_ONLY /* * Reason why the currently in-progress qemu_devices_reset() was called. * If we made at least SHUTDOWN_CAUSE_SNAPSHOT_LOAD have a corresponding @@ -185,3 +188,4 @@ void qemu_devices_reset(ShutdownCause reason) /* Reset the simulation */ resettable_reset(OBJECT(get_root_reset_container()), RESET_TYPE_COLD); } +#endif