From owner-freebsd-virtualization@freebsd.org Tue Jul 12 20:36:20 2016 Return-Path: Delivered-To: freebsd-virtualization@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 E56B0B2C008 for ; Tue, 12 Jul 2016 20:36:20 +0000 (UTC) (envelope-from tycho.nightingale@pluribusnetworks.com) Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com [IPv6:2607:f8b0:400d:c0d::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A78A91A79 for ; Tue, 12 Jul 2016 20:36:20 +0000 (UTC) (envelope-from tycho.nightingale@pluribusnetworks.com) Received: by mail-qt0-x22c.google.com with SMTP id 52so14855617qtq.3 for ; Tue, 12 Jul 2016 13:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pluribusnetworks.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=w/0pKUB/Oux+BY6N7lNmD6UCBuQqO4Ps+M4K3bZje7I=; b=Oir1PEhfPfjjRIodjJkCuFPxxmNlwJHQhoouiLeGndC4FgK/WeBsDj0QLLE3VsyoUj einDzqcU1rP7DZvZE2zFBdKdpNSK7boOen5HwW/z097iofbhupJezvGWPAkhU9DpzBi+ WAOYwlKvZjSWs8Lz/FD2CJIQMrUIOFS+cSA5w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=w/0pKUB/Oux+BY6N7lNmD6UCBuQqO4Ps+M4K3bZje7I=; b=Tz4lzMXjgk9+mG9zpHTWXUtLRKN4dUC+CcG/Wddo23cx3ALV6HcYl/y3Mr4kEtDZOo E0XqbOIIl9Efl/fc7VSTJdUoPt4762Jh8pA/jPT7J+fB5sv5FayMDWnJ1bdYNs+nw8qt n7lwqUUBK14qJSxC6B/Wcwth2Lxh6Y50Re6W8J5EWln5Hy70Gz6RQiY7Qzuis3g0EWsF xdCeJPpCZ6+tPJlfs54KVGnARRRf3yQdlLptUJKblXN8e/tq1Pso2QMPSZO2PtbyhhxD yrjyC9xRwmuB32BP6gPMkuqxZqe0CLgllFS+7Kv92v0ZpV3ednEBCyxrbL/pWFL5oFi1 HMyQ== X-Gm-Message-State: ALyK8tJ1L59j8kCWCfNateiUKgO/dn/jC3Ee9UHBnWqMFFqAw8KIuzTUbxLvxU3sUv0wr5r9 X-Received: by 10.200.52.43 with SMTP id u40mr6540515qtb.74.1468355779539; Tue, 12 Jul 2016 13:36:19 -0700 (PDT) Received: from [10.0.1.4] (209-6-121-211.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com. [209.6.121.211]) by smtp.gmail.com with ESMTPSA id n6sm2914560qke.31.2016.07.12.13.36.18 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jul 2016 13:36:18 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: bhyve: disable msi and msix on virtio reset? From: Tycho Nightingale In-Reply-To: <011771a3-8424-7810-d9db-870ddcea2448@FreeBSD.org> Date: Tue, 12 Jul 2016 16:36:17 -0400 Cc: "freebsd-virtualization@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <7D5D0A30-1ABA-49F6-83CC-6F398FC25B05@pluribusnetworks.com> References: <011771a3-8424-7810-d9db-870ddcea2448@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1878.6) X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 20:36:21 -0000 Hi, Yes, writing 0 to the status resister should reset the device including = all PCIE state. This implies that vi_reset_dev() needs to take the = proper actions to bring the associated pci_devinst (which from the = guest=92s perspective isn=92t a discrete element) back to it=92s reset = state too. Tycho On Jul 12, 2016, at 8:27 AM, Andriy Gapon wrote: >=20 > A write of a zero to VTCFG_R_STATUS initiates a virtio device reset = via > vc_reset. Typically this means a call to vi_reset_dev() which resets = a > bunch of fields in virtio_softc, but does not touch a corresponding > pci_devinst (hanging off vs_pi) at all. Among other things this means > that PCI MSI and MSI-X states remain unchanged. One of the = consequences > is that we keep using virtio_config_size of 24 if MSI-X is enabled. >=20 > Should the virtio status reset also reset the PCI state? >=20 > One practical problem that I see is with illumos fast reboot where the > illumos virtio driver assumes that the status reset is sufficient to > return a device to a state like after a clean (full) reboot. >=20 > Thank you. > --=20 > Andriy Gapon > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to = "freebsd-virtualization-unsubscribe@freebsd.org"