aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/vmm/intel
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2014-04-05 22:43:23 +0000
committerWarner Losh <imp@FreeBSD.org>2014-04-05 22:43:23 +0000
commit0e30c5c0b4639346dd7d4b7ef2504d6b765b869d (patch)
tree878fec74ac5f34baad35bb1855807f9db1dca56c /sys/amd64/vmm/intel
parentb7df74ee5a5351e2c67af60b9cfdd4ee54f8fa25 (diff)
downloadsrc-0e30c5c0b4639346dd7d4b7ef2504d6b765b869d.tar.gz
src-0e30c5c0b4639346dd7d4b7ef2504d6b765b869d.zip
Make the vmm code compile with gcc too. Not entirely sure things are
correct for the pirbase test (since I'd have thought we'd need to do something even when the offset is 0 and that test looks like a misguided attempt to not use an uninitialized variable), but it is at least the same as today.
Notes
Notes: svn path=/head/; revision=264179
Diffstat (limited to 'sys/amd64/vmm/intel')
-rw-r--r--sys/amd64/vmm/intel/vmx.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c
index 54322968530a..31fff50135f9 100644
--- a/sys/amd64/vmm/intel/vmx.c
+++ b/sys/amd64/vmm/intel/vmx.c
@@ -1048,6 +1048,7 @@ vmx_set_pcpu_defaults(struct vmx *vmx, int vcpu, pmap_t pmap)
invvpid_desc._res1 = 0;
invvpid_desc._res2 = 0;
invvpid_desc.vpid = vmxstate->vpid;
+ invvpid_desc.linear_addr = 0;
invvpid(INVVPID_TYPE_SINGLE_CONTEXT, invvpid_desc);
} else {
/*
@@ -2742,7 +2743,7 @@ vmx_inject_pir(struct vlapic *vlapic)
struct pir_desc *pir_desc;
struct LAPIC *lapic;
uint64_t val, pirval;
- int rvi, pirbase;
+ int rvi, pirbase = -1;
uint16_t intr_status_old, intr_status_new;
vlapic_vtx = (struct vlapic_vtx *)vlapic;
@@ -2787,6 +2788,11 @@ vmx_inject_pir(struct vlapic *vlapic)
pirbase = 192;
pirval = val;
}
+ if (pirbase == -1) {
+ VCPU_CTR0(vlapic->vm, vlapic->vcpuid, "vmx_inject_pir: "
+ "no posted interrupt found");
+ return;
+ }
VLAPIC_CTR_IRR(vlapic, "vmx_inject_pir");
/*