From: Anthony Liguori <anthony@codemonkey.ws>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 5/5] pc: remove bochs bios debug ports
Date: Wed, 12 Dec 2012 07:53:41 -0600 [thread overview]
Message-ID: <87ip878jh6.fsf@codemonkey.ws> (raw)
In-Reply-To: <1355303742-3263-6-git-send-email-kraxel@redhat.com>
Gerd Hoffmann <kraxel@redhat.com> writes:
> Prehistoric leftover, zap it. We poweroff via acpi these days.
>
> And having a port (0x501,0x502) where any random guest write will make
> qemu exit -- with no way to turn it off -- is a bad joke anyway. If
> anyone has a real use case for this (I can see this being useful for
> regression testing), then make it part of debugcon or testdev so it
> isn't present by default.
I use 0x501 for my test suite so please don't remove it blindly.
Regards,
Anthony Liguori
> ---
> hw/pc.c | 41 -----------------------------------------
> 1 files changed, 0 insertions(+), 41 deletions(-)
>
> diff --git a/hw/pc.c b/hw/pc.c
> index cc4b260..0997c72 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -524,34 +524,6 @@ static void handle_a20_line_change(void *opaque, int irq, int level)
> cpu_x86_set_a20(cpu, level);
> }
>
> -/***********************************************************/
> -/* Bochs BIOS debug ports */
> -
> -static void bochs_bios_write(void *opaque, uint32_t addr, uint32_t val)
> -{
> - static const char shutdown_str[8] = "Shutdown";
> - static int shutdown_index = 0;
> -
> - switch(addr) {
> - case 0x8900:
> - /* same as Bochs power off */
> - if (val == shutdown_str[shutdown_index]) {
> - shutdown_index++;
> - if (shutdown_index == 8) {
> - shutdown_index = 0;
> - qemu_system_shutdown_request();
> - }
> - } else {
> - shutdown_index = 0;
> - }
> - break;
> -
> - case 0x501:
> - case 0x502:
> - exit((val << 1) | 1);
> - }
> -}
> -
> int e820_add_entry(uint64_t address, uint64_t length, uint32_t type)
> {
> int index = le32_to_cpu(e820_table.count);
> @@ -569,14 +541,6 @@ int e820_add_entry(uint64_t address, uint64_t length, uint32_t type)
> return index;
> }
>
> -static const MemoryRegionPortio bochs_bios_portio_list[] = {
> - { 0x500, 1, 1, .write = bochs_bios_write, }, /* 0x500 */
> - { 0x501, 1, 1, .write = bochs_bios_write, }, /* 0x501 */
> - { 0x501, 2, 2, .write = bochs_bios_write, }, /* 0x501 */
> - { 0x8900, 1, 1, .write = bochs_bios_write, }, /* 0x8900 */
> - PORTIO_END_OF_LIST(),
> -};
> -
> static void *bochs_bios_init(void)
> {
> void *fw_cfg;
> @@ -584,11 +548,6 @@ static void *bochs_bios_init(void)
> size_t smbios_len;
> uint64_t *numa_fw_cfg;
> int i, j;
> - PortioList *bochs_bios_port_list = g_new(PortioList, 1);
> -
> - portio_list_init(bochs_bios_port_list, bochs_bios_portio_list,
> - NULL, "bochs-bios");
> - portio_list_add(bochs_bios_port_list, get_system_io(), 0x0);
>
> fw_cfg = fw_cfg_init(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 1, 0, 0);
>
> --
> 1.7.1
next prev parent reply other threads:[~2012-12-12 13:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 9:15 [Qemu-devel] [PATCH 0/5] acpi: misc updates Gerd Hoffmann
2012-12-12 9:15 ` [Qemu-devel] [PATCH 1/5] configure: also symlink *.aml files Gerd Hoffmann
2012-12-12 9:15 ` [Qemu-devel] [PATCH 2/5] acpi: autoload dsdt Gerd Hoffmann
2012-12-12 9:15 ` [Qemu-devel] [PATCH 3/5] apci: assign memory regions to piix4 acpi device Gerd Hoffmann
2012-12-12 9:15 ` [Qemu-devel] [PATCH 4/5] apci: assign memory regions to ich9 lpc device Gerd Hoffmann
2012-12-12 9:15 ` [Qemu-devel] [PATCH 5/5] pc: remove bochs bios debug ports Gerd Hoffmann
2012-12-12 13:53 ` Anthony Liguori [this message]
2012-12-12 15:23 ` [Qemu-devel] [PATCH] add isa-debug-exit device Gerd Hoffmann
2012-12-12 15:29 ` Paolo Bonzini
2012-12-12 16:05 ` Lucas Meneghel Rodrigues
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=87ip878jh6.fsf@codemonkey.ws \
--to=anthony@codemonkey.ws \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.