pc: Create pc_compat_*() functions
Making the older compat functions call the newer compat functions at thebeginning allows the older functions undo what's done by newer compatfunctions. e.g.: pc_compat_1_4() will be able to call pc_compat_1_5()and then set has_pvpanic=false....
pc: Don't prematurely explode QEMUMachineInitArgs
Don't explode QEMUMachineInitArgs before passing it to pc_init1().
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>...
pc: Don't explode QEMUMachineInitArgs into local variables needlessly
Don't explode when the variable is used just a few times, and neverchanged.
pc: Kill pc_init_pci_1_0()
The pc_init_pci_1_2()/pc_init_pci_1_0() split was made on commit6fd028f64f662c801fd5a54d0e3a1d2baeee93ea, in preparation for commit9953f8822cc316eec9962f0a2858c3439a80adec. The latter was reverted, so there'sno reason to keep two separate functions that do exactly the same, anymore....
ppc: Don't duplicate QEMUMachineInitArgs in PPCE500Params
Pass on the generic arguments unadulterated, and the machine-specificones as separate argument.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Acked-by: Alexander Graf <agraf@suse.de>Reviewed-by: Laszlo Ersek <lersek@redhat.com>...
ppc: Don't explode QEMUMachineInitArgs into local variables needlessly
Don't explode when the variable is used just once, and never changed.
sun4: Don't prematurely explode QEMUMachineInitArgs
Don't explode QEMUMachineInitArgs before passing it tosun4m_hw_init(), sun4uv_init().
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
q35: Add PCIe switch to example q35 configuration
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pc: cleanup 1.4 compat support
Make 1.4 compat code call the 1.6 one, reducingcode duplication. Add comment explaining why we can'tmake 1.4 call 1.5 as usual.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Reviewed-by: Andreas Färber <afaerber@suse.de>...
arch_init: align MR size to target page size
Migration code assumes that each MR is a multiple of TARGET_PAGE_SIZE:MR size is divided by TARGET_PAGE_SIZE, so if it isn't migrationnever completes.But this isn't really required for regions set up withmemory_region_init_ram, since that calls qemu_ram_alloc...
loader: store FW CFG ROM files in RAM
ROM files that are put in FW CFG are copied to guest ram, by BIOS, butthey are not backed by RAM so they don't get migrated.
Each time we change two bytes in such a ROM this breaks cross-versionmigration: since we can migrate after BIOS has read the first byte but...
Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20130820' into staging
target-arm queue
Merge remote-tracking branch 'stefanha/block-next' into staging
Merge remote-tracking branch 'rth/axp-next' into staging
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings / X86CPU
hw/cpu/a15mpcore: Wire generic timer outputs to GIC inputs
Now our A15 CPU implements the generic timers, we can wire themup to the appropriate inputs on the GIC.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>...
default-configs: Fix A9MP and A15MP config names
When individual CONFIG_ switches for the A9MPcore and A15MPcoredevices were created, they were inadvertently given incorrect names(CONFIG_ARM9MPCORE and CONFIG_ARM15MPCORE). These CPUs are"Cortex-A9MP" and "Cortex-A15MP", and in particular the ARM9 is...
hw/timer/imx_epit: Simplify and fix imx_epit implementation
When imx_epit.c was last refactored, a common usecase (comparisonregister zero) broke. This patch fixes that, and simplifies the codeyet more. It also fixes a major thinko in the reset path --- the...
hw/arm/pic_cpu: Remove the now-unneeded arm_pic_init_cpu()
Now all the boards have been converted arm_pic_init_cpu()is unused and can just be deleted.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-15-git-send-email-peter.maydell@linaro.org
target-arm: Allow raw_read() and raw_write() to handle 64 bit regs
Extend the raw_read() and raw_write() helper accessors so thatthey can be used for 64 bit registers as well as 32 bit registers.
target-arm: Support coprocessor registers which do I/O
Add an ARM_CP_IO flag which an ARMCPRegInfo definition can use toindicate that the register's implementation does I/O and thusits accesses need to be surrounded by gen_io_start()/gen_io_end()in order for icount to work. Most notably, cp registers which...
target-arm: Implement the generic timer
The ARMv7 architecture specifies a 'generic timer' which is implementedvia cp15 registers. Newer kernels will prefer to use this rather thana devboard-level timer. Implement the generic timer for TCG; for KVMwe will already use the hardware's virtualized timer for this....
hw/arm/realview: Don't use arm_pic_init_cpu()
Drop the now-deprecated arm_pic_init_cpu() in favour of directlygetting the IRQ line from the ARMCPU object.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-10-git-send-email-peter.maydell@linaro.org
hw/arm/strongarm: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-11-git-send-email-peter.maydell@linaro.org
hw/arm/versatilepb: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-12-git-send-email-peter.maydell@linaro.org
hw/arm/vexpress: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-13-git-send-email-peter.maydell@linaro.org
hw/arm/xilinx_zynq: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-14-git-send-email-peter.maydell@linaro.org
hw/arm/highbank: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-5-git-send-email-peter.maydell@linaro.org
hw/arm/integratorcp: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-6-git-send-email-peter.maydell@linaro.org
hw/arm/kzm: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-7-git-send-email-peter.maydell@linaro.org
hw/arm/musicpal: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-8-git-send-email-peter.maydell@linaro.org
hw/arm/omap*: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-9-git-send-email-peter.maydell@linaro.org
target-arm: Implement 'int' loglevel
The 'int' loglevel for recording interrupts and exceptionsrequires support in the target-specific code. Implementit for ARM. This improves debug logging in some situationsthat were otherwise pretty opaque, such as when we fault...
target-arm: Make IRQ and FIQ gpio lines on the CPU object
Now that ARMCPU is a subclass of DeviceState, we can make theCPU's inbound IRQ and FIQ lines be simply gpio lines, whichmeans we can remove the odd arm_pic shim.
We retain the arm_pic_init_cpu() function as a backwards...
hw/arm/armv7m: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-3-git-send-email-peter.maydell@linaro.org
hw/arm/exynos4210: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-4-git-send-email-peter.maydell@linaro.org
block/iscsi: drop iscsi_process_flush()
.io_flush() is no longer called so drop iscsi_process_flush().
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/linux-aio: drop qemu_laio_completion_cb()
.io_flush() is no longer called so drop qemu_laio_completion_cb(). Itturns out that count is now unused so drop that too.
block/nbd: drop nbd_have_request()
.io_flush() is no longer called so drop nbd_have_request(). We cannotdrop in_flight since it is still used by other block/nbd.c code.
block/rbd: drop qemu_rbd_aio_flush_cb()
.io_flush() is no longer called so drop qemu_rbd_aio_flush_cb().qemu_aio_count is unused now so drop it too.
block/sheepdog: drop have_co_req() and aio_flush_request()
.io_flush() is no longer called so drop have_co_req() andaio_flush_request().
block/ssh: drop return_true()
.io_flush() is no longer called so drop return_true().
dataplane/virtio-blk: drop flush_true() and flush_io()
.io_flush() is no longer called so drop flush_true() and flush_io().
thread-pool: drop thread_pool_active()
.io_flush() is no longer called so drop thread_pool_active(). The blocklayer is the only thread-pool.c user and it already tracks in-flightrequests, therefore we do not need thread_pool_active().
tests: drop event_active_cb()
Drop the io_flush argument to aio_set_event_notifier().
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
aio: drop io_flush argument
The .io_flush() handler no longer exists and has no users. Drop theio_flush argument to aio_set_fd_handler() and related functions.
The AioFlushEventNotifierHandler and AioFlushHandler typedefs are nolonger used and are dropped too....
block/gluster: drop qemu_gluster_aio_flush_cb()
Since .io_flush() is no longer called we do not needqemu_gluster_aio_flush_cb() anymore. It turns out that qemu_aio_countis unused now and can be dropped.
Thanks to Bharata B Rao <bharata@linux.vnet.ibm.com> for catching a...
Change email address
My IBM email address will be unaccessible after August 23rd, 2013.
Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
tests: adjust test-thread-pool to new aio_poll() semantics
aio_poll(ctx, true) will soon block when fd handlers have been set.Previously aio_poll() would return early if all .io_flush() returnedfalse. This means we need to check the equivalent of the .io_flush()...
aio: stop using .io_flush()
Now that aio_poll() users check their termination condition themselves,it is no longer necessary to call .io_flush() handlers.
The behavior of aio_poll() changes as follows:
1. .io_flush() is no longer invoked and file descriptors are always...
block/curl: drop curl_aio_flush()
.io_flush() is no longer called so drop curl_aio_flush(). The acb[]array that the function checks is still used in other parts ofblock/curl.c. Therefore we cannot remove acb[], it is needed.
block: ensure bdrv_drain_all() works during bdrv_delete()
In bdrv_delete() make sure to call bdrv_make_anon() after bdrv_close()so that the device is still seen by bdrv_drain_all() when iteratingbdrv_states.
Cc: qemu-stable@nongnu.orgSigned-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block: stop relying on io_flush() in bdrv_drain_all()
If a block driver has no file descriptors to monitor but there are stillactive requests, it can return 1 from .io_flush(). This is used to spinduring synchronous I/O.
Stop relying on .io_flush() and instead check...
dataplane/virtio-blk: check exit conditions before aio_poll()
Check exit conditions before entering blocking aio_poll(). This ismainly for consistency since it's unlikely that we are stopping in thefirst event loop iteration.
tests: adjust test-aio to new aio_poll() semantics
aio_poll(ctx, true) will soon block if any fd handlers have been set.Previously it would only block when .io_flush() returned true.
This means that callers must check their wait condition beforeaio_poll() to avoid deadlock....
target-alpha: Implement call_pal without an exception
The destination of the call_pal, and the cpu state, is very predictable;there's no need for exiting the cpu loop.
Signed-off-by: Richard Henderson <rth@twiddle.net>
target-alpha: Use goto_tb in call_pal
With appropriate flushing when the PALBR changes, the target ofa CALL_PAL is so predictable we can chain to it.
target-alpha: Consider the superpage when threading and ending TBs
This allows significantly more threading, and occasionally larger TBs,when processing code for the kernel and PALcode.
target-alpha: Implement the typhoon iommu
gdbstub: Fix gdb_register_coprocessor() register counting
Commit a0e372f0c49ac01faeaeb73a6e8f50e8ac615f34 reorganized the registercounting for GDB. While it seems correct not to let the total number ofregisters skyrocket in an SMP scenario through a static variable, the...
tests: Unit tests for qdev global properties handling
This tests the qdev global-properties handling code.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qom: Introduce instance_post_init hook
This will allow classes to specify a function to be called after allinstance_init functions were called.
This will be used by DeviceState to call qdev_prop_set_globals() at theright moment.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>...
qdev: Set globals in instance_post_init function
This way, properties registered in the instance_init function ofchild classes will be handled properly by qdev_prop_set_globals(), too.
Includes a unit test for the new functionality.
target-i386: Move hyperv_* static globals to X86CPU
- since hyperv_* helper functions are used only in target-i386/kvm.c move them there as static helpers
Requested-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Igor Mammedov <imammedo@redhat.com>...
cpus: Use cpu_is_stopped() efficiently
It makes more sense and will make things simpler later.
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
Open up 1.7 development branch
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Update version for 1.6.0
mips_malta: do not raise exceptions when accessing invalid memory
Since commit c658b94f6e8c206c59d02aa6fbac285b86b53d2c, MIPS raisesexceptions when accessing invalid memory. This is not the correctbehaviour for MIPS Malta Core LV, as the GT-64120A system controller...
block: Dont ignore previously set bdrv_flags
bdrv_flags is set by bdrv_parse_discard_flags(), but later it is resetto zero.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>Message-id: 1376483201-13466-1-git-send-email-mohan@in.ibm.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: fix infinite recursion connecting to monitor pty
Since commit bd5c51e (qemu-char: don't issue CHR_EVENT_OPEN in a BH), aninfinite recursion occurs when putting the monitor on a pty (-monitorpty) and connecting a terminal to the slave port.
This is because of the qemu_chr_be_event(s, CHR_EVENT_OPENED) added to...
pvpanic: fix bad merge
Context matching caused the 'has_pvpanic = true' to be applied tothe 1.6 machine type instead of the 1.5 machine type.
Reported-by: Markus Armbruster <armbru@redhat.com>Reported-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Update version for 1.6.0-rc3
QOM CPUState refactorings
Conflicts:...
pc: drop external DSDT loading
This breaks migration and is unneeded with modern SeaBIOS.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1376316104-11269-1-git-send-email-aliguori@us.ibm.com
hw/misc: don't create pvpanic device by default
This patch is based on Hu Tao's:http://lists.nongnu.org/archive/html/qemu-devel/2013-08/msg00124.html
No need to hard-code pvpanic as part of the machine.It can be added with "-device pvpanic" from command line (The next patch)....
hw/misc: make pvpanic known to user
This patch is based on Hu Tao's:http://lists.nongnu.org/archive/html/qemu-devel/2013-08/msg00125.html
The pvpanic device may be enabled now with "-device pvpanic" from command line.
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>...
pc: Remove PCLMULQDQ from Westmere on pc-*-1.4 and older
Commit 41cb383f42d0cb51d8e3e25e3ecebc954dd4196f made a guest-visiblechange by adding the PCLMULQDQ bit to Westmere without addingcompatibility code to keep the ABI for older machine-types.Fix it by adding the missing compat code....
rdma: proper getaddrinfo() handling
getaddrinfo() already knows what it's doing,but it can potentially return multiple addresses.We need to handle that...
Reviewed-by: Orit Wasserman <owasserm@redhat.com>Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>...
rdma: IPv6 over Ethernet (RoCE) is broken in linux - workaround
We've gotten reports from multiple testers (including Frank Yangjieand myself) that RDMA IPv6 support over RocE (Ethernet) is brokenin linux.
A patch to Linux is still in review:
http://comments.gmane.org/gmane.linux.drivers.rdma/16448...
rdma: remaining documentation fixes
Was missing 'setup-time' in some of the QMP documentation...
Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>Reviewed-by: Eric Blake <eblake@redhat.com>Message-id: 1376078746-24948-7-git-send-email-mrhines@linux.vnet.ibm.com...
rdma: use resp.len after validation in qemu_rdma_registration_stop
resp.len is given from remote host. So should be validated before use.Otherwise memcpy can access beyond the buffer.
Cc: Michael R. Hines <mrhines@us.ibm.com>Reviewed-by: Orit Wasserman <owasserm@redhat.com>...
rdma: validate RDMAControlHeader::len
RMDAControlHeader::len is provided from remote, so validate it.
Reviewed-by: Orit Wasserman <owasserm@redhat.com>Reviewed-by: Michael R. Hines <mrhines@us.ibm.com>Signed-off-by: Isaku Yamahata <yamahata@private.email.ne.jp>...
rdma: check if RDMAControlHeader::len match transferred byte
RDMAControlHeader::len is provided from remote, so check if the valuematch the actual transferred byte_len.
Reviewed-by: Orit Wasserman <owasserm@redhat.com>Reviewed-by: Michael R. Hines <mrhines@us.ibm.com>...
sysfw: remove read-only pc_sysfw_flash_vs_rom_bug_compatible
The variable is not written anymore.
This cleans up after 9e1c2ec (which accidentally left variablepc_sysfw_flash_vs_rom_bug_compatible behind, value always zero), andburies dead code from commit dafb82e (which resurrected the pc_sysfw...
pc_sysfw: remove the rom_only property
With the new semantics of pc_sysfw (no -pflash implies "old-style" ROM setup,-pflash implies "new-style" ROM setup), there is no need anymore for a compatproperty. Old machines simply will never use -pflash, and thus will always...
pc_sysfw: do not make it a device anymore
Move the code to hw/i386, the sole remaining property is availableas !pci_enabled.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Markus Armbruster <armbru@redhat.com>Message-id: 1376069702-22330-4-git-send-email-aliguori@us.ibm.com...
w32: Add missing version.o to all executables (fix regression)
QEMU executables for w32, w64 had included meta information built fromversion.rc. These rules were changed several times some months ago.
The latest version added version.o to the tools, but not to the system...
qemu-option: Guard against qemu_opts_set_defaults() misuse
Commit 6d4cd40 fixed qemu_opts_set_defaults() for an existing cornercase, but broke it for another one that can't be reached in currentcode.
Quote from its commit message:
I believe [opts_parse()] attempts to do the following:...
LICENSE: clarify
1) The GPL says that "if the Program does not specify a version numberof this License, you may choose any version ever published by the FreeSoftware Foundation". This is not true, QEMU includes parts that arev2-only.
2) Provide a default for files with no licensing information....
raw: add license header
Most of the block layer is under the BSD license, thus it is reasonableto license block/raw.c the same way. CCed people should ACK by replyingwith a Signed-off-by line.
Cc: Christoph Hellwig <hch@lst.de>Cc: Kevin Wolf <kwolf@redhat.com>...
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pci,virtio fixes for 1.6
This includes some last-minute bugfixes for 1.6.All very small patches that also look very safe to me.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Merge remote-tracking branch 'pmaydell/tags/pull-arm-devs-20130812' into staging
arm-devs queue
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Message-id: 1376071141-3214-1-git-send-email-kwolf@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'luiz/queue/qmp' into staging
Merge remote-tracking branch 'kraxel/usb.87' into staging
Message-id: 1375961495-20970-1-git-send-email-kraxel@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'origin/master' into staging
Necessary because patches got pushed by Aurelien before I pushedthe -rc2 tag....
hw/virtio/virtio-mmio: Make QueueNumMax read 0 for unavailable queues
The virtio-mmio spec says that QueueNumMax must read zero for queueswhich are unavailable; implement this, rather than always returningVIRTQUEUE_MAX_SIZE.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
vhost: clear signalled_used_valid on vhost stop
When vhost device stops, its implementation synchronizes kernel stateback to virtio.c so we can continue emulating the devicein userspace.
This patch ensures that virtio.c's signalled_used_valid flag is reset so...
virtio: clear signalled_used_valid when switching from dataplane
When the dataplane thread stops, its vring.c implementation synchronizesvring state back to virtio.c so we can continue emulating the virtiodevice.
i82801b11: Fix i82801b11 PCI host bridge config space
pci_bridge_write_config() was not being used.
Cc: qemu-stable@nongnu.orgSigned-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>