From patchwork Tue Sep 5 14:56:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 720124 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp2174487wrh; Tue, 5 Sep 2023 07:57:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHmGx9fiCWz7yWTiAOGalAAibqF00/WzI8ufK1BCrIgowgeTy+z8aRo6gplwukSFgxnrtXb X-Received: by 2002:a05:620a:d8d:b0:75b:23a1:8336 with SMTP id q13-20020a05620a0d8d00b0075b23a18336mr14709101qkl.49.1693925855498; Tue, 05 Sep 2023 07:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693925855; cv=none; d=google.com; s=arc-20160816; b=hKOfjQ5ALqLgfiX2Xvqh9RF7NTjxQjKMj7FOPXB0Ucg1y2riNcZrpy7Kw0kH25L1eC cFdWUBJqqOrQbByCRs863xzAFiVsVri1bnbHtOK/rbb4fiz3UHU6G5uc4OBUlxE5QPRu m4TI8otYRzL14YO8Eo1/OxkrsKgfjE8EvsrsuwTrz9OFapJ44lRdAoEYM87aYcyURwEb MlT8/2L7hJ9eVBep08yoLKAXrAW5NymvK8Ll3qYv3iHRjkcK7zpOuCwFD8q+j47xtmyy 4c3XgY8PlJkDrVge4D4BPQQTF2J/1r8vDnruSqV1s9LCSTl0dTaZuu7Pp+z2rS8rb8F7 JzJA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=2K7Dxy2K8CwrBt/sLg+giXPMeT4e/F4Re5CMN6L3iEU=; fh=Uq4CCH4qgIScoA1ZlzK6h1LD8Rw6xac8JtYTs6G5zlc=; b=vPui4CJLxaqcDfBkf0tUJ2Hwn8huaqgoVSqMirKtAMOwwV72lbpImgs2pmqOCgEyT8 YUqqYZgaeJCIgcWUivx1gRyaG8pkEx7sp6uh+Yx5Ii/W+TDsR9wn9C/MQob05+YfAYX5 eOcoCYGlWc4Zq52h5Gp1NJkDu3cNhZi/5ZwWQIMM6OoLH6viIGhqb7MkE05sNPqglGI/ 1iUN8cLS5UD7Jtr5g3mpp0K0uzCKmp/B7n81kNLwufEUsdlhlwQRswFq6Zl5GuXvMwFP AT189dXzFu8DP0+ku5ihjLG2K1Ae+p08042yws0ShBFDKq7NQ5qSbsdiP36bk2PzGoUd gi4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i3y7EOkV; 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 o2-20020a05620a22c200b0076ce743153asi7477557qki.705.2023.09.05.07.57.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Sep 2023 07:57:35 -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=i3y7EOkV; 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 1qdXUB-0002u7-2A; Tue, 05 Sep 2023 10:56:59 -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 1qdXU9-0002tl-TU for qemu-devel@nongnu.org; Tue, 05 Sep 2023 10:56:57 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdXU7-0005fI-O7 for qemu-devel@nongnu.org; Tue, 05 Sep 2023 10:56:57 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3fbd33a57b6so24534005e9.2 for ; Tue, 05 Sep 2023 07:56:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693925813; x=1694530613; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2K7Dxy2K8CwrBt/sLg+giXPMeT4e/F4Re5CMN6L3iEU=; b=i3y7EOkVAHEv47Mk8BKRdye7+BnYbPIiO2rhok5Gv8rweU95kfklBqRHZK6tG60R3O 0N65du/362TKfHY151WtWy86BPBWFsH3lBQhRDKP3DkPvUvSorzIKF++CfJ44LRPef1G ktpTTYn1glTybcKl0m9TynoRipo+m+Sj3jl0P7/aSI2Dz4q/yLd8ccOxpITdJF9JKRQ6 87yXNCtpt5IaA5hIjdFa0hnqPQFeRtcZA8amnguxkHrMNCT8tMWXh3PXYa/Uh0DsSghc JIWLzCAFM48e9mDQRBLq3kBAGUbRLREX0qvblLKsUcpWcx4bQYOAk/pZX7kas8+qZdwX 3poA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693925813; x=1694530613; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2K7Dxy2K8CwrBt/sLg+giXPMeT4e/F4Re5CMN6L3iEU=; b=MsV89+ir6H6K0wG9x43A9UiXd1fVCXKQqa7Z0PNwtF0ZFDGhpLZi43nxtUJbSjTe8Y wIGppPE1IONgVpdKWiOb900mj5fWwKQ+ffQN8OsrR3vw9bTkCchuCOjguqsPpZhLM1z2 THqsEGxPuGuaFUaFqZYb3gjXGwOoVzZaXMsoZwZKLwI72r/8emjE4J/TMkwnzNwhryql jAhGHGytMcM/8/RbGQKwmcHA/I+c1MoTX+cWmu6NvF3+jR34pU4szK+pnmFsyRO55tnA 8ld52OLCA2K1y0emEm58cRo5I8wDsh5F5WBPObLSaO9DpFrSVDiRosR8EFieNW2rj8ou CFHQ== X-Gm-Message-State: AOJu0Yym0OyJ1WBYDXSxu2xRuU5Kyt1w+olAiCk7POdvFLHJ8Y0swDlL IZ1Dv5FwTyHtwR+y8R9AVjBq+BeZWyjBiZmngvw= X-Received: by 2002:a1c:7905:0:b0:3fe:1b4e:c484 with SMTP id l5-20020a1c7905000000b003fe1b4ec484mr2935wme.5.1693925813433; Tue, 05 Sep 2023 07:56:53 -0700 (PDT) Received: from m1x-phil.lan (mst45-h01-176-184-47-79.dsl.sta.abo.bbox.fr. [176.184.47.79]) by smtp.gmail.com with ESMTPSA id f22-20020a7bc8d6000000b00401c9228bf7sm17072083wml.18.2023.09.05.07.56.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Sep 2023 07:56:53 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH] hw/intc/arm_gicv3: Simplify gicv3_class_name() logic Date: Tue, 5 Sep 2023 16:56:51 +0200 Message-ID: <20230905145651.8199-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Simplify gicv3_class_name() logic. No functional change intended. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Francisco Iglesias --- hw/intc/arm_gicv3_common.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c index 2ebf880ead..8863f06b67 100644 --- a/hw/intc/arm_gicv3_common.c +++ b/hw/intc/arm_gicv3_common.c @@ -612,13 +612,12 @@ type_init(register_types) const char *gicv3_class_name(void) { - if (kvm_irqchip_in_kernel()) { - return "kvm-arm-gicv3"; - } else { - if (kvm_enabled()) { + if (kvm_enabled()) { + if (!kvm_irqchip_in_kernel()) { error_report("Userspace GICv3 is not supported with KVM"); exit(1); } - return "arm-gicv3"; + return "kvm-arm-gicv3"; } + return "arm-gicv3"; }