mirror of
https://github.com/torvalds/linux.git
synced 2024-09-20 06:53:04 +00:00
x86/hyperv: use helpers to read control registers in hv_snp_boot_ap()
Use native_read_cr*() helpers to read control registers into vmsa->cr* instead of open-coded assembly. No functional change intended, unless there was a purpose to specifying rax. Signed-off-by: Yosry Ahmed <yosryahmed@google.com> Link: https://lore.kernel.org/r/20240805201247.427982-1-yosryahmed@google.com Signed-off-by: Wei Liu <wei.liu@kernel.org> Message-ID: <20240805201247.427982-1-yosryahmed@google.com>
This commit is contained in:
parent
87c9741a38
commit
0b5530861e
|
@ -321,9 +321,9 @@ int hv_snp_boot_ap(u32 cpu, unsigned long start_ip)
|
|||
|
||||
vmsa->efer = native_read_msr(MSR_EFER);
|
||||
|
||||
asm volatile("movq %%cr4, %%rax;" : "=a" (vmsa->cr4));
|
||||
asm volatile("movq %%cr3, %%rax;" : "=a" (vmsa->cr3));
|
||||
asm volatile("movq %%cr0, %%rax;" : "=a" (vmsa->cr0));
|
||||
vmsa->cr4 = native_read_cr4();
|
||||
vmsa->cr3 = __native_read_cr3();
|
||||
vmsa->cr0 = native_read_cr0();
|
||||
|
||||
vmsa->xcr0 = 1;
|
||||
vmsa->g_pat = HV_AP_INIT_GPAT_DEFAULT;
|
||||
|
|
Loading…
Reference in New Issue
Block a user