[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for targe
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc |
Date: |
Mon, 29 Jun 2015 11:51:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 29/06/2015 11:30, Thomas Huth wrote:
> On Mon, 29 Jun 2015 09:52:56 +0200
> Laurent Vivier <address@hidden> wrote:
>
>>
>>
>> On 29/06/2015 07:36, David Gibson wrote:
>>> The "info irq" and "info pic" HMP commands are available on some, but not
>>> all targets, and what they do isn't terribly consistent. For SPARC and
>>> LM32 they do something platform specific, but for x86, powerpc, and MIPS
>>> they print some information from the i8259 (and only the i8259) interrupt
>>> controller.
>>>
>>> It's debatable whether these commands are any use at all, and we should
>>> probably make better, qdev aware ways of getting information from a
>>> machines PICs. However, those don't exist yet, so on x86 it's at least
>>> potentially useful to have these HMP commands. I can't speak for MIPS.
>>>
>>> For ppc, though, the i8259, if it exists at all, is usually just a
>>> secondary controller for legacy ISA. The only case where i8259 is the
>>> main system PIC on ppc is for the ancient and little-used PReP platform.
>>>
>>> So, even without QOM-ish replacement, the info pic and info irq HMP
>>> commands have no value on ppc.
>>>
>>> This patch, therefore, disables these commands for ppc targets. This will
>>> allow ppc builds which don't include PReP to not include ISA bus support
>>> either.
>>>
>>> Signed-off-by: David Gibson <address@hidden>
>>> ---
>>> monitor.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/monitor.c b/monitor.c
>>> index aeea2b5..8c56bfa 100644
>>> --- a/monitor.c
>>> +++ b/monitor.c
>>> @@ -2573,7 +2573,7 @@ static mon_cmd_t info_cmds[] = {
>>> .help = "show the command line history",
>>> .mhandler.cmd = hmp_info_history,
>>> },
>>> -#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_MIPS) ||
>>> \
>>> +#if defined(TARGET_I386) || defined(TARGET_MIPS) || \
>>> defined(TARGET_LM32) || (defined(TARGET_SPARC) &&
>>> !defined(TARGET_SPARC64))
>>> {
>>> .name = "irq",
>>>
>>
>> Perhaps we can a use a "#if defined(CONFIG_I8259) ||
>> defined(CONFIG_LM32) || (defined(TARGE_SPARC) &&
>> !defined(TARGET_SPARC64))" instead, so we keep the command for PReP ?
>
> AFAIK this currently won't work since CONFIG_I8259 is only defined for
> the Makefiles, but not for the C pre-processor :-(
Yes, I see that afterward, but ...
> So unless somebody fixes that first, I think David's approach is the
> only practicable solution right now.
if you add "config-devices.h" in GENERATED_HEADERS in Makefile.target,
and include "config-devices.h" in monitor.c, it works (all PREP
dependencies in default-configs/ppc64-softmmu.mak must be removed too)
But does this change acceptable for a tiny improvement ?
Laurent
- [Qemu-devel] [PATCH 0/4] Allow ISA bus support to be configured out, David Gibson, 2015/06/29
- [Qemu-devel] [PATCH 2/4] Allow ISA bus to be configured out, David Gibson, 2015/06/29
- [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc, David Gibson, 2015/06/29
- Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc, Laurent Vivier, 2015/06/29
- Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc, Thomas Huth, 2015/06/29
- Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc,
Laurent Vivier <=
- Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc, Laurent Vivier, 2015/06/29
- Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc, Andreas Färber, 2015/06/29
- Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc, Laurent Vivier, 2015/06/29
- Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc, Andreas Färber, 2015/06/29
- Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc, Andreas Färber, 2015/06/29
- Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc, Alexander Graf, 2015/06/29
- Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc, David Gibson, 2015/06/29
- Re: [Qemu-devel] [PATCH 4/4] Disable "info irq" and "info pic" for target-ppc, Thomas Huth, 2015/06/29
[Qemu-devel] [PATCH 1/4] Split serial-isa into its own config option, David Gibson, 2015/06/29