Series contains 2 patches to fix the host in kernel handling of the hcall
h_set_dawr.
First patch from Michael Neuling is just a resend added here for clarity.
Michael Neuling (1):
KVM: PPC: Book3S HV: Fix r3 corruption in h_set_dabr()
Suraj Jitindar Singh (1):
KVM: PPC: Book3S HV: Only write DAWR[X] when handling h_set_dawr in
real mode
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
--
2.13.6
The hcall H_SET_DAWR is used by a guest to set the data address
watchpoint register (DAWR). This hcall is handled in the host in
kvmppc_h_set_dawr() which can be called in either real mode on the guest
exit path from hcall_try_real_mode() in book3s_hv_rmhandlers.S, or in
virtual mode when called from kvmppc_pseries_do_hcall() in book3s_hv.c.
The function kvmppc_h_set_dawr updates the dawr and dawrx fields in the
vcpu struct accordingly and then also writes the respective values into
the DAWR and DAWRX registers directly. It is necessary to write the
registers directly here when calling the function in real mode since the
path to re-enter the guest won't do this. However when in virtual mode
the host DAWR and DAWRX values have already been restored, and so writing
the registers would overwrite these. Additionally there is no reason to
write the guest values here as these will be read from the vcpu struct
and written to the registers appropriately the next time the vcpu is
run.
This also avoids the case when handling h_set_dawr for a nested guest
where the guest hypervisor isn't able to write the DAWR and DAWRX
registers directly and must rely on the real hypervisor to do this for
it when it calls H_ENTER_NESTED.
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
---
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
From: Cédric Le Goater <clg@kaod.org> Date: 2019-06-17 10:37:12
On 17/06/2019 09:16, Suraj Jitindar Singh wrote:
Series contains 2 patches to fix the host in kernel handling of the hcall
h_set_dawr.
First patch from Michael Neuling is just a resend added here for clarity.
Michael Neuling (1):
KVM: PPC: Book3S HV: Fix r3 corruption in h_set_dabr()
Suraj Jitindar Singh (1):
KVM: PPC: Book3S HV: Only write DAWR[X] when handling h_set_dawr in
real mode
Reviewed-by: Cédric Le Goater <clg@kaod.org>
and
Tested-by: Cédric Le Goater <clg@kaod.org>
but I see slowdowns in nested as if the IPIs were not delivered. Have we
touch this part in 5.2 ?
Thanks,
C.
On Mon, 2019-06-17 at 11:06 +0200, Cédric Le Goater wrote:
On 17/06/2019 09:16, Suraj Jitindar Singh wrote:
quoted
Series contains 2 patches to fix the host in kernel handling of the
hcall
h_set_dawr.
First patch from Michael Neuling is just a resend added here for
clarity.
Michael Neuling (1):
KVM: PPC: Book3S HV: Fix r3 corruption in h_set_dabr()
Suraj Jitindar Singh (1):
KVM: PPC: Book3S HV: Only write DAWR[X] when handling h_set_dawr
in
real mode
Reviewed-by: Cédric Le Goater <clg@kaod.org>
and
Tested-by: Cédric Le Goater <clg@kaod.org>
but I see slowdowns in nested as if the IPIs were not delivered. Have
we
touch this part in 5.2 ?
Hi,
I've seen the same and tracked it down to decrementer exceptions not
being delivered when the guest is using large decrementer. I've got a
patch I'm about to send so I'll CC you.
Another option is to disable the large decrementer with:
-machine pseries,cap-large-decr=false
Thanks,
Suraj