public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Matlack <dmatlack@google.com>
To: Vipin Sharma <vipinsh@google.com>
Cc: seanjc@google.com, pbonzini@redhat.com, vkuznets@redhat.com,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] KVM: selftests: Test Hyper-V extended hypercall enablement
Date: Mon, 7 Nov 2022 10:27:50 -0800	[thread overview]
Message-ID: <Y2lOJqLaLIBxEP7P@google.com> (raw)
In-Reply-To: <20221105045704.2315186-4-vipinsh@google.com>

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 :)

> 
> Signed-off-by: Vipin Sharma <vipinsh@google.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
> 

  reply	other threads:[~2022-11-07 18:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-05  4:56 [PATCH 0/6] Add Hyper-v extended hypercall support in KVM Vipin Sharma
2022-11-05  4:56 ` [PATCH 1/6] KVM: x86: hyper-v: Use common code for hypercall userspace exit Vipin Sharma
2022-11-05  4:57 ` [PATCH 2/6] KVM: x86: hyper-v: Add extended hypercall support in Hyper-v Vipin Sharma
2022-11-05  4:57 ` [PATCH 3/6] KVM: selftests: Test Hyper-V extended hypercall enablement Vipin Sharma
2022-11-07 18:27   ` David Matlack [this message]
2022-11-08  1:46     ` Vipin Sharma
2022-11-05  4:57 ` [PATCH 4/6] KVM: selftests: Make Hyper-V guest OS ID common Vipin Sharma
2022-11-07 19:08   ` David Matlack
2022-11-08  1:45     ` Vipin Sharma
2022-11-08 17:56       ` David Matlack
2022-11-09 13:48   ` Vitaly Kuznetsov
2022-11-09 18:52     ` Vipin Sharma
2022-11-09 20:18       ` Sean Christopherson
2022-11-10 10:02       ` Vitaly Kuznetsov
2022-11-05  4:57 ` [PATCH 5/6] KVM: selftests: Move hypercall() to hyper.h Vipin Sharma
2022-11-07 18:30   ` David Matlack
2022-11-08  1:48     ` Vipin Sharma
2022-11-08 17:40       ` David Matlack
2022-11-09 13:46   ` Vitaly Kuznetsov
2022-11-05  4:57 ` [PATCH 6/6] KVM: selftests: Test Hyper-V extended hypercall exit to userspace Vipin Sharma
2022-11-07 19:01   ` David Matlack
2022-11-08  2:04     ` Vipin Sharma
2022-11-08 17:44       ` David Matlack

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y2lOJqLaLIBxEP7P@google.com \
    --to=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vipinsh@google.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox