hv.c (74be62c7cefbf320e0605f3da6639ef80448ff00) hv.c (7415aea6072bab15969b6c3c5b2a193d88095326)
1/*
2 * Copyright (c) 2009, Microsoft Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT

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

229int hv_synic_init(unsigned int cpu)
230{
231 struct hv_per_cpu_context *hv_cpu
232 = per_cpu_ptr(hv_context.cpu_context, cpu);
233 union hv_synic_simp simp;
234 union hv_synic_siefp siefp;
235 union hv_synic_sint shared_sint;
236 union hv_synic_scontrol sctrl;
1/*
2 * Copyright (c) 2009, Microsoft Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT

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

229int hv_synic_init(unsigned int cpu)
230{
231 struct hv_per_cpu_context *hv_cpu
232 = per_cpu_ptr(hv_context.cpu_context, cpu);
233 union hv_synic_simp simp;
234 union hv_synic_siefp siefp;
235 union hv_synic_sint shared_sint;
236 union hv_synic_scontrol sctrl;
237 u64 vp_index;
238
239 /* Setup the Synic's message page */
240 hv_get_simp(simp.as_uint64);
241 simp.simp_enabled = 1;
242 simp.base_simp_gpa = virt_to_phys(hv_cpu->synic_message_page)
243 >> PAGE_SHIFT;
244
245 hv_set_simp(simp.as_uint64);

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

271 hv_get_synic_state(sctrl.as_uint64);
272 sctrl.enable = 1;
273
274 hv_set_synic_state(sctrl.as_uint64);
275
276 hv_context.synic_initialized = true;
277
278 /*
237
238 /* Setup the Synic's message page */
239 hv_get_simp(simp.as_uint64);
240 simp.simp_enabled = 1;
241 simp.base_simp_gpa = virt_to_phys(hv_cpu->synic_message_page)
242 >> PAGE_SHIFT;
243
244 hv_set_simp(simp.as_uint64);

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

270 hv_get_synic_state(sctrl.as_uint64);
271 sctrl.enable = 1;
272
273 hv_set_synic_state(sctrl.as_uint64);
274
275 hv_context.synic_initialized = true;
276
277 /*
279 * Setup the mapping between Hyper-V's notion
280 * of cpuid and Linux' notion of cpuid.
281 * This array will be indexed using Linux cpuid.
282 */
283 hv_get_vp_index(vp_index);
284 hv_context.vp_index[cpu] = (u32)vp_index;
285
286 /*
287 * Register the per-cpu clockevent source.
288 */
289 if (ms_hyperv.features & HV_X64_MSR_SYNTIMER_AVAILABLE)
290 clockevents_config_and_register(hv_cpu->clk_evt,
291 HV_TIMER_FREQUENCY,
292 HV_MIN_DELTA_TICKS,
293 HV_MAX_MAX_DELTA_TICKS);
294 return 0;

--- 103 unchanged lines hidden ---
278 * Register the per-cpu clockevent source.
279 */
280 if (ms_hyperv.features & HV_X64_MSR_SYNTIMER_AVAILABLE)
281 clockevents_config_and_register(hv_cpu->clk_evt,
282 HV_TIMER_FREQUENCY,
283 HV_MIN_DELTA_TICKS,
284 HV_MAX_MAX_DELTA_TICKS);
285 return 0;

--- 103 unchanged lines hidden ---