From: Marcelo Tosatti <mtosatti@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Avi Kivity <avi@redhat.com>, kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 06/20] kvm: Install optimized interrupt handler
Date: Fri, 18 Mar 2011 08:29:11 -0300 [thread overview]
Message-ID: <20110318112911.GA2436@amt.cnet> (raw)
In-Reply-To: <4D833180.5020603@web.de>
On Fri, Mar 18, 2011 at 11:18:40AM +0100, Jan Kiszka wrote:
> On 2011-03-15 21:12, Jan Kiszka wrote:
> > On 2011-03-15 18:10, Marcelo Tosatti wrote:
> >> On Tue, Mar 15, 2011 at 12:26:17PM +0100, Jan Kiszka wrote:
> >>> KVM only requires to set the raised IRQ in CPUState and to kick the
> >>> receiving vcpu if it is remote.
> >>>
> >>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >>> ---
> >>> kvm-all.c | 11 +++++++++++
> >>> 1 files changed, 11 insertions(+), 0 deletions(-)
> >>>
> >>> diff --git a/kvm-all.c b/kvm-all.c
> >>> index 226843c..25ab545 100644
> >>> --- a/kvm-all.c
> >>> +++ b/kvm-all.c
> >>> @@ -650,6 +650,15 @@ static CPUPhysMemoryClient kvm_cpu_phys_memory_client = {
> >>> .log_stop = kvm_log_stop,
> >>> };
> >>>
> >>> +static void kvm_handle_interrupt(CPUState *env, int mask)
> >>> +{
> >>> + env->interrupt_request |= mask;
> >>> +
> >>> + if (!qemu_cpu_is_self(env)) {
> >>> + qemu_cpu_kick(env);
> >>> + }
> >>> +}
> >>> +
> >>
> >> Not sure its worthwhile to allow different handlers. The advantage over
> >> tcg version is that its shorter, without cpu_unlink_tb and icount
> >> handler?
> >
> > I thought about this again as well before posting, and I came to the
> > conclusion that an important advantage is avoiding TCG surprises in KVM
> > code paths. This way, KVM does not need to bother if cpu_unlink_tb or
> > icount related code changes. Maybe I should have added this to the
> > commit message.
>
> What's your opinion on this? Should I repost the remaining three with
> comments adjusted?
>
> Jan
>
Its up to you. Your argument above makes sense.
WARNING: multiple messages have this Message-ID (diff)
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Avi Kivity <avi@redhat.com>, kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH v2 06/20] kvm: Install optimized interrupt handler
Date: Fri, 18 Mar 2011 08:29:11 -0300 [thread overview]
Message-ID: <20110318112911.GA2436@amt.cnet> (raw)
In-Reply-To: <4D833180.5020603@web.de>
On Fri, Mar 18, 2011 at 11:18:40AM +0100, Jan Kiszka wrote:
> On 2011-03-15 21:12, Jan Kiszka wrote:
> > On 2011-03-15 18:10, Marcelo Tosatti wrote:
> >> On Tue, Mar 15, 2011 at 12:26:17PM +0100, Jan Kiszka wrote:
> >>> KVM only requires to set the raised IRQ in CPUState and to kick the
> >>> receiving vcpu if it is remote.
> >>>
> >>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> >>> ---
> >>> kvm-all.c | 11 +++++++++++
> >>> 1 files changed, 11 insertions(+), 0 deletions(-)
> >>>
> >>> diff --git a/kvm-all.c b/kvm-all.c
> >>> index 226843c..25ab545 100644
> >>> --- a/kvm-all.c
> >>> +++ b/kvm-all.c
> >>> @@ -650,6 +650,15 @@ static CPUPhysMemoryClient kvm_cpu_phys_memory_client = {
> >>> .log_stop = kvm_log_stop,
> >>> };
> >>>
> >>> +static void kvm_handle_interrupt(CPUState *env, int mask)
> >>> +{
> >>> + env->interrupt_request |= mask;
> >>> +
> >>> + if (!qemu_cpu_is_self(env)) {
> >>> + qemu_cpu_kick(env);
> >>> + }
> >>> +}
> >>> +
> >>
> >> Not sure its worthwhile to allow different handlers. The advantage over
> >> tcg version is that its shorter, without cpu_unlink_tb and icount
> >> handler?
> >
> > I thought about this again as well before posting, and I came to the
> > conclusion that an important advantage is avoiding TCG surprises in KVM
> > code paths. This way, KVM does not need to bother if cpu_unlink_tb or
> > icount related code changes. Maybe I should have added this to the
> > commit message.
>
> What's your opinion on this? Should I repost the remaining three with
> comments adjusted?
>
> Jan
>
Its up to you. Your argument above makes sense.
next prev parent reply other threads:[~2011-03-18 11:39 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-15 11:26 [PATCH v2 00/20] [uq/master] Patch queue, part V (the rest) Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 01/20] Implement qemu_kvm_eat_signals only for CONFIG_LINUX Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 02/20] x86: Unbreak TCG support for hardware breakpoints Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 03/20] s390: Detect invalid invocations of qemu_ram_free/remap Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 04/20] Break up user and system cpu_interrupt implementations Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 05/20] Redirect cpu_interrupt to callback handler Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 06/20] kvm: Install optimized interrupt handler Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 17:10 ` Marcelo Tosatti
2011-03-15 17:10 ` [Qemu-devel] " Marcelo Tosatti
2011-03-15 20:12 ` Jan Kiszka
2011-03-15 20:12 ` [Qemu-devel] " Jan Kiszka
2011-03-18 10:18 ` Jan Kiszka
2011-03-18 10:18 ` [Qemu-devel] " Jan Kiszka
2011-03-18 11:29 ` Marcelo Tosatti [this message]
2011-03-18 11:29 ` Marcelo Tosatti
2011-03-15 11:26 ` [PATCH v2 07/20] kvm: Add in-kernel irqchip awareness to cpu_thread_is_idle Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 08/20] kvm: x86: Do not leave halt if interrupts are disabled Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 09/20] kvm: Mark VCPU state dirty on creation Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 10/20] x86: Properly reset PAT MSR Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 11/20] x86: Save/restore " Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 12/20] kvm: x86: Synchronize PAT MSR with the kernel Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 13/20] kvm: Consider EXIT_DEBUG unknown without CAP_SET_GUEST_DEBUG Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 14/20] kvm: Keep KVM_RUN return value in separate variable Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 15/20] kvm: Reorder error handling of KVM_RUN Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 16/20] kvm: Rework inner loop of kvm_cpu_exec Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 17/20] kvm: Align kvm_arch_handle_exit to kvm_cpu_exec changes Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 18/20] kvm: x86: Reorder functions in kvm.c Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 19/20] kvm: x86: Push kvm_arch_debug to kvm_arch_handle_exit Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 11:26 ` [PATCH v2 20/20] Expose thread_id in info cpus Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] " Jan Kiszka
2011-03-15 18:35 ` [PATCH v2 00/20] [uq/master] Patch queue, part V (the rest) Marcelo Tosatti
2011-03-15 18:35 ` [Qemu-devel] " Marcelo Tosatti
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=20110318112911.GA2436@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.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.