Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2533242rdb; Fri, 8 Dec 2023 10:46:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHxqr9ZMFV6louGa/7nLV+MXwlCdANx4HZeCwSxXTqC32uXSrH1KoRAka6At2a2tylzUva X-Received: by 2002:a17:90a:34c3:b0:286:6cc1:780f with SMTP id m3-20020a17090a34c300b002866cc1780fmr535152pjf.82.1702061201222; Fri, 08 Dec 2023 10:46:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702061201; cv=none; d=google.com; s=arc-20160816; b=isxCke+kXW2zueE02tddTtTE+PnXXt9JgZf/ij6SWGP4zST1I3/Uf27oK2dlaLXyfR YyNx2yXHquRsKQG2Gz2N373PaTkNT9tosg0SCh5+otZ+lL1/wUCX0qVDuwzrJI8FjWFv 51WspTTauhZhkBdsW1Pzr9KAIf0P8EnqUxECJ/bwSfXAFILWoLQdjgZJjLv3S1FNCRpw KAW3z0Ul3441t2ifGmhzCHYS5cLjFJG5jR6W4GB0q/ijK/6oWp4aMQBL4zoAA8jG9h49 BCs2Jx46Ol4dyjj7dUx2YYG6pFnLpkJ6hVYg7h2GZZ3WhLqJn2N7cAxs+y5qAFq1ki4o Rp9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from:dkim-signature; bh=oyg9tG3YUMXYWf0fhNWSelQCkgGQnlr8E+uOxhosRhg=; fh=4N0ilCeWNPUMy3p+fwQEcpDcSktLq8IMxbqwLAweA1k=; b=s/Cy5kg6MK6QBC+QcIGls7USsQKOLpOJVi/aDX3dQ7d5lIkXYDwBIRSbm/L1EwWm6W Lr6W77MLTGmpmgWIBm8drYrc5ONyj+bHfcjcmRGBddVmRiHv93OMqdD2L/f9v6hInSoA FUYtkDhCyTxQklkkV3DMq+sWDzs5k88VxDySaa9KpKb2ez3NLqKqbt5Hfwt5vOrk91h3 UqsYWZtuScFkTD/qNRfbLEsS4q4npu/Jb822FRcRw58hy0ZD8juaWL0EHHqolXgDLlRx A8HA+ecJ4n7RhwbdWoOjRTZaEquq9jrnn39RCMaXIIunZ8H5xGep1v0ZCtmJGAs5X1RB tDEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XR7Bm6Pg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id gt9-20020a17090af2c900b00286bf822f9bsi2062791pjb.179.2023.12.08.10.46.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 10:46:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XR7Bm6Pg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 3031C81DC635; Fri, 8 Dec 2023 10:46:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbjLHSq0 (ORCPT + 99 others); Fri, 8 Dec 2023 13:46:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229572AbjLHSqZ (ORCPT ); Fri, 8 Dec 2023 13:46:25 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6239E0 for ; Fri, 8 Dec 2023 10:46:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702061190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oyg9tG3YUMXYWf0fhNWSelQCkgGQnlr8E+uOxhosRhg=; b=XR7Bm6Pg+TPdXvTFRk8PjklNQFG1ePf70kARko8MsD7Iu/1BcXnItSxB859FB7qiDSgOfW 7An+QD2LSdqtmYmmnoytNY6CIpvPlkN5na+jYtf7++chCOBshZ/10tPj60ud6z/NdKnjJb +wsrsC3JAhKFcFvT4HtpjafR+Vs/pvA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-122-KwE-bmmkNByZfmLRbef5QA-1; Fri, 08 Dec 2023 13:46:29 -0500 X-MC-Unique: KwE-bmmkNByZfmLRbef5QA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C7E91101A52A; Fri, 8 Dec 2023 18:46:28 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id B03BD112131D; Fri, 8 Dec 2023 18:46:28 +0000 (UTC) From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH] KVM: selftests: fix supported_flags for aarch64 Date: Fri, 8 Dec 2023 13:46:28 -0500 Message-Id: <20231208184628.2297994-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 08 Dec 2023 10:46:39 -0800 (PST) KVM/Arm supports readonly memslots; fix the calculation of supported_flags in set_memory_region_test.c, otherwise the test fails. Signed-off-by: Paolo Bonzini --- tools/testing/selftests/kvm/set_memory_region_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/set_memory_region_test.c b/tools/testing/selftests/kvm/set_memory_region_test.c index 6637a0845acf..dfd1d1e22da3 100644 --- a/tools/testing/selftests/kvm/set_memory_region_test.c +++ b/tools/testing/selftests/kvm/set_memory_region_test.c @@ -333,9 +333,11 @@ static void test_invalid_memory_region_flags(void) struct kvm_vm *vm; int r, i; -#ifdef __x86_64__ +#if defined __aarch64__ || defined __x86_64__ supported_flags |= KVM_MEM_READONLY; +#endif +#ifdef __x86_64__ if (kvm_check_cap(KVM_CAP_VM_TYPES) & BIT(KVM_X86_SW_PROTECTED_VM)) vm = vm_create_barebones_protected_vm(); else -- 2.39.1