From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D5EBC433EF for ; Thu, 14 Jul 2022 18:31:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t5DDA7XLjeodFjE2k8ATtvt3Wpcqc7Zi3eJSn4pNZwg=; b=DsH7mtDbrciZl4 np19n9Y2zu0knUxAnZMjDa4MQEZ4Gz+2u1zIVudu674faRCrKxaQFUVDj+AEgrutKbp7AdEnyjlho 4XtTL2pHeBUuwR7Gk2ioenigeRSo85lmzAKPbIkLmWy/kT0h4sCPocGhsFvycfZsI967ZGdqvbanC cJm5+A9BiZpZLgAHAVUqDZJSAOZwX745fhF5fx792bfEqQs5xC9pYO/O6H6IXfrhUorJntEEgN9+c 6f3QyWrwW/jVBm1tuDbWqeUiYu/bhmlj8QNvlXP2cwnIbeX4Wu0+Hdm/svUX2G6dYYvRl8lf/uAte nEVwmRqFIbfMSfjYOSUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oC3bZ-00HBGZ-R0; Thu, 14 Jul 2022 18:30:29 +0000 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oC3bX-00HBDi-6y for linux-arm-kernel@lists.infradead.org; Thu, 14 Jul 2022 18:30:28 +0000 Received: by mail-pf1-x436.google.com with SMTP id o12so2602758pfp.5 for ; Thu, 14 Jul 2022 11:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4BAm5Ap7NEHod+fAr+PGt31kGD7Q/EnOAXwYki9v/5c=; b=BCA39DCEAsKOKGBaqJR+l3QYfsmgwCJi40VgRFZwur6EN97IC7Kg8h2PQiyvtVNJpo wVF+zEhTF4MR3XQFSuVQ1vLJFSdPbLxr6Ej2tyO+cP5ckyNqDiydQD1Zgm6BkMcWJ5LR Z0SFYl7hsMAIyo/CMkAvPa2fT8Q0KMiiQHHG3RaPXVfWzzvgvNeJQ4fk/9L2OMC8OZ8A 3fBoWitDcLIJnYHWfjkdr+6Xz1c9CueCZ3sMoEWzA2CtVvQea+Ct6fEo6+yQop59R5RN /1sc7hXyTwlL25l9n279LRiby4xwLFS2vzgNvgAAK+/KsrBFdbROM7wDRqcIzsFnPqD5 T4iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4BAm5Ap7NEHod+fAr+PGt31kGD7Q/EnOAXwYki9v/5c=; b=ZhjI5VIGuDwo8Jn5j/GbKcdTo2zNGByZA2Xr+EZAzxc/eHapz0ly/4Rt99f04yo2Cs O4S7n/xDAg8jMdw9ucKjHhsznfxq/KxVev6b2W79Dmt3NfVB2cZJFlRauzXqBOnauz3b WeSplvbml64r1SblN4lFFxh4q8+j6VBcG8nT+3qttbZwpsUepYf6kmdDqA2VBNZhZrUG C7Ar6zsHIWvv6mAZjr0rNeuh3RzjpFtSCIo6Nt6R6oMUjV6BwbX/p7xVI94q3SO/At09 90GP3+JVJFBZrr0G4UrXCPrYKRNdpxI8LS7pm3YvKYDxjx9tlm7z1uIMoEXBPy0E0l0L x5iQ== X-Gm-Message-State: AJIora/Y6aye6hq1tGZp+koKHaK0MikBqFnDL047IZg44RRNm2PtFJg1 v9H0Lb3K9QzIPrEF3VC5kLfZ+A== X-Google-Smtp-Source: AGRyM1sjxrHT/mbe4M8hvqrXQIDM4yXuUm7dhZKaRkKzb3JLGDowQCkR2H1I24UmOaD7DJvIAA+U9Q== X-Received: by 2002:a05:6a00:2481:b0:52a:d50e:e75e with SMTP id c1-20020a056a00248100b0052ad50ee75emr9845998pfv.43.1657823422034; Thu, 14 Jul 2022 11:30:22 -0700 (PDT) Received: from google.com (150.12.83.34.bc.googleusercontent.com. [34.83.12.150]) by smtp.gmail.com with ESMTPSA id 186-20020a6214c3000000b0052ae3bcb807sm2009028pfu.188.2022.07.14.11.30.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 11:30:21 -0700 (PDT) Date: Thu, 14 Jul 2022 11:30:17 -0700 From: Ricardo Koller To: Marc Zyngier Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, James Morse , Suzuki K Poulose , Alexandru Elisei , Oliver Upton Subject: Re: [PATCH] KVM: arm64: selftests: Add support for GICv2 on v3 Message-ID: References: <20220714154108.3531213-1-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220714154108.3531213-1-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220714_113027_276835_B8272A85 X-CRM114-Status: GOOD ( 21.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Marc, On Thu, Jul 14, 2022 at 04:41:08PM +0100, Marc Zyngier wrote: > The current vgic_init test wrongly assumes that the host cannot > multiple versions of the GIC architecture, while v2 emulation > on v3 has almost always been supported (it was supported before > the standalone v3 emulation). Thanks for the fix. This was my mistake (also I was taking too long to send the fix). > > Tweak the test to support multiple GIC incarnations. > Nit. You could add a fixes tag: Fixes: 3f4db37e203b ("KVM: arm64: selftests: Make vgic_init gic version agnostic") > Signed-off-by: Marc Zyngier > --- > tools/testing/selftests/kvm/aarch64/vgic_init.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/tools/testing/selftests/kvm/aarch64/vgic_init.c b/tools/testing/selftests/kvm/aarch64/vgic_init.c > index 34379c98d2f4..21ba4002fc18 100644 > --- a/tools/testing/selftests/kvm/aarch64/vgic_init.c > +++ b/tools/testing/selftests/kvm/aarch64/vgic_init.c > @@ -670,7 +670,7 @@ int test_kvm_device(uint32_t gic_dev_type) > > if (!_kvm_create_device(v.vm, other, true, &fd)) { > ret = _kvm_create_device(v.vm, other, false, &fd); > - TEST_ASSERT(ret && errno == EINVAL, > + TEST_ASSERT(ret && (errno == EINVAL || errno == EEXIST), > "create GIC device while other version exists"); > } > > @@ -698,6 +698,7 @@ int main(int ac, char **av) > { > int ret; > int pa_bits; > + int cnt_impl = 0; > > pa_bits = vm_guest_mode_params[VM_MODE_DEFAULT].pa_bits; > max_phys_size = 1ULL << pa_bits; > @@ -706,17 +707,19 @@ int main(int ac, char **av) > if (!ret) { > pr_info("Running GIC_v3 tests.\n"); > run_tests(KVM_DEV_TYPE_ARM_VGIC_V3); > - return 0; > + cnt_impl++; > } > > ret = test_kvm_device(KVM_DEV_TYPE_ARM_VGIC_V2); > if (!ret) { > pr_info("Running GIC_v2 tests.\n"); > run_tests(KVM_DEV_TYPE_ARM_VGIC_V2); > - return 0; > + cnt_impl++; > } > > - print_skip("No GICv2 nor GICv3 support"); > - exit(KSFT_SKIP); > + if (!cnt_impl) { > + print_skip("No GICv2 nor GICv3 support"); > + exit(KSFT_SKIP); > + } > return 0; > } > -- > 2.34.1 > Reviewed-by: Ricardo Koller _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel