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: 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
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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().
pci: s/pci_find_host_bus/pci_find_root_bus/g
This patch renames pci_find_host_bus() to pci_find_root_bus()as suggested by "Michael S. Tsirkin" <mst@redhat.com>.
pci: remove pci_sub_bus() by open coding.
Because pci_sub_bus() is used only once so eliminate itby open coding as suggested by "Michael S. Tsirkin" <mst@redhat.com>.
pci: shorten pci_host_{conf, data}_register_xxx function a bit.
pci_host_data_register_io_memory and its variants are too long a bit.So shorten them. Now they arepci_host_{conf, data}_register_{mmio, mmio_noswap, ioport}()
pci: rename (pci_/pcie_mmcfg_)addr_to_dev
This patch renames pci_addr_to_dev(), pcie_mmcfg_addr_to_dev()to pci_dev_find_by_addr(), pcie_dev_find_by_mmcfg_addr()as "Michael S. Tsirkin" <mst@redhat.com> suggested.
pci: remove pci_addr_to_config() by open code
This patch removes pci_addr_to_config() and open code itas suggested by Michael S. Tsirkin <mst@redhat.com>.
pci: simplify (pci_/pcie_mmcfg_)data_read()
Remove switch on length: we don't care abouthigh bits for value, so just return all onesif no device. And add one assert().
pci: move pci_data_{read, write}() declaration from pci.h to pci_host.h
Now pci host stuff has been moved from pci.[hc] to pci_host.[hc]so the declaration of pci_data_{read, write}() should be inpci_host.hThis patch moves them from pci.h to pci_host.h for consistency....
pci: fix pci_info_device().
It printed wrong limit value of bridge.This patch fixes it.
pci: pci.h cleanup: move out stuff not in pci.c
pci.h declares some functions which aren'tdefined in pci.h. Clean up moving thingsto appropriate headers, and update all users.
Revert "vga: do not resize the screen on hw_invalidate"
This causes ctrl+alt+u or ctrl+alt+f to not work when windows hasn't beenresized first. Other graphic emulators do resize the screen onhw_invalidate.
This reverts commit 0bd8246bfec1dfb2eb959f52db535572c0260f4c.
BCD cleanup
Combine multiple BCD implementations.
Signed-off-by: Paul Brook <paul@codesourcery.com>
DS1338 RTC
Implement MAXIM SD1338 RTC+NVRAM.
GPIO I2C rework
Reqrite bitbanging I2C implementation. New code improves stop/startcondition handling, and gives more accurate input line level.
Introduce intermediate abstraction layer for I2C bitbanging thatis not connected via a GPIO port.
ARM RealView I2C
Add ARM Realview I2C host emulation.