The packet queue code is fairly standalone, has some complex details and
easily reusable. It makes sense to split it out on its own. This patch
doesn't contain any functional changes.
Patchworks-ID: 35511
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This suite contains tests to assure that QList API works as expected.
To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:
$ ./check-qlist
Patchworks-ID: 35333
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QList is a high-level data type that can be used to store QObjects
in a singly-linked list.
The following functions are available:
- qlist_new() Create a new QList
- qlist_append() Append a QObject to the list
- qlist_iter() Iterate over stored QObjects
Patchworks-ID: 35334
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Generate config-devices.h for each target and config-all-devices.h for
common library. We don't want to name both config-devices.h to avoid
path problems
Patchworks-ID: 35195
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
We generate config-devices.h from there automatically.
We need to do it in main Makefile, because we are going to need a main
Makefile for them.
Patchworks-ID: 35196
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add config.h file that includes config-target.h and config-host.h
Patchworks-ID: 35193
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
If config-host.mak dont' exist, we have exited in the check at
the beginning of the file.
Once here, move the bits to the else part of the test at the beginning of
the file.
Patchworks-ID: 35191
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Use timestamp based appreach to avoid not needed recompilation.
Add it to rules.mak
Many thanks to Paolo Bonzini for helpding the design, and the debug.
Patchworks-ID: 35190
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
The CPU state parameter is not used, remove it and adjust callers. Now we
can compile ioport.c once for all targets.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Build uset targers as true PIE if user want to keep qemu
self-virtualizable.
v5:
- Split into to patches: drop link hack and add PIE support
- do not build PIE by default and drop toolchain check
v4:
- Add test for toolchain if it has proper PIE support
v3:
- One more pice of the hack was removed
- Description updated
v2:
- Add configure options do enable/disable PIE for usermode targets.
Disabling can be useful if you build uswing toolchain which has
broken PIE support. PIE for usermode targets enabled by default.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Add USBBus.
* Add USBDeviceInfo, move device callbacks here.
* Add usb-qdev helper functions.
* Switch drivers to qdev.
TODO:
* make the rest of qemu aware of usb busses and kill the FIXMEs
added by this patch.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This suite contains tests to assure that QDict API works as expected.
To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:
$ ./check-qdict
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This suite contains tests to assure that QString API works as expected.
To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:
$ ./check-qstring
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This suite contains tests to assure that QInt API works as expected.
To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:
$ ./check-qint
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QDict is a high-level dictionary data type that can be used to store a
collection of QObjects. A unique key is associated with only one
QObject.
The following functions are available:
- qdict_new() Create a new QDict
- qdict_put() Add a new 'key:object' pair
- qdict_get() Get the QObject of a given key
- qdict_del() Delete a 'key:object' pair
- qdict_size() Return the size of the dictionary
- qdict_haskey() Check if a given 'key' exists
Some high-level helpers to operate on QStrings and QInts objects
are also provided.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QString is a high-level data type that can be used to represent
C strings.
The following functions are available:
- qstring_from_str() Create a new QString
- qstring_get_str() Get a pointer to the stored string
Note that qstring_get_str() is too low-level for a data type like
this, but it's interesting for quick read-only accesses.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QInt is a high-level data type that can be used to represent integers,
internally it stores an int64_t value.
The following functions are available:
- qint_from_int() Create a new QInt
- qint_get_int() Get the stored integer
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Now that do have a nicer interface to work against we can add Linux native
AIO support. It's an extremly thing layer just setting up an iocb for
the io_submit system call in the submission path, and registering an
eventfd with the qemu poll handler to do complete the iocbs directly
from there.
This started out based on Anthony's earlier AIO patch, but after
estimated 42,000 rewrites and just as many build system changes
there's not much left of it.
To enable native kernel aio use the aio=native sub-command on the
drive command line. I have also added an option to qemu-io to
test the aio support without needing a guest.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
As requested by Anthony make pthreads mandatory. This means we will always
have AIO available on posix hosts, and it will also allow enabling the I/O
thread unconditionally once it's ready.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Implement migration via unix sockets. While you can fake this using
exec and netcat, this involves forking another process and is
generally not very nice. By doing this directly in qemu, we can avoid
the copy through the external nc command. This is useful for
implementations (such as libvirt) that want to do "secure" migration;
we pipe the data on the sending side into the unix socket, libvirt
picks it up, encrypts it, and transports it, and then on the remote
side libvirt decrypts it, dumps it to another unix socket, and
feeds it into qemu.
The implementation is straightforward and looks very similar to
migration-exec.c and migration-tcp.c
Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
- still works if the build dir is not the src dir
- use find instead of *.c block/*.c etc...
Signed-off-by: Alexandre Bique <alexandre.bique@citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>