kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Wei Wang <wei.w.wang@intel.com>, scgl@linux.ibm.com, kvm@vger.kernel.org
Cc: seanjc@google.com, guang.zeng@intel.com, jing2.liu@intel.com,
	yang.zhong@intel.com, tglx@linutronix.de, kevin.tian@intel.com
Subject: Re: [PATCH] kvm: selftests: conditionally build vm_xsave_req_perm()
Date: Tue, 18 Jan 2022 09:43:26 +0100	[thread overview]
Message-ID: <a583d2a2-f489-e3a9-fc69-c5ba0e0b5372@redhat.com> (raw)
In-Reply-To: <20220118014817.30910-1-wei.w.wang@intel.com>

On 1/18/22 02:48, Wei Wang wrote:
> vm_xsave_req_perm() is currently defined and used by x86_64 only.
> Make it compiled into vm_create_with_vcpus() only when on x86_64
> machines. Otherwise, it would cause linkage errors, e.g. on s390x.
> 
> Fixes: 415a3c33e8 ("kvm: selftests: Add support for KVM_CAP_XSAVE2")
> Reported-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
> Signed-off-by: Wei Wang <wei.w.wang@intel.com>
> ---
>   tools/testing/selftests/kvm/lib/kvm_util.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c
> index 4a645dc77f34..c22a17aac6b0 100644
> --- a/tools/testing/selftests/kvm/lib/kvm_util.c
> +++ b/tools/testing/selftests/kvm/lib/kvm_util.c
> @@ -393,10 +393,12 @@ struct kvm_vm *vm_create_with_vcpus(enum vm_guest_mode mode, uint32_t nr_vcpus,
>   	struct kvm_vm *vm;
>   	int i;
>   
> +#ifdef __x86_64__
>   	/*
>   	 * Permission needs to be requested before KVM_SET_CPUID2.
>   	 */
>   	vm_xsave_req_perm();
> +#endif
>   
>   	/* Force slot0 memory size not small than DEFAULT_GUEST_PHY_PAGES */
>   	if (slot0_mem_pages < DEFAULT_GUEST_PHY_PAGES)

Queued, thanks.

Paolo


      parent reply	other threads:[~2022-01-18  8:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18  1:48 [PATCH] kvm: selftests: conditionally build vm_xsave_req_perm() Wei Wang
2022-01-18  8:02 ` Janis Schoetterl-Glausch
2022-01-18  8:43 ` Paolo Bonzini [this message]

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=a583d2a2-f489-e3a9-fc69-c5ba0e0b5372@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=guang.zeng@intel.com \
    --cc=jing2.liu@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=scgl@linux.ibm.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=wei.w.wang@intel.com \
    --cc=yang.zhong@intel.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;
as well as URLs for NNTP newsgroup(s).