From patchwork Sun Jan 24 18:21:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thierry Laurion X-Patchwork-Id: 8100871 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ACB6D9F1CC for ; Sun, 24 Jan 2016 18:24:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A607A203C0 for ; Sun, 24 Jan 2016 18:24:40 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A58C8203B8 for ; Sun, 24 Jan 2016 18:24:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aNPHs-0001jz-Ga; Sun, 24 Jan 2016 18:21:20 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aNPHq-0001ju-M5 for xen-devel@lists.xen.org; Sun, 24 Jan 2016 18:21:18 +0000 Received: from [193.109.254.147] by server-2.bemta-14.messagelabs.com id 38/BC-12889-E1615A65; Sun, 24 Jan 2016 18:21:18 +0000 X-Env-Sender: thierry.laurion@gmail.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1453659675!19049720!1 X-Originating-IP: [209.85.223.175] X-SpamReason: No, hits=0.9 required=7.0 tests=HTML_20_30,HTML_MESSAGE X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19350 invoked from network); 24 Jan 2016 18:21:16 -0000 Received: from mail-io0-f175.google.com (HELO mail-io0-f175.google.com) (209.85.223.175) by server-15.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 24 Jan 2016 18:21:16 -0000 Received: by mail-io0-f175.google.com with SMTP id 77so131926473ioc.2 for ; Sun, 24 Jan 2016 10:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=CqSC+6rZtpZiitYY2o77tkdE03HuhZLXSFkdYuaFF1o=; b=RXrYF3Jr97n3Rw9MJv99bc05JB5xxKB7ce/pvH0CxRughMlLEbJ6eQeb6cyKKu1vbv q0Q7G/wcd9qmXqaET05vnJo8E9y0aBQDh1BxEG7dgYjAOwNmvTmKrhe5fjuObxxmP/Hl L4RKeimaJIhpOmNUhphBYyk9bzlGykec+fXRGJyP4a/oNcPkGSqF2hU5c9DNb4JJDo9D fjUJ4ktZoQDVwHpRIH7MKPi4Bd8jE2zVzAuHmcY8y7TnMTS9kLO7RRl9eiPVo1MztnSw rD/ntusFqWTRSGnEDvWXDpVzBQXwFfMoLQldIPVywhYJ4JdahpG0WWKh6lcYvFUc42dl KyPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; bh=CqSC+6rZtpZiitYY2o77tkdE03HuhZLXSFkdYuaFF1o=; b=EtcIrbPXNy6x9HDWcnOgS7e3wI3NB6a/kx6S4DpVzv6pkIzjfitr+qgVO6Vseb6qRV VmszGJclXGGHKRtH/VxM+Y3LBrhoqTHzuaoa2rlstUSU2DfT5NfiPcQwg4VYQPuOJDJ4 aJzodplFNBFXN+OgE/qv9cwC7XsAW2kDxLN/DpVriQQxjxKfhLl/Skg8JEGw+5Y471rK C4/t4l3ZQHouWSKzITa/0hacpQiM5nRQMFx6T65lyYe8iwYs06sCKryikCKffHOS7y8r kv7aTdhVJekPnZRBghHdxgWS1lSfAa+987rapgf34h56qRzmTnpbPUQbDkdHSZZgf6Ra GVJA== X-Gm-Message-State: AG10YOQcAbvKgnW38Q2hYTcmd1zpyiMv4BIujmRw9uWzjcWh7i5+tQ94o4A8RJf2r0Sf4vGKcBppeS0zU/MIRQ== X-Received: by 10.107.128.104 with SMTP id b101mr12688816iod.37.1453659675498; Sun, 24 Jan 2016 10:21:15 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Thierry Laurion Date: Sun, 24 Jan 2016 18:21:05 +0000 Message-ID: To: xen-devel@lists.xen.org, qubes-devel Subject: Re: [Xen-devel] pre Sandy bridge IOMMU support (gm45) X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi devs! XEN devs: As per short discussion with ktemkin earlier in January in #xen: "ktemkin Jan 10, 2016 16:21:50 This test patch did appear to make the system work, though: https://gist.github.com/ktemkin/0e81b93654ae800a5609 ktemkin Jan 10, 2016 16:24:55 Only real difference I see between that and the upstream behavior (besides limiting things to dom0 so things weren't accidentally passed through) is the call to disable_pmr on line 117 before aborting." Makes total sense to my early understanding, since it seems that it is said that vt-d engine gets disabled, but disable_pmr(iommu) function is not called to enforce. What do you think? QUBES devs: I'm still trying to understand how to apply this patch to qubes_builder to actually build a test iso or xen.gz image and report. All Qubes patches seem to be applied from git to local directory structure. Looking inside the code to understand how to generate the provided patch to git can apply it to local chrooted environment when building. Any documentation you could point me to would be greatly appreciated, as any feedback to actually fix the issue stopping this laptop from being a nearly perfect candidate for Qubes. Thierry Le sam. 23 janv. 2016 à 02:37, Thierry Laurion a écrit : > Hey devs, > > Thinkpad x200 p8600 laptops have vt-d, vt-x and tpm. They also have intel > integrated graphics 4 Series (gm45 chipset), supported through i915 driver. > > In December, a fix got introduced to Xen 4.6 through iommu=no-igfx switch. > Before that fix, it was impossible to boot xen without passing iommu=0. > > With iommu=no-igfx passed on, Qubes boots xen, kernel, dom0 and domu until > some graphic rendering is done from a domu to dom0 xserver. > > I'm trying to push forward IOMMU support of gm45 chipset here. The problem > is between i915 and xen iommu support for sure, but there is no crash or > interesting debugging information given on a serial console. > > Any dev help is welcome since that beast and t400 would be excellent Qubes > candidates once that problem is fixed. I posted in December on the list > just before Christmas but I guess the timing wasn't right;) > > Thanks for your help. > Thierry > --- ./drivers/passthrough/vtd/iommu.c.bak 2016-01-24 12:55:15.020267553 -0500 +++ ./drivers/passthrough/vtd/iommu.c 2016-01-24 12:57:14.754138262 -0500 @@ -717,6 +717,7 @@ { dprintk(XENLOG_WARNING VTDPREFIX, "BIOS did not enable IGD for VT properly. Disabling IGD VT-d engine.\n"); + disable_pmr(iommu); return; } }