All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, ubizjak@gmail.com
Subject: Re: [PATCH] KVM: SVM: fix compilation with modular PSP and non-modular KVM
Date: Mon, 13 Apr 2020 16:30:47 -0700	[thread overview]
Message-ID: <20200413233047.GJ21204@linux.intel.com> (raw)
In-Reply-To: <20200413075032.5546-1-pbonzini@redhat.com>

On Mon, Apr 13, 2020 at 03:50:31AM -0400, Paolo Bonzini wrote:
> Use svm_sev_enabled() in order to cull all calls to PSP code.  Otherwise,
> compilation fails with undefined symbols if the PSP device driver is compiled
> as a module and KVM is not.
> 
> Reported-by: Uros Bizjak <ubizjak@gmail.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  arch/x86/kvm/svm/sev.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
> index 0e3fc311d7da..364ffe32139c 100644
> --- a/arch/x86/kvm/svm/sev.c
> +++ b/arch/x86/kvm/svm/sev.c
> @@ -1117,7 +1117,7 @@ int __init sev_hardware_setup(void)
>  	/* Maximum number of encrypted guests supported simultaneously */
>  	max_sev_asid = cpuid_ecx(0x8000001F);
>  
> -	if (!max_sev_asid)
> +        if (!svm_sev_enabled())
>  		return 1;
>  
>  	/* Minimum ASID value that should be used for SEV guest */
> @@ -1156,6 +1156,9 @@ int __init sev_hardware_setup(void)
>  
>  void sev_hardware_teardown(void)
>  {
> +        if (!svm_sev_enabled())
> +                return;
> +

Tabs instead of spaces.  Checkpatch also whinges about going past 75 chars
in the changelog.

>  	bitmap_free(sev_asid_bitmap);
>  	bitmap_free(sev_reclaim_asid_bitmap);
>  
> -- 
> 2.18.2
> 

  reply	other threads:[~2020-04-13 23:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13  7:50 [PATCH] KVM: SVM: fix compilation with modular PSP and non-modular KVM Paolo Bonzini
2020-04-13 23:30 ` Sean Christopherson [this message]
2020-04-16 13:57 ` Tom Lendacky
2020-04-16 14:14   ` Paolo Bonzini

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=20200413233047.GJ21204@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=ubizjak@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.