Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a driver for the virtio-balloon device, allowing the monitor to manage the memory footprint of a Nanos instance by inflating and deflating balloon pages. The driver responds to changes applied to the balloon device's PCI config space, which is managed by registration of a handler via a newly-added vtpci_register_config_change_handler interface. An interface has also been added to allow mm_service() to deflate balloon pages when memory resources are at a minimum.
To accommodate config change interrupts for non-MSIX platforms, the non-MSIX vtpci interrupt handler is now registered only once per device and, upon invocation, dispatches queue and config change handlers based on pending bits in the ISR status register.
This driver supports the "statsq," if offered by the device, which reports memory usage, page faults and pagecache usage to the monitor when requested.
Resolves #660