From patchwork Mon Jun 26 18:01:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 106375 Delivered-To: patch@linaro.org Received: by 10.140.101.48 with SMTP id t45csp282402qge; Mon, 26 Jun 2017 11:09:20 -0700 (PDT) X-Received: by 10.55.127.199 with SMTP id a190mr2045763qkd.100.1498500560467; Mon, 26 Jun 2017 11:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498500560; cv=none; d=google.com; s=arc-20160816; b=yxtrxYvPSV0+sbZ8b8kmQ6lYg8zXS4HN1E4ru6TTVa8mS1YiRgk/00RcopTJjwS3lv FHWkVp45Awlw/Iq77cgoifZSAKE0xGPFPoNxxC4xpdJZzDYl9FVXo3omi30xnODZDCLe eOwizuarAdaiflmb3Q6kes1+E4uTNz7kVjiLBYZBpcMAW/Vgh34YaOa0KPZbuSRvF6/b F5sxVSvh+JGhdh2xfuvO6+Ry3okTxu9cmQF3tQmh5QkDEh4eBv60XFT0d6L2cXm6wfjN 3WpHMF+YoxHCw3fnI8S48X4tptWnEVv1Pn0aKxkd41hXCpnY6X4E9Agntk4msj6orfb8 gNDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:references :in-reply-to:message-id:date:to:from:delivered-to:dkim-filter :dmarc-filter:arc-authentication-results; bh=+WJ7NCF2O36Mc9eQMoSJWhRYGnNiurRKNPZHczgg/kk=; b=WN74tk99C/TSupy8NPDYAB2BVb9SxsSD/ed/ye0qENZji7AOAQWYR8PSn79cjKHrSR vEkmPB3tcwH5jN6GzElJ4eL/Gh2CvuM/GcYAPEx1RJG8jVTEJ8YEe7ayoXYc5CwrN1JG 3qG3t4x2TdFnjDAdqI8MGsAPirxi8jBTwQsu86Jay2yjUG5VYTi0kY0G3C08kAesoyMe 8iij28TUGNfboXu+mFnMPY3hhF6nAUAmApybl98S1VcaAea7rIQrkC67WOgmeIy1ByRj ZCitgyRDx9Vkqhs5daIMkZOHpfWaCmGtTYToU4LyrNFUv5QGaBi57+nt3ncf8EMdohku sCzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id i18si637273qtc.237.2017.06.26.11.09.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jun 2017 11:09:20 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E44FB40F15; Mon, 26 Jun 2017 18:09:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E44FB40F15 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E44FB40F15 Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 74BD97EE69; Mon, 26 Jun 2017 18:09:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1D18A27E; Mon, 26 Jun 2017 18:09:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v5QI25Nx007891 for ; Mon, 26 Jun 2017 14:02:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 28FC578396; Mon, 26 Jun 2017 18:02:05 +0000 (UTC) Delivered-To: libvir-list@redhat.com Received: from worklaptop.redhat.com (ovpn-117-115.phx2.redhat.com [10.3.117.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id D4D0A784AD; Mon, 26 Jun 2017 18:02:02 +0000 (UTC) From: Cole Robinson To: libvir-list@redhat.com Date: Mon, 26 Jun 2017 14:01:43 -0400 Message-Id: <928a81ffa60f891b2ae9a908d763bfe1e9ccc27b.1498499391.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: cdall@linaro.org, drjones@redhat.com, riku.voipio@linaro.org, Andrea Bolognani Subject: [libvirt] [PATCH 02/12] qemu: caps: Tweak arm conditional in SupportsChardev X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 26 Jun 2017 18:09:19 +0000 (UTC) Rather than try to whitelist all device configs that can't use -chardev, blacklist the only one that really can't, which is the default serial/console target type=isa case. ISA specifically isn't a valid config for arm/aarch64, but we've always implicitly treated it to mean 'default platform device'. Signed-off-by: Cole Robinson --- src/qemu/qemu_capabilities.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) -- 2.13.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: Andrea Bolognani diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 61c9a1066..d0bc50bd7 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -5568,17 +5568,22 @@ virQEMUCapsSupportsChardev(const virDomainDef *def, if (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL && chr->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO) return false; + return true; } - if ((def->os.arch != VIR_ARCH_ARMV7L) && (def->os.arch != VIR_ARCH_AARCH64)) + if ((def->os.arch == VIR_ARCH_ARMV7L) || + (def->os.arch == VIR_ARCH_AARCH64)) { + /* TARGET_TYPE_ISA here really means 'the default', which we + treat as whatever the built in platform serial device is on. + And for platform devices we can't use -chardev */ + if (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL && + chr->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA) + return false; + return true; + } - /* This may not be true for all ARM machine types, but at least - * the only supported non-virtio serial devices of vexpress and versatile - * don't have the -chardev property wired up. */ - return (chr->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO || - (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE && - chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO)); + return true; }