qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH] hw/intc/arm_gicv3: Simplify gicv3_class_name() logic
Date: Tue,  5 Sep 2023 16:56:51 +0200	[thread overview]
Message-ID: <20230905145651.8199-1-philmd@linaro.org> (raw)

Simplify gicv3_class_name() logic. No functional change intended.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 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";
 }
-- 
2.41.0



             reply	other threads:[~2023-09-05 14:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 14:56 Philippe Mathieu-Daudé [this message]
2023-09-05 17:20 ` [PATCH] hw/intc/arm_gicv3: Simplify gicv3_class_name() logic Richard Henderson
2023-09-06  8:40 ` Francisco Iglesias
2023-09-08 12:16 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230905145651.8199-1-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).