From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzENZ-0005oU-Rz for qemu-devel@nongnu.org; Mon, 23 Jun 2014 20:14:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzENL-0001XH-Nz for qemu-devel@nongnu.org; Mon, 23 Jun 2014 20:14:29 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:37054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzENK-0001WS-Uz for qemu-devel@nongnu.org; Mon, 23 Jun 2014 20:14:15 -0400 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Jun 2014 10:14:07 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 7AF3F3578047 for ; Tue, 24 Jun 2014 10:14:04 +1000 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5NNvhct39256164 for ; Tue, 24 Jun 2014 09:57:44 +1000 Received: from d23av04.au.ibm.com (localhost [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5O0E3YU005125 for ; Tue, 24 Jun 2014 10:14:03 +1000 Date: Tue, 24 Jun 2014 10:14:05 +1000 From: Gavin Shan Message-ID: <20140624001405.GA5746@shangw> References: <1403490123-15969-1-git-send-email-gwshan@linux.vnet.ibm.com> <1403490123-15969-2-git-send-email-gwshan@linux.vnet.ibm.com> <53A8535D.1080209@suse.de> <1403557434.4587.134.camel@pasglop> <10AB7EBE-59D1-4202-8A01-60A87C19F46B@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10AB7EBE-59D1-4202-8A01-60A87C19F46B@suse.de> Subject: Re: [Qemu-devel] [PATCH v1 1/3] sPAPR: Implement PCI error injection RTAS calls Reply-To: Gavin Shan List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "aik@ozlabs.ru" , "qiudayu@linux.vnet.ibm.com" , Gavin Shan , "qemu-devel@nongnu.org" On Mon, Jun 23, 2014 at 11:13:45PM +0200, Alexander Graf wrote: > >> Am 23.06.2014 um 23:03 schrieb Benjamin Herrenschmidt : >> >>> On Mon, 2014-06-23 at 18:18 +0200, Alexander Graf wrote: >>> Device emulation code shouldn't even remotely have an idea what host >>> it's running on. Also semantically there are a few issues with this approach >>> >>> 1) QEMU is usually running with user privileges, so it doesn't have >>> access to the file above >> >> Right, this needs to go via VFIO like the rest of the EEH stuff >> >>> 2) QEMU's channel to hardware devices is via normal kernel API. For >>> physical devices that's VFIO. No side channels please. >> >> Indeed. If the user gets access to that file, suddenly qemu can >> "manufacture" a bad string and error inject in other devices it doesn't >> own which isn't great. >> >> Gavin, this needs to go via the same path as normal EEH and be limited >> to injecting errors that are completely bounded to the PE. >> >> I don't think this is very high priority. We should first write a good >> host side error injection tool and sort out the reporting of the EEH log >> from host to guest. >> >>> 3) Ownership of the question whether a PE is in error mode is >>> responsibility of the PHB. In the emulated case, the PHB would have to >>> set itself into a mode where it behaves as if it's blocked. >> >> We don't have to support error injection for emulated since we don't >> support (yet) the rest oF EEH for them. We could one day but it's >> really not urgent. > >I agree, but the layers are the same ;) > Thanks, Ben and Alex. Yes, it's fair enough for VFIO (ioctl cmd) to routing the PCI error injection. Thanks, Gavin >Alex > >> >> Cheers, >> Ben. >>