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

Re: [Xen-devel] [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults




On 19.12.2018 19:40, Roger Pau Monné wrote:
> On Wed, Dec 19, 2018 at 04:49:43PM +0000, Alexandru Stefan ISAILA wrote:
>> On 27.11.2018 13:32, Roger Pau Monné wrote:
>>> Would it be possible to add some kind of flag to the emulator to
>>> signal whether p2m restrictions should be enforced/ignored?
>>> hvmemul_acquire_page seems like a suitable place, but I'm not that
>>> familiar with the emulator.
>>>
>>> Then you could generate vm events from the emulator itself, which
>>> AFAICT is the only way to handle this instruction execution issue.
>>
>> I've been testing what place would be the best to have the emulator send
>> a event and it turns out the hvmemul_acquire_page is not ok. What worked
>> form me was having the emulator send write access violations from
>> hvmemul_map_linear_addr(). Here I can get the gfn, gla and offset for
>> the event.
>>
>> For the exec access violation I've tried to send events from
>> hvmemul_insn_fetch() but there is a problem to get the same variables
>> for the event. Is there a way to go around and get those params for the
>> event? Any thoughts are appreciated.
> 
> You have the IP in hvmemul_insn_fetch, can't you get the gfn from
> there? Either directly or by translating the gla to a gfn if the guest
> is running with paging enabled?
> 
I've managed to solve the issue with hvmemul_linear_to_phys() for gpa
and hvmemul_virtual_to_linear() for gla. I will post the patch in a rfc 
after I will test if everything in ok.

Thanks,
Alex
_______________________________________________
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®.