Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Sep 2021 19:05:59 GMT
From:      Ka Ho Ng <khng@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e6a1e05baf5d - stable/12 - bhyve amd: Small cleanups in amdvi_dump_cmds
Message-ID:  <202109031905.183J5xWA050595@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by khng:

URL: https://cgit.FreeBSD.org/src/commit/?id=e6a1e05baf5d4a8a406e8b615d05869dab9d02f1

commit e6a1e05baf5d4a8a406e8b615d05869dab9d02f1
Author:     Ka Ho Ng <khng@FreeBSD.org>
AuthorDate: 2021-03-23 08:11:56 +0000
Commit:     Ka Ho Ng <khng@FreeBSD.org>
CommitDate: 2021-09-03 18:46:40 +0000

    bhyve amd: Small cleanups in amdvi_dump_cmds
    
    Bump offset with MOD_INC instead in amdvi_dump_cmds.
    
    Reviewed by:    jhb
    Approved by:    philip (mentor)
    Differential Revision:  https://reviews.freebsd.org/D28862
    
    (cherry picked from commit be97fc8dced052f824387a1ae6a0063f9dcfdc89)
---
 sys/amd64/vmm/amd/amdvi_hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/amd64/vmm/amd/amdvi_hw.c b/sys/amd64/vmm/amd/amdvi_hw.c
index 3a317ffbe29d..5102b714b0a0 100644
--- a/sys/amd64/vmm/amd/amdvi_hw.c
+++ b/sys/amd64/vmm/amd/amdvi_hw.c
@@ -515,8 +515,7 @@ amdvi_dump_cmds(struct amdvi_softc *softc, int count)
 		printf("  [CMD%d, off:0x%x] opcode= 0x%x 0x%x"
 		    " 0x%x 0x%lx\n", i, off, cmd->opcode,
 		    cmd->word0, cmd->word1, cmd->addr);
-		off = (off + sizeof(struct amdvi_cmd)) %
-		    (softc->cmd_max * sizeof(struct amdvi_cmd));
+		off = MOD_INC(off, sizeof(struct amdvi_cmd), softc->cmd_max);
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109031905.183J5xWA050595>