lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHVum0dYcrYBGAEoGJCJT0xrJh=968QWEex1ForBzEP5QtAudQ@mail.gmail.com>
Date:   Mon, 7 Nov 2022 17:46:06 -0800
From:   Vipin Sharma <vipinsh@...gle.com>
To:     David Matlack <dmatlack@...gle.com>
Cc:     seanjc@...gle.com, pbonzini@...hat.com, vkuznets@...hat.com,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] KVM: selftests: Test Hyper-V extended hypercall enablement

On Mon, Nov 7, 2022 at 10:27 AM David Matlack <dmatlack@...gle.com> wrote:
>
> On Fri, Nov 04, 2022 at 09:57:01PM -0700, Vipin Sharma wrote:
> > Test Extended hypercall CPUID enablement
>
> nit: Use complete sentences and provide more details on what exactly
> is being tested.
>
> The rest of the commit messages look pretty good so I assume you just
> forgot to fill this one in fully before sending to the mailing list :)
>

Missed it, I will update it.

> >
> > Signed-off-by: Vipin Sharma <vipinsh@...gle.com>
> > ---
> >  tools/testing/selftests/kvm/include/x86_64/hyperv.h  | 4 ++++
> >  tools/testing/selftests/kvm/x86_64/hyperv_features.c | 9 +++++++++
> >  2 files changed, 13 insertions(+)
> >
> > diff --git a/tools/testing/selftests/kvm/include/x86_64/hyperv.h b/tools/testing/selftests/kvm/include/x86_64/hyperv.h
> > index b66910702c0a..075fd29071a6 100644
> > --- a/tools/testing/selftests/kvm/include/x86_64/hyperv.h
> > +++ b/tools/testing/selftests/kvm/include/x86_64/hyperv.h
> > @@ -110,6 +110,7 @@
> >  #define HV_ACCESS_STATS                              BIT(8)
> >  #define HV_DEBUGGING                         BIT(11)
> >  #define HV_CPU_MANAGEMENT                    BIT(12)
> > +#define HV_ENABLE_EXTENDED_HYPERCALLS                BIT(20)
> >  #define HV_ISOLATION                         BIT(22)
> >
> >  /* HYPERV_CPUID_FEATURES.EDX */
> > @@ -164,6 +165,9 @@
> >  #define HVCALL_FLUSH_GUEST_PHYSICAL_ADDRESS_SPACE 0x00af
> >  #define HVCALL_FLUSH_GUEST_PHYSICAL_ADDRESS_LIST 0x00b0
> >
> > +/* Extended hypercalls */
> > +#define HV_EXT_CALL_QUERY_CAPABILITIES               0x8001
> > +
> >  #define HV_FLUSH_ALL_PROCESSORS                      BIT(0)
> >  #define HV_FLUSH_ALL_VIRTUAL_ADDRESS_SPACES  BIT(1)
> >  #define HV_FLUSH_NON_GLOBAL_MAPPINGS_ONLY    BIT(2)
> > diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_features.c b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> > index 05b32e550a80..6b443ce456b6 100644
> > --- a/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> > +++ b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> > @@ -602,6 +602,15 @@ static void guest_test_hcalls_access(void)
> >                       hcall->expect = HV_STATUS_SUCCESS;
> >                       break;
> >               case 19:
> > +                     hcall->control = HV_EXT_CALL_QUERY_CAPABILITIES;
> > +                     hcall->expect = HV_STATUS_ACCESS_DENIED;
> > +                     break;
> > +             case 20:
> > +                     feat->ebx |= HV_ENABLE_EXTENDED_HYPERCALLS;
> > +                     hcall->control = HV_EXT_CALL_QUERY_CAPABILITIES | HV_HYPERCALL_FAST_BIT;
> > +                     hcall->expect = HV_STATUS_INVALID_PARAMETER;
> > +                     break;
> > +             case 21:
> >                       kvm_vm_free(vm);
> >                       return;
> >               }
> > --
> > 2.38.1.273.g43a17bfeac-goog
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ