The internal opcodes brcond2, add2, sub2, mulu2 were undocumented.
Place these in a new section that clearly indicates that they are
not to be emitted by translators.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
The WLAN USB stick ZyXEL NWD271N (0586:3417) uses very large
usb control transfers of more than 2048 bytes which won't fit
into the buffer of the ctrl_struct. This results in an error message
"husb: ctrl buffer too small" and a non-working device.
Increasing the buffer size to 8192 seems to be a safe choice.
Signed-off-by: Christian Krause <chkr@plauener.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
When several PCI bridges were in use, monitor command "info pci" would
enter into infinite loop. Buses behind the bridge were not discoverable
because secondary and subordinate bus numbers were not used properly.
Other buses were not found because bus search terminated on first miss.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Access the cp15.c13 TLS registers directly with TCG ops instead of with
a slow helper. If the the cp15 read/write was not TLS register access,
fall back to the cp15 helper.
This makes accessing __thread variables in linux-user when apps are compiled
with -mtp=cp15 possible. legal cp15 register to acces from linux-user are
already checked in cp15_user_ok.
While at it, make the cp15.c13 Thread ID registers available only on
ARMv6K and newer.
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Qemu may hang in host_signal_handler after qemu has done a
seppuku with cpu_abort(). But at this stage we are not really
interested in target process coredump anymore, so unregister
host_signal_handler to die grafefully.
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
This patch for linux-user adapts the output of the emulated uname()
syscall to match the configured CPU. Tested with x86, x86-64 and arm
emulation.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Loïc Minier <lool@dooz.org>
Do not allow the vcpus to execute if the vm is stopped.
Fixes -incoming with CONFIG_IOTHREAD enabled.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Touching the user space representation of KVM's VCPU state is -
naturally - a per-VCPU thing. So move the dirty flag into KVM_CPU_COMMON
and rename it at this chance to reflect its true meaning.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
The vmport "device" accesses the VCPU registers, so it requires proper
cpu_synchronize_state. Add it to vmport_ioport_read, which also
synchronizes vmport_ioport_write.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
From qemu-kvm: Kernels before 2.6.30 misreported some essential CPU
features via KVM_GET_SUPPORTED_CPUID. Fix them up.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
The final version of VCPU events in 2.6.33 will allow to skip
nmi_pending and sipi_vector on KVM_SET_VCPU_EVENTS. For now let's write
them unconditionally, which is unproblematic for upstream due to missing
SMP support. Future version which enable SMP will write them only on
reset.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
The default action of coalesced MMIO is, cache the writing in buffer, until:
1. The buffer is full.
2. Or the exit to QEmu due to other reasons.
But this would result in a very late writing in some condition.
1. The each time write to MMIO content is small.
2. The writing interval is big.
3. No need for input or accessing other devices frequently.
This issue was observed in a experimental embbed system. The test image
simply print "test" every 1 seconds. The output in QEmu meets expectation,
but the output in KVM is delayed for seconds.
Per Avi's suggestion, I hooked flushing coalesced MMIO buffer in VGA update
handler. By this way, We don't need vcpu explicit exit to QEmu to
handle this issue.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This provides the same information as reverted commit 2ba6edf0. Not
much, just better than nothing.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
While there, use "property" rather than "option", for consistency with
-global.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Option "-device DRIVER,?" and monitor command "device_add DRIVER,?"
print the supported properties instead of creating a device. The
former also terminates the program.
This is commit 2ba6edf0 (just reverted) done right.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This reverts commit 2ba6edf0dd.
The commit has two issues:
* When it runs from the monitor, e.g. "device_add e1000,?", it prints
to stderr instead of the monitor.
* Help looks to callers just like failed device creation. This makes
main() exit unsuccessfully on "-device e1000,?".
We need to do this differently.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This reverts commit 922910ce42.
The commit has four issues:
* When it runs from the monitor, e.g. "device_add e1000,mac=?", it
prints to stderr instead of the monitor.
* Help looks to callers just like failed device creation. This makes
main() exit unsuccessfully on "-device e1000,mac=?".
* It has an undocumented side effect on -global: "-global e1000.mac=?"
prints help, but only when we actually add an e1000 device.
* It does not work for properties that accept the value "?".
We need to do this differently.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Help was shoehorned into device creation, qdev_device_add(). Since
help doesn't create a device, it returns NULL, which looks to callers
just like failed device creation. Monitor handler do_device_add()
doesn't care, but main() exits unsuccessfully.
Move help out of device creation, into new qdev_device_help().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Return the bitwise inclusive or of all return values instead of the
last call's value. This lets you find out whether any of the calls
returned a non-zero value.
No functional change, as existing users either don't care for the
value, or pass non-zero abort_on_failure, which breaks the loop on the
first non-zero return value.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This changes the error message from "Invalid CPU index" to "Invalid
parameter index" in the human monitor.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Before, it used type 's', which strips quotes and interprets escapes,
and is quite inappropriate for QMP.
Negative arguments are no flushed to zero. Before, they were cast to
uint32_t, which wrecked the sign.
Ridiculously large arguments including infinities are now rejected.
Before, they were interpreted as zero. Same for NaN.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This is a double value with optional suffixes ms, us, ns. We'll need
this to get migrate_set_downtime() QMP-ready.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Before, it used type 's', which strips quotes and interprets escapes,
and is quite inappropriate for QMP.
Negative arguments are no flushed to zero. Before, they were cast to
uint32_t, which wrecked the sign.
Ridiculously large arguments including infinities are now rejected.
Before, they were interpreted as zero. Same for NaN.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This is a double value with optional suffixes G, g, M, m, K, k. We'll
need this to get migrate_set_speed() QMP-ready.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Helper function just like qdict_get_int(), just for QFloat/double.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Commit 392ecf543d introduced an accidental change
to the roms/seabios submodule. This commit partially reverts that commit to
ensure the seabios module points to the right commit.
Reported-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
if the access check fails, the page can not be modified
and shouldn't be marked dirty.
The patch fixes the "hsfs_putpage: dirty HSFS page"
error in Solaris guests.
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
If an I/O request fails right away instead of getting an error only in the
callback, we still need to consider rerror/werror.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Current code assumes that only write requests are ever going to be restarted.
This is wrong since rerror=stop exists. Instead of directly starting writes,
use the same request processing as used for new requests.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
We need a function that handles a single request. Create one by splitting out
code from virtio_blk_handle_output.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This fixes CONFIG_FB_CIRRUS for Linux guests and probably much more:
When switching away from linearly mapped vram, we also have to restore
the I/O handlers for the LFB.
This regression was once introduced by commit 2bec46dc97.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit enables one to use multiple virtio-serial devices and to
assign ports to arbitrary devices like this:
-device virtio-serial,id=foo -device virtio-serial,id=bar \
-device virtserialport,bus=foo.0,name=foo \
-device virtserialport,bus=bar.0,name=bar
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
When splitting up unaligned IO accesses, ld calls slow_ld which was
clobbering retaddr.
AFAIK the problem only shows up when running emulations with -icount
that may abort TB execution on IO accesses.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>