From patchwork Tue Dec 20 14:56:23 2022 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: 635471 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2961270pvb; Tue, 20 Dec 2022 06:57:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf6xdQHw2KaO7Iu6BPdAF/os4DX74NURda1y2TfC1UFwpSas/LvE0JPkg+my7N5dQEIiRvJR X-Received: by 2002:ac8:6699:0:b0:3a7:f08f:4788 with SMTP id d25-20020ac86699000000b003a7f08f4788mr60175246qtp.63.1671548257074; Tue, 20 Dec 2022 06:57:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671548257; cv=none; d=google.com; s=arc-20160816; b=LzcQw977Yc2sT0tm7+TE4ayScdBAAz1TSaPlGdgcCeYyzdkhPXxSjVzfam4hN6LdWd NqXWIw3rVN/yRXEM/MWJv89FoJRzhwLpLtBEQL2e0OS3jyHTQQtV1Vu57aMQxRFC5xYr TZhVJiwjyIumnXUQHIW6/RlA8x8rWcGlBElPHWeyjfXIZAT4idFF9yFZR7xbyJQztiJa hVpQl/A+OlM/2HgrWlkEOiSn4zxAycJ72ewND/d6iePMC7Uh7FN7aJlKKZ54Nn/tyIeQ MdPD5c1G/dHJgqbF9qwE4hluIn7AAqx8jpqvsoYKtgs9J+qHjOib2nfqFe2SozEXlkH8 hddA== 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=KTQVfyiY+5oU5Xtk/+Ze+nTz1jeq6EB/aAS/3jJOPVI=; b=kM2Z0wHsRamTfnIj3DyqsBDA/R+VJjsqrf2UnnbSRVAJ6L9JRXc1Sgn8BKxZDZWOSP qM8vuZgGkei7kDGNUGyO4u1UuInjhDRkYF05Nyg9873+C6XsKe5j+Jd8liPJ45zeVwFY AwM6zS8pra/Y4dwbWWfNJ/Honb/wnd0hD3HhQg5nyd4kFIbwAbYiTfgD4gv+ztttUydR 0wAqbV4Ha8DSbGnErTxvkIbOvmCK9tVQ8332OTvrNUIix0rl9UOqE5roe58ertnzmSHN Le0A1lpDLAIdS7G9EY4QMxlc1OkxtUzE9Kse3UxaE2RXCCiBFRWRFjYNMROAHlhEKIbu iMvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jo7oFkhI; 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 ez8-20020a05622a4c8800b003ab18d78114si815988qtb.747.2022.12.20.06.57.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Dec 2022 06:57:37 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jo7oFkhI; 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 1p7e32-0006oV-7z; Tue, 20 Dec 2022 09:56:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p7e2y-0006n4-VF for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:56:49 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7e2x-0004jd-Fu for qemu-devel@nongnu.org; Tue, 20 Dec 2022 09:56:48 -0500 Received: by mail-wm1-x329.google.com with SMTP id c65-20020a1c3544000000b003cfffd00fc0so11337131wma.1 for ; Tue, 20 Dec 2022 06:56:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=KTQVfyiY+5oU5Xtk/+Ze+nTz1jeq6EB/aAS/3jJOPVI=; b=Jo7oFkhIu58yclZNFJIOe2SxiE7d7ZQQphiQm8NYDReZadCRtz3pwThdg+329eC4WC ipppJcpGIet0nwT7F/18FiDNwcLkU9UUjFjZnmJdAJ8cT2IFj4leEodHXfDU7CCpGyTF Hl5PKCXNbeyRwio1kYhcDOOeFMjeOLCla4mgEsZImCX9DrgNvMkdcPGIBU4supzA2To/ UUf/E1Bah1X9GjsokTK8QJnXD82xWBRrAXzN5IwQvwLkmLTKOP8d1wRfzd9H7Ao3Ta9U 3hMbpvSQfKYO62iiOUhuoVBmyNfGs5j7Pdqm+jvv7BVGg1F5Pb10z4blIyATs5xJXubA 8dnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=KTQVfyiY+5oU5Xtk/+Ze+nTz1jeq6EB/aAS/3jJOPVI=; b=rJseoiHLyt3x8WXeDorSSs1KyL4OAIcyL/Bli1tVe39vFGxY9XPwdk8UXw/URVXO9Z EhscSwdty8YjtOuSmzUWh59N5udiLKkSFCBSIWYuWACqrVmYLOSRNHsVnKaeVG33YxDi I6k1tDKPHXyvZdBMFDuh6gXww+LFtKCTRmEygVOlsuo9TwiJFPYRaB9y+FtXK0dxnj+9 cTWOGsPXXLxT09AvGyafwwsvjcz6HZd2PzFmLHJzecobyGUUio7RLIVl9z8YfgohCNgz qwrjjgrValffSbIHbT4F3ADIRBXPx1EwNzJ5nYznMD/8qSLwueKcuVirNH2HCXaA+hfr 41Bg== X-Gm-Message-State: ANoB5plXDsvVt0kFyQBSIfW/NHkycaUWoXU+890i1i/hL60o7fBeLTjD 8VLPbUCKodFuIcN9aBdbgtP10aI/W6gioJ7FZyk= X-Received: by 2002:a05:600c:4fc8:b0:3cf:b067:4142 with SMTP id o8-20020a05600c4fc800b003cfb0674142mr35408720wmq.4.1671548206007; Tue, 20 Dec 2022 06:56:46 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id v2-20020a05600c214200b003cfa81e2eb4sm15828948wml.38.2022.12.20.06.56.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Dec 2022 06:56:45 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Ilya Leoshkevich , Eduardo Habkost , qemu-s390x@nongnu.org, Song Gao , Richard Henderson , David Hildenbrand , Xiaojuan Yang , Thomas Huth , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 3/5] target/loongarch: Restrict sysemu/reset.h to system emulation Date: Tue, 20 Dec 2022 15:56:23 +0100 Message-Id: <20221220145625.26392-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221220145625.26392-1-philmd@linaro.org> References: <20221220145625.26392-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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 In user emulation, threads -- implemented as CPU -- are created/destroyed, but never reset. There is no point in allowing the user emulation access the sysemu/reset API. Signed-off-by: Philippe Mathieu-Daudé --- target/loongarch/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 0fb853d915..441dfbab74 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -16,7 +16,9 @@ #include "internals.h" #include "fpu/softfloat-helpers.h" #include "cpu-csr.h" +#ifndef CONFIG_USER_ONLY #include "sysemu/reset.h" +#endif const char * const regnames[32] = { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",