Skip to content

Commit

Permalink
Drivers: hv: Use HV_HYP_PAGE in hv_synic_enable_regs()
Browse files Browse the repository at this point in the history
Both the base_*_gpa should use the guest page number in Hyper-V page, so
use HV_HYP_PAGE instead of PAGE.

Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20200916034817.30282-5-boqun.feng@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
  • Loading branch information
Boqun Feng authored and Wei Liu committed Sep 28, 2020
1 parent c1135c7 commit ef514d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hv/hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ void hv_synic_enable_regs(unsigned int cpu)
hv_get_simp(simp.as_uint64);
simp.simp_enabled = 1;
simp.base_simp_gpa = virt_to_phys(hv_cpu->synic_message_page)
>> PAGE_SHIFT;
>> HV_HYP_PAGE_SHIFT;

hv_set_simp(simp.as_uint64);

/* Setup the Synic's event page */
hv_get_siefp(siefp.as_uint64);
siefp.siefp_enabled = 1;
siefp.base_siefp_gpa = virt_to_phys(hv_cpu->synic_event_page)
>> PAGE_SHIFT;
>> HV_HYP_PAGE_SHIFT;

hv_set_siefp(siefp.as_uint64);

Expand Down

0 comments on commit ef514d3

Please sign in to comment.