From patchwork Tue Jun 4 09:45:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 248518 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3F09C2C0096 for ; Tue, 4 Jun 2013 19:46:29 +1000 (EST) Received: from localhost ([::1]:45390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ujnox-0004g3-Ck for incoming@patchwork.ozlabs.org; Tue, 04 Jun 2013 05:46:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjnoA-0004c9-1O for qemu-devel@nongnu.org; Tue, 04 Jun 2013 05:45:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ujno8-0001u8-P3 for qemu-devel@nongnu.org; Tue, 04 Jun 2013 05:45:37 -0400 Received: from mail-bk0-x22f.google.com ([2a00:1450:4008:c01::22f]:57435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ujno8-0001tx-Hz for qemu-devel@nongnu.org; Tue, 04 Jun 2013 05:45:36 -0400 Received: by mail-bk0-f47.google.com with SMTP id jg9so2138705bkc.34 for ; Tue, 04 Jun 2013 02:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=SFMNx6oj0ffRvpZJEx0EQnNqfge7dH636IAbiDMqhTM=; b=FMhnuWBx/RyJ4yRrvqHwhPPCKaeR7euV67UioI0Z+/a4xmwnu7+hgv52SgvwePlUxy qNta3wlD4s0i/l00Klu9w8MfE8qv7cZe77O/ZBT0ROdPky85ykCgYwR6SPRcsw15SlH/ UfL+N81TDIx2aKz5KlVwPDI6814KY6VKGylaV8bKVR1C+X2/tu2upEZ8RCFTqxuP0k6f 7C8dZCMVLtsy2H4cA2tCKxJwgdRhWA5cw7nTc1u2NWVx1zR+wUQwYtwAgIWrQdpj08AC gCtdqJ2tXBiWo0R/b5yVvjRxjRD1amYO+s+HVdd788ycLGe08a256e3tk1H21k1hPvRF WH3w== X-Received: by 10.205.8.67 with SMTP id or3mr7821131bkb.172.1370339135694; Tue, 04 Jun 2013 02:45:35 -0700 (PDT) Received: from playground.lan (net-37-116-217-184.cust.dsl.vodafone.it. [37.116.217.184]) by mx.google.com with ESMTPSA id hh3sm9481944bkc.5.2013.06.04.02.45.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 04 Jun 2013 02:45:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 4 Jun 2013 11:45:25 +0200 Message-Id: <1370339127-1212-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1370339127-1212-1-git-send-email-pbonzini@redhat.com> References: <1370339127-1212-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4008:c01::22f Cc: Jordan Justen , armbru@redhat.com Subject: [Qemu-devel] [PATCH v2 1/3] sysfw: remove read-only pc_sysfw_flash_vs_rom_bug_compatible 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 The variable is not written anymore. This cleans up after 9e1c2ec (which accidentally left variable pc_sysfw_flash_vs_rom_bug_compatible behind, value always zero), and buries dead code from commit dafb82e (which resurrected the pc_sysfw code for pc_sysfw_flash_vs_rom_bug_compatible by mistake). Signed-off-by: Paolo Bonzini --- v1->v2 adds info to this commit message. hw/block/pc_sysfw.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/hw/block/pc_sysfw.c b/hw/block/pc_sysfw.c index 412d1b0..c6d4be4 100644 --- a/hw/block/pc_sysfw.c +++ b/hw/block/pc_sysfw.c @@ -199,12 +199,6 @@ static void old_pc_system_rom_init(MemoryRegion *rom_memory, bool isapc_ram_fw) bios); } -/* - * Bug-compatible flash vs. ROM selection enabled? - * A few older machines enable this. - */ -bool pc_sysfw_flash_vs_rom_bug_compatible; - void pc_system_firmware_init(MemoryRegion *rom_memory) { DriveInfo *pflash_drv; @@ -222,25 +216,7 @@ void pc_system_firmware_init(MemoryRegion *rom_memory) pflash_drv = drive_get(IF_PFLASH, 0, 0); - if (pc_sysfw_flash_vs_rom_bug_compatible) { - /* - * This is a Bad Idea, because it makes enabling/disabling KVM - * guest-visible. Do it only in bug-compatibility mode. - */ - if (kvm_enabled()) { - if (pflash_drv != NULL) { - fprintf(stderr, "qemu: pflash cannot be used with kvm enabled\n"); - exit(1); - } else { - /* In old pc_sysfw_flash_vs_rom_bug_compatible mode, we assume - * that KVM cannot execute from device memory. In this case, we - * use old rom based firmware initialization for KVM. But, since - * this is different from non-kvm mode, this behavior is - * undesirable */ - sysfw_dev->rom_only = 1; - } - } - } else if (pflash_drv == NULL) { + if (pflash_drv == NULL) { /* When a pflash drive is not found, use rom-mode */ sysfw_dev->rom_only = 1; } else if (kvm_enabled() && !kvm_readonly_mem_enabled()) {