[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] include/public/memory.h: remove the XENMEM_rsrc_acq_caller_owned flag


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Fri, 19 Jul 2019 13:31:26 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • 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=tukEsuw5FfYiD1bGRe8KEclXbMcyDkSYh7D3NUWw7hI=; b=JC6d7Cg8BoWTFjek6jeSeEFjibODn/mJCBJcEoCNVvMA731BDgtsTewIh5s+z/sW+zzI3EgyhttD3k4x6KVQim8c/XILUDqYKSoLd/S83xApJvAlRyQH21nACgFoor1atAvs5x9MVynnTp5zHLdovtTGRxbZ0aIpe3Vr2w1CSIhyEXxA0o+j/a+HhLJ//XS2hsmBJdeyhXs9cN76FiqVh7eLZgZ9W33uyq3aAOXwE8bKCRI5Z/1OjwS5pbCT/2if9N8QSb2jNukau1ZSQbU7emrFOUJ9R23n8dMhQDC8PD2YxYINFg42f848/pHiwhkvBIn8q60K/tQd/nBrT7aGHw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CayO2Hkmfc+GkWOgJPRc93DRTu+aWx4FwFRuPyvd06UWCTHF9tfj3s55oCGUjxA3RduqCZpP8ThlVNhysMJ2wwaE0JFkTW3w1UX2fUbeey84He6jMybR2g/5Q9As5CcoFLT4KE1dxgp9vIGJfmsXey8pC6aM+WRGcwM/RiISKtenJsZnJvadUhSREoHBpq0VuMmgjEwf9WsJmeaOV+D0wBytAVSk7SqK+aIgh5zpASsDpUVMrUQa8eT6/ad3cs0OVmpUFPjJujloDfLLEkgfdh4ladwhA3bzyvfa5ig2t0iJiGuRlVkYMgyHRwiLVjAkPZER/CJLgdGCQas5l3XCWA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, WeiLiu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Paul Durrant <paul.durrant@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 19 Jul 2019 13:32:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVPi0inxDFAcFhvkCxNR0VcWNDuKbR4nYzgAANs4A=
  • Thread-topic: [Xen-devel] [PATCH] include/public/memory.h: remove the XENMEM_rsrc_acq_caller_owned flag

On 19.07.2019 14:41, Andrew Cooper wrote:
> On 19/07/2019 13:25, Paul Durrant wrote:
>> When commit 3f8f1228 "x86/mm: add HYPERVISOR_memory_op to acquire guest
>> resources" introduced the concept of directly mapping some guest resources,
>> it was envisaged that the memory for some resources associated with a guest
>> may not actually be assigned to that guest, specifically the IOREQ server
>> resource introduces in commit 6e387461 "x86/hvm/ioreq: add a new mappable
>> resource type...". Such resources were dubbed "caller owned" and resulted
>> in the owned resources" and acquiring them resulted in the
>> XENMEM_rsrc_acq_caller_owned flag being passed back to the caller of the
>> memory op.
>>
>> Unfortunately the implementation led to XSA-276, which was mitigated
>> by commit f6b6ae78 "x86/hvm/ioreq: fix page referencing" and then a related
>> memory accounting problem was worked around by commit e862e6ce
>> "x86/hvm/ioreq: use ref-counted target-assigned shared pages". This latter
>> commit removed the only instance of a "caller owned" resource, but the
>> flag was left in header and checked in one place in the core code.
>> This patch removes that now redundant check and removes the definition of
>> XENMEM_rsrc_acq_caller_owned from the public header. Also, since this was
>> the only flag defined for the XENMEM_acquire_resource memory op, it removes
>> the 'flags' field of struct xen_mem_acquire_resource and replaces it with
>> an equivalently sized 'pad' field.
>>
>> Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
> 
> This is a modification to a public header, but in this specific case, I
> think it is the correct thing to do.

This is in a large "#if defined(__XEN__) || defined(__XEN_TOOLS__)" section,
and we consider public interface parts in such sections volatile anyway.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.