From: "Andreas Färber" <afaerber@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
Eduardo Habkost <ehabkost@redhat.com>,
Alexander Graf <agraf@suse.de>,
QEMU Developers <qemu-devel@nongnu.org>,
Bharata B Rao <bharata@linux.vnet.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PULL v2 00/22] QOM CPUState patch queue 2015-07-07
Date: Wed, 08 Jul 2015 20:53:47 +0200 [thread overview]
Message-ID: <559D71BB.50202@suse.de> (raw)
In-Reply-To: <CAFEAcA8rnN6+4aa5UOT9rtC4ZK_DgsVL0WHx7YSJyFCAmSazMA@mail.gmail.com>
Am 08.07.2015 um 20:50 schrieb Peter Maydell:
> On 8 July 2015 at 18:39, Andreas Färber <afaerber@suse.de> wrote:
>> Am 08.07.2015 um 13:33 schrieb Peter Maydell:
>>> On 7 July 2015 at 18:16, Andreas Färber <afaerber@suse.de> wrote:
>>>> Hello Peter,
>>>>
>>>> This is my QOM CPU patch queue. Please pull.
>>>>
>>>> Note: For time reasons I did not give this queue as much testing as usual,
>>>> in particular BSD and non-x86 KVM hosts were not covered.
>>>>
>>>> Regards,
>>>> Andreas
>>>>
>>>> Cc: Peter Maydell <peter.maydell@linaro.org>
>>>>
>>>> Cc: Eduardo Habkost <ehabkost@redhat.com>
>>>> Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>>>>
>>>> The following changes since commit f2562fbb7ac54d597cfe05f613d30296d1850d1b:
>>>>
>>>> Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging (2015-07-07 15:48:49 +0100)
>>>>
>>>> are available in the git repository at:
>>>>
>>>> git://github.com/afaerber/qemu-cpu.git tags/qom-cpu-for-peter
>>>>
>>>> for you to fetch changes up to cf6f1442257d53cf617545dd150efe26771ec31c:
>>>>
>>>> disas: cris: QOMify target specific disas setup (2015-07-07 18:35:39 +0200)
>>>>
>>>> ----------------------------------------------------------------
>>>> QOM CPUState and X86CPU
>>>>
>>>> * Further QOM'ification of CPU initialization
>>>> * Propagation of CPUState arguments and elimination of ENV_GET_CPU() usage
>>>> * cpu_set_pc() abstraction
>>>> * CPUClass::disas_set_info() hook
>>>
>>> I'm afraid this seems to break ppc linux-user somehow:
>>>
>>> e104462:trusty:linux-user-test-0.3$ gdb --args
>>> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/ppc-linux-user/qemu-ppc
>>> -L ./gnemul/qemu-ppc ppc/ls -l dummyfile
>>> GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
>>> Copyright (C) 2014 Free Software Foundation, Inc.
>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>>> This is free software: you are free to change and redistribute it.
>>> There is NO WARRANTY, to the extent permitted by law. Type "show copying"
>>> and "show warranty" for details.
>>> This GDB was configured as "x86_64-linux-gnu".
>>> Type "show configuration" for configuration details.
>>> For bug reporting instructions, please see:
>>> <http://www.gnu.org/software/gdb/bugs/>.
>>> Find the GDB manual and other documentation resources online at:
>>> <http://www.gnu.org/software/gdb/documentation/>.
>>> For help, type "help".
>>> Type "apropos word" to search for commands related to "word"...
>>> Reading symbols from
>>> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/ppc-linux-user/qemu-ppc...done.
>>> (gdb) handle SIGUSR1 pass noprint nostop
>>> Signal Stop Print Pass to program Description
>>> SIGUSR1 No No Yes User defined signal 1
>>> (gdb) r
>>> Starting program:
>>> /home/petmay01/linaro/qemu-for-merges/build/all-linux-static/ppc-linux-user/qemu-ppc
>>> -L ./gnemul/qemu-ppc ppc/ls -l dummyfile
>>> [Thread debugging using libthread_db enabled]
>>> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
>>> [New Thread 0x7ffff7ffc700 (LWP 22653)]
>>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>> 0x000000006060dd85 in static_code_gen_buffer ()
>>> (gdb) bt
>>> #0 0x000000006060dd85 in static_code_gen_buffer ()
>>> #1 0x00000000600065e3 in cpu_tb_exec (cpu=0x6268ceb0,
>>> tb_ptr=0x6060dd50 <static_code_gen_buffer+2992>
>>> "A\213n\374\205\355\017\205", <incomplete sequence \307>)
>>> at /home/petmay01/linaro/qemu-for-merges/cpu-exec.c:200
>>> #2 0x0000000060006fbc in cpu_ppc_exec (cpu=0x6268ceb0) at
>>> /home/petmay01/linaro/qemu-for-merges/cpu-exec.c:518
>>> #3 0x0000000060049dc2 in cpu_loop (env=0x62695100) at
>>> /home/petmay01/linaro/qemu-for-merges/linux-user/main.c:1568
>>> #4 0x000000006004cac5 in main (argc=6, argv=0x7fffffffe3f8,
>>> envp=0x7fffffffe430)
>>> at /home/petmay01/linaro/qemu-for-merges/linux-user/main.c:4408
>>
>> a7bebe297accafc0fa75a5f76767e6b856e6d5eb is the first bad commit
>> commit a7bebe297accafc0fa75a5f76767e6b856e6d5eb
>> Author: Bharata B Rao <bharata@linux.vnet.ibm.com>
>> Date: Tue Jun 23 19:31:14 2015 -0700
>>
>> target-ppc: Move cpu_exec_init() call to realize function
>>
>> Move cpu_exec_init() call from instance_init to realize. This allows
>> any failures from cpu_exec_init() to be handled appropriately.
>> Also add corresponding cpu_exec_exit() call from unrealize.
>>
>> cpu_dt_id assignment from instance_init is no longer needed since
>> correct assignment for cpu_dt_id is already present in realizefn.
>>
>> Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
>> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
>> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
>> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>>
>> :040000 040000 9f5a59e2b3237877cb8940f744beeb5a304a5620
>> 171e8f34622f032c8d36c98eb3ee1f513ec6d5ef M target-ppc
>>
>> Patch is fairly small, but I don't spot anything immediately.
>
> The call to cpu_exec_init() appears to have been
> moved to inside an #if !defined(CONFIG_USER_ONLY) block...
Indeed, the following fixes it.
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 2b72f2d..82854a8 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -8927,12 +8927,15 @@ static void ppc_cpu_realizefn(DeviceState *dev,
Error **errp)
smp_threads, kvm_enabled() ? "KVM" : "TCG");
return;
}
+#endif
cpu_exec_init(&cpu->env, &local_err);
if (local_err != NULL) {
error_propagate(errp, local_err);
return;
}
+
+#if !defined(CONFIG_USER_ONLY)
cpu->cpu_dt_id = (cs->cpu_index / smp_threads) * max_smt
+ (cs->cpu_index % smp_threads);
#endif
Thanks,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)
next prev parent reply other threads:[~2015-07-08 18:53 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 17:16 [Qemu-devel] [PULL v2 00/22] QOM CPUState patch queue 2015-07-07 Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 01/22] cpu: No need to zero-initialize CPUState::numa_node Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 02/22] cpu: Initialize breakpoint/watchpoint lists in cpu_common_initfn() Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 03/22] cpu: Reorder cpu->as, cpu->thread_id, cpu->memory_dispatch init Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 04/22] cpu: Add Error argument to cpu_exec_init() Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 05/22] cpu: Convert cpu_index into a bitmap Andreas Färber
2015-07-08 19:07 ` Andreas Färber
2015-07-09 3:16 ` Bharata B Rao
2015-07-09 3:25 ` Peter Crosthwaite
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 06/22] target-ppc: Move cpu_exec_init() call to realize function Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 07/22] translate-all: Change tb_flush() env argument to cpu Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 08/22] gdbstub: Change gdbserver_fork() to accept cpu instead of env Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 09/22] cpu: Change tcg_cpu_exec() arg to cpu, not env Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 10/22] cpu: Change cpu_exec_init() " Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 11/22] cpu-exec: Purge all uses of ENV_GET_CPU() Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 12/22] cpu: Add wrapper for the set_pc() hook Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 13/22] gdbstub: Use cpu_set_pc() helper Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 14/22] hw/arm/boot: Use cpu_set_pc() Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 15/22] microblaze: boot: " Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 16/22] disas: Add print_insn to disassemble info Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 17/22] disas: QOMify target specific setup Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 18/22] disas: arm-a64: Make printfer and stream variable Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 19/22] disas: arm: QOMify target specific disas setup Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 20/22] disas: microblaze: " Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 21/22] disas: cris: Fix 0 buffer length case Andreas Färber
2015-07-07 17:16 ` [Qemu-devel] [PULL v2 22/22] disas: cris: QOMify target specific disas setup Andreas Färber
2015-07-08 11:33 ` [Qemu-devel] [PULL v2 00/22] QOM CPUState patch queue 2015-07-07 Peter Maydell
2015-07-08 17:39 ` Andreas Färber
2015-07-08 18:50 ` Peter Maydell
2015-07-08 18:53 ` Andreas Färber [this message]
2015-07-08 19:01 ` Peter Crosthwaite
2015-07-08 19:23 ` Peter Maydell
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=559D71BB.50202@suse.de \
--to=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=bharata@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--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).