public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Oliver Upton <oliver.upton@linux.dev>
Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org,
	Paolo Bonzini <pbonzini@redhat.com>,
	Marc Zyngier <maz@kernel.org>, James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>,
	Salil Mehta <salil.mehta@huawei.com>
Subject: Re: [PATCH v2 01/13] KVM: x86: Redefine 'longmode' as a flag for KVM_EXIT_HYPERCALL
Date: Thu, 30 Mar 2023 10:32:12 -0700	[thread overview]
Message-ID: <ZCXHnFz7gB8QJzvD@google.com> (raw)
In-Reply-To: <20230330154918.4014761-2-oliver.upton@linux.dev>

On Thu, Mar 30, 2023, Oliver Upton wrote:
> The 'longmode' field is a bit annoying as it blows an entire __u32 to
> represent a boolean value. Since other architectures are looking to add
> support for KVM_EXIT_HYPERCALL, now is probably a good time to clean it
> up.
> 
> Redefine the field (and the remaining padding) as a set of flags.
> Preserve the existing ABI by using bit 0 to indicate if the guest was in
> long mode and requiring that the remaining 31 bits must be zero.
> 
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Sean Christopherson <seanjc@google.com>
> Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
> ---

Acked-by: Sean Christopherson <seanjc@google.com>

>  Documentation/virt/kvm/api.rst  | 3 +--
>  arch/x86/include/asm/kvm_host.h | 7 +++++++
>  arch/x86/include/uapi/asm/kvm.h | 3 +++
>  arch/x86/kvm/x86.c              | 6 +++++-
>  include/uapi/linux/kvm.h        | 9 +++++++--
>  5 files changed, 23 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
> index 62de0768d6aa..9b01e3d0e757 100644
> --- a/Documentation/virt/kvm/api.rst
> +++ b/Documentation/virt/kvm/api.rst
> @@ -6218,8 +6218,7 @@ to the byte array.
>  			__u64 nr;
>  			__u64 args[6];
>  			__u64 ret;
> -			__u32 longmode;
> -			__u32 pad;
> +			__u64 flags;
>  		} hypercall;
>  
>  Unused.  This was once used for 'hypercall to userspace'.  To implement

Note to self, this needs to be updated as "hypercall" is longer unused.

  reply	other threads:[~2023-03-30 17:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 15:49 [PATCH v2 00/13] KVM: arm64: Userspace SMCCC call filtering Oliver Upton
2023-03-30 15:49 ` [PATCH v2 01/13] KVM: x86: Redefine 'longmode' as a flag for KVM_EXIT_HYPERCALL Oliver Upton
2023-03-30 17:32   ` Sean Christopherson [this message]
2023-03-30 15:49 ` [PATCH v2 02/13] KVM: arm64: Add a helper to check if a VM has ran once Oliver Upton
2023-03-30 15:49 ` [PATCH v2 03/13] KVM: arm64: Add vm fd device attribute accessors Oliver Upton
2023-03-30 15:49 ` [PATCH v2 04/13] KVM: arm64: Rename SMC/HVC call handler to reflect reality Oliver Upton
2023-03-30 15:49 ` [PATCH v2 05/13] KVM: arm64: Start handling SMCs from EL1 Oliver Upton
2023-03-30 15:49 ` [PATCH v2 06/13] KVM: arm64: Refactor hvc filtering to support different actions Oliver Upton
2023-03-31 17:03   ` Marc Zyngier
2023-03-31 17:58     ` Oliver Upton
2023-03-30 15:49 ` [PATCH v2 07/13] KVM: arm64: Use a maple tree to represent the SMCCC filter Oliver Upton
2023-03-30 15:49 ` [PATCH v2 08/13] KVM: arm64: Add support for KVM_EXIT_HYPERCALL Oliver Upton
2023-03-31 17:10   ` Marc Zyngier
2023-03-31 18:00     ` Oliver Upton
2023-03-30 15:49 ` [PATCH v2 09/13] KVM: arm64: Indroduce support for userspace SMCCC filtering Oliver Upton
2023-03-31 19:13   ` Marc Zyngier
2023-04-03 16:28     ` Oliver Upton
2023-03-30 15:49 ` [PATCH v2 10/13] KVM: arm64: Return NOT_SUPPORTED to guest for unknown PSCI version Oliver Upton
2023-03-30 15:49 ` [PATCH v2 11/13] KVM: arm64: Let errors from SMCCC emulation to reach userspace Oliver Upton
2023-03-30 15:49 ` [PATCH v2 12/13] KVM: selftests: Add a helper for SMCCC calls with SMC instruction Oliver Upton
2023-03-30 15:49 ` [PATCH v2 13/13] KVM: selftests: Add test for SMCCC filter Oliver Upton

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=ZCXHnFz7gB8QJzvD@google.com \
    --to=seanjc@google.com \
    --cc=james.morse@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=salil.mehta@huawei.com \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.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