History | View | Annotate | Download (7.3 kB)
virtio-balloon: avoid cpu_get_physical_page_desc()
This reaches into the innards of the memory core, which are beingchanged. Switch to a memory API version.
Signed-off-by: Avi Kivity <avi@redhat.com>
qapi: Convert query-balloon
Please, note that some of the code supporting memory statistics isstill around (eg. virtio_balloon_receive_stats() and reset_stats()).
Also, the qmp_query_balloon() function is synchronous and thus doesn'tmake any use of the (not fully working) monitor's asynchronous command...
virtio-balloon: Disassociate from the balloon handlers on unplug
Adding a 2nd balloon device after unplugging the first one doesn't work.Also, the 'info balloon' command should indicate an error mentioning noballoon device is registered after unplug.
Reproduction steps given by Shaolong Hu:...
virtio-balloon: Add exit handler, fix memleaks
Add an exit handler that will free up RAM after a virtio-balloon deviceis unplugged.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>
virtio-balloon: Unregister savevm section on device unplug
Migrating after unplugging a virtio-balloon device resulted in an errormessage on the destination:
Unknown savevm section or instance '0000:00:04.0/virtio-balloon' 0load of migration failed
Fix this by unregistering the section on device unplug....
virtio-balloon: Separate status handling into separate function
Separate out the code to retrieve balloon info from the code that setsballoon values.
This will be used to separate the two callbacks from balloon.c and helpcope with 'balloon 0' on the monitor. Currently, 'balloon 0' causes a...
balloon: Separate out stat and balloon handling
Passing on '0' as ballooning target to indicate retrieval of stats isbad API. It also makes 'balloon 0' in the monitor cause a segfault.Have two different functions handle the different functionality instead....
virtio-balloon: Fix header comment; add Copyright
Signed-off-by: Amit Shah <amit.shah@redhat.com>
virtio-balloon: Check if balloon registration failed
Multiple balloon registrations are not allowed; check if theregistration with the qemu balloon api succeeded. If not, fail thedevice init.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>...
Remove unused sysemu.h include directives
Remove unused sysemu.h include directives to speed up buildwith the following patches.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
virtio-balloon: fixed endianness bug in the config space
The specification for the virtio balloon device requres that the valuesin the config space be encoded little-endian. This differs from mostvirtio things, where guest-native endian is the norm.
Currently, the qemu virtio-balloon code correctly makes the conversion...
disable guest-provided stats on "info balloon" command
The addition of memory stats reporting to the virtio balloon causesthe 'info balloon' command to become asynchronous. This is a regressionbecause in some cases it can hang the user monitor.
This is an alternative to Adam Litke's patch. Adam's patch disabled the...
Introduce qemu_madvise()
vl.c has a Sun-specific hack to supply a prototype for madvise(),but the call site has apparently moved to arch_init.c.
Haiku doesn't implement madvise() in favor of posix_madvise().OpenBSD and Solaris 10 don't implement posix_madvise() but madvise()....
savevm: Add DeviceState param
When available, we'd like to be able to access the DeviceStatewhen registering a savevm. For buses with a get_dev_path()function, this will allow us to create more unique savevmid strings.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>...
iov: Add iov_to_buf and iov_size helpers
iov_to_buf() puts the buffer contents in the iov in a linearized buffer.
iov_size() gets the length of the contents in the iov.
The iov_to_buf() function is the memcpy_to_iovec() function that wasused in virtio-ballon.c....
balloon: Fix overflow when reporting actual memory size
Beginning with its introduction, the virtio balloon has had an overflow errorthat causes 'info balloon' to misreport the actual memory size when the balloonitself becomes larger than 4G. Use a cast when converting dev->actual from...
balloon: Do not save VM state wrt asynchronous virtio operations
When working with the VM state (for loadvm/savevm and migration), it is notvalid to load and store pointers since the validity of those pointers cannot beassured in the new qemu address space. Therefore, virtio_balloon_save() and...
virtio: Add memory statistics reporting to the balloon driver
When using ballooning to manage overcommitted memory on a host, a system forguests to communicate their memory usage to the host can provide informationthat will minimize the impact of ballooning on the guests. The current method...
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...
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
Separate virtio PCI code
Split the PCI host bindings from the VRing transport implementation.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Virtio-balloon qdev conversion
Virtio-net qdev conversion
Yet more phys_ram_base elimination.
Signed-off-by: Paul Brook <paul@cofdesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7067 c046a42c-6fe2-441c-8c8c-71466251a162
Add and use #defines for PCI device classes
This patch adds and uses #defines for PCI device classes and subclases,using a new pci_config_set_class() function, similar to the recentlyadded pci_config_set_vendor_id() and pci_config_set_device_id().
Change since v1: fixed compilation of hw/sun4u.c...
Use the default subsystem vendor ID for virtio devices (Mark McLoughlin)
A subsystem vendor ID of zero isn't allowed, so we use ourdefault ID.
Gerd points out that although the PCI subsystem vendor ID istreated by the guest as the virtio vendor ID:
/* we use the subsystem vendor/device id as the virtio vendor/device...
pci: virtio: use pci id defines (Gerd Hoffman)
Use the defines added by the previous patch in the virtio drivers.Also remove the pointless vendor and device args from thevirtio_blk_init() function.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Add virtio-balloon support
This adds a VirtIO based balloon driver. It uses madvise() to actually balloonthe memory when possible.
Until 2.6.27, KVM forced memory pinning so we must disable ballooning unless thekernel actually supports it when using KVM. It's always safe when using TCG....