Message ID | 20190311180216.18811-5-jandryuk@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 943A91874 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 11 Mar 2019 18:19:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F77928BA7 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 11 Mar 2019 18:19:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D60028FFC; Mon, 11 Mar 2019 18:19:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 00E7B28BA7 for <patchwork-qemu-devel@patchwork.kernel.org>; Mon, 11 Mar 2019 18:19:57 +0000 (UTC) Received: from localhost ([127.0.0.1]:38164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1h3PWn-0006ci-9M for patchwork-qemu-devel@patchwork.kernel.org; Mon, 11 Mar 2019 14:19:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <jandryuk@gmail.com>) id 1h3PHA-0003Ag-4Z for qemu-devel@nongnu.org; Mon, 11 Mar 2019 14:03:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <jandryuk@gmail.com>) id 1h3PH8-0002h7-6S for qemu-devel@nongnu.org; Mon, 11 Mar 2019 14:03:47 -0400 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]:35270) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <jandryuk@gmail.com>) id 1h3PH6-0002RB-3Z for qemu-devel@nongnu.org; Mon, 11 Mar 2019 14:03:46 -0400 Received: by mail-qk1-x743.google.com with SMTP id z13so3276184qki.2 for <qemu-devel@nongnu.org>; Mon, 11 Mar 2019 11:03:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wCjs9cwkqED/q+uvu13DGjKTcQtyMpKWJlEv6QgrmoY=; b=ZohQrGvmhUl5FnJveSZi0STUWx/I4HEcSIE+a2pnEe2Mv55VgLetoFivfJBMOJPPGV SInQxdNUHK2niCZ+VzsGbaO9BCd5EwB74Yt8JZdphFnmw17Pw/J/ZNzSeJtYs3X9PCwO mW1NRq2kfq6Ct2o36XZbnM8oVzTyPFWAnw5y7es4PEAo9Kuy9LM32a8frY99EQxVk2CG C9ebXCbe5Tww2GO4MUtCHx7FaewIojAUy2tEduCEnSQ9dOhgP2wuK1BQ9cCGqLwZ1Yy4 CyOeE1en8pn6HUNLOqJxwwnDkxeBG8oeB45EhPeAJ6rodvCTzul9XJXiMeVvSVvSKy2g HBJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wCjs9cwkqED/q+uvu13DGjKTcQtyMpKWJlEv6QgrmoY=; b=NCuoMJSy5ehziPE0fAimIpoGsWWSmDxEOkyW8llHmxDOjUSNy1wxypiMx5IdZu9ysV HYrkkkF3yQ+HJerCURV1DRdQlLP1mO4x0fy6dQvB7z4uax+DeYIj1QVt9XZgiMMeL+mF ArjSRg0j10sb2qtMABaRxWgLgmZKn0V2i38qfIaVVpX/2hniAj7wMaT1OdQX+KbyDDGi UUH9zSWL84YIU6fDfReKpycMsSQJ2yk3WeUt/5j5xVgJMc/EbGLNbSCG1XccJ0q+S9hk EKEEaWzVD2KFHYjQENJXDahpILyhVZh/go9Enuk5WC53HbvTJW/Xnl7y6ahMss1xQRQi fCgQ== X-Gm-Message-State: APjAAAX/QPSjlGIX2ZgDnsoEcvgSZ8oTaaKGQZTrm0BfUm/826DfLINh mtE0fVn19hnewHA3/lx2sP6dXEuv3Pw= X-Google-Smtp-Source: APXvYqyDYKLNbABEzEgzTq2vtZbunx/1mGs9Ru9MHYt21yiT7iWrWdj123HD5QtTbLC1GupMEREW8g== X-Received: by 2002:a37:3541:: with SMTP id c62mr24767936qka.240.1552327404235; Mon, 11 Mar 2019 11:03:24 -0700 (PDT) Received: from pm2-ws13.praxislan02.com ([2001:470:8:67e:ba27:ebff:fee8:ce27]) by smtp.gmail.com with ESMTPSA id f126sm4687637qka.14.2019.03.11.11.03.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Mar 2019 11:03:23 -0700 (PDT) From: Jason Andryuk <jandryuk@gmail.com> To: qemu-devel@nongnu.org Date: Mon, 11 Mar 2019 14:02:14 -0400 Message-Id: <20190311180216.18811-5-jandryuk@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190311180216.18811-1-jandryuk@gmail.com> References: <20190311180216.18811-1-jandryuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::743 Subject: [Qemu-devel] [PATCH 4/6] xen: Set HVM_PARAM_DM_DOMAIN for stubdom on older Xen X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Stefano Stabellini <sstabellini@kernel.org>, Jason Andryuk <jandryuk@gmail.com>, marmarek@invisiblethingslab.com, Paul Durrant <paul.durrant@citrix.com>, Anthony Perard <anthony.perard@citrix.com>, xen-devel@lists.xenproject.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Xen stubdom support
|
expand
|
diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h index 9a8155e172..f59f841a43 100644 --- a/include/hw/xen/xen_common.h +++ b/include/hw/xen/xen_common.h @@ -616,6 +616,11 @@ static inline void xen_create_ioreq_server(domid_t dom, *ioservid = 0; use_default_ioreq_server = true; + + if (xen_stubdom_enabled()) { + xc_hvm_param_set(xen_xc, xen_domid, HVM_PARAM_DM_DOMAIN, DOMID_SELF); + } + trace_xen_default_ioreq_server(); }
When running in a stubdom, we have to inform the hypervisor that the stubdom and not dom0 is handling the device model. Explicitly created ioreq servers are fine, but a call to HVM_PARAM_DM_DOMAIN is needed for the default ioreq server. Xen 4.12 removes the default ioreq server. With that, Xen started returning an error when setting HVM_PARAM_DM_DOMAIN. Put the HVM_PARAM_DM_DOMAIN call in the version compatibility header. When we fallback to the default ioreq server, issue the call and don't bother to check the return value. Original patch by Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Jason Andryuk <jandryuk@gmail.com> --- include/hw/xen/xen_common.h | 5 +++++ 1 file changed, 5 insertions(+)