* [Qemu-devel] [PATCH] kvm: reduce code duplication in config_iothread
@ 2010-02-04 14:46 Amit Shah
2010-02-10 19:28 ` Anthony Liguori
0 siblings, 1 reply; 2+ messages in thread
From: Amit Shah @ 2010-02-04 14:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Amit Shah
We have some duplicated code in the CONFIG_IOTHREAD #ifdef and #else
cases. Fix that.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
kvm-all.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 15ec38e..a2bd78e 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -901,14 +901,11 @@ void kvm_setup_guest_memory(void *start, size_t size)
static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
{
#ifdef CONFIG_IOTHREAD
- if (env == cpu_single_env) {
- func(data);
- return;
+ if (env != cpu_single_env) {
+ abort();
}
- abort();
-#else
- func(data);
#endif
+ func(data);
}
struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
--
1.6.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] kvm: reduce code duplication in config_iothread
2010-02-04 14:46 [Qemu-devel] [PATCH] kvm: reduce code duplication in config_iothread Amit Shah
@ 2010-02-10 19:28 ` Anthony Liguori
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Liguori @ 2010-02-10 19:28 UTC (permalink / raw)
To: Amit Shah; +Cc: qemu-devel
On 02/04/2010 08:46 AM, Amit Shah wrote:
> We have some duplicated code in the CONFIG_IOTHREAD #ifdef and #else
> cases. Fix that.
>
> Signed-off-by: Amit Shah<amit.shah@redhat.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> kvm-all.c | 9 +++------
> 1 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/kvm-all.c b/kvm-all.c
> index 15ec38e..a2bd78e 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -901,14 +901,11 @@ void kvm_setup_guest_memory(void *start, size_t size)
> static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
> {
> #ifdef CONFIG_IOTHREAD
> - if (env == cpu_single_env) {
> - func(data);
> - return;
> + if (env != cpu_single_env) {
> + abort();
> }
> - abort();
> -#else
> - func(data);
> #endif
> + func(data);
> }
>
> struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-10 19:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-04 14:46 [Qemu-devel] [PATCH] kvm: reduce code duplication in config_iothread Amit Shah
2010-02-10 19:28 ` Anthony Liguori
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).