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: 126590 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp74285ljc; Thu, 1 Feb 2018 12:55:38 -0800 (PST) X-Google-Smtp-Source: AH8x227SaA6qtFCWyAUTjxwfnYLfay4eFq1r6axsIt2Xly5DKoy1G5aG33frWMtJaEkGX+FMLUfN X-Received: by 10.37.68.139 with SMTP id r133mr498335yba.171.1517518538713; Thu, 01 Feb 2018 12:55:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517518538; cv=none; d=google.com; s=arc-20160816; b=heIjm/GNbDFAQvsSaZSXl2RcbSIJ+tlvjYFYYVjBfa3X332FBVCgnQ0a+3ifjZfQiw 106Nqun1IeH/wVNto50Lmd4qul2QSLBserZ4ehf1U40bYC/PQUxEIZYHcdzgF3klDs+O abPjt3MzEo2I223LR88JoOuoszZFRpVdDyPqCZr69biD0qES1vsAyl6Qi9ovoweMpy6i jggpp6BHNQdkCUCcXZWhW7QleKjs4nFnJLlWdNNupEnyXZpn8nbbJfIY4K+phg0H+FiE tPhJy1+r+McTV3MN5qNAvKEJhORsUGTqCAJ2PG8kzPZaBQsjOf4RvnDInvSeZ10baE9J GOpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=YD31+6qrinWZRvX6ZeIr8lIBmJd6BNYpcry3XB9zbIw=; b=cA3NYVERdnBfI3udV7XYAODli/pj7VhYP9goV/Z956/XfjLuxNCL+x/paIH59vRHlF thV+6vUo5hFr//XRM6gtn//QRP9WsaiNggAbqdiX21lSXcAON2lVhpRD12ROKbGh4o7n 1z43WQUJdMq2ZpKxZ5GuujWWXonvgADMXCqGtV6DOGMVL9+KbIIdj/DTMqrTZMsmVd3z hge8RYDXXEsJUG0Qh+8TJlbJXZGocIRkK6ym+j1KaeI6kWCXBJg5g/bjDRFWBGdtC7eU UWMylLQsVKNYp2d9sFumWjyNxTXiGy63cKSGFZQCFmKzPZ0FHzNxlVTOWm2b0il18mli RmRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JHRWzz8q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 130si83021ybm.671.2018.02.01.12.55.38 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 01 Feb 2018 12:55:38 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JHRWzz8q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehLtS-0006Ky-52 for patch@linaro.org; Thu, 01 Feb 2018 15:55:38 -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-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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 --- target/arm/kvm_arm.h | 4 ++++ 1 file changed, 4 insertions(+) -- 2.14.2 Reviewed-by: Philippe Mathieu-Daudé 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"; } }