]> Git Repo - qemu.git/log
qemu.git
12 years agomigration: move buffered_file.c code into migration.c
Juan Quintela [Wed, 3 Oct 2012 12:18:33 +0000 (14:18 +0200)]
migration: move buffered_file.c code into migration.c

This only moves the code (also from buffered_file.h to migration.h).
Fix whitespace until checkpatch is happy.

Signed-off-by: Juan Quintela <[email protected]>
12 years agosavevm: New save live migration method: pending
Juan Quintela [Fri, 21 Sep 2012 09:18:18 +0000 (11:18 +0200)]
savevm: New save live migration method: pending

Code just now does (simplified for clarity)

    if (qemu_savevm_state_iterate(s->file) == 1) {
       vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
       qemu_savevm_state_complete(s->file);
    }

Problem here is that qemu_savevm_state_iterate() returns 1 when it
knows that remaining memory to sent takes less than max downtime.

But this means that we could end spending 2x max_downtime, one
downtime in qemu_savevm_iterate, and the other in
qemu_savevm_state_complete.

Changed code to:

    pending_size = qemu_savevm_state_pending(s->file, max_size);
    DPRINTF("pending size %lu max %lu\n", pending_size, max_size);
    if (pending_size >= max_size) {
        ret = qemu_savevm_state_iterate(s->file);
     } else {
        vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
        qemu_savevm_state_complete(s->file);
     }

So what we do is: at current network speed, we calculate the maximum
number of bytes we can sent: max_size.

Then we ask every save_live section how much they have pending.  If
they are less than max_size, we move to complete phase, otherwise we
do an iterate one.

This makes things much simpler, because now individual sections don't
have to caluclate the bandwidth (it was implossible to do right from
there).

Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
12 years agobuffered_file: unfold buffered_append in buffered_put_buffer
Juan Quintela [Tue, 24 Jul 2012 12:24:08 +0000 (14:24 +0200)]
buffered_file: unfold buffered_append in buffered_put_buffer

It was the only user, and now buffered_put_buffer just do the append

Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
12 years agobuffered_file: don't flush on put buffer
Juan Quintela [Tue, 24 Jul 2012 12:00:13 +0000 (14:00 +0200)]
buffered_file: don't flush on put buffer

We call buffered_put_buffer with iothread held, and buffered_flush() does
synchronous writes.  We only want to do the synchronous writes outside.

Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
12 years agobuffered_file: Unfold the trick to restart generating migration data
Juan Quintela [Tue, 24 Jul 2012 11:22:18 +0000 (13:22 +0200)]
buffered_file: Unfold the trick to restart generating migration data

This was needed before due to the way that the callbacks worked.

Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
12 years agomigration: just lock migrate_fd_put_ready
Juan Quintela [Mon, 23 Jul 2012 04:31:30 +0000 (06:31 +0200)]
migration: just lock migrate_fd_put_ready

Signed-off-by: Juan Quintela <[email protected]>
12 years agomigration: remove unfreeze logic
Juan Quintela [Mon, 23 Jul 2012 04:24:03 +0000 (06:24 +0200)]
migration: remove unfreeze logic

Now that we have a thread, and blocking writes, we don't need it.

Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
12 years agomigration: make writes blocking
Juan Quintela [Mon, 23 Jul 2012 04:15:02 +0000 (06:15 +0200)]
migration: make writes blocking

Move all the writes to the migration_thread, and make writings
blocking.  Notice that are still using the iothread for everything
that we do.

Signed-off-by: Juan Quintela <[email protected]>
12 years agomigration: move migration thread init code to migrate_fd_put_ready
Juan Quintela [Mon, 23 Jul 2012 03:45:29 +0000 (05:45 +0200)]
migration: move migration thread init code to migrate_fd_put_ready

This way everything related with migration is run on the migration
thread and no locking is needed.

Signed-off-by: Juan Quintela <[email protected]>
12 years agomigration: make qemu_fopen_ops_buffered() return void
Juan Quintela [Mon, 23 Jul 2012 00:13:23 +0000 (02:13 +0200)]
migration: make qemu_fopen_ops_buffered() return void

We want the file assignment to happen before the thread is created to
avoid locking, so we just do it before creating the thread.

Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Orit Wasserman <[email protected]>
12 years agobuffered_file: Move from using a timer to use a thread
Juan Quintela [Sun, 22 Jul 2012 23:56:50 +0000 (01:56 +0200)]
buffered_file: Move from using a timer to use a thread

We still protect everything except the wait with the iothread lock.
But we moved from a timer to a thread.  Steps one by one.

We also need to detect when we have finished with a variable "complete".

Signed-off-by: Juan Quintela <[email protected]>
12 years agoprotect the ramlist with a separate mutex
Umesh Deshpande [Wed, 17 Aug 2011 07:01:33 +0000 (00:01 -0700)]
protect the ramlist with a separate mutex

Add the new mutex that protects shared state between ram_save_live
and the iothread.  If the iothread mutex has to be taken together
with the ramlist mutex, the iothread shall always be _outside_.

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Umesh Deshpande <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Orit Wasserman <[email protected]>
12 years agoadd a version number to ram_list
Umesh Deshpande [Thu, 18 Aug 2011 18:41:17 +0000 (11:41 -0700)]
add a version number to ram_list

This will be used to detect if last_block might have become invalid
across different calls to ram_save_live.

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Umesh Deshpande <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Orit Wasserman <[email protected]>
12 years agoexec: sort the memory from biggest to smallest
Paolo Bonzini [Wed, 14 Nov 2012 15:00:51 +0000 (16:00 +0100)]
exec: sort the memory from biggest to smallest

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
12 years agoexec: change RAM list to a TAILQ
Paolo Bonzini [Wed, 14 Nov 2012 14:54:48 +0000 (15:54 +0100)]
exec: change RAM list to a TAILQ

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
12 years agoexec: change ramlist from MRU order to a 1-item cache
Paolo Bonzini [Wed, 14 Nov 2012 14:45:02 +0000 (15:45 +0100)]
exec: change ramlist from MRU order to a 1-item cache

Most of the time, only 2 items will be active (from/to for a string operation,
or code/data).  But TCG guests likely won't have gigabytes of memory, so
this actually goes down to 1 item.

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
12 years agomigration-fd: remove duplicate include
Juan Quintela [Wed, 3 Oct 2012 12:08:05 +0000 (14:08 +0200)]
migration-fd: remove duplicate include

Signed-off-by: Juan Quintela <[email protected]>
12 years agomigration: include qemu-file.h
Juan Quintela [Wed, 3 Oct 2012 12:07:31 +0000 (14:07 +0200)]
migration: include qemu-file.h

They don't use/know anything about buffered-file.

Signed-off-by: Juan Quintela <[email protected]>
12 years agomigration: remove double call to migrate_fd_close
Paolo Bonzini [Sat, 10 Nov 2012 17:58:40 +0000 (18:58 +0100)]
migration: remove double call to migrate_fd_close

The call in buffered_close is enough, because buffered_close is called
already by migrate_fd_cleanup.

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
12 years agobuffered_file: do not send more than s->bytes_xfer bytes per tick
Paolo Bonzini [Tue, 20 Nov 2012 11:48:19 +0000 (12:48 +0100)]
buffered_file: do not send more than s->bytes_xfer bytes per tick

Sending more was possible if the buffer was large.

Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
12 years agomigration: fix migration_bitmap leak
Paolo Bonzini [Wed, 12 Dec 2012 11:54:43 +0000 (12:54 +0100)]
migration: fix migration_bitmap leak

Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
12 years agovirtio: make bindings typesafe
Michael S. Tsirkin [Mon, 17 Dec 2012 11:01:07 +0000 (13:01 +0200)]
virtio: make bindings typesafe

Move bindings from opaque to DeviceState.
This gives us better type safety with no performance cost.
Add macros to make future QOM work easier.

Signed-off-by: Michael S. Tsirkin <[email protected]>
12 years agoUpdate seabios to a810e4e72a0d42c7bc04eda57382f8e019add901
Gerd Hoffmann [Thu, 20 Dec 2012 07:19:16 +0000 (08:19 +0100)]
Update seabios to a810e4e72a0d42c7bc04eda57382f8e019add901

git shortlog:

Kevin O'Connor (6):
      floppy: Minor - reduce handle_0e code size when CONFIG_FLOPPY is disabled.
      vga: Minor comment spelling fix.
      Don't recursively evaluate CFLAGS variables.
      Don't use gcc's -combine option.
      Add compile checking phase to build.
      acpi: Use prt_slot() macro to describe irq pins of first PCI device.

Laszlo Ersek (1):
      maininit(): print machine UUID under seabios version message

Paolo Bonzini (1):
      acpi: reintroduce LNKS

Paolo's patch fixes the FreeBSD boot failure.

Cc: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
12 years agoMerge remote-tracking branch 'bonzini/header-dirs' into staging
Anthony Liguori [Wed, 19 Dec 2012 23:15:39 +0000 (17:15 -0600)]
Merge remote-tracking branch 'bonzini/header-dirs' into staging

* bonzini/header-dirs: (45 commits)
  janitor: move remaining public headers to include/
  hw: move executable format header files to hw/
  fpu: move public header file to include/fpu
  softmmu: move remaining include files to include/ subdirectories
  softmmu: move include files to include/sysemu/
  misc: move include files to include/qemu/
  qom: move include files to include/qom/
  migration: move include files to include/migration/
  monitor: move include files to include/monitor/
  exec: move include files to include/exec/
  block: move include files to include/block/
  qapi: move include files to include/qobject/
  janitor: add guards to headers
  qapi: make struct Visitor opaque
  qapi: remove qapi/qapi-types-core.h
  qapi: move inclusions of qemu-common.h from headers to .c files
  ui: move files to ui/ and include/ui/
  qemu-ga: move qemu-ga files to qga/
  net: reorganize headers
  net: move net.c to net/
  ...

Signed-off-by: Anthony Liguori <[email protected]>
12 years agoMAINTAINERS: Include X86CPU in CPU maintenance area
Andreas Färber [Sun, 9 Dec 2012 19:15:31 +0000 (20:15 +0100)]
MAINTAINERS: Include X86CPU in CPU maintenance area

Document that the x86 CPU refactorings are going through the qom-cpu
tree. This does not contradict the established practice that patches
adding KVM features to the x86 CPU go through the KVM maintainers,
it merely takes it out of target-i386 TCG's Odd Fixes status.

Signed-off-by: Andreas Färber <[email protected]>
Cc: Marcello Tosatti <[email protected]>
12 years agocpu: Move kvm_run into CPUState
Andreas Färber [Sat, 1 Dec 2012 05:18:14 +0000 (06:18 +0100)]
cpu: Move kvm_run into CPUState

Pass CPUState / {X86,S390}CPU to helper functions.

Signed-off-by: Andreas Färber <[email protected]>
12 years agocpu: Move kvm_state field into CPUState
Andreas Färber [Sat, 1 Dec 2012 04:35:08 +0000 (05:35 +0100)]
cpu: Move kvm_state field into CPUState

Adapt some functions to take CPUState / {PowerPC,S390}CPU argument.

Signed-off-by: Andreas Färber <[email protected]>
12 years agoppc_booke: Pass PowerPCCPU to ppc_booke_timers_init()
Andreas Färber [Sat, 1 Dec 2012 03:43:18 +0000 (04:43 +0100)]
ppc_booke: Pass PowerPCCPU to ppc_booke_timers_init()

Cleans up after passing PowerPCCPU to timer callbacks.

Signed-off-by: Andreas Färber <[email protected]>
12 years agoppc4xx_devs: Return PowerPCCPU from ppc4xx_init()
Andreas Färber [Sat, 1 Dec 2012 03:47:33 +0000 (04:47 +0100)]
ppc4xx_devs: Return PowerPCCPU from ppc4xx_init()

Prepares for passing PowerPCCPU to ppc_booke_timers_init().

Signed-off-by: Andreas Färber <[email protected]>
12 years agoppc_booke: Pass PowerPCCPU to {decr,fit,wdt} timer callbacks
Andreas Färber [Sat, 1 Dec 2012 03:35:15 +0000 (04:35 +0100)]
ppc_booke: Pass PowerPCCPU to {decr,fit,wdt} timer callbacks

Cleans up after passing PowerPCCPU to booke_update_irq().

Signed-off-by: Andreas Färber <[email protected]>
12 years agoppc: Pass PowerPCCPU to [h]decr timer callbacks
Andreas Färber [Sat, 1 Dec 2012 03:26:55 +0000 (04:26 +0100)]
ppc: Pass PowerPCCPU to [h]decr timer callbacks

Cleans up after passing PowerPCCPU to [h]decr exception callbacks.

Signed-off-by: Andreas Färber <[email protected]>
12 years agoppc: Pass PowerPCCPU to [h]decr callbacks
Andreas Färber [Sat, 1 Dec 2012 03:18:02 +0000 (04:18 +0100)]
ppc: Pass PowerPCCPU to [h]decr callbacks

Cleans up after passing PowerPCCPU to ppc_set_irq().

Signed-off-by: Andreas Färber <[email protected]>
12 years agoppc: Pass PowerPCCPU to ppc_set_irq()
Andreas Färber [Sat, 1 Dec 2012 02:55:58 +0000 (03:55 +0100)]
ppc: Pass PowerPCCPU to ppc_set_irq()

Adapt static caller functions.

This cleans up after passing PowerPCCPU to kvmppc_set_interrupt().

Signed-off-by: Andreas Färber <[email protected]>
12 years agokvm: Pass CPUState to kvm_vcpu_ioctl()
Andreas Färber [Wed, 31 Oct 2012 05:06:49 +0000 (06:06 +0100)]
kvm: Pass CPUState to kvm_vcpu_ioctl()

Adapt helper functions to pass X86CPU / PowerPCCPU / S390CPU.

Signed-off-by: Andreas Färber <[email protected]>
12 years agokvm: Pass CPUState to kvm_arch_*
Andreas Färber [Wed, 31 Oct 2012 05:57:49 +0000 (06:57 +0100)]
kvm: Pass CPUState to kvm_arch_*

Move kvm_vcpu_dirty field into CPUState to simplify things and change
its type to bool while at it.

Signed-off-by: Andreas Färber <[email protected]>
12 years agocpu: Move kvm_fd into CPUState
Andreas Färber [Wed, 31 Oct 2012 04:29:00 +0000 (05:29 +0100)]
cpu: Move kvm_fd into CPUState

Signed-off-by: Andreas Färber <[email protected]>
12 years agoqdev-properties.c: Separate core from the code used only by qemu-system-*
Eduardo Habkost [Wed, 5 Dec 2012 16:49:11 +0000 (14:49 -0200)]
qdev-properties.c: Separate core from the code used only by qemu-system-*

This separates the qdev properties code in two parts:
 - qdev-properties.c, that contains most of the qdev properties code;
 - qdev-properties-system.c for code specific for qemu-system-*,
   containing:
   - Property types: drive, chr, netdev, vlan, that depend on code that
     won't be included on *-user
   - qemu_add_globals(), that depends on qemu-config.o.

This change should help on two things:
 - Allowing DeviceState to be used by *-user without pulling
   dependencies that are specific for qemu-system-*;
 - Writing qdev unit tests without pulling too many dependencies.

The copyright/license of qdev-properties.c isn't explicitly stated at
the file, so add a simple copyright/license header pointing to the
commit ID of the original file.

Signed-off-by: Eduardo Habkost <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
12 years agoqdev: Coding style fixes
Eduardo Habkost [Wed, 5 Dec 2012 16:49:10 +0000 (14:49 -0200)]
qdev: Coding style fixes

Add missing braces and break lines larger than 80 chars.

Signed-off-by: Eduardo Habkost <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
12 years agocpu: Introduce CPUListState struct
Andreas Färber [Sun, 16 Dec 2012 01:17:02 +0000 (02:17 +0100)]
cpu: Introduce CPUListState struct

This generalizes {ARM,M68k,Alpha}CPUListState to avoid declaring it for
each target. Place it in cpu-common.h to avoid circular dependencies.

Signed-off-by: Andreas Färber <[email protected]>
Reviewed-by: Igor Mammedov <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
12 years agojanitor: move remaining public headers to include/
Paolo Bonzini [Wed, 24 Oct 2012 11:09:17 +0000 (13:09 +0200)]
janitor: move remaining public headers to include/

Headers in the root directory are now used only from within that
directory.

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agohw: move executable format header files to hw/
Paolo Bonzini [Fri, 14 Sep 2012 16:19:15 +0000 (18:19 +0200)]
hw: move executable format header files to hw/

Or delete a.out.h which is unused.

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agofpu: move public header file to include/fpu
Paolo Bonzini [Wed, 24 Oct 2012 11:12:00 +0000 (13:12 +0200)]
fpu: move public header file to include/fpu

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agosoftmmu: move remaining include files to include/ subdirectories
Paolo Bonzini [Mon, 17 Dec 2012 17:20:05 +0000 (18:20 +0100)]
softmmu: move remaining include files to include/ subdirectories

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agosoftmmu: move include files to include/sysemu/
Paolo Bonzini [Mon, 17 Dec 2012 17:20:04 +0000 (18:20 +0100)]
softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agomisc: move include files to include/qemu/
Paolo Bonzini [Mon, 17 Dec 2012 17:20:00 +0000 (18:20 +0100)]
misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoqom: move include files to include/qom/
Paolo Bonzini [Mon, 17 Dec 2012 17:19:50 +0000 (18:19 +0100)]
qom: move include files to include/qom/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agomigration: move include files to include/migration/
Paolo Bonzini [Mon, 17 Dec 2012 17:19:50 +0000 (18:19 +0100)]
migration: move include files to include/migration/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agomonitor: move include files to include/monitor/
Paolo Bonzini [Mon, 17 Dec 2012 17:19:49 +0000 (18:19 +0100)]
monitor: move include files to include/monitor/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoexec: move include files to include/exec/
Paolo Bonzini [Mon, 17 Dec 2012 17:19:49 +0000 (18:19 +0100)]
exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoblock: move include files to include/block/
Paolo Bonzini [Mon, 17 Dec 2012 17:19:44 +0000 (18:19 +0100)]
block: move include files to include/block/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoqapi: move include files to include/qobject/
Paolo Bonzini [Mon, 17 Dec 2012 17:19:43 +0000 (18:19 +0100)]
qapi: move include files to include/qobject/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agojanitor: add guards to headers
Paolo Bonzini [Thu, 6 Dec 2012 11:15:58 +0000 (12:15 +0100)]
janitor: add guards to headers

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoqapi: make struct Visitor opaque
Paolo Bonzini [Thu, 6 Dec 2012 10:28:04 +0000 (11:28 +0100)]
qapi: make struct Visitor opaque

Move its definition from qapi-visit-core.h to qapi-visit-impl.h.
Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoqapi: remove qapi/qapi-types-core.h
Paolo Bonzini [Thu, 6 Dec 2012 10:51:59 +0000 (11:51 +0100)]
qapi: remove qapi/qapi-types-core.h

The file is only including error.h and qerror.h.  Prefer explicit
inclusion of whatever files are needed.
Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoqapi: move inclusions of qemu-common.h from headers to .c files
Paolo Bonzini [Thu, 6 Dec 2012 10:22:34 +0000 (11:22 +0100)]
qapi: move inclusions of qemu-common.h from headers to .c files

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoui: move files to ui/ and include/ui/
Paolo Bonzini [Wed, 28 Nov 2012 11:06:30 +0000 (12:06 +0100)]
ui: move files to ui/ and include/ui/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoqemu-ga: move qemu-ga files to qga/
Paolo Bonzini [Wed, 24 Oct 2012 09:26:49 +0000 (11:26 +0200)]
qemu-ga: move qemu-ga files to qga/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agonet: reorganize headers
Paolo Bonzini [Wed, 24 Oct 2012 06:43:34 +0000 (08:43 +0200)]
net: reorganize headers

Move public headers to include/net, and leave private headers in net/.
Put the virtio headers in include/net/tap.h, removing the multiple copies
that existed.  Leave include/net/tap.h as the interface for NICs, and
net/tap_int.h as the interface for OS-specific parts of the tap backend.

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agonet: move net.c to net/
Paolo Bonzini [Wed, 24 Oct 2012 09:27:28 +0000 (11:27 +0200)]
net: move net.c to net/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agonet: do not include net.h everywhere
Paolo Bonzini [Wed, 24 Oct 2012 07:36:33 +0000 (09:36 +0200)]
net: do not include net.h everywhere

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agonet: move Bluetooth stuff out of net.h
Paolo Bonzini [Wed, 24 Oct 2012 07:36:16 +0000 (09:36 +0200)]
net: move Bluetooth stuff out of net.h

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agojanitor: do not include qemu-char everywhere
Paolo Bonzini [Wed, 24 Oct 2012 06:49:51 +0000 (08:49 +0200)]
janitor: do not include qemu-char everywhere

Touching char/char.h basically causes the whole of QEMU to
be rebuilt.  Avoid this, it is usually unnecessary.

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agojanitor: do not rely on indirect inclusions of or from qemu-char.h
Paolo Bonzini [Tue, 25 Sep 2012 08:04:17 +0000 (10:04 +0200)]
janitor: do not rely on indirect inclusions of or from qemu-char.h

Various header files rely on qemu-char.h including qemu-config.h or
main-loop.h, but they really do not need qemu-char.h at all (particularly
interesting is the case of the block layer!).  Clean this up, and also
add missing inclusions of qemu-char.h itself.

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agobuild: kill libuser
Paolo Bonzini [Wed, 24 Oct 2012 09:16:01 +0000 (11:16 +0200)]
build: kill libuser

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agobuild: kill libdis, move disassemblers to disas/
Paolo Bonzini [Wed, 24 Oct 2012 09:12:21 +0000 (11:12 +0200)]
build: kill libdis, move disassemblers to disas/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agobuild: create ldscripts/
Paolo Bonzini [Fri, 14 Sep 2012 16:28:23 +0000 (18:28 +0200)]
build: create ldscripts/

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agobuild: move rules from Makefile to */Makefile.objs
Paolo Bonzini [Mon, 17 Sep 2012 06:35:53 +0000 (08:35 +0200)]
build: move rules from Makefile to */Makefile.objs

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agobuild: add $(TARGET_DIR) to "GEN config-target.h" lines
Paolo Bonzini [Mon, 17 Sep 2012 08:31:17 +0000 (10:31 +0200)]
build: add $(TARGET_DIR) to "GEN config-target.h" lines

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agobuild: adjust setting of QEMU_INCLUDES
Paolo Bonzini [Mon, 17 Sep 2012 08:21:52 +0000 (10:21 +0200)]
build: adjust setting of QEMU_INCLUDES

Make it correct for nested directories, and move the static part
from Makefile to configure.

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agovscclient: use per-target variables
Paolo Bonzini [Wed, 24 Oct 2012 08:47:53 +0000 (10:47 +0200)]
vscclient: use per-target variables

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agotarget-alpha: Add support for -cpu ?
Andreas Färber [Mon, 15 Oct 2012 15:44:21 +0000 (17:44 +0200)]
target-alpha: Add support for -cpu ?

Implement alphabetical listing of CPU subclasses.

Signed-off-by: Andreas Färber <[email protected]>
Acked-by: Richard Henderson <[email protected]>
12 years agotarget-alpha: Turn CPU definitions into subclasses
Andreas Färber [Mon, 15 Oct 2012 15:33:32 +0000 (17:33 +0200)]
target-alpha: Turn CPU definitions into subclasses

Make TYPE_ALPHA_CPU abstract and add types <name>-alpha-cpu.
Use type inheritence, and turn "2*" models into aliases.

Move cpu_alpha_init() to cpu.c and split out CPU realization.
Default to creating type "ev67-alpha-cpu" as before.

Signed-off-by: Andreas Färber <[email protected]>
Acked-by: Richard Henderson <[email protected]>
12 years agotarget-alpha: Avoid leaking the alarm timer over reset
Andreas Färber [Wed, 31 Oct 2012 01:41:11 +0000 (02:41 +0100)]
target-alpha: Avoid leaking the alarm timer over reset

Move the timer from CPUAlphaState to AlphaCPU to avoid the pointer being
zero'ed once we implement reset. Would cause a segfault in
sys_helper.c:helper_set_alarm().

This also simplifies timer initialization in Typhoon.

Signed-off-by: Andreas Färber <[email protected]>
Acked-by: Richard Henderson <[email protected]>
12 years agoalpha: Pass AlphaCPU array to Typhoon
Andreas Färber [Tue, 16 Oct 2012 00:45:53 +0000 (02:45 +0200)]
alpha: Pass AlphaCPU array to Typhoon

Also store it in TyphoonCchip.

Signed-off-by: Andreas Färber <[email protected]>
Acked-by: Richard Henderson <[email protected]>
12 years agotarget-alpha: Let cpu_alpha_init() return AlphaCPU
Andreas Färber [Mon, 15 Oct 2012 15:52:00 +0000 (17:52 +0200)]
target-alpha: Let cpu_alpha_init() return AlphaCPU

Replace cpu_init() macro with inline function for backwards
compatibility.

Signed-off-by: Andreas Färber <[email protected]>
Acked-by: Richard Henderson <[email protected]>
12 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Tue, 18 Dec 2012 21:41:43 +0000 (15:41 -0600)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

* stefanha/trivial-patches:
  configure: Earlier pkg-config probe
  vmmouse_reset(): remove minimal code duplication
  linux-user/syscall.c: remove wrong forward decl of setgroups()
  fix build error on ARM due to wrong glibc check
  gitignore: Add virtfs-proxy-helper
  arm_gic: Add cpu nr to Raised IRQ message
  zynq_slcr: Compile time warning fixes.
  pflash_cfi0x: Send debug messages to stderr
  pflash_cfi01: qemu_log_mask "unimplemented" msg
  net, hub: fix the indent in the comments

Signed-off-by: Anthony Liguori <[email protected]>
12 years agoMerge remote-tracking branch 'amit/master' into staging
Anthony Liguori [Tue, 18 Dec 2012 21:41:32 +0000 (15:41 -0600)]
Merge remote-tracking branch 'amit/master' into staging

* amit/master:
  virtio-serial-bus: assert port is non-null in remove_port()
  virtio-serial-bus: send_control_msg() should not deal with cpkts
  virtio-serial: delete timer if active during exit
  virtio-serial: allocate post_load only at load-time
  virtio-serial: move active ports loading to separate function
  virtio-serial: use uint32_t to count ports

Signed-off-by: Anthony Liguori <[email protected]>
12 years agoMerge remote-tracking branch 'spice/spice.v66' into staging
Anthony Liguori [Tue, 18 Dec 2012 21:41:21 +0000 (15:41 -0600)]
Merge remote-tracking branch 'spice/spice.v66' into staging

* spice/spice.v66:
  docs: add spice-port-fqdn.txt
  spice-qemu-char: register spicevmc ports during qemu_spice_init()
  spice-qemu-char: keep a list of spice chardev
  spice-qemu-char: add spiceport chardev
  spice-qemu-char: factor out CharDriverState creation
  spice-qemu-char: write to chardev whatever amount it can read
  qxl+vnc: register a vm state change handler for dummy spice_server
  qxl: save qemu_create_displaysurface_from result

Signed-off-by: Anthony Liguori <[email protected]>
12 years agoMerge remote-tracking branch 'sstabellini/xen-20121217' into staging
Anthony Liguori [Tue, 18 Dec 2012 21:41:04 +0000 (15:41 -0600)]
Merge remote-tracking branch 'sstabellini/xen-20121217' into staging

* sstabellini/xen-20121217:
  cpu_ioreq_pio, cpu_ioreq_move: i should be uint32_t rather than int
  cpu_ioreq_pio, cpu_ioreq_move: introduce read_phys_req_item, write_phys_req_item
  Fix compile errors when enabling Xen debug logging.
  xen: fix trivial PCI passthrough MSI-X bug
  xen: implement support for secondary consoles in the console backend

Signed-off-by: Anthony Liguori <[email protected]>
12 years agoconfigure: Earlier pkg-config probe
Stefan Weil [Sun, 16 Dec 2012 10:29:45 +0000 (11:29 +0100)]
configure: Earlier pkg-config probe

Probe pkg-config before it is used for the first time (libseccomp check).

Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agovmmouse_reset(): remove minimal code duplication
Laszlo Ersek [Thu, 13 Dec 2012 14:01:49 +0000 (15:01 +0100)]
vmmouse_reset(): remove minimal code duplication

Commit 069ab0eb added a vmmouse_disable() call to vmmouse_reset().
vmmouse_disable() resets the status already.

Signed-off-by: Laszlo Ersek <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agolinux-user/syscall.c: remove wrong forward decl of setgroups()
John Spencer [Mon, 10 Dec 2012 06:59:46 +0000 (07:59 +0100)]
linux-user/syscall.c: remove wrong forward decl of setgroups()

this declaration is wrong:
the correct prototype on linux is:
int setgroups(size_t size, const gid_t *list);

since by default musl libc exposes this symbol in unistd.h
additionally to grp.h, the wrong declaration causes a build error.

the proper fix is to simply include the correct header.

Signed-off-by: John Spencer <[email protected]>
Reviewed-by: Stefan Weil <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agofix build error on ARM due to wrong glibc check
John Spencer [Mon, 10 Dec 2012 06:59:44 +0000 (07:59 +0100)]
fix build error on ARM due to wrong glibc check

the test for glibc < 2 "succeeds" wrongly for any non-glibc C library,
and breaks the build on musl libc.
we must first test if __GLIBC__ is defined at all, before using it
unconditionally.

Signed-off-by: John Spencer <[email protected]>
Reviewed-by: Stefan Weil <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agogitignore: Add virtfs-proxy-helper
Cole Robinson [Fri, 7 Dec 2012 01:03:26 +0000 (20:03 -0500)]
gitignore: Add virtfs-proxy-helper

Signed-off-by: Cole Robinson <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agoarm_gic: Add cpu nr to Raised IRQ message
Peter Crosthwaite [Tue, 4 Dec 2012 06:04:36 +0000 (16:04 +1000)]
arm_gic: Add cpu nr to Raised IRQ message

Add the relevant CPU nr to this debug message to make IRQ debugging more
informative.

Signed-off-by: Peter Crosthwaite <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agozynq_slcr: Compile time warning fixes.
Peter Crosthwaite [Tue, 4 Dec 2012 06:04:35 +0000 (16:04 +1000)]
zynq_slcr: Compile time warning fixes.

Few warnings when compiled with debug printfs enabled. Fixed all.

Signed-off-by: Peter Crosthwaite <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agopflash_cfi0x: Send debug messages to stderr
Peter Crosthwaite [Tue, 4 Dec 2012 06:04:34 +0000 (16:04 +1000)]
pflash_cfi0x: Send debug messages to stderr

These debug info messages should go to stderr rather than stdout.

Signed-off-by: Peter Crosthwaite <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agopflash_cfi01: qemu_log_mask "unimplemented" msg
Peter Crosthwaite [Tue, 4 Dec 2012 06:04:33 +0000 (16:04 +1000)]
pflash_cfi01: qemu_log_mask "unimplemented" msg

This printf is informing the user of unimplemented functionality. It should be
re-directed to qemu_log(LOG_UNIMP, ...) accordingly.

Signed-off-by: Peter Crosthwaite <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agonet, hub: fix the indent in the comments
Zhi Yong Wu [Fri, 7 Dec 2012 01:43:18 +0000 (09:43 +0800)]
net, hub: fix the indent in the comments

  Remove some redundant blanks in the comments of
net_hub_id_for_client().

Signed-off-by: Zhi Yong Wu <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
12 years agovirtio-serial-bus: assert port is non-null in remove_port()
Amit Shah [Tue, 18 Dec 2012 07:38:33 +0000 (13:08 +0530)]
virtio-serial-bus: assert port is non-null in remove_port()

remove_port() is called from qdev's unplug callback, and we're certain
the port will be found in our list of ports.  Adding an assert()
documents this.

This was flagged by Coverity, fix suggested by Markus.

CC: Markus Armbruster <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Amit Shah <[email protected]>
12 years agovirtio-serial-bus: send_control_msg() should not deal with cpkts
Amit Shah [Wed, 12 Dec 2012 12:56:09 +0000 (18:26 +0530)]
virtio-serial-bus: send_control_msg() should not deal with cpkts

Stuff the cpkt before calling send_control_msg().  This function should
not be concerned about contents of the buffer it receives.

A few code refactorings recently have made making this change easier
than earlier.

Coverity and clang have flagged this code several times in the past
(cpkt->id not set before send_control_event() passed it on to
send_control_msg()).  This will finally eliminate the false-positive.

CC: Markus Armbruster <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Amit Shah <[email protected]>
12 years agolibcacard: simplify rules for recursive build
Paolo Bonzini [Thu, 27 Sep 2012 07:51:55 +0000 (09:51 +0200)]
libcacard: simplify rules for recursive build

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agoMerge commit '1dd3a74d2ee2d873cde0b390b536e45420b3fe05' into HEAD
Paolo Bonzini [Mon, 17 Dec 2012 17:17:08 +0000 (18:17 +0100)]
Merge commit '1dd3a74d2ee2d873cde0b390b536e45420b3fe05' into HEAD

Signed-off-by: Paolo Bonzini <[email protected]>
12 years agodocs: add spice-port-fqdn.txt
Marc-André Lureau [Wed, 5 Dec 2012 15:15:37 +0000 (16:15 +0100)]
docs: add spice-port-fqdn.txt

Start a simple org.qemu.* registry of well known name.

Signed-off-by: Gerd Hoffmann <[email protected]>
12 years agospice-qemu-char: register spicevmc ports during qemu_spice_init()
Marc-André Lureau [Wed, 5 Dec 2012 15:15:36 +0000 (16:15 +0100)]
spice-qemu-char: register spicevmc ports during qemu_spice_init()

Do the delayed registration of spicevmc ports after Spice server is
initialized.

Signed-off-by: Gerd Hoffmann <[email protected]>
12 years agospice-qemu-char: keep a list of spice chardev
Marc-André Lureau [Wed, 5 Dec 2012 15:15:35 +0000 (16:15 +0100)]
spice-qemu-char: keep a list of spice chardev

Signed-off-by: Gerd Hoffmann <[email protected]>
12 years agospice-qemu-char: add spiceport chardev
Marc-André Lureau [Wed, 5 Dec 2012 15:15:34 +0000 (16:15 +0100)]
spice-qemu-char: add spiceport chardev

Add a new spice chardev to allow arbitrary communication between the
host and the Spice client via the spice server.

Examples:

This allows the Spice client to have a special port for the qemu
monitor:

... -chardev spiceport,name=org.qemu.monitor,id=monitorport
    -mon chardev=monitorport

v2:
- remove support for chardev to chardev linking
- conditionnaly compile with SPICE_SERVER_VERSION

Signed-off-by: Gerd Hoffmann <[email protected]>
12 years agospice-qemu-char: factor out CharDriverState creation
Marc-André Lureau [Wed, 5 Dec 2012 15:15:33 +0000 (16:15 +0100)]
spice-qemu-char: factor out CharDriverState creation

Make the CharDriverState creation code reusable by spicevmc port.

Signed-off-by: Gerd Hoffmann <[email protected]>
12 years agospice-qemu-char: write to chardev whatever amount it can read
Marc-André Lureau [Wed, 5 Dec 2012 15:15:32 +0000 (16:15 +0100)]
spice-qemu-char: write to chardev whatever amount it can read

The current code waits until the chardev can read MIN(len, VMC_MAX)
But some chardev may never reach than amount, in fact some of them
will only ever accept write of 1. Fix the min computation and remove
the VMC_MAX constant.

Signed-off-by: Gerd Hoffmann <[email protected]>
12 years agoqxl+vnc: register a vm state change handler for dummy spice_server
Uri Lublin [Wed, 12 Dec 2012 16:30:47 +0000 (18:30 +0200)]
qxl+vnc: register a vm state change handler for dummy spice_server

When qxl + vnc are used, a dummy spice_server is initialized.
The spice_server has to be told when the VM runstate changes,
which is what this patch does.

Without it, from qxl_send_events(), the following error message is shown:
  qxl_send_events: spice-server bug: guest stopped, ignoring

Cc: [email protected]
Signed-off-by: Uri Lublin <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
This page took 0.075864 seconds and 4 git commands to generate.