Introduce -smp , maxcpus= flag to specify maximum number of CPUS.
Follow on patch will use it to determine the size of the MADT andother BIOS tables.
Signed-off-by: Jes Sorensen <jes@sgi.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu: msix nit: clear msix_entries_nr on error
I don't think it's critical to do this, but it'sbest to keep uninit and error recovery consistent.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
kill drives_table
First step cleaning up the drives handling. This one does nothing butremoving drives_table[], still it became seriously big.
drive_get_index() is gone and is replaced by drives_get() which handsout DriveInfo pointers instead of a table index. This needs adaption in...
kill drives_opt
cleanup pretty simliar to the drives_table removal patch: - drop the table and make a linked list out of it. - pass around struct pointers instead of table indices.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
switch -drive to QemuOpts.
Demo QemuOpts in action ;)
Implementing a alternative way to specify the filename should bejust a few lines of code now once we decided how the cmd line syntaxshould look like.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
HPET fixes for reg writes
This patch addresses the problems found by Andriy Gapon:
- The code was incorrectly overwriting the high order 32 bits of the timer and hpet config registers. This didn't show up in testing because linux and windows use hpet in legacy mode,...
qdev/pci: hook up i440fx.
Hook i44fx pcihost into sysbus.Convert Host bridge and ISA bridge pci devices to qdev.Tag as no-user.
qdev/prop: add pci devfn property
So we can parse "$slot.$fn" strings into devfn numbers.
qdev/pci: use qdev_prop_pci_devfn
Put the new property into use.
qdev: create default bus names.
Create a default bus name if none is passed to qbus_create().
If the parent device has DeviceState->id set it will be used to createthe bus name,. i.e. -device lsi,id=foo will give you a scsi bus named"foo.0".
If there is no id BusInfo->name (lowercased) will be used instead, i.e....
qdev: bus walker + qdev_device_add()
This patch implements a parser and qdev tree walker for bus paths andadds qdev_device_add on top of this.
A bus path can be: (1) full path, i.e. /i440FX-pcihost/pci.0/lsi/scsi.0 (2) bus name, i.e. "scsi.0". Best used together with id= to make...
Add machine type aliases
Add an 'alias' field to QEMUMachine and display it in the output of'qemu -M ?' with an '(aliased to foo)' suffix.
Aliases can change targets in newer versions of qemu, so management toolsmay choose canonicalize machine types to ensure that if a user chooses an...
Add a pc-0.11 machine type and make the pc type an alias
The pc-0.11 type allows users of qemu-0.11 to use a machine type whichthey know will remain compatible when the upgrade to qemu-0.12.
Management tools may choose to canonicalize the 'pc' machine type to...
Give the kernel more room
My self-built PPC kernel doesn't fit in the region reserved forthe kernel, so I can't use -kernel with it.
Let's just extend the region.
Signed-off-by: Alexander Graf <agraf@suse.de>
PPC: Round VGA BIOS size to page boundary
When giving KVM a slot of a size not on page boundary, it chokes. So let'sjust round up the VGA BIOS size so nobody complains anymore and we don't needto implement sub-page slots.
Required for booting a PPC guest in KVM....
notify io_thread at the end of rx handling
This is a backport from qemu-kvm. Just instead of using kvm's specificnotification mechanism, we use qemu_notify_event()
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add save/restore support to the LSI logic SCSI device model.
This patch requires "Handle BH's queued by AIO completions inqemu_aio_flush()" to work reliably. The combination of those twopatches survived 300+ migrations with heavy IO load running in the...
Sparc32: convert Sun4c interrupt controller to qdev
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Sparc32: convert SBI to qdev
Sparc32/64: use 64 bit type for memory size
qdev: add 64 bit type
Sparc64: refactor kernel init
Sparc64: refactor CPU init
Sparc64: convert memory to qdev
Sparc64: convert boot prom to qdev
Sparc32: Fix lance
Sparc64: convert APB to qdev
Thanks to Igor Kovalenko for a bugfix.
Fix most warnings (errors with -Werror) when debugging is enabled
I used the following command to enable debugging:perl -p -i -e 's/^\/\/#define DEBUG/#define DEBUG/g' * /* *//*
Fix build with DEBUG_PCI in pci_host.h enabled
Clean up fdc qdev conversion
isxdigit -> qemu_isxdigit
Hi!
Attached patch uses qemu_isxdigit() instead of isxdigit().Fixes build warning on NetBSD.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
-----to satisfy European Law for business letters:Advanced Micro Devices GmbH...
Suppress a Sparse warning
Move the export to a file used by both qdev.c and sysbus.c.
Sparc32: use hex for version numbers
0x10000000 looks better than 268435456.
Sparc32: fix escc devices broken by ee6847d19be16c789b8bd4e553b7cd6701ba1245
The logic of Zilog makes channel B the first device and channel A thesecond one.
Sparc32: fix fdc io_base
On some Sparc32 machines, fdc is located above 4G limit, so uint32_t is notappropriate type for io_base.
Fix sparc-softmmu breakage by ee6847d19be16c789b8bd4e553b7cd6701ba1245
Move the qdev_init(dev); call after the setting of d->size.Thanks to Filip Navara.
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....
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.
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.
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>
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.
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>...
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>
Update to a hopefully more future proof FSF address
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
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.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add qemu_unregister_reset
Will be used by '-boot once=...', and should also help in other usecases.
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'.
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>
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
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: 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
Sparc64: convert ebus to qdev
Sparc32: convert eccmemctl to qdev
sparc64: really initialize irq
Allocate irq just before passing it to pci bridge initializationand actually use it to initialize pci bridge.
Signed-off-by: igor.v.kovalenko@gmail.com
--Kind regards,Igor V. Kovalenko
Fix PCI IRQ breakage
Zero initialize the PCI bus irq count.
Signed-off-by: Paul Brook <paul@codesourcery.com>
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.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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.
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.
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>
Unregister savevm callback in eeprom93xx_free()
Otherwise if you hot remove an eepro100 NIC and then migrate,you get:
Unknown savevm section or instance 'eeprom' 0
on the destination side.
fix segfault in msix_save
This fixes segfault reported by Kevin Wolf,and simplifies the code in msix_save.
Reported-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu: remove control vector save
control vector is saved/restored by virtio-pci,it does not belong in virtio.
Don't leak VLANClientState on PCI hot remove
destroy_nic() requires that NICInfo::private by a PCIDevice pointer,but then goes on to require that the same pointer matchesVLANClientState::opaque.
That is no longer the case for virtio-net since qdev and wasn't...
use constant IOPORTS_MASK instead of 0xffff.
split out ioport related stuffs from vl.c into ioport.c.
qdev: replace bus_type enum with bus_info struct.
BusInfo is filled with name and size (pretty much like I did forDeviceInfo as well). There is also a function pointer to printbus-specific device information to the monitor. sysbus is hookedup there, I've also added a print function for PCI....
qdev: remove DeviceType
The only purpose DeviceType serves is creating a linked list ofDeviceInfo structs. This removes DeviceType and add a next field toDeviceInfo instead, so the DeviceInfo structs can be changed that way.Elimitates a pointless extra level of indirection....
qdev/pci: misc fixes.
qdev: convert es1370.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qdev: convert ac97.