Revert "ide save/restore current transfer fields"
This reverts commit 42ee76fe82093ba914f0dc83d2decbcf68866144.
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: add subsections code
This commit adds subsections for each device section.Subsections is the way to handle information that don't need to be sentto de destination of a migration because its values are not needed. It isthe way to handle optional information. Notice that only the source can...
ide: fix migration in the middle of pio operation
ide: fix migration in the middle of a bmdma transfer
It reintroduces Revert "ide save/restore pio/atapi cmd transfer fields and io buffer"
but using subsections. Added bonus is the addition of ide_dummy_transfer_stopto transfer_end_table, that was missing....
Initial documentation for migration
Revert "ide save/restore pio/atapi cmd transfer fields and io buffer"
This reverts commit ed487bb1d69040b9dac64a4fc076d8dd82b131d6.
The conflicts are due to commit 4fc8d6711aff7a9c11e402c3d77b481609f9f486that is a fix to the ide_drive_pre_save() function. It reverts both...
Merge remote branch 'mst/for_anthony' into staging
etrax: Update ethernet mgm-ctrl reg on writes
Some SW drivers dont keep track of what they've written anddepend on the HW latching write contents for laterread+modify+write sequences.
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
target-i386: use gen_update_cc_op()
This patch simplifies target-i386/translate.c a bit by replacing somecode with gen_update_cc_op()
Signed-off-by: Jun Koi <junkoi2004@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Close socket file descriptor when qemu_accept fails
Signed-off-by: Shahar Havivi <shaharh@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
add cscope.* to .gitignore
we have "make cscope", therefore that makes sense to have cscope.* in.gitignore.
slirp: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types
There is no need to have a second set of integral types.Replace them by the standard types from stdint.h.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
slirp: Remove declarations which are no longer needed
The previous patches replaced u_int8_t, u_int16_t, u_int32_t, u_int64_tby standard int types from stdint.h,so we can now remove their declarations which are no longer needed.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
tests: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types
block: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types
mips: more fixes to the MIPS interrupt glue logic
Commit 36388314febad3d7675ab919287f03733a560ff6 moved most of theinterrupt logic to cpu-exec.c. Remove the remaining useless codeand fix software interrupts.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
microblaze: Remove unused members from the disas context
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
microblaze: Speed up base + index addressing mode
Speed up reg + reg addressing mode when any of the regs is r0.
microblaze: Use setcond for conditional branches
Use setcond for evaluating the condition for branches.In the future, we could do better for branches withoutdelay slots.
microblaze: Improve branch with small immediates
Slight improvements of conditional branches with smallimmediate offsets.
remove dead code
this patch removes unused function cpu_restore_state_copy().
Signed-off-by: Jun Koi <junkoi2004@gmail.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
use symbol for DisasContext->is_jmp
This patch replaces constant value assigned for (DisasContext*)->is_jmp with DISAS_TB_JUMP.
mips: Correct MIPS interrupt glue logic for icount
When hw interrupt pending bits in CP0_Cause are set, the CPU shouldsee the hw interrupt line as active. The CPU may or may not take theinterrupt based on internal state (global irq mask etc) but the glue...
microblaze: Pass a ucontext * as 3rd sighandler arg
There is disagreement between microblaze glibc and the kernelto what the third arg of signal handlers should point to.
Change QEMU linux-user to match the kernel port. glibc patchesare pending.
e1000: Fix wrong microwire EEPROM state initialization
This change fixes initialization of e1000's microwire EEPROM internalstate values so that qemu's e1000 emulation works on NetBSD,which doesn't use Intel's em driver but has its own wm driverfor the Intel i8254x Gigabit Ethernet....
scsi: Dequeue requests before invoking completion callback
The request completion callback of the LSI controller may start the nextrequest that can use the same tag as the completed one. As the latter isstill enqueued at that point, scsi_send_command will complain about the...
Declare code_gen_ptr, code_gen_max_blocks 'static'
Both values are only used in exec.c, so there is no needto make them globally available.
Fix cpu_unlink_tb race
If a signal hit after the env->exit_request check but before cpu_execupdated env->current_tb, cpu_unlink_tb called from the signal handerwill not unlink the current TB. This may leave us stuck in a guest loopif no further unlink is invoked....
Init qemu_system_cond
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix cpu_exit for tcp_cpu_exec
If a cpu_exit request is pending, ensure that we leave the CPU loopquickly. For this purpose, keep the global exit_request pending untilwe are about to leave tcg_cpu_exec. Also, immediately break out of theSMP loop if the request is set, do not run till the end of the chain....
Fix qemu_wait_io_event processing in io-thread mode
When checking for I/O events in the tcg CPU loop, make sure that wecall qemu_wait_io_event_common for all CPUs, not only the current one.Otherwise pause_all_vcpus may lock up or run_on_cpu requests may starve....
Drop redundant global cur_cpu variable
Rename tcg_cpu_exec and tcg_has_work
These functions are also used for kvm under !CONFIG_IOTHREAD, having'tcg' in their name is just misleading.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>...
Rework debug exception processing for gdb use
Guest debugging is currently broken under CONFIG_IOTHREAD. The reason isinconsistent or even lacking signaling the debug events from the sourceVCPU to the main loop and the gdbstub.
This patch addresses the issue by pushing this signaling into a...
linux-user: display cpu list.
As it is done for qemu-system with "-cpu ?", when cpu_list_id() is missingfor a target, call cpu_list() instead.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
virtio-serial: Fix compat property name
Starting with qemu -M pc-0.12 -device virtio-serial
results in
-device virtio-serial: Property 'virtio-serial-pci.max_nr_ports' not found
The property name 'max_ports' is incorrectly named 'max_nr_ports'. Fixthat....
Introduce proper compiler barrier
Define barrier() as optimization barrier and replace (potentiallyunreliable) asm("") fences.
Sparc32: reserve addresses for unimplemented devices on SS-20
Use empty_slot to reserve addresses for several unimplemented devices so they won't fault. - BPP (parallel port), DBRI (audio), SX (pixel processor), and vsimms (framebuffer)OBP for SS-20 either assumes these devices exist or probes without expecting faults....
vhost: fix miration during device start
We need to know ring layout to allocate log buffer.So init rings first.
Also fixes a theoretical memory-leak-on-error.
https://bugzilla.redhat.com/show_bug.cgi?id=615228
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
e1000: fix access 4 bytes beyond buffer end
We do range check for size, and get size as buffer,but copy size + 4 bytes (4 is for FCS).Let's copy size bytes but put size + 4 in length.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
e1000: secrc support
Add support for secrc field. Reportedly needed by old RHEL guests.
target-ppc: fix power mode checking on 7400/7410
Only the PowerPC 7440/7450 family don't support DOZE mode. PowerPC7400 and 7410 support it.
target-mips: fix xtlb exception for loongson
Loongson 2E and 2F use the same entry for xtlb and tlb exception, atoffset 0x000.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Merge remote branch 'origin/master' into staging
microblaze: Correct signal frame setup.
Pass the context in r7.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Merge remote branch 'kwolf/for-anthony' into staging
Make default invocation of block drivers safer (v3)
CVE-2008-2004 described a vulnerability in QEMU whereas a malicious user couldtrick the block probing code into accessing arbitrary files in a guest. Tomitigate this, we added an explicit format parameter to -drive which disabling...
hw/bonito: remove incorrect pci_mem_base setting
This mistake makes PCI devices can't work correctly.
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qemu-options: add documentation for stdio signal=on|off
Commit 5989020bc11f8ba448d6fb79f4562f882a693d89 introduced a chardevoption to disable signals on stdio. Add the corresponding documentation.
Update OpenBIOS images
Update PPC, Sparc32 and Sparc64 OpenBIOS images to r821.
target-ppc: add vexptefp instruction
softfloat: add float32_exp2()
qemu-img: Fix copy+paste bug in documentation
Replace rebase by resize in documentation of resize command.
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Block migration fail, ignore error from bdrv_getlength
When there is no block driver associate with BlockDriverState bdrv_getlengthreturns -ENOMEDIUM that cause block migration to fail
Signed-off-by: Shahar Havivi <shaharh@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
virtio-pci: Check for virtio_blk_init() failure
It can't actually fail now, but the next commit will change that.
s390_virtio_blk_init() already checks for failure, butvirtio_blk_init_pci() doesn't. Fix that.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
virtio-blk: Fix virtio-blk-s390 to require drive
Move the check from virtio_blk_init_pci(), where it protects onlyvirtio-blk-pci, to virtio_blk_init(). Without that, virtio-blk-s390initializes without a drive. I figure that can lead to null pointerdereferences....
ide scsi virtio-blk: Reject empty drives unless media is removable
Disks without media make no sense. For SCSI, a Linux guest kernelcomplains during boot. I didn't try other combinations.
scsi-generic doesn't need the additional check, because it already...
pc: Avoid registering zero sized memory
No need to call cpu_register_physical_memory() for a zero sized area.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-9p: Avoid SEGV when log file couldn't be opened
While running in debug mode if 9P server is unable to open the log fileit results in a SEGV deep down in glibc:
Program received signal SIGSEGV, Segmentation fault.0x008fca8c in fwrite () from /lib/libc.so.6...
virtio-serial: Check if virtio queue is ready before consuming data
If a virtio-serial port is removed before the guest comes up andinitialises the virtqueues, qemu exits with the message
Guest moved used index from 0 to 61440
This happens because we try to clear any pending buffers from the...
virtio-serial: Assert for virtio queue ready before virtqueue operations
In addition to the previous fix for calling do_flush_queued_data() onlywhen the virtqueue is ready, ensure do_flush_queued_data() gets a vqthat's suitably initialised.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
Update SeaBIOS
- 17d3e46 smbios: Allow all fields to be set via qemu_cfg_smbios_load_field() - 0d6b8d5 seabios: pciinit: use pci device initializer helper function. - 968d3a8 seabios: pci: introduce helper function to initialize a given device. - 4e0daae virtio: Clear interrupt status register in virtio-blk...
pci/multi function bit: fix vt82c686.c.
The file, vt82c686.c, was added after the change set ofb80d4a9887fa4b6cc63f8c3a13ab2a45054d3e5c andfecb93c45c749a4c994d8d12bdee17ce2012de9eare created, but before the patch series was commit.So similar fix is needed to vt82c686.c....
Merge branch 'master' into pci
target-sh4: Add support for ldc & stc with sgr
Add support for the following missing priviledged intructions:
For SH4:- stc sgr, Rn- stc.l sgr, @-Rn
For SH4A:- ldc Rm, sgr- ldc.l @Rm+, sgr
Signed-off-by: Alexandre Courbot <gnurou@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-sh4: Split the LDST macro into 2 sub-macros
The LDST macro is used to generate ldc and stc instructions that work with aspecific register. However, the SGR register only supports stc up to SH4A,which supports both stc and ldc. This patch creates two sub-macros named LD...
pci hotplug: make pci hotplug return value to caller
make pci hotplug callback return value to caller.And when returning error, allocated resources are freed.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
virtio-net: correct packet length math
We were requesting too much when checking bufferlength: size already includes host header length.
Further, we should not exit if we get a packet thatis too long, since this might not be under controlof the guest. Just drop the packet....
pci: fix bridge update
bridge config write should trigger updateson the secondary bus. never on the primary bus.
rtl8139: address TODOs
Make rtl8139 spec compliant, fixing reset valuesfor command register.
vmware_vga: fix reset value for command register
Make init value for this register match the spec.BAR address is 0 at init, so enabling itonly works by chance.
pcnet: address TODOs
pcnet enables memory/io on init, whichdoes not make sense as BAR values are wrong.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Tested-by: Jan Kiszka <jan.kiszka@siemens.com>
pci hotplug: make pci_device_hot_remove() static
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci: fix pci_device_reset
Clear interrupt disable bit on reset, according to PCI spec.Fix pci_device_reset() with 64bit BAR.
AppleSMC device emulation
Intel Macs have a chip called the "AppleSMC" which they use to controlcertain Apple specific parts of the hardware, like the keyboard backgroundlight.
That chip is also used to store a key that Mac OS X uses to decrypt binaries....
Documentation: Fix spelling bugs
rewuired -> requiredths -> this
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Makefile: Not every shell support {}
So interpret it by hand.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Makefile: add fsdev/*.{o,d} to clean
There were fsdev/qemu-fsdev.{o,d} not removed at "make clean".
pci: set PCI multi-function bit appropriately.
Set PCI multi-function bit according to multifunction property.PCI address, devfn ,is exported to users as addr property,so users can populate pci function(PCIDevice in qemu)at arbitrary devfn.It means each function(PCIDevice) don't know whether pci device...
pci: set multifunction property for normal device.
use pci_create_simple_multifunction() for normal device which setsmultifunction bit.At the moment, only pc_piix.c and mips_malta.c uses multifunctiondevices with piix3/4 pci-isa bridge.And other boards don't populate those devices....
pci_bridge: make pci bridge aware of pci multi function bit.
make pci bridge aware of pci multi function property and let pci genericcode to set the bit.
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci: introduce multifunction property.
introduce multifunction property.Also introduce new convenient device creation function whichwill be used later.
For bisectability this patch doesn't do anything, but sets the propertyresulting in no functional changes....
qdev: implement qdev_prop_set_bit().
implement qdev_prop_set_bit().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci: remove PCIDeviceInfo::header_type
replace PCIDeviceInfo::header_type with is_bridgeas suggested by Michael S. Tsirkin <mst@redhat.com>
pci: don't overwrite multi functio bit in pci header type.
Don't overwrite pci header type.Otherwise, multi function bit which pci_init_header_type() setsappropriately is lost.Anyway PCI_HEADER_TYPE_NORMAL is zero, so it is unnecessary to zerowhich is already zero cleared....
pci: insert assert that auto-assigned-address function is single function device.
Auto-assigned-address pci function (passing devfn = -1) is alwayssingle function.This patch adds assert() to guarantee that auto-assigned-address functionis always single function device at function = 0....
pci: use PCI_DEVFN() where appropriate.
Use PCI_DEVFN() and PCI_FUNC_MAX where appropriate.This patch make it clear that func = 0.
test:The following object files with/without this patch are stripped and compared.They remains same. arm-softmmu/versatile_pci.o...
target-mips: add loongson 2E & 2F integer instructions
This patch adds support for loongson 2E & 2F instructions. They are thesame instructions, but differ by the opcode encoding.
Fix warning about uninitialized variable
With gcc 4.2.1-sjlj (mingw32-2) I get this warning:/src/qemu/exec.c: In function 'qemu_ram_alloc':/src/qemu/exec.c:2777: warning: 'offset' may be used uninitialized in this function
Fix by initializing the variable....
sheepdog: fix compile error on systems without TCP_CORK
WIN32 is not only the system which doesn't have TCP_CORK (e.g. OS X).
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
ramblocks: No more being lazy about duplicate names
Now that we have a working qemu_ram_free() and the primary runtimeuser of it has been updated, don't be lenient about duplicate id strings.We also shouldn't need to create them ondemand at the target....
ramblocks: Make use of DeviceState pointer and BusInfo.get_dev_path
With these two pieces in place, we can start naming ramblocks. Whenthe device is present and it lives on a bus that provides a devicepath, we concatenate the path and the provided name. Otherwise we...
savevm: Migrate RAM based on name/offset
Synchronize RAM blocks with the target and migrate using name/offsetpairs. This ensures both source and target have the same view ofRAM and that we get the right bits into the right slot.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>...
savevm: Use RAM blocks for basis of migration
We don't want to assume a contiguous address space, so migrate basedon RAM blocks instead of a fixed linear address map. This will allowus to have holes in the ram_addr_t namespace, so we can implementqemu_ram_free()....
savevm: Create a new continue flag to avoid resending block name
Allows us to compress the protocol a bit by setting a flag on theoffset which indicates we're still working within the same blockas last time. That way we can avoid sending the block name for...
qemu_ram_free: Implement it
Now that we can support a ram_addr_t space with holes, we can implementqemu_ram_free().
pci: Free the space allocated for the option rom on removal