From patchwork Sun Dec 16 21:52:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 10732579 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A67F14E5 for ; Sun, 16 Dec 2018 21:53:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECBF829A77 for ; Sun, 16 Dec 2018 21:53:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE5B429AFD; Sun, 16 Dec 2018 21:53:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4247C29A77 for ; Sun, 16 Dec 2018 21:53:31 +0000 (UTC) Received: from localhost ([::1]:43939 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gYeLq-0002xk-Fr for patchwork-qemu-devel@patchwork.kernel.org; Sun, 16 Dec 2018 16:53:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gYeKr-0002wM-Mb for qemu-devel@nongnu.org; Sun, 16 Dec 2018 16:52:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gYeKn-0004DH-Ky for qemu-devel@nongnu.org; Sun, 16 Dec 2018 16:52:29 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:52769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gYeKn-0004D3-Ep for qemu-devel@nongnu.org; Sun, 16 Dec 2018 16:52:25 -0500 Received: by mail-wm1-f67.google.com with SMTP id m1so10522512wml.2 for ; Sun, 16 Dec 2018 13:52:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=kgRZanU+JLhIEdZjxxKGyOAUjWGshNd9jI6riEnXuic=; b=o8Isc6XiTcaXeao4zgqWHiVmCKlbEjcOd83Y8/7KCSei0jkMB9TcYZteAR2+tJE075 O/SiGiw1WTxO9gyduD9iHgRnqJm8rOS1okHkFf+hY7Q9zKSlEXPWhGbDuqd6vR00FShj 10/3owHWYxlPf4hNEWHerqcq13cf5r9utYSOCF8lZYLIv2FDJeLK8Bb2dqCsDcFQZOlo KujR58+e4ADPMaxkqCvtYerl9fXs8FBjNhPdDr6RjobsEoK/uEvRzr8rzUfALa1GBvYH qQojheVkVburv9W2AQOTtk5CxRyEP5kvNdM+IJ+xksQqB/s8iP5A/CzCRGn3PRbpcTPf 1d8w== X-Gm-Message-State: AA+aEWaWPKBh9MjKrpSDPTwekmg24cE0hYt4SeYr5Cx1cBqe7Rd3wXgP 6NdGcKTiJbgQc1RgUPywQhO93Ht/ X-Google-Smtp-Source: AFSGD/UAyTIIPMbwuawYw24RTuA7NQH4as9CPBFRVHhA+KHKqCZatjNPYRLD01U6kdTUj+4NvMV4Lw== X-Received: by 2002:a1c:709:: with SMTP id 9mr9570396wmh.39.1544997144116; Sun, 16 Dec 2018 13:52:24 -0800 (PST) Received: from localhost.localdomain (x2f7f535.dyn.telefonica.de. [2.247.245.53]) by smtp.gmail.com with ESMTPSA id u204sm9782264wmu.30.2018.12.16.13.52.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 16 Dec 2018 13:52:23 -0800 (PST) From: Thomas Huth To: Mark Cave-Ayland , qemu-devel@nongnu.org Date: Sun, 16 Dec 2018 22:52:10 +0100 Message-Id: <20181216215210.29088-1-huth@tuxfamily.org> X-Mailer: git-send-email 2.17.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.128.67 Subject: [Qemu-devel] [PATCH] hw/sparc64: Create VGA device only if it has really been requested X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The sun4u/sun4v machine currently always creates a VGA device, even if the user started QEMU with "-nodefaults" or "-vga none". That's likely not what the users expect in this case, so add a check whether the VGA adapter has really been requested. Signed-off-by: Thomas Huth --- hw/sparc64/sun4u.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index f76b19e4e9..ce7236c322 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -596,7 +596,15 @@ static void sun4uv_init(MemoryRegion *address_space_mem, qdev_connect_gpio_out_named(DEVICE(ebus), "isa-irq", 4, qdev_get_gpio_in_named(DEVICE(sabre), "pbm-irq", OBIO_SER_IRQ)); - pci_dev = pci_create_simple(pci_busA, PCI_DEVFN(2, 0), "VGA"); + switch (vga_interface_type) { + case VGA_STD: + pci_create_simple(pci_busA, PCI_DEVFN(2, 0), "VGA"); + break; + case VGA_NONE: + break; + default: + abort(); /* Should not happen - types are checked in vl.c already */ + } memset(&macaddr, 0, sizeof(MACAddr)); onboard_nic = false;