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

Re: [Xen-devel] [PATCH v1 2/8] xen/arm: io: Extend write/read handler to pass the register in parameter



Hi Ian,

On 29/09/15 11:51, Ian Campbell wrote:
> On Mon, 2015-09-28 at 17:35 +0100, Julien Grall wrote:
>> Hi Ian,
>>
>> On 25/09/15 17:36, Ian Campbell wrote:
>>> On Fri, 2015-09-25 at 15:51 +0100, Julien Grall wrote:
>>>> From: Julien Grall <julien.grall@xxxxxxxxxx>
>>>>
>>>> Rather than letting each handler to retrieve the register used by the
>>>> I/O access, add a new parameter to pass the register in parameter.
>>>>
>>>> This will help to implement generic register manipulation on I/O
>>>> access
>>>> such as sign-extension and endianess.
>>>>
>>>> Read handlers need to modify the value of the register, so a pointer
>>>> to
>>>> it is given in argument. Write handlers shouldn't modify the
>>>> register,
>>>> therfore only a plain value is given.
>>>
>>> "therefore"
>>>>
>>>> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
>>>
>>> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxxx
>>>
>>> Is it the case that read handlers today only update *r on success? 
>>
>> Yes, each read handler only update the register mentioned in dabt.reg.
> 
> I meant that they do not touch it on failure.

Sorry, somehow I read as "Is only the register pointed by *r updated by
the read handlers"?

AFAICT, it's always the case. When the handler returns 0 (i.e failure),
a data abort will be injected to the domain unless the handler decide to
crash the domain.

I don't think it's necessary to mandate/enforce as the worst that can
happen is a guest register is corrupted. Although, the guest will
unlikely get continue after a data abort on MMIO we emulate.

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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