PPC: booke: add tlbnps handling
When using MAV 2.0 TLB registers, we have another range of TLB registersavailable to read the supported page sizes from.
Add SPR definitions for those and add a helper function that we can useto receive such a bitmap even when using MAV 1.0....
PPC: booke206: Check for min/max TLB entry size
When setting a TLB entry, we need to check if the TLB we're putting it inactually supports the given size. According to the 2.06 PowerPC ISA, avalue that's out of range can either be redefined to something implementation...
PPC: booke206: Implement tlbilx
The PowerPC 2.06 BookE ISA defines an opcode called "tlbilx" which is usedto flush TLB entries. It's the recommended way of flushing in virtualizedenvironments.
So far we got away without implementing it, but Linux for e500mc uses this...
PPC: booke206: Check for TLB overrun
Our internal helpers to fetch TLB entries were not able to tell usthat an entry doesn't even exist. Pass an error out if we hit sucha case to not accidently pass beyond the TLB array.
Signed-off-by: Alexander Graf <agraf@suse.de>
PPC: booke206: move avail check to tlbwe
We can have TLBs that only support a single page size. This is definedby the absence of the AVAIL flag in TLBnCFG. If this is the case, wecurrently write invalid size info into the TLB, but override it oninternal fault....
KVM: Fix compilation on non-x86
Commit 84b058d broke compilation for KVM on non-x86 targets, whichdon't have KVM_CAP_IRQ_ROUTING defined.
Fix by not using the unavailable constant when it's not around.
PPC: E500: Add some more excp vectors
Our EXCP list is getting outdated. By now, 3 new exception vectors havebeen introduced. Update the list so we have everything at one place.
PPC: KVM: Update HIOR code to new interface
Unfortunately the HIOR setting code slipped into upstream QEMUbefore it was pulled into upstream KVM. And since Murphy is alwaysright, comments on the patches only emerged on the pull requestleading to changes in the interface....
PPC: Add IVOR 38-42
Our code only knows IVORs up to 37. Add the new ones defined in ISA 2.06from 38 - 42.
Signed-off-by: Alexander Graf <agraf@suse.de>Reviewed-by: Andreas Färber <afaerber@suse.de>
PPC: e500mc: add missing IVORs to bitmap
E500mc supports IVORs 36-41. Add them to the support mask. Drop SPEsupport too.
PPC: e500: msync is 440 only, e500 has real sync
The e500 CPUs don't use 440's msync which falls on the same opcode IDs,but instead use the real powerpc sync instruction. This is important,since the invalid mask differs between the two.
PPC: rename msync to msync_4xx
The msync instruction as defined today is only valid on 4xx cores, noton e500 which also supports msync, but treats it the same way as sync.
Rename it to reflect that it's 4xx only.
PPC: booke206: allow NULL raddr in ppcmas_tlb_check
We might want to call the tlb check function without actually caring aboutthe real address resolution. Check if we really should write the valueback.
KVM: Update headers (except HIOR mess)
This patch is basically what ./scripts/update-linux-headers.sh againstupstream KVM's next branch outputs except that all the HIOR bits areremoved. These we have to update with the code that uses them.
sdl: Fix block prevention of SDL_WM_GrabInput
Consistently check for SDL_APPINPUTFOCUS before trying to grab the inputfocus. Just checking for SDL_APPACTIVE doesn't work. Moving the check tosdl_grab_start allows for some consolidation.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Revert "Handle SDL grabs failing (Mark McLoughlin)"
This reverts commit 6bb816031f8bc0aafc3476e6dfa4293ee3a5f106.
SDL_WM_GrabInput does not reliably bail out if grabbing is impossible.So if we get here, we already lost and will block. But this can nolonger happen due to the check in sdl_grab_start. So this patch became...
sdl: Grab input on end of non-absolute mouse click
By grabbing the input already on button down, we leave the button inthat state for the host GUI. Thus it takes another click after releasingthe input again to synchronize the mouse button state.
Avoid this by grabbing on button up....
sdl: Limit sdl_grab_end in handle_activation to Windows hosts
There are scenarios on Linux with some SDL versions wherehandle_activation is continuous invoked with state = SDL_APPINPUTFOCUSand gain = 0 while we grabbed the input. This causes a ping-pong when we...
optionroms: Silence intermediate file removal
The build process of optionroms spits out an "rm ..." line. Moreover, itremoves all .o files that can be handy for debugging purposes. Sodisable automatic intermediate removal.
main-loop: Fix SetEvent() on uninitialized handle on win32
The attribute((constructor)) init_main_loop() automatically getcalled if qemu-tool.o is linked in. On win32, this leads toa qemu_notify_event() call which attempts to SetEvent() on a HANDLE that...
main-loop: For tools, initialize timers as part of qemu_init_main_loop()
In some cases initializing the alarm timers can lead to non-negligableoverhead from programs that link against qemu-tool.o. At least,setting a max-resolution WinMM alarm timer via mm_start_timer() (the...
exec.c: Clarify comment about tlb_flush() flush_global parameter
Clarify the comment about tlb_flush()'s flush_global parameter,so it is clearer what it does and why it is OK that the implementationcurrently ignores it.
Reviewed-by: Andreas F=C3=A4rber <afaerber@suse.de>...
Makefile: Remove linux-headers/asm symlink on distclean
configure creates a linux-headers/asm symlink. Remove this whendoing a distclean.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: Introduce lost tick policy property
Potentially tick-generating timer devices will gain a common property:lock_tick_policy. It allows to encode 4 different ways how to deal withtick events the guest did not process in time:
discard - ignore lost ticks (e.g. if the guest compensates for them...
qemu-option: Introduce default mechanism
This adds qemu_opts_set_defaults, an interface provide default valuesfor a QemuOpts set. Default options are parsed from a string and thenprepended to the list of existing options, or they serve as the soleQemuOpts set....
mc146818rtc: Use lost_tick_policy property
Allow to configure the MC146818 RTC via the new lost tick policyproperty and replace rtc_td_hack with this mechanism.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Improve default machine options usability
So far we overwrite the machine options completely with defaults if noaccel=value is provided. More user friendly is to fill in onlyunspecified options. The new qemu_opts_set_defaults enables this.
sdl: Do not grab mouse on mode switch while in background
When the mouse mode changes to absolute while the SDL windows is not infocus, refrain from grabbing the input. It would steal from some otherwindow.
./configure: request pkg-config to provide private libs when static linking
Added wrapper around pkg-config to allow:- safe options injection via ${QEMU_PKG_CONFIG_FLAGS}- spaces in path to pkg-config
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>...
./configure: add link check for nss-smartcard
Current './configure --static && make' fails for me:
LINK qemu-nbd /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lssl3 /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsmime3...
MAINTAINERS: Add a section for the host OS and a W32 maintainer
Up to now, there was no special section for the differenthost operating systems used with QEMU.
scripts/get_maintainer.pl did not show a maintainer forOS specific files and patches.
Therefore I added three hosts systems:...
hw/9pfs: Update MAINTAINERS file
Acked-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
m48t59: use rtc_clock for alarm timer
This lets the RTC get adjustments from the host NTP client.The watchdog still uses the vm_clock. The previous behavior isavailable with "-rtc clock=vm".
Cc: Andreas Färber <afaerber@suse.de>Reviewed-by: Andreas Färber <afaerber@suse.de>...
GRLIB UART: Add RX channel
This patch implements the RX channel of GRLIB UART with a FIFO toimprove data rate.
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix off-by-one in dirty bitmap functions
Reported-by: Stefan Berger <stefanb@linux.vnet.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
unin_pci: Fix typos in device names
Commit 999e12bbe85c5dcf49bef13bce4f97399c7105f4 (sysbus: apic: ioapic:convert to QEMU Object Model) introduced two typos, one of which brokethe mac99 machine.
Signed-off-by: Andreas Färber <afaerber@suse.de>Cc: Anthony Liguori <aliguori@us.ibm.com>...
virtio-s390: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: change ambiguous qdev names
Reported-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
unin_pci: Drop unused reset handler
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
pci: convert to QEMU Object Model
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus.Converting subclasses independently of their base class is prohibitively hard.
ide: convert to QEMU Object Model
scsi: convert to QEMU Object Model
spapr: convert to QEMU Object Model (v2)
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>---v1 -> v2 - use QOM to check for the default console
virtio-serial: convert to QEMU Object Model
unin_pci: Clean up qdev names
Add -pcihost to SysBus devices to resolve name conflicts,and clarify PCI vs. Internal PCI.
unin_pci: Drop duplicate busdev
PCIHostState already has a busdev.
hda-codec: convert to QEMU Object Model
qdev: prepare source tree for code conversion
These are various small stylistic changes which help make things moreconsistent such that the automated conversion script can be simpler.
It's not necessary to agree or disagree with these style changes because all...
isa: pic: convert to QEMU Object Model
This converts two devices at once because PIC subclasses ISA and convertingsubclasses independently is extremely hard.
usb: convert to QEMU Object Model
ccid: convert to QEMU Object Model
ssi: convert to QEMU Object Model
i2c: rename i2c_slave -> I2CSlave
i2c: smbus: convert to QEMU Object Model
This converts two types because smbus is implemented as a subclass of i2c. It'sextremely difficult to convert these two independently.
qdev: use a wrapper to access reset and promote reset to a class method
qdev: add a interface to register subclasses
In order to introduce inheritance while still using the qdev registrationinterfaces, we need to be able to use a parent other than TYPE_DEVICE. Add anew interface that allows this.
qdev: add class_init to DeviceInfo
Since we are still dynamically creating TypeInfo, we need to chain theclass_init function in order to be able to make use of it within subclasses ofTYPE_DEVICE.
This will disappear once we register TypeInfos directly....
qdev: don't access name through info
We already have a QOM interface for this so let's use it.
qdev: move qdev->info to class
Right now, DeviceInfo acts as the class for qdev. In order to switch to aproper ObjectClass derivative, we need to ween all of the callers off ofinteracting directly with the info pointer.
macio: convert to qdev
This is a "shallow", half hearted, and untested conversion.
openpic: remove dead code to make a PCI device version
bus is always NULL so the code in this if clause is dead (and thereforeuntested).
pci: call reset unconditionally
Because now all PCI devices are converted to qdev.
qom: add the base Object class (v2)
This class provides the main building block for QEMU Object Model and isextensively documented in the header file. It is largely inspired by GObject.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>---v1 -> v2...
qdev: integrate with QEMU Object Model (v2)
This is a very shallow integration. We register a TYPE_DEVICE but only useQOM as basically a memory allocator. This will make all devices show up asQOM objects but they will all carry the TYPE_DEVICE.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging
Merge remote-tracking branch 'kwolf/for-anthony' into staging
qemu-io: end aio help text sentences with periods
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
./configure: export xfs config via --{enable, disable}-xfsctl
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
pcnet: Preserve link state across device reset
A device reset does not affect the link state, only set_link does.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
e1000: Preserve link state across device reset
qdev-property: Make bit property parsing stricter
By using strncasecmp, we allow for arbitrary characters after the"on"/"off" string. Fix this by switching to strcasecmp.
Reviewed-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Markus Armbruster <armbru@redhat.com>...
remove #if 0 code for timers
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qmp: add block_job_cancel command
Add block_job_cancel, which stops an active block streaming operation.When the operation has been cancelled the new BLOCK_JOB_CANCELLED eventis emitted.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>...
qmp: add query-block-jobs
Add query-block-jobs, which shows the progress of ongoing block deviceoperations.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev: make image streaming safe across hotplug
Unplugging a storage interface like virtio-blk causes the host blockdevice to be deleted too. Long-running operations like block migrationmust take a DriveInfo reference to prevent the BlockDriverState from...
block: add bdrv_find_backing_image
Add bdrv_find_backing_image: given a BlockDriverState pointer, and an id,traverse the backing image chain to locate the id.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
add QERR_BASE_NOT_FOUND
This qerror will be raised when a given streaming base (backing file)cannot be found.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>...
block: add support for partial streaming
Add support for streaming data from an intermediate section of theimage chain (see patch and documentation for details).
docs: describe live block operations
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
virtio-blk: add virtio_blk_handle_read trace event
There already exists a virtio_blk_handle_write trace event as well ascompletion events. Add the virtio_blk_handle_read event so it's easy totrace virtio-blk requests for both read and write operations....
block/vdi: Zero unused parts when allocating a new block (fix #919242)
The new block was filled with zero when it was allocated by g_malloc0,but when it was reused later and only partially used, data from thepreviously allocated block were still present and written to the new...
qcow: Return real error code in qcow_open
Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qcow: Use bdrv functions to replace file operation
Since common file operation functions lack of error detection and usemuch more I/O syscalls, so change them to bdrv series functions andreduce I/O request.
Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com>...
scsi: Guard against buflen exceeding req->cmd.xfer in scsi_disk_emulate_command
Limit the return value (corresponding to the length of the buffer to beDMAed back to the intiator) to the value in req->cmd.xfer, which is theamount of data that the initiator expects. Eliminate now-duplicate code...
qmp: add block_job_set_speed command
Add block_job_set_speed, which sets the maximum speed for a backgroundblock operation.
qmp: add block_stream command
Add the block_stream command, which starts copy backing file contentsinto the image file. Also add the BLOCK_JOB_COMPLETED QMP event whichis emitted when image streaming completes. Later patches add controlover the background copy speed, cancelation, and querying running...
arm_boot: support board IDs more than 16 bits wide
Support passing a board ID value to the kernel in r1that is more than 16 bits wide. This is needed to passthe '-1 == invalid' value for boards which only supportdevice tree booting.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
arm: SoC model for Calxeda Highbank
Adds support for Calxeda's Highbank SoC.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
arm: add secondary cpu boot callbacks to arm_boot.c
Create two functions, write_secondary_boot() and secondary_cpu_reset_hook(),to allow platforms more control of how secondary CPUs are brought up. Thenew functions default to NULL and aren't called unless they are populated...
Add xgmac ethernet model
This adds very basic support for the xgmac ethernet core. Missing thingsinclude:
- statistics counters- WoL support- rx checksum offload- chained descriptors (only linear descriptor ring)- broadcast and multicast handling
Signed-off-by: Rob Herring <rob.herring@calxeda.com>...
ahci: add support for non-PCI based controllers
Add support for ahci on sysbus.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
coroutine: add co_sleep_ns() coroutine sleep function
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: check bdrv_in_use() before blockdev operations
Long-running block operations like block migration and image streamingmust have continual access to their block device. It is not safe toperform operations like hotplug, eject, change, resize, commit, or...
block: make copy-on-read a per-request flag
Previously copy-on-read could only be enabled for all requests to ablock device. This means requests coming from the guest as well asQEMU's internal requests would perform copy-on-read when enabled.
For image streaming we want to support finer-grained behavior than just...
block: add BlockJob interface for long-running operations
block: add image streaming block job
block: rate-limit streaming operations
This patch implements rate-limiting for image streaming. If we'veexceeded the bandwidth quota for a 100 ms time slice we sleep thecoroutine until the next slice begins.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
block: replace unchecked strdup/malloc/calloc with glib
Most of the codebase as been converted to use glib memory allocationfunctions. There are still a few instances of malloc/calloc in theblock layer and qemu-io. Replace them, especially since they do not...