Re: [PATCH 2/3] x86/kvm: Implement MSR_HWCR support

2018-06-22 Thread Radim Krčmář
2018-06-22 21:09+0200, Borislav Petkov: > On Fri, Jun 22, 2018 at 08:52:38PM +0200, Radim Krčmář wrote: > > msr_info->host_initiated is always going to return true, so it would be > > better to put it outside of __set_mci_status. > > > > Maybe we could just write the whole logic inline, otherwise

Re: [PATCH 2/3] x86/kvm: Implement MSR_HWCR support

2018-06-22 Thread Borislav Petkov
On Fri, Jun 22, 2018 at 08:52:38PM +0200, Radim Krčmář wrote: > msr_info->host_initiated is always going to return true, so it would be > better to put it outside of __set_mci_status. > > Maybe we could just write the whole logic inline, otherwise I'd call it > something like mci_status_is_writeab

Re: [PATCH 2/3] x86/kvm: Implement MSR_HWCR support

2018-06-22 Thread Radim Krčmář
2018-06-22 11:51+0200, Borislav Petkov: > From: Borislav Petkov > > The hardware configuration register has some useful bits which can be > used by guests. Implement McStatusWrEn which can be used by guests when > injecting MCEs with the in-kernel mce-inject module. > > For that, we need to set

[PATCH 2/3] x86/kvm: Implement MSR_HWCR support

2018-06-22 Thread Borislav Petkov
From: Borislav Petkov The hardware configuration register has some useful bits which can be used by guests. Implement McStatusWrEn which can be used by guests when injecting MCEs with the in-kernel mce-inject module. For that, we need to set bit 18 - McStatusWrEn - first, before writing the MCi_