From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbwFe-0003qM-3p for qemu-devel@nongnu.org; Wed, 29 Jun 2011 11:00:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbwFc-0005uh-QH for qemu-devel@nongnu.org; Wed, 29 Jun 2011 11:00:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbwFc-0005uZ-74 for qemu-devel@nongnu.org; Wed, 29 Jun 2011 11:00:24 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5TF0NMj031231 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Jun 2011 11:00:23 -0400 Message-ID: <4E0B3E04.9060305@redhat.com> Date: Wed, 29 Jun 2011 17:00:20 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1309348641-20061-1-git-send-email-alevy@redhat.com> <1309348641-20061-14-git-send-email-alevy@redhat.com> <4E0B2410.3090008@redhat.com> <20110629142956.GA30873@bow.redhat.com> In-Reply-To: <20110629142956.GA30873@bow.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv3] qxl: move to UNDEFINED on DESTROY_ALL_SURFACES{, _ASYNC} List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, yhalperi@redhat.com On 06/29/11 16:29, Alon Levy wrote: > On Wed, Jun 29, 2011 at 03:09:36PM +0200, Gerd Hoffmann wrote: >> Hi, >> >>> + case QXL_IO_DESTROY_ALL_SURFACES_ASYNC: + d->mode = >>> QXL_MODE_UNDEFINED; >> >> Should go to the async thread. > > doesn't it make more sense to do all state changes from the vcpu > thread? async thread can run much later, if you have a > QXL_IO_DESTROY_ALL_SURFACES_ASYNC followed by a > QXL_IO_CREATE_PRIMARY_ASYNC where the driver did not wait for the > completion of the ASYNC first, I would still like to support that, > but it won't work if I move this to the async thread. I think we should disallow doing any I/O ops while one is in progress (except maybe QXL_IO_LOG). Most I/O commands are I/O commands because they either needed for device setup or must be synchronous anyway. QXL_IO_CREATE_PRIMARY_ASYNC wasn't exactly clever designed I think. Would have been better to enter native mode with another I/O command, then send the create request for the primary through the rings like all other surface commands. But given it is a rare event it isn't that a big issue either. cheers, Gerd