Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2568548pxj; Mon, 10 May 2021 06:07:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwt0TG40BP8iRm+a5pXUxmNmyiyhAEmExjrK9E9n4WwsynDFulkPJN8h6rw+ZNlMDj49/cz X-Received: by 2002:a02:cc1a:: with SMTP id n26mr18468689jap.107.1620652036786; Mon, 10 May 2021 06:07:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1620652036; cv=pass; d=google.com; s=arc-20160816; b=N1Kj8qW4VbtQSzyydgzGINpBx01TW68AUafj+zHFJFGh/Dq9mqY7Ef4ZHac/BvATQU fX/vnopM5gcteEieyAokyi7NoElYRHPFMt3WS1rOAZtKrCMtqajs1kwzytxLAQJuzADP iSaY9hsMUbzqq69AgjOvdav/ML3fXIWxV1+iOHxaXa+JEzJSKFqbWvlykggW/YhXA1sP mpWojd42uQ9yrHMhHyLMWK6kkHQEOzS9vQWElnYd14osngYcpznopXvlvNWP1WsgZ58X 1+rVS4wLX6IW7LJkbdo/+6GsGwGVewAohmJdj4cIkqi6T7iQUPjcIAo/vB4e826G+iV+ YH9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-language :content-transfer-encoding:in-reply-to:user-agent:date:message-id :from:references:cc:to:subject:dkim-signature:dkim-signature; bh=rIcuE5kOedayuhR3R9WmVjbSFPpiiS9ZXiljrSfR7Z4=; b=a5EDQGEl6ELELXSwvJm8Abn4jJB5pHKVyjOoBWBJt7koZ6V2nm40BFF6xWl6rAlp8O oV4S2fdJNhjz8fYj14WFf8P+lPRMB9m/nAomFc8fBodWQTrANYFFE3DEqjSB352vc1Z2 ICyvUNV1x5yS5DDwxGxbKVkLA/eLmbHio1u56ar/hpVxwINPpxVrBsU7aunSE3p+MvvS TShL8tMKrNz/yJs4v4iBnqArohbd10kZboQ1QPCR/YudAQcgSQIXSKSFMHVB7b1L0C+4 cAfgro7b2YSkuhOdOvM//nitozMGPtUPHdxe/qzMNasqW+gCzq+TzNjy4boXHvwVD9K8 RuKQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=OQ3NDsGZ; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="sq1b2UC/"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si16180059jat.46.2021.05.10.06.07.04; Mon, 10 May 2021 06:07:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=OQ3NDsGZ; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="sq1b2UC/"; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347811AbhEJMyZ (ORCPT + 99 others); Mon, 10 May 2021 08:54:25 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:45228 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245603AbhEJMNa (ORCPT ); Mon, 10 May 2021 08:13:30 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 14AC4omh072462; Mon, 10 May 2021 12:12:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=rIcuE5kOedayuhR3R9WmVjbSFPpiiS9ZXiljrSfR7Z4=; b=OQ3NDsGZD+UpM/nL6miAGHoE51IGwL4/qjv+CpAJbppaxYxZ0LnR5lUh0Tqx7VlAr99N Wx8UhHH4BsAooIPR/0rQO62bcQJeWN+eNVqVzb4WwBSqnHH7buPAkk6NExJirZyjgQyp IwU9M3QnY5miSWEVSzZS/xaN9i2Iyzn2GZnaw+E7E/qZX8NiyFZTSpkx03moV44ej9tP hNHwkn5jka1SsFP8w05u+1tQQ4wTgQ1cdlfZO7RstJGJM3cdg131aJzXjllseWUzBJ8i 1zc0FTYbPaJaNQ6tx5qQ61cEOrltaS9vpZWsDtN7x/QLtZEQwRLNR56SYeH9x1JFo2WU Dg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 38e285a8en-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 May 2021 12:12:03 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 14AC5kVv174029; Mon, 10 May 2021 12:12:02 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam08lp2171.outbound.protection.outlook.com [104.47.73.171]) by aserp3030.oracle.com with ESMTP id 38e5pv281j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 10 May 2021 12:12:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bq9vy0bcYQM0Rk/Yiq5Yw9SgFpFbKtviHuE7bNZG9yWng76ZbwogdtuelnsvOaSVlcsu5PDF2iqvaSmUgdKUwAtslpX7UfSFmCJpBwF+zlCs2OYLufYqm/PE1Jv3Juh4PB3IK6yGgkm38OTKwjTXMVNlTandXBHU3cGNfId1il5bmM4hW3VOCcretGno7EJr+0IRaat9jtlezDSGoz7gJGBhQ05PP5VbhBmuM76A3ypOOZ1npnYEW0jZX9MOwUoQn8Rrplad1EyqzpFBZjkstnP5rvGxq+2SimPY+uCZ5AkNlFKIyTSvqqciabZ5bWc2Gyndh8P+kuu/R1dcFvnH+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rIcuE5kOedayuhR3R9WmVjbSFPpiiS9ZXiljrSfR7Z4=; b=KMvTFH3UkJ4RIFiSFFZsVtU771rlVg5q3+ds//5aJZ75n/cokvNEX7ss35rfMlT1JkbMU2FXIPfwhLdrWDdJJF7UBkCvsD14+u2q07SMV88tzO166azsdMGvQ1D/cVBbK1lD/75G0aIDxRZXR0a8ZTuZjW4fVNvz5wAeSnmh1WGaaxao52Y1w9LRaJtkWDdyBTZtNzRRaHk/tKb4JoivQTiOL0M+eKvZs55ptL2Wv62vYtNUtQpYyugdolpenmOLyaWUbDrBq/lZtTFLUzPtXLlqxRbM9ZB6faaj4+dyJvJMhIBxsbyk/lQ66b6KBNAKLXDI8Mh8RBhTv2F7+UZ3Hg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rIcuE5kOedayuhR3R9WmVjbSFPpiiS9ZXiljrSfR7Z4=; b=sq1b2UC/rvFUSGHijWtVfFZZWnges9C2YBiZcepHCkQ8Vltjc4qgbdYlOAyPh/2JQ5kGGDg/InSrtGPMouKkrDVZ47jh7DgvWPiVfqUgBcaWh9WX+gWP/V4zHhR6C3zBNALVeIVmEGFRqQ+uG6FIYlYy5FOo2/U4/8hpkh/WFa0= Authentication-Results: infradead.org; dkim=none (message not signed) header.d=none;infradead.org; dmarc=none action=none header.from=oracle.com; Received: from BYAPR10MB3288.namprd10.prod.outlook.com (2603:10b6:a03:156::21) by BY5PR10MB3889.namprd10.prod.outlook.com (2603:10b6:a03:1b1::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Mon, 10 May 2021 12:11:59 +0000 Received: from BYAPR10MB3288.namprd10.prod.outlook.com ([fe80::819c:ca1f:448d:3024]) by BYAPR10MB3288.namprd10.prod.outlook.com ([fe80::819c:ca1f:448d:3024%7]) with mapi id 15.20.4108.031; Mon, 10 May 2021 12:11:59 +0000 Subject: Re: [PATCH 1/3] xen: check required Xen features To: Juergen Gross , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Cc: Stefano Stabellini , Peter Zijlstra References: <20210422151007.2205-1-jgross@suse.com> <20210422151007.2205-2-jgross@suse.com> From: Boris Ostrovsky Message-ID: <4282bb6f-1d19-4d00-d468-f5d4c7fb0f90@oracle.com> Date: Mon, 10 May 2021 08:11:56 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 In-Reply-To: <20210422151007.2205-2-jgross@suse.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [73.249.50.119] X-ClientProxiedBy: SA9PR13CA0123.namprd13.prod.outlook.com (2603:10b6:806:27::8) To BYAPR10MB3288.namprd10.prod.outlook.com (2603:10b6:a03:156::21) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.195] (73.249.50.119) by SA9PR13CA0123.namprd13.prod.outlook.com (2603:10b6:806:27::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.11 via Frontend Transport; Mon, 10 May 2021 12:11:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 17806bd3-6ce4-41f6-05d4-08d913acd002 X-MS-TrafficTypeDiagnostic: BY5PR10MB3889: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f6WQw0UBiS8ehGnaqkq9g+u4jmrCDT1dulzeMYi3fBQi7haXs5qN9tzVMge/uPu7q9UiMRsdIAnY8z06MZxJCIFMO5M6fqVgIPO65XNzV+aWnD1YSYILXTEFQXRcpMKbrDBvQrgKdxWgC8iPh8tal2wLnp9WA+sbHLXV+06CBWDmOlvNcQ2ruxflIe9HBqPtP0zjlcQcXOvwpCPZVKoI7DH/cr9aPAc2t0kpjXIpvcuXEVQcjrDIkIpEBvtYp0yl9p3HoqernDw5hTAPPSeawqATN6BoBCqPAv0OzYH1gmAPAGZ4sxEdC0FVremrWLipchubhpfGa+DrBwm5Hk4ZP4YG3IvDsUSXQTdy4P4rsWd1ulHRhgCPjUHSnH3QWbswTSgeK5MYff/WhhfbQlr16TYoW7zzVp0nNfCe4RZEVYd0U25hSdev1hsYiUgcm/dZZdQ99g/tk2SzBWxeT7kkGxO8lpI/OAmqLV3gfdjSk/blSkQDYRj7Rirv8w14YOKHLZX0AHoXEuIjh4t4i1/lLOOvJp9S6jhky1CMPt/Doq1XtsUVIdAR5O/pRQxfCdtfmjMhZU1nC9MJM0p5FwLkUO4cCn0j0PsctiPoRCuO59tODYD+bjkGxevdOd407/Tz7cLMQExqKKZ77WuRROiaMtyRPmpRyf9s/o8tmZVmWQTH6SRIG6ENhKr3TR9+pzlv X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR10MB3288.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(346002)(366004)(376002)(39860400002)(396003)(136003)(316002)(4326008)(66946007)(16526019)(16576012)(186003)(26005)(5660300002)(36756003)(54906003)(31696002)(6486002)(44832011)(38100700002)(86362001)(31686004)(66556008)(66476007)(2616005)(956004)(83380400001)(478600001)(53546011)(4744005)(8936002)(8676002)(2906002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?eDJxZFRSYi9KeXhDcWJpcHhwc0ptMFVweGdqYXVHakhjRzA1eWp5alBGeVNu?= =?utf-8?B?RitQQWFDNVc4VXo4WC82T0tFdVdlYU5lMDZNOCtrZDNLUW9kYnVEalc2TlB5?= =?utf-8?B?eHpFTHRzbkhLZlZ2a1ZISisySnIvbGlXL1ZpemxiVDljNnJ5YnpseTlWcUF6?= =?utf-8?B?MzUvTUpXOVExbTBzZE5Ja1hmallWVXBGeEpQUTRBb2NVbmxadkpVRGxKTk9o?= =?utf-8?B?QnNJTkRJRk9TdWpRUW4yN3J5cDJsem1sMmlLdkJGanFtK0lmaFppTmdrR283?= =?utf-8?B?V3BvNGtjbFV5K3Q3WGdZanlyZzEwVVBMZUhveitMWHRMMk1MNG1zQWdvT3E5?= =?utf-8?B?WllEbUgvNnBnL0NhVUVMQnRld3NiL2VZZ2JTZ2UwVnlTUEtsdVhJcmcxSkVR?= =?utf-8?B?UnQzSzhHVE5rNGNQNzVKSzJSZkYrTHhaUS9SL2RyZWZrMi9jZjhlaER5algz?= =?utf-8?B?M3NaQTVKWnR0K0JqMGtOSXozQUlnaVVnY08zNXBDVy9JbUpZWUdmZXFsSGdh?= =?utf-8?B?T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=?utf-8?B?OS9iRUdIT2VCWGkrYmJ0VTNuSndORU9jdkVLemJZV2hJZzVqWWZGcDBCU3FN?= =?utf-8?B?VTBSZUlORiswOWl4QVgwa1lPVkNWclFQSlR1Nm5oOVFHYVlQSVZxY2xEbG1U?= =?utf-8?B?eXZzRkdBb3ZtOC9nVi8vdkQzMlB0L0NYWTZ3ZDNodzY4c3pCZ0JXRnFHS0VG?= =?utf-8?B?RHRualJ4eE0yTTRMSHM1K1Q2QlM2dnFIOGxUaHM2N1dVaUk5MnJSOVNLOUs0?= =?utf-8?B?ZDNtemNLUTV4cVdjMktRNVIxaDdCNkM1NE5ZT0VEanRFdWdiaXBtbzBkQnZK?= =?utf-8?Q?28A3wM0muX0bCyp6+8BAt2jSF/gfDk6nl/+uOtM?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17806bd3-6ce4-41f6-05d4-08d913acd002 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3288.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 12:11:59.6121 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vdtap1MUo01iyOxxbDU2jeY+Utlm9nLyZVtmj23zmvc+cdpVuyIx8LiuJ3ow4JZk3d51Fibq8ahaAdPyrNmAXEEj4kiITWqc/jD/50h7Vkg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB3889 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9979 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 malwarescore=0 spamscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105100089 X-Proofpoint-GUID: AfmjJP8iHAb3vGWGmOLhqBTsqo9aLmpT X-Proofpoint-ORIG-GUID: AfmjJP8iHAb3vGWGmOLhqBTsqo9aLmpT X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9979 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxlogscore=999 mlxscore=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 clxscore=1011 impostorscore=0 phishscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105100089 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/22/21 11:10 AM, Juergen Gross wrote: > > +/* > + * Linux kernel expects at least Xen 4.0. > + * > + * Assume some features to be available for that reason (depending on guest > + * mode, of course). > + */ > +#define chk_feature(f) { \ > + if (!xen_feature(f)) \ > + pr_err("Xen: feature %s not available!\n", #f); \ > + } With your changes in the subsequent patches, are we still going to function properly without those features? (i.e. maybe we should just panic) (Also, chk_required_features() perhaps?) -boris > + > u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly; > EXPORT_SYMBOL_GPL(xen_features); > > @@ -31,4 +44,9 @@ void xen_setup_features(void) > for (j = 0; j < 32; j++) > xen_features[i * 32 + j] = !!(fi.submap & 1< } > + > + if (xen_pv_domain()) { > + chk_feature(XENFEAT_mmu_pt_update_preserve_ad); > + chk_feature(XENFEAT_gnttab_map_avail_bits); > + } > }