From patchwork Fri Nov 15 19:53:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clark Laughlin X-Patchwork-Id: 21544 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EF5B923FBA for ; Fri, 15 Nov 2013 19:56:08 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id to1sf8603598ieb.5 for ; Fri, 15 Nov 2013 11:56:08 -0800 (PST) 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=jMo6MoBnJIAjtPvY6w7lDF1v2icLdDFFNja9HERSerI=; b=dDnK06BCswB11XSRE8/q0X5qboH2wpPu2mMCx5Jx3JxcIVqp8UY+nsaQZ7yQhWOAzE GP8YakPnF/vXV3A//FHkyGRI7phDzmtfYWT2b9wjyfG3CN0nmmpxSMhZuVCeznnhpt3x pLYBDqiqaOrDeunhkqMIzoheM0D8VPwcYG7rZytDnnUsfJDDt6MVvSgaSDPObHemze+p 0n9nNGXcohhr3AttBCKC602gNoX2RwdGTarrGvgKaJ0jjbSbRI8NDaKzCTwdDemuoZlM mZ3EA4Typq6y3v0yjmdxz3/xGadFxJvb7fktp1okAUqZImGOqFsgXbsXTqA1y6xCPr1g CDJw== X-Gm-Message-State: ALoCoQnJOgCiPUyvCplM9Yr1TUMqa8VkA9sZvkeByJvodUDsF0v7uIhV2s8qoesAFftl08GBw5yv X-Received: by 10.182.126.137 with SMTP id my9mr3548528obb.13.1384545368048; Fri, 15 Nov 2013 11:56:08 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.209 with SMTP id x17ls1608578qeu.83.gmail; Fri, 15 Nov 2013 11:56:07 -0800 (PST) X-Received: by 10.58.100.244 with SMTP id fb20mr5461555veb.6.1384545367878; Fri, 15 Nov 2013 11:56:07 -0800 (PST) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id g6si2120147vdw.80.2013.11.15.11.56.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Nov 2013 11:56:07 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id jy13so3326506veb.37 for ; Fri, 15 Nov 2013 11:56:07 -0800 (PST) X-Received: by 10.220.175.18 with SMTP id v18mr654135vcz.48.1384545367774; Fri, 15 Nov 2013 11:56:07 -0800 (PST) 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.220.174.196 with SMTP id u4csp52697vcz; Fri, 15 Nov 2013 11:56:07 -0800 (PST) X-Received: by 10.60.42.72 with SMTP id m8mr8784266oel.64.1384545366915; Fri, 15 Nov 2013 11:56:06 -0800 (PST) Received: from mail-oa0-f52.google.com (mail-oa0-f52.google.com [209.85.219.52]) by mx.google.com with ESMTPS id jw1si4623502oeb.132.2013.11.15.11.56.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Nov 2013 11:56:06 -0800 (PST) Received-SPF: neutral (google.com: 209.85.219.52 is neither permitted nor denied by best guess record for domain of clark.laughlin@linaro.org) client-ip=209.85.219.52; Received: by mail-oa0-f52.google.com with SMTP id o6so4427106oag.39 for ; Fri, 15 Nov 2013 11:56:06 -0800 (PST) X-Received: by 10.182.220.225 with SMTP id pz1mr8496447obc.51.1384545366250; Fri, 15 Nov 2013 11:56:06 -0800 (PST) Received: from localhost.localdomain (c-98-197-6-227.hsd1.tx.comcast.net. [98.197.6.227]) by mx.google.com with ESMTPSA id ee7sm7306763oeb.5.2013.11.15.11.56.03 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Nov 2013 11:56:05 -0800 (PST) From: Clark Laughlin To: libvir-list@redhat.com Cc: patches@linaro.org, Clark Laughlin Subject: [RESEND PATCH] qemu: Add support for virt machine type with virtio-mmio devices on armv7 Date: Fri, 15 Nov 2013 19:53:51 +0000 Message-Id: <1384545231-23016-1-git-send-email-clark.laughlin@linaro.org> X-Mailer: git-send-email 1.8.1.2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: clark.laughlin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , These changes allow the correct virtio-blk-device and virtio-net-device devices to be used for the 'virt' machine type for armv7 rather than the PCI virtio devices. Signed-off-by: Clark Laughlin --- Resend, with signed-off-by added and updated subject. --- src/qemu/qemu_command.c | 4 +++- src/qemu/qemu_domain.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 63e235d..901120e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1335,12 +1335,14 @@ cleanup: return ret; } + static int qemuDomainAssignARMVirtioMMIOAddresses(virDomainDefPtr def, virQEMUCapsPtr qemuCaps) { if (def->os.arch == VIR_ARCH_ARMV7L && - STRPREFIX(def->os.machine, "vexpress-") && + (STRPREFIX(def->os.machine, "vexpress-") || + STREQ(def->os.machine, "virt")) && virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MMIO)) { qemuDomainPrimeVirtioDeviceAddresses( def, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 81d0ba9..346fec3 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -797,6 +797,9 @@ qemuDomainDefaultNetModel(const virDomainDef *def) if (STREQ(def->os.machine, "versatilepb")) return "smc91c111"; + if (STREQ(def->os.machine, "virt")) + return "virtio"; + /* Incomplete. vexpress (and a few others) use this, but not all * arm boards */ return "lan9118";