From owner-freebsd-scsi@freebsd.org Wed Dec 13 21:59:41 2017 Return-Path: Delivered-To: freebsd-scsi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7C8EE88C49 for ; Wed, 13 Dec 2017 21:59:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D67A866181 for ; Wed, 13 Dec 2017 21:59:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id vBDLxfJf063384 for ; Wed, 13 Dec 2017 21:59:41 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-scsi@FreeBSD.org Subject: [Bug 224250] Sending SCSI command to ATA device makes kernel triple fault. Date: Wed, 13 Dec 2017 21:59:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: scottl@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-scsi@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 21:59:42 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D224250 --- Comment #18 from Scott Long --- Comment on attachment 188806 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D188806 C snippet The assertion is here: VirtualBox-4.3.22/src/VBox/Devices/Storage/DevATA.cpp:5293 if (s->uTxDir =3D=3D PDMBLOCKTXDIR_FROM_DEVICE) AssertRelease(bm->u8Cmd & BM_CMD_WRITE); I'm a bit confused, I believe that the ATA driver sets this bit here: src/sys/dev/ata/ata_all.c if ((ccb->ccb_h.flags & CAM_DIR_MASK) =3D=3D CAM_DIR_IN) request->flags |=3D ATA_R_READ; and src/sys/dev/ata/ata_pci.c ATA_IDX_OUTB(ch, ATA_BMCMD_PORT, (ATA_IDX_INB(ch, ATA_BMCMD_PORT) & ~ATA_BMCMD_WRITE_READ) | ((request->flags & ATA_R_READ) ? ATA_BMCMD_WRITE_READ : 0)| ATA_BMCMD_START_STOP); Maybe this isn't going through ata_pci_dmastart(), or maybe the flags are getting cleared/not copied correctly prior? I don't have time to look into= it further today. --=20 You are receiving this mail because: You are the assignee for the bug.=