From: kernel test robot <lkp@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Maxim Levitsky <mlevitsk@redhat.com>
Subject: [linux-next:master 10436/11962] arch/x86/kvm/smm.c:651 emulator_leave_smm() warn: inconsistent indenting
Date: Sat, 14 Sep 2024 14:56:18 +0800 [thread overview]
Message-ID: <202409141449.UcocWbNb-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 5acd9952f95fb4b7da6d09a3be39195a80845eb6
commit: 3f6821aa147b6e6fe07e8b35999724518b74a632 [10436/11962] KVM: x86: Forcibly leave nested if RSM to L2 hits shutdown
config: i386-randconfig-141-20240914 (https://download.01.org/0day-ci/archive/20240914/202409141449.UcocWbNb-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409141449.UcocWbNb-lkp@intel.com/
New smatch warnings:
arch/x86/kvm/smm.c:651 emulator_leave_smm() warn: inconsistent indenting
Old smatch warnings:
arch/x86/kvm/smm.c:300 enter_smm() warn: inconsistent indenting
vim +651 arch/x86/kvm/smm.c
625
626 /*
627 * FIXME: When resuming L2 (a.k.a. guest mode), the transition to guest
628 * mode should happen _after_ loading state from SMRAM. However, KVM
629 * piggybacks the nested VM-Enter flows (which is wrong for many other
630 * reasons), and so nSVM/nVMX would clobber state that is loaded from
631 * SMRAM and from the VMCS/VMCB.
632 */
633 if (kvm_x86_call(leave_smm)(vcpu, &smram))
634 return X86EMUL_UNHANDLEABLE;
635
636 #ifdef CONFIG_X86_64
637 if (guest_cpuid_has(vcpu, X86_FEATURE_LM))
638 ret = rsm_load_state_64(ctxt, &smram.smram64);
639 else
640 #endif
641 ret = rsm_load_state_32(ctxt, &smram.smram32);
642
643 /*
644 * If RSM fails and triggers shutdown, architecturally the shutdown
645 * occurs *before* the transition to guest mode. But due to KVM's
646 * flawed handling of RSM to L2 (see above), the vCPU may already be
647 * in_guest_mode(). Force the vCPU out of guest mode before delivering
648 * the shutdown, so that L1 enters shutdown instead of seeing a VM-Exit
649 * that architecturally shouldn't be possible.
650 */
> 651 if (ret != X86EMUL_CONTINUE && is_guest_mode(vcpu))
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-09-14 6:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202409141449.UcocWbNb-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-mm@kvack.org \
--cc=mlevitsk@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=seanjc@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox