From patchwork Fri Dec 8 18:46:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 176004 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5650191vqy; Fri, 8 Dec 2023 10:46:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJ2Ar6frKiMnD9Z5tbzMrICYE7aLIwnPrl9M0ZEBR0jOYhCgb5ADJS0TXkGKk+0ew1DhRU X-Received: by 2002:a05:6a20:7fa0:b0:190:28d1:8e0b with SMTP id d32-20020a056a207fa000b0019028d18e0bmr596871pzj.35.1702061198648; Fri, 08 Dec 2023 10:46:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702061198; cv=none; d=google.com; s=arc-20160816; b=l13FWSIo0ONGovlYGTRyzVZPLbxUV17CRU8/zMgsqnmYhhrhKZzJ20MOVEU/ItY4wr 0svxNe7080xC4cCxyiMt2xGMALuejERVSwgj5OoCqFYdaj7bSem3g7vKpeW4o+j6Ut47 GAV7khKbmM//1Hu2jksRH4lMDjUZUjw5A4vxMRWUyOCA4frlUTu0jRDhqID/QAxYIBH0 0aiNQAL3pL1vpmdsC4Eq/qks/8TDOMWcJ2rNDYmdTytUro6FMQ4yC1DYoCFoHuBIWwJH 13ydA3anlABkOBU0kfxA/MoLUSgfRuYbBfdCXfLthVmctP4Mj2zX1m+8vXSJYmFHygLy tZOQ== 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 Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id f15-20020a65628f000000b005c66e4949a8si1917026pgv.246.2023.12.08.10.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 10:46:38 -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 8E79181DC637; Fri, 8 Dec 2023 10:46:35 -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 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:35 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784740523584363439 X-GMAIL-MSGID: 1784740523584363439 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