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

Re: [Xen-devel] [PATCH v5] x86/emulate: Send vm_event from emulate



On 01.07.2019 17:36, Alexandru Stefan ISAILA wrote:
> On 01.07.2019 17:55, Jan Beulich wrote:
>> On 01.07.2019 16:45, Alexandru Stefan ISAILA wrote:
>>> On 01.07.2019 16:13, Jan Beulich wrote:
>>>>>>> On 04.06.19 at 13:49, <aisaila@xxxxxxxxxxxxxxx> wrote:
>>>>> +    if ( !req.u.mem_access.flags )
>>>>> +        return false; /* no violation */
>>>>
>>>> How is the "false" here (I think this is the one the description talks
>>>> about) matching up with the various other ones in the function?
>>>
>>> There should be no event if there is no access violation. So in this
>>> case the emulation is continued as expected.
>>
>> But this doesn't answer my question: You use "false" as return value
>> to indicate different things. Only the one here means "no access
>> violation".
> 
> Sorry about that, since this will remain the only return false apart
> form the main one (return monitor_traps()), false  = event was not sent
> and true = event was sent.
> 
> I understand that you are asking about the scenario when there was a
> violation and the event was not sent. Then I can issue a domain_crash()
> as that is potentially a big issue.
> 
> I hope I got that correctly.

I don't get the impression that you did. I count a total of four
"return false" in the function, only one of which explicitly means
"no access violation" (others may have that meaning implicitly). Let's
take the p2m_get_mem_access() failure case as an example: What I don't
understand is why this case and the "no access violation" one are both
meant to be treated the same.

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