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

RE: [Xen-devel] EPS Signature

Actually, following code snippet where our DOM-0 driver tries to set
some data in unused Gdt areas, 
Its generating Bad EIP errors when we try to access it (by it's physical

SetGDT Code is something like following:

        tGdtRequest     l_Request;
        unsigned char   *lp_Data;
        int cpu;
        struct desc_struct l_Desc, *gdt_table;
        u64 l_entry_ma;
        u64 l_desc_64;

        /* Get the structure from the user */

        copy_from_user(&l_Request, (tGdtRequest *)arg,

        /* Set up a ptr to the kernel's GDT */

        copy_from_user(&l_Desc, l_Request.userBuffer, sizeof(struct

        cpu = get_cpu();
        gdt_table  = get_cpu_gdt_table(cpu);
        l_entry_ma = virt_to_bus(&(gdt_table[l_Request.entryNum]));
        l_desc_64  = *( (u64 *) &l_Desc);
        HYPERVISOR_update_descriptor(l_entry_ma, l_desc_64);
        //l_Desc = gdt_table[l_Request.entryNum] = l_Desc;
Which has call to virt_to_bus(..), which I thought was a suspect, hence,
the usage question..

I also tried using HYPERVISOR_update_descriptor(..) instead..without
much luck.

I am also little confused, if the memory/io mapping is taken care of by
Xen, shouldn't DOM-0 driver calls remain unchanged? Or be compiled with
Xen replacement hyper-calls? 
That is of course, if Xen treats DOM-0 differently (basic mm


-----Original Message-----
From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx] 
Sent: Sunday, February 11, 2007 2:09 AM
To: Kaushik Barde; Ian Pratt; Xen devel list
Subject: Re: [Xen-devel] EPS Signature 

Isa_bus_to_virt() is available. Isa_virt_to_bus() isn't. Why would you
the latter?

 -- Keir

On 11/2/07 01:33, "Kaushik Barde" <Kaushik_Barde@xxxxxxxxxxx> wrote:

> I get following Error..
> 496: error: `isa_virt_to_bus_is_UNSUPPORTED' undeclared (first use in
> function)
> Is it truely unsupported or I am missing proper includes..
> I suspect later but "UNSUPPORTED" makes me uncomfortable.
> Please advise.
> -Kaushik
> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx on behalf of Ian Pratt
> Sent: Sun 2/4/2007 6:52 PM
> To: Kaushik Barde; Xen devel list
> Subject: RE: [Xen-devel] EPS Signature
>> We want to access the EBDA Entry Point Signature at 40:0E for our
> DOM-0
>> through a driver,
>> We noticed that driver is trying to read from a pseudo physical
> location
>> and not the physical machine RAM location. Hence it's not getting the
>> proper value. But if we have to read from the machine RAM location we
> can
>> use ( virt_to_bus or bus_to_virt) per dev_list comments.
>> But this area is under the control of hypervisor. I do not know if we
> can
>> ioremap these pages ( those which belong to hypervisor).
>> I am trying to see if we can be able to get to the 40:0E address. And
> get
>> the correct EPS signature
> Dom0 already has the bottom 1MB of physical ram mapped. You can use
> poorly named isa_bus_to_virt()
> Ian
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

Xen-devel mailing list



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