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

Re: [Xen-devel] [RFC 16/16] xen/arm: Track page accessed between batch of Set/Way operations



Hi Jan,

On 09/10/2018 08:04, Jan Beulich wrote:
On 08.10.18 at 20:33, <julien.grall@xxxxxxx> wrote:
At the moment, the implementation of Set/Way operations will go through
all the entries of the guest P2M and flush them. However, this is very
expensive and may render unusable a guest OS using them.

For instance, Linux 32-bit will use Set/Way operations during secondary
CPU bring-up. As the implementation is really expensive, it may be possible
to hit the CPU bring-up timeout.

To limit the Set/Way impact, we track what pages has been of the guest
has been accessed between batch of Set/Way operations. This is done
using bit[0] (aka valid bit) of the P2M entry.

This patch adds a new per-arch helper is introduced to perform actions just
before the guest is first unpaused. This will be used to invalidate the
P2M to track access from the start of the guest.

While I'm not opposed to the new arch hook, why don't you create the
p2m entries in their intended state right away? At the very least this
would have the benefit of confining the entire change to Arm code.

Let me start by saying I think having a hook to perform an action once the VM has been fully created is quite useful. For instance, this could be used on Arm to limit the invalidation of the icache. At the moment, we invalidate the icache for every populate memory hypercall. This is quite a waste of cycle.

In this particular circumstance, I would still like to use the hardware for walking the page-tables during the domain creation (i.e when copy binary over). This would not be possible if we create the entry with valid bit unset.

Furthermore, we don't need to create entry with valid bit unset once the guest is running. So we would need to check in the P2M code whether the guest is running and whether IOMMU is enabled.

So overall, I fell this is the best way to keep it simple for Arm and open door to speed/streamline a bit more the domain creation.

Cheers,

--
Julien Grall

_______________________________________________
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®.