From: Jan Kiszka <jan.kiszka@web.de>
To: Marcelo Tosatti <mtosatti@redhat.com>
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: Tue, 15 Mar 2011 21:12:59 +0100 [thread overview]
Message-ID: <4D7FC84B.70906@web.de> (raw)
In-Reply-To: <20110315171011.GA25624@amt.cnet>
[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]
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.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2011-03-15 20:13 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-15 11:26 [Qemu-devel] [PATCH v2 00/20] [uq/master] Patch queue, part V (the rest) Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 01/20] Implement qemu_kvm_eat_signals only for CONFIG_LINUX Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 02/20] x86: Unbreak TCG support for hardware breakpoints Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 03/20] s390: Detect invalid invocations of qemu_ram_free/remap Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 04/20] Break up user and system cpu_interrupt implementations Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 05/20] Redirect cpu_interrupt to callback handler Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 06/20] kvm: Install optimized interrupt handler Jan Kiszka
2011-03-15 17:10 ` [Qemu-devel] " Marcelo Tosatti
2011-03-15 20:12 ` Jan Kiszka [this message]
2011-03-18 10:18 ` Jan Kiszka
2011-03-18 11:29 ` Marcelo Tosatti
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 07/20] kvm: Add in-kernel irqchip awareness to cpu_thread_is_idle Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 08/20] kvm: x86: Do not leave halt if interrupts are disabled Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 09/20] kvm: Mark VCPU state dirty on creation Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 10/20] x86: Properly reset PAT MSR Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 11/20] x86: Save/restore " Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 12/20] kvm: x86: Synchronize PAT MSR with the kernel Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 13/20] kvm: Consider EXIT_DEBUG unknown without CAP_SET_GUEST_DEBUG Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 14/20] kvm: Keep KVM_RUN return value in separate variable Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 15/20] kvm: Reorder error handling of KVM_RUN Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 16/20] kvm: Rework inner loop of kvm_cpu_exec Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 17/20] kvm: Align kvm_arch_handle_exit to kvm_cpu_exec changes Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 18/20] kvm: x86: Reorder functions in kvm.c Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 19/20] kvm: x86: Push kvm_arch_debug to kvm_arch_handle_exit Jan Kiszka
2011-03-15 11:26 ` [Qemu-devel] [PATCH v2 20/20] Expose thread_id in info cpus Jan Kiszka
2011-03-15 18:35 ` [Qemu-devel] Re: [PATCH v2 00/20] [uq/master] Patch queue, part V (the rest) 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=4D7FC84B.70906@web.de \
--to=jan.kiszka@web.de \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--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 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).