From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVHmc-0000t4-JG for qemu-devel@nongnu.org; Fri, 28 Aug 2015 07:25:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVHmY-0001JD-8X for qemu-devel@nongnu.org; Fri, 28 Aug 2015 07:25:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVHmY-0001Ig-1K for qemu-devel@nongnu.org; Fri, 28 Aug 2015 07:25:18 -0400 From: Markus Armbruster References: <1439380232-20660-1-git-send-email-den@openvz.org> Date: Fri, 28 Aug 2015 13:25:13 +0200 In-Reply-To: <1439380232-20660-1-git-send-email-den@openvz.org> (Denis V. Lunev's message of "Wed, 12 Aug 2015 14:50:29 +0300") Message-ID: <87vbbzac4m.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 for 2.5 0/3] Move target- and device specific code from monitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: Peter Maydell , Luiz Capitulino , qemu-devel@nongnu.org, Paolo Bonzini , Pavel Butsykin "Denis V. Lunev" writes: > The monivation of this set is simple. Recently we have proposed patch > to monitor.c with specific x86 APIC HMP commands. The patchset was denied > with the main motivation "No more arch specific code in monitor.c" > This patchset is the first step to move arch specific code from > monitor.c targets. > > So, monitor.c already contains a lot of generic code, as well as the target > specifics code and eventually monitor.c volume will only grow. This trend leads > to a variety of fouling code ifdeffery(and combinations thereof), > poor readability, and entanglement of architecture of the project. > If someone wants to improve processing logic commands at the monitor, > it isn't necessarily must differentiate amongst the implementation of some ARM > or x86_64 specific commands, because the project already has separation of > target specific code on directories. > > The presented solution is not the best, but it is quite simple > (PATCH doesn't add more code!) and decides the above mentioned issue. > Subsequently it will not prevent the introduction of more advanced mechanism > that can more effectively resolve the issue. > > There is a issue with the placement of code for multiple architectures > (isn't for everyone), but this code is very small. This patch is a step towards > solving the issue associated with maintaining the purity of the code and > structure of the project, which solves not all, but doing a little better > than it is. > > Changes from v1: > - ported to new head > > Signed-off-by: Pavel Butsykin > Signed-off-by: Denis V. Lunev > CC: Luiz Capitulino > CC: Paolo Bonzini > CC: Peter Maydell Please always include diffstats in your cover letter, to make it easier for maintainers to see at a glance how much a series touches their subsystem. git-format-patch does it right: Pavel Butsykin (3): hmp-commands-info: move info_cmds content out of monitor.c monitor: remove target-specific code from monitor.c monitor: added generation of documentation for hmp-commands-info.hx .gitignore | 1 + Makefile | 9 +- Makefile.target | 5 +- hmp-commands-info.hx | 715 ++++++++++++++++++++++ hmp-commands.hx | 120 ---- include/monitor/monitor-common.h | 43 ++ monitor.c | 1227 +------------------------------------- qemu-doc.texi | 2 + target-i386/Makefile.objs | 2 +- target-i386/monitor.c | 489 +++++++++++++++ target-ppc/Makefile.objs | 2 +- target-ppc/monitor.c | 250 ++++++++ target-sh4/Makefile.objs | 1 + target-sh4/monitor.c | 52 ++ target-sparc/Makefile.objs | 2 +- target-sparc/monitor.c | 153 +++++ target-xtensa/Makefile.objs | 1 + target-xtensa/monitor.c | 34 ++ 18 files changed, 1762 insertions(+), 1346 deletions(-) create mode 100644 hmp-commands-info.hx create mode 100644 include/monitor/monitor-common.h create mode 100644 target-i386/monitor.c create mode 100644 target-ppc/monitor.c create mode 100644 target-sh4/monitor.c create mode 100644 target-sparc/monitor.c create mode 100644 target-xtensa/monitor.c