From patchwork Tue Oct 3 17:30:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 728776 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp2264028wrt; Tue, 3 Oct 2023 10:41:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHFr0V4iJYcHHbxzqoPaLteg1xDLqFQjanVhK2ijp0hgpQWKjgBOyfA3lueP+XxZ7KEe6I3 X-Received: by 2002:a05:6214:b11:b0:65d:179:44ef with SMTP id u17-20020a0562140b1100b0065d017944efmr47747qvj.33.1696354911100; Tue, 03 Oct 2023 10:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696354911; cv=none; d=google.com; s=arc-20160816; b=HTankgLuA6uSA2MHwOXUbvGRlTbRZkTVBgJ5dvNmAY6kMrOMk2v1bi3VFTtPIr/Swe jS/JW2UjtQH7QetiTZpy0PlojqFQOwWHH/VEOlvbiy4WIdb0HOE8yeu3T1mx1p5V3xkw nl1DwYLXmofdu7QVPYn2ZU/p/hHkPAZDRL51S9ipbdmm7JXlzeiBTfKgr8QmcT4/nOBR U3uOLz7yEk7v6udGaQHUz6ArSqNp3hlES7CLMR8XmzvKQq5Wyk+GwQPSP36IJBIHzCht eILPTS9nEF1bbtZKlewNlfoYP8zpQnxRaxK1HoqEs0utLCiqhmBoWzehkmdhduCSvtDS 2jwg== 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=1zFZM0V0cx4lwmDbbxbCpwbX7YB70hzJOZ9UCN0zb+Q=; fh=sd6XhEAYMNoRpNpRiqG9MfFzXLUw2sCcoLeKbMCquJg=; b=oaCO4R7aGlZ85VEnu11+DchLRlge4JdyBgfoVDch8u0vIJfdkAopdKYAIbls+9CJsy Zkf+Q47y1M3NJeFN3sO9MfG8au+k6Jo9d9ZI+Pn+qw+E9QP4RFCp1p0ezgtPpdHJuO2u LUexYqdEe2oZ7n8OqlQoqW4uyDqkhOn6wUWiNq4MzDkgj37jnnEVsp4WtfqBb8x39pyr WH7WjCNsMtgRIiapNHGM5tvi41DelgRDedgnyWRMjqBwM0cq7Xsrl2WCrcEOo5fku7xE yKagHvbfZ+xLev5kqP6m4wrvVnfgkZLA1VLj7dOszj27/K8d7VmEl1+BpDlxWFsGxCFa /RLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V4ZM71uu; 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 u10-20020a0cf1ca000000b0065825cbf33esi705212qvl.86.2023.10.03.10.41.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2023 10:41:51 -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=V4ZM71uu; 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 1qnjEx-0008Mi-7p; Tue, 03 Oct 2023 13:31:23 -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 1qnjEg-0008FU-8N for qemu-devel@nongnu.org; Tue, 03 Oct 2023 13:31:10 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qnjEe-0007S4-5i for qemu-devel@nongnu.org; Tue, 03 Oct 2023 13:31:05 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-690f7d73a3aso937289b3a.0 for ; Tue, 03 Oct 2023 10:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696354261; x=1696959061; 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=1zFZM0V0cx4lwmDbbxbCpwbX7YB70hzJOZ9UCN0zb+Q=; b=V4ZM71uuEfLKx384Tp0AshQspRgmLabwMRZf78Azp4lY3THIFA5TBoqOOu62ATfEfE dLOtTMGMOUwc3IBBuAosQ+mnqgAl8kDqGgGcg/SsEZl2TkaX+x2AAx94wRTHZOfUncRk JzVJGtxrP+CWGxFJmG+MYtw3QQdPQKwZvzAEii/mvuCPD1WUElB9XOOF3C7+mEtkjVLV 0jXXi2jY0QnVbcd8mH0NE1yZUIl6LJNL7w1WpG34zxrdIbn3Ad3nkLjyw8yH8hFHwHYr emjRGuxnB3IgSMZA0BF0KODWyGqtJfsB0VbBvMj7GUM8jQKJHVleWlGJTRPpB82UXoaY VBXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696354261; x=1696959061; 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=1zFZM0V0cx4lwmDbbxbCpwbX7YB70hzJOZ9UCN0zb+Q=; b=OOP/T+fQ5+PaTYk5uh4uVOzRAgUKDx1CY+YpfaYu1Fp29zgIeDSkR8fQ6fW0CiOVON kgOMiRuaS7H0aylXnc3CUoQ0g7cb67eqgbf2pj586hemKIU9OpZ8cg7qGe/42lJ93LMr XTDXrO7jwyOeOvWk2JpwKkLWXEAybq/bSB1/lMYohtFoYXzZES/C7l9liLHjuHOujOsd foYYVYdimIVXi1IYhtBNGZ9i4Yh62010a3ig3LK44ZWxCFp+Lmn981ykm61hY4stBaxD 4sEbR4/MFAKGLlg1FZsNAUkBJcD5C5inQoliXsHrLqcVAfBnKS3ov5p7DNawxFxnALTx zk8Q== X-Gm-Message-State: AOJu0YwviRmRjEXh26McOppv/36M8HndPRTnDvkHB2xqfQC4mQoF8YGR lDfDaQ2rXsMW0hSC89zbFjMznr/+8h/wsVYSKFk= X-Received: by 2002:a05:6a00:b84:b0:68c:49e4:bd71 with SMTP id g4-20020a056a000b8400b0068c49e4bd71mr225522pfj.34.1696354260694; Tue, 03 Oct 2023 10:31:00 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id n7-20020aa78a47000000b00692c5b1a731sm1620195pfa.186.2023.10.03.10.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 10:31:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Claudio Fontana Subject: [PULL 06/47] accel/tcg: Have tcg_exec_realizefn() return a boolean Date: Tue, 3 Oct 2023 10:30:11 -0700 Message-Id: <20231003173052.1601813-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231003173052.1601813-1-richard.henderson@linaro.org> References: <20231003173052.1601813-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.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 From: Philippe Mathieu-Daudé Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have tcg_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Claudio Fontana Message-Id: <20231003123026.99229-7-philmd@linaro.org> Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 2 +- accel/tcg/cpu-exec.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index c2c62160c6..1e5c530ee1 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -422,7 +422,7 @@ void dump_exec_info(GString *buf); /* accel/tcg/cpu-exec.c */ int cpu_exec(CPUState *cpu); -void tcg_exec_realizefn(CPUState *cpu, Error **errp); +bool tcg_exec_realizefn(CPUState *cpu, Error **errp); void tcg_exec_unrealizefn(CPUState *cpu); /** diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index c724e8b6f1..60f1986b85 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -1088,7 +1088,7 @@ int cpu_exec(CPUState *cpu) return ret; } -void tcg_exec_realizefn(CPUState *cpu, Error **errp) +bool tcg_exec_realizefn(CPUState *cpu, Error **errp) { static bool tcg_target_initialized; CPUClass *cc = CPU_GET_CLASS(cpu); @@ -1104,6 +1104,8 @@ void tcg_exec_realizefn(CPUState *cpu, Error **errp) tcg_iommu_init_notifier_list(cpu); #endif /* !CONFIG_USER_ONLY */ /* qemu_plugin_vcpu_init_hook delayed until cpu_index assigned. */ + + return true; } /* undo the initializations in reverse order */