diff --git a/sys/amd64/vmm/amd/amdvi_hw.c b/sys/amd64/vmm/amd/amdvi_hw.c --- a/sys/amd64/vmm/amd/amdvi_hw.c +++ b/sys/amd64/vmm/amd/amdvi_hw.c @@ -274,6 +274,8 @@ tail = (struct amdvi_cmd *)((uint8_t *)softc->cmd + ctrl->cmd_tail); + if (tail != NULL) + memset(tail, 0, sizeof(*tail)); return (tail); } @@ -420,10 +422,6 @@ static void amdvi_inv_domain(struct amdvi_softc *softc, uint16_t domain_id) { - struct amdvi_cmd *cmd __diagused; - - cmd = amdvi_get_cmd_tail(softc); - KASSERT(cmd != NULL, ("Cmd is NULL")); /* * See section 3.3.3 of IOMMU spec rev 2.0, software note