]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - arch/powerpc/kvm/book3s_64_vio_hv.c
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[mirror_ubuntu-jammy-kernel.git] / arch / powerpc / kvm / book3s_64_vio_hv.c
index f38dfe195ef280458d66cad59257ccf0bf30194c..870b7f0c7ea561fb323439add7e294a3007cdb6f 100644 (file)
@@ -173,10 +173,13 @@ static void kvmppc_rm_tce_put(struct kvmppc_spapr_tce_table *stt,
        idx -= stt->offset;
        page = stt->pages[idx / TCES_PER_PAGE];
        /*
-        * page must not be NULL in real mode,
-        * kvmppc_rm_ioba_validate() must have taken care of this.
+        * kvmppc_rm_ioba_validate() allows pages not be allocated if TCE is
+        * being cleared, otherwise it returns H_TOO_HARD and we skip this.
         */
-       WARN_ON_ONCE_RM(!page);
+       if (!page) {
+               WARN_ON_ONCE_RM(tce != 0);
+               return;
+       }
        tbl = kvmppc_page_address(page);
 
        tbl[idx % TCES_PER_PAGE] = tce;