From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36929 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8Bkj-0004VO-Vv for qemu-devel@nongnu.org; Fri, 08 Apr 2011 09:29:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8Bki-0001IO-RA for qemu-devel@nongnu.org; Fri, 08 Apr 2011 09:29:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8Bki-0001IK-I4 for qemu-devel@nongnu.org; Fri, 08 Apr 2011 09:29:32 -0400 Message-ID: <4D9F0E45.6000005@redhat.com> Date: Fri, 08 Apr 2011 15:31:49 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <8c4effc5d537fe0a35791e2f970ede8ed400b5bd.1302246567.git.amit.shah@redhat.com> In-Reply-To: <8c4effc5d537fe0a35791e2f970ede8ed400b5bd.1302246567.git.amit.shah@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 3/5] atapi: GESN: Spin off No Event Available handling into own function List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: Juan Quintela , Stefan Hajnoczi , Markus Armbruster , qemu list , Paolo Bonzini Am 08.04.2011 09:15, schrieb Amit Shah: > Handle GET_EVENT_STATUS_NOTIFICATION's No Event Available status in its > own function. > > Also ensure the buffer the driver sent us is big enough to fill in all > the data we have -- else just fill in as much as the buffer can hold. This is unnecessary and in fact none of the IDE code does this. s->io_buffer isn't guest memory, but an internal buffer that is allocated like this: s->io_buffer = qemu_memalign(2048, IDE_DMA_BUF_SECTORS*512 + 4); So that's more than enough for storing four bytes. ide_atapi_cmd_reply() takes care of making only max_size bytes visible to the guest. Kevin