From: kernel test robot <lkp@intel.com>
To: Dexuan Cui <decui@microsoft.com>,
kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org,
longli@microsoft.com, linux-hyperv@vger.kernel.org,
linux-kernel@vger.kernel.org, mhklinux@outlook.com,
matthew.ruffell@canonical.com, johansen@templeofstupid.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
stable@vger.kernel.org
Subject: Re: [PATCH] Drivers: hv: vmbus: Improve the logc of reserving fb_mmio on Gen2 VMs
Date: Fri, 1 May 2026 00:33:18 +0800 [thread overview]
Message-ID: <202605010002.dnnxVZFF-lkp@intel.com> (raw)
In-Reply-To: <20260416183529.838321-1-decui@microsoft.com>
Hi Dexuan,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v7.1-rc1 next-20260429]
[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/Dexuan-Cui/Drivers-hv-vmbus-Improve-the-logc-of-reserving-fb_mmio-on-Gen2-VMs/20260424-033622
base: linus/master
patch link: https://lore.kernel.org/r/20260416183529.838321-1-decui%40microsoft.com
patch subject: [PATCH] Drivers: hv: vmbus: Improve the logc of reserving fb_mmio on Gen2 VMs
config: i386-buildonly-randconfig-002-20260430 (https://download.01.org/0day-ci/archive/20260501/202605010002.dnnxVZFF-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260501/202605010002.dnnxVZFF-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/202605010002.dnnxVZFF-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/hv/vmbus_drv.c:2403:40: warning: result of comparison of constant 4294967296 with expression of type 'resource_size_t' (aka 'unsigned int') is always false [-Wtautological-constant-out-of-range-compare]
2403 | if (!low_mmio_base || low_mmio_base >= SZ_4G ||
| ~~~~~~~~~~~~~ ^ ~~~~~
1 warning generated.
vim +2403 drivers/hv/vmbus_drv.c
2385
2386 static void __maybe_unused vmbus_reserve_fb(void)
2387 {
2388 resource_size_t start = 0, size;
2389 resource_size_t low_mmio_base;
2390 struct pci_dev *pdev;
2391
2392 /* Hyper-V CoCo guests do not have a framebuffer device. */
2393 if (cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT))
2394 return;
2395
2396 if (efi_enabled(EFI_BOOT)) {
2397 /* Gen2 VM: get FB base from EFI framebuffer */
2398 if (IS_ENABLED(CONFIG_SYSFB)) {
2399 start = sysfb_primary_display.screen.lfb_base;
2400 size = max_t(__u32, sysfb_primary_display.screen.lfb_size, 0x800000);
2401
2402 low_mmio_base = hyperv_mmio->start;
> 2403 if (!low_mmio_base || low_mmio_base >= SZ_4G ||
2404 (start && start < low_mmio_base)) {
2405 pr_warn("Unexpected low mmio base 0x%pa\n", &low_mmio_base);
2406 } else {
2407 /*
2408 * If the kdump kernel's lfb_base is 0,
2409 * fall back to the low mmio base.
2410 */
2411 if (!start)
2412 start = low_mmio_base;
2413 /*
2414 * Reserve half of the space below 4GB for high
2415 * resolutions, but cap the reservation to 128MB.
2416 */
2417 size = min((SZ_4G - start) / 2, SZ_128M);
2418 }
2419 }
2420 } else {
2421 /* Gen1 VM: get FB base from PCI */
2422 pdev = pci_get_device(PCI_VENDOR_ID_MICROSOFT,
2423 PCI_DEVICE_ID_HYPERV_VIDEO, NULL);
2424 if (!pdev)
2425 return;
2426
2427 if (pdev->resource[0].flags & IORESOURCE_MEM) {
2428 start = pci_resource_start(pdev, 0);
2429 size = pci_resource_len(pdev, 0);
2430 }
2431
2432 /*
2433 * Release the PCI device so hyperv_drm driver can grab it
2434 * later.
2435 */
2436 pci_dev_put(pdev);
2437 }
2438
2439 if (!start)
2440 return;
2441
2442 /*
2443 * Make a claim for the frame buffer in the resource tree under the
2444 * first node, which will be the one below 4GB. The length seems to
2445 * be underreported, particularly in a Generation 1 VM. So start out
2446 * reserving a larger area and make it smaller until it succeeds.
2447 */
2448 for (; !fb_mmio && (size >= 0x100000); size >>= 1)
2449 fb_mmio = __request_region(hyperv_mmio, start, size, fb_mmio_name, 0);
2450
2451 pr_info("hv_mmio=%pR,%pR fb=%pR\n", hyperv_mmio, hyperv_mmio->sibling, fb_mmio);
2452 }
2453
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-04-30 16:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 18:35 [PATCH] Drivers: hv: vmbus: Improve the logc of reserving fb_mmio on Gen2 VMs Dexuan Cui
2026-04-16 19:58 ` Dexuan Cui
2026-04-17 18:19 ` Hardik Garg
2026-04-17 20:24 ` Krister Johansen
2026-04-21 6:51 ` Matthew Ruffell
2026-04-23 17:40 ` Michael Kelley
2026-04-29 3:12 ` Dexuan Cui
2026-04-29 18:01 ` Michael Kelley
2026-04-30 22:16 ` Dexuan Cui
2026-04-30 16:33 ` kernel test robot [this message]
2026-04-30 22:42 ` [EXTERNAL] " Dexuan Cui
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=202605010002.dnnxVZFF-lkp@intel.com \
--to=lkp@intel.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=johansen@templeofstupid.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=longli@microsoft.com \
--cc=matthew.ruffell@canonical.com \
--cc=mhklinux@outlook.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=wei.liu@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