qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Julien Grall <julien.grall@citrix.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"afaerber@suse.de" <afaerber@suse.de>,
	"kraxel@redhat.com" <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] pc: Don't listen on debug ports by default
Date: Tue, 11 Sep 2012 17:19:04 +0300	[thread overview]
Message-ID: <504F4858.6060106@redhat.com> (raw)
In-Reply-To: <504F4688.2090201@siemens.com>

On 09/11/2012 05:11 PM, Jan Kiszka wrote:
> On 2012-09-11 14:53, Avi Kivity wrote:
>> On 09/11/2012 02:57 PM, Jan Kiszka wrote:
>> 
>>> Only listen on debug ports when we also handle them. They are better
>>> handled by debugcon these days which is runtime configurable.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>> ---
>>>  hw/pc.c |    6 ++++--
>>>  1 files changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/hw/pc.c b/hw/pc.c
>>> index 112739a..134d5f7 100644
>>> --- a/hw/pc.c
>>> +++ b/hw/pc.c
>>> @@ -539,12 +539,12 @@ static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val)
>>>      case 0x401:
>>>          /* used to be panic, now unused */
>>>          break;
>>> +#ifdef DEBUG_BIOS
>>>      case 0x402:
>>>      case 0x403:
>>> -#ifdef DEBUG_BIOS
>>>          fprintf(stderr, "%c", val);
>>> -#endif
>>>          break;
>>> +#endif
>>>      case 0x8900:
>>>          /* same as Bochs power off */
>>>          if (val == shutdown_str[shutdown_index]) {
>>> @@ -598,8 +598,10 @@ static void *bochs_bios_init(void)
>>>  
>>>      register_ioport_write(0x400, 1, 2, bochs_bios_write, NULL);
>>>      register_ioport_write(0x401, 1, 2, bochs_bios_write, NULL);
>>> +#ifdef DEBUG_BIOS
>>>      register_ioport_write(0x402, 1, 1, bochs_bios_write, NULL);
>>>      register_ioport_write(0x403, 1, 1, bochs_bios_write, NULL);
>>> +#endif
>>>      register_ioport_write(0x8900, 1, 1, bochs_bios_write, NULL);
>>>  
>>>      register_ioport_write(0x501, 1, 1, bochs_bios_write, NULL);
>>>
>> 
>> 
>> Why not drop DEBUG_BIOS completely?  If you want to debug the bios, use
>> debugcon.
> 
> Probably true. There is more practically dead stuff below this that just
> prints if DEBUG_BIOS is enabled.

Actually it is autotest that is at fault here.  It is installing a
debugcon with non-standard iobase atop a builtin device.
Pre-memory-API, we did not detect that.

We can subclass isa-debugcon as bochs-debugcon, change the default
ioport to 0x402, and use that instead of the code in pc.c.  How does
that sound?

Autotest will need to be changed to use the new device type.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2012-09-11 14:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04 15:13 [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 1/8] isa: add isa_address_space_io Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 2/8] hw/apm.c: replace register_ioport* Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 3/8] smb: replace_register_ioport* Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport* Julien Grall
2012-09-09 14:22   ` Avi Kivity
2012-09-10 10:37     ` Julien Grall
2012-09-10 10:44       ` Avi Kivity
2012-09-10 17:27         ` Julien Grall
2012-09-10 17:29           ` Jan Kiszka
2012-09-10 17:41             ` Stefano Stabellini
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 5/8] hw/cirrus_vga.c: " Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 6/8] hw/serial.c: " Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 7/8] hw/pc.c: " Julien Grall
2012-09-04 15:13 ` [Qemu-devel] [PATCH V9 8/8] hw/dma.c: " Julien Grall
2012-09-04 22:04 ` [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration Julien Grall
2012-09-10 17:53 ` [Qemu-devel] [PATCH V9 4/8] hw/acpi_piix4.c: replace register_ioport* Julien Grall
2012-09-11  9:15 ` [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration Avi Kivity
2012-09-11  9:25   ` Avi Kivity
2012-09-11 11:27     ` Julien Grall
2012-09-11 11:48       ` Jan Kiszka
2012-09-11 11:57         ` [Qemu-devel] [PATCH] pc: Don't listen on debug ports by default Jan Kiszka
2012-09-11 12:14           ` Julien Grall
2012-09-11 12:19             ` Jan Kiszka
2012-09-11 12:53           ` Avi Kivity
2012-09-11 14:11             ` Jan Kiszka
2012-09-11 14:19               ` Avi Kivity [this message]
2012-09-11 14:26                 ` Jan Kiszka
2012-09-11 14:34                   ` Andreas Färber
2012-09-19 10:08 ` [Qemu-devel] [PATCH V9 0/8] memory: unify ioport registration Avi Kivity

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=504F4858.6060106@redhat.com \
    --to=avi@redhat.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=afaerber@suse.de \
    --cc=jan.kiszka@siemens.com \
    --cc=julien.grall@citrix.com \
    --cc=kraxel@redhat.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).