From owner-freebsd-virtualization@freebsd.org Wed Jul 13 00:21:06 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 4EAB7B97D3F for ; Wed, 13 Jul 2016 00:21:06 +0000 (UTC) (envelope-from tycho.nightingale@pluribusnetworks.com) Received: from mail-qk0-x229.google.com (mail-qk0-x229.google.com [IPv6:2607:f8b0:400d:c09::229]) (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 0C57216EC for ; Wed, 13 Jul 2016 00:21:06 +0000 (UTC) (envelope-from tycho.nightingale@pluribusnetworks.com) Received: by mail-qk0-x229.google.com with SMTP id o67so29856246qke.1 for ; Tue, 12 Jul 2016 17:21:05 -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=zLkKuU6HJxBdSO5cg5BB3hpkIiYNm8WxnJH4wvDZNLM=; b=IqxfLVdgFMxme/kz4jIbBSjn0XzSMkyTSdKJbZksddElunEG0c+Wf42C3wikkteIVG Zy2XBcWyLgtgTN6ihv147JiYSTb1igCtvvVLjQH+ZPV18uHlku2cN++Wga+lP1ZSViSy 00L7kgp7dQ8AD0m73OMrjUhGFDH1BNMw35E0w= 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=zLkKuU6HJxBdSO5cg5BB3hpkIiYNm8WxnJH4wvDZNLM=; b=SMgQOPi4eAKnXz5MsQN13f4gj7M8HrHFKv1u1on5aZXV9TFvw7oa8XmcGemnFSdl8J 0LHXkGKGz7SDG+gSSdrRwM26FAm/8Vchfa8dsqxcqqYSXG+9Eci2Z6V5fBBm9DZFLjAV 5pDlkOlBXVajFVMF1gBdlvk46WpiLw4kd5UR4FsSPuvA3qlNF/s9uzJwKUvdLvZrL6BO 0hYMDh/lXyhYnsGOGTJUY5R5YNSpESCKRbJWJfS6uVqOlh6sgId8I29s7jf+raZViXm+ L+F9Y1TQGGbiInIKTEpqmNIhoewFip6WMhzJy8uPKcNYO8n5VZ4LPRYOrw4z+wQA6kxG N0Bg== X-Gm-Message-State: ALyK8tK+6H98mJhgSxIpCyDFx65mRUFyONPuW7OYJaKBHW6PfoluxsPcVW++1Msy+KKDFasu X-Received: by 10.233.216.133 with SMTP id u127mr6908976qkf.203.1468369265103; Tue, 12 Jul 2016 17:21:05 -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 23sm321216qki.1.2016.07.12.17.21.03 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jul 2016 17:21:04 -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: <22aa6570-6a2e-e5d6-1882-86b9ffcb15e7@freebsd.org> Date: Tue, 12 Jul 2016 20:21:02 -0400 Cc: Andriy Gapon , "freebsd-virtualization@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <6D0C5EB5-0983-4D4C-A8EE-18254E56C557@pluribusnetworks.com> References: <011771a3-8424-7810-d9db-870ddcea2448@FreeBSD.org> <7D5D0A30-1ABA-49F6-83CC-6F398FC25B05@pluribusnetworks.com> <22aa6570-6a2e-e5d6-1882-86b9ffcb15e7@freebsd.org> To: Peter Grehan 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: Wed, 13 Jul 2016 00:21:06 -0000 Hi, On Jul 12, 2016, at 7:38 PM, Peter Grehan wrote: >> 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. >=20 > I'm not sure if the reset also hits PCIe state, if you're counting = config space as part of that (e.g. BAR contents). As an example, the = FreeBSD guest virtio code doesn't do any config space saves/restores = around a reset. This is one of those ambiguities in the virtio spec wherein the = canonical implementation (qemu) becomes the de facto standard. I see in = illumos driver that only a virtio-reset is performed in the quiesce = entry point. On qemu Is this sufficient on qemu to support warm rest? = If so then perhaps we should only clear the capabilities (MSIX) and not = the BARs. Tycho=