x86: Use the right register type when initializing x86 kvm processes.
authorGabe Black <gabe.black@gmail.com>
Wed, 16 Dec 2020 01:36:26 +0000 (17:36 -0800)
committerGabe Black <gabe.black@gmail.com>
Wed, 16 Dec 2020 09:03:48 +0000 (09:03 +0000)
Functionally this doesn't matter, since no bitfields are used in the
type and it devolves into just being a uint64_t, but we should use CR8
and not CR4 when initializing the CR8 register.

Change-Id: Ifc7dc9072d552f7010afce9115427c8ed624ebb9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38535
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
src/arch/x86/process.cc

index e11d563f9965fbb4054842c60dbab459f1b64e00..e9cdb617c63afebd69450859417b3c20cbc9c9ba 100644 (file)
@@ -387,7 +387,7 @@ X86_64Process::initState()
 
             tc->setMiscReg(MISCREG_CR4, cr4);
 
-            CR4 cr8 = 0;
+            CR8 cr8 = 0;
             tc->setMiscReg(MISCREG_CR8, cr8);
 
             tc->setMiscReg(MISCREG_MXCSR, 0x1f80);