Skip to contentSkip to conversation

page fault handling in Xen

DISCUSSION jeet 2 participants 2 messages Mar 2, 2007

lore
Share & tools
lore

jeet

author
#0 lore raw

Hi Tim

Thanks for your prompt reply.

But I am currently looking into xen 3.0.3.

Is shadow code implementation in xen 3.0.3 is same as explained by you in reply?

Jeet

----- Original Message ----
From: Tim Deegan <[email protected]>
To: jeet <[email protected]>
Cc: [email protected]
Sent: Friday, 2 March, 2007 3:06:46 PM
Subject: Re: [Xen-devel] page fault handling in Xen

Quoted 1 line · jeet

As per my understanding when guest can update it own page table without causing VM exit in xen

No -- once a page is recognised as a page table by Xen, the guest is no longer allowed to write directly to it. We trap and emulate any instructions that write to known page tables, so that we can keep the shadow page tables up to date.

Quoted 9 lines

when some process requires some memory (pages) this will cause page fault and control goes to guest OS the guest then allocate page from its own psuedo address space and make entries in guest page table which contain mapping of virtual to psuedo physical memory and

But when actual write occurs to that page, page fault occurs which will cause vm exit in xen.

Xen then will update the page mfn in shadow page table and return control back to guest by vn entry.

Is this understanding it correct? so there would be only one vn exit/entry?

There are at least two VMEXITs needed. Typically the first is for the original page fault, which is reflected back to the guest. The second is caused by the guest's fault-handler writing to guest pagetables; Xen intercepts that write and updates the shadow pagetables to match.

Cheers,

Tim.

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

_______________________________________________
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

Is shadow code implementation in xen 3.0.3 is same as explained by you in reply?

Yes.

Cheers,

Tim.

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