From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C8B1C433F5 for ; Fri, 20 May 2022 12:48:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 155166B0073; Fri, 20 May 2022 08:48:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 104546B0075; Fri, 20 May 2022 08:48:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F0EE48D0001; Fri, 20 May 2022 08:48:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E28A36B0073 for ; Fri, 20 May 2022 08:48:50 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B2C3834D24 for ; Fri, 20 May 2022 12:48:50 +0000 (UTC) X-FDA: 79486100820.31.7416BAC Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by imf12.hostedemail.com (Postfix) with ESMTP id 9A7AA4000D for ; Fri, 20 May 2022 12:48:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653050929; x=1684586929; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ydq2rAxzxy58oJMneM/mj2UuLnLEiLOSmzW01gULOvU=; b=Yhq6nOrztPGDyR+UtAyDKLG3kNnLR9ha5VdihfKkpZh8z8RNSdpbI5J5 cyCXmCQ3X32Y2hGJYyW8N5o5Z6/MZzeIBh8IYNrHUHn9RMJt65izRhsMi ddeVqA+Y2KF1F/ewYI/utpmZJtnAY723zS3mqEyqhIAA28NFntVNXqXnn 90QqM/7OLlzKryg8bBgPDBGR6EO+5v2F3hfcI1a0FuOlTyxvja3H3vFsv 6rgTUx9tU9FK1xL8pSp8/L3ZI4Zpg4Sq/wE8IGGxrFl7MKTDUrokmq728 Pstor+OaPqjkqekcmMKeHHXikQlSuYOmew9DerQYgnmixHaVcKxjZlJ6K g==; X-IronPort-AV: E=McAfee;i="6400,9594,10352"; a="271414099" X-IronPort-AV: E=Sophos;i="5.91,239,1647327600"; d="scan'208";a="271414099" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2022 05:48:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,239,1647327600"; d="scan'208";a="662248000" Received: from lkp-server02.sh.intel.com (HELO 242b25809ac7) ([10.239.97.151]) by FMSMGA003.fm.intel.com with ESMTP; 20 May 2022 05:48:44 -0700 Received: from kbuild by 242b25809ac7 with local (Exim 4.95) (envelope-from ) id 1ns23g-0004hw-5m; Fri, 20 May 2022 12:48:44 +0000 Date: Fri, 20 May 2022 20:48:19 +0800 From: kernel test robot To: zhenwei pi , akpm@linux-foundation.org, naoya.horiguchi@nec.com, mst@redhat.com, david@redhat.com Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, jasowang@redhat.com, virtualization@lists.linux-foundation.org, pbonzini@redhat.com, peterx@redhat.com, qemu-devel@nongnu.org, zhenwei pi Subject: Re: [PATCH 3/3] virtio_balloon: Introduce memory recover Message-ID: <202205202014.mgqgBrKd-lkp@intel.com> References: <20220520070648.1794132-4-pizhenwei@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220520070648.1794132-4-pizhenwei@bytedance.com> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 9A7AA4000D X-Stat-Signature: 1tfz51586mkoctxi5xfrq1kuwf79x98g Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Yhq6nOrz; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf12.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.120) smtp.mailfrom=lkp@intel.com X-Rspam-User: X-HE-Tag: 1653050898-847222 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi zhenwei, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on akpm-mm/mm-everything] [also build test WARNING on next-20220519] [cannot apply to linux/master linus/master v5.18-rc7] [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] url: https://github.com/intel-lab-lkp/linux/commits/zhenwei-pi/recover-hardware-corrupted-page-by-virtio-balloon/20220520-151328 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything config: hexagon-randconfig-r041-20220519 (https://download.01.org/0day-ci/archive/20220520/202205202014.mgqgBrKd-lkp@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e00cbbec06c08dc616a0d52a20f678b8fbd4e304) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/a42127073dd4adb6354649c8235c5cde033d01f2 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review zhenwei-pi/recover-hardware-corrupted-page-by-virtio-balloon/20220520-151328 git checkout a42127073dd4adb6354649c8235c5cde033d01f2 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/virtio/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/virtio/virtio_balloon.c:654:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] default: ^ drivers/virtio/virtio_balloon.c:654:2: note: insert 'break;' to avoid fall-through default: ^ break; 1 warning generated. vim +654 drivers/virtio/virtio_balloon.c 593 594 static void recover_vq_handle_response(struct virtio_balloon *vb, unsigned int len) 595 { 596 struct __virtio_balloon_recover *in_vbr; 597 struct virtio_balloon_recover *vbr; 598 struct page *page; 599 unsigned int pfns; 600 u32 pfn0, pfn1; 601 __u8 status; 602 603 /* the response is not expected */ 604 if (unlikely(len != sizeof(struct __virtio_balloon_recover))) 605 return; 606 607 in_vbr = &vb->in_vbr; 608 vbr = &in_vbr->vbr; 609 if (unlikely(vbr->cmd != VIRTIO_BALLOON_R_CMD_RESPONSE)) 610 return; 611 612 /* to make sure the contiguous balloon PFNs */ 613 for (pfns = 1; pfns < VIRTIO_BALLOON_PAGES_PER_PAGE; pfns++) { 614 pfn0 = virtio32_to_cpu(vb->vdev, in_vbr->pfns[pfns - 1]); 615 pfn1 = virtio32_to_cpu(vb->vdev, in_vbr->pfns[pfns]); 616 if (pfn1 - pfn0 != 1) 617 return; 618 } 619 620 pfn0 = virtio32_to_cpu(vb->vdev, in_vbr->pfns[0]); 621 if (!pfn_valid(pfn0)) 622 return; 623 624 pfn1 = -1; 625 spin_lock(&vb->recover_page_list_lock); 626 list_for_each_entry(page, &vb->corrupted_page_list, lru) { 627 pfn1 = page_to_pfn(page); 628 if (pfn1 == pfn0) 629 break; 630 } 631 spin_unlock(&vb->recover_page_list_lock); 632 633 status = vbr->status; 634 switch (status) { 635 case VIRTIO_BALLOON_R_STATUS_RECOVERED: 636 if (pfn1 == pfn0) { 637 spin_lock(&vb->recover_page_list_lock); 638 list_del(&page->lru); 639 balloon_page_push(&vb->recovered_page_list, page); 640 spin_unlock(&vb->recover_page_list_lock); 641 queue_work(system_freezable_wq, &vb->unpoison_memory_work); 642 dev_info_ratelimited(&vb->vdev->dev, "recovered pfn 0x%x", pfn0); 643 } 644 break; 645 case VIRTIO_BALLOON_R_STATUS_FAILED: 646 /* the hypervisor can't fix this corrupted page, balloon puts page */ 647 if (pfn1 == pfn0) { 648 spin_lock(&vb->recover_page_list_lock); 649 list_del(&page->lru); 650 spin_unlock(&vb->recover_page_list_lock); 651 put_page(page); 652 dev_info_ratelimited(&vb->vdev->dev, "failed to recover pfn 0x%x", pfn0); 653 } > 654 default: 655 break; 656 }; 657 658 /* continue to get response from host side if the response gets handled successfully */ 659 recover_vq_get_response(vb); 660 } 661 -- 0-DAY CI Kernel Test Service https://01.org/lkp