NetBSD-Bugs archive

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

Re: kern/49330 (Attempting to compile a Xen DOM0 and DRMKMS kernel doesn't compile)



The following reply was made to PR kern/49330; it has been noted by GNATS.

From: Brad Spencer <brad%anduin.eldar.org@localhost>
To: bouyer%antioche.eu.org@localhost
Cc: riastradh%NetBSD.org@localhost, gnats-bugs%NetBSD.org@localhost, kern-bug-people%NetBSD.org@localhost,
        netbsd-bugs%NetBSD.org@localhost, gnats-admin%NetBSD.org@localhost
Subject: Re: kern/49330 (Attempting to compile a Xen DOM0 and DRMKMS kernel
 doesn't compile)
Date: Mon, 9 Mar 2015 13:44:42 -0400 (EDT)

    On Fri, Mar 06, 2015 at 02:08:24PM +0000, Taylor R Campbell wrote:
    >    Date: Sat, 28 Feb 2015 15:04:55 +0000 (UTC)
    >    From: riastradh%NetBSD.org@localhost
    > 
    >    Was afraid I might find a system where pci_intr_handle_t is not int.
    >    It shouldn't be too hard to adapt the drm code to this case: just
    >    introduce a new type drm_irq_t or something, as a union of all the
    >    possible interrupt handle types in drm, and put it in the right
    >    places, with the compiler's help.  But it will take some work, and
    >    cause more divergence from upstream.
    > 
    > Turns out drm doesn't actually use PCI interrupt handles -- the irq
    > numbers it ostensibly handles appear to be a sham.  So I committed all
    > the changes in drm necessary to work around this.
    > 
    > There remain some issues in Xen.  The attached patch makes a Xen/amd64
    > dom0 kernel build with drm (including Intel, Radeon, and Nouveau), but
    > I'm clueless about Xen, so I'm not going to commit it myself.
 
    initxen_load_memmap() is wrong: what you get here are physical addresses (PA),
    but later I guess you'll use them as machine addresses (MA) for DMA engines.
 
    With Xen you can't use free lists as you do on bare metal, because
    PA and MA are not necesserely in the same region. Requesting memory
    from e.g. VM_FREELIST_FIRST1G will give you PA below the 1G boundary,
    but you have no guarantees that the MA will be below the 1G boundary.
    Also, even if the PAs are contigous, the MAs may not be (with some
    debug options, the hypervisor will make sure they are not).
 
    The only way to get pages with contraints on machine addresses is
    to use Xen specific allocation  hypercalls. You can look at
    sys/arch/xen/x86/xen_bus_dma.c for how to use this (especially
    _xen_alloc_contig())
 
    -- 
    Manuel Bouyer <bouyer%antioche.eu.org@localhost>
 	NetBSD: 26 ans d'experience feront toujours la difference
    --
 
 
 
 
 
 I was the one who submitted the original Bug regarding this issue and
 appreciate it getting looked at.  I probably can't aid with the
 development, but can help out with any testing.  I have a T530 laptop that
 I run Xen 4.2 with a NetBSD 6.x DOM0, and tons of guests of various types,
 and it would be truly a nice thing to be able to go to a NetBSD 7.x DOM0
 and actually use the non-vesa driver when running X.
 
 
 
 -- 
 Brad Spencer - brad%anduin.eldar.org@localhost - KC8VKS
 http://anduin.eldar.org  - & -  http://anduin.ipv6.eldar.org [IPv6 only]
 


Home | Main Index | Thread Index | Old Index