From patchwork Wed Jan 22 20:23:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11346345 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2CAF792A for ; Wed, 22 Jan 2020 20:25:01 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 06D5D24655 for ; Wed, 22 Jan 2020 20:25:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N9Q7YDS0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06D5D24655 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iuMXp-0006IZ-6X; Wed, 22 Jan 2020 20:24:09 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iuMXo-0006IE-0D for xen-devel@lists.xenproject.org; Wed, 22 Jan 2020 20:24:08 +0000 X-Inumbo-ID: 1a1ce4a2-3d55-11ea-8e9a-bc764e2007e4 Received: from mail-wr1-x443.google.com (unknown [2a00:1450:4864:20::443]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1a1ce4a2-3d55-11ea-8e9a-bc764e2007e4; Wed, 22 Jan 2020 20:23:51 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id z3so522272wru.3 for ; Wed, 22 Jan 2020 12:23:51 -0800 (PST) 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=z9zRpSrWMsfBPDPq03Nj1xHSfrX+WJI3r1UMf9GF7YQ=; b=N9Q7YDS0x/c/guYVRx2kGbAn/h/Pbo6Jiv0t0FJLdzwLBOi+9CpCC4J/SOzge5vrLc B9mj71yjWd5l2/n9VGkjXuxin5p+cW+4OTWeYOW+wg3GMUot7Fed6CQ9mKx1r77g7Aeb /X/H/RGtPa3KGC/UxG+SDaAbQvnA7lAK3B76EMJCy+XicZfGW1PpKyi8jy3IRDTrJJOv wrPXnxGBj9nJ9HncI2M5xabmJNcLbDOme0lUZXGb96siCCfTjqDLUSsiGUrMYtiont5G CtCXIuEYeVHue0xOhNozmcvr6x9bpi9eG2u3RgqW/+sBkDJAORU8pb8Kk3YzP2rRuqGJ Pt2g== 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=z9zRpSrWMsfBPDPq03Nj1xHSfrX+WJI3r1UMf9GF7YQ=; b=shHTfq/sKLpXnnCIwCqQJ0ZCLtqi++FwRR6BONM7HE0XV6IPmERJbuT7V2baRYQo4F MUP2walT/buQ5iWv7aiVRB5BmIqpkGJOywvd280DowBTojWl6bMSlFtLDk7oynVduRKq sOUG3LWD9/flZY+cG0xgjlbDuLIPUCIlJ4f3mg7agQJ7EJAIob/dPhmKhm40yLQO4z0l ZxHz4seTBGdKZVSOUYpVaEEmftqIl/F6eEdpMdHSkH47qR2V9s1g+FRZuH5kfn34ReFO raonm0iwPTM1RZ8L2uMSuTsF+DF5y78nJX9AFVtd1450TuplYjLJa4WIEpu83SjmwswZ WO4Q== X-Gm-Message-State: APjAAAW6unBPTXqmJY03VH4WmCuQAOx2dQ/zQuYP5/fZfu177C5OKS4C sR7RVVIxLjfIkw4jhqXrNyAfcgoj6rFVgA== X-Google-Smtp-Source: APXvYqyRApyQg39fOlK6nmLBQ8KU1JvzwV787HjUBhXybIlNpcsN9K7+r8WM13eeUyG5E0BaBMeNVw== X-Received: by 2002:adf:f80b:: with SMTP id s11mr13723290wrp.12.1579724630249; Wed, 22 Jan 2020 12:23:50 -0800 (PST) Received: from localhost.localdomain (41.142.6.51.dyn.plus.net. [51.6.142.41]) by smtp.gmail.com with ESMTPSA id r6sm60267992wrq.92.2020.01.22.12.23.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2020 12:23:49 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Wed, 22 Jan 2020 20:23:40 +0000 Message-Id: <20200122202343.5703-5-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200122202343.5703-1-liuwe@microsoft.com> References: <20200122202343.5703-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v4 4/7] 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 , Paul Durrant , Andrew Cooper , Michael Kelley , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Test if the infrastructure works. Signed-off-by: Wei Liu --- xen/arch/x86/guest/hyperv/hyperv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xen/arch/x86/guest/hyperv/hyperv.c b/xen/arch/x86/guest/hyperv/hyperv.c index f986c1a805..536ce0d0dd 100644 --- a/xen/arch/x86/guest/hyperv/hyperv.c +++ b/xen/arch/x86/guest/hyperv/hyperv.c @@ -23,6 +23,7 @@ #include #include +#include #include #include @@ -107,6 +108,15 @@ static void __init setup_hypercall_page(void) } 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 = hv_do_hypercall(0xffff, 0, 0); + BUG_ON(r != HV_STATUS_INVALID_HYPERCALL_CODE); + } } static void __init setup(void)