]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/hyperv: Move the code in ivm.c around to avoid unnecessary ifdef's
authorDexuan Cui <decui@microsoft.com>
Thu, 24 Aug 2023 08:07:12 +0000 (01:07 -0700)
committerWei Liu <wei.liu@kernel.org>
Fri, 25 Aug 2023 00:04:57 +0000 (00:04 +0000)
commita67f6b60d6ed953d5b23a22f26fc916aab630aaa
tree57a186fd985cc1c94e007218673e0475beff1f70
parente3131f1c81448a87e08dffd21867312a5ce563d9
x86/hyperv: Move the code in ivm.c around to avoid unnecessary ifdef's

Group the code this way so that we can avoid too many ifdef's:

  Data only used in an SNP VM with the paravisor;
  Functions only used in an SNP VM with the paravisor;

  Data only used in an SNP VM without the paravisor;
  Functions only used in an SNP VM without the paravisor;

  Functions only used in a TDX VM, with and without the paravisor;

  Functions used in an SNP or TDX VM, when the paravisor is present;

  Functions always used, even in a regular non-CoCo VM.

No functional change.

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Reviewed-by: Tianyu Lan <tiala@microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Link: https://lore.kernel.org/r/20230824080712.30327-11-decui@microsoft.com
arch/x86/hyperv/ivm.c