Re: [PATCH v2] KVM: x86: Don't read guest CR3 when doing async pf while the MMU is direct

From: Sean Christopherson

Date: Fri Dec 12 2025 - 20:01:54 EST


On Sat, Dec 13, 2025, kernel test robot wrote:
> Hi Xiaoyao,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on 7d0a66e4bb9081d75c82ec4957c50034cb0ea449]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Xiaoyao-Li/KVM-x86-Don-t-read-guest-CR3-when-doing-async-pf-while-the-MMU-is-direct/20251212-220612
> base: 7d0a66e4bb9081d75c82ec4957c50034cb0ea449
> patch link: https://lore.kernel.org/r/20251212135051.2155280-1-xiaoyao.li%40intel.com
> patch subject: [PATCH v2] KVM: x86: Don't read guest CR3 when doing async pf while the MMU is direct
> config: i386-buildonly-randconfig-002-20251213 (https://download.01.org/0day-ci/archive/20251213/202512130717.aHH8rXSC-lkp@xxxxxxxxx/config)
> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512130717.aHH8rXSC-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/202512130717.aHH8rXSC-lkp@xxxxxxxxx/
>
> All warnings (new ones prefixed by >>):
>
> In file included from include/linux/kvm_host.h:43,
> from arch/x86/kvm/irq.h:15,
> from arch/x86/kvm/mmu/mmu.c:19:
> arch/x86/kvm/mmu/mmu.c: In function 'kvm_arch_setup_async_pf':
> >> include/linux/kvm_types.h:54:25: warning: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '18446744073709551615' to '4294967295' [-Woverflow]
> 54 | #define INVALID_GPA (~(gpa_t)0)
> | ^
> arch/x86/kvm/mmu/mmu.c:4525:28: note: in expansion of macro 'INVALID_GPA'
> 4525 | arch.cr3 = INVALID_GPA;
> | ^~~~~~~~~~~

Well that's just annoying. Can we kill 32-bit yet? Anyways, just ignore this
(unless it causes my KVM_WERROR=1 builds to fail, in which case I'll just add an
explicit cast, but I think we can just ignore it).