]> git.proxmox.com Git - qemu.git/log
qemu.git
11 years agoMerge remote-tracking branch 'bonzini/nbd-next' into staging
Anthony Liguori [Wed, 24 Oct 2012 14:39:49 +0000 (09:39 -0500)]
Merge remote-tracking branch 'bonzini/nbd-next' into staging

* bonzini/nbd-next: (30 commits)
  qmp: add NBD server commands
  block: add close notifiers
  block: prepare code for adding block notifiers
  qemu-sockets: add socket_listen, socket_connect, socket_parse
  tests: do not include tools-obj-y Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  qemu-sockets: return InetSocketAddress from inet_parse
  qapi: add socket address types
  build: add QAPI files to the tools
  vnc: drop QERR_VNC_SERVER_FAILED
  qemu-sockets: add error propagation to Unix socket functions
  qemu-sockets: add error propagation to inet_parse
  qemu-sockets: add error propagation to inet_dgram_opts
  qemu-sockets: add error propagation to inet_connect_addr
  qemu-sockets: include strerror or gai_strerror output in error messages
  vnc: add error propagation to vnc_display_open
  vnc: reorganize code for reverse mode
  vnc: introduce a single label for error returns
  vnc: avoid Yoda conditionals
  qemu-ga: ask and print error information from qemu-sockets
  nbd: ask and print error information from qemu-sockets
  ...

11 years agoqmp: add NBD server commands
Paolo Bonzini [Wed, 22 Aug 2012 14:43:07 +0000 (16:43 +0200)]
qmp: add NBD server commands

Adding an NBD server inside QEMU is trivial, since all the logic is
in nbd.c and can be shared easily between qemu-nbd and QEMU itself.
The main difference is that qemu-nbd serves a single unnamed export,
while QEMU serves named exports.

Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoblock: add close notifiers
Paolo Bonzini [Thu, 23 Aug 2012 09:20:36 +0000 (11:20 +0200)]
block: add close notifiers

The first user of close notifiers will be the embedded NBD server.
It would be possible to use them to do some of the ad hoc processing
(e.g. for block jobs and I/O limits) that is currently done by
bdrv_close.

Acked-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoblock: prepare code for adding block notifiers
Paolo Bonzini [Fri, 19 Oct 2012 09:36:48 +0000 (11:36 +0200)]
block: prepare code for adding block notifiers

There is no reason in principle to skip job cancellation and draining
of pending I/O when there is no medium in the disk.  Do these unconditionally,
which also prepares the code for the next patch.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-sockets: add socket_listen, socket_connect, socket_parse
Paolo Bonzini [Tue, 23 Oct 2012 19:31:53 +0000 (21:31 +0200)]
qemu-sockets: add socket_listen, socket_connect, socket_parse

These are QAPI-friendly versions of the qemu-sockets functions.  They
support IP sockets, Unix sockets, and named file descriptors, using a
QAPI union to dispatch to the correct function.

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agotests: do not include tools-obj-y
Paolo Bonzini [Tue, 23 Oct 2012 20:36:08 +0000 (22:36 +0200)]
tests: do not include tools-obj-y
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-sockets: return InetSocketAddress from inet_parse
Paolo Bonzini [Wed, 19 Sep 2012 11:51:46 +0000 (13:51 +0200)]
qemu-sockets: return InetSocketAddress from inet_parse

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqapi: add socket address types
Paolo Bonzini [Wed, 19 Sep 2012 12:03:35 +0000 (14:03 +0200)]
qapi: add socket address types

Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agobuild: add QAPI files to the tools
Paolo Bonzini [Wed, 19 Sep 2012 13:11:05 +0000 (15:11 +0200)]
build: add QAPI files to the tools

We need them because qemu-sockets will soon be using SocketAddress.

Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoRename target_phys_addr_t to hwaddr
Avi Kivity [Tue, 23 Oct 2012 10:30:10 +0000 (12:30 +0200)]
Rename target_phys_addr_t to hwaddr

target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific).  Replace it with a finger-friendly,
standards conformant hwaddr.

Outstanding patchsets can be fixed up with the command

  git rebase -i --exec 'find -name "*.[ch]"
                        | xargs s/target_phys_addr_t/hwaddr/g' origin

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agovnc: drop QERR_VNC_SERVER_FAILED
Paolo Bonzini [Fri, 19 Oct 2012 09:34:18 +0000 (11:34 +0200)]
vnc: drop QERR_VNC_SERVER_FAILED

We now always return "nice" error messages in errp when we goto fail.
Drop the default error message.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-sockets: add error propagation to Unix socket functions
Paolo Bonzini [Wed, 19 Sep 2012 11:54:39 +0000 (13:54 +0200)]
qemu-sockets: add error propagation to Unix socket functions

Before:

    $ qemu-system-x86_64 -monitor unix:/vvv,server=off
    connect(unix:/vvv): No such file or directory
    chardev: opening backend "socket" failed

After:

    $ x86_64-softmmu/qemu-system-x86_64 -monitor unix:/vvv,server=off
    qemu-system-x86_64: -monitor unix:/vvv,server=off: Failed to connect to socket: No such file or directory
    chardev: opening backend "socket" failed

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-sockets: add error propagation to inet_parse
Paolo Bonzini [Wed, 19 Sep 2012 11:22:21 +0000 (13:22 +0200)]
qemu-sockets: add error propagation to inet_parse

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-sockets: add error propagation to inet_dgram_opts
Paolo Bonzini [Tue, 2 Oct 2012 07:25:14 +0000 (09:25 +0200)]
qemu-sockets: add error propagation to inet_dgram_opts

Before:

    $ qemu-system-x86_64 -monitor udp:localhost:631@localhost:631
    inet_dgram_opts: bind(ipv4,127.0.0.1,631): OK
    inet_dgram_opts failed
    chardev: opening backend "udp" failed

After:

    $ x86_64-softmmu/qemu-system-x86_64 -monitor udp:localhost:631@localhost:631
    qemu-system-x86_64: -monitor udp:localhost:631@localhost:631: Failed to bind socket: Address already in use
    chardev: opening backend "udp" failed

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-sockets: add error propagation to inet_connect_addr
Paolo Bonzini [Tue, 2 Oct 2012 07:19:01 +0000 (09:19 +0200)]
qemu-sockets: add error propagation to inet_connect_addr

perror and fprintf can be removed because all clients can now consume
Errors properly.  However, we'll need to change the non-blocking connect
handlers to take an Error, in order to improve error handling for
migration with the TCP protocol.

This is a minor degradation in error reporting for outgoing migration.
However, until 1.2 this case just failed without even attempting to
connect, so it is still an improvement as far as overall QoI is
concerned.

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-sockets: include strerror or gai_strerror output in error messages
Paolo Bonzini [Tue, 2 Oct 2012 07:18:02 +0000 (09:18 +0200)]
qemu-sockets: include strerror or gai_strerror output in error messages

Among others, before:

    $ qemu-system-x86_64 -chardev socket,port=12345,id=char
    inet_connect: host and/or port not specified
    chardev: opening backend "socket" failed

After:

    $ x86_64-softmmu/qemu-system-x86_64 -chardev socket,port=12345,id=char
    qemu-system-x86_64: -chardev socket,port=12345,id=char: host and/or port not specified
    chardev: opening backend "socket" failed

perror and fprintf can be removed because all clients can now
consume Errors properly.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agovnc: add error propagation to vnc_display_open
Paolo Bonzini [Tue, 2 Oct 2012 08:17:21 +0000 (10:17 +0200)]
vnc: add error propagation to vnc_display_open

Before:

    $ qemu-system-x86_64 -vnc foo.bar:12345
    getaddrinfo(foo.bar,18245): Name or service not known
    Failed to start VNC server on `foo.bar:12345'

    $ qemu-system-x86_64 -vnc localhost:12345,reverse=on
    inet_connect_opts: connect(ipv4,yakj.usersys.redhat.com,127.0.0.1,12345): Connection refused
    Failed to start VNC server on `localhost:12345,reverse=on'

After:

    $ x86_64-softmmu/qemu-system-x86_64 -vnc foo.bar:12345
    Failed to start VNC server on `foo.bar:12345': address resolution failed for foo.bar:18245: Name or service not known

    $ x86_64-softmmu/qemu-system-x86_64 -vnc localhost:12345,reverse=on
    Failed to start VNC server on `localhost:12345,reverse=on': Failed to connect to socket: Connection refused

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agovnc: reorganize code for reverse mode
Paolo Bonzini [Thu, 18 Oct 2012 07:01:01 +0000 (09:01 +0200)]
vnc: reorganize code for reverse mode

Avoid the dance between csock and vs->lsock.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agovnc: introduce a single label for error returns
Paolo Bonzini [Thu, 18 Oct 2012 07:07:05 +0000 (09:07 +0200)]
vnc: introduce a single label for error returns

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agovnc: avoid Yoda conditionals
Paolo Bonzini [Thu, 18 Oct 2012 07:06:21 +0000 (09:06 +0200)]
vnc: avoid Yoda conditionals

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-ga: ask and print error information from qemu-sockets
Paolo Bonzini [Tue, 2 Oct 2012 08:09:14 +0000 (10:09 +0200)]
qemu-ga: ask and print error information from qemu-sockets

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agonbd: ask and print error information from qemu-sockets
Paolo Bonzini [Tue, 2 Oct 2012 08:07:21 +0000 (10:07 +0200)]
nbd: ask and print error information from qemu-sockets

Before:

    $ qemu-system-x86_64 nbd:localhost:12345
    inet_connect_opts: connect(ipv4,yakj.usersys.redhat.com,127.0.0.1,12345): Connection refused
    qemu-system-x86_64: could not open disk image nbd:localhost:12345: Connection refused

After:

    $ x86_64-softmmu/qemu-system-x86_64 nbd:localhost:12345
    qemu-system-x86_64: Failed to connect to socket: Connection refused
    qemu-system-x86_64: could not open disk image nbd:localhost:12345: Connection refused

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-char: ask and print error information from qemu-sockets
Paolo Bonzini [Tue, 2 Oct 2012 07:16:49 +0000 (09:16 +0200)]
qemu-char: ask and print error information from qemu-sockets

Before:

    $ qemu-system-x86_64 -monitor tcp:localhost:6000
    (starts despite error)

    $ qemu-system-x86_64 -monitor tcp:foo.bar:12345
    getaddrinfo(foo.bar,12345): Name or service not known
    chardev: opening backend "socket" failed

    $ qemu-system-x86_64 -monitor tcp:localhost:443,server=on
    inet_listen_opts: bind(ipv4,127.0.0.1,443): Permission denied
    inet_listen_opts: FAILED
    chardev: opening backend "socket" failed

After:

    $ x86_64-softmmu/qemu-system-x86_64 -monitor tcp:localhost:6000
    x86_64-softmmu/qemu-system-x86_64: -monitor tcp:localhost:6000: Failed to connect to socket: Connection refused
    chardev: opening backend "socket" failed

    $ x86_64-softmmu/qemu-system-x86_64 -monitor tcp:foo.bar:12345
    qemu-system-x86_64: -monitor tcp:foo.bar:12345: address resolution failed for foo.bar:12345: Name or service not known
    chardev: opening backend "socket" failed

    $ x86_64-softmmu/qemu-system-x86_64 -monitor tcp:localhost:443,server=on
    qemu-system-x86_64: -monitor tcp:localhost:443,server=on: Failed to bind socket: Permission denied
    chardev: opening backend "socket" failed

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agomigration (incoming): add error propagation to fd and exec protocols
Paolo Bonzini [Tue, 2 Oct 2012 16:21:18 +0000 (18:21 +0200)]
migration (incoming): add error propagation to fd and exec protocols

And remove the superfluous integer return value.

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agomigration (outgoing): add error propagation for all protocols
Paolo Bonzini [Tue, 2 Oct 2012 08:02:46 +0000 (10:02 +0200)]
migration (outgoing): add error propagation for all protocols

Error propagation is already there for socket backends.  Add it to other
protocols, simplifying code that tests for errors that will never happen.
With all protocols understanding Error, the code can be simplified
further by removing the return value.

Unfortunately, the quality of error messages varies depending
on where the error is detected, because no Error is passed to the
NonBlockingConnectHandler.  Thus, the exact error message still cannot
be sent to the user if the OS reports it asynchronously via SO_ERROR.
If NonBlockingConnectHandler received an Error**, we could for
example report the error class and/or message via a new field of the
query-migration command even if it is reported asynchronously.

Before:

    (qemu) migrate fd:ffff
    migrate: An undefined error has occurred
    (qemu) info migrate
    (qemu)

After:

    (qemu) migrate fd:ffff
    migrate: File descriptor named 'ffff' has not been found
    (qemu) info migrate
    capabilities: xbzrle: off
    Migration status: failed
    total time: 0 milliseconds

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agomigration: use qemu-sockets to establish Unix sockets
Paolo Bonzini [Wed, 3 Oct 2012 12:05:49 +0000 (14:05 +0200)]
migration: use qemu-sockets to establish Unix sockets

This makes migration-unix.c again a cut-and-paste job from migration-tcp.c,
exactly as it was in the beginning. :)

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agomigration: centralize call to migrate_fd_error()
Paolo Bonzini [Tue, 2 Oct 2012 07:59:38 +0000 (09:59 +0200)]
migration: centralize call to migrate_fd_error()

The call to migrate_fd_error() was missing for non-socket backends, so
centralize it in qmp_migrate().

Before:

    (qemu) migrate fd:ffff
    migrate: An undefined error has occurred
    (qemu) info migrate
    (qemu)

After:

    (qemu) migrate fd:ffff
    migrate: An undefined error has occurred
    (qemu) info migrate
    capabilities: xbzrle: off
    Migration status: failed
    total time: 0 milliseconds

(The awful error message will be fixed later in the series).

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agomigration: avoid using error_is_set and thus relying on errp != NULL
Paolo Bonzini [Wed, 3 Oct 2012 12:34:33 +0000 (14:34 +0200)]
migration: avoid using error_is_set and thus relying on errp != NULL

The migration code is using errp to detect "internal" errors, this means
that it relies on errp being non-NULL.

No impact so far because our only QMP clients (the QMP marshaller and HMP)
never pass a NULL Error **.  But if we had others, this patch would make
sure that migration can work with a NULL Error **.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-sockets: add nonblocking connect for Unix sockets
Paolo Bonzini [Wed, 3 Oct 2012 11:37:46 +0000 (13:37 +0200)]
qemu-sockets: add nonblocking connect for Unix sockets

This patch mostly mimics what was done to TCP sockets, but simpler
because there is only one address to try.  It also includes a free EINTR
bug fix.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-sockets: unix_listen and unix_connect are portable
Paolo Bonzini [Thu, 18 Oct 2012 06:44:00 +0000 (08:44 +0200)]
qemu-sockets: unix_listen and unix_connect are portable

They are just wrappers and do not need a Win32-specific version.

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoqemu-sockets: add Error ** to all functions
Paolo Bonzini [Tue, 2 Oct 2012 07:35:32 +0000 (09:35 +0200)]
qemu-sockets: add Error ** to all functions

This lets me adjust the clients to do proper error propagation first,
thus avoiding temporary regressions in the quality of the error messages.

Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoerror: add error_set_errno and error_setg_errno
Paolo Bonzini [Tue, 2 Oct 2012 07:00:45 +0000 (09:00 +0200)]
error: add error_set_errno and error_setg_errno

These functions help maintaining homogeneous formatting of error
messages that include strerror values.

Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
11 years agoMerge remote-tracking branch 'qemu-kvm/memory/urgent' into staging
Anthony Liguori [Mon, 22 Oct 2012 19:49:18 +0000 (14:49 -0500)]
Merge remote-tracking branch 'qemu-kvm/memory/urgent' into staging

* qemu-kvm/memory/urgent:
  memory: abort if a memory region is destroyed during a transaction
  i440fx: avoid destroying memory regions within a transaction
  memory: Make eventfd adhere to device endianness

11 years agoMerge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20121017.0' into staging
Anthony Liguori [Mon, 22 Oct 2012 19:48:23 +0000 (14:48 -0500)]
Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20121017.0' into staging

* awilliam/tags/vfio-pci-for-qemu-20121017.0:
  vfio-pci: Mark non-migratable
  vfio-pci: Fix debug build

11 years agousb-serial: only expose device in guest when the chardev is open
Gerd Hoffmann [Wed, 17 Oct 2012 07:54:25 +0000 (09:54 +0200)]
usb-serial: only expose device in guest when the chardev is open

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agousb-serial: don't magically zap chardev on umplug
Gerd Hoffmann [Wed, 17 Oct 2012 07:54:24 +0000 (09:54 +0200)]
usb-serial: don't magically zap chardev on umplug

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoserial: add pci-serial documentation
Gerd Hoffmann [Wed, 17 Oct 2012 07:54:23 +0000 (09:54 +0200)]
serial: add pci-serial documentation

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoserial: add 2x + 4x pci variant
Gerd Hoffmann [Wed, 17 Oct 2012 07:54:22 +0000 (09:54 +0200)]
serial: add 2x + 4x pci variant

Add multiport serial card implementation, with two variants, one
featuring two and one featuring four ports.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoserial: add windows inf file for the pci card to docs
Gerd Hoffmann [Wed, 17 Oct 2012 07:54:21 +0000 (09:54 +0200)]
serial: add windows inf file for the pci card to docs

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoserial: add pci variant
Gerd Hoffmann [Wed, 17 Oct 2012 07:54:20 +0000 (09:54 +0200)]
serial: add pci variant

So we get a hot-pluggable 16550 uart.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoserial: split serial.c
Gerd Hoffmann [Wed, 17 Oct 2012 07:54:19 +0000 (09:54 +0200)]
serial: split serial.c

Split serial.c into serial.c, serial.h and serial-isa.c.  While being at
creating a serial.h header file move the serial prototypes from pc.h to
the new serial.h.  The latter leads to s/pc.h/serial.h/ in tons of
boards which just want the serial bits from pc.h

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoCall MADV_HUGEPAGE for guest RAM allocations
Luiz Capitulino [Fri, 5 Oct 2012 19:47:57 +0000 (16:47 -0300)]
Call MADV_HUGEPAGE for guest RAM allocations

This makes it possible for QEMU to use transparent huge pages (THP)
when transparent_hugepage/enabled=madvise. Otherwise THP is only
used when it's enabled system wide.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
11 years agoMerge remote-tracking branch 'quintela/migration-next-20121017' into staging
Anthony Liguori [Mon, 22 Oct 2012 18:26:23 +0000 (13:26 -0500)]
Merge remote-tracking branch 'quintela/migration-next-20121017' into staging

* quintela/migration-next-20121017: (41 commits)
  cpus: create qemu_in_vcpu_thread()
  savevm: make qemu_file_put_notify() return errors
  savevm: un-export qemu_file_set_error()
  block-migration: handle errors with the return codes correctly
  block-migration:  Switch meaning of return value
  block-migration: make flush_blks() return errors
  buffered_file: buffered_put_buffer() don't need to set last_error
  savevm: Only qemu_fflush() can generate errors
  savevm: make qemu_fill_buffer() be consistent
  savevm: unexport qemu_ftell()
  savevm: unfold qemu_fclose_internal()
  savevm: make qemu_fflush() return an error code
  savevm: Remove qemu_fseek()
  virtio-net: use qemu_get_buffer() in a temp buffer
  savevm: unexport qemu_fflush
  migration: make migrate_fd_wait_for_unfreeze() return errors
  buffered_file: make buffered_flush return the error code
  buffered_file: callers of buffered_flush() already check for errors
  buffered_file: We can access directly to bandwidth_limit
  buffered_file: unfold migrate_fd_close
  ...

11 years agoMerge remote-tracking branch 'qemu-kvm/memory/dma' into staging
Anthony Liguori [Mon, 22 Oct 2012 18:26:07 +0000 (13:26 -0500)]
Merge remote-tracking branch 'qemu-kvm/memory/dma' into staging

* qemu-kvm/memory/dma: (23 commits)
  pci: honor PCI_COMMAND_MASTER
  pci: give each device its own address space
  memory: add address_space_destroy()
  dma: make dma access its own address space
  memory: per-AddressSpace dispatch
  s390: avoid reaching into memory core internals
  memory: use AddressSpace for MemoryListener filtering
  memory: move tcg flush into a tcg memory listener
  memory: move address_space_memory and address_space_io out of memory core
  memory: manage coalesced mmio via a MemoryListener
  xen: drop no-op MemoryListener callbacks
  kvm: drop no-op MemoryListener callbacks
  xen_pt: drop no-op MemoryListener callbacks
  vfio: drop no-op MemoryListener callbacks
  memory: drop no-op MemoryListener callbacks
  memory: provide defaults for MemoryListener operations
  memory: maintain a list of address spaces
  memory: export AddressSpace
  memory: prepare AddressSpace for exporting
  xen_pt: use separate MemoryListeners for memory and I/O
  ...

11 years agopci: honor PCI_COMMAND_MASTER
Avi Kivity [Wed, 3 Oct 2012 15:42:58 +0000 (17:42 +0200)]
pci: honor PCI_COMMAND_MASTER

Currently we ignore PCI_COMMAND_MASTER completely: DMA succeeds even when
the bit is clear.

Honor PCI_COMMAND_MASTER by inserting a memory region into the device's
bus master address space, and tying its enable status to PCI_COMMAND_MASTER.

Tested using

  setpci -s 03 COMMAND=3

while a ping was running on a NIC in slot 3.  The kernel (Linux) detected
the stall and recovered after the command

  setpci -s 03 COMMAND=7

was issued.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agopci: give each device its own address space
Avi Kivity [Wed, 3 Oct 2012 15:17:27 +0000 (17:17 +0200)]
pci: give each device its own address space

Accesses from different devices can resolve differently
(depending on bridge settings, iommus, and PCI_COMMAND_MASTER), so
set up an address space for each device.

Currently iommus are expressed outside the memory API, so this doesn't
work if an iommu is present.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: add address_space_destroy()
Avi Kivity [Sun, 7 Oct 2012 10:59:55 +0000 (12:59 +0200)]
memory: add address_space_destroy()

Since address spaces can be created dynamically by device hotplug, they
can also be destroyed dynamically.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agodma: make dma access its own address space
Avi Kivity [Wed, 3 Oct 2012 14:42:37 +0000 (16:42 +0200)]
dma: make dma access its own address space

Instead of accessing the cpu address space, use an address space
configured by the caller.

Eventually all dma functionality will be folded into AddressSpace,
but we have to start from something.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: per-AddressSpace dispatch
Avi Kivity [Wed, 3 Oct 2012 14:22:53 +0000 (16:22 +0200)]
memory: per-AddressSpace dispatch

Currently we use a global radix tree to dispatch memory access.  This only
works with a single address space; to support multiple address spaces we
make the radix tree a member of AddressSpace (via an intermediate structure
AddressSpaceDispatch to avoid exposing too many internals).

A side effect is that address_space_io also gains a dispatch table.  When
we remove all the pre-memory-API I/O registrations, we can use that for
dispatching I/O and get rid of the original I/O dispatch.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agos390: avoid reaching into memory core internals
Avi Kivity [Wed, 3 Oct 2012 14:14:23 +0000 (16:14 +0200)]
s390: avoid reaching into memory core internals

use cpu_physical_memory_is_io() instead.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: use AddressSpace for MemoryListener filtering
Avi Kivity [Tue, 2 Oct 2012 18:13:51 +0000 (20:13 +0200)]
memory: use AddressSpace for MemoryListener filtering

Using the AddressSpace type reduces confusion, as you can't accidentally
supply the MemoryRegion you're interested in.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: move tcg flush into a tcg memory listener
Avi Kivity [Tue, 2 Oct 2012 16:54:45 +0000 (18:54 +0200)]
memory: move tcg flush into a tcg memory listener

We plan to make the core listener listen to all address spaces; this
will cause many more flushes than necessary.  Prepare for that by
moving the flush into a tcg-specific listener.

Later we can avoid registering the listener if tcg is disabled.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: move address_space_memory and address_space_io out of memory core
Avi Kivity [Tue, 2 Oct 2012 16:49:28 +0000 (18:49 +0200)]
memory: move address_space_memory and address_space_io out of memory core

With this change, memory.c no longer knows anything about special address
spaces, so it is prepared for AddressSpace based DMA.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agomemory: manage coalesced mmio via a MemoryListener
Avi Kivity [Tue, 2 Oct 2012 16:21:54 +0000 (18:21 +0200)]
memory: manage coalesced mmio via a MemoryListener

Instead of calling a global function on coalesced mmio changes, which
routes the call to kvm if enabled, add coalesced mmio hooks to
MemoryListener and make kvm use that instead.

The motivation is support for multiple address spaces (which means we
we need to filter the call on the right address space) but the result
is cleaner as well.

Signed-off-by: Avi Kivity <avi@redhat.com>
11 years agofix CONFIG_QEMU_HELPERDIR generation again
Michael Tokarev [Sun, 21 Oct 2012 18:52:54 +0000 (22:52 +0400)]
fix CONFIG_QEMU_HELPERDIR generation again

commit 38f419f35225 fixed a breakage with CONFIG_QEMU_HELPERDIR
which has been introduced by 8bf188aa18ef7a8.  But while techinically
that fix has been correct, all other similar variables are handled
differently.  Make it consistent, and let scripts/create_config
expand and capitalize the variable properly like for all other
qemu_*dir variables.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
11 years agotarget-sparc: fix FMOVr instruction
Aurelien Jarno [Tue, 16 Oct 2012 23:28:35 +0000 (01:28 +0200)]
target-sparc: fix FMOVr instruction

Like the MOVr instruction, the FMOVr instruction has the condition
encoded between bits 10 and 12.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohw/pl031: Use LOG_GUEST_ERROR
Peter Maydell [Thu, 18 Oct 2012 13:11:42 +0000 (14:11 +0100)]
hw/pl031: Use LOG_GUEST_ERROR

Use LOG_GUEST_ERROR rather than hw_error or direct fprintf.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohw/pl022: Use LOG_UNIMP and LOG_GUEST_ERROR
Peter Maydell [Thu, 18 Oct 2012 13:11:41 +0000 (14:11 +0100)]
hw/pl022: Use LOG_UNIMP and LOG_GUEST_ERROR

Use LOG_UNIMP and LOG_GUEST_ERROR where appropriate rather
than hw_error().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohw/pl011: Use LOG_UNIMP and LOG_GUEST_ERROR
Peter Maydell [Thu, 18 Oct 2012 13:11:40 +0000 (14:11 +0100)]
hw/pl011: Use LOG_UNIMP and LOG_GUEST_ERROR

Use the new LOG_UNIMP and LOG_GUEST_ERROR logging types rather
than hw_error().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohw/pl190: Use LOG_GUEST_ERROR
Peter Maydell [Thu, 18 Oct 2012 13:11:39 +0000 (14:11 +0100)]
hw/pl190: Use LOG_GUEST_ERROR

If the guest attempts an offset to a nonexistent register, just
log this via LOG_GUEST_ERROR rather than killing QEMU with a hw_error.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohw/pl041: Use LOG_UNIMP
Peter Maydell [Thu, 18 Oct 2012 13:11:38 +0000 (14:11 +0100)]
hw/pl041: Use LOG_UNIMP

Use the new LOG_UNIMP tracing to report unimplemented
features.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohw/pl181: Use LOG_UNIMP and LOG_GUEST_ERROR
Peter Maydell [Thu, 18 Oct 2012 13:11:37 +0000 (14:11 +0100)]
hw/pl181: Use LOG_UNIMP and LOG_GUEST_ERROR

Rather than a mix of direct printing to stderr and aborting
via hw_error(), use LOG_UNIMP and LOG_GUEST_ERROR.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agohw/hw.h: Add include of qemu-log.h
Peter Maydell [Thu, 18 Oct 2012 13:11:36 +0000 (14:11 +0100)]
hw/hw.h: Add include of qemu-log.h

Add an include of qemu-log.h to hw.h, so that device model
code has access to these logging functions without the need
to directly include qemu-log.h.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoqemu-log: Add new log category for guest bugs
Peter Maydell [Thu, 18 Oct 2012 13:11:35 +0000 (14:11 +0100)]
qemu-log: Add new log category for guest bugs

Add a new category for device models to log guest behaviour
which is likely to be a guest bug of some kind (accessing
nonexistent registers, reading 32 bit wide registers with
a byte access, etc). Making this its own log category allows
those who care (mostly guest OS authors) to see the complaints
without bothering most users.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Remove cpu_tmp0 as a global
Richard Henderson [Tue, 16 Oct 2012 09:32:31 +0000 (19:32 +1000)]
target-sparc: Remove cpu_tmp0 as a global

Subroutines do their own local temporary management.
Within disas_sparc_insn we limit the existance of the variable
to OP=2 insns, and delay initialization as late as is reasonable
for the specific XOP.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Make cpu_dst local to OP=2 insns
Richard Henderson [Tue, 16 Oct 2012 09:32:30 +0000 (19:32 +1000)]
target-sparc: Make cpu_dst local to OP=2 insns

And initialize it such that it (may) write directly to rd.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Only use cpu_dst for eventual writes to a gpr
Richard Henderson [Tue, 16 Oct 2012 09:32:29 +0000 (19:32 +1000)]
target-sparc: Only use cpu_dst for eventual writes to a gpr

Use cpu_tmp0 for other stuff, like Write Priv Register.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Remove last uses of cpu_tmp64
Richard Henderson [Tue, 16 Oct 2012 09:32:28 +0000 (19:32 +1000)]
target-sparc: Remove last uses of cpu_tmp64

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Remove cpu_tmp64 use from softint insns
Richard Henderson [Tue, 16 Oct 2012 09:32:27 +0000 (19:32 +1000)]
target-sparc: Remove cpu_tmp64 use from softint insns

The use of "tl" functions and a tmp64 is logically incompatible.
Use cpu_tmp0 instead.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Don't use a temporary for gen_dest_fpr_D
Richard Henderson [Tue, 16 Oct 2012 09:32:26 +0000 (19:32 +1000)]
target-sparc: Don't use a temporary for gen_dest_fpr_D

In all cases we don't have write-before-read problems.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Remove usage of cpu_tmp64 from most helper functions
Richard Henderson [Tue, 16 Oct 2012 09:32:25 +0000 (19:32 +1000)]
target-sparc: Remove usage of cpu_tmp64 from most helper functions

Use a locally allocated temporary instead.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Tidy ldfsr, stfsr
Richard Henderson [Tue, 16 Oct 2012 09:32:24 +0000 (19:32 +1000)]
target-sparc: Tidy ldfsr, stfsr

Remove the last uses of cpu_tmp32.  Unify the code between sparc64
and sparc32 by using the proper "tl" functions.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Avoid cpu_tmp32 in Write Priv Register
Richard Henderson [Tue, 16 Oct 2012 09:32:23 +0000 (19:32 +1000)]
target-sparc: Avoid cpu_tmp32 in Write Priv Register

No need to copy to a temporary to store 32 bits.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Avoid cpu_tmp32 in Read Priv Register
Richard Henderson [Tue, 16 Oct 2012 09:32:22 +0000 (19:32 +1000)]
target-sparc: Avoid cpu_tmp32 in Read Priv Register

We don't need another temporary here.  Load directly into the
register we want to set.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Use get_temp_i32 in gen_dest_fpr_F
Richard Henderson [Tue, 16 Oct 2012 09:32:21 +0000 (19:32 +1000)]
target-sparc: Use get_temp_i32 in gen_dest_fpr_F

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Split out get_temp_i32
Richard Henderson [Tue, 16 Oct 2012 09:32:20 +0000 (19:32 +1000)]
target-sparc: Split out get_temp_i32

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Make the cpu_addr variable local to load/store handling
Richard Henderson [Tue, 16 Oct 2012 09:32:19 +0000 (19:32 +1000)]
target-sparc: Make the cpu_addr variable local to load/store handling

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Cleanup cpu_src[12] allocation
Richard Henderson [Tue, 16 Oct 2012 09:32:18 +0000 (19:32 +1000)]
target-sparc: Cleanup cpu_src[12] allocation

Now that get_temp_tl is used for get_src[12], we don't need to
pre-allocate these temporaries.

Fallout from this is moving some assignments around cas/casx to
avoid uninitialized variable warnings.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Finish conversion to gen_load_gpr
Richard Henderson [Tue, 16 Oct 2012 09:32:17 +0000 (19:32 +1000)]
target-sparc: Finish conversion to gen_load_gpr

All users of gen_movl_{reg_TN,TN_reg} are removed.  At the same time,
make cpu_val a local variable for load/store disassembly.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Convert swap to gen_load/store_gpr
Richard Henderson [Tue, 16 Oct 2012 09:32:16 +0000 (19:32 +1000)]
target-sparc: Convert swap to gen_load/store_gpr

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Convert asi helpers to gen_*_gpr
Richard Henderson [Tue, 16 Oct 2012 09:32:15 +0000 (19:32 +1000)]
target-sparc: Convert asi helpers to gen_*_gpr

Push the DisasContext down so that we can use gen_load/store_gpr
in sode gen_ldda_asi, gen_stda_ast, gen_cas_asi, gen_casx_asi.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Use gen_load_gpr in get_src[12]
Richard Henderson [Tue, 16 Oct 2012 09:32:14 +0000 (19:32 +1000)]
target-sparc: Use gen_load_gpr in get_src[12]

This means we can avoid the incoming temporary, though the cleanup
of the existing temporaries is not performed in this patch.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Conversion to gen_*_gpr, part 1
Richard Henderson [Tue, 16 Oct 2012 09:32:13 +0000 (19:32 +1000)]
target-sparc: Conversion to gen_*_gpr, part 1

Only handle the easy cases directly within disas_sparc_insn.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotarget-sparc: Add gen_load/store/dest_gpr
Richard Henderson [Tue, 16 Oct 2012 09:32:12 +0000 (19:32 +1000)]
target-sparc: Add gen_load/store/dest_gpr

Infrastructure to be used to clean up handling of temporaries.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoexec: Make MIN_CODE_GEN_BUFFER_SIZE private to exec.c
Richard Henderson [Tue, 16 Oct 2012 07:30:14 +0000 (17:30 +1000)]
exec: Make MIN_CODE_GEN_BUFFER_SIZE private to exec.c

It is used nowhere else, and the corresponding MAX_CODE_GEN_BUFFER_SIZE
also lives there.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoexec: Allocate code_gen_prologue from code_gen_buffer
Richard Henderson [Tue, 16 Oct 2012 07:30:13 +0000 (17:30 +1000)]
exec: Allocate code_gen_prologue from code_gen_buffer

We had a hack for arm and sparc, allocating code_gen_prologue to a
special section.  Which, honestly does no good under certain cases.
We've already got limits on code_gen_buffer_size to ensure that all
TBs can use direct branches between themselves; reuse this limit to
ensure the prologue is also reachable.

As a bonus, we get to avoid marking a page of the main executable's
data segment as executable.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoexec: Do not use absolute address hints for code_gen_buffer with -fpie
Richard Henderson [Tue, 16 Oct 2012 07:30:12 +0000 (17:30 +1000)]
exec: Do not use absolute address hints for code_gen_buffer with -fpie

The hard-coded addresses inside alloc_code_gen_buffer only make sense
if we're building an executable that will actually run at the address
we've put into the linker scripts.

When we're building with -fpie, the executable will run at some
random location chosen by the kernel.  We get better placement for
the code_gen_buffer if we allow the kernel to place the memory,
as it will tend to to place it near the executable, based on the
PROT_EXEC bit.

Since code_gen_prologue is always inside the executable, this effect
is easily seen at the end of most TB, with the exit_tb opcode, and
with any calls to helper functions.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoexec: Don't make DEFAULT_CODE_GEN_BUFFER_SIZE too large
Richard Henderson [Tue, 16 Oct 2012 07:30:11 +0000 (17:30 +1000)]
exec: Don't make DEFAULT_CODE_GEN_BUFFER_SIZE too large

For ARM we cap the buffer size to 16MB.  Do not allocate 32MB in that case.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agoexec: Split up and tidy code_gen_buffer
Richard Henderson [Tue, 16 Oct 2012 07:30:10 +0000 (17:30 +1000)]
exec: Split up and tidy code_gen_buffer

It now consists of:

A macro definition of MAX_CODE_GEN_BUFFER_SIZE with host-specific values,

A function size_code_gen_buffer that applies most of the reasoning for
choosing a buffer size,

Three variations of a function alloc_code_gen_buffer that contain all
of the logic for allocating executable memory via a given allocation
mechanism.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agocreate struct for machine initialization arguments
Eduardo Habkost [Mon, 15 Oct 2012 20:22:02 +0000 (17:22 -0300)]
create struct for machine initialization arguments

This should help us to:
- More easily add or remove machine initialization arguments without
  having to change every single machine init function;
- More easily make mechanical changes involving the machine init
  functions in the future;
- Let machine initialization forward the init arguments to other
  functions more easily.

This change was half-mechanical process: first the struct was added with
the local ram_size, boot_device, kernel_*, initrd_*, and cpu_model local
variable initialization to all functions. Then the compiler helped me
locate the local variables that are unused, so they could be removed.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agovga: remove CONFIG_BOCHS_VBE
Gerd Hoffmann [Mon, 15 Oct 2012 06:02:57 +0000 (08:02 +0200)]
vga: remove CONFIG_BOCHS_VBE

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agovga: add specs for standard vga
Gerd Hoffmann [Mon, 15 Oct 2012 06:02:56 +0000 (08:02 +0200)]
vga: add specs for standard vga

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agovga: add mmio bar to standard vga
Gerd Hoffmann [Mon, 15 Oct 2012 06:02:55 +0000 (08:02 +0200)]
vga: add mmio bar to standard vga

This patch adds a mmio bar to the qemu standard vga which allows to
access the standard vga registers and bochs dispi interface registers
via mmio.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agovga: fix indention
Gerd Hoffmann [Mon, 15 Oct 2012 06:02:54 +0000 (08:02 +0200)]
vga: fix indention

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
11 years agotests/tcg: fix build
Catalin Patulea [Tue, 16 Oct 2012 20:00:23 +0000 (16:00 -0400)]
tests/tcg: fix build

This broke when the tests were moved from tests/ to tests/tcg/.

On x86_64 host/i386-linux-user non-kvm guest, test-i386 and test-mmap are broken, but at least they build.

To build/run the tests:
$ cd $BUILD_PATH/tests/tcg
$ SRC_PATH=path/to/qemu make <target>

Signed-off-by: Catalin Patulea <catalinp@google.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agoallow make {dist, }clean work w/out configure
Mike Frysinger [Sun, 16 Sep 2012 20:07:13 +0000 (16:07 -0400)]
allow make {dist, }clean work w/out configure

There's no reason to require configure to run before running a clean
target, so check MAKECMDGOALS before.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agotci: fix build breakage for target-sparc
Michael Roth [Mon, 8 Oct 2012 20:45:49 +0000 (15:45 -0500)]
tci: fix build breakage for target-sparc

commit c28ae41 introduced GETPC() usage for sparc, which is currently
not defined when building with --enable-tcg-interpreter. Add sparc to
the list of targets we selectively define GETPC() for.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agoMAINTAINERS: Update email address for Stefan Hajnoczi
Stefan Hajnoczi [Sun, 7 Oct 2012 16:08:49 +0000 (18:08 +0200)]
MAINTAINERS: Update email address for Stefan Hajnoczi

Switch to my new work email address from which I am contributing.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agoconfigure: Fix CONFIG_QEMU_HELPERDIR generation
Jan Kiszka [Wed, 17 Oct 2012 17:09:25 +0000 (19:09 +0200)]
configure: Fix CONFIG_QEMU_HELPERDIR generation

We need to evaluate $libexecdir in configure, otherwise we literally end
up with "${prefix}/libexec" instead of the absolute path as
CONFIG_QEMU_HELPERDIR.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
11 years agoqemu-options.hx: Change from recommending '?' to 'help'
Peter Maydell [Thu, 4 Oct 2012 15:22:01 +0000 (16:22 +0100)]
qemu-options.hx: Change from recommending '?' to 'help'

Update the -help output and documentation so that it recommends
'help' rather than '?' for the various "list valid values for this
option" cases. '?' is deprecated (as it can fail confusingly if
not quoted), so it's better to steer users towards 'help'. ('?'
still works, for backwards compatibility.)

This is the -help option part of the change otherwise done in
commit c8057f9, since we are now past release 1.2 and free to
change our help text without worrying about breaking libvirt.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>