From: Thomas Huth <thuth@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, qemu-devel@nongnu.org
Cc: "Alexander Graf" <agraf@suse.de>,
"Markus Armbruster" <armbru@redhat.com>,
"Luiz Capitulino" <lcapitulino@redhat.com>,
qemu-ppc@nongnu.org, "Andreas Färber" <afaerber@suse.de>,
"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH qemu 2/2] target-ppc: Define get_monitor_def
Date: Thu, 06 Aug 2015 09:07:15 +0200 [thread overview]
Message-ID: <55C307A3.3010208@redhat.com> (raw)
In-Reply-To: <55C3060C.8010108@ozlabs.ru>
On 06/08/15 09:00, Alexey Kardashevskiy wrote:
> On 08/06/2015 04:33 PM, Thomas Huth wrote:
>> On 06/08/15 07:25, Alexey Kardashevskiy wrote:
>>> At the moment get_monitor_def() prints only registers from monitor_defs.
>>> However there is a lot of BOOK3S SPRs which are not in the list and
>>> cannot be printed.
>>>
>>> This makes use of the new get_monitor_def() callback and prints all
>>> registered SPRs and fails on unregistered ones proving the user
>>> information on what is actually supported in the running CPU.
>>>
>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>> ---
>>> monitor.c | 215
>>> +-------------------------------------------
>>> target-ppc/cpu-qom.h | 2 +
>>> target-ppc/translate.c | 72 +++++++++++++++
>>> target-ppc/translate_init.c | 1 +
>>> 4 files changed, 76 insertions(+), 214 deletions(-)
>> ...
>>> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
>>> index 84c5cea..f4acafb 100644
>>> --- a/target-ppc/translate.c
>>> +++ b/target-ppc/translate.c
>>> @@ -11401,6 +11401,78 @@ void ppc_cpu_dump_statistics(CPUState *cs,
>>> FILE*f,
>>> #endif
>>> }
>>>
>>> +static int ppc_cpu_get_reg(target_ulong *regs, const char *numstr,
>>> int maxnum,
>>> + uint64_t *pval)
>>
>> Don't you break the 32-bit QEMU (ppc-softmmu instead of ppc64-softmmu)
>> here? Since pval is uint64_t but the registers are target_ulong = 32
>> bit ?
>
>
> I cannot see how I break it - 64bit is enough for both, 32bit will just
> have upper bits set to zero.
Ah, stupid me, I somehow mixed up the pval and the regs pointer ...
never mind!
Thomas
next prev parent reply other threads:[~2015-08-06 7:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 5:25 [Qemu-devel] [PATCH qemu 0/2] monitor/ppc: Print correct SPRs Alexey Kardashevskiy
2015-08-06 5:25 ` [Qemu-devel] [PATCH qemu 1/2] monitor: Add CPU class callback to read registers for monitor Alexey Kardashevskiy
2015-08-12 1:12 ` David Gibson
2015-08-06 5:25 ` [Qemu-devel] [PATCH qemu 2/2] target-ppc: Define get_monitor_def Alexey Kardashevskiy
2015-08-06 6:33 ` Thomas Huth
2015-08-06 7:00 ` Alexey Kardashevskiy
2015-08-06 7:07 ` Thomas Huth [this message]
2015-08-12 1:21 ` David Gibson
2015-08-13 15:52 ` [Qemu-devel] [PATCH qemu v2] " Alexey Kardashevskiy
2015-08-13 22:39 ` David Gibson
2015-08-14 3:34 ` [Qemu-devel] [PATCH qemu v3] " Alexey Kardashevskiy
2015-09-07 1:26 ` Alexey Kardashevskiy
2015-09-23 3:40 ` David Gibson
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=55C307A3.3010208@redhat.com \
--to=thuth@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=armbru@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).