Skip to contentSkip to conversation

xc_ptrace fix

DISCUSSION Leendert van Doorn 2 participants 2 messages Apr 29, 2005

lore
Share & tools
lore
#0 lore raw

# Make work for paravirtualized guest

So it does not return an indentity map for paravirtualized guests?

Sorry about that, I'll make sure my fixes are programmed more defensive next time.

Leendert

#1 lore raw

What you're doing could work in principle, but the page array would have to be equal to the number of pages on the machine not the number of "physical" pages in the guest. In the paravirtualized case you are reading from the hardware page tables, so although the guest may only be using 64MB its pages may reside at the edge of 4GB. The segmentation fault I sent earlier was caused by the inevitable indexing off the edge of the array.

Looking at the code in DOM0_GETMEMINFO:

            for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ )
            {
                pfn = list_entry(list_ent, struct pfn_info, list) -
                    frame_table;
               if ( put_user(pfn, buffer) )

It only adds an entry for each page in use, which I assume means it is just the p2m mapping of page frames.

Quoted 4 lines

So it does not return an indentity map for paravirtualized guests?

Sorry about that, I'll make sure my fixes are programmed more defensive next time.

Thanks.

-Kip