Thread (1 message) flat view 1 message, 1 author, 2020-11-13

Re: [PATCH v2 08/17] x86/hyperv: handling hypercall page setup for root

From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: 2020-11-13 16:16:31
Also in: linux-hyperv, lkml

Wei Liu [off-list ref] writes:
On Fri, Nov 13, 2020 at 03:33:33PM +0000, Wei Liu wrote:
quoted
On Thu, Nov 12, 2020 at 04:51:09PM +0100, Vitaly Kuznetsov wrote:
quoted
Wei Liu [off-list ref] writes:
quoted
When Linux is running as the root partition, the hypercall page will
have already been setup by Hyper-V. Copy the content over to the
allocated page.

The suspend, resume and cleanup paths remain untouched because they are
not supported in this setup yet.
What about adding BUG_ONs there then?
I generally avoid cluttering code if I'm sure it definitely does not
work.

In any case, adding BUG_ONs is not the right answer. Both hv_suspend and
hv_resume can return an error code. I would rather just do

   if (hv_root_partition)
       return -EPERM;

in both places.
Correction: hv_resume is void, so I won't add that code snippet. But we
should still be fine because hv_suspend will have already failed in the
first place.
Works for me. I just very much prefer to get reports like "system
doesn't go to sleep" instead of "something crashes when I put my system
to sleep")

-- 
Vitaly

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help