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>...
./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>...
rbd: wire up snapshot removal and rollback functionality
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.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...
vga: compile cirrus_vga in hwlib
Remove target dependencies and compile Cirrus VGA in hwlib.
Address masking can be removed since memory API handles that now.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
memory: change dirty setting APIs to take a size
Instead of each target knowing or guessing the guest page size,just pass the desired size of dirtied memory area.
memory: fix dirty mask function length handling
Fix handling of cases like start = 0xfff, length = 2.
Change length to ram_addr_t to handle larger lengths.
vga: fix -nodefaults -device VGA
Flag -nodefaults should also imply no VGA. This was broken ina369da5f31ddbdeb32a7f76622e480d3995fbb00.
Add Cortex-A15 CPU definition
Add a definition of a Cortex-A15 CPU. Note that for the moment we donot implement any of: * Large Physical Address Extensions (LPAE) * Virtualization Extensions * Generic Timer * TrustZone (this is also true of our existing Cortex-A9 model, etc)...
Add dummy implementation of generic timer cp15 registers
Add a dummy implementation of the cp15 registers for the generictimer (found in the Cortex-A15), just sufficient for Linux todecide that it can't use it. This requires at least CNTP_CTL andCNTFRQ to be implemented as RAZ/WI; we RAZ/WI all of c14....
target-arm: Fix implementation of TLB invalidate operations
Fix some bugs in the implementation of the TLB invalidateoperations on ARM: * the 'invalidate all' op was not passing flush_global=1 to tlb_flush(); this doesn't have a practical effect since...
target-arm/helper.c: Don't assume softfloat int32 is 32 bits only
In the helper routines for VCVT float-to-int conversions, addan explicit cast rather than relying on the softfloat int32type being exactly 32 bits wide (which it is not guaranteed to be)....
arm: store the config_base_register during cpu_reset
Long term, the config_base_register will be a QDM parameter. In themeantime, models that use it need to be able to preserve it acrosscpu_reset() calls.
Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>...
hyperv: fix build on non-KVM hosts
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Merge remote-tracking branch 'afaerber/prep-up' into staging
e1000: bounds packet size against buffer size
Otherwise we can write beyond the buffer and corrupt memory. This is trackedas CVE-2012-0029.
target-sparc: Fix mixup of uint64 and uint64_t
Commit 793a137a41ad4125011c7022cf16a1baa40a5ab6 (target-sparc:Implement BMASK/BSHUFFLE.) introduced a stray usage of softfloat uint64type.
Use uint64_t instead.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
sga: fix copypasta
Fix the name of the init function.
Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
vga: make Cirrus ISA device optional
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
vga: improve VGA logic
Improve VGA selection logic, push check for device availabilty to vl.c.Create the devices at board level unconditionally.
Remove now unused pci_try_create*() functions.
Make PCI VGA devices optional.
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>...
grackle_pci: Clean up qdev names
Rename SysBus device from 'grackle' to 'grackle-pcihost' to resolve aname conflict.
Also mark both devices as no_user.
Signed-off-by: Andreas Färber <afaerber@suse.de>Cc: Alexander Graf <agraf@suse.de>Cc: Anthony Liguori <aliguori@us.ibm.com>...
MAINTAINERS: Add PCI-PCI bridge to New World Mac machine
pseries: Support PCI extended config space in RTAS calls
On the pseries machine (which expexts a paravirtualized guest), guestaccess to PCI config space is via host-provided RTAS functions. Thispatch extends these RTAS functions to permit access to PCI extended...
pseries: Use correct dispatcher for PCI config space accesses
The pseries machine expects a para-virtualized guest and so supplies RTASfunctions (via a hypercall) for performing PCI config space access.Currently the implementation of these calls intopci_default_{read,write}_config(). However this would be incorrect for...
pseries: SLOF PCI flag day
Currently on the pseries machine the SLOF firmware is used normally,but we bypass it when -kernel is specified. Having these two
different boot paths can cause some confusion.
In particular at present we need to "probe" the (emulated) PCI bus and...
MAINTAINERS: Add qemu-ppc to all ppc target stuff
Signed-off-by: Andreas Färber <andreas.faerber@web.de>Cc: Alexander Graf <agraf@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
MAINTAINERS: Add PCI host bridge files to CHRP machines
Just like prep_pci.c, these were not associated with any MAINTAINERSsection, including PCI.
PPC: Pseries: Check for PCI boundaries
We call pci_host_config_{read,write}_common() which perform PCI configaccesses. However they don't do all limit checking the way we expectit to.
So let's introduce a small wrapper around them, making them behave the...
Correct types in bmdma_addr_{read,write}
Back when I made patches introducing dma_addr_t and various PCI DMAwrapper functions, I made a mistake. The bmdma_addr_{read,write} functionsneed to take target_phys_addr_t not dma_addr_t, since they are assigned...