From patchwork Fri Jun 12 13:26:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 49826 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3A893214F3 for ; Fri, 12 Jun 2015 13:26:20 +0000 (UTC) Received: by laboh3 with SMTP id oh3sf10749188lab.0 for ; Fri, 12 Jun 2015 06:26:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=G4i2HZS7KpR7iYKIr1wOJFXw3QupJyZqy6llWNesXWc=; b=m3OKy9M1D9MHIraKFDlfmtMirgFf6Eh5fQtKoNJxJOeaMjLocPolJBcEBFjP74tSE8 G5lvDtja1mVC4CAtQA8cM+5udVRQnY2VC+DbxOjuesRzghxV+pt2TM8Zi0OcubN5zEtA xP9+sgYFEM2pDKQjrUxmyk8gFILSkai2kYqb2lyp0qcXsRRnxqy9dugNylCb3Zr8kWmZ 5wV27xzYyUgFRVj3Bi+RUIYqMltPxInCcW12Jyb5ZJEmRAN9AaL2jaRS0Ww8mVT9/iYQ zx+JXhFEtrrTaWd1N0K6uSJ+VInr0SueAMC3EDvRt6a9bysx/rqatS2x9xtwc3N5Q6sr KXuA== X-Gm-Message-State: ALoCoQmQN3AhXCVPECMyCbixAa5fYrEe1c81AGnQwt5GifUEHNYRUMvnMxw40tTFeYhgig5ZRYT0 X-Received: by 10.152.219.166 with SMTP id pp6mr14359765lac.1.1434115579068; Fri, 12 Jun 2015 06:26:19 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.196 with SMTP id a4ls47554lak.27.gmail; Fri, 12 Jun 2015 06:26:18 -0700 (PDT) X-Received: by 10.112.145.132 with SMTP id su4mr14826235lbb.85.1434115578918; Fri, 12 Jun 2015 06:26:18 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id mk5si3403975lbc.47.2015.06.12.06.26.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jun 2015 06:26:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbcue7 with SMTP id ue7so20090045lbc.0 for ; Fri, 12 Jun 2015 06:26:18 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr15538650lbc.32.1434115578832; Fri, 12 Jun 2015 06:26:18 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp565564lbb; Fri, 12 Jun 2015 06:26:18 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr14878910lac.41.1434115577922; Fri, 12 Jun 2015 06:26:17 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id z9si3394859lbu.81.2015.06.12.06.26.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Jun 2015 06:26:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1Z3OyO-0001t4-4l; Fri, 12 Jun 2015 14:26:16 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Markus Armbruster , Kevin Wolf , qemu-block@nongnu.org Subject: [PATCH 4/4] hw/arm/virt: Make block devices default to virtio Date: Fri, 12 Jun 2015 14:26:15 +0100 Message-Id: <1434115575-7214-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1434115575-7214-1-git-send-email-peter.maydell@linaro.org> References: <1434115575-7214-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Now we have virtio-pci, we can make the virt board's default block device type be IF_VIRTIO. This allows users to use simplified command lines that don't have to explicitly create virtio-pci-blk devices; the -hda &c very short options now also work. This means we also need to set no_cdrom to avoid getting a default cdrom device -- this is needed because the virtio-blk device will fail if it is connected to a block backend with no media, which is what the default cdrom device typically is. Providing a cdrom with media via -cdrom will still work. Signed-off-by: Peter Maydell --- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 1b1cc71..c42ca32 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -961,6 +961,8 @@ static void virt_class_init(ObjectClass *oc, void *data) mc->init = machvirt_init; mc->max_cpus = 8; mc->has_dynamic_sysbus = true; + mc->block_default_type = IF_VIRTIO; + mc->no_cdrom = 1; } static const TypeInfo machvirt_info = {