qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [Qemu-devel] [PATCH 01/12] Refactor translation block CPU state handling
Date: Thu, 13 Nov 2008 14:42:39 -0600	[thread overview]
Message-ID: <491C913F.7060508@codemonkey.ws> (raw)
In-Reply-To: <20081103103558.523866919@mchn012c.ww002.siemens.net>

Jan Kiszka wrote:
> This patch refactors the way the CPU state is handled that is associated
> with a TB. The basic motivation is to move more arch specific code out
> of generic files. Specifically the long #ifdef clutter in tb_find_fast()
> has to be overcome in order to avoid duplicating it for the gdb
> watchpoint fixes (patch "Restore pc on watchpoint hits").
>
> The approach taken here is to encapsulate the relevant CPU state in a
> new structure called TBCPUState which is kept inside TranslationBlock
> but also passed around when setting up new TBs. To fill a TBCPUState
> based on the current CPUState, each arch has to provide
> cpu_get_tb_cpu_state(CPUState *, TBCPUState *).
>
> At this chance, the patch also converts the not really beautiful macro
> CPU_PC_FROM_TB into a clean static inline function.
>   

There are really three patches in one here.  The first patch converts 
CPU_PC_FROM_TB to a function.  The second eliminates the #ifdef mess in 
tb_find_fast by introducing cpu_get_tb_cpu_state(CPUState *, 
TranslationBlock *), and the third moves the CPU specific state in 
Translation block to a separate structure and changes the signature of 
cpu_get_tb_cpu_state() to take the TBCPUState structure.

Can you split up this patch along these lines?  All of these changes are 
mechanical and they are easier to review/bisect as separate patches.

I'm not 100% convinced that the third patch is really that valuable.  
Can you explain if there's any benefit to doing this other than readability?

Regards,

Anthony Liguori

  reply	other threads:[~2008-11-13 20:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03 10:35 [Qemu-devel] [PATCH 00/12] Enhance debugging support - 4th take Jan Kiszka
2008-11-03 10:35 ` [Qemu-devel] [PATCH 01/12] Refactor translation block CPU state handling Jan Kiszka
2008-11-13 20:42   ` Anthony Liguori [this message]
2008-11-03 10:36 ` [Qemu-devel] [PATCH 02/12] Return appropriate watch message to gdb Jan Kiszka
2008-11-13 20:45   ` Anthony Liguori
2008-11-13 22:55     ` [Qemu-devel] " Jan Kiszka
2008-11-03 10:36 ` [Qemu-devel] [PATCH 03/12] Refactor and enhance break/watchpoint API Jan Kiszka
2008-11-13 20:48   ` Anthony Liguori
2008-11-13 22:56     ` [Qemu-devel] " Jan Kiszka
2008-11-14  2:24       ` Jamie Lokier
2008-11-13 20:51   ` [Qemu-devel] " Anthony Liguori
2008-11-13 22:58     ` [Qemu-devel] " Jan Kiszka
2008-11-15  8:29       ` Jan Kiszka
2008-11-15 16:12         ` Anthony Liguori
2008-11-03 10:36 ` [Qemu-devel] [PATCH 04/12] Set mem_io_vaddr on io_read Jan Kiszka
2008-11-03 10:36 ` [Qemu-devel] [PATCH 05/12] Respect length of watchpoints Jan Kiszka
2008-11-03 10:36 ` [Qemu-devel] [PATCH 06/12] Restore pc on watchpoint hits Jan Kiszka
2008-11-03 10:36 ` [Qemu-devel] [PATCH 07/12] Remove premature memop TB terminations Jan Kiszka
2008-11-03 10:36 ` [Qemu-devel] [PATCH 08/12] qemu: gdbstub: manage CPUs as threads Jan Kiszka
2008-11-03 10:36 ` [Qemu-devel] [PATCH 09/12] Introduce BP_WATCHPOINT_HIT flag Jan Kiszka
2008-11-03 10:36 ` [Qemu-devel] [PATCH 10/12] Add debug exception hook Jan Kiszka
2008-11-03 10:36 ` [Qemu-devel] [PATCH 11/12] Introduce BP_CPU as a breakpoint type Jan Kiszka
2008-11-03 10:36 ` [Qemu-devel] [PATCH 12/12] x86: Debug register emulation Jan Kiszka
2008-11-13 20:38 ` [Qemu-devel] [PATCH 00/12] Enhance debugging support - 4th take Anthony Liguori
2008-11-13 22:55   ` [Qemu-devel] " Jan Kiszka
2008-11-13 22:06 ` [Qemu-devel] " Fabrice Bellard
2008-11-13 22:55   ` [Qemu-devel] " Jan Kiszka
2008-11-13 23:32     ` Anthony Liguori

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=491C913F.7060508@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=jan.kiszka@siemens.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 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).