|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v7 8/8] xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}
Hi Henry, some more remarks. On 09/10/2023 02:03, Henry Wang wrote: +/* + * Invalidate all entries in the root page-tables. This is + * useful to get fault on entry and do an action. + * + * p2m_invalid_root() should not be called when the P2M is shared with + * the IOMMU because it will cause IOMMU fault. + */ +void p2m_invalidate_root(struct p2m_domain *p2m) I think this function doesn't make sense for the MPU. What would invalidate?The only caller outside of the file is in arch_domain_creation_finished(). This was used for set/way emulation which I believe will be difficult to implement efficiently for the MPU (see my other reply to this patch). So I would consider to move arch_domain_creation_finished() in mmu/p2m.c or creating a new function p2m_domain_creation_finished() which is called from arch_domain_creation_finished(). [...] I believe an implementation of p2m_flush_vm() would be quite expensive for the MPU. It would be better to not emulate set/way for now.+/* + * Clean & invalidate RAM associated to the guest vCPU. + * + * The function can only work with the current vCPU and should be called + * with IRQ enabled as the vCPU could get preempted. + */ +void p2m_flush_vm(struct vcpu *v) It would also feel a bit odd to leave it unimplemented and called from check_for_vcpu_work(). So maybe we want to rename it. I don't have a goood name suggestion though. Bertrand, Stefano? [...] -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |