qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH V4 6/6] target-arm: Implement kvm_arch_reset_vcpu() for KVM ARM64
@ 2014-05-05  9:01 Pranavkumar Sawargaonkar
  2014-05-05  9:57 ` Andreas Färber
  0 siblings, 1 reply; 3+ messages in thread
From: Pranavkumar Sawargaonkar @ 2014-05-05  9:01 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, Anup Patel, patches, robherring2, kvmarm,
	christoffer.dall, Pranavkumar Sawargaonkar

To implement kvm_arch_reset_vcpu(), we simply re-init the VCPU
using kvm_arm_vcpu_init() so that all registers of VCPU are set
to their reset values by in-kernel KVM code.

Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Signed-off-by: Anup Patel <anup.patel@linaro.org>
---
 target-arm/kvm64.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c
index f7cc3ef..4855b4b 100644
--- a/target-arm/kvm64.c
+++ b/target-arm/kvm64.c
@@ -259,4 +259,8 @@ int kvm_arch_get_registers(CPUState *cs)
 
 void kvm_arch_reset_vcpu(CPUState *cs)
 {
+    /* Re-init VCPU so that all registers are set to
+     * their respective reset values.
+     */
+    kvm_arm_vcpu_init(cs, 0x0);
 }
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [RFC PATCH V4 6/6] target-arm: Implement kvm_arch_reset_vcpu() for KVM ARM64
  2014-05-05  9:01 [Qemu-devel] [RFC PATCH V4 6/6] target-arm: Implement kvm_arch_reset_vcpu() for KVM ARM64 Pranavkumar Sawargaonkar
@ 2014-05-05  9:57 ` Andreas Färber
  2014-05-05 10:29   ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2014-05-05  9:57 UTC (permalink / raw)
  To: Pranavkumar Sawargaonkar, qemu-devel
  Cc: peter.maydell, Anup Patel, patches, robherring2, Paolo Bonzini,
	kvmarm, christoffer.dall

Am 05.05.2014 11:01, schrieb Pranavkumar Sawargaonkar:
> To implement kvm_arch_reset_vcpu(), we simply re-init the VCPU
> using kvm_arm_vcpu_init() so that all registers of VCPU are set
> to their reset values by in-kernel KVM code.
> 
> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
> Signed-off-by: Anup Patel <anup.patel@linaro.org>
> ---
>  target-arm/kvm64.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c
> index f7cc3ef..4855b4b 100644
> --- a/target-arm/kvm64.c
> +++ b/target-arm/kvm64.c
> @@ -259,4 +259,8 @@ int kvm_arch_get_registers(CPUState *cs)
>  
>  void kvm_arch_reset_vcpu(CPUState *cs)
>  {
> +    /* Re-init VCPU so that all registers are set to
> +     * their respective reset values.
> +     */
> +    kvm_arm_vcpu_init(cs, 0x0);
>  }
> 

CC'ing Paolo, who was about to drop kvm_arch_reset_vcpu().

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [RFC PATCH V4 6/6] target-arm: Implement kvm_arch_reset_vcpu() for KVM ARM64
  2014-05-05  9:57 ` Andreas Färber
@ 2014-05-05 10:29   ` Paolo Bonzini
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2014-05-05 10:29 UTC (permalink / raw)
  To: Andreas Färber, Pranavkumar Sawargaonkar, qemu-devel
  Cc: peter.maydell, Anup Patel, patches, robherring2, kvmarm,
	christoffer.dall

Il 05/05/2014 11:57, Andreas Färber ha scritto:
> Am 05.05.2014 11:01, schrieb Pranavkumar Sawargaonkar:
>> To implement kvm_arch_reset_vcpu(), we simply re-init the VCPU
>> using kvm_arm_vcpu_init() so that all registers of VCPU are set
>> to their reset values by in-kernel KVM code.
>>
>> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
>> Signed-off-by: Anup Patel <anup.patel@linaro.org>
>> ---
>>  target-arm/kvm64.c |    4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c
>> index f7cc3ef..4855b4b 100644
>> --- a/target-arm/kvm64.c
>> +++ b/target-arm/kvm64.c
>> @@ -259,4 +259,8 @@ int kvm_arch_get_registers(CPUState *cs)
>>
>>  void kvm_arch_reset_vcpu(CPUState *cs)
>>  {
>> +    /* Re-init VCPU so that all registers are set to
>> +     * their respective reset values.
>> +     */
>> +    kvm_arm_vcpu_init(cs, 0x0);
>>  }
>>
>
> CC'ing Paolo, who was about to drop kvm_arch_reset_vcpu().

No big deal, it will have a small conflict but the functionality will 
remain in ARM (just renamed to kvm_arm_reset_vcpu and taking an ARMCPU*).

Thanks for the heads up.

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-05 10:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-05  9:01 [Qemu-devel] [RFC PATCH V4 6/6] target-arm: Implement kvm_arch_reset_vcpu() for KVM ARM64 Pranavkumar Sawargaonkar
2014-05-05  9:57 ` Andreas Färber
2014-05-05 10:29   ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).