[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH V1 08/12] xen/arm: Invalidate qemu mapcache on XENMEM_decrease_reservation
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Oleksandr <olekstysh@xxxxxxxxx>
- Date: Thu, 6 Aug 2020 19:57:12 +0300
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Thu, 06 Aug 2020 16:57:29 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 06.08.20 19:33, Jan Beulich wrote:
Hi Jan.
On 06.08.2020 16:28, Oleksandr wrote:
On 06.08.20 14:50, Jan Beulich wrote:
Hi Jan
On 03.08.2020 20:21, Oleksandr Tyshchenko wrote:
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -1652,6 +1652,12 @@ long do_memory_op(unsigned long cmd,
XEN_GUEST_HANDLE_PARAM(void) arg)
break;
}
+ /* x86 already sets the flag in hvm_memory_op() */
+#if defined(CONFIG_ARM64) && defined(CONFIG_IOREQ_SERVER)
+ if ( op == XENMEM_decrease_reservation )
+ curr_d->arch.hvm.qemu_mapcache_invalidate = true;
+#endif
Doesn't the comment already indicate a route towards an approach
not requiring to alter common code?
Given that IOREQ is now moved under common/, I think it would make sense
to have this set in common code as well for all the architecture.
IOW, I would suggest to drop the #ifdef CONFIG_ARM64. In addition, we
may want to introduce an helper to check if a domain is using ioreq.
Of course, with the (part of the) conditional dropped and the struct
field moved out of the arch sub-struct, this is fine to live here.
ok.
I suspect this should *also* live in compat_memory_op(). Please confirm
whether my understanding correct.
Doesn't compat_memory_op() simply call here, so will have the flag set
as needed?
Indeed, sorry for the noise.
--
Regards,
Oleksandr Tyshchenko
|