[seL4] Fwd: fault processing

2024-01-26 Thread Leonid Meyerovich
Even some more information:

These is a function
word_t Arch_setMRs_fault(tcb_t *sender, tcb_t *receiver, word_t
*receiveIPCBuffer, word_t faultType)
which populate a message and send it to fault handler.
In this function
   case seL4_Fault_VCPUFault:
return setMR(receiver, receiveIPCBuffer, seL4_VCPUFault_HSR,
seL4_Fault_VCPUFault_get_hsr(sender->tcbFault));
This is only information that sent to fault handler, but
for seL4_Fault_VMFault it provides nuch more

  case seL4_Fault_VMFault: {
if (config_set(CONFIG_ARM_HYPERVISOR_SUPPORT)) {
word_t ipa, va;
va = getRestartPC(sender);
ipa = (addressTranslateS1CPR(va) & ~MASK(PAGE_BITS)) | (va &
MASK(PAGE_BITS));
setMR(receiver, receiveIPCBuffer, seL4_VMFault_IP, ipa);



Just some addition: I have found function
seL4_Fault_VCPUFault_get_HSR(seL4_Fault_t seL4_Fault)
It gives me the value of HSR register, but how can I get fault address and
some other (if exist) information?

Thanks,

-- Forwarded message -
From: Leonid Meyerovich 
Date: Fri, Jan 26, 2024 at 11:35 AM
Subject: fault processing
To: 


I am working on fault processing.
When I am a fault I am calling
void sel4utils_print_fault_message(seL4_MessageInfo_t tag, const char
*thread_name) from sel4libsutils library
I have tested it for "page fault" condition and it works fine - I am
getting seL4_Fault_VMFault fault type

But in certain case I have got seL4_Fault_VCPUFault type, which is not
implemented sel4libsutils library

I try to process this fault similar to seL4_Fault_VMFault to get all
neccessary registers, but
the kernel does not have functions like seL4_Fault_VCPUFault_get_IP.

What is the message format for VCPU fault?
Thanks
___
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems


[seL4] Fwd: fault processing

2024-01-26 Thread Leonid Meyerovich
Just some addition: I have found function
seL4_Fault_VCPUFault_get_HSR(seL4_Fault_t seL4_Fault)
It gives me the value of HSR register, but how can I get fault address and
some other (if exist) information?

Thanks,

-- Forwarded message -
From: Leonid Meyerovich 
Date: Fri, Jan 26, 2024 at 11:35 AM
Subject: fault processing
To: 


I am working on fault processing.
When I am a fault I am calling
void sel4utils_print_fault_message(seL4_MessageInfo_t tag, const char
*thread_name) from sel4libsutils library
I have tested it for "page fault" condition and it works fine - I am
getting seL4_Fault_VMFault fault type

But in certain case I have got seL4_Fault_VCPUFault type, which is not
implemented sel4libsutils library

I try to process this fault similar to seL4_Fault_VMFault to get all
neccessary registers, but
the kernel does not have functions like seL4_Fault_VCPUFault_get_IP.

What is the message format for VCPU fault?
Thanks
___
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems