[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 2/9] xen/arm: assign static shared memory to the default owner dom_io
- To: Penny Zheng <Penny.Zheng@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Julien Grall <julien@xxxxxxx>
- Date: Wed, 7 Sep 2022 12:22:59 +0100
- Cc: wei.chen@xxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Wed, 07 Sep 2022 11:23:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Penny,
On 06/09/2022 09:59, Penny Zheng wrote:
+static int __init assign_shared_memory(struct domain *d,
+ uint32_t addr_cells, uint32_t
size_cells,
+ paddr_t pbase, paddr_t psize)
+{
+ mfn_t smfn;
+
+ dprintk(XENLOG_INFO,
+ "%pd: allocate static shared memory BANK
%#"PRIpaddr"-%#"PRIpaddr".\n",
+ d, pbase, pbase + psize);
+
+ smfn = acquire_shared_memory_bank(d, pbase, psize);
+ if ( mfn_eq(smfn, INVALID_MFN) )
+ return -EINVAL;
+
+ /*
+ * DOMID_IO is auto-translated (i.e. it seems RAM 1:1). So we do not need
Hmmm... I should have re-read my sentence before hitting sending. It
should be "is not auto-translated" and s/seeems/sees/.
Other than that:
Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>
Cheers,
--
Julien Grall
|