From: Wei Liu <wl@xen.org>
To: Xen Development List <xen-devel@lists.xenproject.org>
Cc: "Wei Liu" <liuwe@microsoft.com>, "Wei Liu" <wl@xen.org>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Paul Durrant" <pdurrant@amazon.com>,
"Michael Kelley" <mikelley@microsoft.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [Xen-devel] [PATCH v7 07/10] DO NOT APPLY: x86/hyperv: issue an hypercall
Date: Tue, 4 Feb 2020 15:37:01 +0000 [thread overview]
Message-ID: <20200204153704.15934-8-liuwe@microsoft.com> (raw)
In-Reply-To: <20200204153704.15934-1-liuwe@microsoft.com>
Test if the infrastructure works.
Signed-off-by: Wei Liu <liuwe@microsoft.com>
---
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 888bda25b0..2a2afcb363 100644
--- a/xen/arch/x86/guest/hyperv/hyperv.c
+++ b/xen/arch/x86/guest/hyperv/hyperv.c
@@ -23,6 +23,7 @@
#include <asm/fixmap.h>
#include <asm/guest.h>
+#include <asm/guest/hyperv-hcall.h>
#include <asm/guest/hyperv-tlfs.h>
#include <asm/processor.h>
@@ -114,6 +115,19 @@ static void __init setup_hypercall_page(void)
BUG_ON(!hypercall_msr.enable);
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);
+ r = hv_do_fast_hypercall(0xffff, 0, 0);
+ BUG_ON(r != HV_STATUS_INVALID_HYPERCALL_CODE);
+
+ printk("Successfully issued Hyper-V hypercalls\n");
+ }
}
static void __init setup(void)
--
2.20.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2020-02-04 15:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-04 15:36 [Xen-devel] [PATCH v7 00/10] More Hyper-V infrastructures Wei Liu
2020-02-04 15:36 ` [Xen-devel] [PATCH v7 01/10] x86/hypervisor: make hypervisor_ap_setup return an error code Wei Liu
2020-02-04 16:48 ` Wei Liu
2020-02-04 16:56 ` Roger Pau Monné
2020-02-04 17:03 ` Wei Liu
2020-02-05 11:12 ` Jan Beulich
2020-02-05 12:09 ` Wei Liu
2020-02-05 12:42 ` Jan Beulich
2020-02-04 15:36 ` [Xen-devel] [PATCH v7 02/10] x86/smp: don't online cpu if hypervisor_ap_setup fails Wei Liu
2020-02-04 15:36 ` [Xen-devel] [PATCH v7 03/10] x86: provide executable fixmap facility Wei Liu
2020-02-05 11:15 ` Jan Beulich
2020-02-04 15:36 ` [Xen-devel] [PATCH v7 04/10] x86/hypervisor: provide hypervisor_fixup_e820 Wei Liu
2020-02-04 15:36 ` [Xen-devel] [PATCH v7 05/10] x86/hyperv: setup hypercall page Wei Liu
2020-02-05 14:04 ` Roger Pau Monné
2020-02-05 15:00 ` Wei Liu
2020-02-05 15:03 ` Wei Liu
2020-02-05 15:52 ` Durrant, Paul
2020-02-04 15:37 ` [Xen-devel] [PATCH v7 06/10] x86/hyperv: provide Hyper-V hypercall functions Wei Liu
2020-02-05 11:17 ` Jan Beulich
2020-02-04 15:37 ` Wei Liu [this message]
2020-02-04 15:37 ` [Xen-devel] [PATCH v7 08/10] x86/hyperv: provide percpu hypercall input page Wei Liu
2020-02-04 15:37 ` [Xen-devel] [PATCH v7 09/10] x86/hyperv: retrieve vp_index from Hyper-V Wei Liu
2020-02-04 15:37 ` [Xen-devel] [PATCH v7 10/10] x86/hyperv: setup VP assist page Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200204153704.15934-8-liuwe@microsoft.com \
--to=wl@xen.org \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=liuwe@microsoft.com \
--cc=mikelley@microsoft.com \
--cc=pdurrant@amazon.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.