Call piix4_reset() on system reset.
Also zero pci_irq_levels on reset to avoid stuck irq after reset.
Based on 15a1956af94e36105494f782a752698103addf63 by Gleb Natapov.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Don't set IRQs on device reset and loadvm/savevm
Call piix3_reset() on system reset.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Yaniv Kamay <ykamay@redhat.com>
Register usb-uhci reset function.
The device is not reset on system reset currently.Without this patch RHEL4.8 hangs after reboot if -usbdevice tableis in use.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Revert "Update irqs on reset and device load"
This reverts commit 3dcd219f09d6c1817bf9a132899e6b925f7a0914.
It is incorrect to call qemu_irq functions (or any other functions thataccess other device state) during savevm/loadvm.
Allow user to specify CPU model
Fix vga_screen_dump_blank() PPM generation
vga_screen_dump_blank() was not generating a valid PPM file: the width of theimage made no sense (why it was multiplied by sizeof(uint32_t)?), and there wasonly one sample per pixel, instead of three.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>...
Prevent CD-ROM media eject while device is locked
Section 10.8.25 ("START/STOP UNIT Command") of SFF-8020i states thatif the device is locked we should refuse to eject if the device islocked.
ASC_MEDIA_REMOVAL_PREVENTED is the appropriate return in this case....
pci: add define for communication class devices
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
lsi53c895a: Implement write access to DMA Byte Counter
Adds CASE_SET_REG24 and fixes the following errors:
lsi_scsi: error: Unhandled writeb 0x24 = 0x0lsi_scsi: error: Unhandled writeb 0x25 = 0x0
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio blk: fix warning.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Rename pci_register_io_region() to pci_register_bar()
This function is used to manage a PCI BAR, so make the more genericpci_register_io_region() available to other uses.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
lsi53c895a: Implement Scratch Byte Register
Fixes the following errors:
lsi_scsi: error: Unhandled writeb 0x3a = 0x0lsi_scsi: error: readb 0x3a
lsi53c895a: Implement read and write access to DMA Next Address
lsi_scsi: error: Unhandled writeb 0x28 = 0x0lsi_scsi: error: Unhandled writeb 0x29 = 0x0lsi_scsi: error: Unhandled writeb 0x2a = 0x0lsi_scsi: error: Unhandled writeb 0x2b = 0x0...
Remove io_index argument from cpu_register_io_memory()
The parameter is always zero except when registering the three internalio regions (ROM, unassigned, notdirty). Remove the parameter to reducethe API's power, thus facilitating future change.
Signed-off-by: Avi Kivity <avi@redhat.com>...
qdev: Fix regression in "pci_add ... storage if=virtio, ..."
qemu_pci_hot_add_storage() runs qdev_init() twice. Broken in commit07e3af9a "Virtio-blk qdev conversion".
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Incorporate changes from v2 of Gleb's RTC reset patch
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
etrax: Don't pass CPUState to peripherals.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Add rtc reset function.
On reset:Periodic Interrupt Enable (PIE) bit is cleared to zeroAlarm Interrupt Enable (AIE) bit is cleared to zeroUpdate ended Interrupt Flag (UF) bit is cleared to zeroInterrupt Request status Flag (IRQF) bit is cleared to zero...
Add static to local machine declaration.
Variable akitapda_machine is only used locally,so the static attribute avoids a compiler warning.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Don't use cpu_index as apic_id.
(patch is on top of "Apic creation should not depend on pci" series)
Currently cpu_index is used as cpu apic id on x86. This is incorrectsince apic ids not have to be continuous (they can also encode cpuhierarchy information). This patch uses cpuid_apic_id for initial apic id...
Apic creation should not depend on pci
It should depend on whether cpu has APIC.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add -no-virtio-balloon command-line option
This new option may be used to disable the virtio-balloon device.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix SDL include path.
SDL header files can be included in two different ways:
The 1st alternative is simple and works in many cases.
The 2nd alternative needs sdl-config to get thecorrect compiler flags. It is the recommended way...
Avoid a gcc 3 format warning
Avoid gcc 4.4 warning about uninitialized field
Fix signedness problems
xen nic: check tx queue after connect.
Needed for savevm/loadvm + migration: In that case the queue mightalready have packets on (re-)connect. The guest wouldn't notify usbecause notifications are only sent when stuffing a packet into anempty queue....
include inttypes.h in xen.h
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xen: adapt to qemu_machine changes
xen_disk: move sanity check to the correct place
ETRAX: DMA fixes for 64bit hosts.
Mainly to remove warnings.
ETRAX: Correct PIC creation for the bare FS board.
qdev: move name+size into DeviceInfo (v2)
Rationale: move device information from code to data structures.
v2: Adapt the drivers missed in the first version.
Fix stellaris ethernet
Revert bogus part of e3f5ec2b(pass VLANClientState* as first arg to receive handlers)
Signed-off-by: Paul Brook <paul@codesourcery.com>
Fix xilinx_ethlite breakage by 4f1c942b7f
Namely the new xilinx_ethlite used by mircoblaze.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Merge branch 'net-queue'
Fix Sparse warning
Remove unused and misnamed field and variable
Update irqs on reset and device load
Register reset functions for e1000 and rtl8139
virtio-net: implement rx packet queueing
If we don't have room to receive a packet, we return zerofrom virtio_net_receive() and call qemu_flush_queued_packets()as soon as space becomes available.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
virtio-net: Add version_id 7 placeholder for vnet header support
Signed-off-by: Alex Williamson <alex.williamson@hp.com>Signed-off-by: Mark McLoughlin <markmc@redhat.com>
virtio-net: Use a byte to store RX mode flags
There's no need to save 4 bytes for promisc and allmulti.Use one byte each just to avoid the overhead of a bitmap.
virtio-net: reorganize receive_filter()
Reorganize receive_filter to better handle the split betweenunicast and multicast filtering. This allows us to skip thebroadcast check on unicast packets and leads to more opportunitiesfor optimization.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>...
virtio-net: Fix MAC filter overflow handling
Overloading the promisc and allmulti flags for indicating filtertable overflow makes it difficult to track the actual requestedoperating mode. Split these out into separate flags.
virtio-net: MAC filter optimization
The MAC filter table is received from the guest as two separatebuffers, one with unicast entries, the other with multicastentries. If we track the index dividing the two sets, we canavoid searching the part of the table with the wrong type of...
virtio-net: Add new RX filter controls
Add a few new RX modes to better control the receive_filter. Theseare all fairly obvious features that hardware could provide.
virtio-net: Increase filter and control limits
Increase the size of the perfect filter table and control queue depth.This should give us more headroom in the MAC filter and is known to beneeded by at least one guest user. Increasing the control queue depth...
net: Improve parameter error reporting
As host network devices can also be instantiated via the monitor, errorsshould then be reported to the related monitor instead of stderr. Thisrequires larger refactoring, so this patch starts small with introducing...
net: add fd_readv() handler to qemu_new_vlan_client() args
This, apparently, is the style we prefer - all VLANClientStateshould be an argument to qemu_new_vlan_client().
net: re-name vc->fd_read() to vc->receive()
VLANClientState's fd_read() handler doesn't read from filedescriptors, it adds a buffer to the client's receive queue.
Re-name the handlers to make things a little less confusing.
net: pass VLANClientState* as first arg to receive handlers
Give static type checking a chance to catch errors.
net: add return value to packet receive handler
This allows us to handle queue full conditions rather than droppingthe packet on the floor.
qdev: c99 initilaizers for bus_type_names
xen nic: use XC_PAGE_SIZE instead of PAGE_SIZE.
xen nic: use qemu_malloc
xen: net backend doesn't need linux headers.
Drop them to make qemu build on OpenSolaris.
Cc: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Fix typo
qdev: add monitor command to dump the tree.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Paul Brook <paul@codesourcery.com>
Record device property types
Record device property types, and provide a list of properties at deviceregistration time.
Add a "device" property type that holds a reference to annother device.
Remove ARM NVIC initialization hack
The ARMv7-M NVIC device pokes itself into the CPU state. Now we have aproper device model we can have the CPU/SoC code do this.
qdev: kill DeviceState->name
is redundant with DeviceState->type->name
microblaze: Fix loading of petalogix s3adsp1800 dtb.
Provide a petalogix-s3adsp1800.dtb blob.Correct loading of the petalogix dtb.
Stellaris qdev conversion
Implement multiple samplers on stellaris ADC
Use relative path for bios
Look for bios and other support files relative to qemu binary, rather thana hardcoded prefix.
Allow monitor interaction when using migrate -exec
All, I've recently been playing around with migration via exec. Unfortunately,when starting the incoming qemu process with "-incoming exec:cmd", it suffersthe same problem that -incoming tcp used to suffer; namely, that you can't...
e1000: Ignore reset command
When a reset is requested, the current e1000 emulation never clears thereset bit which may cause a driver to hang. This patch masks the resetbit out when setting the control registert, so the reset is immediatelycompleted....
microblaze: Conditionalize FDT features.
If libfdt is not available, disable the fdt manipulation features.
microblaze: Add petalogix s3a1800dsp MMU linux ref-design.
This setup was designed by petalogix and is supported by upstream linux.The design targets a xilinx spartan-3a-1800 dsp board with MMU.
xilinx: Add ethlite emulation.
xilinx: Add uartlite emulation.
xilinx: Add OPB timer.
microblaze: Add CPU interrupt wrapper logic.
xilinx: Add interrupt controller.
Remove qdev irq sink handling
We have both IRQ sinks and GPIO inputs. These are in principle exactlythe same thing, so remove the former.
ETRAX: Removed unused struct entry and fixed Windows build.
"struct timeval last" caused a compilation error with mingw32(missing header for struct timeval).
It is unused, so it was possible to remove it.
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>...
Add common BusState
Implement and use a common device bus state. The main side-effect isthat creating a bus and attaching it to a parent device are no longerseparate operations. For legacy code we allow a NULL parent, but thatshould go away eventually....
Fix lance segfaults
serial: fix lost character after sysrq
After creating an automated regression test to test the sysrqresponses while running a linux image in qemu, I found that thesimulated uart was eating the character right after the sysrq about75% of the time.
The problem is that the qemu sets the LSR_DR (data ready) bit on a...
Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks onregistration. On system reset, callbacks with lower order will beinvoked before those with higher order. Update all existing users to thestandard order 0....
usb-serial: implement break event.
Implement the serial break via usb serial.
The second data byte in ftdi status packet contains the break status.The values were already defined in usb-serial.c so it was a matter ofmaking use of the event_trigger to form a urb to send over to the host...
kvm: Fix framebuffer dirty log sync
kvm_physical_sync_dirty_bitmap() takes the end address as secondargument, not the region size. Moverover, the kvm API should not be useddirectly here, but cpu_physical_sync_dirty_bitmap().
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
introduce set_rate_limit function for QEMUFile
This patch converts the current callers of qemu_fopen_ops().
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Refactor how display drivers are selected
My previous commit, f92f8afebe, broke -vnc (spotted by Glauber Costa). Thisis because it's necessary to tell when the no special display parameters havebeen passed and default to SDL or VNC appropriately.
This refactors the display selection logic to be less complicated which has...
Introduce is_default field for QEMUMachine
f80f9ec changed the order that machines are registered which had the effect ofchanging the default machine. This changeset introduces a new is_default fieldso that machine types can declare that they are the default for an architecture....
Compile most Xen files only once
Compile fdc, escc and SCSI controllers only once
Let the venomous poison spread to more identifiers
Convert machine registration to use module init functions
This cleans up quite a lot of #ifdefs, extern variables, and other ugliness.
Remove initrd warning message
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
keep initrd in below 4g area.
initrd must be kept on the memory area below 4g. By not doing this,we're seeing guests break while using -initrd and values of -memsuperior to 4096.
Signed-off-by: Glauber Costa <glommer@redhat.com>
Remove dead code
Signed-off-by: malc <av1474@comtv.ru>
Hardware convenience library
The only target dependency for most hardware is sizeof(target_phys_addr_t).Build these files into a convenience library, and use that instead ofbuilding for every target.
Remove and poison various target specific macros to avoid bogus target...
Disable >4G ram support on 32-bit targets
If the target only has a 32-bit physical address space thenthe code to map >4G ram breaks horribly, and causes compiler warnings.
Remove obsolete BIOS_SIZE from sysemu.h
BIOS_SIZE is no longer needed by vl.c, so there's no point having it insysemu.h.
cris: First shot at qdev for CRIS interrupts.
etrax: Don't keep the passed irq pointer.
Copy passed irq object at channel connect.
etrax: Remove unused eth irq line.
The ethernet blocks irq line to report errors is unimplemented in QEMU.Remove it for now.