Commit Graph

337 Commits

Author SHA1 Message Date
Mark McLoughlin 33ad161a04 net: move tap-win32.c under net/
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-30 08:39:27 -05:00
Mark McLoughlin 7200ac3c7c net: move net-checksum.c under net/
Also add a new net/checksum.h header

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-30 08:39:26 -05:00
Mark McLoughlin e1144d006d net: move net-queue.[ch] under net/
[v2: handle building in a separate dir]

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-30 08:39:26 -05:00
Stefan Weil 581d45f029 Makefile: Change make to be quiet again when doing nothing
This patch makes make quiet again.

There is already a similar patch from Juan Quintela,
but maybe this shorter form is preferred.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-27 12:28:35 -05:00
Mark McLoughlin f710584399 net: refactor packet queueing code
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>
2009-10-15 09:32:03 -05:00
Blue Swirl 6a8a280364 user: fix libuser build messages
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-13 16:57:32 +00:00
malc d56316388d Windows Waveform Audio driver (no ADC support yet)
Signed-off-by: malc <av1474@comtv.ru>
2009-10-10 01:18:24 +04:00
Luiz Capitulino 3aa3dcfff6 Introduce QList unit-tests
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>
2009-10-08 21:17:18 -05:00
Luiz Capitulino a6fd08eb62 Introduce QList
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>
2009-10-08 21:17:18 -05:00
Juan Quintela c62c4551b8 Only compile ssi when one target uses it
Patchworks-ID: 35221
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:17 -05:00
Juan Quintela 93a604004a Only compile ssi-sd when one target uses it
Patchworks-ID: 35220
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:17 -05:00
Juan Quintela ee99ca01e8 Only compile max111x when one target uses it
Patchworks-ID: 35219
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:17 -05:00
Juan Quintela 20a4afc421 Only compile ads7846 when one target uses it
Patchworks-ID: 35218
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:17 -05:00
Juan Quintela 54bcf07471 Only compile sd0323 when one target uses it
Patchworks-ID: 35217
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:17 -05:00
Juan Quintela 6a559be594 Only compile sd0303 when one target uses it
Patchworks-ID: 35216
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:16 -05:00
Juan Quintela 4aa5b83fd1 Only compile stellaris_input when one target uses it
Patchworks-ID: 35213
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:16 -05:00
Juan Quintela d9b44620c5 Only compile tmp105 when one target uses it
Patchworks-ID: 35214
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:16 -05:00
Juan Quintela 03aba0e393 Only compile lm832x when one target uses it
Patchworks-ID: 35211
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:15 -05:00
Juan Quintela 3c848e2ad8 Only compile tsc2005 when one target uses it
Patchworks-ID: 35215
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:15 -05:00
Juan Quintela 92eb6b4e11 Only compile twl92230 when one target uses it
Patchworks-ID: 35212
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:15 -05:00
Juan Quintela 976ca9abee Only compile wm8750 when one target uses it
Patchworks-ID: 35209
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:14 -05:00
Juan Quintela ae573db3cf Only compile max7310 when one target uses it
Patchworks-ID: 35210
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:13 -05:00
Juan Quintela b21fd8e60a Only compile sd when one target uses it
Patchworks-ID: 35208
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:13 -05:00
Juan Quintela 5f74377c3d Only compile ptimer when one target uses it
Patchworks-ID: 35207
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-08 21:17:13 -05:00
Juan Quintela fe0d4d3f77 Generate config-devices.h
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>
2009-10-08 21:17:10 -05:00
Juan Quintela 1f3d3c8fd7 Add new config-devices.mak for each target
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>
2009-10-08 21:17:10 -05:00
Juan Quintela 25be210f69 Rename config.{h, mak} config-target.{h, mak}
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>
2009-10-08 21:17:03 -05:00
Juan Quintela e5efe7f5d2 Remove useless check for config-host.mak
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>
2009-10-08 21:17:03 -05:00
Juan Quintela 1215c6e761 Move generation of config-host.h to Makefile from configure
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>
2009-10-08 21:17:03 -05:00
Juan Quintela d9ace8b384 configure and Makefile are not generated in qemu
Just say it to make

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-06 14:46:11 -05:00
Juan Quintela 9c927650eb add build-all to .PHONY rules
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-06 14:46:10 -05:00
Edgar E. Iglesias bc6291a1b9 Include microblaze binaries in tarbin.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-10-01 15:18:36 +02:00
Blue Swirl add16157d7 Compile some user files only once for all targets
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-27 16:26:02 +00:00
Blue Swirl c2b023b627 Compile host-utils only once
See also facd285778 and
34005a0060.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 19:20:05 +00:00
Blue Swirl 96e132e24e Compile TCG runtime library only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 19:06:34 +00:00
Blue Swirl afcea8cbde ioports: remove unused env parameter and compile only once
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>
2009-09-20 16:05:47 +00:00
Blue Swirl a333cd7166 Compile qemu-config only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-20 08:28:29 +00:00
Kirill A. Shutemov 34005a0060 Add configure option to compile user targets as PIE
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>
2009-09-12 13:17:45 +00:00
Gerd Hoffmann d52affa7f6 qdev/scsi: add scsi bus support to qdev, convert drivers.
* Add SCSIBus.
 * Add SCSIDeviceInfo, move device callbacks here.
 * add qdev/scsi helper functions.
 * convert drivers.

Adding scsi disks via -device works now, i.e. you can do:

 -drive id=sda,if=none,...
 -device lsi
 -device scsi-disk,drive=sda

legacy command lines (-drive if=scsi,...) continue to work.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09 14:57:19 -05:00
Gerd Hoffmann 806b602482 qdev/usb: add usb bus support to qdev, convert drivers.
* 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>
2009-09-09 14:55:17 -05:00
Luiz Capitulino 7b8c51add7 Introduce QDict unit-tests
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>
2009-09-04 09:37:34 -05:00
Luiz Capitulino 5de65a07ee Introduce QString unit-tests
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>
2009-09-04 09:37:34 -05:00
Luiz Capitulino 33837ba6c5 Introduce QInt unit-tests
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>
2009-09-04 09:37:33 -05:00
Luiz Capitulino fb08dde098 Introduce QDict
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>
2009-09-04 09:37:29 -05:00
Luiz Capitulino 66f7048712 Introduce QString
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>
2009-09-04 09:37:29 -05:00
Luiz Capitulino 6b8d1ece70 Introduce QInt
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>
2009-09-04 09:37:29 -05:00
Christoph Hellwig 5c6c3a6c54 raw-posix: add Linux native AIO support
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>
2009-08-27 20:30:22 -05:00
Paolo Bonzini 5ac1fad324 add file descriptor migration
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:15 -05:00
Christoph Hellwig 4dd75c702c make pthreads mandatory
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>
2009-08-24 08:46:47 -05:00
Anthony Liguori a25a0ef51e Only build osdep once
We no longer need hackery to work around kqemu

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:02:55 -05:00