Message ID | 20170313090820.7100f3d2@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Am 13.03.2017 um 14:08 schrieb Luiz Capitulino: > > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> > --- > > o v2 > > - Rebase against latest queue branch > - Several text fixups [Paolo] > > o v3 > > - More small fixes [David] > > Documentation/virtual/kvm/api.txt | 63 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 63 insertions(+) > > diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt > index 3c248f7..fd10689 100644 > --- a/Documentation/virtual/kvm/api.txt > +++ b/Documentation/virtual/kvm/api.txt > @@ -3377,6 +3377,69 @@ struct kvm_ppc_resize_hpt { > __u32 pad; > }; Reviewed-by: David Hildenbrand <david@redhat.com>
2017-03-13 09:08-0400, Luiz Capitulino: > > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> > --- Queued, thanks. > > o v2 > > - Rebase against latest queue branch > - Several text fixups [Paolo] > > o v3 > > - More small fixes [David] > > Documentation/virtual/kvm/api.txt | 63 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 63 insertions(+) > > diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt > index 3c248f7..fd10689 100644 > --- a/Documentation/virtual/kvm/api.txt > +++ b/Documentation/virtual/kvm/api.txt > @@ -3377,6 +3377,69 @@ struct kvm_ppc_resize_hpt { > __u32 pad; > }; > > +4.104 KVM_X86_GET_MCE_CAP_SUPPORTED > + > +Capability: KVM_CAP_MCE > +Architectures: x86 > +Type: system ioctl > +Parameters: u64 mce_cap (out) > +Returns: 0 on success, -1 on error > + > +Returns supported MCE capabilities. The u64 mce_cap parameter > +has the same format as the MSR_IA32_MCG_CAP register. Supported > +capabilities will have the corresponding bits set. > + > +4.105 KVM_X86_SETUP_MCE > + > +Capability: KVM_CAP_MCE > +Architectures: x86 > +Type: vcpu ioctl > +Parameters: u64 mcg_cap (in) > +Returns: 0 on success, > + -EFAULT if u64 mcg_cap cannot be read, > + -EINVAL if the requested number of banks is invalid, > + -EINVAL if requested MCE capability is not supported. > + > +Initializes MCE support for use. The u64 mcg_cap parameter > +has the same format as the MSR_IA32_MCG_CAP register and > +specifies which capabilities should be enabled. The maximum > +supported number of error-reporting banks can be retrieved when > +checking for KVM_CAP_MCE. The supported capabilities can be > +retrieved with KVM_X86_GET_MCE_CAP_SUPPORTED. > + > +4.106 KVM_X86_SET_MCE > + > +Capability: KVM_CAP_MCE > +Architectures: x86 > +Type: vcpu ioctl > +Parameters: struct kvm_x86_mce (in) > +Returns: 0 on success, > + -EFAULT if struct kvm_x86_mce cannot be read, > + -EINVAL if the bank number is invalid, > + -EINVAL if VAL bit is not set in status field. > + > +Inject a machine check error (MCE) into the guest. The input > +parameter is: > + > +struct kvm_x86_mce { > + __u64 status; > + __u64 addr; > + __u64 misc; > + __u64 mcg_status; > + __u8 bank; > + __u8 pad1[7]; > + __u64 pad2[3]; > +}; > + > +If the MCE being reported is an uncorrected error, KVM will > +inject it as an MCE exception into the guest. If the guest > +MCG_STATUS register reports that an MCE is in progress, KVM > +causes an KVM_EXIT_SHUTDOWN vmexit. > + > +Otherwise, if the MCE is a corrected error, KVM will just > +store it in the corresponding bank (provided this bank is > +not holding a previously reported uncorrected error). > + > 5. The kvm_run structure > ------------------------ > > -- > 2.9.3 >
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 3c248f7..fd10689 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -3377,6 +3377,69 @@ struct kvm_ppc_resize_hpt { __u32 pad; }; +4.104 KVM_X86_GET_MCE_CAP_SUPPORTED + +Capability: KVM_CAP_MCE +Architectures: x86 +Type: system ioctl +Parameters: u64 mce_cap (out) +Returns: 0 on success, -1 on error + +Returns supported MCE capabilities. The u64 mce_cap parameter +has the same format as the MSR_IA32_MCG_CAP register. Supported +capabilities will have the corresponding bits set. + +4.105 KVM_X86_SETUP_MCE + +Capability: KVM_CAP_MCE +Architectures: x86 +Type: vcpu ioctl +Parameters: u64 mcg_cap (in) +Returns: 0 on success, + -EFAULT if u64 mcg_cap cannot be read, + -EINVAL if the requested number of banks is invalid, + -EINVAL if requested MCE capability is not supported. + +Initializes MCE support for use. The u64 mcg_cap parameter +has the same format as the MSR_IA32_MCG_CAP register and +specifies which capabilities should be enabled. The maximum +supported number of error-reporting banks can be retrieved when +checking for KVM_CAP_MCE. The supported capabilities can be +retrieved with KVM_X86_GET_MCE_CAP_SUPPORTED. + +4.106 KVM_X86_SET_MCE + +Capability: KVM_CAP_MCE +Architectures: x86 +Type: vcpu ioctl +Parameters: struct kvm_x86_mce (in) +Returns: 0 on success, + -EFAULT if struct kvm_x86_mce cannot be read, + -EINVAL if the bank number is invalid, + -EINVAL if VAL bit is not set in status field. + +Inject a machine check error (MCE) into the guest. The input +parameter is: + +struct kvm_x86_mce { + __u64 status; + __u64 addr; + __u64 misc; + __u64 mcg_status; + __u8 bank; + __u8 pad1[7]; + __u64 pad2[3]; +}; + +If the MCE being reported is an uncorrected error, KVM will +inject it as an MCE exception into the guest. If the guest +MCG_STATUS register reports that an MCE is in progress, KVM +causes an KVM_EXIT_SHUTDOWN vmexit. + +Otherwise, if the MCE is a corrected error, KVM will just +store it in the corresponding bank (provided this bank is +not holding a previously reported uncorrected error). + 5. The kvm_run structure ------------------------
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- o v2 - Rebase against latest queue branch - Several text fixups [Paolo] o v3 - More small fixes [David] Documentation/virtual/kvm/api.txt | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+)