Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2607605ybh; Mon, 5 Aug 2019 03:53:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKwLMy1vhGHAvXfD7g25fvk3MGFF5XnEQUje5doXHiL+I4SJpF/AxkmAmNDQBU86CTq3KE X-Received: by 2002:a62:8c81:: with SMTP id m123mr71892916pfd.240.1565002395242; Mon, 05 Aug 2019 03:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565002395; cv=none; d=google.com; s=arc-20160816; b=rFBB0pdPMLNGOBLH1I3DqJA+H+kSdRVqBljimDDtraqbtXZOETXRljDE6Z0w8ddhH7 piuD9bMGUlQYd39I0k3A5sI14CwIMkMsKcMkjyYBqhZZOa+qcvXD4SQE7wyiO9FeRT4x TgzvQ74nOSrJmlMCPbAZ3vxEpN/4HIvUcS6JJ94NPBzELblpuD4a3yltZc1eyqC5/CGt fOWPaGavRlzAsRpIkvJ5M3xa6yvksRjhNwYFvXZfYEaBVcWXO1UGzypciC86EvNMKfV7 QJRs9UxCWI9O+mnGpYkl5r87gEaml1cT9nPRxhNNV+EV2rDFGbJeoS1eDm1QQquwUIfn JotQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8WM8N0Ce9Q+Qo3jvq0JujARJzlqKb2ciWDZmiDnRwgo=; b=yv9qtHbjIMVFfcB1s3+M8sAP60FJYmGHI9oDPc6iCIJkRCudMam3yTfL2UB6muLCdY AoezJJJif7ff/oSqbkqvnZqCDlH7+3LmRPhGRlBdfqZLum4J4zKMqQ9tJe2FW6qarGn8 oOwTm16hwcqf/GUofxcHQLnD/6lUNna+30PXq0IXVpFKoEfykYxxF2pEih+SYKjcnS6i g50xog3wWO2M/2c47Ft+9UsteRSHAhTMuL9ia0iv0PpajTXutYjr95rKfFCvcVkp6rX1 wqVrvUML56FGUC7O+88f4VmFSKTEvcSC82Zg21noRB6kZIip3bUePz35VcBmaz3c/jDB G2bA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si45769824pgk.456.2019.08.05.03.52.59; Mon, 05 Aug 2019 03:53:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728520AbfHEKuk (ORCPT + 99 others); Mon, 5 Aug 2019 06:50:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42934 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728015AbfHEKuk (ORCPT ); Mon, 5 Aug 2019 06:50:40 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 68AA5C051676; Mon, 5 Aug 2019 10:50:40 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-81.ams2.redhat.com [10.36.116.81]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15EC45D712; Mon, 5 Aug 2019 10:50:40 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 4A79816E08; Mon, 5 Aug 2019 12:50:39 +0200 (CEST) Date: Mon, 5 Aug 2019 12:50:39 +0200 From: Gerd Hoffmann To: Frediano Ziglio Cc: dri-devel@lists.freedesktop.org, David Airlie , open list , "open list:DRM DRIVER FOR QXL VIRTUAL GPU" , Daniel Vetter , "open list:DRM DRIVER FOR QXL VIRTUAL GPU" , Dave Airlie Subject: Re: [Spice-devel] [PATCH] drm/qxl: get vga ioports Message-ID: <20190805105039.cxf2ogbzdf7hropp@sirius.home.kraxel.org> References: <20190805085355.12527-1-kraxel@redhat.com> <1869747233.4556840.1564996693878.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1869747233.4556840.1564996693878.JavaMail.zimbra@redhat.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 05 Aug 2019 10:50:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > > + ret = vga_get_interruptible(pdev, VGA_RSRC_LEGACY_IO); > > + if (ret) { > > + DRM_ERROR("can't get legacy vga ports\n"); > > + goto put_vga; > > I suppose that if this fails it's secondary so should continue. Ah, right, there are secondary qxl cards (without the vga compat bits). We should skip the call in that case (likewise for the cleanups). > What happen configuring 2 QXL devices? > Only a card should provide VGA registers in the system so > if any other card provide them QXL won't work. Well, with intel vgpu everything works fine with this patch. Probably i915 skips direct vga register access in case vga_get fails (because qxl grabed them first). In any case I'd prefer to fail qxl initialization over continuing despite vga_get() having failed. The failure mode is rather awkward: qemu thinks the qxl card is in vga mode while the guest kernel thinks qxl is in native mode. Guest keeps queuing commands until the ring is full while qemu never takes them out, so at some point the guest kernel blocks forever in qxl_ring_push(). cheers, Gerd