From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IcHcc-0003Ia-QC for qemu-devel@nongnu.org; Mon, 01 Oct 2007 05:31:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IcHca-0003IO-N8 for qemu-devel@nongnu.org; Mon, 01 Oct 2007 05:31:26 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IcHca-0003IL-Ko for qemu-devel@nongnu.org; Mon, 01 Oct 2007 05:31:24 -0400 Received: from nf-out-0910.google.com ([64.233.182.189]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IcHcZ-0007t1-RN for qemu-devel@nongnu.org; Mon, 01 Oct 2007 05:31:24 -0400 Received: by nf-out-0910.google.com with SMTP id 30so2662545nfu for ; Mon, 01 Oct 2007 02:31:22 -0700 (PDT) Message-ID: <4700BE58.6040309@qumranet.com> Date: Mon, 01 Oct 2007 11:31:04 +0200 MIME-Version: 1.0 Subject: Re: [Qemu-devel] qcow2 vs. image file format --> pci device References: <20070929212408.11071gmx1@mx071.gmx.net> <200710011052.27998.clemens.kol@gmx.at> In-Reply-To: <200710011052.27998.clemens.kol@gmx.at> Content-Type: multipart/alternative; boundary="------------070207000803040308080000" From: Dor Laor Reply-To: dor.laor@qumranet.com, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Clemens Kolbitsch Cc: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------070207000803040308080000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Clemens Kolbitsch wrote: >> Clemens Kolbitsch wrote: >> >>> hi everyone! >>> i have a strange problem (at least to me it seems strange :-) ): >>> >>> i have implemented a pci device (Network IC) and it works just fine when >>> using a standard image. however i now want to support snapshotting... >>> >>> i started to convert my image into the qcow2 format and suddenly my code >>> does not work any more... even if i uncomment everything that has to do >>> with snapshotting in my code, it still blocks during qemu startup. >>> >>> the thing that could cause this: i use 2 additional threads in my NIC >>> code ... each is working with semaphores that might cause problems. >>> >>> is there something in particular i have to be careful of when using qcow2 >>> file format? >>> >>> thanks!! >>> >> Qcow2 uses async io which triggers io completion with SIGIO signal. >> If you use threads you must mask this (and also SIGALARM, ..) so your >> thread won't >> take over the main threads handling. >> Anyway, using threads is not the standard qemu guideline. >> > > Hi, > Ok.. thanks! How do I tell Qemu that I use threads (in this case I don't see > an easy way around using them... although there is one obviously ;-) )?? > > All other NIC emulation work without threads. They use select (qemu_set_fd_handler) > In what other HW example can I see how to use the SIGIO completion stuff? > Actually I had a mistake, qemu use SIGUSR2 for async io and SIGIO for timer management. > Clemens > > --------------070207000803040308080000 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Clemens Kolbitsch wrote:
Clemens Kolbitsch wrote:
    
hi everyone!
i have a strange problem (at least to me it seems strange :-)  ):

i have implemented a pci device (Network IC) and it works just fine when
using a standard image. however i now want to support snapshotting...

i started to convert my image into the qcow2 format and suddenly my code
does not work any more... even if i uncomment everything that has to do
with snapshotting in my code, it still blocks during qemu startup.

the thing that could cause this: i use 2 additional threads in my NIC
code ... each is working with semaphores that might cause problems.

is there something in particular i have to be careful of when using qcow2
file format?

thanks!!
      
Qcow2 uses async io which triggers io completion with SIGIO signal.
If you use threads you must mask this (and also SIGALARM, ..) so your
thread won't
take over the main threads handling.
Anyway, using threads is not the standard qemu guideline.
    

Hi,
Ok.. thanks! How do I tell Qemu that I use threads (in this case I don't see 
an easy way around using them... although there is one obviously ;-) )??

  
All other NIC emulation work without threads. They use select (qemu_set_fd_handler)
In what other HW example can I see how to use the SIGIO completion stuff?
  
Actually I had a mistake, qemu use SIGUSR2 for async io and SIGIO for timer management.
Clemens

  

--------------070207000803040308080000--