Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>I understand that xen allocates all the physical memory required by the guest when the guest gets started.</p> </blockquote> <p>Possibly. I think that the current Xen toolstack does do this, but there are proposals to instead just perform a <em>reservation</em> for the physical memory of the guest without actually performing the <em>allocation</em> until the guest actually accesses it. The motivation for this is to allow memory overcommit to increase the host's capacity for guests that allow memory ballooning, and the avoid the time-consuming scrub of all of the guest memory, that is required for security purposes and isolation enforcement, prior to running the guest.</p> <blockquote> <p>Also it maintains a shadow page table</p> </blockquote> <p>For some guests, in some configurations, yes. It will do so for fully-virtualized (aka HVM) guests, where Xen is not using hardware extended page table support (eg. Intel EPT). It will not do so for paravirtualized guests.</p> <blockquote> <p>(I'm assuming it uses struct page_info to maintain this. Am I correct? If not can anyone explain?)</p> </blockquote> <p>Hmm. The shadow page tables are a very sophisticated and intricate piece of software. They use multiple datastructures to maintain the virtualized address space of the guest. I think you'll need to study the code in detail to get a handle on it. It's beyond the scope of a short answer here.</p> <blockquote> <p>which I wish to access because I need to traverse that list to check whether the guest to which this page is assigned to has at least accessed it once.</p> </blockquote> <p>You'll need to mark the page as absent in the guest page tables, and modify the page fault handler in Xen's shadow page table code to fix it up as present on trap, but also update your own datastructure for tracking the accesses as they occur. There is code similar to this for tracking guest pages accesses <em>for writes</em>, not reads, called dirty bitmap tracking which is used when performing live migration of virtual machines.</p> <blockquote> <p>Can anyone explain me how I can achieve this?</p> </blockquote> <p>It would help if you could explain your motivation for wanting to track guest read accesses to physical memory locations.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload