Deleted Added
full compact
hyperv.c (300825) hyperv.c (300827)
1/*-
2 * Copyright (c) 2009-2012,2016 Microsoft Corp.
3 * Copyright (c) 2012 NetApp Inc.
4 * Copyright (c) 2012 Citrix Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 16 unchanged lines hidden (view full) ---

25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/**
30 * Implements low-level interactions with Hypver-V/Azure
31 */
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009-2012,2016 Microsoft Corp.
3 * Copyright (c) 2012 NetApp Inc.
4 * Copyright (c) 2012 Citrix Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 16 unchanged lines hidden (view full) ---

25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/**
30 * Implements low-level interactions with Hypver-V/Azure
31 */
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/hv_hv.c 300825 2016-05-27 05:58:53Z sephe $");
33__FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/hv_hv.c 300827 2016-05-27 06:12:43Z sephe $");
34
35#include <sys/param.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/pcpu.h>
39#include <sys/timetc.h>
40#include <machine/bus.h>
41#include <machine/md_var.h>

--- 44 unchanged lines hidden (view full) ---

86
87static struct timecounter hv_timecounter = {
88 hv_get_timecount, 0, ~0u, HV_NANOSECONDS_PER_SEC/100, "Hyper-V", HV_NANOSECONDS_PER_SEC/100
89};
90
91static u_int
92hv_get_timecount(struct timecounter *tc)
93{
34
35#include <sys/param.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/pcpu.h>
39#include <sys/timetc.h>
40#include <machine/bus.h>
41#include <machine/md_var.h>

--- 44 unchanged lines hidden (view full) ---

86
87static struct timecounter hv_timecounter = {
88 hv_get_timecount, 0, ~0u, HV_NANOSECONDS_PER_SEC/100, "Hyper-V", HV_NANOSECONDS_PER_SEC/100
89};
90
91static u_int
92hv_get_timecount(struct timecounter *tc)
93{
94 u_int now = rdmsr(HV_X64_MSR_TIME_REF_COUNT);
95 return (now);
94 return rdmsr(MSR_HV_TIME_REF_COUNT);
96}
97
98/**
99 * @brief Invoke the specified hypercall
100 */
101static uint64_t
102hv_vmbus_do_hypercall(uint64_t control, void* input, void* output)
103{

--- 284 unchanged lines hidden ---
95}
96
97/**
98 * @brief Invoke the specified hypercall
99 */
100static uint64_t
101hv_vmbus_do_hypercall(uint64_t control, void* input, void* output)
102{

--- 284 unchanged lines hidden ---