History | View | Annotate | Download (37.1 kB)
e1000: Fix warning from code review
A code review run by Steve Grubb complained about code in e1000.c:
In hw/e1000.c at line 89, vlan is declared to be 4 bytes.At line 382 is an attempt to do a memmove over it with a size of 12.
This was fixed by splitting the memmove in two calls and...
savevm: Port to qdev.vmsd all devices that have qdev
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: convert e1000 to NICState
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
e1000 fix: read access to some registers is missing.
While writing working on an e1000 driver for my university's OS Inoticed that some registers aren't readable in QEMU, but they shouldbe readable as stated in Intels Driver Developer Manual (and alsoverified on real hardware)....
pci: introduce pcibus_t to represent pci bus address/size instead of uint32_t
This patch is preliminary for 64 bit BAR support.Introduce dedicated type, pcibus_t, to represent pci bus address/sizeinstead of uint32_t.Later this type will be changed to uint64_t....
pci: introduce FMT_PCIBUS for printf format for pcibus_t.
This patch is preliminary for 64bit BAR.Later pcibus_t will be changed from uint32_t to uint64_t.Introduce FMT_PCIBUS for printf format for pcibus_t.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.h
make constants for pci base address match pci_regs.h byrenaming PCI_ADDRESS_SPACE_xxx to PCI_BASE_ADDRESS_SPACE_xxx.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Michael S. Tsirkin <mst@redhat.com>...
v3: don't call reset functions on cpu initialization
There is absolutely no need to call reset functions when initializingdevices. Since we are already registering them, calling qemu_system_reset()should suffice. Actually, it is what happens when we reboot the machine,...
Remove e1000 rom loading hack
The gPXE rom supports BEV properly.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: move net-checksum.c under net/
Also add a new net/checksum.h header
e1000: unfold mac_reg_tosave array
e1000: unfold mac_regarraystosave array
e1000: port to vmstate
e1000: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: move unregister from PCIDevice to PCIDeviceInfo
One more cleanup while being at it ;)
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
e1000 cleanup
Remove un needed casts from void *.Use DO_UPCAST() instead of blind casts
qdev: add return value to init() callbacks.
Sorry folks, but it has to be. One more of these invasive qdev patches.
We have a serious design bug in the qdev interface: device initcallbacks can't signal failure because the init() callback has noreturn value. This patch fixes it....
Make CPURead/WriteFunc structure 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
e1000.c doesn't properly emulate EERD and ICS registers
Once again, the emulation of the EERD and ICS registers in e1000.c isincorrect. Nobody has noticed this before because none of the Intel-writtene1000 drivers use these registers, and all of the independently written open...
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....
Update to a hopefully more future proof FSF address
qdev: update pci device registration.
Makes pci_qdev_register take a PCIDeviceInfo struct instead of a bunchof parameters. Also adds config_read and config_write callbacks toPCIDeviceInfo, so drivers needing these can be converted to the qdevdevice API too....
Revert "Introduce reset notifier order"
This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (andupdates later added users of qemu_register_reset), we solved theproblem it originally addressed less invasively.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.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.
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>
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>...
Merge branch 'net-queue'
Update irqs on reset and device load
Register reset functions for e1000 and rtl8139
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().
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
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.
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....
PCI network qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
Replace gcc variadic macro extension with C99 version (missed one)
e1000: Do not reinit pci config space to 0
pci_register_device already mallocs the pci config space buffer filledwith zeroes.
Doing this again breaks some default config space writes likesetting the subsystem vendor id and subsystem device id.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
Pci nic: pci_register_device can fail
The pci_register_device() call in PCI nic initialization routines canfail. Handle this failure and propagate a meaningful error message tothe user instead of generating a SEGV.
Cc: Marcelo Tosatti <mtosatti@redhat.com>...
Introduce VLANClientState::cleanup() (Mark McLoughlin)
We're currently leaking memory and file descriptors on devicehot-unplug.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7150 c046a42c-6fe2-441c-8c8c-71466251a162
Remove NICInfo from e1000 and mipsnet state (Mark McLoughlin)
NICInfo isn't used after initialization, so remove it from the driverstate structures.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
e1000: Fix RX descriptor low threshold interrupt logic (Alex Williamson)
The RXDMT0 interrupt is supposed to fire when the number of freeRX descriptors drops to some fraction of the total descriptors.However in practice, it seems like we're adding this interrupt...
qemu: LSI SCSI and e1000 unregister callbacks (Marcelo Tosatti)
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6605 c046a42c-6fe2-441c-8c8c-71466251a162
qemu: return PCIDevice on net device init and record devfn (Marcelo Tosatti)
Change the PCI network drivers init functions to return the PCIDev, toinform which slot has been hot-plugged.
Also record PCIDevice structure on NICInfo to locate for release on...
Add and use #defines for PCI device classes
This patch adds and uses #defines for PCI device classes and subclases,using a new pci_config_set_class() function, similar to the recentlyadded pci_config_set_vendor_id() and pci_config_set_device_id().
Change since v1: fixed compilation of hw/sun4u.c...
Define PCI vendor and device IDs in pci.h (Stuart Brady)
This patch defines PCI vendor and device IDs in pci.h (matching thosefrom Linux's pci_ids.h), and uses those definitions where appropriate.
Change from v1: Introduces pci_config_set_vendor_id() / pci_config_set_device_id()...
Implement e1000 link status (Mark McLoughlin)
On link up or down we set the E1000_STATUS_LU ("link up") bitin the status register and set the E1000_ICR_LSC ("linkstatus changed") bit in the interrupt cause register beforeinterrupting the guest.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
Add a -net name=foo parameter (Mark McLoughlin)
Allow the user to supply a vlan client name on the command line.
This is probably only useful for management tools so that they canuse their own names rather than parsing the output of 'info network'.
Add qemu_format_nic_info_str() (Mark McLoughlin)
Factor out a simple little function for formatting a NIC'sinfo_str and make all NICs use it.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6218 c046a42c-6fe2-441c-8c8c-71466251a162
Add a model string to VLANClientState (Mark McLoughlin)
Don't lose track of what type/model a vlan client is so that we cane.g. assign a global per-model id to clients.
The entire patch is basically a tedious excercise in making sure thetype/model string gets propagated down to qemu_new_vlan_client()....
Update FSF address in GPL/LGPL boilerplate
The attached patch updates the FSF address in the GPL/LGPL boilerplatein most GPL/LGPLed files, and also in COPYING.LIB.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
Use the ARRAY_SIZE() macro where appropriate.
Change from v1: Avoid changing the existing coding style in certain files.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6120 c046a42c-6fe2-441c-8c8c-71466251a162
KVM: Coalesced MMIO support
MMIO exits are more expensive in KVM or Xen than in QEMU because theyinvolve, at least, privilege transitions. However, MMIO writeoperations can be effectively batched if those writes do not have sideeffects.
Good examples of this include VGA pixel operations when in a planar...
Change MMIO callbacks to use offsets, not absolute addresses.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
e1000 VLAN offload emulation (Alex Williamson)
We're currently ignoring the e1000 VLAN tagging, stripping and filteringfeatures in the e1000 emulation. This patch adds backing for therelevant registers and provides a software implementation of theacceleration, such that a guest can make use of VLANs....
Resurrect the safe part of r5274
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5401 c046a42c-6fe2-441c-8c8c-71466251a162
Make some tables const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5395 c046a42c-6fe2-441c-8c8c-71466251a162
Add some missing static qualifiers
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5363 c046a42c-6fe2-441c-8c8c-71466251a162
Revert r5274 which breaks savevm/loadvm
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5321 c046a42c-6fe2-441c-8c8c-71466251a162
Add signed versions of save/load functions
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5274 c046a42c-6fe2-441c-8c8c-71466251a162
Fix warnings that would be caused by gcc flag -Wwrite-strings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5206 c046a42c-6fe2-441c-8c8c-71466251a162
only check RCTL_EN in e1000_can_receive()
e1000_receive() has code to raise a receive overflow interrupt when the receivebuffer head and tail match. However, with the present implementation ofe1000_can_receive(), this code is unreachable -- and etherboot breaks as a...
e1000: use common checksumming code
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4972 c046a42c-6fe2-441c-8c8c-71466251a162
Various NICs: Fix suspend/resume of multiple instances, by Jan Kiszka.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4892 c046a42c-6fe2-441c-8c8c-71466251a162
e1000: only use TSE if enabled for current packet (Anthony Xu).
Previously, all data descriptors used TSE context descriptor by default,It's not correct, per spec, data descriptor uses TSE bit to indicatewhether use TSE,Legacy data descripter never use TSE....
Fix compiler warning.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4451 c046a42c-6fe2-441c-8c8c-71466251a162
e1000: add phy specific status register
(Tristan Gingold)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4123 c046a42c-6fe2-441c-8c8c-71466251a162
e1000: fix unaligned access
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4121 c046a42c-6fe2-441c-8c8c-71466251a162
e1000: fix endianness issues
This patch fixes endianness issues in the e1000 nic emulation, whichcurrently only works on little endian hosts with little endian targets.
Byte swapping does not depend on host endianness, so this patch removethe use of cpu_to_le32 and le32_to_cpu functions. It depends on the path...
Change the e1000 mmio addr space according to spec.
According to the Intel 82540EM manual, the mmio space is128k size.Copied from Xen list and noted by tina..yang@oracle.com
Signed-off-by: Dor Laor <dor.laor@qumranet.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4032 c046a42c-6fe2-441c-8c8c-71466251a162
Fix parallel port software emulation (Hervé Poussineau).Remove __iomem, also unused.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3971 c046a42c-6fe2-441c-8c8c-71466251a162
Remove unused boolean_t, should fix building for Solaris.Fix a typo (Stuart Brady).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3969 c046a42c-6fe2-441c-8c8c-71466251a162
E1000 NIC emulation (Nir Peleg, patch from Dor Laor).Applied %s/^\([^I ]*\)^I/\1 /g on e1000.c and added e1000 to help message.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3949 c046a42c-6fe2-441c-8c8c-71466251a162