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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6B9A5C433EF for ; Mon, 4 Jul 2022 19:35:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BEF4B91EA0; Mon, 4 Jul 2022 19:35:24 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9C5D59149A; Mon, 4 Jul 2022 19:35:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656963323; x=1688499323; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to; bh=Jx+mqVQKClB+jIdhZESBCHiuORDkWfeqiI8ialcmygk=; b=OuIWzoheAthKXOJ7UoEfpd328jtzNmo0537kAMt3iRTSJyYFK99QTXif KOGwQcQ0J7KHTnLBWWDKlDmDzmddHkbuDJ8YNCejRZtbp7+921BteMe9W frqAHv/FjLjoF/cNlB5t80fYAXNZjxBJGhZ/7+OOhFGCBXgvlyJ/bS21b CNkL8xtBRyh7cscwF0V63yiLaP5MkC1WMDHDQpHAYbaz/2HlkxPJsFGC2 yAcTgojt1eIDbudWw5eX/Kh2XXyl2E81RWNDWZWSCdn+EvlVZ43wTLkX+ 2gZAtGAvOjJzFA+KMr+Y83RhSXgcCRfnAjdLzma2F0WFTNk5cFwYhOgts A==; X-IronPort-AV: E=McAfee;i="6400,9594,10398"; a="369512382" X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208,217";a="369512382" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2022 12:35:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,243,1650956400"; d="scan'208,217";a="619415256" Received: from linux.intel.com ([10.54.29.200]) by orsmga008.jf.intel.com with ESMTP; 04 Jul 2022 12:35:22 -0700 Received: from [10.249.128.238] (unknown [10.249.128.238]) by linux.intel.com (Postfix) with ESMTP id 764AE580AF2; Mon, 4 Jul 2022 12:35:19 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------Wypu3C8b1k4Fy05jClBTGrk8" Message-ID: <093da09a-7c75-b052-d789-04404be813a6@intel.com> Date: Mon, 4 Jul 2022 22:35:18 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Content-Language: en-US To: "Zanoni, Paulo R" , "Vishwanathapura, Niranjana" References: <20220626014916.5130-1-niranjana.vishwanathapura@intel.com> <20220626014916.5130-4-niranjana.vishwanathapura@intel.com> <20220630060820.GB14039@nvishwa1-DESK> <406c2c67ad85258d1f8ee0fa918706a7e8b6605d.camel@intel.com> <20220630161811.GF14039@nvishwa1-DESK> From: Lionel Landwerlin In-Reply-To: Subject: Re: [Intel-gfx] [PATCH v6 3/3] drm/doc/rfc: VM_BIND uapi definition X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Wilson, Chris P" , "intel-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "Hellstrom, Thomas" , "Auld, Matthew" , "Vetter, Daniel" , "christian.koenig@amd.com" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This is a multi-part message in MIME format. --------------Wypu3C8b1k4Fy05jClBTGrk8 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 30/06/2022 20:12, Zanoni, Paulo R wrote: >>>> Can you please explain what happens when we try to write to a range >>>> that's bound as read-only? >>>> >>> It will be mapped as read-only in device page table. Hence any >>> write access will fail. I would expect a CAT error reported. >> What's a CAT error? Does this lead to machine freeze or a GPU hang? >> Let's make sure we document this. >> > Catastrophic error. > Reading the documentation, it seems the behavior depends on the context type. With the Legacy 64bit context type, writes are ignored (BSpec 531) :     - "For legacy context, the access rights are not applicable and should not be considered during page walk." For Advanced 64bit context type, I think the HW will generate a pagefault. -Lionel --------------Wypu3C8b1k4Fy05jClBTGrk8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 30/06/2022 20:12, Zanoni, Paulo R wrote:
Can you please explain what happens when we try to write to a range
that's bound as read-only?

It will be mapped as read-only in device page table. Hence any
write access will fail. I would expect a CAT error reported.
What's a CAT error? Does this lead to machine freeze or a GPU hang?
Let's make sure we document this.

Catastrophic error.

Reading the documentation, it seems the behavior depends on the context type.

With the Legacy 64bit context type, writes are ignored (BSpec 531) :

    - "For legacy context, the access rights are not applicable and should not be considered during page walk."

For Advanced 64bit context type, I think the HW will generate a pagefault.


-Lionel

--------------Wypu3C8b1k4Fy05jClBTGrk8--