#
83f7d43a |
| 09-Feb-2012 |
Andreas Färber <afaerber@suse.de> |
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add pr
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace.
Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
39bffca2 |
| 08-Dec-2011 |
Anthony Liguori <aliguori@us.ibm.com> |
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touch
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touching every file in the tree.
The first step was a sed-based addition of the parent type to the subclass registration functions.
The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate.
Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls.
We are almost fully converted to QOM after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
40021f08 |
| 04-Dec-2011 |
Anthony Liguori <aliguori@us.ibm.com> |
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
#
f79f2bfc |
| 04-Dec-2011 |
Anthony Liguori <aliguori@us.ibm.com> |
qdev: don't access name through info
We already have a QOM interface for this so let's use it.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
#
30fbb9fc |
| 04-Dec-2011 |
Anthony Liguori <aliguori@us.ibm.com> |
qdev: move qdev->info to class
Right now, DeviceInfo acts as the class for qdev. In order to switch to a proper ObjectClass derivative, we need to ween all of the callers off of interacting directl
qdev: move qdev->info to class
Right now, DeviceInfo acts as the class for qdev. In order to switch to a proper ObjectClass derivative, we need to ween all of the callers off of interacting directly with the info pointer.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
b1927cf1 |
| 24-Jan-2012 |
Jan Kiszka <jan.kiszka@siemens.com> |
e1000: Preserve link state across device reset
A device reset does not affect the link state, only set_link does.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <
e1000: Preserve link state across device reset
A device reset does not affect the link state, only set_link does.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
show more ...
|
#
65f82df0 |
| 23-Jan-2012 |
Anthony Liguori <aliguori@us.ibm.com> |
e1000: bounds packet size against buffer size
Otherwise we can write beyond the buffer and corrupt memory. This is tracked as CVE-2012-0029.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
#
00c3a05b |
| 04-Nov-2011 |
David Gibson <david@gibson.dropbear.id.au> |
Remove unnecessary casts from PCI DMA code in e1000
This patch removes some unnecessary casts in the e1000 device, introduced by commit 62ecbd353d25e62c4a6c327ea88ba5404e13507a 'e1000: Use PCI DMA s
Remove unnecessary casts from PCI DMA code in e1000
This patch removes some unnecessary casts in the e1000 device, introduced by commit 62ecbd353d25e62c4a6c327ea88ba5404e13507a 'e1000: Use PCI DMA stub functions'.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
62ecbd35 |
| 31-Oct-2011 |
Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> |
e1000: Use PCI DMA stub functions
This updates the e1000 device emulation to use the explicit PCI DMA functions, instead of directly calling physical memory access functions.
Signed-off-by: Eduard
e1000: Use PCI DMA stub functions
This updates the e1000 device emulation to use the explicit PCI DMA functions, instead of directly calling physical memory access functions.
Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
dd8e9379 |
| 21-Sep-2011 |
dann frazier <dann.frazier@canonical.com> |
e1000: Don't set the Capabilities List bit
[Originally sent to qemu-kvm list, but I was redirected here]
The Capabilities Pointer is NULL, so this bit shouldn't be set. The state of this bit doesn'
e1000: Don't set the Capabilities List bit
[Originally sent to qemu-kvm list, but I was redirected here]
The Capabilities Pointer is NULL, so this bit shouldn't be set. The state of this bit doesn't appear to change any behavior on Linux/Windows versions we've tested, but it does cause Windows' PCI/PCI Express Compliance Test to balk.
I happen to have a physical 82540EM controller, and it also sets the Capabilities Bit, but it actually has items on the capabilities list to go with it :)
Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
817e0b6f |
| 11-Sep-2011 |
Michael S. Tsirkin <mst@redhat.com> |
pci: interrupt pin documentation update
Fix up some erroneous comments in code: interrupt pins are named A-D, the interrupt pin register is always readonly and isn't zeroed out on reset.
Signed-off
pci: interrupt pin documentation update
Fix up some erroneous comments in code: interrupt pins are named A-D, the interrupt pin register is always readonly and isn't zeroed out on reset.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
d4044c2a |
| 17-Aug-2011 |
Bjørn Mork <bjorn@mork.no> |
e1000: use MII status register for link up/down
Some guests will use the standard MII status register to verify link state. They will not notice link changes unless this register is updated.
Verif
e1000: use MII status register for link up/down
Some guests will use the standard MII status register to verify link state. They will not notice link changes unless this register is updated.
Verified with Linux 3.0 and Windows XP guests.
Without this patch, ethtool will report speed and duplex as unknown when the link is down, but still report the link as up. This is because the Linux e1000 driver checks the mac_reg[STATUS] register link state before it checks speed and duplex, but uses the phy_reg[PHY_STATUS] register for the actual link state check. Fix by updating both registers on link state changes.
Linux guest before:
(qemu) set_link e1000.0 off
kvm-sid:~# ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: Unknown! Duplex: Unknown! (255) Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: on MDI-X: Unknown Supports Wake-on: umbg Wake-on: d Current message level: 0x00000007 (7) drv probe link Link detected: yes
(qemu) set_link e1000.0 on
Linux guest after:
(qemu) set_link e1000.0 off [ 63.384221] e1000: eth0 NIC Link is Down
kvm-sid:~# ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Speed: Unknown! Duplex: Unknown! (255) Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: on MDI-X: Unknown Supports Wake-on: umbg Wake-on: d Current message level: 0x00000007 (7) drv probe link Link detected: no
(qemu) set_link e1000.0 on [ 84.304582] e1000: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
e824b2cc |
| 08-Aug-2011 |
Avi Kivity <avi@redhat.com> |
pci: rename pci_register_bar_region() to pci_register_bar()
Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.
pci: rename pci_register_bar_region() to pci_register_bar()
Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
ad00a9b9 |
| 08-Aug-2011 |
Avi Kivity <avi@redhat.com> |
e1000: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Lig
e1000: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
e72d5c9d |
| 25-May-2011 |
Isaku Yamahata <yamahata@valinux.co.jp> |
hw/e1000.c: convert to PCIDeviceInfo to initialize ids
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
#
5ee8ad71 |
| 18-Apr-2011 |
Alex Williamson <alex.williamson@redhat.com> |
PXE: Use consistent naming for PXE ROMs
And add missing ROMs to tarbin build target.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
|
#
d17161f6 |
| 26-Mar-2011 |
Kevin Wolf <mail@kevin-wolf.de> |
e1000: Mask out lower bits of RDBAL/TDBAL
Rx and Tx descriptors are 16 byte aligned, so the lower bits are ignored by real hardware. In fact, they always read back as zero on real hardware, but prob
e1000: Mask out lower bits of RDBAL/TDBAL
Rx and Tx descriptors are 16 byte aligned, so the lower bits are ignored by real hardware. In fact, they always read back as zero on real hardware, but probably nobody relies on that.
Signed-off-by: Kevin Wolf <mail@kevin-wolf.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
show more ...
|
#
6cdfab28 |
| 27-Mar-2011 |
Michael S. Tsirkin <mst@redhat.com> |
e1000: check buffer availability
Reduce spurious packet drops on RX ring empty by verifying that we have at least 1 buffer ahead of the time.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
#
735e77ec |
| 07-Mar-2011 |
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> |
e1000: Fix multi-descriptor packet checksum offload
The PCI/PCI-X Family of Gigabit Ethernet Controllers Software Developer’s Manual states the following about the POPTS field:
Provides a number
e1000: Fix multi-descriptor packet checksum offload
The PCI/PCI-X Family of Gigabit Ethernet Controllers Software Developer’s Manual states the following about the POPTS field:
Provides a number of options which control the handling of this packet. This field is ignored except on the first data descriptor of a packet.
The current implementation always loads the field and its checksum offload flags. This patch uses only the first descriptor's POPTS field in order to comply with the specification.
When Solaris sends multi-descriptor packets it fills in POPTS for the first descriptor only. Therefore this patch is necessary in order to perform checksum offload correctly for multi-descriptor packets.
Reported-by: Daniel Pecka <dpecka@techniservit.cz> Reported-by: Gabriele A. Trombetti <gabriele.trombetti@itb.cnr.it> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
show more ...
|
#
322fd48a |
| 15-Feb-2011 |
Michael S. Tsirkin <mst@redhat.com> |
e1000: verify we have buffers, upfront
The spec says: Any descriptor with a non-zero status byte has been processed by the hardware, and is ready to be handled by the software.
Thus, once we change
e1000: verify we have buffers, upfront
The spec says: Any descriptor with a non-zero status byte has been processed by the hardware, and is ready to be handled by the software.
Thus, once we change a descriptor status to non-zero we should never move the head backwards and try to reuse this descriptor from hardware.
This actually happened with a multibuffer packet that arrives when we don't have enough buffers.
Fix by checking that we have enough buffers upfront so we never need to discard the packet midway through.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
show more ...
|
#
ee912ccf |
| 15-Feb-2011 |
Michael S. Tsirkin <mst@redhat.com> |
e1000: clear EOP for multi-buffer descriptors
The e1000 spec says: if software statically allocates buffers, and uses memory read to check for completed descriptors, it simply has to zero the status
e1000: clear EOP for multi-buffer descriptors
The e1000 spec says: if software statically allocates buffers, and uses memory read to check for completed descriptors, it simply has to zero the status byte in the descriptor to make it ready for reuse by hardware. This is not a hardware requirement (moving the hardware tail pointer is), but is necessary for performing an in–memory scan.
Thus the guest does not have to clear the status byte. In case it doesn't we need to clear EOP for all descriptors except the last. While I don't know of any such guests, it's probably a good idea to stick to the spec.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reported-by: Juan Quintela <quintela@redhat.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
show more ...
|
#
b19487e2 |
| 15-Feb-2011 |
Michael S. Tsirkin <mst@redhat.com> |
e1000: multi-buffer packet support
e1000 supports multi-buffer packets larger than rxbuf_size.
This fixes the following (on linux): - in guest: ifconfig eth1 mtu 16110 - in host: ifconfig tap0 mtu
e1000: multi-buffer packet support
e1000 supports multi-buffer packets larger than rxbuf_size.
This fixes the following (on linux): - in guest: ifconfig eth1 mtu 16110 - in host: ifconfig tap0 mtu 16110 ping -s 16082 <guest-ip>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
show more ...
|
#
1ca4d09a |
| 08-Dec-2010 |
Gleb Natapov <gleb@redhat.com> |
Add bootindex parameter to net/block/fd device
If bootindex is specified on command line a string that describes device in firmware readable way is added into sorted list. Later this list will be pa
Add bootindex parameter to net/block/fd device
If bootindex is specified on command line a string that describes device in firmware readable way is added into sorted list. Later this list will be passed into firmware to control boot order.
Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
show more ...
|
#
32600a30 |
| 08-Dec-2010 |
Alexander Graf <agraf@suse.de> |
e1000: Make little endian
The e1000 has compatibility code to handle big endianness which makes it mandatory to be recompiled on different targets.
With the generic mmio endianness solution, there'
e1000: Make little endian
The e1000 has compatibility code to handle big endianness which makes it mandatory to be recompiled on different targets.
With the generic mmio endianness solution, there's no need for that anymore. We just declare all mmio to be little endian and call it a day.
Because we don't depend on the target endianness anymore, we can also move the driver over to Makefile.objs.
Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
show more ...
|
#
2507c12a |
| 08-Dec-2010 |
Alexander Graf <agraf@suse.de> |
Add endianness as io mem parameter
As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level.
This patch a
Add endianness as io mem parameter
As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level.
This patch adds a parameter to cpu_register_io_memory that allows a device to choose its endianness. For now, all devices simply choose native endian, because that's the same behavior as before.
Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
show more ...
|