All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Gleb Natapov <gleb@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	qemu-devel@nongnu.org, Overall <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] [PATCH qom-cpu for-1.4?] kvm: Pass CPUState to kvm_on_sigbus_vcpu()
Date: Mon, 28 Jan 2013 16:29:35 +0100	[thread overview]
Message-ID: <5106995F.4010702@suse.de> (raw)
In-Reply-To: <20130128135048.GD22871@redhat.com>

Am 28.01.2013 14:50, schrieb Gleb Natapov:
> On Fri, Jan 25, 2013 at 04:55:29PM +0100, Andreas Färber wrote:
>> Since commit 20d695a9254c1b086a456d3b79a3c311236643ba (kvm: Pass
>> CPUState to kvm_arch_*) CPUArchState is no longer needed.
>>
>> Allows to change qemu_kvm_eat_signals() argument as well.
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
> Reviewed-by: Gleb Natapov <gleb@redhat.com>

Thanks, applied to qom-cpu:
https://github.com/afaerber/qemu-cpu/commits/qom-cpu

Background was:
https://lists.nongnu.org/archive/html/qemu-devel/2013-01/msg03087.html

<<<
[...] qemu_init_vcpu() still operates on CPUArchState and thus cannot be
moved into CPUClass yet. The reason is that
cpus.c:qemu_kvm_cpu_thread_fn sets cpu_single_env, and I do not see a
solution for that - suggestions or patches welcome.

However, I see that kvm-all.c:kvm_on_sigbus_vcpu() can be switched to
CPUState now, so that cpus.c:qemu_kvm_eat_signals() can be changed to
CPUState, used from cpus.c:qemu_kvm_wait_io_event().
But cpus.c:cpu_thread_is_idle() still uses env->halted, which is blocked
by the search for an acceptable solution to flush the TLB at CPUState
level (exec.c:cpu_common_post_load()).
>>>

A less elegant but working solution is on my qom-cpu-8 branch (based off
qom-cpu-next): I introduced a void *env_ptr CPUState field. While
potentially opening a can of worms I wanted to avoid, it allows us to
defer finding a solution to the target_ulong-dependent TLB some more.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

      reply	other threads:[~2013-01-28 15:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25 15:55 [PATCH qom-cpu for-1.4?] kvm: Pass CPUState to kvm_on_sigbus_vcpu() Andreas Färber
2013-01-28 13:50 ` Gleb Natapov
2013-01-28 15:29   ` Andreas Färber [this message]

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=5106995F.4010702@suse.de \
    --to=afaerber@suse.de \
    --cc=gleb@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 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.