Fixed a bug due to which qemu crashed during VNC usage
QList: Introduce QLIST_FOREACH_ENTRY()

Iterate over QList entries, it's needed to call qlist_entry_obj()
to retrieve the stored QObject.

I'm not sure if it's ok to have this, because it's not as easy as
qlist_iter() and the QListEntry data type is now exposed to the
users, which means we have one more struct to be maintained when
we have libqmp.

Adding anyway, as it's more compact and people are asking for it.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
query-pci QMP command
query-incoming QMP command
is_not_zero() optimization in qemu-img
Merge branch 'qemu-kvm-0.12.1.2-red-hat' into qemu-kvm-0.12.1.2-c2

Conflicts:
	hw/pci.h
	migration.c
	monitor.c
	monitor.h
Merge branch 'qemu-kvm-0.12.1.2-red-hat' into qemu-kvm-0.12.1.2-c2

Conflicts:
	monitor.h
	qemu-img.c
e1000: Fix multi-descriptor packet checksum offload

The PCI/PCI-X Family of Gigabit Ethernet Controllers Software
Developer’s Manual states the following about the POPTS field:

  Provides a number of options which control the handling of this
  packet.  This field is ignored except on the first data descriptor of
  a packet.

The current implementation always loads the field and its checksum
offload flags.  This patch uses only the first descriptor's POPTS field
in order to comply with the specification.

When Solaris sends multi-descriptor packets it fills in POPTS for the
first descriptor only.  Therefore this patch is necessary in order to
perform checksum offload correctly for multi-descriptor packets.

Reported-by: Daniel Pecka <dpecka@techniservit.cz>
Reported-by: Gabriele A. Trombetti <gabriele.trombetti@itb.cnr.it>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Merge branch 'qemu-kvm-0.12.1.2-red-hat' into qemu-kvm-0.12.1.2-c2

Conflicts:
	monitor.c
	monitor.h
Merge branch 'qemu-kvm-0.12.1.2-red-hat' into qemu-kvm-0.12.1.2-c2
Added CROC's qemu-kvm.spec