Re: [PATCH, RESEND] x86/sev: Fix SEV check in sev_map_percpu_data()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 01, 2024 at 12:38:09PM -0700, Nathan Chancellor wrote:
> Perhaps another solution would be to just
> 
>   #define cc_vendor (CC_VENDOR_NONE)
> 
> if CONFIG_ARCH_HAS_CC_PLATFORM is not set, since it can never be changed
> from the default in arch/x86/coco/core.c.

I think this approach is cleaner.

Could you post a proper patch?

> 
> diff --git a/arch/x86/include/asm/coco.h b/arch/x86/include/asm/coco.h
> index 6ae2d16a7613..f3909894f82f 100644
> --- a/arch/x86/include/asm/coco.h
> +++ b/arch/x86/include/asm/coco.h
> @@ -10,13 +10,13 @@ enum cc_vendor {
>  	CC_VENDOR_INTEL,
>  };
>  
> -extern enum cc_vendor cc_vendor;
> -
>  #ifdef CONFIG_ARCH_HAS_CC_PLATFORM
> +extern enum cc_vendor cc_vendor;
>  void cc_set_mask(u64 mask);
>  u64 cc_mkenc(u64 val);
>  u64 cc_mkdec(u64 val);
>  #else
> +#define cc_vendor (CC_VENDOR_NONE)
>  static inline u64 cc_mkenc(u64 val)
>  {
>  	return val;
> 
> Cheers,
> Nathan
> 

-- 
  Kiryl Shutsemau / Kirill A. Shutemov




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux