summaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
authorRoman Kagan <rkagan@virtuozzo.com>2018-09-21 11:18:35 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-19 13:44:13 +0200
commit3d3e6e85c3ebd5cd551133af9bace084360307a3 (patch)
treeb4a318d46069a2ee8c18b62b86ad467164aa1115 /hw/misc
parent09cfb2f6350512eb3ef7e9e2136daabbcf265880 (diff)
hyperv: make HvSintRoute reference-counted
Multiple entities (e.g. VMBus devices) can use the same SINT route. To make their lives easier in maintaining SINT route ownership, make it reference-counted. Adjust the respective API names accordingly. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> Message-Id: <20180921081836.29230-8-rkagan@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/hyperv_testdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/misc/hyperv_testdev.c b/hw/misc/hyperv_testdev.c
index 1f32d3c9dd..dbf4e7e4ab 100644
--- a/hw/misc/hyperv_testdev.c
+++ b/hw/misc/hyperv_testdev.c
@@ -52,7 +52,7 @@ static void sint_route_create(HypervTestDev *dev,
sint_route->vp_index = vp_index;
sint_route->sint = sint;
- sint_route->sint_route = kvm_hv_sint_route_create(vp_index, sint, NULL, NULL);
+ sint_route->sint_route = hyperv_sint_route_new(vp_index, sint, NULL, NULL);
assert(sint_route->sint_route);
QLIST_INSERT_HEAD(&dev->sint_routes, sint_route, le);
@@ -79,7 +79,7 @@ static void sint_route_destroy(HypervTestDev *dev,
sint_route = sint_route_find(dev, vp_index, sint);
QLIST_REMOVE(sint_route, le);
- kvm_hv_sint_route_destroy(sint_route->sint_route);
+ hyperv_sint_route_unref(sint_route->sint_route);
g_free(sint_route);
}