Commit b5b1de35 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio/vhost updates from Michael Tsirkin:
 "Fixes and tweaks:

   - virtio balloon page hinting support

   - vhost scsi control queue

   - misc fixes"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  MAINTAINERS: remove reference to bogus vsock file
  vhost/scsi: Use common handling code in request queue handler
  vhost/scsi: Extract common handling code from control queue handler
  vhost/scsi: Respond to control queue operations
  vhost/scsi: truncate T10 PI iov_iter to prot_bytes
  virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON
  mm/page_poison: expose page_poisoning_enabled to kernel modules
  virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
  kvm_config: add CONFIG_VIRTIO_MENU
parents 90de1fb8 79f800b2
...@@ -15858,7 +15858,6 @@ F: net/vmw_vsock/virtio_transport_common.c ...@@ -15858,7 +15858,6 @@ F: net/vmw_vsock/virtio_transport_common.c
F: net/vmw_vsock/virtio_transport.c F: net/vmw_vsock/virtio_transport.c
F: drivers/net/vsockmon.c F: drivers/net/vsockmon.c
F: drivers/vhost/vsock.c F: drivers/vhost/vsock.c
F: drivers/vhost/vsock.h
F: tools/testing/vsock/ F: tools/testing/vsock/
VIRTIO CONSOLE DRIVER VIRTIO CONSOLE DRIVER
......
This diff is collapsed.
This diff is collapsed.
...@@ -34,15 +34,23 @@ ...@@ -34,15 +34,23 @@
#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */ #define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
#define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */ #define VIRTIO_BALLOON_F_STATS_VQ 1 /* Memory Stats virtqueue */
#define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */ #define VIRTIO_BALLOON_F_DEFLATE_ON_OOM 2 /* Deflate balloon on OOM */
#define VIRTIO_BALLOON_F_FREE_PAGE_HINT 3 /* VQ to report free pages */
#define VIRTIO_BALLOON_F_PAGE_POISON 4 /* Guest is using page poisoning */
/* Size of a PFN in the balloon interface. */ /* Size of a PFN in the balloon interface. */
#define VIRTIO_BALLOON_PFN_SHIFT 12 #define VIRTIO_BALLOON_PFN_SHIFT 12
#define VIRTIO_BALLOON_CMD_ID_STOP 0
#define VIRTIO_BALLOON_CMD_ID_DONE 1
struct virtio_balloon_config { struct virtio_balloon_config {
/* Number of pages host wants Guest to give up. */ /* Number of pages host wants Guest to give up. */
__u32 num_pages; __u32 num_pages;
/* Number of pages we've actually got in balloon. */ /* Number of pages we've actually got in balloon. */
__u32 actual; __u32 actual;
/* Free page report command id, readonly by guest */
__u32 free_page_report_cmd_id;
/* Stores PAGE_POISON if page poisoning is in use */
__u32 poison_val;
}; };
#define VIRTIO_BALLOON_S_SWAP_IN 0 /* Amount of memory swapped in */ #define VIRTIO_BALLOON_S_SWAP_IN 0 /* Amount of memory swapped in */
......
...@@ -20,6 +20,7 @@ CONFIG_PARAVIRT=y ...@@ -20,6 +20,7 @@ CONFIG_PARAVIRT=y
CONFIG_KVM_GUEST=y CONFIG_KVM_GUEST=y
CONFIG_S390_GUEST=y CONFIG_S390_GUEST=y
CONFIG_VIRTIO=y CONFIG_VIRTIO=y
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_PCI=y CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_BLK=y CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_CONSOLE=y CONFIG_VIRTIO_CONSOLE=y
......
...@@ -17,6 +17,11 @@ static int __init early_page_poison_param(char *buf) ...@@ -17,6 +17,11 @@ static int __init early_page_poison_param(char *buf)
} }
early_param("page_poison", early_page_poison_param); early_param("page_poison", early_page_poison_param);
/**
* page_poisoning_enabled - check if page poisoning is enabled
*
* Return true if page poisoning is enabled, or false if not.
*/
bool page_poisoning_enabled(void) bool page_poisoning_enabled(void)
{ {
/* /*
...@@ -29,6 +34,7 @@ bool page_poisoning_enabled(void) ...@@ -29,6 +34,7 @@ bool page_poisoning_enabled(void)
(!IS_ENABLED(CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC) && (!IS_ENABLED(CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC) &&
debug_pagealloc_enabled())); debug_pagealloc_enabled()));
} }
EXPORT_SYMBOL_GPL(page_poisoning_enabled);
static void poison_page(struct page *page) static void poison_page(struct page *page)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment