All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Genapic in x86_64 Dom0
@ 2005-08-19 20:25 Puthiyaparambil, Aravindh
  2005-08-20  9:45 ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: Puthiyaparambil, Aravindh @ 2005-08-19 20:25 UTC (permalink / raw)
  To: xen-devel; +Cc: Chris Wright

I am working on a patch on to accommodate clustered APICs in x86_64
Dom0/U Genapic. At the moment it defaults to flat. I am thinking of
splitting genapic_xen into genapic_xen_flat and genapic_xen_cluster. 

My question is that since the most of the code that checks for clustered
vs flat has been IFDEFed out what is the best way to inform the Dom that
it needs to run in clustered/flat APIC mode? Should I be thinking about
introducing a new hypercall that does this or is there another standard
way by which information is passed between Xen and Domains during boot
that I can make use of?

Thanks
Aravindh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC] Genapic in x86_64 Dom0
  2005-08-19 20:25 [RFC] Genapic in x86_64 Dom0 Puthiyaparambil, Aravindh
@ 2005-08-20  9:45 ` Keir Fraser
  2005-08-22 18:20   ` Chris Wright
  0 siblings, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2005-08-20  9:45 UTC (permalink / raw)
  To: Puthiyaparambil, Aravindh; +Cc: Chris Wright, xen-devel

> I am working on a patch on to accommodate clustered APICs in x86_64
> Dom0/U Genapic. At the moment it defaults to flat. I am thinking of
> splitting genapic_xen into genapic_xen_flat and genapic_xen_cluster. 
> 
> My question is that since the most of the code that checks for clustered
> vs flat has been IFDEFed out what is the best way to inform the Dom that
> it needs to run in clustered/flat APIC mode? Should I be thinking about
> introducing a new hypercall that does this or is there another standard
> way by which information is passed between Xen and Domains during boot
> that I can make use of?

Isn't flat/clustered mostly a local APIC issue? In which case domain 0
needn't care, as local APICs are entirely maintained by Xen.

As for IO APICs, although domain 0 writes the routing entries, Xen is
responsible for stamping in appropriate destination fields, based on
knowledge of physical CPU IDs and which domains are running on which
physical CPUs. This code can be extended to handle writing
clustering-compatible routing entries.

Perhaps genapic_xen is currently being too smart for its own good? :-)
On i386 we lobotomised local apic handling.

 -- Keir

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [RFC] Genapic in x86_64 Dom0
@ 2005-08-22 16:14 Puthiyaparambil, Aravindh
  0 siblings, 0 replies; 6+ messages in thread
From: Puthiyaparambil, Aravindh @ 2005-08-22 16:14 UTC (permalink / raw)
  To: Keir Fraser
  Cc: Koren, Bradley J, xen-devel, Chris Wright, Magolan, John F,
	Subrahmanian, Raj, Davis, Jason, Vessey, Bruce A

> 
> Isn't flat/clustered mostly a local APIC issue? In which case domain 0
> needn't care, as local APICs are entirely maintained by Xen.

Yes you are right. The way Chris has written xen_send_IPI_shortcut()
should take care of the clustered case too.

> 
> As for IO APICs, although domain 0 writes the routing entries, Xen is
> responsible for stamping in appropriate destination fields, based on
> knowledge of physical CPU IDs and which domains are running on which
> physical CPUs. This code can be extended to handle writing
> clustering-compatible routing entries.

This sounds like a better idea and less work ;-) I will submit a patch.

Aravindh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC] Genapic in x86_64 Dom0
  2005-08-20  9:45 ` Keir Fraser
@ 2005-08-22 18:20   ` Chris Wright
  2005-08-22 18:48     ` Keir Fraser
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wright @ 2005-08-22 18:20 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Chris Wright, xen-devel, Puthiyaparambil, Aravindh

* Keir Fraser (Keir.Fraser@cl.cam.ac.uk) wrote:
> Perhaps genapic_xen is currently being too smart for its own good? :-)

Hehe, quite possible ;-)

> On i386 we lobotomised local apic handling.

My goal was to avoid (equivalent of) #if 0 where possible, by backfilling
functionality where possible.  I also had filled out mpc_config_processor
during mp_register_lapic and tried to maintain the physid map (that bit
isn't merged).  Do you think there's value in maintaining that level of
code compatibility?

thanks,
-chris

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC] Genapic in x86_64 Dom0
  2005-08-22 18:20   ` Chris Wright
@ 2005-08-22 18:48     ` Keir Fraser
  2005-08-22 18:57       ` Chris Wright
  0 siblings, 1 reply; 6+ messages in thread
From: Keir Fraser @ 2005-08-22 18:48 UTC (permalink / raw)
  To: Chris Wright; +Cc: xen-devel, Puthiyaparambil, Aravindh

> * Keir Fraser (Keir.Fraser@cl.cam.ac.uk) wrote:
> > Perhaps genapic_xen is currently being too smart for its own good? :-)
> 
> Hehe, quite possible ;-)
> 
> > On i386 we lobotomised local apic handling.
> 
> My goal was to avoid (equivalent of) #if 0 where possible, by backfilling
> functionality where possible.  I also had filled out mpc_config_processor
> during mp_register_lapic and tried to maintain the physid map (that bit
> isn't merged).  Do you think there's value in maintaining that level of
> code compatibility?

I suspect we might be best off just diverging completely and having
our own file that implements enough of the local APIC "interface" to
get everything else to build, but is basically a set of no-ops. That's
basically what we have for arch/xen/i386.

Maintaining processor and lapic info is pretty pointless since those
things aren't under domain 0's control, although it may be as easy to
do so as not. 

 -- Keir

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC] Genapic in x86_64 Dom0
  2005-08-22 18:48     ` Keir Fraser
@ 2005-08-22 18:57       ` Chris Wright
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wright @ 2005-08-22 18:57 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Chris Wright, xen-devel, Puthiyaparambil, Aravindh

* Keir Fraser (Keir.Fraser@cl.cam.ac.uk) wrote:
> I suspect we might be best off just diverging completely and having
> our own file that implements enough of the local APIC "interface" to
> get everything else to build, but is basically a set of no-ops. That's
> basically what we have for arch/xen/i386.

OK, that's more or less what I was thinkg (re: no-ops).

> Maintaining processor and lapic info is pretty pointless since those
> things aren't under domain 0's control, although it may be as easy to
> do so as not. 

My intention was more about being able to run more code paths without
having #if CONFIG_XEN if possible to hand to trivial or no-op stub
instead.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-08-22 18:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-19 20:25 [RFC] Genapic in x86_64 Dom0 Puthiyaparambil, Aravindh
2005-08-20  9:45 ` Keir Fraser
2005-08-22 18:20   ` Chris Wright
2005-08-22 18:48     ` Keir Fraser
2005-08-22 18:57       ` Chris Wright
  -- strict thread matches above, loose matches on Subject: below --
2005-08-22 16:14 Puthiyaparambil, Aravindh

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.