public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sairaj Kodilkar <sarunkod@amd.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	Thomas Gleixner <tglx@kernel.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	x86@kernel.org
Cc: oe-kbuild-all@lists.linux.dev, suravee.suthikulpanit@amd.com,
	vasant.hegde@amd.com, nikunj.dadhania@amd.com,
	Manali.Shukla@amd.com, Sairaj Kodilkar <sarunkod@amd.com>
Subject: Re: [PATCH] KVM: x86: Add support for cmpxchg16b emulation
Date: Sat, 7 Mar 2026 10:39:46 +0800	[thread overview]
Message-ID: <202603071055.Wi43mREW-lkp@intel.com> (raw)
In-Reply-To: <20260306102047.29760-1-sarunkod@amd.com>

Hi Sairaj,

kernel test robot noticed the following build warnings:

[auto build test WARNING on kvm/queue]
[also build test WARNING on kvm/next tip/master linus/master v7.0-rc2 next-20260306]
[cannot apply to kvm/linux-next tip/auto-latest]
[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/Sairaj-Kodilkar/KVM-x86-Add-support-for-cmpxchg16b-emulation/20260306-182915
base:   https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
patch link:    https://lore.kernel.org/r/20260306102047.29760-1-sarunkod%40amd.com
patch subject: [PATCH] KVM: x86: Add support for cmpxchg16b emulation
config: i386-randconfig-005-20260307 (https://download.01.org/0day-ci/archive/20260307/202603071055.Wi43mREW-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.4.0-5) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260307/202603071055.Wi43mREW-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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603071055.Wi43mREW-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from arch/x86/kvm/emulate.c:24:
   arch/x86/kvm/kvm_emulate.h:271:17: error: unknown type name '__uint128_t'
     271 |                 __uint128_t val128;
         |                 ^~~~~~~~~~~
   arch/x86/kvm/emulate.c: In function '__handle_cmpxchg16b':
   arch/x86/kvm/emulate.c:2215:9: error: unknown type name '__uint128_t'; did you mean '__int128__'?
    2215 |         __uint128_t old128 = ctxt->dst.val128;
         |         ^~~~~~~~~~~
         |         __int128__
>> arch/x86/kvm/emulate.c:2222:28: warning: right shift count >= width of type [-Wshift-count-overflow]
    2222 |             ((u64) (old128 >> 64) != (u64) reg_read(ctxt, VCPU_REGS_RDX))) {
         |                            ^~
   arch/x86/kvm/emulate.c:2224:65: warning: right shift count >= width of type [-Wshift-count-overflow]
    2224 |                 *reg_write(ctxt, VCPU_REGS_RDX) = (u64) (old128 >> 64);
         |                                                                 ^~
   arch/x86/kvm/emulate.c:2228:27: error: '__uint128_t' undeclared (first use in this function); did you mean '__int128__'?
    2228 |                         ((__uint128_t) reg_read(ctxt, VCPU_REGS_RCX) << 64) |
         |                           ^~~~~~~~~~~
         |                           __int128__
   arch/x86/kvm/emulate.c:2228:27: note: each undeclared identifier is reported only once for each function it appears in
   arch/x86/kvm/emulate.c:2228:39: error: expected ')' before 'reg_read'
    2228 |                         ((__uint128_t) reg_read(ctxt, VCPU_REGS_RCX) << 64) |
         |                         ~             ^~~~~~~~~
         |                                       )


vim +2222 arch/x86/kvm/emulate.c

  2212	
  2213	static int __handle_cmpxchg16b(struct x86_emulate_ctxt *ctxt)
  2214	{
  2215		__uint128_t old128 = ctxt->dst.val128;
  2216	
  2217		/* Use of the REX.W prefix promotes operation to 128 bits */
  2218		if (!(ctxt->rex_bits & REX_W))
  2219			return X86EMUL_UNHANDLEABLE;
  2220	
  2221		if (((u64) (old128 >> 0) != (u64) reg_read(ctxt, VCPU_REGS_RAX)) ||
> 2222		    ((u64) (old128 >> 64) != (u64) reg_read(ctxt, VCPU_REGS_RDX))) {
  2223			*reg_write(ctxt, VCPU_REGS_RAX) = (u64) (old128 >> 0);
  2224			*reg_write(ctxt, VCPU_REGS_RDX) = (u64) (old128 >> 64);
  2225			ctxt->eflags &= ~X86_EFLAGS_ZF;
  2226		} else {
  2227			ctxt->dst.val128 =
  2228				((__uint128_t) reg_read(ctxt, VCPU_REGS_RCX) << 64) |
  2229				(u64) reg_read(ctxt, VCPU_REGS_RBX);
  2230	
  2231			ctxt->eflags |= X86_EFLAGS_ZF;
  2232		}
  2233		return X86EMUL_CONTINUE;
  2234	}
  2235	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2026-03-07  2:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06 10:20 [PATCH] KVM: x86: Add support for cmpxchg16b emulation Sairaj Kodilkar
2026-03-06 15:38 ` Sean Christopherson
2026-03-11 11:18   ` Sairaj Kodilkar
2026-03-12 11:46   ` Paolo Bonzini
2026-03-07  2:39 ` kernel test robot [this message]
2026-03-07  5:40 ` 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=202603071055.Wi43mREW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Manali.Shukla@amd.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nikunj.dadhania@amd.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=sarunkod@amd.com \
    --cc=seanjc@google.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tglx@kernel.org \
    --cc=vasant.hegde@amd.com \
    --cc=x86@kernel.org \
    /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