pseries pci: removed redundant busdev
The PCIHostState struct already contains SysBusDevice sothe one in sPAPRPHBState has to go.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>Signed-off-by: Alexander Graf <agraf@suse.de>
pseries pci: spapr_populate_pci_devices renamed to spapr_populate_pci_dt
spapr_populate_pci_devices() populates the device tree only with busproperties and has nothing to do with the devices on it as PCI BARallocation is done by the system firmware (SLOF)....
PPC: e500: rename mpc8544ds into generic file
Rename the file (with no changes other than fixing up the header paths)in preparation for refactoring into a generic e500 platform. Also moveit into the newly created ppc/ directory.
Signed-off-by: Scott Wood <scottwood@freescale.com>...
PPC: e500: change internal references away from mpc8544ds
No functional changes -- machine is still outwardly mpc8544ds.
The references that are not changed contain mpc8544 hardware details thatneed to be parameterized if/when a different e500 platform wants to...
PPC: e500: split mpc8544ds machine from generic e500 code
Currently the only mpc8544ds-ism that is factored out istoplevel compatible and model. In the future the generic e500code is expected to become more generic.
Merge remote-tracking branch 'qmp/queue/qmp' into staging
Merge remote-tracking branch 'pmaydell/arm-devs.next' into staging
qmp: add SUSPEND_DISK event
Emitted when the guest makes a request to enter S4 state.
There are three possible ways of having this event, as described here:
http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg02307.html
I've decided to add a new event and make it indepedent of SHUTDOWN....
arm: Move some ARM devices into libhw
Avoids some unnecessary dependencies on cpu.h and prepares fora future armeb-softmmu where most machines would not be built.
Defer touching the SoC devices since most have implicit or explicitdependencies on the CPU....
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
hw/sd.c: make sd_dataready() return bool
For the sake of code clarity
Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/sd.c: make sd_wp_addr() return bool
Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
ssd0323: abort() instead of exit(1) on error.
To be more consistent with the newer ways of error signalling. That and SIGABTis easier to debug with than exit(1).
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
hw/sd.c: convert wp_groups in SDState to bitfield
Representing each group write protection flag with only one bit instead of intvariable significantly reduces memory consumption.
hw/sd.c: make sd_wp_addr() accept 64 bit address argument
Currently sd_wp_addr() accepts 32 bit address arguments therefore implicitlyrestricting SD card address range. Change address argument type to uint64_t.
Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>...
hw/sd.c: introduce wrapper for conversion address to wp group
Add wrapper function sd_addr_to_wpnum() to replace long address-->wg_groupconversion line.
hw/sd.c: convert binary variables to bool
Several members of SDState have type int when they actually are binary variables.Change type of these variables to bool to improve code readability. Change SD APIto be in consistency with new variables type.
hw/armv7m_nvic: Fix incorrect default for num-irqs property
Fix an incorrect default value for the num-irqs property (we wereattempting to override it from the default set by the parent classbut not succeeding, which meant that the lm3s6965evb model would...
armv7m: Guard against no -kernel argument
A -kernel argument must be specified for this machine. Guard against no -kernelargument. Previously gave an unhelpful "bad address" error message.
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>...
xilinx_axi*: Re-implemented interconnect
Re-implemented the interconnect between the Xilinx AXI ethernet and DMAcontrollers. A QOM interface "stream" is created, for the two stream interfaces.
As per Edgars request, this is designed to be more generic than AXI-stream,...
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'bonzini/scsi-next' into staging
unicore32-softmmu: Add is_default setting for puv3 machine
This patch sets is_default to 1 for puv3 machine, so thatfind_default_machine() returns puv3 machine.Thanks Dunrong for pointing it out.
Cc: Dunrong Huang <riegamaths@gmail.com>Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>...
unicore32-softmmu: Add ps2 support
This patch adds ps2/keyboard support, and enables CONFIG_PCKBD.
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
unicore32-softmmu: Add puv3 pm support
This patch adds puv3 pm (power management) support,include pm device simulation for kernel booting.Thank Blue Swirl for pointing out the missing "break".
v1->v2: Add initialization to ret in puv3_pm_read.
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>...
unicore32-softmmu: Add puv3 dma support
This patch adds puv3 dma (Direct Memory Access) support,include dma device simulation for kernel booting.
v1->v2: Add initialization to ret in puv3_dma_read.
unicore32-softmmu: Add puv3 ostimer support
This patch adds puv3 ostimer support, include os timerdevice simulation and ptimer support in puv3 machine.
unicore32-softmmu: Add puv3 gpio support
This patch adds puv3 gpio (General Purpose Input/Output) support,include gpio device simulation and its interrupt support.
v1->v2: Add initialization to ret in puv3_gpio_read.
unicore32-softmmu: Add puv3 soc/board support
This patch only add puv3 soc/board support, which introduces puv3machine description, and specifies console type.
unicore32-softmmu: Add puv3 interrupt support
This patch adds puv3 interrupt support, include interrupt controlerdevice simulation and interrupt handler in puv3 machine.
unicore32-softmmu: Add unicore32-softmmu build support
This patch adds unicore32-softmmu build support, include configure,makefile, arch_init, and all missing functions needed by softmmu.Although all missing functions are empty, unicore32-softmmu could...
ahci: Fix ahci cdrom read corruptions for reads > 128k
While testing q35, which has its cdrom attached to the ahci controller, I foundthat the Fedora 17 install would panic on boot. The panic occurs whilesquashfs is trying to read from the cdrom. The errors are:...
ahci: Fix sglist memleak in ahci_dma_rw_buf()
I noticed that in hw/ide/ahci:ahci_dma_rw_buf() we do not free the sglist. Thus,I've added a call to qemu_sglist_destroy() to fix this memory leak.
In addition, I've adeed a call in qemu_sglist_destroy() to 0 all of the sglist...
virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE
Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency withthe spec.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
virtio-blk: disable write cache if not negotiated
If the guest does not support flushes, we should run in writethrough mode.The setting is temporary until the next reset, so that for example theBIOS will run in writethrough mode while Linux will run with a writeback...
virtio-blk: fix use-after-free while handling scsi commands
The scsi passthrough handler falls through after completing arequest into the failure path, resulting in a use after free.
Reproducible by running a guest with aio=native on a block device.
Reported-by: Stefan Priebe <s.priebe@profihost.ag>...
target-xtensa: make 'sim' to be the default machine
This fixes the following error:
$ qemu-system-xtensa -cpu help Segmentation fault
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-xtensa: make default CPU depend on target endianness
This makes usable default for -cpu option both for qemu-system-xtensaand qemu-system-xtensaeb fixing the following error:
$ qemu-system-xtensaeb -M sim Unable to find CPU definition
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>...
sparc: fix floppy TC line setup
The qemu_irq for Terminal Count (TC) line between FDC and Slavio miscdevice was created only after use, spotted by Clang compiler. Also,it was not created if the FDC didn't exist.
Rearrange code to fix order. Always create the TC line....
xilinx_axienet: avoid useless self-assignment
Statement s=s; makes little sense, remove it. Spotted by Clangcompiler.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
scsi-bus: remove overlapping entry
LOAD_UNLOAD and START_STOP have same value, so the tableentry is initialized twice. Spotted by Clang compiler.
Remove LOAD_UNLOAD entry since START_STOP entry alreadyrepresents both.
Reviewed-by: Markus Armbruster <armbru@redhat.com>...
esp: add Tekram DC-390 emulation (PC SCSI adapter)
Difference with AMD PCscsi is that DC-390 contains a EEPROM,and that a romfile is available to add INT13 support.
This has been successfully tested on:- MS DOS 6.22 (using DC390 ASPI driver)- MS Windows 98 SE (using DC390 driver)...
esp: move PCI emulation to a new file esp-pci.c
sparc machines loose ability to instanciate PCI ESP SCSI adapter,which is not a big loose as they don't have PCI bus support.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Revert "pci: add some stubs"
This reverts commit 0883c5159f1df05d8761014f65451c3c3b77ebcf.
Those stubs were only used by PCI ESP emulation, which is nownot compiled on architectures which have no PCI bus support.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>...
esp: move some definitions to header file
These will be used by next commits.
scsi-disk: more assertions and resets for aiocb
Leaving the aiocb to a non-NULL value leads to an assertion failure whenrerror/werror are set to stop or enospc, and the operation is retried.scsi-disk checks that the aiocb member is NULL before filling it....
scsi-disk: improve out-of-range LBA detection for WRITE SAME
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi-disk: add support for the UNMAP command
The unmap command can reuse the same infrastructure as MODE SELECTfor reading the descriptor list into memory. The descriptors areprocessed sequentially.
kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip'
Decouple another x86-specific assumption about what irqchips imply.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Avi Kivity <avi@redhat.com>
kvm: Move kvm_allows_irq0_override() to target-i386, fix return type
kvm_allows_irq0_override() is a totally x86 specific concept:move it to the target-specific source file where it belongs.This means we need a new header file for the prototype:kvm_i386.h, in line with the existing kvm_ppc.h....
kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq()
Rename the function kvm_irqchip_set_irq() to kvm_set_irq(),since it can be used for sending (asynchronous) interrupts whetherthere is a full irqchip model in the kernel or not. (We don'tinclude 'async' in the function name since asynchronous is the...
virtio-scsi: do not compare 32-bit QEMU tags against 64-bit virtio-scsi tags
This patch fixes a problem in handling task management functionsin virtio-scsi. The cause of the problem is a mismatch betweenthe size of the tag in QEMU (32-bit) and virtio-scsi (64-bit)....
Merge remote-tracking branch 'kraxel/usb.58' into staging
usb-storage: improve debug logging
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-storage: fix SYNCHRONIZE_CACHE
Commit 59310659073d85745854f2f10c4292555c5a1c51 is incomplete,we'll arrive in the scsi command complete callback in CSW stateand must handle that case correctly.
ide scsi: Mess with geometry only for hard disk devices
Legacy -drive cyls=... are now ignored completely when the drivedoesn't back a hard disk device. Before, they were first checkedagainst a hard disk's limits, then ignored.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
virtio: fix vhost handling
Commit b1f416aa8d870fab71030abc9401cfc77b948e8e breaks vhost_netbecause it always registers the virtio_pci_host_notifier_read() handlerfunction on the ioeventfd, even when vhost_net.ko is using the ioeventfd.The result is both QEMU and vhost_net.ko polling on the same eventfd...
Fixes related to processing of qemu's -numa option
The -numa option to qemu is used to create [fake] numa nodesand expose them to the guest OS instance.
There are a couple of issues with the -numa option:
a) Max VCPU's that can be specified for a guest while using...
build: Fix build breakage detected by buildbot
More details:http://buildbot.b1-systems.de/qemu/builders/xen_unstable/builds/83/steps/compile/logs/stdio
VLANState has been removed since commit a005d07, so "vlan id" should befetched using net_hub_id_for_client()....
scsi: add support for ATA_PASSTHROUGH_xx scsi command
Correct the command names of opcode 0x85 and 0xa1, and calculatetheir xfer size from CDB.
Signed-off-by: Cong Meng <mc@linux.vnet.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Merge remote-tracking branch 'stefanha/net' into staging
Merge remote-tracking branch 'aneesh/for-upstream' into staging
megasas: static SAS addresses
This patch introduces a new property 'sas_address' whichallows the user to specify the SAS address for the HBA.The default address is following the NAA locally assignedidentifier format with the locally assigned address0x525400 as used eg for the MAC addresses....
esp: add missing const on TypeInfo structures
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
SCSI: Update the sense code for PREVENT REMOVAL errors
Change the sense codes for failures to eject a device that is lockedby PREVENT_ALLOW_MEDIUM_REMOVAL fromthe generic MEDIA_LOAD_OR_EJECT_FAILED to the more specificMEDIUM_REMOVAL_PREVENTED.
The second sense code is more accurate, and is also listed in MMC annex F...
SCSI: STARTSTOPUNIT only eject/load media if powercondition is 0
The START STOP UNIT command will only eject/load media ifpower condition is zero.
If power condition is !0 then LOEJ and START will be ignored.
From MMC (sbc contains similar wordings too)...
megasas: Update function megasys_scsi_uninit
Commit f90c2bcdbc69e41e575f868b984c3e2de8f51bac changedPCIUnregisterFunc, therefore the function prototypeneeds an update.
megasas.o is currently not linked, so this bug was notdetected by the buildbots.
Signed-off-by: Stefan Weil <sw@weilnetz.de>...
scsi-disk: fix compilation with DEBUG_SCSI
Reported-by: Gerhard Wiesinger <lists@wiesinger.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Support 'help' as a synonym for '?' in command line options
For command line options which permit '?' meaning 'please list thepermitted values', add support for 'help' as a synonym, by abstractingthe check out into a helper function.
This change means that in some cases where we were being lazy in...
target-i386: move cpu halted decision into x86_cpu_reset
MP initialization protocol differs between cpu families, and for P6 andonward models it is up to CPU to decide if it will be BSP using thisprotocol, so try to model this. However there is no point in implementing...
target-i386: move cpu_reset and reset callback to cpu.c
Moving reset callback into cpu object from board level andresetting cpu at the end of x86_cpu_realize() will allow properlycreate cpu object during run-time (hotplug) without calling reset externaly....
fix Xen compilation
xen_pt_unregister_device is used as PCIUnregisterFunc, so it shouldmatch the type.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
net: Rename VLANClientState to NetClientState
The vlan feature is no longer part of net core. Rename VLANClientStateto NetClientState because net clients are not explicitly associated witha vlan at all, instead they have a peer net client to which they are...
net: Rename vc local variables to nc
Now that VLANClientState has been renamed to NetClientState all 'vc'local variables should be 'nc'. Much of the code already used 'nc' butthere are places where 'vc' needs to be renamed.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
net: Rename qemu_del_vlan_client() to qemu_del_net_client()
Another step in moving the vlan feature out of net core. Users onlydeal with NetClientState and therefore qemu_del_vlan_client() should benamed qemu_del_net_client().
net: Remove VLANState
VLANState is no longer used and can be removed.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>
net: Convert qdev_prop_vlan to peer with hub
Instead of using VLANState use net/hub.h to support the vlan qdevproperty. The vlan qdev property becomes an alias for the peer qdevproperty but is represented as a VLAN ID number. When a VLAN ID isselected the device will really peer with a hub port....
net: Remove vlan code from net.c
The vlan implementation in net.c has been replaced by hubs so we canremove the code.
hw/9pfs: Fix assert when disabling migration
For 9p we can get the attach request multiple times for thesame export. So don't adding migration blocker for everyattach request.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
Merge branch pci into master
Merge master and pci branch, resolve build breakage in hw/esp.cintroduced by f90c2bcd.
Conflicts: hw/esp.c
Avoid returning void
It's silly and non-conforming to standards to return void,don't do it.
hw/escc: Drop duplicate definition of 'disabled' property
Drop a duplicate definition of the 'disabled' property fromthe escc qdev property list: this redefinition is currentlyeffectively ignored but will become an error. (The duplicationwas inadvertently introduced in 2009 in commit ec02f7dec2.)...
target-or32: Add timer support
Add OpenRISC timer support.
Signed-off-by: Jia Liu <proljc@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-or32: Add a IIS dummy board
Add a IIS dummy board.
target-or32: Add PIC support
Add OpenRISC Programmable Interrupt Controller support.
target-or32: Add target stubs and QOM cpu
Add OpenRISC target stubs, QOM cpu and basic machine.
virtio-scsi: enable MSI-X support
While virtio-scsi does support multiqueue, the default number ofinterrupt vectors is not enough to actually enable usage ofmultiple queues in the driver; this is because with only 2vectors the driver will not be able to use a separate...
virtio-scsi: add ioeventfd support
Probably due to bad merge months ago, virtio-scsi-pci did not haveioeventfd support. Fix this and enable it by default, as is thecase for other virtio-pci devices.
virtio-scsi: Report missed events
When an event is reported but no buffers are present in the event vq,we can set a flag and report a dummy event as soon as one is added.
virtio-scsi: do not report dropped events after reset
virtio-scsi: report parameter change events
scsi-disk: report resized disk via sense codes
Linux will not use these, but a very similar mechanism will be used toreport the condition via virtio-scsi events.
scsi: report parameter changes to HBA drivers
virtio-scsi: Implement hotplug support for virtio-scsi
Implement the hotplug() and hot_unplug() interfaces in virtio-scsi, by signalthe virtio_scsi.ko in guest kernel via event virtual queue.
The counterpart patch of virtio_scsi.ko will be sent soon in another thread....
scsi: introduce hotplug() and hot_unplug() interfaces for SCSI bus
Add two interfaces hotplug() and hot_unplug() to scsi bus info.The scsi bus can implement these two interfaces to signal the HBA driverof guest kernel to add/remove the scsi device in question....
scsi: establish precedence levels for unit attention
When a device is resized, we will report a unit attention conditionfor CAPACITY DATA HAS CHANGED. However, we should ensure that thiscondition does not override a more important unit attention condition....
scsi: add tracepoint for scsi_req_cancel