From patchwork Thu Feb 1 20:53:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 10196047 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E00EB60362 for ; Thu, 1 Feb 2018 21:51:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D64EA28E28 for ; Thu, 1 Feb 2018 21:51:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1A782909C; Thu, 1 Feb 2018 21:51:18 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A274228E28 for ; Thu, 1 Feb 2018 21:33:49 +0000 (UTC) Received: from localhost ([::1]:34134 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehLts-0006io-U0 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 01 Feb 2018 15:56:04 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehLsB-0005aG-E5 for qemu-devel@nongnu.org; Thu, 01 Feb 2018 15:55:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehLr7-0007Cm-BG for qemu-devel@nongnu.org; Thu, 01 Feb 2018 15:54:19 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:36633) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ehLr6-0007Bc-Ut for qemu-devel@nongnu.org; Thu, 01 Feb 2018 15:53:13 -0500 Received: by mail-wm0-x243.google.com with SMTP id f3so8327446wmc.1 for ; Thu, 01 Feb 2018 12:53:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=YD31+6qrinWZRvX6ZeIr8lIBmJd6BNYpcry3XB9zbIw=; b=JHRWzz8qicQkJ/n4it0vvOxz9LTxMvWYCvUxu2nLs09RGC5glp4ijB9mxMGLv2RdH/ zpTHD2kdioA05aKv2OW14XMJrz5uH1/vdBPK1q2HAQfLRf1fDJKExkuNDSgedi58eAaH agOu62i4+eseG8y8RWvUbY3aMQxLzT99nT6f0= 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=YD31+6qrinWZRvX6ZeIr8lIBmJd6BNYpcry3XB9zbIw=; b=DRXJL1aMrnPJUTLEHYTUL2hF6sseWB8nLkI4Wugu6vwXnu+J6aC/OoXt3riCI64jcX MR5SmZ6gYo7CldvZNWSW5Y7wnZgtD5iE+kogR/dH5QuXgANg78AJbGhrSWFbmc2jxtv8 9b+60Odqy7StD/3U/xE3P3q5xaIVyB1mbnobxri6WVh4DpahQ6D4GFzdzsIvNkhhBl6i +XgCjBeT/kBoft0AJkMzDv3RLF7qHxqpJtMAXSpqCTdq1N6E9p+wnjZ/vVigPKGN7O0n Yd4NUKGwBfMkUFY9EF9A293/9Dl2aH21cvBSSRAQOR7tHei+mOtp+fjsswUQkZOjetgt XoSQ== X-Gm-Message-State: AKwxytf3BDbQ0qddJYaSIwIrdZCO79lKaLzhQFoJUfy0yUpy9OcNEyfY 3oxW+gy/mDng3vO8UKECQUyjzka+Wz0= X-Google-Smtp-Source: AH8x224yZeKS0kOJx5Q/ALKlIs0sTPuE5M3hkHD2LaJLL6E4kkDI05WM6MQkjLJ0Yf/vOe8ywtgPRA== X-Received: by 10.80.160.167 with SMTP id 36mr64246530edo.188.1517518391472; Thu, 01 Feb 2018 12:53:11 -0800 (PST) Received: from localhost.localdomain (x50d2404e.cust.hiper.dk. [80.210.64.78]) by smtp.gmail.com with ESMTPSA id x35sm438178edb.55.2018.02.01.12.53.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Feb 2018 12:53:10 -0800 (PST) From: Christoffer Dall To: qemu-devel@nongnu.org Date: Thu, 1 Feb 2018 21:53:07 +0100 Message-Id: <20180201205307.30343-1-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.14.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PATCH] target/arm/kvm: gic: Prevent creating userspace GICv3 with KVM 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: Peter Maydell , Alex Bennee , Christoffer Dall Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP KVM doesn't support emulating a GICv3 in userspace, only GICv2. We currently attempt this anyway, and as a result a KVM guest doesn't receive interrupts and the user is left wondering why. Report an error to the user if this particular combination is requested. Signed-off-by: Christoffer Dall Reviewed-by: Philippe Mathieu-Daudé --- target/arm/kvm_arm.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index ff53e9fafb..cfb7e5af72 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/kvm_arm.h @@ -234,6 +234,10 @@ static inline const char *gicv3_class_name(void) exit(1); #endif } else { + if (kvm_enabled()) { + error_report("Userspace GICv3 is not supported with KVM"); + exit(1); + } return "arm-gicv3"; } }