summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2011-08-09 22:29:33 +0000
committerRobert Mustacchi <rm@joyent.com>2011-08-09 22:29:33 +0000
commit9e5869ee0361462beb09936ef2b466a671988eea (patch)
tree659554527b31a482111ecec62525cc56418a6f00
parent2a9ff8dc8d9c433fc5c37c3f29d89853e1ed744d (diff)
downloadillumos-kvm-9e5869ee0361462beb09936ef2b466a671988eea.tar.gz
HVM-589 XXX cleanup wave
-rw-r--r--kvm.c21
-rw-r--r--kvm_host.h3
-rw-r--r--kvm_vmx.c3
-rw-r--r--kvm_x86.c4
4 files changed, 3 insertions, 28 deletions
diff --git a/kvm.c b/kvm.c
index 3dcd3b4..5fc7599 100644
--- a/kvm.c
+++ b/kvm.c
@@ -451,16 +451,7 @@ kvm_ctx_restore(void *arg)
inline int
kvm_is_mmio_pfn(pfn_t pfn)
{
- if (pfn != PFN_INVALID) {
-#ifdef XXX
- struct page *page = compound_head(pfn_to_page(pfn));
- return (PageReserved(page));
-#else
- XXX_KVM_PROBE;
-#endif
- return (0);
- } else
- return (1);
+ return (pfn == PFN_INVALID);
}
/*
@@ -588,7 +579,6 @@ static void
kvm_destroy_vm(struct kvm *kvmp)
{
int ii;
- void *cookie;
if (kvmp == NULL)
return;
@@ -605,13 +595,6 @@ kvm_destroy_vm(struct kvm *kvmp)
kvm_coalesced_mmio_free(kvmp);
list_remove(&vm_list, kvmp);
- /*
- * XXX: The fact that we're cleaning these up here means that we aren't
- * properly cleaning them up somewhere else.
- */
- cookie = NULL;
- while (avl_destroy_nodes(&kvmp->kvm_avlmp, &cookie) != NULL)
- continue;
avl_destroy(&kvmp->kvm_avlmp);
mutex_destroy(&kvmp->kvm_avllock);
mutex_destroy(&kvmp->memslots_lock);
@@ -2671,7 +2654,7 @@ kvm_ioctl(dev_t dev, int cmd, intptr_t arg, int md, cred_t *cr, int *rv)
}
/*
- * XXX This really just shouldn't need to exist, etc. and we
+ * This really just shouldn't need to exist, etc. and we
* should really get the hiwat value more intelligently at least
* a #define or a tunable god forbid. Oh well, as bmc said
* earlier:
diff --git a/kvm_host.h b/kvm_host.h
index 2ca8201..13b6a39 100644
--- a/kvm_host.h
+++ b/kvm_host.h
@@ -464,9 +464,6 @@ extern int kvm_vcpu_is_bsp(struct kvm_vcpu *);
extern void kvm_sigprocmask(int how, sigset_t *, sigset_t *);
-/*
- * XXX Is this really necessary? There really isn't another way to do it?
- */
#define offset_in_page(p) ((unsigned long)(p) & ~PAGEMASK)
#define page_to_pfn(page) (page->p_pagenum)
diff --git a/kvm_vmx.c b/kvm_vmx.c
index 6f11512..6610fe8 100644
--- a/kvm_vmx.c
+++ b/kvm_vmx.c
@@ -2973,8 +2973,7 @@ vmx_interrupt_allowed(struct kvm_vcpu *vcpu)
(GUEST_INTR_STATE_STI | GUEST_INTR_STATE_MOV_SS)));
}
-/* XXX Should be static! */
-int
+static int
vmx_set_tss_addr(struct kvm *kvmp, uintptr_t addr)
{
int ret;
diff --git a/kvm_x86.c b/kvm_x86.c
index ed3fb97..f272e2b 100644
--- a/kvm_x86.c
+++ b/kvm_x86.c
@@ -2051,10 +2051,6 @@ kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu,
int
kvm_vm_ioctl_set_tss_addr(struct kvm *kvmp, uintptr_t addr)
{
- /*
- * XXX They have some other code here to check the validity of the
- * address
- */
return (kvm_x86_ops->set_tss_addr(kvmp, addr));
}