fix for bad macaddr of e1000 in Windows 2003 server with original MS driver
The sequence of reading from eeprom is "offset by one" moved because of a falsedetection of a clock cycle after an eeprom reset. Keeping the last clock valueafter a reset keeps it in sync....
fix XEN Build
I miss s/yes/y/ in one place
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: add user-specified identifier to devices.
Add id field to DeviceState. Make "info qtree" print it.
This helps users and management apps identifying devices in monitoroutput, which is especially useful with otherwise identical devicessuch as two virtio disks....
qdev/compat: virtio-blk-pci 0.10 compatibility.
Add class property to virtio-blk-pci allowing to specify the PCI class.Add compat property to pc-0.10 to set the old PCI class.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: add id= support for pci nics.
qdev/compat: virtio-console-pci 0.10 compatibility.
Add class property to virtio-console-pci allowing to specify the PCI class.Add compat property to pc-0.10 to set the old PCI class.
qdev: print device id in "info pci".
qdev/compat: virtio-net-pci 0.10 compatibility.
Add vectors property, allowing to turn off msi by setting vectors=0.Add compat property to pc-0.10 disabling msi.
qdev: es1370+ac97 description
qdev: factor out driver search to qdev_find_info()
qdev/compat: compat property infrastructure.
This add support for switching devices into a compatibility modeusing device properties. Machine types can have a list of propertiesfor specific devices attached to allow the easy creation of machinetypes compatible to older qemu versions....
qdev: add no_user, alias and desc
no_user: prevent users from adding certain devices.desc: description of the device.alias: to allow user friendly shortcuts on the command line, i.e. -device usbmouse instead of -device "QEMU USB Mouse" or -device lsi instead of -device lsi53c895a...
qdev/compat: add pc-0.10 machine type.
fix segfault in setting migration speed
Hi,
Whoever wrote this migrate_set_speed function is totally stupid.
Any failed or completed migration keeps its state to allow probing ofmigration data, but has no associated file anymore. It is, thus,possible to crash qemu by calling migrate_set_speed after a migration...
Initialize PS2 keyboard / mouse state on reset
Currently only common PS2 state is initialized, leaving keyboard andmouse specific state to contain stale values.
Signed-off-by: Dinesh Subhraveti <dineshs@us.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Add port write command
Useful for testing hardware emulations or manipulating its state tostress guest drivers.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: rework device properties.
This patch is a major overhaul of the device properties. The propertiesare saved directly in the device state struct now, the linked list ofproperty values is gone.
Advantages: * We don't have to maintain the list with the property values....
cleanup: drop unused struct elements from VirtIOPCIProxy.
ioport: use uint{32, 16, 8}_t for ioport value and pio_addr_t for ioport address.
Using int for cpu_{in, out}[bwl] is inconsistent with other partbecause for address or value, uintN_t is used by other qemu part.At least, softmmu, CPU{Read, Write}MemoryFunc, pci, target_phys_addr_t...
Handle vga= in -append
Here is a patch I had sent twice to the list 2 years ago.Hopefuly this time someone will be interested
It adds support for passing vga mode to linux kernel throughvga= option in -append
Signed-off-by: Pascal Terjan <pterjan@gmail.com>...
qemu-io: Implement bdrv_load_vmstate/bdrv_save_vmstate
The load_vmstate and save_vmstate functions are implemented as avariation of the normal read/write operation, enabled by the -b option.This is the same mechanism as is used to switch from read/write to...
Reset HPET config register on hpet_reset
Without this, after system reset, hpet does not detect transition fromnon-legacy to legacy mode.
Signed-off-by: Beth Kon <eak@us.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
tlb flush cleanup
Use static empty variable s_cputlb_empty_entry to clear entries,also reset addend member when clearing entries.This helps running with valgrind/memcheck
Signed-off-by: igor.v.kovalenko@gmail.com
--Kind regards,Igor V. KovalenkoSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-io: use BDRV_O_FILE to implement the growable open option
Instead of doing our own check for protocols which fails because raw isn'tformally a protocol but special cased in find_protocol specify the BDRV_O_FILEoption to use the same code as bdrv_file_open does....
Remove dead i386 assembly code from softmmu_header.h
This patch removes dead i386 assembly code from softmmu_header.h.
The code is conditional on ASM_SOFTMMU, which is never defined.Optimisation for the fast path is already handled by tcg_out_qemu_ld()...
honor -S on incoming migration
-S is not honored by qemu on incoming migration. If a domain is migratedwhile paused, thus, it will start running on the remote machine; thisis wrong.
Given the trivial patch to fix this, it looks more like a thinkothan anything else, probably dating back to the qemu-kvm merge....
omit 3DNOW! CPUID bits from qemu64 CPU model
Since we recently do not disable 3DNOW! support anymore, we shouldavoid setting the bits in the default qemu64 CPU model to easemigration. TCG does not support it anyway and even AMD deprecatesit's usage nowadays....
raw-posix: Handle errors in raw_create
In qemu-iotests, some large images are created using qemu-img.
Without checks for errors, qemu-img will just create anempty image, and later read / write tests will fail.
With the patch, failures during image creation are detected...
ioport: remove some #ifdef DEBUG_UNUSED_IOPORT.
remove some #ifdef DEBUG_UNUSED_IOPORT in ioport.cand use PRIx32 where appropriate
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Cc: Anthony Liguori <anthony@codemonkey.ws>Cc: Paolo Bonzini <pbonzini@redhat.com>...
Update to a hopefully more future proof FSF address
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Sparc32: convert slavio interrupt controller to qdev
Also increase QDEV_MAX_IRQ.
Sparc32: refactor CPU init
Sparc32: convert memory to qdev
Sparc32: convert boot prom to qdev
Sparc32: convert iommu to qdev
Sparc32: convert cs4231 to qdev
Sparc32: fix SDL zooming with TCX
Fix non-ACPI Timer Interrupt Routing - v3
v1 -> v2 adds comment suggested by Ryan.v2 -> v3 clarifies comment and corrects entry count
Fix multiboot.bin build on mingw32
This combination of ld/object was suggested by Bartlomiej Celary
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Don't copy multiboot.bin into pc-bios after built
That dirties the working directory of the tree.
gdbstub: Add vCont support
This patch adds support for the vCont remote gdb command. It is used bygdb 6.8 or better to switch the debugging focus for single-steppingmulti-threaded targets, ie. multi-threaded application in user modeemulation or VCPUs in system emulation....
gdbstub: x86: Refactor register access
Clarify gdb's register set layout by using constants forcpu_gdb_read/write_register.
gdbstub: x86: Support for setting segment registers
This allows to set segment registers via gdb also in system emulationmode. Basic sanity checks are applied and nothing is changed if theyfail. But screwing up the target via this interface will never be...
bios: Fix multiple calls into smbios_load_ex
We're marking the used entry bitmap in smbios_load_external() for eachtype we check, regardless of whether we loaded anything. This makessubsequent calls behave as if we've already loaded the tables from qemu...
replace bdrv_{get, put}_buffer with bdrv_{load, save}_vmstate
The VM state offset is a concept internal to the image format. Replacethe old bdrv_{get,put}_buffer method that require an index into theimage file that is constructed from the VM state offset and an offset...
pci.c: remove unnecessary #ifdef DEBUG_PCI.
remove unnecessary #ifdef DEBUG_PCI.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Move boot_set callback backend
Move registration function for the boot_set callback handler and provideqemu_boot_set so that it can also be used outside the monitor code.
Rework reset handler management
Convert the reset handler maintenance code to TAILQ services.
Add qemu_unregister_reset
Will be used by '-boot once=...', and should also help in other usecases.
Add boot-once support
This allows to specify an exceptional boot order only for the firststartup of the guest. After reboot, qemu will switch back to the defaultorder (or what was specified via 'order='). Makes installing from CDimages and then booting the freshly set up harddisk more handy....
Add boot menu control via command line switch
Disable the lengthy BIOS prompt for selecting a boot device by default,but let the user reenable it via '-boot menu=on'.
Update boot option documentation
Regenerate BIOS and add patches for -boot option
slirp: Fix default netmask to 255.255.255.0
This got broken between a13a4126c8 and c92ef6a22d: old slirp code used255.255.255.0.
Add a pc-0-10 machine type for compatibility with 0.10.x
Add a pc-0-10 machine type to allow a pc machine to be created withvirtio block and console devices compatibility with qemu-0.10.x.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Rework -boot option
This patch changes the boot command line option to the canonical format
-boot [order=drives][,...]
where 'drives' is using the same format as the old -boot. The formatswitch allows to add the 'menu' and 'once' options in later patches. The...
Change default PCI class of virtio-blk to PCI_CLASS_STORAGE_SCSI
Windows virtio driver cannot pass DTM (certification) tests while thestorage class is PCI_CLASS_STORAGE_UNKNOWN.
A new qdev type is introduced to allow devices using the old classto be created for compatibility with qemu-0.10.x....
Change default PCI class of virtio-console to PCI_CLASS_SERIAL_OTHER
We're using PCI_CLASS_DISPLAY_OTHER now, but qemu-kvm.git is usingPCI_CLASS_OTHERS because:
"As a PCI_CLASS_DISPLAY_OTHER, it reduces primary display somehow on Windows XP (possibly Windows disables acceleration since it fails...
Sparc32: convert sparc32_dma to qdev
Avoid SIGSEGV when dumping cpu state without enabled logging
Signed-off-by: malc <av1474@comtv.ru>
Convert fdc to qdev
Sparc32: convert slavio timers to qdev
Sparc32/PPC: convert escc to qdev
Sparc32: convert slavio_misc to qdev
Sparc32: convert idreg to qdev
target-ppc: enable PPC_MFTB for 44x
According to PPC440 user manual, PPC 440 supports ``mftb'' even it's apreserved instruction:
PPC440_UM2013.pdf, p.445, table A-3
when I compile a kernel (2.6.30, bamboo_defconfig/440EP &canyonlands/460EX), I can see ``mftb'' by using ppc-xxx-objdump...
ppc tcg: fix wrong bit/mask of wrteei
Signed-off-by: Baojun Wang <wangbj@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
gdb-xml: fix hacks in powerpc register numbering
The powerpc xml files contained a hack--an empty, non-existentregister--for getting the register numbers to line up fornewer (XML-aware) and older (non-XML-aware) GDB. While this hack workedin some cases, it didn't work in all cases, notably when the user used...
target-ppc: fix evmergelo and evmergelohi
For 32-bit PPC targets, we translated:
evmergelo rX, rX, rY
as:
rX-lo = rY-lorX-hi = rX-lo
which is wrong, because we should be transferring rX-lo first. Thisproblem is fixed by swapping the order in which we write the parts of...
target-ppc: fix typo in _cpu_ppc_load_decr
Use parameter 'next' to fix the hdecr case.Also pass 'next' by value instead of pointer (more easy to read and noperformance issue for an always_inline function).
Signed-off-by: Tristan Gingold <gingold@adacore.com>...
Sparc32/Sparc64/PPC: convert m48txx to qdev
Sparc32: convert tcx to qdev
Also increase QDEV_MAX_MMIO.
Sparc32: use the OpenFirmware name for ecc
target-mips: remove useless code in gen_st_cond()
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix MIPS SC
Fix botched merge of op_ldst_sc calls to match actual implementation.Thanks to Aurelien Jarno for diagnosing this.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Sparc64: convert ebus to qdev
sparc64: trap handling corrections
On Sun, Jul 12, 2009 at 12:09 PM, Blue Swirl<blauwirbel@gmail.com> wrote:
On 7/12/09, Igor Kovalenko <igor.v.kovalenko@gmail.com> wrote: Good trap handling is required to process interrupts. This patch fixes the following:...
On 7/12/09, Igor Kovalenko <igor.v.kovalenko@gmail.com> wrote:
Good trap handling is required to process interrupts. This patch fixes the following:...
Sparc32: convert eccmemctl to qdev
sparc64: fix helper_st_asi little endian case typo
On Sun, Jul 12, 2009 at 12:43 AM, Stuart Brady<sdbrady@ntlworld.com> wrote:
On Sat, Jul 11, 2009 at 10:22:18PM +0400, Igor Kovalenko wrote: It is clear that intention is to byte-swap value to be written, not...
On Sat, Jul 11, 2009 at 10:22:18PM +0400, Igor Kovalenko wrote:
It is clear that intention is to byte-swap value to be written, not...
sparc64: really initialize irq
Allocate irq just before passing it to pci bridge initializationand actually use it to initialize pci bridge.
--Kind regards,Igor V. Kovalenko
sparc64: mmu bypass mode correction
This Implement physical address truncation in mmu bypass mode.IMMU bypass is also active when cpu enters RED_STATE
sparc64: unify mmu tag matching code
This patch extracts common part of sparc64 tagmatching code used by IMMU and DMMU lookups.
Fix PCI IRQ breakage
Zero initialize the PCI bus irq count.
Revert "Fix the PCI header type of APB"
This reverts commit e8d2a88755b849bdadaf80d19e342eade3c017bc.
Fix APB by reverting 16eaedf2668e9b347a59d73346fcc4c764c58348 partially
Indent ac97 and es1370 according to audio formatting
For the sake of consistency. I pulled in the wrong patches from Gerd whenhe did the qdev conversion.
qemu/msi: clean used vectors state on load
Clean up msix vector usage state on load. Since guest might have controlover it through the device, the device will have to load this state fromfile.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu/msi: missing braces
MSIX present bit is tested incorrectly, and only happens to work becausethe bit we are testing is 0x1. Add braces to fix this.
Reported-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu/virtio: mark msi vectors used on load
Usage of msi vectors is controlled by the guest and so needs to berestored on load. Do this for msi vectors used by the virtio device.
kvm: Work around borken MSR_GET_INDEX_LIST
Allocate enough memory for KVM_GET_MSR_INDEX_LIST as older kernels shotfar beyond their limits, corrupting user space memory.
flush pending aio requests
When we finish migration, there may be pending async io requestsin flight. If we don't flush it before stage3 starting, it might bethe case that the guest loses it.
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block: Clean up after deleting BHs
Commit 6a7ad299 ("Call qemu_bh_delete at bdrv_aio_bh_cb") deletes emulatedaio bottom halves to prevent endless accumulation. However, it leaves astale ->bh pointer, which is then waited on when the aio is reused.
Zeroing the pointer fixes the issue, allowing vmdk format images to be used....
Prefer sysfs for USB host devices
Scanning for devices via /sys/bus/usb/devices/ and using them via the/dev/bus/usb/<bus>/<device> character devices is the prefered methodon modern kernels, so try that first.
When using SELinux and libvirt, qemu will have access to /sys/bus/usb...
qcow1: Fix qcow_aio_writev
Pass is_write = 1 to qcow_aio_setup when writing.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qcow2: Fix L1 table memory allocation
Contrary to what one could expect, the size of L1 tables is not clusteraligned. So as we're writing whole sectors now instead of single entries,we need to ensure that the L1 table in memory is large enough; otherwise...
Make sure to mark MCE defines as ULL
Fixes build on 32-bit
usb-ohci: Fix endianness issue
This fixes a possible endianness issue in the usb-ohci hw module.hcca.frame and ohci->frame_number are 16bit, so use cpu_to_le16().
Signed-off-by: Michael Buesch <mb@bu3sch.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-io: better input validation for vector-based commands
Fix up a couple of issues with validating the input of the variouslength arguments for the vectored I/O commands:
- do the alignment check on each length instead the always 0 count argument - use a long long varibale for the cvtnum return value so that we can check...
qemu-io: add flag to mark files growable
Add a -g flag to the open command and the main qemu-io command line toallow opening a file growable. This is only allowed for protocols,mirroring the limitation exposed through bdrv_file_open.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
qemu-io: fix memory leak
qemu-io leaks the request buffer whenever the read or write function isn'texecuted completely down the "normal" code path.
[hch: also fix the aio and vectored variants the same way]
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...