History | View | Annotate | Download (14.4 kB)
virtio-blk: define VirtIOBlkConf
We will have to add another field to the virtio-blk configuration inthe next patch. Avoid a proliferation of arguments to virtio_blk_init.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-blk: always enable VIRTIO_BLK_F_SCSI
VIRTIO_BLK_F_SCSI is supposed to mean whether the host can parseSCSI requests, not execute them. You could run QEMU with scsi=onand a file-backed disk, and QEMU would fail all SCSI requests eventhough it advertises VIRTIO_BLK_F_SCSI....
S390: reboot: reset device pages on reboot
This patch fixes reboot on s390 by resetting the devicepage on reboot.
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
s390: reset avail and used index on reboot
reset the guest vring avail/used idx fields, otherwise it's possiblethat old values remain in memory which would cause a reboot to failwith a "Guest moved used index" message
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>...
s390x hw/: Don't use CPUState
Scripted conversion: for file in hw/s390-*.[hc]; do sed -i "s/CPUState/CPUS390XState/g" $file done
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-scsi: Add virtio-scsi stub device
Add a useless virtio SCSI HBA device:
qemu -device virtio-scsi-pci
Signed-off-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>
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types)Also, type_init() is a function, so add preceding blank line wherenecessary and don't put a semicolon after the closing brace....
s390x: fix qom-ification fall-out
Tested-by: Andreas Faerber <afaerber@suse.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: remove baked in notion of aliases (v2)
Limit them to the device_add functionality. Device aliases were a hack basedon the fact that virtio was modeled the wrong way. The mechanism for aliasingis very limited in that only one alias can exist for any device....
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
qdev: kill off DeviceInfo
It is no longer used in the tree since everything is done natively throughQEMU Object Model.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-s390: convert to QEMU Object Model
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus.Converting subclasses independently of their base class is prohibitively hard.
[S390] Add hotplug support
I just submitted a few patches that enable the s390 virtio bus to receivea hotplug add event. This patch implements the qemu side of it, so that newhotplug events can be submitted to the guest.
Signed-off-by: Alexander Graf <agraf@suse.de>...
virtio: add and use virtio_set_features
vdev->guest_features is not masking features that are not supported bythe guest. Fix this by introducing a common wrapper to be used by allvirtio bus implementations.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qdev: switch children device list to QTAILQ
SCSI buses will need to read the children list first-to-last. Thisrequires using a QTAILQ, because hell breaks loose if you just tryinserting at the tail (thus reversing the order of all existingvisits from last-to-first to first-to-tail)....
s390-virtio: use specific endian ld/st_phys
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
virtio-blk: Turn drive serial into a qdev property
It needs to be a qdev property, because it belongs to the drive'sguest part. Precedence: commit a0fef654 and 6ced55a5.
Bonus: info qtree now shows the serial number.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
s390x: keep hint on virtio managing size
The s390x virtio bus keeps management information on virtio after the topof the guest's RAM. We need to be able to tell the guest the size of itsRAM (without virtio stuff), but also be able to trap when the guest accesses...
s390x: Dispatch interrupts to KVM or the real CPU
The KVM interrupt injection path is non-generic for now. So we need to pushknowledge of how to inject a device interrupt using KVM into the actual devicecode.
Replace cpu_physical_memory_rw were possible
Using cpu_physical_memory_read, cpu_physical_memory_write and ldub_physimproves readability and allows removing some type casts.
lduw_phys and ldl_phys were not used because both require alignedaddresses. Therefore it is not possible to simply replace existing...
s390x: fix virtio feature bitmap
The feature bitmap in the s390 virtio machine is little endian. Toaddress for that, we need to bswap the values after reading them out.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
s390x: fix s390-virtio-serial
Commit 6b331efb733a0f913ddc0b7762a1307dec304061 broke the s390 proxy versionof virtio-serial by only taking its PCI brother into account.
So let's adjust s390-virtio-serial the same way as its PCI counterpart, makingit compile and work again....
virtio: use generic name when possible
We have two different virtio buses: pci and s390. The abstraction pathtaken in qemu is to have generic aliases for each device type in thearchitecture specific qdev devices.
So let's make use of these aliases whenever we can and define them...
virtio-net: Introduce a new bottom half packet TX
Based on a patch from Mark McLoughlin, this patch introduces a newbottom half packet transmitter that avoids the latency imposed bythe tx_timer approach. Rather than scheduling a timer when a TXpacket comes in, schedule a bottom half to be run from the iothread....
virtio-net: Limit number of packets sent per TX flush
If virtio_net_flush_tx() is called with notification disabled, we canrace with the guest, processing packets at the same rate as theyget produced. The trouble is that this means we have no guaranteed...
virtio-net: Make tx_timer timeout configurable
Add an option to make the TX mitigation timer adjustable as a deviceoption. The 150us hard coded default used currently is reasonable,but may not be suitable for all workloads, this gives us a way toadjust it using a single binary. We can't support any random option...
Implement virtio reset
The guest may issue a RESET command for virtio. So far we didn't botherto implement it, but with my new bootloader we actually need it for Linuxto get back to a safe state.
virtio: add set_status callback
vhost net backend needs to be notified whenfrontend status changes. Add a callback,similar to set_features.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
s390-virtio: Fix compile error for virtio-block init
Commit 428c149b0be790b440e1cbee185b152cdb22feec modified the argumentthat virtio_blk_init takes. Update the s390 bus code that calls thisfunction.
Signed-off-by: Amit Shah <amit.shah@redhat.com>CC: Christoph Hellwig <hch@lst.de>...
block: add topology qdev properties
Add three new qdev properties to export block topology information tothe guest. This is needed to get optimal I/O alignment for RAID arraysor SSDs.
The options are:
- physical_block_size to specify the physical block size of the device,...
virtio-console: qdev conversion, new virtio-serial-bus
This commit converts the virtio-console device to create a newvirtio-serial bus that can host console and generic serial ports. Thefile hosting this code is now called virtio-serial-bus.c.
The virtio console is now a very simple qdev device that sits on the...
virtio: rename features -> guest_features
Rename features->guest_features. This iswhat they are, avoid confusion withhost features which we also need to keep around.
virtio: add features as qdev properties
Add feature bits as properties to virtio. This makes it possible to e.g. definemachine without indirect buffer support, which is required for 0.10compatibility, or without hardware checksum support, which is required for 0.11...
S390: Don't tell guest we're updating config space
Currently we always set the "config space changed" bit to 1 when triggeringany virtio interrupt. While that worked in 2.6.27, newer kernels interpretthat value as "only the config space changed and nothing else happened"....
Add S390x virtio machine bus
On S390x we don't want to go through the hassle of emulating real existinghardware, because we don't need to for running Linux.
So let's instead implement a machine that is 100% based on VirtIO which wefortunately implement already....