On 06/02/2020 11:43, Jan Beulich wrote:
On 06.02.2020 11:12, Durrant, Paul wrote:
From: Julien Grall
Sent: 06 February 2020 10:04
On 03/02/2020 10:56, Paul Durrant wrote:
@@ -2332,11 +2350,23 @@ struct page_info *alloc_domheap_pages(
memflags, d)) == NUL
On 06.02.2020 11:12, Durrant, Paul wrote:
>> From: Julien Grall
>> Sent: 06 February 2020 10:04
>>
>> On 03/02/2020 10:56, Paul Durrant wrote:
>>> @@ -2332,11 +2350,23 @@ struct page_info *alloc_domheap_pages(
>>> memflags, d)) == NULL)) )
>>>return
> -Original Message-
> From: Julien Grall
> Sent: 06 February 2020 10:04
> To: Durrant, Paul ; xen-devel@lists.xenproject.org
> Cc: Jan Beulich ; Andrew Cooper
> ; George Dunlap ;
> Ian Jackson ; Konrad Rzeszutek Wilk
> ; Stefano Stabellini ; Wei
> Liu ; Volodymyr Babchuk ; Roger
> Pau Mon
Hi,
I am sorry to jump that late in the conversation.
On 03/02/2020 10:56, Paul Durrant wrote:
-if ( unlikely(domain_adjust_tot_pages(d, 1 << order) == (1 << order)) )
+if ( !(memflags & MEMF_no_refcount) &&
+ unlikely(domain_adjust_tot_pages(d, 1 << order) == (1 << order
Currently it is unsafe to assign a domheap page allocated with
MEMF_no_refcount to a domain because the domain't 'tot_pages' will not
be incremented, but will be decrement when the page is freed (since
free_domheap_pages() has no way of telling that the increment was skipped).
This patch allocates