aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2008-12-08 11:25:27 -0500
committerAvi Kivity <avi@redhat.com>2008-12-31 09:55:46 -0500
commit1a811b6167089bcdb84284f2dc9fd0b4d0f1899d (patch)
tree6a5d9fbf78475dd7fe2f0b85aa98dd8b82b660d8 /virt/kvm
parent7f59f492da722eb3551bbe1f8f4450a21896f05d (diff)
KVM: Advertise the bug in memory region destruction as fixed
Userspace might need to act differently. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/kvm_main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index e7644b90667e..e066eb125e55 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1905,6 +1905,17 @@ static int kvm_dev_ioctl_create_vm(void)
1905 return fd; 1905 return fd;
1906} 1906}
1907 1907
1908static long kvm_dev_ioctl_check_extension_generic(long arg)
1909{
1910 switch (arg) {
1911 case KVM_CAP_DESTROY_MEMORY_REGION_WORKS:
1912 return 1;
1913 default:
1914 break;
1915 }
1916 return kvm_dev_ioctl_check_extension(arg);
1917}
1918
1908static long kvm_dev_ioctl(struct file *filp, 1919static long kvm_dev_ioctl(struct file *filp,
1909 unsigned int ioctl, unsigned long arg) 1920 unsigned int ioctl, unsigned long arg)
1910{ 1921{
@@ -1924,7 +1935,7 @@ static long kvm_dev_ioctl(struct file *filp,
1924 r = kvm_dev_ioctl_create_vm(); 1935 r = kvm_dev_ioctl_create_vm();
1925 break; 1936 break;
1926 case KVM_CHECK_EXTENSION: 1937 case KVM_CHECK_EXTENSION:
1927 r = kvm_dev_ioctl_check_extension(arg); 1938 r = kvm_dev_ioctl_check_extension_generic(arg);
1928 break; 1939 break;
1929 case KVM_GET_VCPU_MMAP_SIZE: 1940 case KVM_GET_VCPU_MMAP_SIZE:
1930 r = -EINVAL; 1941 r = -EINVAL;