summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* virtio: fix vhost handlingPaolo Bonzini2012-08-063-10/+14
| | | | | | | | | | | | | | | | | | | | | Commit b1f416aa8d870fab71030abc9401cfc77b948e8e breaks vhost_net because it always registers the virtio_pci_host_notifier_read() handler function 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 and the virtio_net.ko guest driver seeing inconsistent results: # ifconfig eth0 192.168.0.1 netmask 255.255.255.0 virtio_net virtio0: output:id 0 is not a head! To fix this, proceed the same as we do for irqfd: add a parameter to virtio_queue_set_host_notifier_fd_handler and in that case only set the notifier, not the handler. Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Tested-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fixes related to processing of qemu's -numa optionChegu Vinod2012-08-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -numa option to qemu is used to create [fake] numa nodes and 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 the qemu's -numa option is 64. Due to a typecasting issue when the number of VCPUs is > 32 the VCPUs don't show up under the specified [fake] numa nodes. b) KVM currently has support for 160VCPUs per guest. The qemu's -numa option has only support for upto 64VCPUs per guest. This patch addresses these two issues. Below are examples of (a) and (b) a) >32 VCPUs are specified with the -numa option: /usr/local/bin/qemu-system-x86_64 \ -enable-kvm \ 71:01:01 \ -net tap,ifname=tap0,script=no,downscript=no \ -vnc :4 ... Upstream qemu : -------------- QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 6 nodes node 0 cpus: 0 1 2 3 4 5 6 7 8 9 32 33 34 35 36 37 38 39 40 41 node 0 size: 131072 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 42 43 44 45 46 47 48 49 50 51 node 1 size: 131072 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 52 53 54 55 56 57 58 59 node 2 size: 131072 MB node 3 cpus: 30 node 3 size: 131072 MB node 4 cpus: node 4 size: 131072 MB node 5 cpus: 31 node 5 size: 131072 MB With the patch applied : ----------------------- QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 6 nodes node 0 cpus: 0 1 2 3 4 5 6 7 8 9 node 0 size: 131072 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 node 1 size: 131072 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 node 2 size: 131072 MB node 3 cpus: 30 31 32 33 34 35 36 37 38 39 node 3 size: 131072 MB node 4 cpus: 40 41 42 43 44 45 46 47 48 49 node 4 size: 131072 MB node 5 cpus: 50 51 52 53 54 55 56 57 58 59 node 5 size: 131072 MB b) >64 VCPUs specified with -numa option: /usr/local/bin/qemu-system-x86_64 \ -enable-kvm \ -cpu Westmere,+rdtscp,+pdpe1gb,+dca,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pclmuldq,+pbe,+tm,+ht,+ss,+acpi,+d-vnc :4 ... Upstream qemu : -------------- only 63 CPUs in NUMA mode supported. only 64 CPUs in NUMA mode supported. QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 8 nodes node 0 cpus: 6 7 8 9 38 39 40 41 70 71 72 73 node 0 size: 65536 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 42 43 44 45 46 47 48 49 50 51 74 75 76 77 78 79 node 1 size: 65536 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 52 53 54 55 56 57 58 59 60 61 node 2 size: 65536 MB node 3 cpus: 30 62 node 3 size: 65536 MB node 4 cpus: node 4 size: 65536 MB node 5 cpus: node 5 size: 65536 MB node 6 cpus: 31 63 node 6 size: 65536 MB node 7 cpus: 0 1 2 3 4 5 32 33 34 35 36 37 64 65 66 67 68 69 node 7 size: 65536 MB With the patch applied : ----------------------- QEMU 1.1.50 monitor - type 'help' for more information (qemu) info numa 8 nodes node 0 cpus: 0 1 2 3 4 5 6 7 8 9 node 0 size: 65536 MB node 1 cpus: 10 11 12 13 14 15 16 17 18 19 node 1 size: 65536 MB node 2 cpus: 20 21 22 23 24 25 26 27 28 29 node 2 size: 65536 MB node 3 cpus: 30 31 32 33 34 35 36 37 38 39 node 3 size: 65536 MB node 4 cpus: 40 41 42 43 44 45 46 47 48 49 node 4 size: 65536 MB node 5 cpus: 50 51 52 53 54 55 56 57 58 59 node 5 size: 65536 MB node 6 cpus: 60 61 62 63 64 65 66 67 68 69 node 6 size: 65536 MB node 7 cpus: 70 71 72 73 74 75 76 77 78 79 Signed-off-by: Chegu Vinod <chegu_vinod@hp.com>, Jim Hull <jim.hull@hp.com>, Craig Hada <craig.hada@hp.com> Tested-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* build: Fix build breakage detected by buildbotDunrong Huang2012-08-042-4/+7
| | | | | | | | | | | 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 be fetched using net_hub_id_for_client(). Signed-off-by: Dunrong Huang <riegamaths@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori2012-08-036-39/+159
|\ | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/scsi-next: scsi: add support for ATA_PASSTHROUGH_xx scsi command esp: add missing const on TypeInfo structures esp: enable for all PCI machines Revert "megasas: disable due to build breakage" megasas: static SAS addresses scsi-disk: fix compilation with DEBUG_SCSI megasas: Update function megasys_scsi_uninit SCSI: STARTSTOPUNIT only eject/load media if powercondition is 0 SCSI: Update the sense code for PREVENT REMOVAL errors
| * scsi: add support for ATA_PASSTHROUGH_xx scsi commandCong Meng2012-08-032-5/+87
| | | | | | | | | | | | | | | | Correct the command names of opcode 0x85 and 0xa1, and calculate their xfer size from CDB. Signed-off-by: Cong Meng <mc@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * esp: add missing const on TypeInfo structuresHervé Poussineau2012-08-031-2/+2
| | | | | | | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * megasas: static SAS addressesHannes Reinecke2012-08-032-17/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a new property 'sas_address' which allows the user to specify the SAS address for the HBA. The default address is following the NAA locally assigned identifier format with the locally assigned address 0x525400 as used eg for the MAC addresses. The lower bytes are set to the pci address which will ensure uniqueness for the local machine. The port addresses are now calculated based on the magic number 0x1221 (which is found in real hardware, too) plus the device number. Signed-off-by: Hannes Reinecke <hare@suse.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Andreas Faerber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * scsi-disk: fix compilation with DEBUG_SCSIPaolo Bonzini2012-08-031-11/+12
| | | | | | | | | | Reported-by: Gerhard Wiesinger <lists@wiesinger.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * megasas: Update function megasys_scsi_uninitStefan Weil2012-08-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit f90c2bcdbc69e41e575f868b984c3e2de8f51bac changed PCIUnregisterFunc, therefore the function prototype needs an update. megasas.o is currently not linked, so this bug was not detected by the buildbots. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * SCSI: STARTSTOPUNIT only eject/load media if powercondition is 0Ronnie Sahlberg2012-08-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The START STOP UNIT command will only eject/load media if power condition is zero. If power condition is !0 then LOEJ and START will be ignored. From MMC (sbc contains similar wordings too) The Power Conditions field requests the block device to be placed in the power condition defined in Table 558. If this field has a value other than 0h then the Start and LoEj bits shall be ignored. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * SCSI: Update the sense code for PREVENT REMOVAL errorsRonnie Sahlberg2012-08-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Change the sense codes for failures to eject a device that is locked by PREVENT_ALLOW_MEDIUM_REMOVAL from the generic MEDIA_LOAD_OR_EJECT_FAILED to the more specific MEDIUM_REMOVAL_PREVENTED. The second sense code is more accurate, and is also listed in MMC annex F for the recommended sense codes for MMC devices while the first sense code is not. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | Merge remote-tracking branch 'stefanha/net' into stagingAnthony Liguori2012-08-0343-148/+146
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/net: net: add the support for -netdev socket, listen net: fix the coding style hub: add the support for hub own flow control net: determine if packets can be sent before net queue deliver packets net: cleanup deliver/deliver_iov func pointers net: Make "info network" output more readable info net: Rename qemu_del_vlan_client() to qemu_del_net_client() net: Rename vc local variables to nc net: Rename VLANClientState to NetClientState net: Rename non_vlan_clients to net_clients net: Remove VLANState net: Remove vlan code from net.c net: Convert qdev_prop_vlan to peer with hub net: Drop vlan argument to qemu_new_net_client() hub: Check that hubs are configured correctly net: Look up 'vlan' net clients using hubs net: Use hubs for the vlan feature net: Add a hub net client net: Add interface to bridge when SIOCBRADDIF isn't available
| * | net: Rename qemu_del_vlan_client() to qemu_del_net_client()Stefan Hajnoczi2012-08-018-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another step in moving the vlan feature out of net core. Users only deal with NetClientState and therefore qemu_del_vlan_client() should be named qemu_del_net_client(). 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: Rename vc local variables to ncStefan Hajnoczi2012-08-012-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that VLANClientState has been renamed to NetClientState all 'vc' local variables should be 'nc'. Much of the code already used 'nc' but there are places where 'vc' needs to be renamed. 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: Rename VLANClientState to NetClientStateStefan Hajnoczi2012-08-0132-98/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vlan feature is no longer part of net core. Rename VLANClientState to NetClientState because net clients are not explicitly associated with a vlan at all, instead they have a peer net client to which they are connected. This patch is a mechanical search-and-replace except for a few whitespace fixups where changing VLANClientState to NetClientState misaligned whitespace. 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: Remove VLANStateStefan Hajnoczi2012-08-0115-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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: Remove vlan code from net.cStefan Hajnoczi2012-08-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The vlan implementation in net.c has been replaced by hubs so we can remove the code. 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 hubZhi Yong Wu2012-08-012-16/+27
| |/ | | | | | | | | | | | | | | | | | | | | Instead of using VLANState use net/hub.h to support the vlan qdev property. The vlan qdev property becomes an alias for the peer qdev property but is represented as a VLAN ID number. When a VLAN ID is selected the device will really peer with a hub port. Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* | Merge remote-tracking branch 'aneesh/for-upstream' into stagingAnthony Liguori2012-08-031-5/+10
|\ \ | | | | | | | | | | | | | | | * aneesh/for-upstream: hw/9pfs: Fix assert when disabling migration configure: Fix build with capabilities
| * | hw/9pfs: Fix assert when disabling migrationAneesh Kumar K.V2012-07-311-5/+10
| |/ | | | | | | | | | | | | | | For 9p we can get the attach request multiple times for the same export. So don't adding migration blocker for every attach request. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* | Support 'help' as a synonym for '?' in command line optionsPeter Maydell2012-08-023-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For command line options which permit '?' meaning 'please list the permitted values', add support for 'help' as a synonym, by abstracting the check out into a helper function. This change means that in some cases where we were being lazy in our string parsing, "?junk" will now be rejected as an invalid option rather than being (undocumentedly) treated the same way as "?". Update the documentation to use 'help' rather than '?', since '?' is a shell metacharacter and thus prone to fail confusingly if there is a single character filename in the current working directory and the '?' has not been escaped. It's therefore better to steer users towards 'help', though '?' is retained for backwards compatibility. We do not, however, update the output of the system emulator's -help (or any documentation autogenerated from the qemu-options.hx which is the source of the -help text) because libvirt parses our -help output and will break. At a later date when QEMU provides a better interface so libvirt can avoid having to do this, we can update the -help text too. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | target-i386: move cpu_reset and reset callback to cpu.cIgor Mammedov2012-08-011-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving reset callback into cpu object from board level and resetting cpu at the end of x86_cpu_realize() will allow properly create cpu object during run-time (hotplug) without calling reset externaly. When reset over QOM hierarchy is implemented, reset callback should be removed. v2: - leave cpu_reset in pc_new_cpu() for now, it's to be cleaned up when APIC init is moved in cpu.c Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | target-i386: move cpu halted decision into x86_cpu_resetIgor Mammedov2012-08-013-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MP initialization protocol differs between cpu families, and for P6 and onward models it is up to CPU to decide if it will be BSP using this protocol, so try to model this. However there is no point in implementing MP initialization protocol in qemu. Thus first CPU is always marked as BSP. This patch: - moves decision to designate BSP from board into cpu, making cpu self-sufficient in this regard. Later it will allow to cleanup hw/pc.c and remove cpu_reset and wrappers from there. - stores flag that CPU is BSP in IA32_APIC_BASE to model behavior described in Inted SDM vol 3a part 1 chapter 8.4.1 - uses MSR_IA32_APICBASE_BSP flag in apic_base for checking if cpu is BSP patch is based on Jan Kiszka's proposal: http://thread.gmane.org/gmane.comp.emulators.qemu/100806 Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | fix Xen compilationStefano Stabellini2012-08-011-3/+1
|/ | | | | | | | xen_pt_unregister_device is used as PCIUnregisterFunc, so it should match the type. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori2012-07-3033-248/+337
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mst/tags/for_anthony: msi/msix: added API to set MSI message address and data pci: Add INTx routing notifier pci: Add pci_device_route_intx_to_irq pci: Unregister BARs before device exit pci: convert PCIUnregisterFunc to void msix: Switch msix_uninit to return void msix: Allow full specification of MSIX layout msix: Split PBA into it's own MemoryRegion msix: Note endian TODO item msix: Move msix_mmio_read virtio: Convert to msix_init_exclusive_bar() interface ivshmem: Convert to msix_init_exclusive_bar() interface msix: Add simple BAR allocation MSIX setup functions msix: fix PCIDevice naming inconsistency msix: drop unused msix_bar_size, require valid bar_size
| * Merge branch pci into masterMichael S. Tsirkin2012-07-2933-248/+337
| |\ | | | | | | | | | | | | | | | | | | | | | Merge master and pci branch, resolve build breakage in hw/esp.c introduced by f90c2bcd. Conflicts: hw/esp.c
| | * msi/msix: added API to set MSI message address and dataAlexey Kardashevskiy2012-07-194-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added (msi|msix)_set_message() function for whoever might want to use them. Currently msi_notify()/msix_notify() write to these vectors to signal the guest about an interrupt so the correct values have to written there by the guest or QEMU. For example, POWER guest never initializes MSI/MSIX vectors, instead it uses RTAS hypercalls. So in order to support MSIX for virtio-pci on POWER we have to initialize MSI/MSIX message from QEMU. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * pci: Add INTx routing notifierJan Kiszka2012-07-193-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This per-device notifier shall be triggered by any interrupt router along the path of a device's legacy interrupt signal on routing changes. For simplicity reasons and as this is a slow path anyway, no further details on the routing changes are provided. Instead, the callback is expected to use pci_device_route_intx_to_irq to check the effect of the change. Will be used by KVM PCI device assignment and VFIO. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * pci: Add pci_device_route_intx_to_irqMichael S. Tsirkin2012-07-194-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device assigned on KVM needs to know the mode (enabled/inverted/disabled) and the IRQ number that a given device triggers in the attached interrupt controller. Add a PCI IRQ path discovery function that walks from a given device to the host bridge, and gets this information. For this purpose, a host bridge callback function is introduced: route_intx_to_irq. It is so far only implemented by the PIIX3, other host bridges can be added later on as required. Will be used for KVM PCI device assignment and VFIO. Based on patch by Jan Kiszka, with minor tweaks. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * pci: Unregister BARs before device exitAlex Williamson2012-07-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BARs are registered in init functions from memory regions created by the drivers. Exit functions destroy those memory regions. By unregistering the io regions after exit(), we're calling memory_region_del_subregion on freed memory. Don't do that. The option rom comes along for the ride because it's more symmetric to how it's created. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * pci: convert PCIUnregisterFunc to voidAlex Williamson2012-07-0425-83/+47
| | | | | | | | | | | | | | | | | | | | | | | | Not a single driver has any possibility of failure on their exit function, let's keep it that way. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * msix: Switch msix_uninit to return voidAlex Williamson2012-06-182-5/+5
| | | | | | | | | | | | | | | | | | | | | It can't fail. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * msix: Allow full specification of MSIX layoutAlex Williamson2012-06-182-99/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finally, complete the fully specified interface. msix_add_config() gets folded into msix_init() because we now have quite a few parameters to pass and rolling it in let's us error earlier, avoiding the ugly unwind exit path. msix_mmio_setup() also gets rolled in, just because it's redundant to rediscover offsets when we already have them for such a tiny function. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * msix: Split PBA into it's own MemoryRegionAlex Williamson2012-06-182-43/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | These don't have to be contiguous. Size them to only what they need and use separate MemoryRegions for the vector table and PBA. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * msix: Note endian TODO itemAlex Williamson2012-06-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | MSIX, like PCI, is little endian. Specifying native is wrong here, but we need to check the rest of the file to determine if it's as simple as flipping this macro. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * msix: Move msix_mmio_readAlex Williamson2012-06-181-10/+10
| | | | | | | | | | | | | | | | | | | | | What's this doing so far from msix_mmio_ops? Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * virtio: Convert to msix_init_exclusive_bar() interfaceAlex Williamson2012-06-182-11/+5
| | | | | | | | | | | | | | | | | | | | | Simple conversion. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * ivshmem: Convert to msix_init_exclusive_bar() interfaceAlex Williamson2012-06-181-7/+3
| | | | | | | | | | | | | | | | | | | | | Trivial conversion, failed to have an uninit before and after. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * msix: Add simple BAR allocation MSIX setup functionsAlex Williamson2012-06-183-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | msi_init() takes over a BAR without really specifying or allowing specification of how it does so. Instead, let's split it into two interfaces, one fully specified, and one trivially easy. This implements the latter. msix_init_exclusive_bar() takes over allocating and filling a PCI BAR _exclusively_ for the use of MSIX. When used, the matching msi_uninit_exclusive_bar() should be used to tear it down. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * msix: fix PCIDevice naming inconsistencyAlex Williamson2012-06-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | msix.h calls the PCIDevice * parameter "dev" almost everywhere except the msix_write_config declaration. Fix the inconsistency. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| | * msix: drop unused msix_bar_size, require valid bar_sizeJan Kiszka2012-06-183-21/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | No user in sight for msix_bar_size. bar_size for all users is aligned, let's simply require this instead of trying to fix up invalid input. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | | Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori2012-07-307-316/+785
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/scsi-next: (32 commits) virtio-scsi: enable MSI-X support virtio-scsi: add ioeventfd support virtio-scsi: report parameter change events virtio-scsi: do not report dropped events after reset virtio-scsi: Report missed events virtio-scsi: Implement hotplug support for virtio-scsi scsi: report parameter changes to HBA drivers scsi-disk: report resized disk via sense codes scsi: establish precedence levels for unit attention scsi: introduce hotplug() and hot_unplug() interfaces for SCSI bus scsi: add tracepoint for scsi_req_cancel scsi-disk: removable hard disks support load/eject scsi-disk: Fail medium writes with proper sense for readonly LUNs scsi-disk: improve the lba-out-of-range tests for read/write/verify scsi-disk: rd/wr/vr-protect !=0 is an error scsi-disk: support toggling the write cache scsi-disk: parse MODE SELECT commands and parameters scsi-disk: fix changeable values for MODE_PAGE_R_W_ERROR scsi-disk: adjust offsets in MODE SENSE by 2 scsi-disk: support emulated TO_DEV requests ...
| * | virtio-scsi: enable MSI-X supportPaolo Bonzini2012-07-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While virtio-scsi does support multiqueue, the default number of interrupt vectors is not enough to actually enable usage of multiple queues in the driver; this is because with only 2 vectors the driver will not be able to use a separate interrupt for each request queue. Derive the desired number of vectors from the number of request queues. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | virtio-scsi: add ioeventfd supportPaolo Bonzini2012-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Probably due to bad merge months ago, virtio-scsi-pci did not have ioeventfd support. Fix this and enable it by default, as is the case for other virtio-pci devices. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | virtio-scsi: report parameter change eventsPaolo Bonzini2012-07-271-0/+16
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | virtio-scsi: do not report dropped events after resetPaolo Bonzini2012-07-271-0/+1
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | virtio-scsi: Report missed eventsPaolo Bonzini2012-07-271-18/+36
| | | | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | virtio-scsi: Implement hotplug support for virtio-scsiCong Meng2012-07-271-2/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the hotplug() and hot_unplug() interfaces in virtio-scsi, by signal the virtio_scsi.ko in guest kernel via event virtual queue. The counterpart patch of virtio_scsi.ko will be sent soon in another thread. Signed-off-by: Sen Wang <senwang@linux.vnet.ibm.com> Signed-off-by: Cong Meng <mc@linux.vnet.ibm.com> [ Add memset, fix LUN field, placate checkpatch - Paolo ] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: report parameter changes to HBA driversPaolo Bonzini2012-07-273-0/+13
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi-disk: report resized disk via sense codesPaolo Bonzini2012-07-273-2/+29
| | | | | | | | | | | | | | | | | | | | | Linux will not use these, but a very similar mechanism will be used to report the condition via virtio-scsi events. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
OpenPOWER on IntegriCloud