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 X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D021C433DB for ; Wed, 10 Feb 2021 13:13:00 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2042764DD8 for ; Wed, 10 Feb 2021 13:13:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2042764DD8 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.83597.155946 (Exim 4.92) (envelope-from ) id 1l9pIQ-0004FS-1v; Wed, 10 Feb 2021 13:12:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 83597.155946; Wed, 10 Feb 2021 13:12:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9pIP-0004FL-UV; Wed, 10 Feb 2021 13:12:41 +0000 Received: by outflank-mailman (input) for mailman id 83597; Wed, 10 Feb 2021 13:12:40 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1l9pIO-0004FF-Mf for xen-devel@lists.xenproject.org; Wed, 10 Feb 2021 13:12:40 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9e4f410c-a7cb-4b50-bd62-2d3f9bd97ed6; Wed, 10 Feb 2021 13:12:40 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3F51BAC43; Wed, 10 Feb 2021 13:12:39 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9e4f410c-a7cb-4b50-bd62-2d3f9bd97ed6 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1612962759; h=from:from:reply-to: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; bh=KodbBIrLLtVpPc0B70pP4gcnK9uIr1vJtWfSMiDJuP8=; b=vRf8U6sFq+aFMtSZhNjg0g2liM3oGkOrVIRehY5FpwVBeTGDaUFM0lpbsTH+V4HmkeSOlI Ih+VTe0zhmpt30ZsrSTY95Q2+hUw0Rgl2hMTteFo8IK7MLIG01eqA9GQ97p1SbRB/DcXjN cacrWZAyFPpHelDgTgxhwIyK0FOYWMM= Subject: Re: [for-4.15][PATCH v2 1/5] xen/x86: p2m: Don't map the special pages in the IOMMU page-tables To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Cc: xen-devel@lists.xenproject.org, hongyxia@amazon.co.uk, iwj@xenproject.org, Julien Grall , Andrew Cooper , Wei Liu , Julien Grall References: <20210209152816.15792-1-julien@xen.org> <20210209152816.15792-2-julien@xen.org> <5bf0a2de-3f0e-8860-7bc7-f667437aa3a7@suse.com> <65797b03-7bd8-92e9-b6c7-e8eccde9f8ba@suse.com> <71c4150a-0b81-cdc3-b752-814f58cb5ca4@suse.com> From: Jan Beulich Message-ID: Date: Wed, 10 Feb 2021 14:12:38 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 10.02.2021 12:54, Roger Pau Monné wrote: > On Wed, Feb 10, 2021 at 11:48:40AM +0000, Julien Grall wrote: >> It feels wrong to me to setup a per-domain mapping when initializing the >> first vCPU. >> >> But, I was under the impression that there is plan to remove >> XEN_DOMCTL_max_vcpus. So it would only buy just a bit of time... > > I was also under that impression. We could setup the lapic access page > at vlapic_init for the BSP (which is part of XEN_DOMCTL_max_vcpus > ATM). > > But then I think there should be some kind of check to prevent > populating either the CPU or the IOMMU page tables at domain creation > hypercall, and so the logic to free CPU table tables on failure could > be removed. I can spot paging_final_teardown() on an error path there, but I don't suppose that's what you mean? I guess I'm not looking in the right place (there are quite a few after all) ... Jan