Commit Graph

37525 Commits

Author SHA1 Message Date
David Gibson 4681867544 Add specific config options for PCI-E bridges
The i82801b11, ioh3420 and xio3130 PCI Express devices are currently
included in the build unconditionally.

While they could theoretically appear on any target platform with PCI-E,
they're pretty unlikely to appear on platforms that aren't Intel derived.

Therefore, to avoid presenting unlikely-to-be-relevant devices to the user,
add config options to enable these components, and enable them by default
only on x86 and arm platforms.

(Note that this patch does include these for aarch64, via its inclusion of
arm-softmmu.mak).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-Id: <1425017077-18487-2-git-send-email-david@gibson.dropbear.id.au>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-02-27 15:17:35 +01:00
Gonglei 57fe6a6e4a bootdevice: fix segment fault when booting guest with '-kernel' and '-initrd'
Reproducer:

 $./qemu-system-x86_64 --enable-kvm -kernel /home/vmlinuz-2.6.32.12-0.7-default \
  -initrd /home/initrd-2.6.32.12-0.7-default -append \
 "root=/dev/ram rw console=ttyS0,115200" -dtb guest.dtb -vnc :10 --monitor stdio -smp 2
QEMU 2.2.50 monitor - type 'help' for more information
(qemu) Segmentation fault (core dumped)

Reported-by: Edivaldo de Araujo Pereira <edivaldoapereira@yahoo.com.br>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Message-Id: <1425001784-6752-1-git-send-email-arei.gonglei@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-02-27 15:15:56 +01:00
Pavel Dovgalyuk 2ed1ebcf65 timer: replace time() with QEMU_CLOCK_HOST
This patch replaces time() function calls with calls to
qemu_clock_get_ns(QEMU_CLOCK_HOST). It makes such requests deterministic
in record/replay mode of icount.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Message-Id: <20150227131102.11912.89850.stgit@PASHA-ISP>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-02-27 15:15:50 +01:00
Fam Zheng 0543055967 virtio-scsi-dataplane: Call blk_set_aio_context within BQL
It's not safe to call blk_set_aio_context from outside BQL because of
the bdrv_drain_all there. Let's put it in the hotplug callback which
will be called by qdev device realization for each scsi device attached
to the bus.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <1423969591-23646-3-git-send-email-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-02-27 14:43:45 +01:00
Fam Zheng 2e5b887cfc block: Forbid bdrv_set_aio_context outside BQL
Even if the caller has both the old and the new AioContext's, there can
be a deadlock, due to the leading bdrv_drain_all.

Suppose there are four io threads (A, B, A0, B0) with A and B owning a
BDS for each (bs_a, bs_b); Now A wants to move bs_a to iothread A0, and
B wants to move bs_b to B0, at the same time:

  iothread A                           iothread B
--------------------------------------------------------------------------
  aio_context_acquire(A0) /* OK */     aio_context_acquire(B0) /* OK */
  bdrv_set_aio_context(bs_a, A0)       bdrv_set_aio_context(bs_b, B0)
  -> bdrv_drain_all()                  -> bdrv_drain_all()
     -> acquire A /* OK */               -> acquire A /* blocked */
     -> acquire B /* blocked */          -> acquire B
     ...                                 ...

Deadlock happens because A is waiting for B, and B is waiting for A.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <1423969591-23646-2-git-send-email-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-02-27 14:43:45 +01:00
Paolo Bonzini 2264750483 scsi: give device a parent before setting properties
This mimics what is done in qdev_device_add, and lets the device be
freed in case something goes wrong.  Otherwise, object_unparent returns
immediately without freeing the device, which is on the other hand left
in the parent bus's list of children.

scsi_bus_legacy_handle_cmdline then returns an error, and the HBA is
destroyed as well with object_unparent.  But the lingering device that
was not removed in scsi_bus_legacy_add_drive cannot be removed now either,
and bus_unparent gets stuck in an infinite loop trying to empty the list
of children.

The right fix of course would be to assert in bus_add_child that the
device already has a bus, and remove the "safety net" that adds the
drive to the QOM tree in device_set_realized.  I am not yet sure whether
that would entail changing all callers to qdev_create (as well as
isa_create and usb_create and the corresponding _try_create versions).

Reported-by: Markus Armbruster <armbru@redhat.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-02-27 14:43:44 +01:00
Markus Armbruster b3adf5acb5 qtest: Use qemu_opt_set() instead of qemu_opts_parse()
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:52:13 +01:00
Markus Armbruster 5bdb59a290 pc: Use qemu_opt_set() instead of qemu_opts_parse()
Less code, same result.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:52:07 +01:00
Markus Armbruster 62b3de6934 qemu-sockets: Simplify setting numeric and boolean options
Don't convert numbers or bools to strings for use with qemu_opt_set(),
simply use qemu_opt_set_number() or qemu_opt_set_bool() instead.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:51:53 +01:00
Markus Armbruster a8b18f8fd2 block: Simplify setting numeric options
Don't convert numbers to strings for use with qemu_opt_set(), simply
use qemu_opt_set_number() instead.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:51:46 +01:00
Markus Armbruster dc523cd348 qemu-img: Suppress unhelpful extra errors in convert, amend
img_convert() and img_amend() use qemu_opts_do_parse(), which reports
errors with qerror_report_err().  Its error messages aren't helpful
here, the caller reports one that actually makes sense.  Reproducer:

    $ qemu-img convert -o backing_format=raw in.img out.img
    qemu-img: Invalid parameter 'backing_format'
    qemu-img: Invalid options for file format 'raw'

To fix, propagate errors through qemu_opts_do_parse().  This lifts the
error reporting into callers.  Drop it from img_convert() and
img_amend(), keep it in qemu_chr_parse_compat(), bdrv_img_create().

Since I'm touching qemu_opts_do_parse() anyway, write a function
comment for it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:51:21 +01:00
Markus Armbruster 4f81273dd9 QemuOpts: Propagate errors through opts_parse()
Since I'm touching qemu_opts_parse() anyway, write a function comment
for it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:49:58 +01:00
Markus Armbruster d93ae3cfb9 QemuOpts: Propagate errors through opts_do_parse()
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:49:52 +01:00
Markus Armbruster f43e47dbf6 QemuOpts: Drop qemu_opt_set(), rename qemu_opt_set_err(), fix use
qemu_opt_set() is a wrapper around qemu_opt_set() that reports the
error with qerror_report_err().

Most of its users assume the function can't fail.  Make them use
qemu_opt_set_err() with &error_abort, so that should the assumption
ever break, it'll break noisily.

Just two users remain, in util/qemu-config.c.  Switch them to
qemu_opt_set_err() as well, then rename qemu_opt_set_err() to
qemu_opt_set().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:49:31 +01:00
Markus Armbruster 6be4194b92 block: Suppress unhelpful extra errors in bdrv_img_create()
bdrv_img_create() uses qemu_opt_set(), which reports errors with
qerror_report_err().  Its error messages aren't helpful here, the
caller reports one that actually makes sense.  I don't know how to
trigger the error conditions, though.

Switch to qemu_opt_set_err() to get rid of the unwanted messages.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:48:31 +01:00
Markus Armbruster 6750e795b1 qemu-img: Suppress unhelpful extra errors in convert, resize
add_old_style_options() for img_convert() and img_resize() use
qemu_opt_set(), which reports errors with qerror_report_err().  Its
error messages aren't helpful here, the caller reports one that
actually makes sense.  Reproducer:

    $ qemu-img convert -B raw in.img out.img
    qemu-img: Invalid parameter 'backing_file'
    qemu-img: Backing file not supported for file format 'raw'

Switch to qemu_opt_set_err() to get rid of the unwanted messages.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:48:16 +01:00
Markus Armbruster 79087c782e QemuOpts: Convert qemu_opts_set() to Error, fix its use
Return the Error object instead of reporting it with
qerror_report_err().

Change callers that assume the function can't fail to pass
&error_abort, so that should the assumption ever break, it'll break
noisily.

Turns out all callers outside its unit test assume that.  We could
drop the Error ** argument, but that would make the interface less
regular, so don't.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:47:49 +01:00
Markus Armbruster 39101f2511 QemuOpts: Convert qemu_opt_set_number() to Error, fix its use
Return the Error object instead of reporting it with
qerror_report_err().

Change callers that assume the function can't fail to pass
&error_abort, so that should the assumption ever break, it'll break
noisily.

Turns out all callers outside its unit test assume that.  We could
drop the Error ** argument, but that would make the interface less
regular, so don't.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:47:32 +01:00
Markus Armbruster cccb7967bd QemuOpts: Convert qemu_opt_set_bool() to Error, fix its use
Return the Error object instead of reporting it with
qerror_report_err().

Change callers that assume the function can't fail to pass
&error_abort, so that should the assumption ever break, it'll break
noisily.

Turns out all callers outside its unit test assume that.  We could
drop the Error ** argument, but that would make the interface less
regular, so don't.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-02-26 14:46:32 +01:00
Peter Maydell 041ccc922e Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp:
  qapi-types: add C99 index names to arrays
  monitor: Fix missing err = NULL in client_migrate_info()
  balloon: Fix typo
  hmp: Fix warning from smatch (wrong argument in function call)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-26 12:16:46 +00:00
Peter Maydell 2559db0696 seabios: update to 1.8.0 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJU5aCOAAoJEEy22O7T6HE4nWwP/1UNtnD/aFOUJPIWGqHOQcLm
 IWHW9It4XtzYItQsURqpGNe++AJZo2Cwpnf+LnODbBDn0jOVInzeszFS/ni4O+K7
 Apva3OSj8PKveftMt7cks9Yd2zNTxNrWu5a5BT2haVy/UmBKIuyv0WmfT74/4XSF
 9oFIOhoBFvlhl9/v2Zg/21iDyjOkwV0Ip4q84sxX/tkQ83GciSeNmSzRvnXJ+Orb
 iw7xigBI9/5tvtWgd/68GO3EGzdHhJj6kVs7kxxokjt5azq1jojesShVM9LrRk6A
 PIB8eVBDFsO2ilhLNfzBJqTsHB3E5YsjI6Es9selUIbH4YRQsIafU/n9T7PlQSpB
 5bPk0iwIVdUlRjnAMauebhpe480hyzZMnF2Z9KsgJ2vzTQSkTOs+5fv3EOCezTHW
 Yx7tbpDOpMUdbYFfFbcDEL5MlShChfRnRbmHDF8osHMzR7a/VVseVV6ziDU5o/9Z
 x/oSOJHPF8huSYoGvLPMMx7K7X+2+Uk+HZ+6V1VZhQrozkUtLoM5DrszoTJWBVuu
 XKNPMfC21kGVgAE2WcFxCD3z04DM4d6tJHTlYr3eh0HxD8AcQcrI7gEH/imh/izb
 31BqYQjqK/RXHZvmTtMjmh2t4U+DNOOJTzVV/C+NxIycaGxhfngoS4QX+R1ze3Bq
 pZxHFb0N/Zdx0AleQoiy
 =Qffc
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-roms-20150219-1' into staging

seabios: update to 1.8.0 release

# gpg: Signature made Thu Feb 19 08:36:30 2015 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-roms-20150219-1:
  seabios: update to 1.8.0 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-26 11:18:30 +00:00
Peter Maydell 11d39a1310 Features for s390x/kvm
1. guest reIPL changes (Fan Zhang)
 Implements subcode 5 and 6 of diag 0x308. This allows to use
 /sys/firmware/[re]ipl/ccw/* and the chreipl and lsreipl tools in
 Linux. In addition to the normal "change the disk" this also
 allows to switch from booting an external kernel into rebooting
 from a disk.
 
 2. Memory page table walking (Thomas Huth)
 Fix several page table walking functions, used in several places
 like gdb server and instruction handling. Also use these functions
 in several I/O related functions.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJU5FeyAAoJEBF7vIC1phx84EkP/jtg2H2I9/WY2BcHcuDNQCzX
 FJdeQ06NVxNZD4kez4gqLx7ps4gy+IJpLGOsscuqfh4GakvoTh1Z/Y4gLD0n/6UC
 DyuX+IM56Cfzn3reIBig/A6s/VZFtNfIeoKYWL8UCA/f8lzzfKBaBjpUhijEsBQK
 SazqzCPqeSULCJnhJbpYMKvzG9GI+E4YbgIMN0//aoRX/ODbYUO/4QVKrXz5m7if
 MKOuyQyg6XjmD2+pVXlqfTh0wqF8a5e3tjjnAFc0+vpmqN1q4g13593qkhRWQGBT
 0pBTs2PsJ7q9+tplndTqm0a6NRnVcPPdp9YvDwTz8bN/f+DHpWiI1vxDp1SeoLEg
 uYCUzX5dMp2/QXe9xJqNeLOHJt/XSxw0n7ujZ+AkBtcjYBe8qI0C3DtnpG/Uu/sJ
 jNb5bNhwqfdLmtjFx9LhHy2vEuu6JxNeAGec8hdysv21Eg+mi6LkOBkHzm1zlaly
 RGSOUydukwm6UT+MIMBkcJLGUEPj4mTk/mvQ7VCKedG5Rs6pwdwLFPojWzhhZwLS
 zYuRf/bzJodORfchbUMAj+X46IvarOelK5hF6oNGlKl1xoGww0Mbc7XPosmxy6g8
 4UvlopNORnjZ05DA0qJM9i9Dar6JZ6V1qzKOUdt6FGrxTVZlByc79uaC8wiyZlth
 pLHxteJ6WsEf/gqI9KGu
 =lR0Q
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20150218' into staging

Features for s390x/kvm

1. guest reIPL changes (Fan Zhang)
Implements subcode 5 and 6 of diag 0x308. This allows to use
/sys/firmware/[re]ipl/ccw/* and the chreipl and lsreipl tools in
Linux. In addition to the normal "change the disk" this also
allows to switch from booting an external kernel into rebooting
from a disk.

2. Memory page table walking (Thomas Huth)
Fix several page table walking functions, used in several places
like gdb server and instruction handling. Also use these functions
in several I/O related functions.

# gpg: Signature made Wed Feb 18 09:13:22 2015 GMT using RSA key ID B5A61C7C
# gpg: Good signature from "Christian Borntraeger (IBM) <borntraeger@de.ibm.com>"

* remotes/borntraeger/tags/s390x-20150218: (29 commits)
  s390x/helper: Remove s390_cpu_physical_memory_map
  s390x/pci: Rework memory access in zpci instruction
  s390x/ioinst: Rework memory access in TPI instruction
  s390x/ioinst: Rework memory access in CHSC instruction
  s390x/ioinst: Rework memory access in STCRW instruction
  s390x/ioinst: Rework memory access in TSCH instruction
  s390x/ioinst: Set condition code in ioinst_handle_tsch() handler
  s390x/ioinst: Rework memory access in STSCH instruction
  s390x/ioinst: Rework memory access in SSCH instruction
  s390x/ioinst: Rework memory access in MSCH instruction
  s390x/css: Make schib parameter of css_do_msch const
  s390x/mmu: Add function for accessing guest memory
  s390x/kvm: Add function for injecting pgm access exceptions
  s390x/mmu: Clean up mmu_translate_asc()
  s390x/mmu: Check bit 52 in page table entry
  s390x/mmu: Renaming related to the ASCE confusion
  s390x/mmu: Add support for read-only regions
  s390x/mmu: Fix the exception codes for illegal table entries
  s390x/mmu: Fix exception types when checking the ASCEs
  s390x/mmu: Fix translation exception code in lowcore
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-26 09:08:54 +00:00
Peter Maydell c5c6d7f81a Clean up around error_get_pretty(), qerror_report_err()
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJU5GT/AAoJEDhwtADrkYZT6H8QAJSdCnymglYhsJ0L8Pn+mFbw
 ukAxSBjZ+XJXwSBCjSLB9e2Tb6PJZAbAdQJjmI1Ijb+3cXqjRURErTsp+Caz1pjj
 Zw4v4whxNedXl+WeZEwX7sU6WlDhMEk51E1NHssd9dyZ/noEqHiw/XzoqimaYlPK
 nrSTBZ94N+F+Daw1d/cjbRMHHGVSjpVraDEPvZIkC6Mv43dGhSdCT529FXthMpUd
 OhoaQvEdy/75RqFwd4gbjHzA2qHVVsKdq8EfDdHAlcg2LSGB8zM4LlRmYxMKmy2g
 ylZLXtm6v7Pm+tYFVdLc7xWnRIh4vFXBHFJ8O9jFXziV4Nkj7s7qXdLJXxYWfRXU
 KC4/vw9IEkHWWUtn1A69ktyPFjEcnW0ieiEOA7/2FXiH7RARnWTl/YChlQrSgSAM
 zh+/01UhHvKBkxmkJIWpHzR+70A/GyubvlrcSd0g6L+g1hXEw78aryivCoFTKocl
 MNTlI7AcaGW2qpSUn5kr99aBdKD1sSdGPbNqqZMOzUekGQHeUuNNrFlvsTibMo5G
 OikdrgygmoLHBcMCgVykYoHen5lMcz+PS5aGFoGwvMV3DQZAsAwltXGeJSNck143
 WuEatwA0PhuA0S/dZMELC27kUdsbvpBUhboHuShz4pvytihWu0HmVAWDeShd9uPB
 r/WSqvETUcdSOqExGEP2
 =g7dZ
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2015-02-18' into staging

Clean up around error_get_pretty(), qerror_report_err()

# gpg: Signature made Wed Feb 18 10:10:07 2015 GMT using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"

* remotes/armbru/tags/pull-error-2015-02-18:
  qemu-char: Avoid qerror_report_err() outside QMP command handlers
  qemu-img: Avoid qerror_report_err() outside QMP command handlers
  vl: Avoid qerror_report_err() outside QMP command handlers
  tpm: Avoid qerror_report_err() outside QMP command handlers
  numa: Avoid qerror_report_err() outside QMP command handlers
  net: Avoid qerror_report_err() outside QMP command handlers
  monitor: Avoid qerror_report_err() outside QMP command handlers
  monitor: Clean up around monitor_handle_fd_param()
  error: Use error_report_err() where appropriate
  error: New convenience function error_report_err()
  vhost-scsi: Improve error reporting for invalid vhostfd

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-26 07:01:08 +00:00
Eduardo Habkost de13197a38 target-i386: Move APIC ID compatibility code to pc.c
The APIC ID compatibility code is required only for PC, and now that
x86_cpu_initfn() doesn't use x86_cpu_apic_id_from_index() anymore, that
code can be moved to pc.c.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-25 15:00:07 -03:00
Eduardo Habkost e1356dd70a target-i386: Require APIC ID to be explicitly set before CPU realize
Instead of setting APIC ID automatically when creating a X86CPU, require
the property to be set before realizing the object (which all callers of
cpu_x86_create() already do).

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-25 15:00:07 -03:00
Eduardo Habkost 9c235e83f1 target-i386: Set APIC ID using cpu_index on CONFIG_USER
The PC CPU initialization code already sets apic-id based on the CPU
topology, and CONFIG_USER doesn't need the topology-based APIC ID
calculation code.

Make CONFIG_USER set apic-id before realizing the CPU (just like PC
already does), so we can simplify x86_cpu_initfn later. As there is no
CPU topology configuration in CONFIG_USER, just use cpu_index as the
APIC ID.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-25 15:00:07 -03:00
Eduardo Habkost 696da41b1b linux-user: Check for cpu_init() errors
This was the only caller of cpu_init() that was not checking for NULL
yet.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-25 15:00:07 -03:00
Eduardo Habkost 9e9d3863ad target-i386: Move CPUX86State.cpuid_apic_id to X86CPU.apic_id
The field doesn't need to be inside CPUState, and it is not specific for
the CPUID instruction, so move and rename it.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-25 15:00:07 -03:00
Eduardo Habkost 18b0e4e771 target-i386: Simplify error handling on cpu_x86_init_user()
Isolate error handling path from the "if (error)" checks.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-25 15:00:07 -03:00
Eduardo Habkost 15258d46ba target-i386: Eliminate cpu_init() function
Instead of putting extra logic inside cpu.h, just do everything inside
cpu_x86_init_user().

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-25 15:00:07 -03:00
Eduardo Habkost 644dba250a target-i386: Rename cpu_x86_init() to cpu_x86_init_user()
The function is used only for CONFIG_USER, so make its purpose clear.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-25 15:00:07 -03:00
Eduardo Habkost 8a3f75b39d target-i386: Move topology.h to include/hw/i386
This will allow the PC code to use the header, and lets us eliminate the
QEMU_INCLUDES hack inside tests/Makefile.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-25 15:00:07 -03:00
Eduardo Habkost 08e1a1e5a1 target-i386: Eliminate unnecessary get_cpuid_vendor() function
The function was used in only two places. In one of them, the function
made the code less readable by requiring temporary te[bcd]x variables.
In the other one we can simply inline the existing code.

Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-25 15:00:07 -03:00
Eduardo Habkost a3c2ca7d29 target-i386: Simplify listflags() function
listflags() had lots of unnecessary complexity. Instead of printing to a
buffer that will be immediately printed, simply call the printing
function directly. Also, remove the fbits and flags arguments that were
always set to the same value. Also, there's no need to list the flags in
reverse order.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-25 15:00:07 -03:00
Peter Maydell 68b459eaa6 hmp: Normalize HMP command handler names
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJU5HCgAAoJEDhwtADrkYZT0gcP/ijfMUqLlOPMagm5ggDCx/HK
 IFFgcrynQNS6FwTNSIEW04So4q2EMbqwuTEpZ5pe330brGy0U/UgkVmz76BkyoXT
 9LcgKwtVytfc/niF4k5nIKXrasNG1DHPrhd+zx/oTvwmC/8r+NqHZoPOjNaOPLCX
 18SWJMy57l47XAzVOUoFHEW3mEO5YjF8qo3eRcbUWEWXkRp6wg/d2f9nkiHIAfcB
 0XVso0PUJ3jID/WkNqb9JoexTnH5rQSkbeJVZWed8iSAt2cCi+pnE/RjL75M9VF8
 3mPh2Zhi1lEV4qsYQH1OY7909RtKIj7EBDd7kuUWBi1oSIEaIn5GjNWBGCmBbPbY
 0ZVhGFXFvvtI+tPEK3aqRSlyENReT29oKfEv0LAKoUQFBl+jb7qqBns4cfOF+i26
 Tb4cnzqN1rdnlCNemTQATOrr01JAZEkdp3NHq+Bx967ocP3zxfL+pX2Q/3S8aFDs
 j9Ynq+3FvweeDKeYbHKKscELII1DZcNs1CYJOtJIl+XgzowfgpoTRP7P/e2qFM+z
 ey5qF8nc3mW8tVSkotMeeseFe9tj1xxIV+CslTRiYqnxHnmq4HgsN3DoDtnyy9De
 g3U0d9rgBKFPEkAWXg939GXbH2HVUqLkOSy50WGRruP4dzco7BhLyhQimqPchBFj
 b7P40f6NyWCYDhzJu6+N
 =Kleh
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-02-18' into staging

hmp: Normalize HMP command handler names

# gpg: Signature made Wed Feb 18 10:59:44 2015 GMT using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"

* remotes/armbru/tags/pull-monitor-2015-02-18:
  hmp: Name HMP info handler functions hmp_info_SUBCOMMAND()
  hmp: Name HMP command handler functions hmp_COMMAND()
  hmp: Clean up declarations for long-gone info handlers

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-25 13:14:37 +00:00
Peter Maydell 3d30395f7f usb: error handling fixes from Markus, make sysbus ehci arm-only.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJU5GFFAAoJEEy22O7T6HE40lIP/0YUSJxuEWn8cWrMMiUd5Hpb
 9Yd/RVRbnFPX8yngZGC8TScxjxv22m8ziXN5nsICGUgpLVq6ZIq7vAzSbFo4Jh6O
 px9v4C/sy4u1EJ/c2cm3imz0PTRZd2yk/E7vkszm8qr0DTlO/5ULCBR1Jkq5aqj/
 yLmauhv72h9NGb+k1P9Mjc1mr66RWCH2tCeR5uhQ/s3hUadKwh0WEtdfiqIyoCsd
 jM/58TI5+EMoqXH7YHy8dJIwgJIDweafdWAySbVpNK9cKbhuB61sMbAzRB3bzjwY
 Wmco2qyj12u40jniKc7poWL385ddjfaATXmALAwkPUdQkVIIWhZH4FBtX/3YJGGb
 fX++4PaIJxxK/sz4H8VXsxVq+QaNp/1wgAIND+CuIV65FV1ioMe1/iGGI4L4LCEF
 PVpk8t7k5zrZSFn/OMchR1UQZlTWX7oRFg9M5HG6k0hr8PtKYPfrrc9OJ5th0F8j
 xb02/K5nWsYOIgpyliov7T7/gpt1kcCNkKw/KmPO6KNxKzO7jOLeEPxITGY+ASsh
 gWajDzfVCbajvZYu+rePn3wuk4iBrJzhx5yHB9gkvkuKzK8aOJPX5LDshAZGfaI0
 bN3yn/dRIasF9iVTgIv3CPLFp3UyOVFvGnkNCgjH69A0mPD/m/drmoAtlYTWjWUv
 q+VKZ3MqQArKwJXY4tJH
 =ASvH
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20150218-1' into staging

usb: error handling fixes from Markus, make sysbus ehci arm-only.

# gpg: Signature made Wed Feb 18 09:54:13 2015 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-usb-20150218-1:
  Make sysbus EHCI devices ARM only by default
  PPC: Don't use legacy -usbdevice support for setting up board
  r2d: Don't use legacy -usbdevice support for setting up board
  usb: Change usb_create_simple() to abort on failure
  usb: Suppress bogus error when automatic usb-hub creation fails
  usb: Do not prefix error_setg() messages with "Error: "
  usb: Improve -usbdevice error reporting a bit
  usb: usb_create() can't fail, drop useless error handling

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-25 11:54:15 +00:00
Peter Maydell c28d4869ea tag for qga-pull-2015-02-16-v2
v2:
 
 * generalized QAPI function definition for guest-memory-block-size
   to guest-memory-block-info for future extensibility (Eric)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU48JYAAoJEDNTyc7xCLWEK+AH/R6b+ycKU3LKG3ZKcGE/vV45
 szTtE6SKRQmANs1GwQy2qMubBtEFnmfsJSiWQNmPArmP20rZK0Yyy4PaLm7UrTYs
 mpfNee6mlc8PnaMjdzlgBJInwJIx3hgV0UNl4e1h+DM6Xe6GqC6NGc8vdfuIW6is
 zHCtH5mAId7ykC03KCVAtTTWFJlJyujrytsNd2jP3zkZlwcCOS08JG1U0SMaBjTq
 WCZAxbDPuODUqrwimevST1IFstg50cnsW9wq2oLLCp/ZnsYtCdeSZQGIVDkjL8zR
 stJRDKukY4ByU0zLjcDrBpdzTwOb6ndZp929ti6y+3dQUX3oTOhqgE8JT/kR+Qo=
 =KpkU
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2015-02-16-v2-tag' into staging

tag for qga-pull-2015-02-16-v2

v2:

* generalized QAPI function definition for guest-memory-block-size
  to guest-memory-block-info for future extensibility (Eric)

# gpg: Signature made Tue Feb 17 22:36:08 2015 GMT using RSA key ID F108B584
# gpg: Good signature from "Michael Roth <flukshun@gmail.com>"
# gpg:                 aka "Michael Roth <mdroth@utexas.edu>"
# gpg:                 aka "Michael Roth <mdroth@linux.vnet.ibm.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: CEAC C9E1 5534 EBAB B82D  3FA0 3353 C9CE F108 B584

* remotes/mdroth/tags/qga-pull-2015-02-16-v2-tag:
  qemu-ga-win: Fail loudly on bare 'set-time'
  qga: add memory block command that unsupported
  qga: implement qmp_guest_get_memory_block_info() for Linux with sysfs
  qga: implement qmp_guest_set_memory_blocks() for Linux with sysfs
  qga: implement qmp_guest_get_memory_blocks() for Linux with sysfs
  qga: introduce three guest memory block commmands with stubs
  qga: implement file commands for Windows guest
  guest agent: guest-file-open: refactoring
  utils: drop strtok_r from envlist_parse
  qga: add guest-set-user-password command

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-25 11:05:10 +00:00
Peter Maydell 73104fd399 - vhost-scsi: add bootindex property
- RCU: fix MemoryRegion lifetime issues in PCI; document the rules;
 convert of AddressSpaceDispatch and RAMList
 - KVM: add kvm_exit reasons for aarch64
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQEcBAABAgAGBQJU4hugAAoJEL/70l94x66DZXEH/i72tOgvKZfAjfq2xmHXNEsr
 roCfTFIIjKK7feyW6YgwT5pgex6I5umFsO+uIyI/wbu8nDl/3NYEQBT4fR2cGfli
 GKeJOEu8kf+Zt8U+fbxyVQclbuU5S0Ujsg1fX4QXC4swB5fGLT2cRWJ5qd6hKBQs
 GflBuLa7h4eOzcTtOPpqRIwZ8mQE0uxv/hKq9kYLKHXJN2aWsiOls8KQ2CXj2yAl
 p6bMS5f0H0S/1hvQcQV9EazX7owlPIEet3AmSL1TC2sjJ8hrNGMBoFPtUys1uqjc
 B3CwuGi0JtWIduFYV9vZ/Ze4G7Y2iZlqc5vDxIl94d+iFmoHymDOi3mFUZ3H8XQ=
 =Lk9p
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

- vhost-scsi: add bootindex property
- RCU: fix MemoryRegion lifetime issues in PCI; document the rules;
convert of AddressSpaceDispatch and RAMList
- KVM: add kvm_exit reasons for aarch64

# gpg: Signature made Mon Feb 16 16:32:32 2015 GMT using RSA key ID 78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream: (21 commits)
  Convert ram_list to RCU
  exec: convert ram_list to QLIST
  cosmetic changes preparing for the following patches
  exec: protect mru_block with RCU
  rcu: add g_free_rcu
  rcu: introduce RCU-enabled QLIST
  exec: RCUify AddressSpaceDispatch
  exec: make iotlb RCU-friendly
  exec: introduce cpu_reload_memory_map
  docs: clarify memory region lifecycle
  pci: split shpc_cleanup and shpc_free
  pcie: remove mmconfig memory leak and wrap mmconfig update with transaction
  memory: keep the owner of the AddressSpace alive until do_address_space_destroy
  rcu: run RCU callbacks under the BQL
  rcu: do not let RCU callbacks pile up indefinitely
  vhost-scsi: set the bootable value of channel/target/lun
  vhost-scsi: add a property for booting
  vhost-scsi: expose the TYPE_FW_PATH_PROVIDER interface
  vhost-scsi: add bootindex property
  qdev: support to get a device firmware path directly
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-24 13:58:18 +00:00
Peter Maydell 3dc10613c3 Pull request
v2:
  * Fix C11 typedef redefinitions in ahci and libqos malloc [Peter]
  * Fix lx -> PRIx64 format specifiers in ahci [Peter]
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJU4hCxAAoJEJykq7OBq3PIh2EH/02LojwlJwtsUoFuDDOdqVu+
 iQsGbGpmtjeaBkiiiQnlN0UHFJk+I05JohagzivchB6p1v0BDnGPMGCRiY2a/URU
 ZrBt6kvIL6ro6n6ebrMq4+MFbyfgXC6tC8UuBnHBOlJMArHCue8w3BD+FWyYOJGY
 +zzvWKSNxEkjwPyXuBPJI0eqLCmANnr31LVrh+4gTvXRnpArT+fNTBooCgA6zsRe
 ChHObhstM/ljy7XZz5TmTXFf/68+WM8AYF+xIHiU3olCcBgH8VPn7lsdBSEuOtxH
 HNe9tt2M91R+3Zdr2KXu+D4BRARKMlft9GDwLGAvGrYcBr7NNJo3KbKbxoecw4M=
 =2rE4
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Pull request

v2:
 * Fix C11 typedef redefinitions in ahci and libqos malloc [Peter]
 * Fix lx -> PRIx64 format specifiers in ahci [Peter]

# gpg: Signature made Mon Feb 16 15:45:53 2015 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/block-pull-request: (65 commits)
  block: Keep bdrv_check*_request()'s return value
  block: Remove "growable" from BDS
  block: Clamp BlockBackend requests
  qemu-io: Use BlockBackend
  qemu-io: Remove "growable" option
  qemu-io: Use blk_new_open() in openfile()
  qemu-nbd: Use blk_new_open() in main()
  qemu-img: Use BlockBackend as far as possible
  qemu-img: Use blk_new_open() in img_rebase()
  qemu-img: Use blk_new_open() in img_open()
  block/xen: Use blk_new_open() in blk_connect()
  blockdev: Use blk_new_open() in blockdev_init()
  iotests: Add test for driver=qcow2, format=qcow2
  block: Add Error parameter to bdrv_find_protocol()
  block: Add blk_new_open()
  block: Lift some BDS functions to the BlockBackend
  iotests: Add test for qemu-img convert to NBD
  qemu-img: Fix qemu-img convert -n
  qemu-iotests: Add 093 for IO throttling
  qemu-iotests: Allow caller to disable underscore convertion for qmp
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-24 12:59:14 +00:00
Peter Maydell 3dd2d1a339 vnc: fixup some QemuOpts conversion fallout.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJU4aasAAoJEEy22O7T6HE4B2sQALOYATw+4GG6dd3ngJhNOXAx
 jt/M9QyoYAnmw3BD7Sw/MV7fl7n19rEoruL5aQ+Q1mqETkBKq4/dPXqw5NSLEaQB
 zMBQfw3QpRn9IKkWc7z1nOSm322RYsvd+2TG6OV0i8Q4et/sHYoXXozRkQUPVFXX
 U5ESuDjUp8O6VbF+G/6L51t6liseRhkHW8hgsfnELeVYwyXMSCPSXVIXCkif2jko
 cyiD7lwtUdLAwICM4truc0D+aKQoFhkIkEFpwtGb0a8ZHdwx00Apb8OBZGhP8PDt
 xZvPrEnMcCUpPQrvyMrTTflwW/uSO7UBhbs5lQ8GJqYu5HA5z9KjuH7UJF5XfQhN
 pJI6rF6qjHXbfeygRidYu5o+pinltnpyPOWgaPgY2+i/LE/DuYlUV7o001LUeLae
 f3uKu1OIQLJE7hpB18wDMV89muQcsiPSYeHEHaThf9a/3Elh1U2JhfFbdoB51lyB
 Elu17PNKRYDQGsUFcH7AcHYuLRvrzg47dO+2E/Op4OrFoR8SCoFsreG0Cibp+mhb
 scwQHZUA9z9IQoCP06RnsGpKCsfVy9hRlf8enwaJsxFyh+ml8jpziywReJD+5eE0
 I2AeNqyJWFL39yyZD464ffoXyuNSDtFjGO3+Kx53nUK3Uclp+Ot1ETlaSeGsIKY0
 qCi/r1+ZWZ5rlG7k0yMU
 =Z1qf
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20150216-1' into staging

vnc: fixup some QemuOpts conversion fallout.

# gpg: Signature made Mon Feb 16 08:13:32 2015 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-vnc-20150216-1:
  vnc: fix coverity warning
  ui/vnc: optimize full scanline updates
  vnc: auto assian an id when calling change vnc qmp interface
  vnc: introduce an wrapper for auto assign vnc id
  vnc: using bool type instead of int for QEMU_OPT_BOOL
  vnc: correct missing property about vnc_display
  vnc: fix qemu crash when not configure vnc option

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-24 12:07:28 +00:00
Peter Maydell bf2fd13af3 MIPS patches 2015-02-13
Changes:
 * bug fixes, cleanups and minor improvements
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJU339xAAoJEFIRjjwLKdpr3P8H/38mzAuCwu+T/kz6oqEq/Vcb
 Bdr+BZh8p9SUjBVbjiOvhVlaL0tvm5FaVyZ/QGe6aEFuxsNjCFgQUZfj52sxRM1y
 +qBCrpbgyRrpGMGvIJ10ApciqWcxrGAlSpQiJv8U7fFOKBmwo6qXR4uXdWKEZWmG
 ltDpESqQT6FQpwE2QhncNNcShrMoPts5S8anaPDaC2AtqGe2qQwHNH4pzVkbWUXY
 VRFuS7BPhkMeks9HbkMIrFDwYw1i9Uq6s7B5ETzhig2lhYJ5yh3E6rm2szDEyqnn
 hWT79+YmA7FVNIbuzP8QF49aM4QmjdULXogK8cjdq0497O/4fgP4uJv7pttoikU=
 =UahQ
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/lalrae/tags/mips-20150213-2' into staging

MIPS patches 2015-02-13

Changes:
* bug fixes, cleanups and minor improvements

# gpg: Signature made Sat Feb 14 17:01:37 2015 GMT using RSA key ID 0B29DA6B
# gpg: Can't check signature: public key not found

* remotes/lalrae/tags/mips-20150213-2:
  linux-user: correct stat structure in MIPS N32
  target-mips: pass 0 instead of -1 as rs in microMIPS LUI instruction
  target-mips: fix broken snapshotting
  target-mips: use CP0EnLo_XI instead of magic number
  target-mips: ll and lld cause AdEL exception for unaligned address
  target-mips: fix detection of the end of the page during translation
  target-mips: Make CP0.Status.CU1 read-only for the 5Kc and 5KEc processors
  isa: remove isa_mem_base variable
  gt64xxx: remove isa_mem_base usage
  piix4: use PCI address space instead of system memory
  mips: remove isa_mem_base usage
  jazz: remove usage of isa_mem_base
  jazz: do not explode QEMUMachineInitArgs structure
  isa: add memory space parameter to isa_bus_new

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-02-24 11:08:40 +00:00
Markus Armbruster 4bc6a3e54e parallel: parallel_hds_isa_init() shouldn't fail
It shouldn't fail, and no caller checks for failure.  Make failure
fatal.

Maintainers of affected machines cc'ed.

Cc: Anthony Liguori <aliguori@amazon.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-02-24 00:19:06 +01:00
Markus Armbruster 07dc788054 parallel: Factor out common parallel_hds_isa_init()
Maintainers of affected machines cc'ed.

Cc: Anthony Liguori <aliguori@amazon.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-02-24 00:19:06 +01:00
Markus Armbruster c6f10a5876 serial: serial_hds_isa_init() shouldn't fail
It shouldn't fail, and no caller checks for failure.  Make failure
fatal.

Maintainers of affected machines cc'ed.

Cc: Richard Henderson <rth@twiddle.net>
Cc: Anthony Liguori <aliguori@amazon.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-02-24 00:19:06 +01:00
Markus Armbruster b6607a1a20 serial: Factor out common serial_hds_isa_init()
It's the same old loop copied five times, plus another instance where
it's clipped to two iterations and unrolled.

No external users of serial_isa_init() are left, so give it internal
linkage.

Maintainers of affected machines cc'ed.

Cc: Richard Henderson <rth@twiddle.net>
Cc: Anthony Liguori <aliguori@amazon.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-02-24 00:19:06 +01:00
Markus Armbruster aef0d55a4b etsec: Replace qdev_init() by qdev_init_nofail()
etsec_create() is a helper to create and realize the eTSEC.  It's
currently unused.  Similar helpers for other NICs use
qdev_init_nofail().  Match that.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-02-24 00:19:05 +01:00
Markus Armbruster cd7c50a48d leon3: Replace unchecked qdev_init() by qdev_init_nofail()
grlib_irqmp_create(), grlib_gptimer_create() and
grlib_apbuart_create() are helpers to create and realize GRLIB
devices.  Their only caller leon3_generic_hw_init() doesn't check for
failure.  Only the first can actually fail, and only when the caller
fails to set up a pointer property, which is a programming error.

Replace qdev_init() by qdev_init_nofail().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Fabien Chouteau <chouteau@adacore.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-02-24 00:19:05 +01:00
Markus Armbruster e25b89e520 ide/isa: Replace unchecked qdev_init() by qdev_init_nofail()
isa_ide_init()'s callers don't check for failure.  isa_ide_init()
looks like it could fail, but since isa_ide_realizefn() can't fail, it
actually can't.  Replace its qdev_init() by qdev_init_nofail() to make
it obvious.

Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-02-24 00:19:05 +01:00
Eduardo Habkost dde1111678 numa: Rename set_numa_modes() to numa_post_machine_init()
This function does some initialization that needs to be done after
machine init. The function may be eventually removed if we move the
CPUState.numa_node initialization to the CPU init code, but while the
function exists, lets give it a name that makes sense.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-23 15:39:27 -03:00
Eduardo Habkost 1c1e673278 numa: Rename option parsing functions
Renaming set_numa_nodes() and numa_init_func() to parse_numa_opts() and
parse_numa() makes the purpose of those functions clearer.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2015-02-23 15:39:27 -03:00