All of lore.kernel.org
 help / color / mirror / Atom feed
From: julien.grall@citrix.com (Julien Grall)
To: linux-arm-kernel@lists.infradead.org
Subject: [Xen-devel] [PATCH v2] xen/events: Support event channel rebind on ARM
Date: Mon, 27 Jul 2015 13:43:46 +0100	[thread overview]
Message-ID: <55B62782.9050701@citrix.com> (raw)
In-Reply-To: <55B62588.3050502@citrix.com>

On 27/07/15 13:35, David Vrabel wrote:
> On 27/07/15 12:35, Julien Grall wrote:
>> Currently, the event channel rebind code is gated with the presence of
>> the vector callback.
>>
>> The virtual interrupt controller on ARM has the concept of per-CPU
>> interrupt (PPI) which allow us to support per-VCPU event channel.
>> Therefore there is no need of vector callback for ARM.
>>
>> Xen is already using a free PPI to notify the guest VCPU of an event.
>> Furthermore, the xen code initialization in Linux (see
>> arch/arm/xen/enlighten.c) is requesting correctly a per-CPU IRQ.
>>
>> Introduce new helper xen_support_evtchn_rebind to allow architecture
>> decide whether rebind an event is support or not. It will always return
>> 1 on ARM and keep the same behavior on x86.
>>
>> This is also allow us to drop the usage of xen_have_vector_callback
>> entirely in the ARM code.
> 
> This did not apply cleanly.  Please always base patches on Linus's
> master branch.

My patch is based on Linus's master branch. Although, it has a
pre-requisite of [1] which I sent a few seconds before it. Though it's
only for applying because the 2 patches are not related.

I should have mentioned it in the mail, sorry.

> This also breaks the x86 build.

I forgot to test this new version when I turned the macro into a static
inline.

> /local/davidvr/work/k.org/tip/arch/x86/include/asm/xen/events.h: In
> function ?xen_support_evtchn_rebind?:
> /local/davidvr/work/k.org/tip/arch/x86/include/asm/xen/events.h:29:85:
> error: ?xen_have_vector_callback? undeclared (first use in this function)
>   return (!xen_hvm_domain() || xen_have_vector_callback);
> 
>> --- a/arch/arm/include/asm/xen/events.h
>> +++ b/arch/arm/include/asm/xen/events.h
>> @@ -20,4 +20,10 @@ static inline int xen_irqs_disabled(struct pt_regs *regs)
>>  							    atomic64_t,	\
>>  							    counter), (val))
>>  
>> +/* Rebind event channel is supported by default */
>> +static inline bool xen_support_evtchn_rebind(void)
>> +{
>> +	return 1;
> 
> This should be true (similarly for arm64).

Will resend a new version, and remove the dependency on [1].

Regards,

[1] http://permalink.gmane.org/gmane.linux.kernel/2004690

-- 
Julien Grall

WARNING: multiple messages have this Message-ID (diff)
From: Julien Grall <julien.grall@citrix.com>
To: David Vrabel <david.vrabel@citrix.com>, <xen-devel@lists.xenproject.org>
Cc: <x86@kernel.org>, <ian.campbell@citrix.com>,
	<stefano.stabellini@eu.citrix.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>, <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [Xen-devel] [PATCH v2] xen/events: Support event channel rebind on ARM
Date: Mon, 27 Jul 2015 13:43:46 +0100	[thread overview]
Message-ID: <55B62782.9050701@citrix.com> (raw)
In-Reply-To: <55B62588.3050502@citrix.com>

On 27/07/15 13:35, David Vrabel wrote:
> On 27/07/15 12:35, Julien Grall wrote:
>> Currently, the event channel rebind code is gated with the presence of
>> the vector callback.
>>
>> The virtual interrupt controller on ARM has the concept of per-CPU
>> interrupt (PPI) which allow us to support per-VCPU event channel.
>> Therefore there is no need of vector callback for ARM.
>>
>> Xen is already using a free PPI to notify the guest VCPU of an event.
>> Furthermore, the xen code initialization in Linux (see
>> arch/arm/xen/enlighten.c) is requesting correctly a per-CPU IRQ.
>>
>> Introduce new helper xen_support_evtchn_rebind to allow architecture
>> decide whether rebind an event is support or not. It will always return
>> 1 on ARM and keep the same behavior on x86.
>>
>> This is also allow us to drop the usage of xen_have_vector_callback
>> entirely in the ARM code.
> 
> This did not apply cleanly.  Please always base patches on Linus's
> master branch.

My patch is based on Linus's master branch. Although, it has a
pre-requisite of [1] which I sent a few seconds before it. Though it's
only for applying because the 2 patches are not related.

I should have mentioned it in the mail, sorry.

> This also breaks the x86 build.

I forgot to test this new version when I turned the macro into a static
inline.

> /local/davidvr/work/k.org/tip/arch/x86/include/asm/xen/events.h: In
> function ‘xen_support_evtchn_rebind’:
> /local/davidvr/work/k.org/tip/arch/x86/include/asm/xen/events.h:29:85:
> error: ‘xen_have_vector_callback’ undeclared (first use in this function)
>   return (!xen_hvm_domain() || xen_have_vector_callback);
> 
>> --- a/arch/arm/include/asm/xen/events.h
>> +++ b/arch/arm/include/asm/xen/events.h
>> @@ -20,4 +20,10 @@ static inline int xen_irqs_disabled(struct pt_regs *regs)
>>  							    atomic64_t,	\
>>  							    counter), (val))
>>  
>> +/* Rebind event channel is supported by default */
>> +static inline bool xen_support_evtchn_rebind(void)
>> +{
>> +	return 1;
> 
> This should be true (similarly for arm64).

Will resend a new version, and remove the dependency on [1].

Regards,

[1] http://permalink.gmane.org/gmane.linux.kernel/2004690

-- 
Julien Grall

  parent reply	other threads:[~2015-07-27 12:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27 11:35 [PATCH v2] xen/events: Support event channel rebind on ARM Julien Grall
2015-07-27 11:35 ` Julien Grall
2015-07-27 12:35 ` David Vrabel
2015-07-27 12:35 ` David Vrabel
2015-07-27 12:35   ` David Vrabel
2015-07-27 12:43   ` Julien Grall
2015-07-27 12:43   ` Julien Grall [this message]
2015-07-27 12:43     ` [Xen-devel] " Julien Grall

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=55B62782.9050701@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.