Thread (38 messages) 38 messages, 5 authors, 2019-03-29

Re: [PATCH v7 5/10] KVM: arm/arm64: preserve host MDCR_EL2 value

From: Amit Daniel Kachhap <hidden>
Date: 2019-03-26 03:55:45
Also in: kvmarm, lkml

Hi,

On 3/26/19 1:34 AM, Kristina Martsenko wrote:
On 19/03/2019 08:30, Amit Daniel Kachhap wrote:
quoted
Save host MDCR_EL2 value during kvm HYP initialisation and restore
after every switch from host to guest. There should not be any
change in functionality due to this.

The value of mdcr_el2 is now stored in struct kvm_cpu_context as
both host and guest can now use this field in a common way.

Signed-off-by: Amit Daniel Kachhap <redacted>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <redacted>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Christoffer Dall <redacted>
Cc: kvmarm@lists.cs.columbia.edu
[...]
quoted
  /**
- * kvm_arm_init_debug - grab what we need for debug
- *
- * Currently the sole task of this function is to retrieve the initial
- * value of mdcr_el2 so we can preserve MDCR_EL2.HPMN which has
- * presumably been set-up by some knowledgeable bootcode.
- *
- * It is called once per-cpu during CPU hyp initialisation.
- */
-
-void kvm_arm_init_debug(void)
-{
-	__this_cpu_write(mdcr_el2, kvm_call_hyp_ret(__kvm_get_mdcr_el2));
-}
The __kvm_get_mdcr_el2 function is no longer used anywhere, so can also
be removed.
Nice catch. Will do.

Thanks,
Amit D
Thanks,
Kristina
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help