Port-xen archive

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

Re: Qemu-upstream with Xen



On Thu, Jun 14, 2012 at 10:22 AM, Jean-Yves Migeon
<jeanyves.migeon%free.fr@localhost> wrote:
> Le 13/06/2012 18:27, Roger Pau Monné a écrit :
>
>>> Is the P2M table (xpmap_phys_to_machine_mapping) entry for this address
>>> marked as INVALID_MFN?
>>
>>
>> I'm not sure if this is correct, but I've done a:
>>
>> pfn_to_mfn((0x3f800000 - XPMAP_OFFSET) >> PAGE_SHIFT) and it is 239540
>
>
> Should be. Out of interest, what it the value of pfn_to_mfn((0x3f800000) >>
> PAGE_SHIFT
>
> without taking the .text offset into account?
>
>
>> Also, the syscall HYPERVISOR_mmu_update returns the error -22 (EINVAL).
>
>
> It is definitely the hypervisor refusing the mapping, but it does not log
> why (and according to pfn_to_mfn(), this entry is valid, so there is
> something it does not like about it -- maybe a bit set where it is not
> expected to be for this type of address).
>
> Next possible step: instrument the hypervisor (xen/arch/x86/mm.c) and see
> the path that leads to EINVAL in do_mmu_update().

The path that leads to this error is in p2m.c, this is the line that
triggers the error (in the get_page_from_gfn_p2m function):

if ( !p2m_is_ram(*t) && !p2m_is_paging(*t) && !p2m_is_magic(*t) ) {

And the value of *t (p2m_type_t) is 4 which corresponds to:

p2m_mmio_dm = 4,            /* Reads and write go to the device model */

This is the fallback error path when this also fails:

if ( (p2m_is_ram(*t) || p2m_is_grant(*t))
             && mfn_valid(mfn)
             && !((q & P2M_UNSHARE) && p2m_is_shared(*t)) )

The result for this is that p2m_type_t is not ram neither grant, so
both p2m_is_ram and p2m_is_grant fail.

Linux doesn't call the get_page_from_gfn_p2m function, so I'm
currently checking to see the differences in the memory area and
hopefully find why this is failing.

Roger.


Home | Main Index | Thread Index | Old Index