qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
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 07/15] kvm: Separate TCG from KVM cpu execution
Date: Wed, 09 Feb 2011 15:53:49 +0100	[thread overview]
Message-ID: <4D52AA7D.3070507@siemens.com> (raw)
In-Reply-To: <20110209144429.GC32689@amt.cnet>

On 2011-02-09 15:44, Marcelo Tosatti wrote:
> On Wed, Feb 09, 2011 at 08:59:23AM +0100, Jan Kiszka wrote:
>> On 2011-02-09 00:39, Marcelo Tosatti wrote:
>>> On Mon, Feb 07, 2011 at 12:19:18PM +0100, Jan Kiszka wrote:
>>>> Mixing up TCG bits with KVM already led to problems around eflags
>>>> emulation on x86. Moreover, quite some code that TCG requires on cpu
>>>> enty/exit is useless for KVM. So dispatch between tcg_cpu_exec and
>>>> kvm_cpu_exec as early as possible.
>>>>
>>>> The core logic of cpu_halted from cpu_exec is added to
>>>> kvm_arch_process_irqchip_events. Moving away from cpu_exec makes
>>>> exception_index meaningless for KVM, we can simply pass the exit reason
>>>> directly (only "EXCP_DEBUG vs. rest" is relevant).
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>> ---
>>>>  cpu-exec.c        |   19 ++++++-------------
>>>>  cpus.c            |   10 +++++-----
>>>>  kvm-all.c         |   19 +++++++++----------
>>>>  target-i386/kvm.c |    6 +++---
>>>>  4 files changed, 23 insertions(+), 31 deletions(-)
>>>>
>>>> diff --git a/target-i386/kvm.c b/target-i386/kvm.c
>>>> index ba183c4..377a0a3 100644
>>>> --- a/target-i386/kvm.c
>>>> +++ b/target-i386/kvm.c
>>>> @@ -1502,12 +1502,13 @@ int kvm_arch_post_run(CPUState *env, struct kvm_run *run)
>>>>  
>>>>  int kvm_arch_process_irqchip_events(CPUState *env)
>>>>  {
>>>> +    if (env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI)) {
>>>> +        env->halted = 0;
>>>> +    }
>>>
>>> Why is it necessary to clear env->halted here?
>>
>> Because we no longer come along cpu_halted() in cpu_exec(). This
>> corresponds to the tail of process_irqchip_events() in qemu-kvm
> 
> This is not yet well integrated, we probably don't need env->halted
> anymore (see cpu_has_work). Can be improved later though.

So far we check for it, at least in cpu_[thread_]is_idle. And that's a
generic service.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

  reply	other threads:[~2011-02-09 14:53 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-07 11:19 [Qemu-devel] [PATCH 00/15] [uq/master] Patch queue, part III Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 01/15] Refactor kvm&tcg function names in cpus.c Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 02/15] Refactor cpu_has_work/any_cpu_has_work " Jan Kiszka
2011-02-08 18:50   ` [Qemu-devel] " Marcelo Tosatti
2011-02-09  8:07     ` Jan Kiszka
2011-02-09 13:54       ` Marcelo Tosatti
2011-02-09 15:29   ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 03/15] Fix a few coding style violations " Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 04/15] Improve vm_stop reason declarations Jan Kiszka
2011-02-08 18:59   ` [Qemu-devel] " Marcelo Tosatti
2011-02-09  8:07     ` Jan Kiszka
2011-02-09 14:17       ` Marcelo Tosatti
2011-02-09 14:51         ` Jan Kiszka
2011-02-09 15:29   ` [Qemu-devel] [PATCH v2 " Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 05/15] Refactor debug and vmstop request interface Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 06/15] Move debug exception handling out of cpu_exec Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 07/15] kvm: Separate TCG from KVM cpu execution Jan Kiszka
2011-02-08 23:39   ` [Qemu-devel] " Marcelo Tosatti
2011-02-09  7:59     ` Jan Kiszka
2011-02-09 14:44       ` Marcelo Tosatti
2011-02-09 14:53         ` Jan Kiszka [this message]
2011-02-07 11:19 ` [Qemu-devel] [PATCH 08/15] kvm: x86: Prepare VCPU loop for in-kernel irqchip Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 09/15] kvm: Drop return values from kvm_arch_pre/post_run Jan Kiszka
2011-02-07 12:54   ` [Qemu-devel] " Alexander Graf
2011-02-17 21:01   ` [Qemu-devel] [PATCH] kvm: ppc: Fix breakage of kvm_arch_pre_run/process_irqchip_events Jan Kiszka
2011-03-11  5:55     ` [Qemu-devel] " Alexander Graf
2011-03-11  6:26       ` Stefan Hajnoczi
2011-03-11  7:02         ` Alexander Graf
2011-02-07 11:19 ` [Qemu-devel] [PATCH 10/15] kvm: x86: Catch and report failing IRQ and NMI injections Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 11/15] kvm: Remove unneeded memory slot reservation Jan Kiszka
2011-02-07 15:26   ` [Qemu-devel] " Alex Williamson
2011-02-07 11:19 ` [Qemu-devel] [PATCH 12/15] Introduce log_start/log_stop in CPUPhysMemoryClient Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 13/15] cirrus: Remove obsolete kvm.h include Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 14/15] kvm: Make kvm_state globally available Jan Kiszka
2011-02-07 11:19 ` [Qemu-devel] [PATCH 15/15] kvm: x86: Introduce kvmclock device to save/restore its state Jan Kiszka
2011-02-07 12:27   ` [Qemu-devel] " Glauber Costa
2011-02-07 12:36     ` Jan Kiszka
2011-02-07 13:40       ` Glauber Costa
2011-02-07 14:03         ` Jan Kiszka
2011-02-07 18:04           ` Glauber Costa
2011-02-07 18:12             ` Jan Kiszka
2011-02-07 18:26               ` Glauber Costa
2011-02-07 12:44     ` Avi Kivity
2011-02-07 19:39   ` [Qemu-devel] " Blue Swirl
2011-02-07 21:48     ` Jan Kiszka

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=4D52AA7D.3070507@siemens.com \
    --to=jan.kiszka@siemens.com \
    --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).