All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kaushik Barde" <Kaushik_Barde@Phoenix.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>,
	Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
	Xen devel list <xen-devel@lists.xensource.com>
Subject: RE: EPS Signature
Date: Sun, 11 Feb 2007 15:39:29 -0800	[thread overview]
Message-ID: <0EF82802ABAA22479BC1CE8E2F60E8C30164B681@scl-exch2k3.phoenix.com> (raw)
In-Reply-To: C1F49BCC.17D8%Keir.Fraser@cl.cam.ac.uk

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
address). 

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,
sizeof(tGdtRequest));

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

	copy_from_user(&l_Desc, l_Request.userBuffer, sizeof(struct
desc_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;
	put_cpu();
}
 
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
stand-point).


-Kaushik

-----Original Message-----
From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] 
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
need
the latter?

 -- Keir

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

> 
> 
> I get following Error..
> 
> 496: error: `isa_virt_to_bus_is_UNSUPPORTED' undeclared (first use in
this
> 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@lists.xensource.com 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
the
> poorly named isa_bus_to_virt()
> 
> Ian
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

  reply	other threads:[~2007-02-11 23:39 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-01 13:53 xensource (pci) device id's? Gerd Hoffmann
2007-02-01 13:58 ` Ian Campbell
2007-02-01 14:30   ` Gerd Hoffmann
2007-02-01 15:45     ` Gerd Hoffmann
2007-02-02  9:26       ` Ian Campbell
2007-02-02  9:47         ` Gerd Hoffmann
2007-02-02 18:25       ` Keir Fraser
2007-02-05  8:48         ` Gerd Hoffmann
2007-02-05 14:20         ` Gerd Hoffmann
2007-02-02 19:03       ` Keir Fraser
2007-02-05  2:29         ` EPS Signature Kaushik Barde
2007-02-05  2:52           ` Ian Pratt
2007-02-10  7:52             ` GDT access from DOM-0 driver Kaushik Barde
2007-02-11  1:33             ` EPS Signature Kaushik Barde
2007-02-11 10:09               ` Keir Fraser
2007-02-11 23:39                 ` Kaushik Barde [this message]
2007-02-12  0:58                   ` Keir Fraser
2007-02-12  2:36                     ` Kaushik Barde
2007-02-12  7:43                       ` Keir Fraser
2007-02-06 15:43           ` Andrew D. Ball
2007-02-05  8:55         ` xensource (pci) device id's? Gerd Hoffmann
2007-02-01 20:02     ` Zulauf, John
2007-02-01 20:29       ` Ian Campbell
2007-02-01 23:22         ` Keir Fraser
2007-02-02  8:15         ` Gerd Hoffmann
2007-02-01 23:17       ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0EF82802ABAA22479BC1CE8E2F60E8C30164B681@scl-exch2k3.phoenix.com \
    --to=kaushik_barde@phoenix.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.