xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Tim Deegan <tim@xen.org>
To: R <19890121wr@gmail.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Quick Questions about page fault?
Date: Mon, 5 Mar 2012 12:29:25 +0000	[thread overview]
Message-ID: <20120305122925.GA3065@ocelot.phlegethon.org> (raw)
In-Reply-To: <CAF2sySMu-Uatrw85WmgyD=3Jwx+Zu4Vb8S3edGA1BawoXzHb9A@mail.gmail.com>

At 08:11 +0800 on 03 Mar (1330762314), R wrote:
> Hi everyone,
>          I want to know more about page fault. How does Xen handle
> page fault in both PV and HVM?
>          Which function will Xen call?   What is the difference?

PV: do_page_fault()
HVM with shadow pagetables: sh_page_fault() (via paging_fault())
HVM with HAP does not intercept pagefaults in the hypervisor. 

>          I assume that Xen will notify Guest OS about the page fault
> only when it needs to?

Of course. 

>          But I change the do_page_fault???? and remove the some pages' _PAGE_RW.
>          I also add some code to restore the _PAGE_RW in the
> do_page_fault. If the error_code is 0, do_page_fault returen?
>          But I get some error somehow?

I'm afraid your description is too vague for anyone to understand what
the problem is.
Please read http://wiki.xen.org/wiki/AskingXenDevelQuestions before
posting again.

Tim.

      reply	other threads:[~2012-03-05 12:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-03  0:11 Quick Questions about page fault? R
2012-03-05 12:29 ` Tim Deegan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120305122925.GA3065@ocelot.phlegethon.org \
    --to=tim@xen.org \
    --cc=19890121wr@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).