At 18:40 +0000 on 16 Mar (1237228854), longwang@xxxxxxxxxxxxxxxxx wrote:
> 2) When I call paging_mode_log_dirty(pdom) in hypervisor, the hypervisor
> crashes. I thought paging_mode_log_dirty() enables the shadow paging as
> well as dirty logging after I had read live migration code. But I was
> wrong. paging_mode_log_dirty() crashes because shadow paging is not
> enabled yet.
> Now I need to enable shadow paging mode in my testbed (PV).
You wrote all the code before figuring out how to turn on shadow pagetables?
> I tried the
> auto_translated_physmap in the domU config file. But "xm create" failed
> with :
> Error: (1, 'Internal error', 'xc_dom_boot_domU_map: failed to mmap domU
> pages 0x100+0x2da [mmap, errno=14 (Bad address)]\n')
As Jeremy says, auto_translated_physmap doesn't work on recent Xens or
> So how can I enable shadow paging? Do I have to run HVM for this to work?
If you want the shadow code to hide a layer of address translations
(i.e. have gfn != mfn) then yes, you need HVM.
Otherwise, you can just copy what the live-migration tools do to turn on
shadow pagetables for PV guests. It's just one hypercall. For example,
To turn on log-dirty mode, use op=2. To turn off shadow mode, op=0.
> > At 16:30 +0000 on 16 Mar (1237221012), Jeremy Fitzhardinge wrote:
> >> Long Wang wrote:
> >> > I am working on a research project based on Xen 3.3.1. I want to use
> >> the
> >> > shadow page table for setting guest system memory pages as read-only
> >> and/or
> >> > dirty, and perform a copy-on-write mechanism when these memory pages
> >> are
> >> > updated.
> > Several people are already working on copy-on-write memory in Xen, or
> > variations on that theme (Mike Sun, Patrick Colp, John Byrne, and
> > others) as well as more exotic things like Difference Engine and
> > Transcendent Memory. It would probably be better to talk to those
> > people and try to help their efforts than start from scratch.
> > Patrick Colp's slides from the most recent Xen Summit give an idea of
> > one method of implementing it:
> > http://www.xen.org/files/xensummit_oracle09/VMSnapshots.pdf
> > Cheers,
> > Tim.
> > --
> > Tim Deegan <Tim.Deegan@xxxxxxxxxx>
> > Principal Software Engineer, Citrix Systems (R&D) Ltd.
> > [Company #02300071, SL9 0DZ, UK.]
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]
Xen-devel mailing list