lkml.org 
[lkml]   [2021]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status
On Tue, Apr 20, 2021 at 09:30:08PM +0000, Michael Kelley wrote:
> From: Joseph Salisbury <joseph.salisbury@linux.microsoft.com> Sent: Friday, April 16, 2021 5:43 PM
> >
> > There is not a consistent pattern for checking Hyper-V hypercall status.
> > Existing code uses a number of variants. The variants work, but a consistent
> > pattern would improve the readability of the code, and be more conformant
> > to what the Hyper-V TLFS says about hypercall status.
> >
> > Implemented new helper functions hv_result(), hv_result_success(), and
> > hv_repcomp(). Changed the places where hv_do_hypercall() and related variants
> > are used to use the helper functions.
> >
> > Signed-off-by: Joseph Salisbury <joseph.salisbury@microsoft.com>
> > ---
> > arch/x86/hyperv/hv_apic.c | 16 +++++++++-------
> > arch/x86/hyperv/hv_init.c | 2 +-
> > arch/x86/hyperv/hv_proc.c | 25 ++++++++++---------------
> > arch/x86/hyperv/irqdomain.c | 6 +++---
> > arch/x86/hyperv/mmu.c | 8 ++++----
> > arch/x86/hyperv/nested.c | 8 ++++----
> > arch/x86/include/asm/mshyperv.h | 1 +
> > drivers/hv/hv.c | 2 +-
> > drivers/pci/controller/pci-hyperv.c | 2 +-
> > include/asm-generic/mshyperv.h | 25 ++++++++++++++++++++-----
> > 10 files changed, 54 insertions(+), 41 deletions(-)
>
> Wei -- I have gone through these changes reasonably carefully, but
> your review of the Linux-in-the-root-partition changes would be a good
> double-check. It's too easy to get the sense of the tests backwards. :-(

The code looks correct to me.

>
> Reviewed-by: Michael Kelley <mikelley@microsoft.com>

Thanks. I will apply this series to hyperv-next shortly.

Wei.

\
 
 \ /
  Last update: 2021-04-21 11:48    [W:0.062 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site