From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org,
Gleb Natapov <gleb@redhat.com>
Subject: Re: [PATCH 2/9] qemu-kvm: Clean up register access API
Date: Sun, 21 Feb 2010 11:25:01 +0200 [thread overview]
Message-ID: <4B80FBED.9010903@redhat.com> (raw)
In-Reply-To: <97ef7408c86f7984db721c38cd736b98b81efad9.1266603744.git.jan.kiszka@siemens.com>
On 02/19/2010 08:22 PM, Jan Kiszka wrote:
> qemu-kvm's functions for accessing the VCPU registers are
> kvm_arch_load/save_regs. Use them directly instead of going through
> various wrappers. Specifically, we do not need on_vcpu wrapping as all
> users either already run in the related thread or call while the vm is
> stopped. This is now also validated during runtime via asserts.
>
>
> + assert(kvm_cpu_is_stopped(env) || env->thread_id == kvm_get_thread_id());
>
The kvm_cpu_is_stopped() part is wrong, for two reasons. First, a
future ABI revolution might switch to syscalls and thus make the
association between vcpu and thread implicit. This will allow us to
drop vcpu->mutex, eventually. Second, kvm_cpu_is_stopped() will be racy
in a threaded future version of qemu. All vcpu ioctls should be made
from the vcpu thread.
Documentation/kvm/api.txt has this to say about the matter:
> - vcpu ioctls: These query and set attributes that control the operation
> of a single virtual cpu.
>
> Only run vcpu ioctls from the same thread that was used to create the
> vcpu.
So it isn't just me.
--
error compiling committee.c: too many arguments to function
WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org,
Gleb Natapov <gleb@redhat.com>
Subject: [Qemu-devel] Re: [PATCH 2/9] qemu-kvm: Clean up register access API
Date: Sun, 21 Feb 2010 11:25:01 +0200 [thread overview]
Message-ID: <4B80FBED.9010903@redhat.com> (raw)
In-Reply-To: <97ef7408c86f7984db721c38cd736b98b81efad9.1266603744.git.jan.kiszka@siemens.com>
On 02/19/2010 08:22 PM, Jan Kiszka wrote:
> qemu-kvm's functions for accessing the VCPU registers are
> kvm_arch_load/save_regs. Use them directly instead of going through
> various wrappers. Specifically, we do not need on_vcpu wrapping as all
> users either already run in the related thread or call while the vm is
> stopped. This is now also validated during runtime via asserts.
>
>
> + assert(kvm_cpu_is_stopped(env) || env->thread_id == kvm_get_thread_id());
>
The kvm_cpu_is_stopped() part is wrong, for two reasons. First, a
future ABI revolution might switch to syscalls and thus make the
association between vcpu and thread implicit. This will allow us to
drop vcpu->mutex, eventually. Second, kvm_cpu_is_stopped() will be racy
in a threaded future version of qemu. All vcpu ioctls should be made
from the vcpu thread.
Documentation/kvm/api.txt has this to say about the matter:
> - vcpu ioctls: These query and set attributes that control the operation
> of a single virtual cpu.
>
> Only run vcpu ioctls from the same thread that was used to create the
> vcpu.
So it isn't just me.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-02-21 9:25 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-19 18:22 [PATCH 0/9] qemu-kvm: Extended use of upstream code Jan Kiszka
2010-02-19 18:22 ` [Qemu-devel] " Jan Kiszka
2010-02-19 18:22 ` [PATCH 1/9] qemu-kvm: Drop vmport changes Jan Kiszka
2010-02-19 18:22 ` [Qemu-devel] " Jan Kiszka
2010-02-19 18:22 ` [PATCH 2/9] qemu-kvm: Clean up register access API Jan Kiszka
2010-02-19 18:22 ` [Qemu-devel] " Jan Kiszka
2010-02-21 9:25 ` Avi Kivity [this message]
2010-02-21 9:25 ` [Qemu-devel] " Avi Kivity
2010-02-19 18:22 ` [PATCH 3/9] qemu-kvm: Use upstream kvm_enabled and cpu_synchronize_state Jan Kiszka
2010-02-19 18:22 ` [Qemu-devel] " Jan Kiszka
2010-02-19 18:22 ` [PATCH 4/9] qemu-kvm: Use upstream kvm_setup_guest_memory Jan Kiszka
2010-02-19 18:22 ` [Qemu-devel] " Jan Kiszka
2010-02-19 18:22 ` [PATCH 5/9] qemu-kvm: Use some more upstream prototypes Jan Kiszka
2010-02-19 18:22 ` [Qemu-devel] " Jan Kiszka
2010-02-19 18:22 ` [PATCH 6/9] qemu-kvm: Use upstream kvm_arch_get_supported_cpuid Jan Kiszka
2010-02-19 18:22 ` [Qemu-devel] " Jan Kiszka
2010-02-19 18:22 ` [PATCH 7/9] qemu-kvm: Use upstream kvm_pit_in_kernel Jan Kiszka
2010-02-19 18:22 ` [Qemu-devel] " Jan Kiszka
2010-02-19 18:22 ` [PATCH 8/9] KVM: Rework of guest debug state writing Jan Kiszka
2010-02-19 18:22 ` [Qemu-devel] " Jan Kiszka
2010-02-21 9:26 ` Avi Kivity
2010-02-21 9:26 ` [Qemu-devel] " Avi Kivity
2010-02-19 18:22 ` [PATCH 9/9] qemu-kvm: Use upstream guest debug code Jan Kiszka
2010-02-19 18:22 ` [Qemu-devel] " Jan Kiszka
2010-02-21 9:20 ` [PATCH 0/9] qemu-kvm: Extended use of upstream code Avi Kivity
2010-02-21 9:20 ` [Qemu-devel] " Avi Kivity
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=4B80FBED.9010903@redhat.com \
--to=avi@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=gleb@redhat.com \
--cc=jan.kiszka@siemens.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.