Skip to contentSkip to conversation

target-i386: move tcg intialization inside CPU object

PATCH Applied Igor Mammedov 3 participants 8 messages Jul 3, 2012 – Aug 9, 2012 3 messages not in the archive

lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive
Quoted 30 lines · Jan Kiszka
Quoted 20 lines · Igor Mammedov

v2:
- drop usage of prev_debug_excp_handler consistently in all users
- split from reset patches to avoid confusion of inter-dependency

Compile & Run tested:
target-i386: tcg and kvm mode
i386-linux-user: running of /bin/ls
Compile tested:

   xtensa-softmmu && xtensaeb-softmmu

git tree for testing:

   https://github.com/imammedo/qemu/tree/x86cpu_qom_tcg_v2

Igor Mammedov (4):
target-i386: drop usage of prev_debug_excp_handler
target-xtensa: drop usage of prev_debug_excp_handler cleanup cpu_set_debug_excp_handler
target-i386: move tcg initialization into x86_cpu_initfn()

Quoted 8 lines
  cpu-exec.c             |    5 +----
  exec-all.h             |    2 +-
  target-i386/cpu.c      |   10 ++++++++++
  target-i386/cpu.h      |    1 +
  target-i386/helper.c   |   16 +---------------
  target-xtensa/helper.c |    8 +-------
  6 files changed, 15 insertions(+), 27 deletions(-)
Quoted 1 line

Looks good to me.

Thanks for reviews guys.

Jan,
I'm still learning about review process rules. Does usually or in your case "Looks good to me" implies Reviewed-By:... ?

And do I have to send pull request or ask somebody (whom?) to take patches in?

Quoted 2 lines

Jan

Signature · 2 lines
-----
 Igor
#3 lore raw
In reply to a message not in the archive

ping

Quoted 28 lines · Igor Mammedov

v2:
- drop usage of prev_debug_excp_handler consistently in all users
- split from reset patches to avoid confusion of inter-dependency

Compile & Run tested:
target-i386: tcg and kvm mode
i386-linux-user: running of /bin/ls
Compile tested:

   xtensa-softmmu && xtensaeb-softmmu

git tree for testing:

   https://github.com/imammedo/qemu/tree/x86cpu_qom_tcg_v2

Igor Mammedov (4):
target-i386: drop usage of prev_debug_excp_handler
target-xtensa: drop usage of prev_debug_excp_handler cleanup cpu_set_debug_excp_handler
target-i386: move tcg initialization into x86_cpu_initfn()

  cpu-exec.c             |    5 +----
  exec-all.h             |    2 +-
  target-i386/cpu.c      |   10 ++++++++++
  target-i386/cpu.h      |    1 +
  target-i386/helper.c   |   16 +---------------
  target-xtensa/helper.c |    8 +-------
  6 files changed, 15 insertions(+), 27 deletions(-)
Signature · 2 lines
-----
 Igor
#4 lore raw
In reply to a message not in the archive

ping.

Quoted 28 lines · Igor Mammedov

v2:
- drop usage of prev_debug_excp_handler consistently in all users
- split from reset patches to avoid confusion of inter-dependency

Compile & Run tested:
target-i386: tcg and kvm mode
i386-linux-user: running of /bin/ls
Compile tested:

   xtensa-softmmu && xtensaeb-softmmu

git tree for testing:

   https://github.com/imammedo/qemu/tree/x86cpu_qom_tcg_v2

Igor Mammedov (4):
target-i386: drop usage of prev_debug_excp_handler
target-xtensa: drop usage of prev_debug_excp_handler cleanup cpu_set_debug_excp_handler
target-i386: move tcg initialization into x86_cpu_initfn()

  cpu-exec.c             |    5 +----
  exec-all.h             |    2 +-
  target-i386/cpu.c      |   10 ++++++++++
  target-i386/cpu.h      |    1 +
  target-i386/helper.c   |   16 +---------------
  target-xtensa/helper.c |    8 +-------
  6 files changed, 15 insertions(+), 27 deletions(-)
Signature · 2 lines
-----
 Igor
#6 lore raw
In reply to a message not in the archive

Anthony,

ping

Is something wrong with this series?

PS:
Jan,
may I ask for an explicit Acked-By, pls?

Quoted 28 lines · Igor Mammedov

v2:
- drop usage of prev_debug_excp_handler consistently in all users
- split from reset patches to avoid confusion of inter-dependency

Compile & Run tested:
target-i386: tcg and kvm mode
i386-linux-user: running of /bin/ls
Compile tested:

   xtensa-softmmu && xtensaeb-softmmu

git tree for testing:

   https://github.com/imammedo/qemu/tree/x86cpu_qom_tcg_v2

Igor Mammedov (4):
target-i386: drop usage of prev_debug_excp_handler
target-xtensa: drop usage of prev_debug_excp_handler cleanup cpu_set_debug_excp_handler
target-i386: move tcg initialization into x86_cpu_initfn()

  cpu-exec.c             |    5 +----
  exec-all.h             |    2 +-
  target-i386/cpu.c      |   10 ++++++++++
  target-i386/cpu.h      |    1 +
  target-i386/helper.c   |   16 +---------------
  target-xtensa/helper.c |    8 +-------
  6 files changed, 15 insertions(+), 27 deletions(-)
#7 lore raw
In reply to a message not in the archive

ping

----- Original Message -----

Quoted 41 lines

From: "Igor Mammedov" <[email protected]>
To: [email protected]
Cc: "peter maydell" <[email protected]>, [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], "jan kiszka" <[email protected]>, [email protected], [email protected]
Sent: Monday, June 25, 2012 3:55:03 PM
Subject: [Qemu-devel] [PATCH 0/4 v2] target-i386: move tcg intialization inside CPU object

v2:
- drop usage of prev_debug_excp_handler consistently in all users
- split from reset patches to avoid confusion of inter-dependency

Compile & Run tested:
target-i386: tcg and kvm mode
i386-linux-user: running of /bin/ls
Compile tested:
xtensa-softmmu && xtensaeb-softmmu

git tree for testing:
https://github.com/imammedo/qemu/tree/x86cpu_qom_tcg_v2

Igor Mammedov (4):
target-i386: drop usage of prev_debug_excp_handler
target-xtensa: drop usage of prev_debug_excp_handler cleanup cpu_set_debug_excp_handler
target-i386: move tcg initialization into x86_cpu_initfn()

 cpu-exec.c             |    5 +----
 exec-all.h             |    2 +-
 target-i386/cpu.c      |   10 ++++++++++
 target-i386/cpu.h      |    1 +
 target-i386/helper.c   |   16 +---------------
 target-xtensa/helper.c |    8 +-------
 6 files changed, 15 insertions(+), 27 deletions(-)

--
1.7.10.2

Reviewed-by
#10 lore raw

Re: [Qemu-devel] [PATCH 1/4] target-i386: drop usage of prev_debug_excp_handler

In reply to a message not in the archive

Am 25.06.2012 15:55, schrieb Igor Mammedov:

Quoted 7 lines

Chains of exception handlers are currently unused feature, drop it for now so as not to expose prev_debug_excp_handler at global scope when moving tcg initialization into target-i386/cpu.c

Later we probably could re-invent better interface for this.

FWIW,

/-F

Quoted 37 lines
---
 target-i386/helper.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
target-i386/helper.c +1 -6
index 2cc8097..b9384f6 100644
@@ -941,8 +941,6 @@ int check_hw_breakpoints(CPUX86State *env, int force_dr6_update)
     return hit_enabled;
 }
 
-static CPUDebugExcpHandler *prev_debug_excp_handler;
-
 static void breakpoint_handler(CPUX86State *env)
 {
     CPUBreakpoint *bp;
@@ -965,8 +963,6 @@ static void breakpoint_handler(CPUX86State *env)
                 break;
             }
     }
-    if (prev_debug_excp_handler)
-        prev_debug_excp_handler(env);
 }
 
 typedef struct MCEInjectionParams {
@@ -1166,8 +1162,7 @@ X86CPU *cpu_x86_init(const char *cpu_model)
         inited = 1;
         optimize_flags_init();
 #ifndef CONFIG_USER_ONLY
-        prev_debug_excp_handler =
-            cpu_set_debug_excp_handler(breakpoint_handler);
+        cpu_set_debug_excp_handler(breakpoint_handler);
 #endif
     }
     if (cpu_x86_register(cpu, cpu_model) < 0) {
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#8 lore raw
In reply to Igor Mammedov

Am 08.08.2012 13:28, schrieb Igor Mammedov:

Quoted 1 line

ping

FWIW it looks to me as if Jan's previous review comments regarding debug_excp_helper have been addressed. So if someone could take a look at patch 3/4 and ack that we don't need chaining of handlers, this should be good to go for 1.2.

Andreas

Quoted 44 lines

----- Original Message -----

Quoted 41 lines

From: "Igor Mammedov" <[email protected]>
To: [email protected]
Cc: "peter maydell" <[email protected]>, [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], "jan kiszka" <[email protected]>, [email protected], [email protected]
Sent: Monday, June 25, 2012 3:55:03 PM
Subject: [Qemu-devel] [PATCH 0/4 v2] target-i386: move tcg intialization inside CPU object

v2:
- drop usage of prev_debug_excp_handler consistently in all users
- split from reset patches to avoid confusion of inter-dependency

Compile & Run tested:
target-i386: tcg and kvm mode
i386-linux-user: running of /bin/ls
Compile tested:
xtensa-softmmu && xtensaeb-softmmu

git tree for testing:
https://github.com/imammedo/qemu/tree/x86cpu_qom_tcg_v2

Igor Mammedov (4):
target-i386: drop usage of prev_debug_excp_handler
target-xtensa: drop usage of prev_debug_excp_handler cleanup cpu_set_debug_excp_handler
target-i386: move tcg initialization into x86_cpu_initfn()

 cpu-exec.c             |    5 +----
 exec-all.h             |    2 +-
 target-i386/cpu.c      |   10 ++++++++++
 target-i386/cpu.h      |    1 +
 target-i386/helper.c   |   16 +---------------
 target-xtensa/helper.c |    8 +-------
 6 files changed, 15 insertions(+), 27 deletions(-)

--
1.7.10.2

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Applied
#5 lore raw
In reply to Igor Mammedov

Thanks, applied all.

Quoted 39 lines · Igor Mammedov

ping.

Quoted 21 lines · Igor Mammedov

v2:
- drop usage of prev_debug_excp_handler consistently in all users
- split from reset patches to avoid confusion of inter-dependency

Compile & Run tested:
target-i386: tcg and kvm mode
i386-linux-user: running of /bin/ls
Compile tested:

   xtensa-softmmu && xtensaeb-softmmu

git tree for testing:

   https://github.com/imammedo/qemu/tree/x86cpu_qom_tcg_v2

Igor Mammedov (4):
target-i386: drop usage of prev_debug_excp_handler
target-xtensa: drop usage of prev_debug_excp_handler cleanup cpu_set_debug_excp_handler
target-i386: move tcg initialization into x86_cpu_initfn()

Quoted 8 lines
  cpu-exec.c             |    5 +----
  exec-all.h             |    2 +-
  target-i386/cpu.c      |   10 ++++++++++
  target-i386/cpu.h      |    1 +
  target-i386/helper.c   |   16 +---------------
  target-xtensa/helper.c |    8 +-------
  6 files changed, 15 insertions(+), 27 deletions(-)

--
-----
Igor