[PATCH 2/2] kvm/arm64: Detach ESR operator from vCPU struct

2020-06-29 Thread Gavin Shan
There are a set of inline functions defined in kvm_emulate.h. Those functions reads ESR from vCPU fault information struct and then operate on it. So it's tied with vCPU fault information and vCPU struct. It limits their usage scope. This detaches these functions from the vCPU struct by introducin

Re: [PATCH 2/2] kvm/arm64: Detach ESR operator from vCPU struct

2020-06-29 Thread Mark Rutland
On Mon, Jun 29, 2020 at 07:18:41PM +1000, Gavin Shan wrote: > There are a set of inline functions defined in kvm_emulate.h. Those > functions reads ESR from vCPU fault information struct and then operate > on it. So it's tied with vCPU fault information and vCPU struct. It > limits their usage scop

Re: [PATCH 2/2] kvm/arm64: Detach ESR operator from vCPU struct

2020-06-29 Thread Andrew Scull
On Mon, Jun 29, 2020 at 07:18:41PM +1000, Gavin Shan wrote: > There are a set of inline functions defined in kvm_emulate.h. Those > functions reads ESR from vCPU fault information struct and then operate > on it. So it's tied with vCPU fault information and vCPU struct. It > limits their usage scop

Re: [PATCH 2/2] kvm/arm64: Detach ESR operator from vCPU struct

2020-06-29 Thread Gavin Shan
Hi Mark, On 6/29/20 9:00 PM, Mark Rutland wrote: On Mon, Jun 29, 2020 at 07:18:41PM +1000, Gavin Shan wrote: There are a set of inline functions defined in kvm_emulate.h. Those functions reads ESR from vCPU fault information struct and then operate on it. So it's tied with vCPU fault informatio

Re: [PATCH 2/2] kvm/arm64: Detach ESR operator from vCPU struct

2020-06-29 Thread Gavin Shan
Hi Andrew, On 6/29/20 7:59 PM, Andrew Scull wrote: On Mon, Jun 29, 2020 at 07:18:41PM +1000, Gavin Shan wrote: There are a set of inline functions defined in kvm_emulate.h. Those functions reads ESR from vCPU fault information struct and then operate on it. So it's tied with vCPU fault informat

Re: [PATCH 2/2] kvm/arm64: Detach ESR operator from vCPU struct

2020-06-30 Thread Mark Rutland
On Tue, Jun 30, 2020 at 10:16:07AM +1000, Gavin Shan wrote: > Hi Mark, > > On 6/29/20 9:00 PM, Mark Rutland wrote: > > On Mon, Jun 29, 2020 at 07:18:41PM +1000, Gavin Shan wrote: > > > There are a set of inline functions defined in kvm_emulate.h. Those > > > functions reads ESR from vCPU fault inf