Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5477371rdb; Wed, 13 Dec 2023 09:39:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IGEc2tZ7x9Oi1/g5Ks+LHgbX7Rq4QlalOCdRveozsSUrEkZA6ppIHMyzrWk214ygdOCSfYz X-Received: by 2002:a05:6e02:2161:b0:35d:66f5:946b with SMTP id s1-20020a056e02216100b0035d66f5946bmr10165895ilv.21.1702489193173; Wed, 13 Dec 2023 09:39:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702489193; cv=none; d=google.com; s=arc-20160816; b=ABWFl1jtfr16Y6w6O9XKKajILbmFNPI9i2HZf4+qWfcjx70OaRLk6tZSj++ciNlrxF YJeeZmnL85PXJ6ZAtDEARRlgXduDpFaYJrjNzcD2LEtj0hmLXmeDNO4ERHjUvmmmtRZh iXEqpe0mToTtb3KB6CJFNDcu7asSg+5InlgMSZvwZeRH79wUmGn3gj6my8f6AqvBIkYu b/rTGwXBCg6xAN53jRS4j4d4s0PWQyao5RJ51P1b+xR9/xLWOPyff9r4jnQxl3CZyK5K DXl30lgo8TFOzNAiIscgKCVCNHSoHF5aSZXqskAsl3bgl1lBQfvJjfeg6XGQE3qlRSiZ Wz4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=wMIRpMzvlSiW4Uq3ildO6AijIYP6wLHY65QDVFZkhBA=; fh=jm8FtUP2zaeijLXyAHnZGQ1fRRhJK1zlhXxtIsf3eQA=; b=ATK+3ZJo3CpxitPCLdzZy8BtlAunqOj2anXrPJVXL4MvNJTdY57WNEBuwiB4DC9Vzx XrDF/KQu6rz3jDVbA+dFbRDxzHMCFytSHf2qCu9MEbI65ZqBIqE/Eg2rHHUv7hMlrYTT 75VwcHIVcL86FXqnJVE6Gshaqdts1/h5l4p+UAJ1eMfo8elOLeSDSmyBGgmF9VxH2yRm YvzEkVEIUgKgY2XbXxlu02orhi+Wt+S3PflxwQVBLNL9BZAezMzc4d5IMDVbI0EgY6Dl JV1gSTmdbnagYB84oQzrtI/oJM0YiwqF8rBh4kZCiWgvCFfoYEo5kBTxa6CoV8OTXCqq kzgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TqDpgPEm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id g62-20020a636b41000000b005c6617f183fsi9794511pgc.303.2023.12.13.09.39.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 09:39:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TqDpgPEm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 4EA268181BB5; Wed, 13 Dec 2023 09:39:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1441963AbjLMRje (ORCPT + 99 others); Wed, 13 Dec 2023 12:39:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1441910AbjLMRjd (ORCPT ); Wed, 13 Dec 2023 12:39:33 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFEA8B0 for ; Wed, 13 Dec 2023 09:39:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702489178; 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:autocrypt:autocrypt; bh=wMIRpMzvlSiW4Uq3ildO6AijIYP6wLHY65QDVFZkhBA=; b=TqDpgPEmhuc0amw6sptNjHGCFgTtaFRAnOlcZFc92X6oRrOQja+8uRyhY75EQb3CWzb1ry Tp3vLC/JPSHsNlXp8itmLNON4PaBPitvNuoV6aJU+9S++1TrR4T1kIcOOdpGwBD/t62Zng LU28Dg1sat7YK5HmAZzPMJEXrYALALE= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-303-MzO-eypdPD6EA4jm5RYX7A-1; Wed, 13 Dec 2023 12:39:37 -0500 X-MC-Unique: MzO-eypdPD6EA4jm5RYX7A-1 Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-551bfafcf4bso1050807a12.3 for ; Wed, 13 Dec 2023 09:39:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702489176; x=1703093976; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wMIRpMzvlSiW4Uq3ildO6AijIYP6wLHY65QDVFZkhBA=; b=vh3jOtdfdlIcGXLaTGjcG8nXWBeUOj6wMGURNIQ3QNAnUqPMRBS6+Xk+uVTQjfImxo CYtoRjnjBtdWnjtBGb9opkh9cIpLgRnn+sAAaoyJ0OWmU8POAOzeJLViecFGU9LSF/J/ dsHRnRNE+jpKkFnlxnH1U2TdTOgufEUbkJxggjiAjjXtMWQ8jqB2cyXu7Cd81M9V6oca QWPzcQ9kN5GCw9r5S5qyjsRlOP7fHwn9+vn+Rwg3chTVCBBSYhNprubxYYcMjQu737P7 8MGsubW1Tgr9jujTfP0NFemqWJ5iTQyeDkUz95tEoHBeHmTq+bCQaavUsuPFEyxLMvSM zWYg== X-Gm-Message-State: AOJu0YzopU+LNglL9/RX4HeJQa95OZxzfsnF9a96ULVOJkoc57D2Dfn1 yFccG5aqPUFJPFTkeKVKTIKrkgZ8bkiTiK5dbyqcsWvffdwqSm0pf9n9KOKsCLmgpw/JWDKmAuN FVGr7MD/hLetRdzjE9q08BiylOqEzTmU5 X-Received: by 2002:a50:aa81:0:b0:54f:64f4:c2da with SMTP id q1-20020a50aa81000000b0054f64f4c2damr5011985edc.11.1702489175936; Wed, 13 Dec 2023 09:39:35 -0800 (PST) X-Received: by 2002:a50:aa81:0:b0:54f:64f4:c2da with SMTP id q1-20020a50aa81000000b0054f64f4c2damr5011977edc.11.1702489175593; Wed, 13 Dec 2023 09:39:35 -0800 (PST) Received: from ?IPV6:2001:b07:6468:f312:63a7:c72e:ea0e:6045? ([2001:b07:6468:f312:63a7:c72e:ea0e:6045]) by smtp.googlemail.com with ESMTPSA id dc23-20020a056402311700b005525a9abf73sm171094edb.11.2023.12.13.09.39.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Dec 2023 09:39:34 -0800 (PST) Message-ID: <84ad3082-794b-443f-874a-d304934a395b@redhat.com> Date: Wed, 13 Dec 2023 18:39:33 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] KVM: selftests: fix supported_flags for aarch64 Content-Language: en-US To: Sean Christopherson Cc: Shaoqin Huang , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20231208184628.2297994-1-pbonzini@redhat.com> <184e253d-06c4-419e-b2b4-7cce1f875ba5@redhat.com> From: Paolo Bonzini Autocrypt: addr=pbonzini@redhat.com; keydata= xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2 CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04 hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH8WLfTLf5g1EKCTc4C1sy1vQSdzIRu3rBIjAvnC tGZADei1IExLqB3uzXKzZ1BZ+Z8hnt2og9hb7H0y8diYfEk2w3R7wEr+Ehk5NQsT2MPI2QBd wEv1/Aj1DgUHZAHzG1QN9S8wNWQ6K9DqHZTBnI1hUlkp22zCSHK/6FwUCuYp1zcAEQEAAc0j UGFvbG8gQm9uemluaSA8cGJvbnppbmlAcmVkaGF0LmNvbT7CwU0EEwECACMFAlRCcBICGwMH CwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRB+FRAMzTZpsbceDp9IIN6BIA0Ol7MoB15E 11kRz/ewzryFY54tQlMnd4xxfH8MTQ/mm9I482YoSwPMdcWFAKnUX6Yo30tbLiNB8hza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KaGM GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0 JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 pete.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 (pete.vger.email [0.0.0.0]); Wed, 13 Dec 2023 09:39:50 -0800 (PST) On 12/13/23 18:21, Sean Christopherson wrote: > On Tue, Dec 12, 2023, Paolo Bonzini wrote: >> On 12/9/23 03:29, Sean Christopherson wrote: >>> On Fri, Dec 08, 2023, Paolo Bonzini wrote: >>>> KVM/Arm supports readonly memslots; fix the calculation of >>>> supported_flags in set_memory_region_test.c, otherwise the >>>> test fails. >>> >>> You got beat by a few hours, and by a better solution ;-) >>> >>> https://lore.kernel.org/all/20231208033505.2930064-1-shahuang@redhat.com >> >> Better but also wrong---and my patch has the debatable merit of more >> clearly exposing the wrongness. Testing individual architectures is bad, >> but testing __KVM_HAVE_READONLY_MEM makes the test fail when running a new >> test on an old kernel. > > But we already crossed that bridge and burned it for good measure by switching > to KVM_SET_USER_MEMORY_REGION2, i.e. as of commit > > 8d99e347c097 ("KVM: selftests: Convert lib's mem regions to KVM_SET_USER_MEMORY_REGION2") > > selftests built against a new kernel can't run on an old kernel. Building KVM > selftests requires kernel headers, so while not having a hard requirement that > the uapi headers are fresh would be nice, I don't think it buys all that much. > > If we wanted to assert that x86, arm64, etc. enumerate __KVM_HAVE_READONLY_MEM, > i.e. ensure that read-only memory is supported as expected, then that can be done > as a completely unrelated test. selftests have the luxury of having sync-ed kernel headers, but in general userspace won't, and that means __KVM_HAVE_READONLY_MEM would be a very poor userspace API. Fortunately it has "__" so it is not userspace API at all, and I don't want selftests to treat it as one. > IMO, one of the big selling points of selftests over KUT is that we can punt on > supporting old kernels since selftests are in-tree. I don't think it's at all > unreasonable to require that selftests be built against the target kernel, and > by doing so we can signficantly reduce the maintenance burden. The kernel needs > to be backwards compatibile, but I don't see why selftests need to be backwards > compatible. It does help sometimes to be able to run old tests on new kernel or vice versa. So even without making that a requirement, it is a nice thing to have whenever possible. Paolo