WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [PATCH] supporting non-NX/XD capable processors on x86_6

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] supporting non-NX/XD capable processors on x86_64 xenlinux
From: "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>
Date: Thu, 18 Aug 2005 07:15:50 -0700
Cc: Jerone Young <jerone@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 18 Aug 2005 14:13:31 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcWj0QJBKnd1xS/fTMWIqW11MaAzwQAKrHag
Thread-topic: [Xen-devel] [PATCH] supporting non-NX/XD capable processors on x86_64 xenlinux
Keir Fraser wrote:
> On 18 Aug 2005, at 05:29, Nakajima, Jun wrote:
> 
>> I don't have particular preference, but the latter one's change is
>> smaller, and it can fix other places (that are using the attrributes
>> derived from __PAGE_KERNEL). But the former one is cleaner to me. If
>> people agree, I can make such a patch.
> 
> How does native x86/64 Linux avoid this problem? It doesn't mask
> __PAGE_KERNEL with __supported_pte_mask, so I'm reluctant to take this
> patch. Seems to me there is some other underlying difference between
> us and native that is not best solved by diverging even further.
> 
> Unless native doesn;t boot on these failing boxes either?
> 
>   -- Keir

One obvious reason is: xen-specific drivers are using __PAGE_KERNEL (and
they don't exist in the native Linux). If xen_contig_memory, for
example, does not work, it won't boot... Fixing xen_contig_memory did
not fix the booting problem as long as I remember? Since then we fixed
some attribute problems in other xen-specific drivers when we brough up
domU, so I'll take a look.

xen_contig_memory
...
    /* 3. Map the new extent in place of old pages. */
    for (i = 0; i < (1<<order); i++) {
        BUG_ON(HYPERVISOR_update_va_mapping(
            vstart + (i*PAGE_SIZE),
            __pte_ma(((mfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL), 0));
        xen_machphys_update(mfn+i, (__pa(vstart)>>PAGE_SHIFT)+i);
        phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = mfn+i;
    }


blkback.c:  dispatch_probe
static void dispatch_probe(blkif_t *blkif, blkif_request_t *req)
{
 ...
#ifdef CONFIG_XEN_BLKDEV_TAP_BE
    if ( HYPERVISOR_update_va_mapping_otherdomain(
        MMAP_VADDR(pending_idx, 0),
        (pte_t) { (req->frame_and_sects[0] & PAGE_MASK) | __PAGE_KERNEL
},
        0, (blkif->is_blktap ? ID_TO_DOM(req->id) : blkif->domid) ) )

        goto out;
#else
    if ( HYPERVISOR_update_va_mapping_otherdomain(
        MMAP_VADDR(pending_idx, 0),
        (pte_t) { (req->frame_and_sects[0] & PAGE_MASK) | __PAGE_KERNEL
},
        0, blkif->domid) )

        goto out;
#endif
#endif /* endif CONFIG_XEN_BLKDEV_GRANT */

Jun
---
Intel Open Source Technology Center

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel