* [Qemu-devel] [PATCH] temporary fix for on_vcpu
@ 2009-09-11 14:41 Glauber Costa
2009-09-11 15:56 ` [Qemu-devel] " Jan Kiszka
2009-09-17 18:10 ` [Qemu-devel] [RESEND][PATCH] " Jan Kiszka
0 siblings, 2 replies; 6+ messages in thread
From: Glauber Costa @ 2009-09-11 14:41 UTC (permalink / raw)
To: qemu-devel; +Cc: aliguori
Recent changes made on_vcpu hit the abort() path, even with the IO thread
disabled. This is because cpu_single_env is no longer set when we call this
function. Although the correct fix is a little bit more complicated that that,
the recent thread in which I proposed qemu_queue_work (which fixes that, btw),
is likely to go on a quite different direction.
So for the benefit of those using guest debugging, I'm proposing this simple
fix in the interim.
Signed-off-by: Glauber Costa <glommer@redhat.com>
---
kvm-all.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index df4e849..2c24440 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -902,11 +902,15 @@ void kvm_setup_guest_memory(void *start, size_t size)
#ifdef KVM_CAP_SET_GUEST_DEBUG
static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
{
+#ifdef CONFIG_IOTHREAD
if (env == cpu_single_env) {
func(data);
return;
}
abort();
+#else
+ func(data);
+#endif
}
struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
--
1.6.2.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH] temporary fix for on_vcpu
2009-09-11 14:41 [Qemu-devel] [PATCH] temporary fix for on_vcpu Glauber Costa
@ 2009-09-11 15:56 ` Jan Kiszka
2009-09-11 16:12 ` Glauber Costa
2009-09-17 18:10 ` [Qemu-devel] [RESEND][PATCH] " Jan Kiszka
1 sibling, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2009-09-11 15:56 UTC (permalink / raw)
To: Glauber Costa; +Cc: aliguori, qemu-devel
Glauber Costa wrote:
> Recent changes made on_vcpu hit the abort() path, even with the IO thread
> disabled. This is because cpu_single_env is no longer set when we call this
> function. Although the correct fix is a little bit more complicated that that,
> the recent thread in which I proposed qemu_queue_work (which fixes that, btw),
> is likely to go on a quite different direction.
>
> So for the benefit of those using guest debugging, I'm proposing this simple
> fix in the interim.
>
> Signed-off-by: Glauber Costa <glommer@redhat.com>
> ---
> kvm-all.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/kvm-all.c b/kvm-all.c
> index df4e849..2c24440 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -902,11 +902,15 @@ void kvm_setup_guest_memory(void *start, size_t size)
> #ifdef KVM_CAP_SET_GUEST_DEBUG
> static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
> {
> +#ifdef CONFIG_IOTHREAD
> if (env == cpu_single_env) {
> func(data);
> return;
> }
> abort();
> +#else
> + func(data);
spaces++ :) But the workaround works.
> +#endif
> }
>
> struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
Unless there is hope to fix kvm in iothread mode soon, we should issue a
warning or even disable kvm support in that setup. That is particularly
important for 0.11-stable.
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH] temporary fix for on_vcpu
2009-09-11 15:56 ` [Qemu-devel] " Jan Kiszka
@ 2009-09-11 16:12 ` Glauber Costa
2009-09-11 16:18 ` Jan Kiszka
0 siblings, 1 reply; 6+ messages in thread
From: Glauber Costa @ 2009-09-11 16:12 UTC (permalink / raw)
To: Jan Kiszka; +Cc: aliguori, qemu-devel
On Fri, Sep 11, 2009 at 05:56:08PM +0200, Jan Kiszka wrote:
> Glauber Costa wrote:
> > Recent changes made on_vcpu hit the abort() path, even with the IO thread
> > disabled. This is because cpu_single_env is no longer set when we call this
> > function. Although the correct fix is a little bit more complicated that that,
> > the recent thread in which I proposed qemu_queue_work (which fixes that, btw),
> > is likely to go on a quite different direction.
> >
> > So for the benefit of those using guest debugging, I'm proposing this simple
> > fix in the interim.
> >
> > Signed-off-by: Glauber Costa <glommer@redhat.com>
> > ---
> > kvm-all.c | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/kvm-all.c b/kvm-all.c
> > index df4e849..2c24440 100644
> > --- a/kvm-all.c
> > +++ b/kvm-all.c
> > @@ -902,11 +902,15 @@ void kvm_setup_guest_memory(void *start, size_t size)
> > #ifdef KVM_CAP_SET_GUEST_DEBUG
> > static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
> > {
> > +#ifdef CONFIG_IOTHREAD
> > if (env == cpu_single_env) {
> > func(data);
> > return;
> > }
> > abort();
> > +#else
> > + func(data);
>
> spaces++ :) But the workaround works.
>
> > +#endif
> > }
> >
> > struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
>
> Unless there is hope to fix kvm in iothread mode soon, we should issue a
> warning or even disable kvm support in that setup. That is particularly
> important for 0.11-stable.
As I said, with the fixes I sent recently, it should work pretty well.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH] temporary fix for on_vcpu
2009-09-11 16:12 ` Glauber Costa
@ 2009-09-11 16:18 ` Jan Kiszka
2009-09-11 18:35 ` Glauber Costa
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2009-09-11 16:18 UTC (permalink / raw)
To: Glauber Costa; +Cc: aliguori, qemu-devel
Glauber Costa wrote:
> On Fri, Sep 11, 2009 at 05:56:08PM +0200, Jan Kiszka wrote:
>> Glauber Costa wrote:
>>> Recent changes made on_vcpu hit the abort() path, even with the IO thread
>>> disabled. This is because cpu_single_env is no longer set when we call this
>>> function. Although the correct fix is a little bit more complicated that that,
>>> the recent thread in which I proposed qemu_queue_work (which fixes that, btw),
>>> is likely to go on a quite different direction.
>>>
>>> So for the benefit of those using guest debugging, I'm proposing this simple
>>> fix in the interim.
>>>
>>> Signed-off-by: Glauber Costa <glommer@redhat.com>
>>> ---
>>> kvm-all.c | 4 ++++
>>> 1 files changed, 4 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/kvm-all.c b/kvm-all.c
>>> index df4e849..2c24440 100644
>>> --- a/kvm-all.c
>>> +++ b/kvm-all.c
>>> @@ -902,11 +902,15 @@ void kvm_setup_guest_memory(void *start, size_t size)
>>> #ifdef KVM_CAP_SET_GUEST_DEBUG
>>> static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
>>> {
>>> +#ifdef CONFIG_IOTHREAD
>>> if (env == cpu_single_env) {
>>> func(data);
>>> return;
>>> }
>>> abort();
>>> +#else
>>> + func(data);
>> spaces++ :) But the workaround works.
>>
>>> +#endif
>>> }
>>>
>>> struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
>> Unless there is hope to fix kvm in iothread mode soon, we should issue a
>> warning or even disable kvm support in that setup. That is particularly
>> important for 0.11-stable.
> As I said, with the fixes I sent recently, it should work pretty well.
You are referring to the workqueue things? Or "do proper cpu_self check"
and the corresponding 2/2 (which I do not find in the archives)?
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] Re: [PATCH] temporary fix for on_vcpu
2009-09-11 16:18 ` Jan Kiszka
@ 2009-09-11 18:35 ` Glauber Costa
0 siblings, 0 replies; 6+ messages in thread
From: Glauber Costa @ 2009-09-11 18:35 UTC (permalink / raw)
To: Jan Kiszka; +Cc: aliguori, qemu-devel
On Fri, Sep 11, 2009 at 06:18:02PM +0200, Jan Kiszka wrote:
> Glauber Costa wrote:
> > On Fri, Sep 11, 2009 at 05:56:08PM +0200, Jan Kiszka wrote:
> >> Glauber Costa wrote:
> >>> Recent changes made on_vcpu hit the abort() path, even with the IO thread
> >>> disabled. This is because cpu_single_env is no longer set when we call this
> >>> function. Although the correct fix is a little bit more complicated that that,
> >>> the recent thread in which I proposed qemu_queue_work (which fixes that, btw),
> >>> is likely to go on a quite different direction.
> >>>
> >>> So for the benefit of those using guest debugging, I'm proposing this simple
> >>> fix in the interim.
> >>>
> >>> Signed-off-by: Glauber Costa <glommer@redhat.com>
> >>> ---
> >>> kvm-all.c | 4 ++++
> >>> 1 files changed, 4 insertions(+), 0 deletions(-)
> >>>
> >>> diff --git a/kvm-all.c b/kvm-all.c
> >>> index df4e849..2c24440 100644
> >>> --- a/kvm-all.c
> >>> +++ b/kvm-all.c
> >>> @@ -902,11 +902,15 @@ void kvm_setup_guest_memory(void *start, size_t size)
> >>> #ifdef KVM_CAP_SET_GUEST_DEBUG
> >>> static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
> >>> {
> >>> +#ifdef CONFIG_IOTHREAD
> >>> if (env == cpu_single_env) {
> >>> func(data);
> >>> return;
> >>> }
> >>> abort();
> >>> +#else
> >>> + func(data);
> >> spaces++ :) But the workaround works.
> >>
> >>> +#endif
> >>> }
> >>>
> >>> struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
> >> Unless there is hope to fix kvm in iothread mode soon, we should issue a
> >> warning or even disable kvm support in that setup. That is particularly
> >> important for 0.11-stable.
> > As I said, with the fixes I sent recently, it should work pretty well.
>
> You are referring to the workqueue things? Or "do proper cpu_self check"
> and the corresponding 2/2 (which I do not find in the archives)?
The later.
The 1/2 numbering is by bad. It is the way it was in my personal tree. The
other patch is already sent a while ago. Not sure what anthony did of it.
If anthony prefer, I can resend both to make it easier to pick
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [RESEND][PATCH] temporary fix for on_vcpu
2009-09-11 14:41 [Qemu-devel] [PATCH] temporary fix for on_vcpu Glauber Costa
2009-09-11 15:56 ` [Qemu-devel] " Jan Kiszka
@ 2009-09-17 18:10 ` Jan Kiszka
1 sibling, 0 replies; 6+ messages in thread
From: Jan Kiszka @ 2009-09-17 18:10 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Glauber Costa, qemu-devel
From: Glauber Costa <glommer@redhat.com>
Recent changes made on_vcpu hit the abort() path, even with the IO thread
disabled. This is because cpu_single_env is no longer set when we call this
function. Although the correct fix is a little bit more complicated that that,
the recent thread in which I proposed qemu_queue_work (which fixes that, btw),
is likely to go on a quite different direction.
So for the benefit of those using guest debugging, I'm proposing this simple
fix in the interim.
Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
kvm-all.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index ac57984..3c37dd7 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -905,11 +905,15 @@ void kvm_setup_guest_memory(void *start, size_t size)
#ifdef KVM_CAP_SET_GUEST_DEBUG
static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
{
+#ifdef CONFIG_IOTHREAD
if (env == cpu_single_env) {
func(data);
return;
}
abort();
+#else
+ func(data);
+#endif
}
struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-09-17 18:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 14:41 [Qemu-devel] [PATCH] temporary fix for on_vcpu Glauber Costa
2009-09-11 15:56 ` [Qemu-devel] " Jan Kiszka
2009-09-11 16:12 ` Glauber Costa
2009-09-11 16:18 ` Jan Kiszka
2009-09-11 18:35 ` Glauber Costa
2009-09-17 18:10 ` [Qemu-devel] [RESEND][PATCH] " Jan Kiszka
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.