* [Qemu-devel] [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()
@ 2012-08-15 11:08 Peter Maydell
2012-08-15 18:34 ` Marcelo Tosatti
2012-08-21 8:19 ` Jan Kiszka
0 siblings, 2 replies; 7+ messages in thread
From: Peter Maydell @ 2012-08-15 11:08 UTC (permalink / raw)
To: qemu-devel; +Cc: Marcelo Tosatti, Jan Kiszka, Avi Kivity, kvm, patches
Move the init of the irqchip_inject_ioctl field of KVMState out of
kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq()
can be used even when no irqchip is created (for architectures
that support async interrupt notification even without an in
kernel irqchip).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Changes v1->v2: move whe whole chunk of init code, for both
KVM_IRQ_LINE and KVM_IRQ_LINE_STATUS possibilities.
kvm-all.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 34b02c1..72d84a2 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1200,10 +1200,6 @@ static int kvm_irqchip_create(KVMState *s)
return ret;
}
- s->irqchip_inject_ioctl = KVM_IRQ_LINE;
- if (kvm_check_extension(s, KVM_CAP_IRQ_INJECT_STATUS)) {
- s->irqchip_inject_ioctl = KVM_IRQ_LINE_STATUS;
- }
kvm_kernel_irqchip = true;
/* If we have an in-kernel IRQ chip then we must have asynchronous
* interrupt delivery (though the reverse is not necessarily true)
@@ -1350,6 +1346,11 @@ int kvm_init(void)
s->direct_msi = (kvm_check_extension(s, KVM_CAP_SIGNAL_MSI) > 0);
#endif
+ s->irqchip_inject_ioctl = KVM_IRQ_LINE;
+ if (kvm_check_extension(s, KVM_CAP_IRQ_INJECT_STATUS)) {
+ s->irqchip_inject_ioctl = KVM_IRQ_LINE_STATUS;
+ }
+
ret = kvm_arch_init(s);
if (ret < 0) {
goto err;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()
2012-08-15 11:08 [Qemu-devel] [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create() Peter Maydell
@ 2012-08-15 18:34 ` Marcelo Tosatti
2012-08-21 8:19 ` Jan Kiszka
1 sibling, 0 replies; 7+ messages in thread
From: Marcelo Tosatti @ 2012-08-15 18:34 UTC (permalink / raw)
To: Peter Maydell, b; +Cc: Avi Kivity, Jan Kiszka, qemu-devel, kvm, patches
On Wed, Aug 15, 2012 at 12:08:13PM +0100, Peter Maydell wrote:
> Move the init of the irqchip_inject_ioctl field of KVMState out of
> kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq()
> can be used even when no irqchip is created (for architectures
> that support async interrupt notification even without an in
> kernel irqchip).
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Changes v1->v2: move whe whole chunk of init code, for both
> KVM_IRQ_LINE and KVM_IRQ_LINE_STATUS possibilities.
>
> kvm-all.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()
2012-08-15 11:08 [Qemu-devel] [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create() Peter Maydell
2012-08-15 18:34 ` Marcelo Tosatti
@ 2012-08-21 8:19 ` Jan Kiszka
2012-08-21 8:25 ` Peter Maydell
1 sibling, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2012-08-21 8:19 UTC (permalink / raw)
To: Peter Maydell; +Cc: patches, Marcelo Tosatti, qemu-devel, kvm, Avi Kivity
On 2012-08-15 13:08, Peter Maydell wrote:
> Move the init of the irqchip_inject_ioctl field of KVMState out of
> kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq()
> can be used even when no irqchip is created (for architectures
> that support async interrupt notification even without an in
> kernel irqchip).
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Changes v1->v2: move whe whole chunk of init code, for both
> KVM_IRQ_LINE and KVM_IRQ_LINE_STATUS possibilities.
>
> kvm-all.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/kvm-all.c b/kvm-all.c
> index 34b02c1..72d84a2 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1200,10 +1200,6 @@ static int kvm_irqchip_create(KVMState *s)
> return ret;
> }
>
> - s->irqchip_inject_ioctl = KVM_IRQ_LINE;
> - if (kvm_check_extension(s, KVM_CAP_IRQ_INJECT_STATUS)) {
> - s->irqchip_inject_ioctl = KVM_IRQ_LINE_STATUS;
> - }
> kvm_kernel_irqchip = true;
> /* If we have an in-kernel IRQ chip then we must have asynchronous
> * interrupt delivery (though the reverse is not necessarily true)
> @@ -1350,6 +1346,11 @@ int kvm_init(void)
> s->direct_msi = (kvm_check_extension(s, KVM_CAP_SIGNAL_MSI) > 0);
> #endif
>
> + s->irqchip_inject_ioctl = KVM_IRQ_LINE;
> + if (kvm_check_extension(s, KVM_CAP_IRQ_INJECT_STATUS)) {
> + s->irqchip_inject_ioctl = KVM_IRQ_LINE_STATUS;
> + }
> +
> ret = kvm_arch_init(s);
> if (ret < 0) {
> goto err;
>
As it's not yet merged, some late comment: irqchip_inject_ioctl should
be renamed as well. irq_inject_ioctl?
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()
2012-08-21 8:19 ` Jan Kiszka
@ 2012-08-21 8:25 ` Peter Maydell
2012-08-21 10:27 ` Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2012-08-21 8:25 UTC (permalink / raw)
To: Jan Kiszka; +Cc: patches, Marcelo Tosatti, qemu-devel, kvm, Avi Kivity
On 21 August 2012 09:19, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 2012-08-15 13:08, Peter Maydell wrote:
>> Move the init of the irqchip_inject_ioctl field of KVMState out of
>> kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq()
>> can be used even when no irqchip is created (for architectures
>> that support async interrupt notification even without an in
>> kernel irqchip).
> As it's not yet merged, some late comment: irqchip_inject_ioctl should
> be renamed as well. irq_inject_ioctl?
If we're changing it anyway, IIRC Avi didn't like the term "inject"
here?
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()
2012-08-21 8:25 ` Peter Maydell
@ 2012-08-21 10:27 ` Jan Kiszka
2012-08-23 9:13 ` Marcelo Tosatti
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2012-08-21 10:27 UTC (permalink / raw)
To: Peter Maydell
Cc: patches@linaro.org, Marcelo Tosatti, qemu-devel@nongnu.org,
kvm@vger.kernel.org, Avi Kivity
On 2012-08-21 10:25, Peter Maydell wrote:
> On 21 August 2012 09:19, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> On 2012-08-15 13:08, Peter Maydell wrote:
>>> Move the init of the irqchip_inject_ioctl field of KVMState out of
>>> kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq()
>>> can be used even when no irqchip is created (for architectures
>>> that support async interrupt notification even without an in
>>> kernel irqchip).
>
>> As it's not yet merged, some late comment: irqchip_inject_ioctl should
>> be renamed as well. irq_inject_ioctl?
>
> If we're changing it anyway, IIRC Avi didn't like the term "inject"
> here?
Then irq_set_ioctl.
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()
2012-08-21 10:27 ` Jan Kiszka
@ 2012-08-23 9:13 ` Marcelo Tosatti
2012-08-23 14:13 ` Peter Maydell
0 siblings, 1 reply; 7+ messages in thread
From: Marcelo Tosatti @ 2012-08-23 9:13 UTC (permalink / raw)
To: Jan Kiszka
Cc: Peter Maydell, patches@linaro.org, qemu-devel@nongnu.org,
kvm@vger.kernel.org, Avi Kivity
On Tue, Aug 21, 2012 at 12:27:51PM +0200, Jan Kiszka wrote:
> On 2012-08-21 10:25, Peter Maydell wrote:
> > On 21 August 2012 09:19, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> >> On 2012-08-15 13:08, Peter Maydell wrote:
> >>> Move the init of the irqchip_inject_ioctl field of KVMState out of
> >>> kvm_irqchip_create() and into kvm_init(), so that kvm_set_irq()
> >>> can be used even when no irqchip is created (for architectures
> >>> that support async interrupt notification even without an in
> >>> kernel irqchip).
> >
> >> As it's not yet merged, some late comment: irqchip_inject_ioctl should
> >> be renamed as well. irq_inject_ioctl?
> >
> > If we're changing it anyway, IIRC Avi didn't like the term "inject"
> > here?
>
> Then irq_set_ioctl.
>
> Jan
It is merged, please send a follow patch.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()
2012-08-23 9:13 ` Marcelo Tosatti
@ 2012-08-23 14:13 ` Peter Maydell
0 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2012-08-23 14:13 UTC (permalink / raw)
To: Marcelo Tosatti
Cc: Jan Kiszka, patches@linaro.org, qemu-devel@nongnu.org,
kvm@vger.kernel.org, Avi Kivity
On 23 August 2012 10:13, Marcelo Tosatti <mtosatti@redhat.com> wrote:
> On Tue, Aug 21, 2012 at 12:27:51PM +0200, Jan Kiszka wrote:
>> On 2012-08-21 10:25, Peter Maydell wrote:
>> > On 21 August 2012 09:19, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> >> As it's not yet merged, some late comment: irqchip_inject_ioctl should
>> >> be renamed as well. irq_inject_ioctl?
>> >
>> > If we're changing it anyway, IIRC Avi didn't like the term "inject"
>> > here?
>>
>> Then irq_set_ioctl.
>>
>> Jan
>
> It is merged, please send a follow patch.
Sure, no problem (I was hovering on the edge of suggesting that
the field rename should be a separate patch anyhow.)
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-08-23 14:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-15 11:08 [Qemu-devel] [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create() Peter Maydell
2012-08-15 18:34 ` Marcelo Tosatti
2012-08-21 8:19 ` Jan Kiszka
2012-08-21 8:25 ` Peter Maydell
2012-08-21 10:27 ` Jan Kiszka
2012-08-23 9:13 ` Marcelo Tosatti
2012-08-23 14:13 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).