[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC v2 8/9] xen/arm: Implement hypercall for dirty page tracing (shadow op)



On Thu, 2013-07-04 at 10:25 +0900, Jaeyong Yoo wrote:

> > > @@ -496,6 +496,221 @@ void mark_dirty(struct domain *d, paddr_t addr)
> > >      spin_unlock(&d->arch.dirty.lock);  }
> > >
> > > +static void free_dirty_bitmap(struct domain *d) {
> > > +    struct page_info *pg;
> > > +
> > > +    spin_lock(&d->arch.dirty.lock);
> > > +
> > > +    if(d->arch.dirty.top)
> > > +    {
> > > +        while ( (pg = page_list_remove_head(&d->arch.dirty.pages)) )
> > > +            free_domheap_page(pg);
> > > +    }
> > > +    d->arch.dirty.top = NULL;
> > > +    d->arch.dirty.count = 0;
> > > +
> > > +    spin_unlock(&d->arch.dirty.lock); }
> > > +
> > > +/* Change types across all p2m entries in a domain */ static void
> > > +p2m_change_entry_type_global(struct domain *d, enum mg ot, enum mg
> > > +nt) {
> > > +    struct p2m_domain *p2m = &d->arch.p2m;
> > > +    int i1, i2, i3;
> > > +    int first_index = first_table_offset(GUEST_RAM_BASE);
> > > +    int second_index = second_table_offset(GUEST_RAM_BASE);
> > > +    int third_index = third_table_offset(GUEST_RAM_BASE);
> > 
> > you shouldn't assume GUEST_RAM_BASE is static anywhere
> 
> Yes, you are right. Since there is no way to figure out this value at
> the moment, we use this static value here. I think we need to parse dtb 
> of domu guest and get this value from there. Do you have any suggestion?

The hypervisor should never be parsing (or even seeing) the domU DTB.
Instead the toolstack should poke this sort of information down via a
(presumably new) DOMCTL.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.