vmstate: Add support for VBUFFERS
Support for buffer that are pointed by a pointer (i.e. not embedded)where the size that we want to use is a field in the state.We also need a new place to store where to start in the middle of thebuffer, as now it is a pointer, not the offset of the 1st field....
vmstate: Introduce VMSTATE_STRUCT_TEST
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: Introduce VMSTATE_STRUCT_POINTER_TEST
vmstate: Introduce UINT16_TEST support
vmstate: remove usused VMSTATE_STRUCT_ARRAY_SIZE_UINT8
vmstate: Fix info field of VMSTATE_MACADDR
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
lsi53c895a: Use alternative address when already reselected
See SCRIPTS, 3.2.17 SELECT.
Signed-off-by: Laszlo Ast <laszlo.ast@siemens-enterprise.com>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
lsi53c895a: Implement IRQ on reselection
The critical part of this change is how to deal with simultaneaousgeneration of interrupts. The only (normal) case when this happens inthe emulation is near simultaneous reselection + selection. If selectioncomes first, there is no problem, since the target attempting...
scsi-disk: restruct emulation: GET_CONFIGURATION
Move GET_CONFIGURATION emulation from scsi_send_command() toscsi_disk_emulate_command().
Also add GET_CONFIGURATION to scsi-defs.h and scsi_command_name().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
scsi-disk: restruct emulation: SERVICE_ACTION_IN
Move SERVICE_ACTION_IN emulation from scsi_send_command() toscsi_disk_emulate_command().
Also add SERVICE_ACTION_IN to scsi-defs.h and scsi_command_name().
scsi-disk: restruct emulation: REPORT_LUNS
Move REPORT_LUNS emulation from scsi_send_command() toscsi_disk_emulate_command().
Also add REPORT_LUNS to scsi-defs.h and scsi_command_name().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
scsi-disk: restruct emulation: VERIFY
Move VERIFY emulation from scsi_send_command() toscsi_disk_emulate_command().
scsi: add read/write 16 commands.
Add READ_16 + friends to scsi-defs.h, scsi_command_name() and therequest parsing helper functions.
Use them in scsi-disk.c too.
lsi53c895a: Whitespace and typo fixes
lsi53c895a: Add support for LSI53C700 Family Compatibility bit
lsi53c895a: Fix message code of DISCONNECT
See SCSI-2, 6.5 Message system description/message codes.
lsi53c895a: Fix SDID in SELECT ID command
See SCRIPTS Programming Guide, 3.2.17 SELECT.
scsi-disk: restruct emulation: INQUIRY
Move INQUIRY emulation from scsi_send_command() toscsi_disk_emulate_command(). Also split the longish INQUITY emulationcode into the new scsi_disk_emulate_inquiry() function. Serial numberhandling is slightly changed, we don't copy it any more but look it up...
scsi-disk: restruct emulation: RESERVE+RELEASE
Move RESERVE+RELEASE emulation from scsi_send_command() toscsi_disk_emulate_command().
scsi-disk: restruct emulation: MODE_SENSE
Move MODE_SENSE emulation from scsi_send_command() toscsi_disk_emulate_command(). Create two helper functions:mode_sense_page() which writes the actual mode pages andscsi_disk_emulate_mode_sense() which holds the longish MODE_SENSE...
scsi-disk: restruct emulation: START_STOP
Move START_STOP emulation from scsi_send_command() toscsi_disk_emulate_command().
scsi-disk: restruct emulation: ALLOW_MEDIUM_REMOVAL
Move ALLOW_MEDIUM_REMOVAL emulation from scsi_send_command() toscsi_disk_emulate_command().
scsi-disk: restruct emulation: READ_CAPACITY
Move READ_CAPACITY emulation from scsi_send_command() toscsi_disk_emulate_command().
scsi-disk: restruct emulation: SYNCHRONIZE_CACHE
Move SYNCHRONIZE_CACHE emulation from scsi_send_command() toscsi_disk_emulate_command().
scsi-disk: restruct emulation: READ_TOC
Move READ_TOC emulation from scsi_send_command() toscsi_disk_emulate_command(). Add scsi_disk_emulate_read_toc() functionwhich holds the longisch READ_TOC emulation code.
scsi: add scsi_req_print()
Handy for debugging.
scsi-disk: restruct emulation: core + TEST_UNIT_READY.
Add new scsi_disk_emulate_command() function, which will -- whenfinished -- handle all scsi disk command emulation except actual I/O(READ+WRITE commands) which goes to the block layer. The function...
scsi-disk: restruct emulation: REQUEST_SENSE
Move REQUEST_SENSE emulation from scsi_send_command() toscsi_disk_emulate_command().
scsi: add xfer mode
scsi: move sense to SCSIDevice, create SCSISense struct.
scsi: move dinfo to SCSIDevice
scsi: move status to SCSIRequest.
Also add and use the scsi_req_complete() helper function for calling thecompletion callback.
scsi: add/fix header protection.
Also delete the leftover and unused scsi-disk.h file.
scsi: create common SCSIRequest structure.
Rename the SCSIRequest structs in scsi-disk.c and scsi-generic.c toSCSIDiskReq and SCSIGenericReq. Create a SCSIRequest struct and movethe common elements over.
scsi: move request lists to QTAILQ.
Changes: * Move from open-coded lists to QTAILQ macros. * Move the struct elements to the common data structures (SCSIDevice + SCSIRequest). * Drop free request pools. * Fix request cleanup in the destroy callback....
scsi: move SCSIRequest management to common code.
Create generic functions to allocate, find and release SCSIRequeststructs. Make scsi-disk and scsi-generic use them.
scsi: move scsi command buffer from SCSIGenericReq to SCSIRequest.
scsi: move blocksize from SCSIGenericState to SCSIDevice
scsi: add scsi-defs.h
Largely based on <scsi/scsi.h> from linux. Added into the tree so wecan use the defines everywhere, not just in scsi-generic.c (which islinux-specific).
scsi: move type from SCSIGenericState to SCSIDevice
scsi: add request parsing helpers to common code.
Add helper functions for scsi request parsing to common code. Gettingcommand length, transfer size, and linear block address is handled.
scsi: use command defines in scsi-disk.c
net: convert usb-net to NICState
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: convert xilinx_ethlite to NICState
net: convert xen to NICState
net: remove VLANClientState members now in NetClientInfo
Add a NetClientInfo pointer to VLANClientState and use thatfor the typecode and function pointers.
net: convert mipsnet to NICState
net: convert musicpal to NICState
net: convert smc91c111 to NICState
net: convert stellaris to NICState
net: convert eepro100 to NICState
net: convert dp8393x to NICState
net: convert etrax to NICState
net: convert LAN9118 to NICState
net: convert mcf_fec to NICState
net: convert e1000 to NICState
net: convert rtl8139 to NICState
net: convert ne2000 to NICState
net: convert pcnet to NICState
net: convert virtio to NICState
qdev: move DO_UPCAST() into osdep.h
Nothing qdev specific about this, make it available throughtout.
net: remove NICInfo::vc
Since 1cc33683, this field is not set for most devices, so justremove it and its remaining few uses.
ac97: port to vmstate
c4231a: port to vmstate
gus: port to vmstate
ac97: sizeof needs %zd
This change makes DEBUG_AC97 to compile again
ac97: recalculate active after loadvm
ac97: up savevm version and remove active from state
sb16: port to vmstate
es1370: port to vmstate
qdev: Use QError for 'device not found' error
Please, note that we will lose the "Try -device '?' for a list" hint as it's qdev specific.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
fix I2C slave addressing
With the recent device handling changes the I2C slave addressing codewas broken. With current code, if a slave with the correct address is
not found on the bus the last scanned slave on the bus will beaddressed. This is wrong. Please find attached a patch to fix it....
Fix qdev property type definition for isa serial/parallel devices
Use the correct qdev property type for these devices.
Fix qemu_free use in scsi-generic.c
scsi-generic.c is using free() instead of qemu_free().Fix it.
Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix free use in xen_backend.c
xen_backend.c is using qemu_free() instead of free().Fix it.
Fix qemu_malloc/qemu_free use in rtl8139.c
rtl8139.c is using malloc()/free() instead of qemu_malloc()/qemu_free().Fix it.
pci: move apb specific stuff to apb_pci.c
pci code had a TODO to move apb specificpci bridge initialization to apb_pci.Implement this and remove the TODO.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix qemu_free use in acpi.c
acpi.c is using free() instead of qemu_free().Fix it.
Fix qemu_free use in baum.c
baum.c is using free() instead of qemu_free().Fix it.
Fix qemu_free use in nand.c
nand.c is using free() instead of qemu_free().Fix it.
Fix qemu_free use in bt-l2cap.c
bt-l2cap.c is using free() instead of qemu_free().Fix it.
Fix qemu_free use in nseries.c
nseries.c is using free() instead of qemu_free().Fix it.
vga-pci: Fix access to linear framebuffer
Anthony Liguori's patch fixes the problems withvga display in graphical mode and SeaBIOS.
I only adapted some values for vga-pci.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
msix: clear pending bit of an unused vector
PCI spec states:if a masked vector has its Pending bit set, and the associatedunderlying interrupt events are somehow satisfied (usually by softwarethough the exact manner is function-specific), the function must clear...
msix: fix reset value for enable bit
On reset, we currently clear all bits in msix control register exceptenable bit. This is wrong: the spec says we should clear writeablebits: function mask and enable bit.Correct this.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
msix: fix mask bit state after reset
PCI spec states that mask bit must be 1 after reset.Make it so.
virtio: do not reset msix state on soft reset
msix state is managed by OS, not thedriver, so it's wrong to touch iton io from driver.Mark all vectors unused instead.
msix: add helper to unuse all msix entries
will be used by virtio on soft reset
pci: convert goto into scope in bridge_filter
goto into scope is evil. rearrange pci_bridge_filterso that we always go to end of function on error.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>
pci: pci bridge related clean up.
- fix bridge prefetchable memory accesser to check 64bit or not.- use pcibus_t consistently instead mixing pcibus_t and uint64_t.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci: fix pci_config_get_io_base().
fix typo in pci_config_get_io_base().
pci: remove magic number, 256 in pci.c
This patch replaces magic number, 256, with ARRAY_SIZE().
pci: split up up pci_update mappings
Split bar address math into a separate function.In particular, this gets rid of an ugly forward gotointo scope that we have there.
pci: clean up of pci_update_mappings()
This patch converts r->size == 0 to !r_size.
pci: remove unused constants
This patch removes unused constants committed byfb23162885f7fd8cf7334bed22c25ac32c7d8b9d.
pci: move typedef, PCIHostState, PCIExpressHost to qemu-common.h.
This patch moves two typedefs, PCIHostState and PCIExpressHost toqemu-common.h for consistency as PCIBus and PCIDevice are typedefedin qemu-common.h.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
pci: remove some unnecessary comment in pci.h
This patch removes some comment which should go into commit login pci.h.
pci: clean up of pci_init_wmask().
This patch replaces for loop by memset in pci_init_wmask().
pci: kill unnecessary included in pci.c
including pci_host.h isn't needed by pci.c.This patch kills it.
pci_host: remove unnecessary & 0xff.
This patch removes unnecessary & 0xff in pci_dev_find_by_addr().