[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d6222a80708151357y548fcb3fu54f6d20e6f27d775@mail.gmail.com>
Date: Wed, 15 Aug 2007 17:57:11 -0300
From: "Glauber de Oliveira Costa" <glommer@...il.com>
To: "Chris Wright" <chrisw@...s-sol.org>
Cc: "Glauber de Oliveira Costa" <gcosta@...hat.com>,
"Andi Kleen" <ak@...e.de>, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, rusty@...tcorp.com.au, mingo@...e.hu,
jeremy@...p.org, avi@...ranet.com, anthony@...emonkey.ws,
virtualization@...ts.linux-foundation.org, lguest@...abs.org,
"Steven Rostedt" <rostedt@...dmis.org>, kiran@...lemp.com,
shai@...lemp.com
Subject: Re: [PATCH 3/25][V3] irq_flags / halt routines
On 8/15/07, Chris Wright <chrisw@...s-sol.org> wrote:
> * Glauber de Oliveira Costa (gcosta@...hat.com) wrote:
> > Only caveat, is that it has to be done before smp gets in the game, and
> > with interrupts disabled. (which makes the function in vsmp.c not eligible).
> >
> > My current option is to force VSMP to use PARAVIRT, as said before, and
> > then fill paravirt_arch_setup, which is currently unused, with code to
> > replace the needed paravirt_ops.fn.
> >
> > I don't know if there is any method to dynamically determine (at this
> > point) that we are in a vsmp arch, and if there are not, it will have to
> > get ifdefs anyway. But at least, they are far more local.
>
> between __cacheline_aligned_in_smp and other compile time bits based on
> VSMP specific INTERNODE_CACHE, etc. I think compile time the way to go.
>
> > I am okay with both, but after all the explanation, I don't think that
> > adding a new pvops is a bad idea. It would make things less cumbersome
> > in this case. Also, hacks like this save_fl may require changes to the
> > hypervisor, right? I don't even know where such hypervisor is, and how
> > easy it is to replace it (it may be deeply hidden in firmware)
>
> No hypervisor change needed. Just the pv backend needs to return 0 or
> X86_EFLAGS_IF for save_flags (and similar translation on restore_flags).
> Xen uses a simple shared memory flag and does something which you could
> roughly translate into this:
>
> xen_save_flags()
> if (xen_vcpu_interrupts_enabled)
> return X86_EFLAGS_IF;
> else
> return 0;
>
> This doesn't require any hypervisor changes. Similarly, VSMP could do
> something along the lines of:
>
> vsmp_save_flags()
> flags = native_save_flags();
> if (flags & X86_EFLAGS_IF) || (flags & X86_EFLAGS_AC)
> return X86_EFLAGS_IF;
> else
> return 0;
>
I'm attaching to this message my idea on how would it work.
This is just for comments/considerations. If you all ack this, I'll
spread the changes over the patch series as needed, and then resend
the patches.
--
Glauber de Oliveira Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
View attachment "exp.patch" of type "text/x-patch" (7009 bytes)
Powered by blists - more mailing lists