From patchwork Thu Jan 17 03:09:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 10767485 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1C04A17FB for ; Thu, 17 Jan 2019 03:10:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BFBD2E84E for ; Thu, 17 Jan 2019 03:10:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F35022E866; Thu, 17 Jan 2019 03:10:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9FAF92E84E for ; Thu, 17 Jan 2019 03:10:23 +0000 (UTC) Received: from localhost ([127.0.0.1]:59820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjy4U-0005Mm-4k for patchwork-qemu-devel@patchwork.kernel.org; Wed, 16 Jan 2019 22:10:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjy3o-0004nH-DJ for qemu-devel@nongnu.org; Wed, 16 Jan 2019 22:09:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjy3n-00040w-Fc for qemu-devel@nongnu.org; Wed, 16 Jan 2019 22:09:40 -0500 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:41564) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjy3k-0003kN-0Y; Wed, 16 Jan 2019 22:09:36 -0500 Received: by mail-ot1-x342.google.com with SMTP id u16so9816466otk.8; Wed, 16 Jan 2019 19:09:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=tAbRK/AWtCj5C/OoApgxH8zP11ek+7ilq7+GGiiBQQc=; b=VpwPGNB0MovEyYHfrXAx17ASR6Q9yY0Dpd/gHLeS3s7Cgh/r3uLFtKIalNPbVPa1ZI d3CHYf01V1MhZPmNcFjNoN17Jrc2t8LIo+gRjjUPno+/9pDmAn2OtQQyAWUPNrjsnkAo YxeYSuGKrrnA6iZXqV+6O8N/J7rMhPcSY+OBkRQRvQkfElJLZhjCoRLiQggljVMcoe6X m9WV+ApQs9dUsNAsa7atbPEy2c0xGlACe1yhk0h8D2yWq4Ac7B4nByDI/Z0MG64gmY+e OHB6QVN6YsYadiDV3GPzL3JH0gi/25oEjc9Z1C39MxouDMDHWfqQ4tCvP3sG0qcMEwBZ LLpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tAbRK/AWtCj5C/OoApgxH8zP11ek+7ilq7+GGiiBQQc=; b=ozkIn1/q7aX8c7f/DjBlzeo4rLwTc8nXY5nyIhHudzUqsbQ7hs+6yNHye+aPLjqJ14 JHCOPue2q3mD4eaFab+2rivFDmIO2m2geIcP9LK+lUy0fSCwWd/qtt+n++rDZfsUUi8U iS7WC0cEhFMvF+4Oa7Twuvdb4EjFNHqJm6zODOgr96bvagh5hMj5CfLB8YbQkzdjr/s2 WIvU5T3tDY9kQauC/m5SK8S03qZOqLMpKFULNy2JKgyxY0JkIBMWp1mzY+cUU54xw3uw a1hmwz18F2wkfZu5Qs1I9Yi1/k8tUYy19Iu3Dcn28GUB9zTMB6V4P4xwh/at9oWXD3FP 1dkw== X-Gm-Message-State: AJcUukcekPbUu4jaOK7BGU7o9p/gZcn1aKh18w14J8DsJk8p2zvasjG9 4kFgIBbRejdd3P0KcbBKEBLYiyh0 X-Google-Smtp-Source: ALg8bN4u3K7hxiniWofJrfU5blNBGk9RNWvq5x1a7nfR3xo+QApS3PW3KttlYQEG/Twjf9AK8ejqZg== X-Received: by 2002:a9d:664f:: with SMTP id q15mr8202644otm.282.1547694564708; Wed, 16 Jan 2019 19:09:24 -0800 (PST) Received: from MININT-0CAG7HA.hz.ali.com ([47.89.83.50]) by smtp.gmail.com with ESMTPSA id j5sm136947otc.54.2019.01.16.19.09.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 19:09:23 -0800 (PST) From: Shannon Zhao To: qemu-arm@nongnu.org, peter.maydell@linaro.org Date: Thu, 17 Jan 2019 11:09:17 +0800 Message-Id: <20190117030917.18844-1-shannon.zhaosl@gmail.com> X-Mailer: git-send-email 2.18.0.windows.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::342 Subject: [Qemu-devel] [PATCH] ARM: GIC: error out early when creating VGICv2 failed X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Currently if creating a gicv2 VM on the platform without VGICv2 support, it failed in kvm_arm_pmu_set_irq while trying to set the interrupt number for PMU with below error message. KVM_SET_DEVICE_ATTR failed: Invalid argument This error log is a little confused. Also it should error out in kvm_arm_gic_realize early. Signed-off-by: Shannon Zhao Reviewed-by: Andrew Jones --- hw/intc/arm_gic_kvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c index a611e8e..b4f2133 100644 --- a/hw/intc/arm_gic_kvm.c +++ b/hw/intc/arm_gic_kvm.c @@ -554,8 +554,9 @@ static void kvm_arm_gic_realize(DeviceState *dev, Error **errp) KVM_DEV_ARM_VGIC_CTRL_INIT, NULL, true, &error_abort); } - } else if (ret != -ENODEV && ret != -ENOTSUP) { - error_setg_errno(errp, -ret, "error creating in-kernel VGIC"); + } else if (ret != -ENOTSUP) { + error_setg_errno(errp, -ret, "error creating in-kernel VGIC, maybe " + "vGICv2 not support on this platform"); return; }