Re: [PATCH v3 4/8] KVM: SEV: Add direct VMSA capability
From: kernel test robot
Date: Mon Nov 02 2026 - 23:52:54 EST
Hi Jörg,
kernel test robot noticed the following build errors:
[auto build test ERROR on kvm/queue]
[also build test ERROR on kvm/next linus/master next-20261030]
[cannot apply to tip/x86/core mst-vhost/linux-next kvm/linux-next v7.3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/J-rg-R-del/KVM-SEV-Document-SNP-direct-VMSA-userspace-ABI/20261102-124130
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
patch link: https://lore.kernel.org/r/20261102114137.1198982-5-joro%408bytes.org
patch subject: [PATCH v3 4/8] KVM: SEV: Add direct VMSA capability
config: x86_64-rhel-9.4-rust (https://download.01.org/0day-ci/archive/20261103/202611031239.b4rFO1dx-lkp@xxxxxxxxx/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261103/202611031239.b4rFO1dx-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611031239.b4rFO1dx-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> arch/x86/kvm/svm/svm.c:5473:2: error: cannot jump from switch statement to this case label
5473 | default:
| ^
arch/x86/kvm/svm/svm.c:5466:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
5466 | guard(mutex)(&kvm->lock);
| ^
include/linux/cleanup.h:423:2: note: expanded from macro 'guard'
423 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/cleanup.h:303:3: note: expanded from macro 'CLASS'
303 | class_##_name##_constructor
| ^
<scratch space>:80:1: note: expanded from here
80 | class_mutex_constructor
| ^
note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
16 | #define __PASTE(a, b) ___PASTE(a, b)
| ^
include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
15 | #define ___PASTE(a, b) a##b
| ^
<scratch space>:86:1: note: expanded from here
86 | __UNIQUE_ID_unlock_1239
| ^
arch/x86/kvm/svm/svm.c:5466:3: note: jump bypasses initialization of variable with __attribute__((cleanup))
include/linux/cleanup.h:423:15: note: expanded from macro 'guard'
423 | CLASS(_name, __UNIQUE_ID(guard))
| ^
include/linux/compiler.h:165:2: note: expanded from macro '__UNIQUE_ID'
165 | __PASTE(__UNIQUE_ID_, \
| ^
include/linux/compiler_types.h:16:23: note: expanded from macro '__PASTE'
16 | #define __PASTE(a, b) ___PASTE(a, b)
| ^
include/linux/compiler_types.h:15:24: note: expanded from macro '___PASTE'
15 | #define ___PASTE(a, b) a##b
| ^
<scratch space>:74:1: note: expanded from here
74 | __UNIQUE_ID_guard_1238
| ^
1 error generated.
vim +5473 arch/x86/kvm/svm/svm.c
5456
5457 static int svm_enable_vm_cap(struct kvm *kvm, struct kvm_enable_cap *cap)
5458 {
5459 switch (cap->cap) {
5460 #ifdef CONFIG_KVM_AMD_SEV
5461 case KVM_CAP_SNP_DIRECT_VMSA:
5462 if (memchr_inv(cap->args, 0, sizeof(cap->args)) ||
5463 kvm->arch.vm_type != KVM_X86_SNP_VM)
5464 return -EINVAL;
5465
5466 guard(mutex)(&kvm->lock);
5467 if (kvm->created_vcpus)
5468 return -EINVAL;
5469
5470 to_kvm_sev_info(kvm)->snp_direct_vmsa = true;
5471 return 0;
5472 #endif
> 5473 default:
5474 return -EINVAL;
5475 }
5476 }
5477
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki