[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 29/48] hyperv: address HvSintRoute by X86CPU pointer
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 29/48] hyperv: address HvSintRoute by X86CPU pointer |
Date: |
Thu, 18 Oct 2018 22:31:56 +0200 |
From: Roman Kagan <address@hidden>
Use X86CPU pointer to refer to the respective HvSintRoute instead of
vp_index. This is more convenient and also paves the way for future
enhancements.
Signed-off-by: Roman Kagan <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/hyperv.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c
index 11fd1ad..0ce8a7a 100644
--- a/target/i386/hyperv.c
+++ b/target/i386/hyperv.c
@@ -18,7 +18,7 @@
struct HvSintRoute {
uint32_t sint;
- uint32_t vp_index;
+ X86CPU *cpu;
int gsi;
EventNotifier sint_set_notifier;
EventNotifier sint_ack_notifier;
@@ -97,6 +97,12 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index,
uint32_t sint,
HvSintRoute *sint_route;
EventNotifier *ack_notifier;
int r, gsi;
+ X86CPU *cpu;
+
+ cpu = hyperv_find_vcpu(vp_index);
+ if (!cpu) {
+ return NULL;
+ }
sint_route = g_new0(HvSintRoute, 1);
r = event_notifier_init(&sint_route->sint_set_notifier, false);
@@ -128,7 +134,7 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index,
uint32_t sint,
sint_route->gsi = gsi;
sint_route->sint_ack_clb = sint_ack_clb;
sint_route->sint_ack_clb_data = sint_ack_clb_data;
- sint_route->vp_index = vp_index;
+ sint_route->cpu = cpu;
sint_route->sint = sint;
return sint_route;
--
1.8.3.1
- [Qemu-devel] [PULL 25/48] hyperv_testdev: drop unnecessary includes, (continued)
- [Qemu-devel] [PULL 25/48] hyperv_testdev: drop unnecessary includes, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 10/48] target-i386: add i440fx 0xcf8 port as coalesced_pio, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 17/48] vl: refactor -rtc option references, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 15/48] i386: hvf: Remove hvf_disabled, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 14/48] i386: hvf: Fix register refs if REX is present, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 24/48] hyperv_testdev: refactor for better maintainability, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 23/48] scsi-disk: fix rerror/werror=ignore, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 22/48] scsi-disk: fix double completion of failing passthrough requests, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 26/48] hyperv: cosmetic: g_malloc -> g_new, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 27/48] hyperv: synic: only setup ack notifier if there's a callback, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 29/48] hyperv: address HvSintRoute by X86CPU pointer,
Paolo Bonzini <=
- [Qemu-devel] [PULL 35/48] default-configs: collect CONFIG_HYPERV* in hyperv.mak, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 37/48] hyperv:synic: split capability testing and setting, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 33/48] hyperv: make hyperv_vp_index inline, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 39/48] hyperv: only add SynIC in compatible configurations, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 34/48] hyperv: factor out arch-independent API into hw/hyperv, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 41/48] hyperv: add synic message delivery, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 30/48] hyperv: make HvSintRoute reference-counted, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 42/48] hyperv: add synic event flag signaling, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 28/48] hyperv: allow passing arbitrary data to sint ack callback, Paolo Bonzini, 2018/10/18
- [Qemu-devel] [PULL 31/48] hyperv: rename kvm_hv_sint_route_set_sint, Paolo Bonzini, 2018/10/18