All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: patches@linaro.org, Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org,
	Avi Kivity <avi@redhat.com>
Subject: Re: [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()
Date: Tue, 21 Aug 2012 10:19:39 +0200	[thread overview]
Message-ID: <5033449B.40400@siemens.com> (raw)
In-Reply-To: <1345028893-2388-1-git-send-email-peter.maydell@linaro.org>

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

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: patches@linaro.org, Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org,
	Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()
Date: Tue, 21 Aug 2012 10:19:39 +0200	[thread overview]
Message-ID: <5033449B.40400@siemens.com> (raw)
In-Reply-To: <1345028893-2388-1-git-send-email-peter.maydell@linaro.org>

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

  parent reply	other threads:[~2012-08-21  8:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15 11:08 [PATCH v2] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create() Peter Maydell
2012-08-15 11:08 ` [Qemu-devel] " Peter Maydell
2012-08-15 18:34 ` Marcelo Tosatti
2012-08-15 18:34   ` Marcelo Tosatti
2012-08-21  8:19 ` Jan Kiszka [this message]
2012-08-21  8:19   ` [Qemu-devel] " Jan Kiszka
2012-08-21  8:25   ` Peter Maydell
2012-08-21  8:25     ` [Qemu-devel] " Peter Maydell
2012-08-21 10:27     ` Jan Kiszka
2012-08-21 10:27       ` [Qemu-devel] " Jan Kiszka
2012-08-23  9:13       ` Marcelo Tosatti
2012-08-23  9:13         ` [Qemu-devel] " Marcelo Tosatti
2012-08-23 14:13         ` Peter Maydell
2012-08-23 14:13           ` [Qemu-devel] " Peter Maydell

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=5033449B.40400@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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.