From: Abhinav Srivastava <abhinavs_iitkgp@yahoo.co.in>
To: xen-devel@lists.xensource.com
Subject: device-mmio emulation in Xen
Date: Tue, 5 Jan 2010 21:02:37 +0530 (IST) [thread overview]
Message-ID: <440319.77833.qm@web7907.mail.in.yahoo.com> (raw)
Hi there,
I am trying to understand how does Xen handle device MMIO. More specifically, I am looking at the network behavior, however my understanding is that other devices such as disk will use the same logic.
I noticed that during a network copy operation Xen page faults a lot and control goes to sh_page_fault function. When I printed some debugging info, it showed me gmfn = -1. Then the execution goes through the regular path of the page fault handler code, which means it creates an entry using shadow_get_and_create_l1e, propagates it using l1e_propagate_from_guest, and finally updates the entry using shadow_set_l1e. It finally goes into the device-model mmio condition. In this condition, it extracts a guest physical address and calls "goto mmio", which in turn calls handle_mmio function that emulates the instruction.
However with the gmfn = -1 condition, the execution sometimes directly goto
to handle_mmio function using the fast_fault_path with going through the regular path. It seems like there are two possible execution paths, and I did not understand which one is chosen when?
I have some questions related to this behavior:
1. Why are there so many faults duing network copy operation?
2. What does gmfn = -1 signify? Is it reserved for mmio addresses?
3. How does Xen handle this gmfn = -1? It seems like on the regular path
it still creates, propagates, and updates entries for gmfn = -1. How does Xen handles this at the shadow page table level?
4. What are these two code execution paths, and when does Xen decide which
path to choose?
5. Finally, is there anyway these faults can be reduced?
I would very appreciate any help in this regard.
Thanks,
Abhinav
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
next reply other threads:[~2010-01-05 15:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-05 15:32 Abhinav Srivastava [this message]
2010-01-05 16:00 ` device-mmio emulation in Xen Tim Deegan
2010-01-05 16:32 ` Abhinav Srivastava
2010-01-05 16:38 ` Tim Deegan
2010-01-18 15:15 ` Abhinav Srivastava
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=440319.77833.qm@web7907.mail.in.yahoo.com \
--to=abhinavs_iitkgp@yahoo.co.in \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.