kvm: Simplify cpu_synchronize_state()
cpu_synchronize_state() is a little unreadable since the 'modified'argument isn't self-explanatory. Simplify it by making it alwayssynchronize the kernel state into qemu, and automatically flush theregisters back to the kernel if they've been synchronized on this...
Check block driver read error in pflash_cfi0x
If a flash file of size smaller than the flash size is specified inthe -pflash option, the block driver returns error. But thepflash_cfi0x ignores the error. This results in a flash content of allzeroes. And the simulation aborts while executing code....
fix stack buffer overflows in eepro100.c tx
Hello,the real world issue is that the hardware allows sends up to 2600 bytes,and for some reason FreeBSD sometimes sends frames larger than theethernet frame size (102+1460 is the maximum I have seen so far),...
qdev: convert watchdogs
-watchdog NAME is now equivalent to -device NAME, except it treatsoption argument '?' specially, and supports only one watchdog.
A side effect is that a device created with -watchdog may now receivea different PCI address.
i6300esb is now available on any machine with a PCI bus, not just PCs....
virtio-blk: handle NULL returns from bdrv_aio_{read, write}
The bdrv_aio_{read,write} routines can return a NULL pointer when theI/O submission fails. Currently we ignore this and will wait foreverfor an I/O completion and leading to a hang of the guest....
Move watchdog, watchdog_action, give them internal linkage
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Clean up upcast from PCIDevice to I6300State
Add VMState support for variable sized arrays
This patch add supports for variable sized arrays whose size isanother field of the state.
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Port PCI Bus to VMState design
This uses VARRAY and INT32_EQUAL values
Add VMState support for static sized buffers (uint_8)
This patch adds support for static sized buffer and typecheks that the buffer is right.
Port PS2 devices to VMState design
This uses STRUCT and BUFFER
Add VMState support for int32_t check value
We read the saved value and check that it is less or equal than the onestored in the structure.
Add version_id to PCIDevice.
It is needed for VMState
Port PCIDevice state to VMState
This uses a variant of buffer, with extra checks. Also uses the newsupport for cheking that a read value is less or equal than a field.
Add VMState support to run a function after load
Port ACPI to VMState
This uses a run_after_load() function, and VMSTATE_PCI_DEVICE()It could be made smaller changing the type of pm_io_space_update()to return an int.
multiboot.raw is a generated file
pci ids: remove redundant defines
Remove some redundant definitions for PCI classes:PCI_CLASS_SERIAL_OTHER already exists as PCI_CLASS_COMMUNICATION_OTHERand PCI_CLASS_PROCESSOR_CO is redefined.
PCI_CLASS_SERIAL_OTHER is not used anywhere.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
virtio-console: rename dvq to ovq
It isn't obvious what 'dvq' stands for. Since it's the output queue andthe corresponding input queue is called 'ivq', call this 'ovq'
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
raw-posix: refactor AIO support
Currently the raw-posix.c code contains a lot of knowledge about theasynchronous I/O scheme that is mostly implemented in posix-aio-compat.c.All this code does not really belong here and is getting a bit in theway of implementing native AIO on Linux....
raw-posix: add Linux native AIO support
Now that do have a nicer interface to work against we can add Linux nativeAIO support. It's an extremly thing layer just setting up an iocb forthe io_submit system call in the submission path, and registering an...
Use return value from load_state() call back
Add vmstate_load() and vmstate_save() functions
New VMstate save/load infrastructure
This patch introduces VMState infrastructure, to convert the save/loadfunctions of devices to a table approach. This new approach has thefollowing advantages:- it is type-safe- you can't have load/save functions out of sync...
Add VMState support for pointers
This patch adds support for saving pointers to values
Add VMState support for arrays
This patch adds support for saving arrays inside the struct
Port apic to new VMState design
Add VMState support for structs
This patch adds support for saving one VMStateDescription from otherVMStateDescription.
Add VMState support for arrays of structs
This patch add supports for arrays of structs
Port i8254 to new VMState design
We read the saved value and check that it is the same that the oneis stored in the structure.
Add isa_reserve_irq().
Introduce isa_reserve_irq() which marks an irq reserved and returnsthe appropriate qemu_irq entry from the i8259 table.
isa_reserve_irq() is a temporary interface to be used to allocate ISAIRQs for devices which have not yet been converted to qdev, and for...
Move isa_connect_irq calls into isa_create_simple
Now with isa-bus maintaining the isa irqs we can move theisa_connect_irq() calls into isa_create_simple().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qcow2: Metadata preallocation
This introduces a qemu-img create option for qcow2 which allows the metadata tobe preallocated, i.e. clusters are reserved in the refcount table and L1/L2tables, but no data is written to them. Metadata is quite small, so this...
move useful type definitons to osdep.h
split do_loadvm() into do_loadvm() and load_vmstate()
do_loadvm() is now called from the monitor.load_vmstate() is called by do_loadvm() and when -loadvm command line is used.Command line don't have to play games with vmstop()/vmstart()
Signed-off-by: Juan Quintela <quintela@redhat.com>...
move do_loadvm() to monitor.c
make load_vmstate() return errors
isa bus irq changes and fixes.
Changes:
(1) make isa-bus maintain isa irqs, complain when allocating already taken irqs. (2) note that (1) works only for isa devices converted to qdev already (floppy and ps2/kbd/mouse right now), so more work...
hw/eepro100.c: Use extended TBD only where applicable
Bug fix for segfault when run as i82551 HW:Use Extended TBD only when HW supports it (i82558 and up).
Added assertions to guard from such buffer overflowIntroduce the MAX_TCB_BYTE_COUNT macroAllocate buf big enough as HW needs (MAX_ETH_FRAME_SIZE -> MAX_TCB_BYTE_COUNT)...
Add fdt to new feature convention
Add xen to new feature convention
Add kvm to new feature convention
Extra error message is only given if --enable-kvm was given
Add sparse to new feature convention
Once there, move to a proper test to see if we are going to use it or not
add file descriptor migration
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Cc: Chris Lalancette <clalance@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
extend -smp parsing to include cores= and threads= options
For injecting multi-core and multi-threading CPU topology into guestsextend the -smp syntax to accommodate cores and threads specification.Syntax: -smp smp_value[,cores=nr_cores][,threads=nr_threads]\...
push CPUID level to 4 to allow Intel multicore decoding
Intel CPUs store the number of cores in CPUID leaf 4. So pushthe maxleaf value to 4 to allow the guests access to this leaf.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
set CPUID bits to present cores and threads topology
Controlled by the enhanced -smp option set the CPUID bits to present theguest the desired topology. This is vendor specific, but (with the exceptionof the CMP_LEGACY bit) not conflicting, so we set all bits everytime....
allow overriding of CPUID level on command line
The CPUID level determines how many CPUID leafs are exposed to the guest.Some features (like multi-core) cannot be propagated without the properlevel, but guests maybe confused by bogus entries in some leafs....
introduce kvm64 CPU
In addition to the TCG based qemu64 type let's introduce a kvm64 CPU type,which is the least common denominator of all KVM-capable x86-CPUs(based on Intel Pentium 4 Prescott). It can be used as a base typefor migration.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>...
block/vdi.c: Fix several bugs
pci-hotplug: initialize dinfo to NULL in pci_device_hot_add
Suppress the following compiler warning emitted by at least gcc version 4.2.1 (SUSE Linux)and gcc version 3.4.5 (mingw32 special):
hw/pci-hotplug.c: In function 'pci_device_hot_add':hw/pci-hotplug.c:102: warning: 'dinfo' may be used uninitialized in this function...
Rename build_docs to docs
All other features are named foo and enabled with --enable-foo.
Add sdl to new feature convention
Add vnc_tls to new feature convencion
Add vnc_sasl to new feature convencion
Add curses to new feature convencion
Add curl to new feature convencion
Add nptl to new feature convencion
Add bluez to new feature convencion
Once there, remove extra check for package and output if bluez was found or not as the other features
Add build_docs to new feature convention
Make vnc configure options less verbose.
Rest of libraries don't print themselves
Use the same structure for list of libs in curses and pthread
Add feature configure help
Add error message for feature not found
Add brlapi to new feature convencion
Add vde to new feature convencion
Remove a hack introduced by d19076faca944c31bb051b95d285e75ec67902f7
Work by Blue Swirl culminating with 5c55ff99fa88158871d5b9f619c485deae5f3d5bmade it unnecessary.
Fix dsound typos
Dsound currently does not compile due to the typos in the code. Thispatch makes it compile again.{PATCH}
Signed-off-by: Alex Ivanov <void@aleksoft.net>Signed-off-by: malc <av1474@comtv.ru>
Remove kqemu.c accidentally added by d60efc6b0d3d4e90cbbb86e21451e55263c29416
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Sparc32: improve interrupt handling
Level 15 interrupts are broadcast to all CPUs, each CPU can clear theinterrupt using the local Clear Pending register.
Update intbit_to_level table.
Don't try to raise level 0 interrupts.
Calculate pending interrupts based on the separate inputs from master...
Make CPURead/WriteFunc structure 'const'
target-mips: fix conditional moves off fp condition codes
Conditional moves off fp condition codes were using the result ofget_fp_bit to isolate and test the relevant condition code. However,get_fp_bit returns the bit number of the condition code, not a...
ARM back-end: Fix encode_imm
the encode_imm function in tcg/arm/tcg-target.c lacks shift declaration.
Laurent
Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
qdev/prop: convert isa-bus to helper macros.
virtio-blk: add msi support.
eliminate errors about unused results in block/vpc.c
These errors come up when compiling with gcc-4.3.3 and some older headers:
/scratch/froydnj/qemu.git/block/vpc.c: In function 'vpc_create':/scratch/froydnj/qemu.git/block/vpc.c:514: error: value computed is not used...
Make the e1000 the default network adapter for the pc target.
The ne2k is an ancient card that performs pretty terribly under QEMU. In manymodern OSes, there is no longer drivers available for the ne2k.
Switch the default network adapter to e1000. This card is more widely...
qemu: move virtio-pci.o to near pci.o
virtio-pci depends, and will always depend, on pci.cso it makes sense to keep it in the same makefile,(unlike the rest of virtio files which should eventually be moved out to Makefile.hw).
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
make pthreads mandatory
As requested by Anthony make pthreads mandatory. This means we will alwayshave AIO available on posix hosts, and it will also allow enabling the I/Othread unconditionally once it's ready.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
cleanup cpu-exec.c, part 0/N: consolidate handle_cpu_signal
handle_cpu_signal is very nearly copy-paste code for each target, with afew minor variations. This patch sets up appropriate defaults for ageneric handle_cpu_signal and provides overrides for particular targets...
char: Emit 'CLOSED' events on char device close
Notify users of the char interface whenever the file / connection isclosed.
Unbreak large mem support by removing kqemu
kqemu introduces a number of restrictions on the i386 target. The worst is thatit prevents large memory from working in the default build.
Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on...
Only build osdep once
We no longer need hackery to work around kqemu
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
unify popen/fopen qemu wrappers
While reading Chris's code for fd migration I noticed the duplicationbetween QEMUFilePopen and QEMUFileStdio. This fixes it, and makesqemu_fopen more similar qemu_popen.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
Route IOAPIC interrupts via ISA bus
Instead of calling the IOAPIC from the PIC, raise IOAPIC irqs via the ISA bus.As a side effect, IOAPIC lines 16-23 are enabled.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Migration via unix sockets.
Implement migration via unix sockets. While you can fake this usingexec and netcat, this involves forking another process and isgenerally not very nice. By doing this directly in qemu, we can avoidthe copy through the external nc command. This is useful for...
Add a configure switch to enable / disable all user targets. I felt compelled to do it for symmetry, mostly it is useful to disable user targets when you don't want to build them.
Signed-off-by: Zachary Amsden <zamsden@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
SMART ATA Functionality
For the lulz I implemented basic SMART functionality in ide.c. smartctlon linux recognizes it just fine and starting self tests with itcomplete successfully.
Signed-off-by: Brian Wheeler <bdwheele@indiana.edu>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QEMU set irq0override in fw_cfg
Hi,
After discussing the issue with Avi, Gleb and a couple others on irq,we came to the conclusion that it is preferred to have QEMU requestfeatures from the BIOS, rather than notifying the BIOS that it isrunning on QEMU or KVM. This way memory ranges can change etc. and...
Makefile: fixed rule TAGS
- still works if the build dir is not the src dir- use find instead of .c block/.c etc...
Signed-off-by: Alexandre Bique <alexandre.bique@citrix.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Route PC irqs to ISA bus instead of i8259 directly
A PC has its motherboard IRQ lines connected to both the PIC and IOAPIC.Currently, qemu routes IRQs to the PIC which then calls the IOAPIC, anincestuous arrangement. In order to clean this up, create a new ISA IRQ...
Fix detached migration with exec.
When trying to do detached migration with exec, I found thatthe monitor wouldn't always return in a timely manner. Itracked this down to exec_start_outgoing_migration. Itappeared we were setting the fd to NONBLOCK'ing, but in...
Don't segfault when changing VNC password on an SDL display.
When using stdio monitor and VNC display, one can set or clear a VNC password; this should set or turn off VNC authentication as well.
Clean up VGA type selection; far too many variables being used to track one state leads to confusion if new variables are added.
Add missing linefeed in error message
The error message for an unknown network device given tomonitor command set_link looks better with a terminatinglinefeed.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
make vga screen_dump use DisplayState properly
Hi all,currently the vga screen_dump code doesn't use the DisplayStateinterface properly and tries to replace it temporarily while taking thescreenshot.A better approach is to register a DisplayChangeListener, call...
Do not disable autostart for live migration
If the user does not want autostart, they can specify -S.
Restore consistent formatting
Signed-off-by: malc <av1474@comtv.ru>