qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC 2 PATCH 14/16] hw/i386: Introduce epyc mode function h


From: Moger, Babu
Subject: [Qemu-devel] [RFC 2 PATCH 14/16] hw/i386: Introduce epyc mode function handlers
Date: Fri, 6 Sep 2019 19:13:16 +0000

Introduce following handlers for new epyc mode.
x86_apicid_from_cpu_idx_epyc: Generate apicid from cpu index.
x86_topo_ids_from_apicid_epyc: Generate topo ids from apic id.
x86_apicid_from_topo_ids_epyci: Generate apicid from topo ids.

Signed-off-by: Babu Moger <address@hidden>
---
 hw/i386/pc.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 14760523a9..59c7c4d8b2 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -2824,6 +2824,11 @@ static void pc_machine_set_epyc(Object *obj, bool value, 
Error **errp)
 
     pcms->epyc = value;
     ms->epyc = value;
+    if (pcms->epyc) {
+        pcms->apicid_from_cpu_idx = x86_apicid_from_cpu_idx_epyc;
+        pcms->topo_ids_from_apicid = x86_topo_ids_from_apicid_epyc;
+        pcms->apicid_from_topo_ids = x86_apicid_from_topo_ids_epyc;
+    }
 }
 
 static void pc_machine_initfn(Object *obj)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]