From patchwork Fri Feb 9 11:03:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 127808 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp521245ljc; Fri, 9 Feb 2018 03:35:51 -0800 (PST) X-Google-Smtp-Source: AH8x225Ri/rLS7k+m3iSME/4BXx0Vu/TByiL14XO1VZBW5gYJXaDgvUpL+icVty/JuMewb6SvC1k X-Received: by 10.13.253.132 with SMTP id n126mr1618001ywf.10.1518176151172; Fri, 09 Feb 2018 03:35:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518176151; cv=none; d=google.com; s=arc-20160816; b=hR1K0fjybXbw6f4Tw/iGJIzEBKuJvcBVJeWQNxO9Y9C2JJkcq3rvH+/ut8SsBMOCyO N+z3+uk3Jn3gTcpCXdg6tsQOERwLjBS4VHrYcXc2BLBhdd9jRDtjveSnMFEzDm36o33G pJw0oCbtQyxgVmhTbjaqU1SQWUlWBcGkXNEY5McCzsukzFLQqBgbnALsPCJNu2v+c01Z Z2JMdAdTsY9LTNbWmEXX28VPGZWabW3DE+p1U3i+AYPWPkDv4o1UxuMSzTnfsbhPkCXX hpb6F9KzIBPUkqBOhIYdPynGWAJJYYRENuc9RmrarAg2S61WTAbXt1cR+fORipkipFgL g+eA== 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:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=VY82TLsocsYE2gQudFIS9RUEGk4hYB7PGvTEZmgT+A8=; b=eO7d9wc43Yl5UkIYvLANHqI8t5OOv0jcM0XUseubFUgpgK74feeKBI8Qwylc8H4Zcp dB6i5cQSddGRXR2OZB6QR5upaVofYU74iyBy+vfrMxunw9+GpigIHqj5LE2WkmgLdAJl qTHwxC4A6ITKM0HfHussYKgOhI7816zyl4Aqv/0QJ6NqfF+WghQmk6HQQ/BMHCvWoAg7 kvlNfaOUAgvBkRWAnMe9SECOsxM0kDhwx4JF6Hy0IFO4H/Jtxk0z8jFhoN/w8BWjNQ0e vWRDR4rcs7c8igQAmioZtjRzFVFMWONJpEnxurERfAmhnBm+jQQYVTjTmUF4Jov6iP8T hEgw== ARC-Authentication-Results: i=1; mx.google.com; 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 202si363520ywo.649.2018.02.09.03.35.50 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 09 Feb 2018 03:35:51 -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; 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]:37468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ek6y6-00047p-IE for patch@linaro.org; Fri, 09 Feb 2018 06:35:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ek6Sv-000163-Hw for qemu-devel@nongnu.org; Fri, 09 Feb 2018 06:03:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ek6Su-00026h-Pa for qemu-devel@nongnu.org; Fri, 09 Feb 2018 06:03:37 -0500 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:46268) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ek6Su-00023a-JX for qemu-devel@nongnu.org; Fri, 09 Feb 2018 06:03:36 -0500 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1ek6St-0002ed-KR for qemu-devel@nongnu.org; Fri, 09 Feb 2018 11:03:35 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 9 Feb 2018 11:03:12 +0000 Message-Id: <20180209110314.11766-29-peter.maydell@linaro.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180209110314.11766-1-peter.maydell@linaro.org> References: <20180209110314.11766-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 28/30] 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Christoffer Dall 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é Message-id: 20180201205307.30343-1-christoffer.dall@linaro.org Signed-off-by: Peter Maydell --- target/arm/kvm_arm.h | 4 ++++ 1 file changed, 4 insertions(+) -- 2.16.1 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"; } }