Skip to contentSkip to conversation

KVM regsync

PATCH In review Jason J. Herne 2 participants 3 messages Jan 10, 2013 – Jan 15, 2013

lore
Share & tools
lore
#0 lore raw

v2 cover KVM regsync

Rework the method used to synchronize CPU registers between Qemu & KVM. This patch set extends kvm_arch_put_registers() and kvm_arch_get_registers() to take a register bitmap parameter. All existing code paths are updated to specify this new parameter.

IMPORTANT NOTE: The PPC and i386 implementations are incomplete. I am submitting this code at this time only to get a review on the implementation of the existing code and to perhaps seek assistance with the mentioned architectures.

I am not sure who will finish the implementation of PPC/i386 yet. Due
to the fact that I am unfamiliar with these architectures at the
register level and I do not have test environments I would like to
humbly request that a maintainer of these architectures take a look at
it. Or perhaps Bharat could handle the PPC code? This would only leave i386 to worry about. If I cannot find someone to handle i386 I will look into the feasibility of completing it myself.

In order to complete the missing implementations, kvm_arch_get_registers and kvm_arch_put_registers (and associated helper functions) will need to be updated to only sync the registers contained in the new bitmap argument. Also, each set of registers represented by one of the bits must be mutually exclusive with respect to every other bit. if this is not the case then local register data can be lost when kvm_arch_get_registers is called causing an old register value to overwrite a newer local value.

Signature · 1 line
-- Jason J. Herne ([email protected])
#1 lore raw
Quoted 20 lines

-----Original Message-----
From: Jason J. Herne [mailto:[email protected]]
Sent: Thursday, January 10, 2013 8:59 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Bhushan Bharat-R65777; [email protected]
Subject: [PATCH 0/7 v2] KVM regsync

Rework the method used to synchronize CPU registers between Qemu & KVM. This patch set extends kvm_arch_put_registers() and kvm_arch_get_registers() to take a register bitmap parameter. All existing code paths are updated to specify this new parameter.

IMPORTANT NOTE: The PPC and i386 implementations are incomplete. I am submitting this code at this time only to get a review on the implementation of the existing code and to perhaps seek assistance with the mentioned architectures.

Quoted 5 lines

I am not sure who will finish the implementation of PPC/i386 yet. Due to the fact that I am unfamiliar with these architectures at the register level and I do not have test environments I would like to humbly request that a maintainer of these architectures take a look at it. Or perhaps Bharat could handle the PPC code? This would only leave

I will handle the PPC code.

-Bharat

Quoted 14 lines

i386 to worry about. If I cannot find someone to handle i386 I will look into the feasibility of completing it myself.

In order to complete the missing implementations, kvm_arch_get_registers and kvm_arch_put_registers (and associated helper functions) will need to be updated to only sync the registers contained in the new bitmap argument. Also, each set of registers represented by one of the bits must be mutually exclusive with respect to every other bit. if this is not the case then local register data can be lost when kvm_arch_get_registers is called causing an old register value to overwrite a newer local value.

--
-- Jason J. Herne ([email protected])

#2 lore raw
In reply to Jason J. Herne
Quoted 28 lines

-----Original Message-----
From: Jason J. Herne [mailto:[email protected]]
Sent: Thursday, January 10, 2013 8:59 PM
To: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Bhushan Bharat-R65777; [email protected]
Subject: [PATCH 0/7 v2] KVM regsync

Rework the method used to synchronize CPU registers between Qemu & KVM. This patch set extends kvm_arch_put_registers() and kvm_arch_get_registers() to take a register bitmap parameter. All existing code paths are updated to specify this new parameter.

IMPORTANT NOTE: The PPC and i386 implementations are incomplete. I am submitting this code at this time only to get a review on the implementation of the existing code and to perhaps seek assistance with the mentioned architectures.

I am not sure who will finish the implementation of PPC/i386 yet. Due to the fact that I am unfamiliar with these architectures at the register level and I do not have test environments I would like to humbly request that a maintainer of these architectures take a look at it. Or perhaps Bharat could handle the PPC code? This would only leave
i386 to worry about. If I cannot find someone to handle i386 I will look into the feasibility of completing it myself.

Quoted 7 lines

In order to complete the missing implementations, kvm_arch_get_registers and kvm_arch_put_registers (and associated helper functions) will need to be updated to only sync the registers contained in the new bitmap argument. Also, each set of registers represented by one of the bits must be mutually exclusive with respect to every other bit. if this is not the case then local register data can be lost when kvm_arch_get_registers is called causing an old register value to overwrite a newer local value.

I think net step can be let the register bitmap to go all upto the KVM, so the KVM also read/write the specified registers set only.

Thanks
-Bharat