Enhance Hyper-V for hibernation
Subsystems (5)
Dexuan Cui
maintainerv5 cover Enhance Hyper-V for hibernation
This patchset (consisting of 3 patches) was part of the v4 patchset (consisting of 12 patches):
https://lkml.org/lkml/2019/9/2/894
I realized these 3 patches must go through the tip.git tree, because I have to rebase 2 of the 3 patches due to recent changes from others in the tip tree.
All the 3 patches are now rebased to the tip tree's timers/core branch:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=timers/core
, and all the 3 patches have Michael Kelley's Signed-off-by's.
Please review.
Thanks!
Dexuan
Dexuan Cui (3):
x86/hyper-v: Suspend/resume the hypercall page for hibernation x86/hyper-v: Implement hv_is_hibernation_supported() clocksource/drivers: Suspend/resume Hyper-V clocksource for
hibernation
arch/x86/hyperv/hv_init.c | 40 ++++++++++++++++++++++++++++++++++++++ drivers/clocksource/hyperv_timer.c | 25 ++++++++++++++++++++++++ include/asm-generic/mshyperv.h | 2 ++ 3 files changed, 67 insertions(+)
Signature · 1 line
1.8.3.1
Dexuan Cui
maintainerPATCH v5 1/3 x86/hyper-v: Suspend/resume the hypercall page for hibernation
This is needed for hibernation, e.g. when we resume the old kernel, we need to disable the "current" kernel's hypercall page and then resume the old kernel's.
--- arch/x86/hyperv/hv_init.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
arch/x86/hyperv/hv_init.c +33 -0
@@ -20,6 +20,7 @@#include <linux/hyperv.h> #include <linux/slab.h> #include <linux/cpuhotplug.h> +#include <linux/syscore_ops.h> #include <clocksource/hyperv_timer.h> void *hv_hypercall_pg;
@@ -223,6 +224,34 @@ static int __init hv_pci_init(void)return 1 ; } +static int hv_suspend (void ) +{ +union hv_x64_msr_hypercall_contents hypercall_msr; + +/* Reset the hypercall page */ +rdmsrl (HV_X64_MSR_HYPERCALL , hypercall_msr.as_uint64); + hypercall_msr.enable =0 ; +wrmsrl (HV_X64_MSR_HYPERCALL , hypercall_msr.as_uint64); + +return 0 ; +} + +static void hv_resume (void ) +{ +union hv_x64_msr_hypercall_contents hypercall_msr; + +/* Re-enable the hypercall page */ +rdmsrl (HV_X64_MSR_HYPERCALL , hypercall_msr.as_uint64); + hypercall_msr.enable =1 ; + hypercall_msr.guest_physical_address =vmalloc_to_pfn (hv_hypercall_pg); +wrmsrl (HV_X64_MSR_HYPERCALL , hypercall_msr.as_uint64); +} + +static struct syscore_ops hv_syscore_ops = { + .suspend = hv_suspend, + .resume = hv_resume, +}; +/* * This function is to be invoked early in the boot sequence after the * hypervisor has been detected.
@@ -301,6 +330,8 @@ void __init hyperv_init(void) x86_init.pci.arch_init = hv_pci_init; +register_syscore_ops (&hv_syscore_ops); +return ; remove_cpuhp_state:
@@ -320,6 +351,8 @@ void hyperv_cleanup(void) {union hv_x64_msr_hypercall_contents hypercall_msr; +unregister_syscore_ops (&hv_syscore_ops); +/* Reset our OS id */ wrmsrl (HV_X64_MSR_GUEST_OS_ID ,0 );
Signature · 1 line
1.8.3.1
Dexuan Cui
maintainerPATCH v5 2/3 x86/hyper-v: Implement hv_is_hibernation_supported()
In reply to Dexuan CuiThe API will be used by the hv_balloon and hv_vmbus drivers.
Balloon up/down and hot-add of memory must not be active if the user wants the Linux VM to support hibernation, because they are incompatible with hibernation according to Hyper-V team, e.g. upon suspend the balloon VSP doesn't save any info about the ballooned-out pages (if any); so, after Linux resumes, Linux balloon VSC expects that the VSP will return the pages if Linux is under memory pressure, but the VSP will never do that, since the VSP thinks it never stole the pages from the VM.
So, if the user wants Linux VM to support hibernation, Linux must forbid balloon up/down and hot-add, and the only functionality of the balloon VSC driver is reporting the VM's memory pressure to the host.
Ideally, when Linux detects that the user wants it to support hibernation, the balloon VSC should tell the VSP that it does not support ballooning and hot-add. However, the current version of the VSP requires the VSC should support these capabilities, otherwise the capability negotiation fails and the VSC can not load at all, so with the later changes to the VSC driver, Linux VM still reports to the VSP that the VSC supports these capabilities, but the VSC ignores the VSP's requests of balloon up/down and hot add, and reports an error to the VSP, when applicable. BTW, in the future the balloon VSP driver will allow the VSC to not support the capabilities of balloon up/down and hot add.
The ACPI S4 state is not a must for hibernation to work, because Linux is able to hibernate as long as the system can shut down. However in practice we decide to artificially use the presence of the virtual ACPI S4 state as an indicator of the user's intent of using hibernation, because Linux VM must find a way to know if the user wants to use the hibernation feature or not.
By default, Hyper-V does not enable the virtual ACPI S4 state; on recent Hyper-V hosts (e.g. RS5, 19H1), the administrator is able to enable the state for a VM by WMI commands.
Once all the vmbus and VSC patches for the hibernation feature are accepted, an extra patch will be submitted to forbid hibernation if the virtual ACPI S4 state is absent, i.e. hv_is_hibernation_supported() is false.
--- arch/x86/hyperv/hv_init.c | 7 +++++++ include/asm-generic/mshyperv.h | 2 ++ 2 files changed, 9 insertions(+)
arch/x86/hyperv/hv_init.c +7 -0
@@ -7,6 +7,7 @@* Author : K. Y. Srinivasan <[email protected]> */ +#include <linux/acpi.h> #include <linux/efi.h> #include <linux/types.h> #include <asm/apic.h>
@@ -450,3 +451,9 @@ bool hv_is_hyperv_initialized(void)return hypercall_msr.enable; }EXPORT_SYMBOL_GPL (hv_is_hyperv_initialized); + +bool hv_is_hibernation_supported (void ) +{ +return acpi_sleep_state_supported (ACPI_STATE_S4 ); +} +EXPORT_SYMBOL_GPL (hv_is_hibernation_supported);
include/asm-generic/mshyperv.h +2 -0
@@ -166,10 +166,12 @@ static inline int cpumask_to_vpset(struct hv_vpset *vpset,void hyperv_report_panic (struct pt_regs *regs,long err);void hyperv_report_panic_msg (phys_addr_t pa,size_t size);bool hv_is_hyperv_initialized (void ); +bool hv_is_hibernation_supported (void );void hyperv_cleanup (void );void hv_setup_sched_clock (void *sched_clock);#else /* CONFIG_HYPERV */ static inline bool hv_is_hyperv_initialized (void ) {return false; } +static inline bool hv_is_hibernation_supported (void ) {return false; }static inline void hyperv_cleanup (void ) {}#endif /* CONFIG_HYPERV */
Signature · 1 line
1.8.3.1
Dexuan Cui
maintainerPATCH v5 3/3 clocksource/drivers: Suspend/resume Hyper-V clocksource for hibernation
In reply to Dexuan CuiThis is needed for hibernation, e.g. when we resume the old kernel, we need to disable the "current" kernel's TSC page and then resume the old kernel's.
--- drivers/clocksource/hyperv_timer.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
drivers/clocksource/hyperv_timer.c +25 -0
@@ -237,12 +237,37 @@ static u64 read_hv_sched_clock_tsc(void)return read_hv_clock_tsc (NULL ) - hv_sched_clock_offset; } +static void suspend_hv_clock_tsc (struct clocksource *arg) +{ +u64 tsc_msr; + +/* Disable the TSC page */ +hv_get_reference_tsc (tsc_msr); + tsc_msr &= ~BIT_ULL (0 ); +hv_set_reference_tsc (tsc_msr); +} + + +static void resume_hv_clock_tsc (struct clocksource *arg) +{ +phys_addr_t phys_addr =virt_to_phys (&tsc_pg); +u64 tsc_msr; + +/* Re-enable the TSC page */ +hv_get_reference_tsc (tsc_msr); + tsc_msr &=GENMASK_ULL (11 ,0 ); + tsc_msr |=BIT_ULL (0 ) | (u64 )phys_addr; +hv_set_reference_tsc (tsc_msr); +} +static struct clocksource hyperv_cs_tsc = { .name ="hyperv_clocksource_tsc_page" , .rating =400 , .read = read_hv_clock_tsc, .mask =CLOCKSOURCE_MASK (64 ), .flags =CLOCK_SOURCE_IS_CONTINUOUS , + .suspend= suspend_hv_clock_tsc, + .resume = resume_hv_clock_tsc, }; static u64 notrace read_hv_clock_msr(struct clocksource *arg)
Signature · 1 line
1.8.3.1
Dexuan Cui
maintainerQuoted 25 lines
From: Dexuan Cui <[email protected]>
Sent: Thursday, September 5, 2019 3:47 PMThis patchset (consisting of 3 patches) was part of the v4 patchset (consisting of 12 patches): https://lkml.org/lkml/2019/9/2/894
I realized these 3 patches must go through the tip.git tree, because I have to rebase 2 of the 3 patches due to recent changes from others in the tip tree.
All the 3 patches are now rebased to the tip tree's timers/core branch:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=timers/core
, and all the 3 patches have Michael Kelley's Signed-off-by's.Please review.
Thanks!
DexuanDexuan Cui (3):
x86/hyper-v: Suspend/resume the hypercall page for hibernation x86/hyper-v: Implementhv_is_hibernation_supported()clocksource/drivers: Suspend/resume Hyper-V clocksource for
hibernation
Quoted 5 lines
arch/x86/hyperv/hv_init.c | 40 ++++++++++++++++++++++++++++++++++++++ drivers/clocksource/hyperv_timer.c | 25 ++++++++++++++++++++++++ include/asm-generic/mshyperv.h | 2 ++ 3 files changed, 67 insertions(+)
Hi tglx and all,
Can you please take a look at this patchset (3 patches in total)?
IMO it's better for the 3 patches to go through the tip.git tree, but if you (the x86 maintainers) have no objection, the patches can also go through Saha Levin's Hyper-V tree, because the dependent patches have landed in Linus's tree now.
Thanks,
-- Dexuan
Re: [PATCH v5 3/3] clocksource/drivers: Suspend/resume Hyper-V clocksource for hibernation
In reply to Dexuan CuiQuoted 5 lines · Dexuan Cui
This is needed for hibernation, e.g. when we resume the old kernel, we need to disable the "current" kernel's TSC page and then resume the old kernel's.
Signed-off-by Dexuan Cui <[email protected]>Reviewed-by Michael Kelley <[email protected]>
I can take this patch if needed.
Quoted 46 lines
--- drivers/clocksource/hyperv_timer.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)drivers/clocksource/hyperv_timer.c +25
-0@@ -237,12 +237,37 @@ static u64 read_hv_sched_clock_tsc(void)return read_hv_clock_tsc (NULL ) - hv_sched_clock_offset; } +static void suspend_hv_clock_tsc (struct clocksource *arg) +{ +u64 tsc_msr; + +/* Disable the TSC page */ +hv_get_reference_tsc (tsc_msr); + tsc_msr &= ~BIT_ULL (0 ); +hv_set_reference_tsc (tsc_msr); +} + + +static void resume_hv_clock_tsc (struct clocksource *arg) +{ +phys_addr_t phys_addr =virt_to_phys (&tsc_pg); +u64 tsc_msr; + +/* Re-enable the TSC page */ +hv_get_reference_tsc (tsc_msr); + tsc_msr &=GENMASK_ULL (11 ,0 ); + tsc_msr |=BIT_ULL (0 ) | (u64 )phys_addr; +hv_set_reference_tsc (tsc_msr); +} +static struct clocksource hyperv_cs_tsc = { .name ="hyperv_clocksource_tsc_page" , .rating =400 , .read = read_hv_clock_tsc, .mask =CLOCKSOURCE_MASK (64 ), .flags =CLOCK_SOURCE_IS_CONTINUOUS , + .suspend= suspend_hv_clock_tsc, + .resume = resume_hv_clock_ts,> }; static u64 notrace read_hv_clock_msr(struct clocksource *arg)
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Dexuan Cui
maintainerRE: [PATCH v5 3/3] clocksource/drivers: Suspend/resume Hyper-V clocksource for hibernation
Quoted 13 lines
From: Daniel Lezcano <[email protected]>
Sent: Wednesday, September 25, 2019 4:21 PM
To: Dexuan Cui <[email protected]>; [email protected]; [email protected]; Haiyang Zhang <[email protected]>; [email protected]; KY Srinivasan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Stephen Hemminger <[email protected]>; [email protected]; [email protected]; Michael Kelley <[email protected]>; Sasha Levin <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v5 3/3] clocksource/drivers: Suspend/resume Hyper-V clocksource for hibernation
Quoted 8 lines
Quoted 5 lines · Dexuan Cui
This is needed for hibernation, e.g. when we resume the old kernel, we need to disable the "current" kernel's TSC page and then resume the old kernel's.
Signed-off-by Dexuan Cui <[email protected]>Reviewed-by Michael Kelley <[email protected]>I can take this patch if needed.
Thanks, Daniel! Usually tglx takes care of the patches, but it looks recently he may be too busy to handle the 3 patches.
I guess you can take the patch, if tglx has no objection. :-) If you take the patch, please take all the 3 patches.
Thanks,
-- Dexuan
Re: [PATCH v5 1/3] x86/hyper-v: Suspend/resume the hypercall page for hibernation
In reply to Dexuan CuiQuoted 25 lines · Dexuan Cui
This is needed for hibernation, e.g. when we resume the old kernel, we need to disable the "current" kernel's hypercall page and then resume the old kernel's.
Signed-off-by Dexuan Cui <[email protected]>Reviewed-by Michael Kelley <[email protected]>--- arch/x86/hyperv/hv_init.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)arch/x86/hyperv/hv_init.c +1
-0@@ -20,6 +20,7 @@#include <linux/hyperv.h> #include <linux/slab.h> #include <linux/cpuhotplug.h> +#include <linux/syscore_ops.h> #include <clocksource/hyperv_timer.h> void *hv_hypercall_pg;@@ -223,6 +224,34 @@ static int __init hv_pci_init(void)return 1 ; }
arch/x86/hyperv/hv_init.c static int __init hv_pci_init(void) · line 235
Quoted 10 lines
arch/x86/hyperv/hv_init.c +9
-0+static int hv_suspend (void ) +{ +union hv_x64_msr_hypercall_contents hypercall_msr; + +/* Reset the hypercall page */ +rdmsrl (HV_X64_MSR_HYPERCALL , hypercall_msr.as_uint64); + hypercall_msr.enable =0 ; +wrmsrl (HV_X64_MSR_HYPERCALL , hypercall_msr.as_uint64); +
(trying to think out loud, not sure there's a real issue):
When PV IPIs (or PV TLB flush) are enabled we do the following checks:
if (!hv_hypercall_pg) return false;
or
if (!hv_hypercall_pg)
goto do_native;which will pass as we're not invalidating the pointer. Can we actually be sure that the kernel will never try to send an IPI/do TLB flush before we resume?
Signature · 1 line
Vitaly
Re: [PATCH v5 3/3] clocksource/drivers: Suspend/resume Hyper-V clocksource for hibernation
In reply to Dexuan CuiQuoted 20 lines · Dexuan Cui
Quoted 20 lines
From: Daniel Lezcano <[email protected]>
Sent: Wednesday, September 25, 2019 4:21 PM
To: Dexuan Cui <[email protected]>; [email protected]; [email protected]; Haiyang Zhang <[email protected]>; [email protected]; KY Srinivasan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Stephen Hemminger <[email protected]>; [email protected]; [email protected]; Michael Kelley <[email protected]>; Sasha Levin <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v5 3/3] clocksource/drivers: Suspend/resume Hyper-V clocksource for hibernationQuoted 5 lines · Dexuan Cui
This is needed for hibernation, e.g. when we resume the old kernel, we need to disable the "current" kernel's TSC page and then resume the old kernel's.
Signed-off-by Dexuan Cui <[email protected]>Reviewed-by Michael Kelley <[email protected]>
Quoted 7 lines
Quoted 1 line
I can take this patch if needed.
Thanks, Daniel! Usually tglx takes care of the patches, but it looks recently he may be too busy to handle the 3 patches.
I guess you can take the patch, if tglx has no objection. :-) If you take the patch, please take all the 3 patches.
I maintain drivers/clocksource for the tip/timers/core branch. I don't want to proxy another tip branch as it is out of my jurisdiction.
So I can take patch 3/3 but will let the other 2 patches to be picked by the right person. It is your call.
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog
Dexuan Cui
maintainerRE: [PATCH v5 3/3] clocksource/drivers: Suspend/resume Hyper-V clocksource for hibernation
Quoted 5 lines
From: Daniel Lezcano <[email protected]>
Sent: Thursday, September 26, 2019 6:17 AMQuoted 3 lines
Quoted 2 lines
I can take this patch if needed.
Quoted 8 lines
Quoted 5 lines
Thanks, Daniel! Usually tglx takes care of the patches, but it looks recently he may be too busy to handle the 3 patches.
I guess you can take the patch, if tglx has no objection. :-) If you take the patch, please take all the 3 patches.
I maintain
drivers/clocksourcefor the tip/timers/core branch. I don't want to proxy another tip branch as it is out of my jurisdiction.
I see. Thanks for the explanation! I learned more about the tip tree. :-)
Quoted 2 lines
So I can take patch 3/3 but will let the other 2 patches to be picked by the right person. It is your call.
Sounds good. Daniel, then please take this patch, e.g. patch 3/3.
Patch 2/3 may as well go through Sasha's hyper-v tree, since it's required by other changes to the drivers hv_balloon, hv_utils and hv_vmbus.
I suppose tglx is the best person to take patch 1/3, but if he's too busy to handle it, it can also go through the hyper-v tree, since the related other patches have been in the mainline now.
Thanks,
-- Dexuan
Dexuan Cui
maintainerRE: [PATCH v5 1/3] x86/hyper-v: Suspend/resume the hypercall page for hibernation
In reply to Vitaly KuznetsovQuoted 21 lines
From: Vitaly Kuznetsov <[email protected]>
Sent: Thursday, September 26, 2019 3:44 AMarch/x86/hyperv/hv_init.c static int __init hv_pci_init(void) · line 235
Quoted 10 lines
[...]
arch/x86/hyperv/hv_init.c +9
-0+static int hv_suspend (void ) +{ +union hv_x64_msr_hypercall_contents hypercall_msr; + +/* Reset the hypercall page */ +rdmsrl (HV_X64_MSR_HYPERCALL , hypercall_msr.as_uint64); + hypercall_msr.enable =0 ; +wrmsrl (HV_X64_MSR_HYPERCALL , hypercall_msr.as_uint64); +(trying to think out loud, not sure there's a real issue):
When PV IPIs (or PV TLB flush) are enabled we do the following checks:
if (!hv_hypercall_pg) return false;or
Quoted 8 lines
if (!hv_hypercall_pg) goto do_native;which will pass as we're not invalidating the pointer. Can we actually be sure that the kernel will never try to send an IPI/do TLB flush before we resume?
Vitaly
When hv_suspend() and hv_resume() are called by syscore_suspend() and syscore_resume(), respectively, all the non-boot CPUs are disabled and only CPU0 is active and interrupts are disabled, e.g. see
hibernate() ->
hibernation_snapshot() ->
create_image() ->
suspend_disable_secondary_cpus()
local_irq_disable()
syscore_suspend()
swsusp_arch_suspend
syscore_resume
local_irq_enable
enable_nonboot_cpusSo, I'm pretty sure no IPI can happen between hv_suspend() and hv_resume(). self-IPI is not supposed to happen either, since interrupts are disabled.
IMO TLB flush should not be an issue either, unless the kernel changes page tables between hv_suspend() and hv_resume(), which is not the case as I checked the related code, but it looks in theory that might happen, say, in the future, so if you insist we should save the variable "hv_hypercall_pg" to a temporary variable and set the "hv_hypercall_pg" to NULL before we disable the hypercall page, I would be happy to post a new version of this patch, or we can keep this patch as is and I can make an extra patch.
Thanks,
-- Dexuan
RE: [PATCH v5 1/3] x86/hyper-v: Suspend/resume the hypercall page for hibernation
Quoted 51 lines · Dexuan Cui
Quoted 21 lines
From: Vitaly Kuznetsov <[email protected]>
Sent: Thursday, September 26, 2019 3:44 AMarch/x86/hyperv/hv_init.c static int __init hv_pci_init(void) · line 235
Quoted 10 lines
[...]
arch/x86/hyperv/hv_init.c +9
-0+static int hv_suspend (void ) +{ +union hv_x64_msr_hypercall_contents hypercall_msr; + +/* Reset the hypercall page */ +rdmsrl (HV_X64_MSR_HYPERCALL , hypercall_msr.as_uint64); + hypercall_msr.enable =0 ; +wrmsrl (HV_X64_MSR_HYPERCALL , hypercall_msr.as_uint64); +(trying to think out loud, not sure there's a real issue):
When PV IPIs (or PV TLB flush) are enabled we do the following checks:
if (!hv_hypercall_pg) return false;or
Quoted 8 lines
if (!hv_hypercall_pg) goto do_native;which will pass as we're not invalidating the pointer. Can we actually be sure that the kernel will never try to send an IPI/do TLB flush before we resume?
Vitaly
When
hv_suspend()andhv_resume()are called bysyscore_suspend()andsyscore_resume(), respectively, all the non-boot CPUs are disabled and only CPU0 is active and interrupts are disabled, e.g. see
hibernate()->
hibernation_snapshot()->create_image() -> suspend_disable_secondary_cpus() local_irq_disable() syscore_suspend() swsusp_arch_suspend syscore_resume local_irq_enable enable_nonboot_cpusSo, I'm pretty sure no IPI can happen between
hv_suspend()andhv_resume(). self-IPI is not supposed to happen either, since interrupts are disabled.
Quoted 6 lines
IMO TLB flush should not be an issue either, unless the kernel changes page tables between
hv_suspend()andhv_resume(), which is not the case as I checked the related code, but it looks in theory that might happen, say, in the future, so if you insist we should save the variable "hv_hypercall_pg" to a temporary variable and set the "hv_hypercall_pg" to NULL before we disable the hypercall page
Let's do it as a future proof so we can keep relying on !hv_hypercall_pg everywhere we need. No need to change this patch IMO, a follow-up would do.
Signature · 1 line
Vitaly
Dexuan Cui
maintainerRE: [PATCH v5 1/3] x86/hyper-v: Suspend/resume the hypercall page for hibernation
Quoted 17 lines
From: Vitaly Kuznetsov <[email protected]>
Sent: Friday, September 27, 2019 2:05 AM
To: Dexuan Cui <[email protected]>Dexuan Cui <[email protected]> writes:
...Quoted 1 line
So, I'm pretty sure no IPI can happen between
hv_suspend()and
hv_resume().Quoted 8 lines
self-IPI is not supposed to happen either, since interrupts are disabled.
IMO TLB flush should not be an issue either, unless the kernel changes page tables between
hv_suspend()andhv_resume(), which is not the case as I checked the related code, but it looks in theory that might happen, say, in the future, so if you insist we should save the variable "hv_hypercall_pg" to a temporary variable and set the "hv_hypercall_pg" to NULL before we disable the hypercall page
Quoted 4 lines
Let's do it as a future proof so we can keep relying on !hv_hypercall_pg everywhere we need. No need to change this patch IMO, a follow-up would do.
Vitaly
Now I think it would be better to do it in this patch. :-) I'll post a v6 to follow your suggestion.
Thanks,
-- Dexuan