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

Re: [XEN v9 4/4] xen/arm64: io: Handle data abort due to cache maintenance instructions



Hi Ayan,

On 01/03/2022 12:40, Ayan Kumar Halder wrote:
When the data abort is caused due to cache maintenance for an address,
there are two scenarios:-

1. Address belonging to a non emulated region - For this, Xen should
set the corresponding bit in the translation table entry to valid and
return to the guest to retry the instruction. This can happen sometimes
as Xen need to set the translation table entry to invalid. (for eg
'Break-Before-Make' sequence).

2. Address belongs to an emulated region - Xen should ignore the
instruction (ie increment the PC) and return to the guest.

I would be explicit and say something along the lines:

"Xen doesn't cache data for emulated regions. So we can safely ignore them".

There is a third scenarios:

The address belongs to neither an emulated region nor has a valid mapping in the P2M.

We try to deal with scenario#1, by invoking check_p2m(). If this is
unsuccessful, then we assume scenario#2.

This means that you will ignore cache maintenance on invalid region. I think we should send an abort to the guest rather than let them believe it worked.

Cheers,

--
Julien Grall



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.