From patchwork Wed Dec 19 08:46:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 207260 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 931E52C0087 for ; Wed, 19 Dec 2012 19:46:43 +1100 (EST) Received: from localhost ([::1]:43751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlFIX-00031A-Nc for incoming@patchwork.ozlabs.org; Wed, 19 Dec 2012 03:46:41 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlFI9-0002mG-OQ for qemu-devel@nongnu.org; Wed, 19 Dec 2012 03:46:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlFI6-0007sO-9Z for qemu-devel@nongnu.org; Wed, 19 Dec 2012 03:46:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlFI6-0007rs-0t for qemu-devel@nongnu.org; Wed, 19 Dec 2012 03:46:14 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBJ8kDnq010227 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 19 Dec 2012 03:46:13 -0500 Received: from rincewind.home.kraxel.org (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBJ8kCFa004234; Wed, 19 Dec 2012 03:46:12 -0500 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 7A6F641751; Wed, 19 Dec 2012 09:46:10 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 19 Dec 2012 09:46:10 +0100 Message-Id: <1355906770-17199-9-git-send-email-kraxel@redhat.com> In-Reply-To: <1355906770-17199-1-git-send-email-kraxel@redhat.com> References: <1355906770-17199-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 8/8] pc: remove bochs bios debug ports X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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. Signed-off-by: Gerd Hoffmann --- 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);