From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v4 6/9] KVM: Save/restore state of assigned PCI device Date: Tue, 09 Nov 2010 14:44:36 +0100 Message-ID: <4CD95044.4040402@siemens.com> References: <1323c55899273c3bfc746fda9b47948aca6eae2f.1289215310.git.jan.kiszka@siemens.com> <4CD94021.4090705@redhat.com> <4CD94CBB.8030105@siemens.com> <4CD94E5C.9050909@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm , Alex Williamson , "Michael S. Tsirkin" To: Avi Kivity Return-path: Received: from david.siemens.de ([192.35.17.14]:20354 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751629Ab0KINoz (ORCPT ); Tue, 9 Nov 2010 08:44:55 -0500 In-Reply-To: <4CD94E5C.9050909@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Am 09.11.2010 14:36, Avi Kivity wrote: > On 11/09/2010 03:29 PM, Jan Kiszka wrote: >> Am 09.11.2010 13:35, Avi Kivity wrote: >>> On 11/08/2010 01:21 PM, Jan Kiszka wrote: >>>> The guest may change states that pci_reset_function does not touch. So >>>> we better save/restore the assigned device across guest usage. >>> >>> Why do we care? Shouldn't the next user reset the state to its taste? >> >> Maybe he should, but are we sure this actually happens? E.g. >> pci_reset_function preserves the config state, thus does not remove the >> traces of guest. > > Oh yes, I read the code but it didn't register. Of course this change > is quite necessary. > > (I understood you to mean that the PCI 2.3 reset doesn't reset > everything, but that isn't what you said). What the hardware makes out of the reset is even another story. No guarantees I bet (isn't function-level reset an optional thing anyway?). At least I can report that I managed to kick my Intel 82577LM into limbo land by trying to load the wrong driver in a guest - host reset was required afterward to reclaim its functionality. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux