From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH 2/2] virtio reset support Date: Mon, 28 Jan 2008 09:40:55 -0600 Message-ID: <479DF787.2020100@us.ibm.com> References: <200801240116.26160.rusty@rustcorp.com.au> <200801240118.09032.rusty@rustcorp.com.au> <479C8599.60007@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , Dor Laor , virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Avi Kivity Return-path: In-Reply-To: <479C8599.60007-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Avi Kivity wrote: > Rusty Russell wrote: >> + >> +static void vp_reset(struct virtio_device *vdev) >> +{ >> + struct virtio_pci_device *vp_dev = to_vp_device(vdev); >> + /* 0 status means a reset. */ >> + return iowrite8(0, vp_dev->ioaddr + VIRTIO_PCI_STATUS); >> } >> > > pci has something called FLR for function-level reset. If we use that > as the reset mechanism, then reset can be initiated from outside the > virtio layer, if the guest OS supports that. PCI-e has a common reset concept (warm and cold). I've been looking around and I can't seem to find any common reset mechanism for PCI. Is FLR something that is per-device or a standard PCI mechanism? If it's the former, than we've basically implemented FLR using this bit in the config space. Regards, Anthony Liguori ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/