Skip to contentSkip to conversation

page fault handling in Xen

DISCUSSION jeet 2 participants 2 messages Mar 5, 2007

lore
Share & tools
lore

jeet

author
#0 lore raw

Hi Keir

thanks for your reply.I have some more queries

In HVM when guest is executing then processor looks into shadow page table for address translation.
as shadow PT contains the guest pt page readonly mapping of guest level 1 page table, on which guest OS is trying to write a address of new page. 1
this would cause second VMEXit in Xen.

so would faulting address be virtual address of that Guest PT page or of the shadow PT page which guest is trying to write?

jeet

Quoted 9 lines

Above code will execute and in inner unlikely condition will be true as PT table is read only and error is write_access
and control will go to not_a_shadow_fault?

so when the emulation code would be executed for the write that has been performed on read only guest PT for adding entry in
guest page table by guest?

Have I missed some thing here in understanding

Yes: guest PTs are mapped with write permissions in the guest PTs. It's only in the shadow PTs that the guest PTs are mapped read-only. The test on accumulated_gflags is looking at the access permissions in the guest PTs.

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

#1 lore raw
Quoted 1 line · jeet

so would faulting address be virtual address of that Guest PT page or of the shadow PT page which guest is trying to write?

The faulting address is always the VA which the processor is writing to (in this case, the guest's mapping of its own PT page).

Cheers,

Tim.

Signature · 2 lines
Tim Deegan <[email protected]>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508