qcow2 vs. image file format --> pci device
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines
Quoted 16 lines · Clemens Kolbitsch
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?
Quoted 7 lines
Quoted 1 line
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 ;-) )??
In what other HW example can I see how to use the SIGIO completion stuff? Clemens
Quoted 27 lines · Clemens Kolbitsch
Quoted 18 lines
Quoted 16 lines · Clemens Kolbitsch
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?
Quoted 8 lines
Quoted 2 lines
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.
Quoted 4 lines
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)
Quoted 2 lines
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.
Quoted 3 lines
Clemens