summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2009-06-15Incorporate changes from v2 of Gleb's RTC reset patchAnthony Liguori1-4/+8
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-15etrax: Don't pass CPUState to peripherals.Edgar E. Iglesias6-20/+10
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-06-14Add rtc reset function.Gleb Natapov1-0/+19
On reset: Periodic Interrupt Enable (PIE) bit is cleared to zero Alarm Interrupt Enable (AIE) bit is cleared to zero Update ended Interrupt Flag (UF) bit is cleared to zero Interrupt Request status Flag (IRQF) bit is cleared to zero Periodic Interrupt Flag (PF) bit is cleared to zero Alarm Interrupt Flag (AF) bit is cleared to zero Square Wave output Enable (SQWE) zero Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-13Add static to local machine declaration.Stefan Weil1-1/+1
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>
2009-06-13Don't use cpu_index as apic_id.Gleb Natapov3-13/+40
(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 incorrect since apic ids not have to be continuous (they can also encode cpu hierarchy information). This patch uses cpuid_apic_id for initial apic id value. For now cpuid_apic_id is set to be equal to cpu_index so behaviour is fully backward compatible, but it allows us to add qemu option to provide other values for cpu apic id. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-13Apic creation should not depend on pciGleb Natapov1-8/+2
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>
2009-06-13Add -no-virtio-balloon command-line optionEduardo Habkost1-1/+1
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>
2009-06-13Fix SDL include path.Stefan Weil1-1/+1
SDL header files can be included in two different ways: * like this: #include <SDL/SDL.h> * like this: #include <SDL.h> The 1st alternative is simple and works in many cases. The 2nd alternative needs sdl-config to get the correct compiler flags. It is the recommended way to write SDL includes and standard for QEMU. The patch fixes two non-standard SDL includes. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-13Avoid a gcc 3 format warningBlue Swirl2-12/+4
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-13Avoid gcc 4.4 warning about uninitialized fieldBlue Swirl1-0/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-13Fix signedness problemsBlue Swirl1-3/+3
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-13xen nic: check tx queue after connect.Gerd Hoffmann1-0/+2
Needed for savevm/loadvm + migration: In that case the queue might already have packets on (re-)connect. The guest wouldn't notify us because notifications are only sent when stuffing a packet into an empty queue. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-13include inttypes.h in xen.hGerd Hoffmann1-0/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-13xen: adapt to qemu_machine changesGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-13xen_disk: move sanity check to the correct placeGerd Hoffmann1-4/+5
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-12ETRAX: DMA fixes for 64bit hosts.Edgar E. Iglesias1-26/+25
Mainly to remove warnings. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-06-11ETRAX: Correct PIC creation for the bare FS board.Edgar E. Iglesias1-2/+7
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-06-11qdev: move name+size into DeviceInfo (v2)Gerd Hoffmann27-61/+95
Rationale: move device information from code to data structures. v2: Adapt the drivers missed in the first version. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-11Fix stellaris ethernetPaul Brook1-2/+2
Revert bogus part of e3f5ec2b (pass VLANClientState* as first arg to receive handlers) Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-06-11Fix xilinx_ethlite breakage by 4f1c942b7fJan Kiszka1-8/+8
Namely the new xilinx_ethlite used by mircoblaze. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2009-06-10Merge branch 'net-queue'Anthony Liguori18-175/+299
* net-queue: (28 commits) virtio-net: Increase filter and control limits virtio-net: Add new RX filter controls virtio-net: MAC filter optimization virtio-net: Fix MAC filter overflow handling virtio-net: reorganize receive_filter() virtio-net: Use a byte to store RX mode flags virtio-net: Add version_id 7 placeholder for vnet header support virtio-net: implement rx packet queueing net: make use of async packet sending API in tap client net: add qemu_send_packet_async() net: split out packet queueing and flushing into separate functions net: return status from qemu_deliver_packet() net: add return value to packet receive handler net: pass VLANClientState* as first arg to receive handlers net: re-name vc->fd_read() to vc->receive() net: add fd_readv() handler to qemu_new_vlan_client() args net: only read from tapfd when we can send net: vlan clients with no fd_can_read() can always receive net: move the tap buffer into TAPState net: factor tap_read_packet() out of tap_send() ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-09Fix Sparse warningBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09Remove unused and misnamed field and variableBlue Swirl2-10/+0
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09Update irqs on reset and device loadBlue Swirl2-1/+11
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09Register reset functions for e1000 and rtl8139Blue Swirl2-8/+17
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-09virtio-net: Increase filter and control limitsAlex Williamson1-2/+2
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 be needed by at least one guest user. Increasing the control queue depth allows a guest to feed several commands back to back if they so desire rather than using the send and wait approach Linux uses. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: Add new RX filter controlsAlex Williamson2-8/+46
Add a few new RX modes to better control the receive_filter. These are all fairly obvious features that hardware could provide. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: MAC filter optimizationAlex Williamson1-4/+25
The MAC filter table is received from the guest as two separate buffers, one with unicast entries, the other with multicast entries. If we track the index dividing the two sets, we can avoid searching the part of the table with the wrong type of entries. We could store this index as part of the save image, but its trivially easy to discover it on load. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: Fix MAC filter overflow handlingAlex Williamson1-8/+23
Overloading the promisc and allmulti flags for indicating filter table overflow makes it difficult to track the actual requested operating mode. Split these out into separate flags. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: reorganize receive_filter()Alex Williamson1-8/+11
Reorganize receive_filter to better handle the split between unicast and multicast filtering. This allows us to skip the broadcast check on unicast packets and leads to more opportunities for optimization. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: Use a byte to store RX mode flagsAlex Williamson1-7/+12
There's no need to save 4 bytes for promisc and allmulti. Use one byte each just to avoid the overhead of a bitmap. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: Add version_id 7 placeholder for vnet header supportAlex Williamson1-1/+8
Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09virtio-net: implement rx packet queueingMark McLoughlin1-1/+4
If we don't have room to receive a packet, we return zero from virtio_net_receive() and call qemu_flush_queued_packets() as soon as space becomes available. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09net: add return value to packet receive handlerMark McLoughlin15-65/+94
This allows us to handle queue full conditions rather than dropping the packet on the floor. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09net: pass VLANClientState* as first arg to receive handlersMark McLoughlin15-67/+67
Give static type checking a chance to catch errors. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09net: re-name vc->fd_read() to vc->receive()Mark McLoughlin16-25/+25
VLANClientState's fd_read() handler doesn't read from file descriptors, it adds a buffer to the client's receive queue. Re-name the handlers to make things a little less confusing. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09net: add fd_readv() handler to qemu_new_vlan_client() argsMark McLoughlin16-22/+24
This, apparently, is the style we prefer - all VLANClientState should be an argument to qemu_new_vlan_client(). Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-09net: Improve parameter error reportingJan Kiszka1-3/+4
As host network devices can also be instantiated via the monitor, errors should then be reported to the related monitor instead of stderr. This requires larger refactoring, so this patch starts small with introducing a helper to catch both cases and convert net_client_init as well as net_slirp_redir. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com>
2009-06-08qdev: c99 initilaizers for bus_type_namesGerd Hoffmann1-5/+5
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-08xen nic: use XC_PAGE_SIZE instead of PAGE_SIZE.Gerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-08xen nic: use qemu_mallocGerd Hoffmann1-2/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-06xen: net backend doesn't need linux headers.Gerd Hoffmann1-2/+0
Drop them to make qemu build on OpenSolaris. Cc: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-06Fix typoPaul Brook1-1/+1
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-06-05qdev: add monitor command to dump the tree.Gerd Hoffmann3-0/+90
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-06-05Record device property typesPaul Brook5-19/+77
Record device property types, and provide a list of properties at device registration time. Add a "device" property type that holds a reference to annother device. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-06-04Remove ARM NVIC initialization hackPaul Brook2-6/+1
The ARMv7-M NVIC device pokes itself into the CPU state. Now we have a proper device model we can have the CPU/SoC code do this. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-06-04qdev: kill DeviceState->nameGerd Hoffmann2-3/+1
is redundant with DeviceState->type->name Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-03microblaze: Fix loading of petalogix s3adsp1800 dtb.Edgar E. Iglesias1-9/+11
Provide a petalogix-s3adsp1800.dtb blob. Correct loading of the petalogix dtb. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-06-03Stellaris qdev conversionPaul Brook4-51/+97
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-06-02Implement multiple samplers on stellaris ADCPaul Brook1-19/+31
Signed-off-by: Paul Brook <paul@codesourcery.com>