RE: [RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-12-22 Thread Pavel Fedin
Hello! > > 1. Is there any real need to distinguish between KVM_EXIT_MSR_WRITE and > KVM_EXIT_MSR_AFTER_WRITE ? IMHO from userland's point of view these are the > same. > > Indeed. Perhaps the kernel can set .handled to true to let userspace > know it already took care of it, instead of

Re: [RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-12-22 Thread 'Roman Kagan'
On Tue, Dec 22, 2015 at 10:24:13AM +0300, Pavel Fedin wrote: > > +On the return path into kvm, user space should set handled to > > +KVM_EXIT_MSR_HANDLED if it successfully handled the MSR access. Otherwise, > > +handled should be set to KVM_EXIT_MSR_UNHANDLED, which will cause a general > >

Re: [RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-12-22 Thread 'Roman Kagan'
On Tue, Dec 22, 2015 at 03:51:52PM +0300, Pavel Fedin wrote: > Hello! > > > > 1. Is there any real need to distinguish between KVM_EXIT_MSR_WRITE and > > KVM_EXIT_MSR_AFTER_WRITE ? IMHO from userland's point of view these are the > > same. > > > > Indeed. Perhaps the kernel can set .handled

RE: [RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-12-22 Thread Pavel Fedin
Hello! > It has: unlike the scenario that was the original motivation for Peter's > patches, where the the userspace wanted to handle register accesses > which the kernel *didn't*, in case of SynIC the userspace wants do > something about MSR accesses *only* if the kernel *also* handles them.

Re: [RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-12-21 Thread Peter Hornyack
On Fri, Dec 18, 2015 at 1:25 PM, Paolo Bonzini wrote: > > > On 18/08/2015 20:46, Peter Hornyack wrote: >> Define KVM_EXIT_MSR, a new exit reason for accesses to MSRs that kvm >> does not handle. Define KVM_CAP_UNHANDLED_MSR_EXITS, a vm-wide >> capability that guards the new

RE: [RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-12-21 Thread Pavel Fedin
Hello! > commit a684d520ed62cf0db4495e5197d5bf722e4f8109 > Author: Peter Hornyack > Date: Fri Dec 18 14:44:04 2015 -0800 > > KVM: add capabilities and exit reasons for MSRs. > > Define KVM_EXIT_MSR_READ, KVM_EXIT_MSR_WRITE, and >

Re: [RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-12-18 Thread Peter Hornyack
On Fri, Dec 18, 2015 at 1:25 PM, Paolo Bonzini wrote: > > > On 18/08/2015 20:46, Peter Hornyack wrote: >> Define KVM_EXIT_MSR, a new exit reason for accesses to MSRs that kvm >> does not handle. Define KVM_CAP_UNHANDLED_MSR_EXITS, a vm-wide >> capability that guards the new

Re: [RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-12-18 Thread Paolo Bonzini
On 18/08/2015 20:46, Peter Hornyack wrote: > Define KVM_EXIT_MSR, a new exit reason for accesses to MSRs that kvm > does not handle. Define KVM_CAP_UNHANDLED_MSR_EXITS, a vm-wide > capability that guards the new exit reason and which can be enabled via > the KVM_ENABLE_CAP ioctl. > >

[RFC PATCH 2/5] KVM: add KVM_EXIT_MSR exit reason and capability.

2015-08-18 Thread Peter Hornyack
Define KVM_EXIT_MSR, a new exit reason for accesses to MSRs that kvm does not handle. Define KVM_CAP_UNHANDLED_MSR_EXITS, a vm-wide capability that guards the new exit reason and which can be enabled via the KVM_ENABLE_CAP ioctl. Signed-off-by: Peter Hornyack peterhorny...@google.com ---