[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/23] hyperv: helper to find vcpu by VP index
From: |
Roman Kagan |
Subject: |
[Qemu-devel] [PATCH 06/23] hyperv: helper to find vcpu by VP index |
Date: |
Tue, 6 Jun 2017 21:19:31 +0300 |
Locate the vcpu by its VP index (equal to QEMU cpu_index).
Signed-off-by: Roman Kagan <address@hidden>
---
target/i386/hyperv.h | 1 +
target/i386/hyperv.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/target/i386/hyperv.h b/target/i386/hyperv.h
index 35da0b1..c5843c9 100644
--- a/target/i386/hyperv.h
+++ b/target/i386/hyperv.h
@@ -40,5 +40,6 @@ void kvm_hv_sint_route_destroy(HvSintRoute *sint_route);
int kvm_hv_sint_route_set_sint(HvSintRoute *sint_route);
uint32_t hyperv_vp_index(X86CPU *cpu);
+X86CPU *hyperv_find_vcpu(uint32_t vcpu_id);
#endif
diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c
index 27de5bc..480bdfe 100644
--- a/target/i386/hyperv.c
+++ b/target/i386/hyperv.c
@@ -21,6 +21,11 @@ uint32_t hyperv_vp_index(X86CPU *cpu)
return CPU(cpu)->cpu_index;
}
+X86CPU *hyperv_find_vcpu(uint32_t vp_index)
+{
+ return X86_CPU(qemu_get_cpu(vp_index));
+}
+
int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit)
{
CPUX86State *env = &cpu->env;
--
2.9.4
- [Qemu-devel] [PATCH 00/23] hyperv fixes and enhancements, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 04/23] hyperv: ensure msrs are inited properly, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 03/23] hyperv: set partition-wide MSRs only on first vcpu, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 01/23] hyperv: add header with protocol definitions, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 02/23] update-linux-headers: prepare for hyperv.h removal, Roman Kagan, 2017/06/06
- [Qemu-devel] [PATCH 06/23] hyperv: helper to find vcpu by VP index,
Roman Kagan <=
- [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Roman Kagan, 2017/06/06
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Eduardo Habkost, 2017/06/13
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Roman Kagan, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Paolo Bonzini, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Igor Mammedov, 2017/06/14
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Roman Kagan, 2017/06/15
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Paolo Bonzini, 2017/06/15
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Igor Mammedov, 2017/06/15
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Roman Kagan, 2017/06/15
- Re: [Qemu-devel] [PATCH 05/23] hyperv: ensure VP index equal to QEMU cpu_index, Eduardo Habkost, 2017/06/18