Received: by 2002:a19:cb43:0:0:0:0:0 with SMTP id b64csp3318589lfg; Wed, 26 Feb 2020 09:09:49 -0800 (PST) X-Google-Smtp-Source: APXvYqz6K2o6HEg8j8UBbAu00domhIb1u+8FXKcm3qqSHU08wxTsz4uaAV0L144mp4NATab+ozt7 X-Received: by 2002:a37:644b:: with SMTP id y72mr67184qkb.193.1582736989176; Wed, 26 Feb 2020 09:09:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582736989; cv=none; d=google.com; s=arc-20160816; b=jY9QmpSXjunbkp16+Yocju8f6XZ6pEZsFdJrJCfFtqDTSB1xkA8asGs9g51808PXJL Pe4XDhV3fOTrOoF01/9NInQ3TauDSIW7D7uhIDLyjfkX1/NmtaJTNBoQe99GEHe/5trs KvgX1DcVZOspXGdZEtMU3hMOxqs2LICcwYIYW8nhLS9WuDPgnLoj4YiNNzHX0gFrtPpi XuPFHnbM/PwFOkHNM9/n11I2FLYWKVQ0jIy8dmLKXeYDWuiEFA/ooGhEmydzI4xeVST9 s6b5GGnGmHRC81W3ip52rLgEqMROAYJYKtjF18jIqAFgg5dMspVoR1p9wwfoCi2wky9r ki7w== 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:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:to:from:subject:dkim-signature; bh=tbipDMXaSAJp7zG5J+AE8EDo2UW8S1OiLcsauThJr7s=; b=mqw5+gjrafhGXNjfEXsEzCESW8izVgkS3SYfGh2C0DYcBhpgg0k8meQjw6Oudmrxkp tFiFsMSRfTvHO+f9xQA6r2IOh/GksU7fgnDvsAVFrOTEHG0mgJ+7Vg8l2VSJwnwZfZnl q5sCFfYLR6JOB4Hkfk1mG1c1VpaxHt04gEVzZXbg31RIZUur/FMLa0Hudq5lVJNJfZ0c aU2DC/E3d1wxx61ls/nL0zeTFuD01oXxZBnJQxtE6o4S8+9lUiDXbfe8rwAmaaooyqNj vnA4Jd0iRW8yfjG2yOS0rR9kUINzmXIsZvUEszJlnbEjnHUeGwFDiBij8egVIkddjLG8 28SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HnxvlbUH; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h24si60859qkl.44.2020.02.26.09.09.49 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Feb 2020 09:09:49 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HnxvlbUH; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:47484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j70Bv-00010A-5x for alex.bennee@linaro.org; Wed, 26 Feb 2020 12:09:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40721) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j70Bh-0000zO-W1 for qemu-arm@nongnu.org; Wed, 26 Feb 2020 12:09:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j70Bg-0006ZO-K1 for qemu-arm@nongnu.org; Wed, 26 Feb 2020 12:09:33 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:60526 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j70Bg-0006WL-FK for qemu-arm@nongnu.org; Wed, 26 Feb 2020 12:09:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582736971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tbipDMXaSAJp7zG5J+AE8EDo2UW8S1OiLcsauThJr7s=; b=HnxvlbUHYbhutiHHrcYC9KwU/GJvwiFpTwIimdr6TjIA1n/WzyRA9MIFabClhrZBZFqMNe a8OKyt/ZyOjYfVPw7sI/5jFxFdkCw+GarXZrS3Xu8EJpls5ClU3OOGKoEWWIek5ZCJEIY5 5vNBqBT8eScPHkRNDuj4KEPF7gPPU60= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-234-Bk8DxKsVPgGzUpCRct9uYg-1; Wed, 26 Feb 2020 12:09:23 -0500 X-MC-Unique: Bk8DxKsVPgGzUpCRct9uYg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 22612800D48; Wed, 26 Feb 2020 17:09:22 +0000 (UTC) Received: from [10.36.116.59] (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C3C3F27180; Wed, 26 Feb 2020 17:09:20 +0000 (UTC) Subject: Re: [PATCH] hw/intc/arm_gic_kvm: Don't assume kernel can provide a GICv2 From: Auger Eric To: Andrew Jones , Peter Maydell References: <20200225182435.1131-1-peter.maydell@linaro.org> <20200226085209.ni7oph6odt24warq@kamzik.brq.redhat.com> <20200226091750.mqkbqffod247bori@kamzik.brq.redhat.com> <85d78328-0843-3f11-7a79-6010aea3d3dd@redhat.com> Message-ID: Date: Wed, 26 Feb 2020 18:09:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <85d78328-0843-3f11-7a79-6010aea3d3dd@redhat.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , qemu-arm , QEMU Developers Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: AD8aNPW/JFv9 Hi Peter, On 2/26/20 12:58 PM, Auger Eric wrote: > Hi Peter, > > On 2/26/20 10:17 AM, Andrew Jones wrote: >> On Wed, Feb 26, 2020 at 08:56:03AM +0000, Peter Maydell wrote: >>> On Wed, 26 Feb 2020 at 08:52, Andrew Jones wrote: >>>> Although, many QEMU command line users still won't know what to do >>>> without an explicit "Try -machine gic-version=host" hint, so that >>>> might be nice to add too. >>> >>> In the GIC code we don't know if the machine even has a >>> gic-version property, so we're not in the right place to try to >>> produce that message. >>> >> >> Ah yes, we use qdev_init_nofail() in virt::create_gic(), so there's >> no chance to append another hint at the machine level. >> >> And what about when machine.gic-version is not provided and KVM is >> in use? Shouldn't we try version '2', as we do now, but then also >> '3', if '2' fails, before erroring out? > > In case of KVM accelerated mode we could effectively probe v2 first and > if not supported choose v3, as mentioned by Drew. > > Couldn't kvm_arm_vgic_probe() return a bitmap by calling > kvm_create_device on both versions in dryrun mode? I sent an RFC prototyping what we had in mind - I think - together with Drew. [RFC 0/2] hw/arm/virt: kvm: allow gicv3 by default if host does not support v2 This was discussed earlier in that thread: https://www.mail-archive.com/qemu-devel@nongnu.org/msg674469.html. It should not break any compatibility as the only case we are supposed to change here was aborting before. Thanks Eric > > Thanks > > Eric > >> >> Thanks, >> drew >> >>