|
19 | 19 | #include <asm/sev.h> |
20 | 20 | #include <asm/ibt.h> |
21 | 21 | #include <asm/hypervisor.h> |
22 | | -#include <asm/hyperv-tlfs.h> |
| 22 | +#include <hyperv/hvhdk.h> |
23 | 23 | #include <asm/mshyperv.h> |
24 | 24 | #include <asm/idtentry.h> |
25 | 25 | #include <asm/set_memory.h> |
@@ -415,24 +415,24 @@ static void __init hv_get_partition_id(void) |
415 | 415 | static u8 __init get_vtl(void) |
416 | 416 | { |
417 | 417 | u64 control = HV_HYPERCALL_REP_COMP_1 | HVCALL_GET_VP_REGISTERS; |
418 | | - struct hv_get_vp_registers_input *input; |
419 | | - struct hv_get_vp_registers_output *output; |
| 418 | + struct hv_input_get_vp_registers *input; |
| 419 | + struct hv_output_get_vp_registers *output; |
420 | 420 | unsigned long flags; |
421 | 421 | u64 ret; |
422 | 422 |
|
423 | 423 | local_irq_save(flags); |
424 | 424 | input = *this_cpu_ptr(hyperv_pcpu_input_arg); |
425 | | - output = (struct hv_get_vp_registers_output *)input; |
| 425 | + output = (struct hv_output_get_vp_registers *)input; |
426 | 426 |
|
427 | | - memset(input, 0, struct_size(input, element, 1)); |
428 | | - input->header.partitionid = HV_PARTITION_ID_SELF; |
429 | | - input->header.vpindex = HV_VP_INDEX_SELF; |
430 | | - input->header.inputvtl = 0; |
431 | | - input->element[0].name0 = HV_X64_REGISTER_VSM_VP_STATUS; |
| 427 | + memset(input, 0, struct_size(input, names, 1)); |
| 428 | + input->partition_id = HV_PARTITION_ID_SELF; |
| 429 | + input->vp_index = HV_VP_INDEX_SELF; |
| 430 | + input->input_vtl.as_uint8 = 0; |
| 431 | + input->names[0] = HV_REGISTER_VSM_VP_STATUS; |
432 | 432 |
|
433 | 433 | ret = hv_do_hypercall(control, input, output); |
434 | 434 | if (hv_result_success(ret)) { |
435 | | - ret = output->as64.low & HV_X64_VTL_MASK; |
| 435 | + ret = output->values[0].reg8 & HV_X64_VTL_MASK; |
436 | 436 | } else { |
437 | 437 | pr_err("Failed to get VTL(error: %lld) exiting...\n", ret); |
438 | 438 | BUG(); |
|
0 commit comments