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=-2.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 8AD2CC43331 for ; Sat, 28 Mar 2020 10:15:29 +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 57E6D20717 for ; Sat, 28 Mar 2020 10:15:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xen.org header.i=@xen.org header.b="FOvROFRP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57E6D20717 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jI8Um-0001m2-3N; Sat, 28 Mar 2020 10:15:16 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jI8Uk-0001lv-PE for xen-devel@lists.xenproject.org; Sat, 28 Mar 2020 10:15:14 +0000 X-Inumbo-ID: 03cf6024-70dd-11ea-92cf-bc764e2007e4 Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 03cf6024-70dd-11ea-92cf-bc764e2007e4; Sat, 28 Mar 2020 10:15:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=g0e4kK9JVWsCMXGLCuu9+YY/OhxhU9eomJUvkVHtHfo=; b=FOvROFRPk3BSxcuVuwwtV8hypY KjElne2tdcDgUkCB/bhxnls2ARdlY6Ry9G3rcSp+VaVS9lJOxiujJ0mfi1hM9803bSBHyp8T6dwme YKFcj3h/1Zn/6kkqMX+4a6Wh5+Bvh59k5ydl0gPLMymcLmlGJUdhtjXzg5zEOhsim7Ag=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jI8Ui-00077p-C4; Sat, 28 Mar 2020 10:15:12 +0000 Received: from [54.239.6.185] (helo=a483e7b01a66.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1jI8Ui-0005DL-5X; Sat, 28 Mar 2020 10:15:12 +0000 To: Jan Beulich References: <20200322161418.31606-1-julien@xen.org> <20200322161418.31606-4-julien@xen.org> <80c98b3e-efa7-66e6-bd47-61bc0560f535@suse.com> <993d82aa-9f19-0b27-a562-53f4c9b2a7a4@xen.org> From: Julien Grall Message-ID: <04cc7785-176d-87d0-8966-214ab0986e45@xen.org> Date: Sat, 28 Mar 2020 10:15:10 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Subject: Re: [Xen-devel] [PATCH 03/17] xen/mm: Move the MM types in a separate header X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Wei Liu , Andrew Cooper , Julien Grall , Ian Jackson , George Dunlap , xen-devel@lists.xenproject.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hi Jan, On 26/03/2020 09:02, Jan Beulich wrote: > On 25.03.2020 19:09, Julien Grall wrote: >> Hi Jan, >> >> On 25/03/2020 15:00, Jan Beulich wrote: >>> On 22.03.2020 17:14, julien@xen.org wrote: >>>> From: Julien Grall >>>> >>>> It is getting incredibly difficult to use typesafe GFN/MFN/PFN in the >>>> headers because of circular dependency. For instance, asm-x86/page.h >>>> cannot include xen/mm.h. >>>> >>>> In order to convert more code to use typesafe, the types are now moved >>>> in a separate header that requires only a few dependencies. >>> >>> We definitely need to do this, so thanks for investing the >>> time. I think though that we want to settle up front (and >>> perhaps record in a comment in the new header) what is or >>> is not suitable to go into the new header. After all you're >>> moving not just type definitions, but also simple helper >>> functions. >> >> I am expecting headers to use the typesafe helpers (such mfn_add) >> in the long term. So I would like the new header to contain the >> type definitions and any wrappers that would turn 'generic' >> operations safe. >> >> I am not entirely sure yet how to formalize the rules in the >> header. Any ideas? > > Well, if the header was just for the typesafe types, it could be > renamed (to e.g. mm-typesafe.h) and be left without any respective > comment. The issue I've mentioned arises if, with its currently > suggested name, further types get added. In such a case perhaps it > could be "type definitions and their immediate accessors, > involving no other non-trivial types"? I will rename the file to mm-typesafe.h. Cheers, -- Julien Grall