From patchwork Thu Oct 10 11:40:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PranavkumarSawargaonkar X-Patchwork-Id: 20934 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5DAB025C9D for ; Thu, 10 Oct 2013 11:41:05 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id g12sf8032493oah.1 for ; Thu, 10 Oct 2013 04:41:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state: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=nsKfMWDnqbPkihqmCrxG3d3MW75C1nqkbeGgR28aBdU=; b=ETTkBmCXi1l1M/4+UArO83CPNaFFiWYFxO5VNEZH1JNZsWW//zJwaprRnh0A2nikgN d/lGWHEHTC6umhNh4Oc3oSrDZc36EUeSPR2CWe9WZS31iYI6qqTmEiwXlahpXxdOdDP3 04RqxjHATdrK/UuKs/EBjAIEwNE36seZv5AK5p71zXOH3zYYYbfmubEIKgcWb0rwp44p /7Mn9HIvjTJIPh7qkxdGSXmkMGouGBGk2kk+mtX4db3FrChzGho6b7a48hyIVsVOGtTP rRi1GEtEVALYwQ33/79HW7RmZp7iArIqkxz2OE6mymmfFkPFt4Gd0WUuQXOy3uh/V4X7 8yoA== X-Received: by 10.43.151.16 with SMTP id kq16mr6104979icc.22.1381405264681; Thu, 10 Oct 2013 04:41:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.15.198 with SMTP id z6ls1019279qec.63.gmail; Thu, 10 Oct 2013 04:41:04 -0700 (PDT) X-Received: by 10.220.67.196 with SMTP id s4mr6009565vci.68.1381405264458; Thu, 10 Oct 2013 04:41:04 -0700 (PDT) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by mx.google.com with ESMTPS id ee8si14043474vdc.80.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 04:41:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.45 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.45; Received: by mail-vb0-f45.google.com with SMTP id e15so1469713vbg.4 for ; Thu, 10 Oct 2013 04:41:03 -0700 (PDT) X-Gm-Message-State: ALoCoQk62rVtS/RSMPOeSmBem8gWJin6Znqi92EljMUKy2qRvd7d1xDDZeQG+XSl9MfSj/grX97e X-Received: by 10.52.116.74 with SMTP id ju10mr10534485vdb.20.1381405263339; Thu, 10 Oct 2013 04:41:03 -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.220.174.196 with SMTP id u4csp368169vcz; Thu, 10 Oct 2013 04:41:02 -0700 (PDT) X-Received: by 10.66.228.38 with SMTP id sf6mr15112561pac.21.1381405261580; Thu, 10 Oct 2013 04:41:01 -0700 (PDT) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id hk5si35325766pac.9.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 04:41:01 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of pranavkumar@linaro.org) client-ip=209.85.160.51; Received: by mail-pb0-f51.google.com with SMTP id jt11so2415991pbb.24 for ; Thu, 10 Oct 2013 04:41:01 -0700 (PDT) X-Received: by 10.66.216.193 with SMTP id os1mr15183725pac.29.1381405261031; Thu, 10 Oct 2013 04:41:01 -0700 (PDT) Received: from pnqlab006.amcc.com ([182.73.239.130]) by mx.google.com with ESMTPSA id xn12sm61946048pac.12.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 04:41:00 -0700 (PDT) From: Pranavkumar Sawargaonkar To: libvirt-list@redhat.com Cc: patches@linaro.org, crobinso@redhat.com, berrange@redhat.com, anup.patel@linaro.org, Pranavkumar Sawargaonkar Subject: [PATCH] AArch64: Porting of armv7l conditons to run qemu for aarch64. Date: Thu, 10 Oct 2013 17:10:41 +0530 Message-Id: <1381405241-32434-1-git-send-email-pranavkumar@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pranavkumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.45 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: , AArch64 qemu has similar behavior as armv7l, like use of mmio etc. This patch adds similar bypass checks what we have for armv7l to aarch64. E.g. we are enabling mmio transport for Nicdev. Making addDefaultUSB and addDefaultMemballoon to false etc. Signed-off-by: Anup Patel Signed-off-by: Pranavkumar Sawargaonkar --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_command.c | 8 +++++--- src/qemu/qemu_domain.c | 5 ++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 1eae4ba..74a1690 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2872,7 +2872,7 @@ virQEMUCapsSupportsChardev(virDomainDefPtr def, !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) return false; - if (def->os.arch != VIR_ARCH_ARMV7L) + if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64)) return true; /* This may not be true for all ARM machine types, but at least diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 22cc5f2..1c4de84 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -427,7 +427,8 @@ qemuDomainSupportsNicdev(virDomainDefPtr def, return false; /* non-virtio ARM nics require legacy -net nic */ - if (def->os.arch == VIR_ARCH_ARMV7L && + if (((def->os.arch == VIR_ARCH_ARMV7L) || + (def->os.arch == VIR_ARCH_AARCH64)) && net->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO) return false; @@ -1339,7 +1340,8 @@ static int qemuDomainAssignARMVirtioMMIOAddresses(virDomainDefPtr def, virQEMUCapsPtr qemuCaps) { - if (def->os.arch == VIR_ARCH_ARMV7L && + if (((def->os.arch == VIR_ARCH_ARMV7L) || + (def->os.arch == VIR_ARCH_AARCH64)) && STRPREFIX(def->os.machine, "vexpress-") && virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MMIO)) { qemuDomainPrimeVirtioDeviceAddresses( @@ -1870,7 +1872,7 @@ cleanup: static bool qemuDomainSupportsPCI(virDomainDefPtr def) { - if (def->os.arch != VIR_ARCH_ARMV7L) + if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64)) return true; if (STREQ(def->os.machine, "versatilepb")) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 968e323..f4986d7 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -727,7 +727,10 @@ qemuDomainDefPostParse(virDomainDefPtr def, addDefaultUSB = false; addDefaultMemballoon = false; break; - + case VIR_ARCH_AARCH64: + addDefaultUSB = false; + addDefaultMemballoon = false; + break; case VIR_ARCH_ALPHA: case VIR_ARCH_PPC: case VIR_ARCH_PPC64: