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

Re: [Xen-devel] [PATCH] arm/monitor vm-events: Implement guest-request support


  • To: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
  • From: Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx>
  • Date: Fri, 19 Feb 2016 20:33:49 +0200
  • Cc: Keir Fraser <keir@xxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Fri, 19 Feb 2016 18:34:05 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=Wi0rHDpANKV10cKAUHC7ClCeZFvLK/KrEBKjRbzApTLuTEUu2oaD/Uemt67EKAbrUmKzR+fwxBv1zDZnGZ1On0bVjvfUJbNLmx+5CrINJxHj1FoGTail35TGx4SnrQgl+WqWUX7QpX+v3XamLmIXA4N7nJFVpzW9yTRNlqz4PWDzhHUrENmAEHH80cn5QBOYAZkvVZur8MPtIezY952r5Fx9JXuZgDLdYCyLWrDzWhxlNs+xe7ulkYaLFM6HfcgPSf+w20trMV8/spcPCEI1ZVq5S6I6vPUBRE4KucW3/WbY2mCQ9VrKguweU4CvZ+Da37uBujRs2z4WlF/6hXOyXQ==; h=Received:Received:Received:Received:Received:Subject:To:References:Cc:From:Message-ID:Date:User-Agent:MIME-Version:In-Reply-To:Content-Type:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 2/19/2016 8:27 PM, Tamas K Lengyel wrote:


On Fri, Feb 19, 2016 at 11:11 AM, Corneliu ZUZU <czuzu@xxxxxxxxxxxxxxx> wrote:
On 2/19/2016 7:54 PM, Tamas K Lengyel wrote:


On Fri, Feb 19, 2016 at 10:47 AM, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> wrote:
On Fri, 19 Feb 2016, Corneliu ZUZU wrote:
> On 2/19/2016 6:05 PM, Andrew Cooper wrote:
> > On 19/02/16 16:00, Stefano Stabellini wrote:
> > > On Fri, 19 Feb 2016, Corneliu ZUZU wrote:
> > > > On 2/19/2016 3:49 PM, Stefano Stabellini wrote:
> > > > > On Thu, 18 Feb 2016, Corneliu ZUZU wrote:
> > > > > > +
> > > > > > +Â Â if ( sync )
> > > > > > +Â Â {
> > > > > > +Â Â Â Â req->flags |= VM_EVENT_FLAG_VCPU_PAUSED;
> > > > > > +Â Â Â Â vm_event_vcpu_pause(v);
> > > > > > +Â Â }
> > > > > > +
> > > > > > +#if CONFIG_X86
> > > > > > +Â Â if ( altp2m_active(d) )
> > > > > I would rather
> > > > >
> > > > > #define altp2m_active(d) (0)
> > > > >
> > > > > on ARM, removing the two ifdefs in this file.
> > > > Yeah, I actually wanted to get rid of that too at some point, the
> > > > question is,
> > > > what do I do with "req->altp2m_idx = vcpu_altp2m(v).p2midx"? I'm not
> > > > familiar
> > > > w/ altp2m design, maybe someone that knows more of the internals of that
> > > > can
> > > > give a suggestion.
> > > If you #define altp2m_active to (0), gcc will automatically avoid the if
> > > statement.
> > You will still get the compile error from ARM's struct vcpu not having
> > altp2m information.
> >
> > ~Andrew
> >
>
> Yep.

Yes, you are right, especially given that Xen is compiled -Wall -Werror.

How do you plan to introduce altp2m support on ARM? Is there going to be
a struct altp2mvcpu on ARM too? It is not nice to access stuff under
v->arch from common code. Maybe we need another arch_blah function to
set altp2m_idx.

As altp2m could be implemented for ARM as well it might make sense to start introducing bits and pieces that would make it easier to do that work in the future. But I agree, accessing v->arch directly from common is not a good way to go about it.

Tamas

I am not at all familiar w/ altp2m at the moment, but I'll try to look into it.
Since that doesn't relate so much with the code motion of this changeset and it might not be that straightforward to implement, would it be ok to leave the #ifdef CONFIG_X86 there for now and remove it in a separate patch?

We are trying to avoid having to do ifdefs where-ever possible. So in this case too introducing arch-specific function(s) that are empty for ARM would be more appropriate.

Tamas


I understand that, I was merely asking if it would be okay to do it in another patch, because it didn't seem that straightforward.
More concretely, are you suggesting to:
* do the "#define altp2m_active(d) (0)" as Stefano suggested
* incorporate "vcpu_altp2m(v).p2midx" into an arch_foo function
?

That seems easy enough to do. If so, how should I call this arch_foo function and where would it be appropriate to put it?

Thanks,
Corneliu.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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