kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: Qemu: Build fix for !CONFIG_GDBSTUB case.
@ 2008-11-27  9:35 Zhang, Xiantao
  2008-11-27 10:31 ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Xiantao @ 2008-11-27  9:35 UTC (permalink / raw)
  To: Avi Kivity, kvm@vger.kernel.org; +Cc: kvm-ia64@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]

>From ee96ecb2c86e820278f3332d32a452f31c72dc30 Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Thu, 27 Nov 2008 17:23:27 +0800
Subject: [PATCH] KVM: Qemu: Build fix for !CONFIG_GDBSTUB case.

Once CONFIG_GDBSTUB not configured, compile will generate error.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 qemu/vl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qemu/vl.c b/qemu/vl.c
index 92325e6..46733e9 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -3862,10 +3862,12 @@ static int main_loop(void)
 		qemu_system_powerdown();
                 ret = EXCP_INTERRUPT;
             }
+#ifdef CONFIG_GDBSTUB
             if (unlikely(ret == EXCP_DEBUG)) {
                 gdb_set_stop_cpu(cur_cpu);
                 vm_stop(EXCP_DEBUG);
             }
+#endif
             /* If all cpus are halted then wait until the next IRQ */
             /* XXX: use timeout computed from timers */
             if (ret == EXCP_HALTED) {
-- 
1.6.0

[-- Attachment #2: 0001-KVM-Qemu-Build-fix-for-CONFIG_GDBSTUB-case.patch --]
[-- Type: application/octet-stream, Size: 1001 bytes --]

From ee96ecb2c86e820278f3332d32a452f31c72dc30 Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Thu, 27 Nov 2008 17:23:27 +0800
Subject: [PATCH] KVM: Qemu: Build fix for !CONFIG_GDBSTUB case.

Once CONFIG_GDBSTUB not configured, compile will generate error.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 qemu/vl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qemu/vl.c b/qemu/vl.c
index 92325e6..46733e9 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -3862,10 +3862,12 @@ static int main_loop(void)
 		qemu_system_powerdown();
                 ret = EXCP_INTERRUPT;
             }
+#ifdef CONFIG_GDBSTUB
             if (unlikely(ret == EXCP_DEBUG)) {
                 gdb_set_stop_cpu(cur_cpu);
                 vm_stop(EXCP_DEBUG);
             }
+#endif
             /* If all cpus are halted then wait until the next IRQ */
             /* XXX: use timeout computed from timers */
             if (ret == EXCP_HALTED) {
-- 
1.6.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM: Qemu: Build fix for !CONFIG_GDBSTUB case.
  2008-11-27  9:35 [PATCH] KVM: Qemu: Build fix for !CONFIG_GDBSTUB case Zhang, Xiantao
@ 2008-11-27 10:31 ` Jan Kiszka
  2008-11-28  1:25   ` Zhang, Xiantao
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2008-11-27 10:31 UTC (permalink / raw)
  To: Zhang, Xiantao; +Cc: Avi Kivity, kvm@vger.kernel.org, kvm-ia64@vger.kernel.org

Zhang, Xiantao wrote:
> From ee96ecb2c86e820278f3332d32a452f31c72dc30 Mon Sep 17 00:00:00 2001
> From: Xiantao Zhang <xiantao.zhang@intel.com>
> Date: Thu, 27 Nov 2008 17:23:27 +0800
> Subject: [PATCH] KVM: Qemu: Build fix for !CONFIG_GDBSTUB case.
> 
> Once CONFIG_GDBSTUB not configured, compile will generate error.
> 
> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
> ---
>  qemu/vl.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/qemu/vl.c b/qemu/vl.c
> index 92325e6..46733e9 100644
> --- a/qemu/vl.c
> +++ b/qemu/vl.c
> @@ -3862,10 +3862,12 @@ static int main_loop(void)
>  		qemu_system_powerdown();
>                  ret = EXCP_INTERRUPT;
>              }
> +#ifdef CONFIG_GDBSTUB
>              if (unlikely(ret == EXCP_DEBUG)) {
>                  gdb_set_stop_cpu(cur_cpu);
>                  vm_stop(EXCP_DEBUG);
>              }
> +#endif
>              /* If all cpus are halted then wait until the next IRQ */
>              /* XXX: use timeout computed from timers */
>              if (ret == EXCP_HALTED) {

This rather looks like a qemu upstream issue. But as no qemu arch comes
without gdbstub support and this switch is always true, no one noticed it.

But why not fixing the core issue, ie. adding gdbstub support, or at
least some intermediate dummy functions until qemu gains full ia64
support? That would also allow to clean up the CONFIG_GDBSTUB #ifdef'ery
from upstream. And it would be the first step towards kvm guest
debugging support for ia64.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2 ES-OS
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] KVM: Qemu: Build fix for !CONFIG_GDBSTUB case.
  2008-11-27 10:31 ` Jan Kiszka
@ 2008-11-28  1:25   ` Zhang, Xiantao
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Xiantao @ 2008-11-28  1:25 UTC (permalink / raw)
  To: Jan Kiszka, Jes Sorensen
  Cc: Avi Kivity, kvm@vger.kernel.org, kvm-ia64@vger.kernel.org

Jan Kiszka wrote:
> Zhang, Xiantao wrote:
>> From ee96ecb2c86e820278f3332d32a452f31c72dc30 Mon Sep 17 00:00:00
>> 2001 From: Xiantao Zhang <xiantao.zhang@intel.com>
>> Date: Thu, 27 Nov 2008 17:23:27 +0800
>> Subject: [PATCH] KVM: Qemu: Build fix for !CONFIG_GDBSTUB case.
>> 
>> Once CONFIG_GDBSTUB not configured, compile will generate error.
>> 
>> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> ---
>>  qemu/vl.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>> 
>> diff --git a/qemu/vl.c b/qemu/vl.c
>> index 92325e6..46733e9 100644
>> --- a/qemu/vl.c
>> +++ b/qemu/vl.c
>> @@ -3862,10 +3862,12 @@ static int main_loop(void)
>>  		qemu_system_powerdown();
>>                  ret = EXCP_INTERRUPT;
>>              }
>> +#ifdef CONFIG_GDBSTUB
>>              if (unlikely(ret == EXCP_DEBUG)) {
>>                  gdb_set_stop_cpu(cur_cpu);
>>                  vm_stop(EXCP_DEBUG);
>>              }
>> +#endif
>>              /* If all cpus are halted then wait until the next IRQ
>>              */ /* XXX: use timeout computed from timers */
>>              if (ret == EXCP_HALTED) {
> 
> This rather looks like a qemu upstream issue. But as no qemu arch
> comes without gdbstub support and this switch is always true, no one
> noticed it. 
> 
> But why not fixing the core issue, ie. adding gdbstub support, or at
> least some intermediate dummy functions until qemu gains full ia64
> support? That would also allow to clean up the CONFIG_GDBSTUB
> #ifdef'ery from upstream. And it would be the first step towards kvm
> guest 
> debugging support for ia64. 

   Adding the support gdbstub for ia64 should be the best way to go, but no enough resource to do.  Jes is working on upshing kvm/ia64 qemu changes to qemu upstream, and should consider the final solution eventually.  Since CONFIG_GDBSTUB is used everywhere in current Qemu upstream, so before CONFIG_GDBSTUB is cleanuped, the current patch should be Okay to solve ia64's build issue.  Thanks!
Xiantao 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-28  1:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-27  9:35 [PATCH] KVM: Qemu: Build fix for !CONFIG_GDBSTUB case Zhang, Xiantao
2008-11-27 10:31 ` Jan Kiszka
2008-11-28  1:25   ` Zhang, Xiantao

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).