From nobody Mon Feb 9 09:34:42 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1580493038948244.33150417049023; Fri, 31 Jan 2020 09:50:38 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ixaQm-0006eQ-0u; Fri, 31 Jan 2020 17:50:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ixaQk-0006dl-IU for xen-devel@lists.xenproject.org; Fri, 31 Jan 2020 17:50:10 +0000 Received: from mail-wm1-x343.google.com (unknown [2a00:1450:4864:20::343]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1020cb22-4452-11ea-ad98-bc764e2007e4; Fri, 31 Jan 2020 17:49:44 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id m10so9333793wmc.0 for ; Fri, 31 Jan 2020 09:49:44 -0800 (PST) Received: from localhost.localdomain (41.142.6.51.dyn.plus.net. [51.6.142.41]) by smtp.gmail.com with ESMTPSA id 133sm4364352wmd.5.2020.01.31.09.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2020 09:49:42 -0800 (PST) X-Inumbo-ID: 1020cb22-4452-11ea-ad98-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hM+7wdfsP27XGM9zHGwtCWANDp7Dbi20PNshZg97aIU=; b=r2oD2trUuSgbnkg7qk4IJlNrxpS81WnqL0azadH/eEfIsmL+7hkva3aD7uYiLjZs5D ceZr6pv7g07JNibFKF3lSxe3D/6bWdFaKTpQgZ7qqvc5RYk+T6ZhIluBJqRJOatVGLim VKBTeMFor1RWl6S1W0cHnMdqby4xWAU0r2aNRqXxvlQJ8oEFrID61KHiuGiGRxD/bRN6 wFW/7KjtOvJHhgAvrVP8o/UOoRdGhwb7mYjQfw6TMAsugWIF//Gp71HxrH56bfgQi0uM 4MPGBQW5TtMdIdT64zGhJ5kQAJ/wzV0bqg5KdULjvkyTdz5+NOVlg4DX6Sxs7ZqTXbC8 9G5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=hM+7wdfsP27XGM9zHGwtCWANDp7Dbi20PNshZg97aIU=; b=TuieQ3n3Vw9NvZPjOk5MSLYEIb45+J4Snt+Pwx9/2r/PkTkxb35m8rgVs1ojPFqjKK kHcwRmWclp9d8aI4MS66/8yrGu77TFzpSG96r19ceGGgAuCtsFssGvtsZkwJaL5GdtPL F9Y2Gf211yQetClsCnOg4YeynPvbmLdw6AseCaMqliQs2cv+yasnUtVkfg+IR+qnETuT n45+dOBA1nhQ9YF03ljaA6oogj8Xn65Lpd7x1Zyc1kIFIqRMAvDSiprcAFAgN40e3Cl/ joThctL7xxnJsJ6S0k0YJYAnPkTY3wRos5WF5NQ5HpHNtfSUFeEzJ+vw94f1q7TUx7QZ +d5Q== X-Gm-Message-State: APjAAAXiSMXfiVUAy6tv9RpcRbJcCe4tsMtDkE86xVJeVUbB1u0zzeaa Mek8ppOzZLGQuF+mXnfnGHCmfNqQGUA= X-Google-Smtp-Source: APXvYqxeM0hGplB6XELd/R2c0b+0F9jwFuSU2Z3Tp4chVSLJOj461fFocFPKIM98ECOsTS+0+WlaNA== X-Received: by 2002:a1c:7d93:: with SMTP id y141mr13097735wmc.111.1580492983157; Fri, 31 Jan 2020 09:49:43 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Fri, 31 Jan 2020 17:49:26 +0000 Message-Id: <20200131174930.31045-8-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200131174930.31045-1-liuwe@microsoft.com> References: <20200131174930.31045-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v6 07/11] DO NOT APPLY: x86/hyperv: issue an hypercall X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Wei Liu , Andrew Cooper , Paul Durrant , Michael Kelley , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Test if the infrastructure works. Signed-off-by: Wei Liu --- xen/arch/x86/guest/hyperv/hyperv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xen/arch/x86/guest/hyperv/hyperv.c b/xen/arch/x86/guest/hyperv= /hyperv.c index 7c2a96d70e..052b053160 100644 --- a/xen/arch/x86/guest/hyperv/hyperv.c +++ b/xen/arch/x86/guest/hyperv/hyperv.c @@ -23,6 +23,7 @@ =20 #include #include +#include #include #include =20 @@ -114,6 +115,19 @@ static void __init setup_hypercall_page(void) BUG_ON(!hypercall_msr.enable); =20 set_fixmap_x(FIX_X_HYPERV_HCALL, mfn << PAGE_SHIFT); + + /* XXX Wei: Issue an hypercall here to make sure things are set up + * correctly. When there is actual use of the hypercall facility, + * this can be removed. + */ + { + uint16_t r =3D hv_do_hypercall(0xffff, 0, 0); + BUG_ON(r !=3D HV_STATUS_INVALID_HYPERCALL_CODE); + r =3D hv_do_fast_hypercall(0xffff, 0, 0); + BUG_ON(r !=3D HV_STATUS_INVALID_HYPERCALL_CODE); + + printk("Successfully issued Hyper-V hypercalls\n"); + } } =20 static void __init setup(void) --=20 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel