From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [intel-tdx:kvm-upstream-next 196/273] arch/x86/kvm/x86.c:14007 pre_move_enc_context_from() warn: missing error code 'ret'
Date: Fri, 17 Nov 2023 20:42:07 +0800 [thread overview]
Message-ID: <202311171944.g4l2vVTQ-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Sagi Shahar <sagis@google.com>
CC: Isaku Yamahata <isaku.yamahata@intel.com>
tree: https://github.com/intel/tdx.git kvm-upstream-next
head: 90fec84219b5d2bf13e61f02777f6a44ab755bc4
commit: bf2a53c6d4d7151ace11879b20cacf6b07bdedcb [196/273] KVM: SEV: Refactor common code out of sev_vm_move_enc_context_from
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: x86_64-randconfig-161-20231117 (https://download.01.org/0day-ci/archive/20231117/202311171944.g4l2vVTQ-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20231117/202311171944.g4l2vVTQ-lkp@intel.com/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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202311171944.g4l2vVTQ-lkp@intel.com/
New smatch warnings:
arch/x86/kvm/x86.c:14007 pre_move_enc_context_from() warn: missing error code 'ret'
Old smatch warnings:
arch/x86/kvm/x86.c:5700 kvm_arch_tsc_set_attr() warn: check for integer overflow 'offset'
arch/x86/kvm/x86.c:5742 kvm_vcpu_ioctl_device_attr() error: uninitialized symbol 'r'.
arch/x86/kvm/x86.c:7902 emulator_read_write() warn: missing error code? 'rc'
arch/x86/kvm/x86.c:9068 x86_emulate_instruction() warn: missing error code? 'r'
arch/x86/include/asm/kvm-x86-ops.h:17 kvm_ops_update() warn: inconsistent indenting
vim +/ret +14007 arch/x86/kvm/x86.c
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13982
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13983 int pre_move_enc_context_from(struct kvm *dst_kvm, struct kvm *src_kvm,
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13984 atomic_t *dst_migration_in_progress,
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13985 atomic_t *src_migration_in_progress)
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13986 {
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13987 struct kvm_vcpu *src_vcpu;
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13988 unsigned long i;
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13989 int ret = -EINVAL;
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13990
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13991 ret = lock_two_vms_for_migration(dst_kvm, src_kvm,
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13992 dst_migration_in_progress,
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13993 src_migration_in_progress);
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13994 if (ret)
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13995 return ret;
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13996
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13997 ret = lock_vcpus_for_migration(dst_kvm, MIGRATION_TARGET);
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13998 if (ret)
bf2a53c6d4d715 Sagi Shahar 2023-04-07 13999 goto unlock_vms;
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14000
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14001 ret = lock_vcpus_for_migration(src_kvm, MIGRATION_SOURCE);
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14002 if (ret)
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14003 goto unlock_dst_vcpu;
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14004
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14005 if (atomic_read(&dst_kvm->online_vcpus) !=
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14006 atomic_read(&src_kvm->online_vcpus))
bf2a53c6d4d715 Sagi Shahar 2023-04-07 @14007 goto unlock_dst_vcpu;
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14008
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14009 kvm_for_each_vcpu(i, src_vcpu, src_kvm) {
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14010 if (!src_vcpu->arch.guest_state_protected)
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14011 goto unlock_dst_vcpu;
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14012 }
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14013
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14014 return 0;
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14015
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14016 unlock_dst_vcpu:
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14017 unlock_vcpus_for_migration(dst_kvm);
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14018 unlock_vms:
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14019 unlock_two_vms_for_migration(dst_kvm, src_kvm,
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14020 dst_migration_in_progress,
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14021 src_migration_in_progress);
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14022
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14023 return ret;
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14024 }
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14025 EXPORT_SYMBOL_GPL(pre_move_enc_context_from);
bf2a53c6d4d715 Sagi Shahar 2023-04-07 14026
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2023-11-17 12:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-17 12:42 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-11-20 12:59 [intel-tdx:kvm-upstream-next 196/273] arch/x86/kvm/x86.c:14007 pre_move_enc_context_from() warn: missing error code 'ret' Dan Carpenter
2023-11-20 19:47 ` Yamahata, Isaku
2023-11-17 7:34 kernel test robot
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=202311171944.g4l2vVTQ-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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.