From patchwork Wed Feb 26 12:34:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 25348 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8BD98203C4 for ; Wed, 26 Feb 2014 12:36:38 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id a41sf2196259yho.8 for ; Wed, 26 Feb 2014 04:36:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id :mime-version:cc:subject:precedence:list-id:list-unsubscribe :list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=HtTYy5+KQiUsnVaWuT60XsecF79xvKraqqCUO//+Cow=; b=QYKJ/UvazAdAaAudieq5XJ1LG/qvCs5+FFsl5FyjwhuVJ9/mRC1yvlqixR8lGvnQg1 9dGQjn0Z9Yr6vJRgQsYTOCU8kYYecWEa0xoGXbxVyGr0S6Y8Kyt2BZn2VKgsQSrH+6/N TqKAz3Zq0lcwq4P9dKyxKjQ62zDCzoNyVUxBEN3GCzsqvF0GQTuAF1jsallG83TIGE8B GmZ/1eylApaJI9EZJHbpDl6uASQurlrbpSmORhynKfVkqId9ySaJSJLy/hxTojDRe79P ZWUmE2uHRgGCMpanXZ75XMLp4+a/si6yO8jzmUS6z/rwZMF0Zl+PxQqG0XokfsSXrl4A eNcQ== X-Gm-Message-State: ALoCoQm0qhdqC1l3wKo7ZvdAtzaDEQMR9UizSOe2Z0+1j9/+UBzV0cHusnuamXx/0K2p9j2JOgqY X-Received: by 10.236.118.38 with SMTP id k26mr2295743yhh.35.1393418198364; Wed, 26 Feb 2014 04:36:38 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.39.202 with SMTP id v68ls185889qgv.88.gmail; Wed, 26 Feb 2014 04:36:38 -0800 (PST) X-Received: by 10.58.170.69 with SMTP id ak5mr5939711vec.28.1393418198280; Wed, 26 Feb 2014 04:36:38 -0800 (PST) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id ke3si188090veb.27.2014.02.26.04.36.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Feb 2014 04:36:36 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.170 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.170; Received: by mail-ve0-f170.google.com with SMTP id pa12so490227veb.29 for ; Wed, 26 Feb 2014 04:36:36 -0800 (PST) X-Received: by 10.52.190.1 with SMTP id gm1mr4932047vdc.21.1393418196063; Wed, 26 Feb 2014 04:36:36 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp22377vcz; Wed, 26 Feb 2014 04:36:35 -0800 (PST) X-Received: by 10.52.189.33 with SMTP id gf1mr5005953vdc.26.1393418195646; Wed, 26 Feb 2014 04:36:35 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id l4si179676vch.129.2014.02.26.04.36.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 26 Feb 2014 04:36:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WIdgu-0006v2-F8; Wed, 26 Feb 2014 12:34:24 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WIdgt-0006ux-Go for xen-devel@lists.xen.org; Wed, 26 Feb 2014 12:34:23 +0000 Received: from [85.158.137.68:55139] by server-15.bemta-3.messagelabs.com id 0A/40-19263-E4FDD035; Wed, 26 Feb 2014 12:34:22 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-2.tower-31.messagelabs.com!1393418059!953834!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16302 invoked from network); 26 Feb 2014 12:34:21 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-2.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 26 Feb 2014 12:34:21 -0000 X-IronPort-AV: E=Sophos;i="4.97,547,1389744000"; d="scan'208";a="104251920" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 26 Feb 2014 12:34:19 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.2.342.4; Wed, 26 Feb 2014 07:34:18 -0500 Received: from marilith-n13-p0.uk.xensource.com ([10.80.229.115] helo=marilith-n13.uk.xensource.com.) by norwich.cam.xci-test.com with esmtp (Exim 4.72) (envelope-from ) id 1WIdgo-0003FB-Q4; Wed, 26 Feb 2014 12:34:18 +0000 From: Ian Campbell To: , , Jim Fehlig Date: Wed, 26 Feb 2014 12:34:17 +0000 Message-ID: <1393418058-14113-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-DLP: MIA1 Cc: julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com Subject: [Xen-devel] [PATCH LIBVIRT] libxl: Recognise ARM architectures X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Only tested on v7 but the v8 equivalent seems pretty obvious. XEN_CAP_REGEX already accepts more than it should (e.g. x86_64p or x86_32be) but I have stuck with the existing pattern. With this I can create a guest from: libvirt-test 6343998e-9eda-11e3-98f6-77252a7d02f3 393216 393216 1 linux /boot/vmlinuz-arm-native console=hvc0 earlyprintk debug root=/dev/xvda1 destroy restart destroy Using virsh create and I can destroy it too. Currently virsh console fails with: Connected to domain libvirt-test Escape character is ^] error: internal error: cannot find character device I haven't investigated yet. Signed-off-by: Ian Campbell --- src/libxl/libxl_conf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 4cefadf..7ed692d 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -61,7 +61,7 @@ struct guest_arch { int ia64_be; }; -#define XEN_CAP_REGEX "(xen|hvm)-[[:digit:]]+\\.[[:digit:]]+-(x86_32|x86_64|ia64|powerpc64)(p|be)?" +#define XEN_CAP_REGEX "(xen|hvm)-[[:digit:]]+\\.[[:digit:]]+-(aarch64|armv7l|x86_32|x86_64|ia64|powerpc64)(p|be)?" static virClassPtr libxlDriverConfigClass; @@ -319,8 +319,11 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps) } else if (STRPREFIX(&token[subs[2].rm_so], "powerpc64")) { arch = VIR_ARCH_PPC64; + } else if (STRPREFIX(&token[subs[2].rm_so], "armv7l")) { + arch = VIR_ARCH_ARMV7L; + } else if (STRPREFIX(&token[subs[2].rm_so], "aarch64")) { + arch = VIR_ARCH_AARCH64; } else { - /* XXX arm ? */ continue; }