qdev: device free fixups.
Two bug fixes: * When freeing a device we unregister even stuff we didn't register in the first place because the ->init() callback failed. * When freeing a device with child busses attached, we fail to zap the child bus (and the devices attached to it)....
Add exit callback to DeviceInfo.
This adds a exit callback for device destruction to DeviceInfo, sowe can hook cleanups into qdev device destruction.
Followup patches will put that into use.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
switch ide bus to inplace allocation.
support inplace allocation for pci bus, split irq init.
convert pci bridge to qdev
piix_pci: kill PIIX3IrqState
update pcbios submodule to current master
update pc-bios/bios.bin
parallel: convert isa to qdev
switch scsi bus to inplace allocation.
switch usb bus to inplace allocation.
win32: Drop dead dyntick timer code
nearest_delta_us is calculated but not used. Drop it.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Introduce QEMU_CLOCK_HOST
Despite its name QEMU_CLOCK_REALTIME is (normally) not usingCLOCK_REALTIME / the host system time as base. In order to allow alsonon-trivial RTC emulations (MC146818) to follow the host time instead ofthe virtual guest time, introduce the new clock type QEMU_CLOCK_HOST. It...
Refactor RTC command line switches
Deprecate -localtime, -setdate and -rtc-td-hack in favor of a newunified command line switch:
-rtc [base=utc|localtime|date][,driftfix=none|slew]
Enable host-clock-based RTC
Switch RTC emulations to the new host_clock instead of vm_clock bydefault. This has the advantage that the emulated RTC will followautomatically the host time while it might be tuned via NTP. vm_clockcan still be selected by passing '-rtc clock=vm' on the command line....
gdbstub: x86: Switch 64/32 bit registers dynamically
Commit 56aebc891674cd2d07b3f64183415697be200084 changed gdbstub in waythat debugging 32 or 16-bit guest code is no longer possible with qemufor x86_64 guest CPUs. Since that commit, qemu only provides registers...
kvm: Fix guest single-stepping
Hopefully the last regression of 4c0960c0: KVM_SET_GUEST_DEBUG requiresproperly synchronized guest registers (on x86: eflags) on entry.
temporary fix for on_vcpu
Recent changes made on_vcpu hit the abort() path, even with the IO threaddisabled. This is because cpu_single_env is no longer set when we call thisfunction. Although the correct fix is a little bit more complicated that that,...
allow qdev busses allocations be inplace
musicpal: Add VMState support
Register all relevant fields of Musicpal device states with the VMStateframework. This involves a few type changes of state variables.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
slirp: It needs to use QEMU_CFLAGS not CFLAGS
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add Wold-style* flags
This time, I add them in configure only if target compiler supports it
bdf: Remove last users of FALSE/TRUE
This brings bfd_boolean to the wonderful world of <stdbool.h>, it is neededbecause it defines bdf_boolean as an enum with values true and false,and some architectures use TRUE, FALSE and give problems when you try to use...
do proper cpu_self check
Currently, our check for qemu_cpu_self only checks if there is a cpucurrently in execution (represented by cpu_single_env being set). Whilethis might be okay for tcg, it is certainly not okay for kvm, since multiplecpus might be executing....
Correctly free nd structure
When we "free" a NICInfo structure, we can leak pointers, since we don't domuch more than setting used = 0.
We free() the model parameter, but we don't set it to NULL. This means thata new user of this structure will see garbage in there. It was not noticed...
Fix exit on 'pci_add' Monitor command
If the user issues one of the following commands to the Monitor:
pci_add pci_addr=auto nic model=Nonepci_add pci_addr=auto nic model=?
QEMU will exit, because the function used to perform sanitychecks (qemu_check_nic_model_list()) exits on error....
Rename QEMU_TIMER_* to QEMU_CLOCK_*
These constants select clocks, not timers. And init_timers initializesclocks.
x86: factor out cpu_get/put_fpreg()
vmstate: Add suppot for field_exist() test
x86: port cpu to vmstate
musicpal: Catch null TX qeueues
They likely represent invalid queues that should be skipped. We alreadydo this for RX queues. Wish I had a spec...
Credits go to malc for analyzing the issue and suggesting this fix.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>...
musicpal: Rework GPIO input events
The qdev_gpio conversion of 343ec8e caused come polarity mismatch of keyevent pins and left an overly complex solution behind. Take this chanceand refactor the GPIO input system of the Musicpal, moving it closer toreality:...
musicpal: Clean up typecasts
musicpal: Coding style fixes
musicpal: True reset support for GPIO
musicpal: True reset support for audio device
musicpal: Make PIT emulation more robust
Stop the periodic timers of the PIT on reset, disabling via the controlregister and invalid parameters.
x86: mcg_cap is never 0
x86: split FPReg union
x86: split MTRRVar union
Add *TL functions to vmstate
x86: port segments to vmstate
x86: factor out cpu_pre_save()
x86: factor out cpu_pre/post_load()
x86: factor out cpu_get/put_xmm_reg()
x86: factor out cpu_get/put_mttr_var()
x86: add fpregs_format_vmstate
Don't even ask, being able to load/save between 64<->80bit floats should be forbidden
x86: mce_banks always have the same size
mce_banks is always MCE_BANKS_DEF * 4 in size, value never change
CC: Huang Ying <ying.huang@intel.com>Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
x86: send mce_banks as an array
x86: fpuc is uint16_t not unsigned int
x86: fpus is uint16_t not unsigned int
We save more that fpus on that 16 bits (fpstt), we need an additional field
x86: add fptag_vmstate to the state
It is needed to store fptags
x86: add pending_irq_vmstate to the state
It is needed to save the interrupt_bitmap
vmstate: port twl92230 device
Just don't look. struct tm members are ints' and they are sent as uint16_t.VMState code complains as it should. Have to create hacky int32_as_uint16type. Don't ever think about copying it
Signed-off-by: Juan Quintela <quintela@redhat.com>...
vmstate: add support for arrays of pointers
We need this to send arrays of timers
lm832x: make fields to have the same types that they are saved/loaded
They were saved as uint8_t already. To make things simpler, I justreg == -1 used to indicate an error, I create LM832x_GENERAL_ERRORwith vale 0xff to represet it
vmstate: port lm832x device
vmstate: remove i2c_slave_load/save
All its users moved to vmstate
x86: hflags is not modified at all, just save it directly
x86: make a20_mask int32_t
This makes the savevm code correct, and sign extensins gives us exactlywhat we need (namely, sign extend to 64 bits when used with 64bit addresess.
Once there, change 0x100000 for 1 << 20, that maks all a20 use the same syntax....
vmstate: add uint8 array
vmstate: create VMSTATE_I2C_SLAVE
vmstate: port wm8750 device
vmstate: port max7310 device
vmstate: create VMSTATE_STRUCT_POINTER
vmstate: port pxa2xx_i2c device
vmstate: port ssd0303 device
vmstate: create VMSTATE_INT16_ARRAY
tmp105: change len and alorm to uint8_t
They were using only with very small integers, and they are sent/read asbytes. They can't become negative as far as I can see
vmstate: port tmp105 device
twl92230: change pwrbtn_state to uint8_t
its value is always the level of an interrupt, 0 or 1
vmstate: remove const from pre_save() functions
vmstate: remove ps2_kbd_load_old()
Now that we have version_id on post_load() we don't need the old loadfunction
vmstate: Add support for sending partial arrays
This one is needed for changees happening on fdc. It allows you to sendarrays of structs whose size we want to send it is another field with typeuint8_t. (If you have been able to read the whole sentence without...
qdev: Add support for uint8_t
i2c: addresses are load/save as uint8_t values, change types to reflect this
vmstate: port i2c_bus device
vmstate: port i2c_slave device
cirrus_vga: also assign gr0/1 when writting shadow_gr0/1
This is a regression/bug caused by previous vga_cleanup. This fixesUbuntu installer reported by: Pierre Riteau
vga: move back dirty_log functions to vga.c
They are needed there on qemu-kvm.
vmstate: remove const for put operations
In a later patch, we introduce pre_save() and post_save() functions.The whole point of that operation is to change things in the state.Without this patch, we have to remove the const qualifier in eachuse with a cast...
vmstate: add version_id argument to post_load
Revert "eepro100: Remove unused device status entries"
This reverts commit 3031efabd0bb744126a53f32c5426580b5d394d5.
target-i386: Fix exceptions for fxsave/fxrstor
This patch corrects the following aspects of exception generation infxsave/fxrstor:
tcg: allocate s->op_dead_iargs dynamically
Similarly to what is already done in tcg_liveness_analysis() whenUSE_LIVENESS_ANALYSIS is not set.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg: remove dead code
bsd-user: fix "#if 0"'d printf()
Make an "#if 0"'d printf() in load_elf_binary() reflect what the actualcode does (see commit 3bc0bdcaadef1100ce2413af818d9c8e2f6319fc).
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
eepro100: Add more i825xx devices
The new devices added here are still not functional -partially because some patches are still missing,partially because I cannot test them. Neverthelessthey belong to the same family and will be supportedby this driver some day....
eepro100: Remove unused device status entries
A lot of entries are unused (they were added by copy + pastefrom other drivers during development of eepro100.c).
Removing them from nic_save, nic_load makes anyold saved status incompatible, so a new version...
target-i386: add RDTSCP support
RDTSCP reads the time stamp counter and atomically also the contentof a 32-bit MSR, which can be freely set by the OS. This allows CPUlocal data to be queried by userspace.Linux uses this to allow a fast implementation of the getcpu()...
target-i386: add SSE4a instruction support
This adds support for the AMD Phenom/Barcelona's SSE4a instructions.Those include insertq and extrq, which are doing shift and mask onXMM registers, in two versions (immediate shift/length values andstored in another XMM register)....
target-i386: add lock mov cr0 = cr8
AMD CPUs featuring a shortcut to access CR8 even from 32-bit mode.If you use the LOCK prefix with "mov CR0", it accesses CR8 instead.This behavior is guarded by the CR8_LEGACY CPUID bit(Fn8000_0001:ECX1).
Signed-off-by: Andre Przywara <andre.przywara@amd.com>...
hw/omap_dma: add matching {} in if 0
MULTI_REQ is never defined, so it doesn't matter much, but sincewe have an if statement there, let's add {} to clarify what itshould do if it's uncommented, and indent the code properly.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
Check availability of uuid header / library
If available, the Universally Unique Identifier libraryis used by the vdi block driver.
Other parts of QEMU (vl.c) could also use it.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user: fix "#if 0"'d printf()
Make an "#if 0"'d printf() in load_elf_binary(), probably left to aid indebugging, reflect what the actual code does. The current printf() willonly confuse those who "#if 1" it (it certainly confused me enough towrite this trivial patch)....
tcg: add ext{8,16,32}u_i{32,64} TCG ops
Currently zero extensions ops are implemented by a and op with aconstant. This is then catched in some backend, and replaced bya zero extension instruction. While this works well on RISCmachines, this adds a useless register move on non-RISC machines....
tcg/x86_64: add support for ext{8,16,32}u_i{32,64} TCG ops
tcg/i386: add support for ext{8,16}u_i32 TCG ops
oss/alsa: Do not invoke UB described in 7.15.1.1 (this time for ADC)
Signed-off-by: malc <av1474@comtv.ru>
libuser is a generated directory
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>