Re: [PATCH/RFC 2/2] KVM: push down irq_save from kvm_guest_exit

2015-04-28 Thread Paolo Bonzini
On 28/04/2015 16:10, Christian Borntraeger wrote: > > Alternatively, the irq-disabled versions could be called > > __kvm_guest_{enter,exit}. Then you can use those directly when it makes > > sense. > > ..having a special __kvm_guest_{enter,exit} without the WARN_ON might be even > the cheapest

Re: [PATCH/RFC 2/2] KVM: push down irq_save from kvm_guest_exit

2015-04-28 Thread Christian Borntraeger
Am 28.04.2015 um 13:37 schrieb Paolo Bonzini: >> --- a/arch/powerpc/kvm/book3s_pr.c >> +++ b/arch/powerpc/kvm/book3s_pr.c >> @@ -891,7 +891,9 @@ int kvmppc_handle_exit_pr(struct kvm_run *run, struct >> kvm_vcpu *vcpu, >> >> /* We get here with MSR.EE=1 */ >> >> +local_irq_disable(); >

Re: [PATCH/RFC 2/2] KVM: push down irq_save from kvm_guest_exit

2015-04-28 Thread Paolo Bonzini
On 28/04/2015 12:32, Christian Borntraeger wrote: > Some architectures already have irq disabled when calling > kvm_guest_exit. Push down the disabling into the architectures > to avoid double disabling. This also allows to replace > irq_save with irq_disable which might be cheaper. > arm and mip

[PATCH/RFC 2/2] KVM: push down irq_save from kvm_guest_exit

2015-04-28 Thread Christian Borntraeger
Some architectures already have irq disabled when calling kvm_guest_exit. Push down the disabling into the architectures to avoid double disabling. This also allows to replace irq_save with irq_disable which might be cheaper. arm and mips already have interrupts disabled. s390/power/x86 need adopti