aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm_main.c
diff options
context:
space:
mode:
authorZhang Xiantao <xiantao.zhang@intel.com>2007-11-15 10:07:47 -0500
committerAvi Kivity <avi@qumranet.com>2008-01-30 10:53:03 -0500
commit018d00d2fef27fc65f2917bec8f72b93615c18e1 (patch)
treef2591e8da457287195e138a62e2d34a8bdfbe14c /drivers/kvm/kvm_main.c
parenta7e6c88a78b7c3d67491bf90b2b95e66437dbdb6 (diff)
KVM: Portability: move KVM_CHECK_EXTENSION
Make KVM_CHECK_EXTENSION code into a function, all archs can define its capability independently. Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Acked-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r--drivers/kvm/kvm_main.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index e0f20d020281..c782f27265de 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1198,23 +1198,9 @@ static long kvm_dev_ioctl(struct file *filp,
1198 goto out; 1198 goto out;
1199 r = kvm_dev_ioctl_create_vm(); 1199 r = kvm_dev_ioctl_create_vm();
1200 break; 1200 break;
1201 case KVM_CHECK_EXTENSION: { 1201 case KVM_CHECK_EXTENSION:
1202 int ext = (long)argp; 1202 r = kvm_dev_ioctl_check_extension((long)argp);
1203
1204 switch (ext) {
1205 case KVM_CAP_IRQCHIP:
1206 case KVM_CAP_HLT:
1207 case KVM_CAP_MMU_SHADOW_CACHE_CONTROL:
1208 case KVM_CAP_USER_MEMORY:
1209 case KVM_CAP_SET_TSS_ADDR:
1210 r = 1;
1211 break;
1212 default:
1213 r = 0;
1214 break;
1215 }
1216 break; 1203 break;
1217 }
1218 case KVM_GET_VCPU_MMAP_SIZE: 1204 case KVM_GET_VCPU_MMAP_SIZE:
1219 r = -EINVAL; 1205 r = -EINVAL;
1220 if (arg) 1206 if (arg)