RE: [GIT PULL] First batch of KVM changes for Linux 5.9

2020-09-08 Thread Christopherson, Sean J
Ingo Molnar wrote: > * Paolo Bonzini wrote: > > > Paolo Bonzini (11): > > Merge branch 'kvm-async-pf-int' into HEAD > > kvmtool broke in this merge window, hanging during bootup right after CPU > bringup: > > [1.289404] #63 > [0.012468] kvm-clock: cpu 63, msr 6ff69fc1,

RE: general protection fault in native_write_cr4

2018-04-02 Thread Christopherson, Sean J
On Sat, 2018-03-31, Dmitry Vyukov wrote: > On Wed, Dec 27, 2017 at 7:31 PM, Dmitry Vyukov wrote: > > On Tue, Dec 26, 2017 at 9:52 AM, Dmitry Vyukov wrote: > >> On Wed, Dec 20, 2017 at 8:54 AM, Wanpeng Li wrote: > >>> 2017-12-20 15:49

RE: general protection fault in native_write_cr4

2018-04-02 Thread Christopherson, Sean J
On Sat, 2018-03-31, Dmitry Vyukov wrote: > On Wed, Dec 27, 2017 at 7:31 PM, Dmitry Vyukov wrote: > > On Tue, Dec 26, 2017 at 9:52 AM, Dmitry Vyukov wrote: > >> On Wed, Dec 20, 2017 at 8:54 AM, Wanpeng Li wrote: > >>> 2017-12-20 15:49 GMT+08:00 syzbot > >>> : > Hello, > >

RE: [PATCH] kvm: x86: fix RSM when PCID is non-zero

2017-12-21 Thread Christopherson, Sean J
On Thu, Dec 21, 2017 at 07:30:35AM -0800, Andy Lutomirski wrote: > On Thu, Dec 21, 2017 at 3:56 AM, Paolo Bonzini wrote: > > rsm_load_state_64() and rsm_enter_protected_mode() load CR3, then > > CR4 & ~PCIDE, then CR0, then CR4. > > > > However, setting CR4.PCIDE fails if

RE: [PATCH] kvm: x86: fix RSM when PCID is non-zero

2017-12-21 Thread Christopherson, Sean J
On Thu, Dec 21, 2017 at 07:30:35AM -0800, Andy Lutomirski wrote: > On Thu, Dec 21, 2017 at 3:56 AM, Paolo Bonzini wrote: > > rsm_load_state_64() and rsm_enter_protected_mode() load CR3, then > > CR4 & ~PCIDE, then CR0, then CR4. > > > > However, setting CR4.PCIDE fails if CR3[11:0] != 0. It's

RE: [intel-sgx-kernel-dev] [PATCH v5 06/11] intel_sgx: driver for Intel Software Guard Extensions

2017-12-19 Thread Christopherson, Sean J
On Tuesday, December 19, 2017 Jarkko Sakkinen wrote: > On Tue, 2017-12-19 at 18:52 +0000, Christopherson, Sean J wrote: > > > We can cache tokens in future in the kernel space, can't we? > > > > Yes, but why? Deferring to userspace is less complex and likely > >

RE: [intel-sgx-kernel-dev] [PATCH v5 06/11] intel_sgx: driver for Intel Software Guard Extensions

2017-12-19 Thread Christopherson, Sean J
On Tuesday, December 19, 2017 Jarkko Sakkinen wrote: > On Tue, 2017-12-19 at 18:52 +0000, Christopherson, Sean J wrote: > > > We can cache tokens in future in the kernel space, can't we? > > > > Yes, but why? Deferring to userspace is less complex and likely > >

RE: [intel-sgx-kernel-dev] [PATCH v5 06/11] intel_sgx: driver for Intel Software Guard Extensions

2017-12-19 Thread Christopherson, Sean J
On Friday, 2017-12-15, Jarkko Sakkinen wrote: > > Resurrecting this thread now that I have a system with launch control > > and have been able to measure the performance impact... > > > > Regenerating the EINIT token every time adds somewhere in the vicinity > > of ~5% overhead to creating an

RE: [intel-sgx-kernel-dev] [PATCH v5 06/11] intel_sgx: driver for Intel Software Guard Extensions

2017-12-19 Thread Christopherson, Sean J
On Friday, 2017-12-15, Jarkko Sakkinen wrote: > > Resurrecting this thread now that I have a system with launch control > > and have been able to measure the performance impact... > > > > Regenerating the EINIT token every time adds somewhere in the vicinity > > of ~5% overhead to creating an

RE: [intel-sgx-kernel-dev] [PATCH v7 4/8] intel_sgx: driver for Intel Software Guard Extensions

2017-12-14 Thread Christopherson, Sean J
On Thu, Dec 14, 2017 at 03:10:06PM +0200, Jarkko Sakkinen wrote: > On Tue, Dec 12, 2017 at 01:46:48PM -0800, Sean Christopherson wrote: > > So it looks like you avoid the described case by moving B to the head of > > the list in sgx_eldu. The bug I am seeing is still straightforward to > >

RE: [intel-sgx-kernel-dev] [PATCH v7 4/8] intel_sgx: driver for Intel Software Guard Extensions

2017-12-14 Thread Christopherson, Sean J
On Thu, Dec 14, 2017 at 03:10:06PM +0200, Jarkko Sakkinen wrote: > On Tue, Dec 12, 2017 at 01:46:48PM -0800, Sean Christopherson wrote: > > So it looks like you avoid the described case by moving B to the head of > > the list in sgx_eldu. The bug I am seeing is still straightforward to > >

RE: [PATCH v6 10/11] intel_sgx: glue code for in-kernel LE

2017-12-13 Thread Christopherson, Sean J
On Sat, Nov 25, 2017 at 09:29:27PM +0200, Jarkko Sakkinen wrote: +static int __sgx_le_get_token(struct sgx_le_ctx *ctx, + const struct sgx_encl *encl, + const struct sgx_sigstruct *sigstruct, + struct

RE: [PATCH v6 10/11] intel_sgx: glue code for in-kernel LE

2017-12-13 Thread Christopherson, Sean J
On Sat, Nov 25, 2017 at 09:29:27PM +0200, Jarkko Sakkinen wrote: +static int __sgx_le_get_token(struct sgx_le_ctx *ctx, + const struct sgx_encl *encl, + const struct sgx_sigstruct *sigstruct, + struct

RE: [intel-sgx-kernel-dev] [PATCH v5 06/11] intel_sgx: driver for Intel Software Guard Extensions

2017-12-13 Thread Christopherson, Sean J
On Wed, Nov 15, 2017 at 10:20:27AM -0800, Sean Christopherson wrote: > On Tue, 2017-11-14 at 22:28 +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 14, 2017 at 09:55:06AM -0800, Sean Christopherson wrote: > > > > > > What do you mean by bottlenecks? Assuming you're referring to performance > > >

RE: [intel-sgx-kernel-dev] [PATCH v5 06/11] intel_sgx: driver for Intel Software Guard Extensions

2017-12-13 Thread Christopherson, Sean J
On Wed, Nov 15, 2017 at 10:20:27AM -0800, Sean Christopherson wrote: > On Tue, 2017-11-14 at 22:28 +0200, Jarkko Sakkinen wrote: > > On Tue, Nov 14, 2017 at 09:55:06AM -0800, Sean Christopherson wrote: > > > > > > What do you mean by bottlenecks? Assuming you're referring to performance > > >

RE: [intel-sgx-kernel-dev] [PATCH v7 4/8] intel_sgx: driver for Intel Software Guard Extensions

2017-12-08 Thread Christopherson, Sean J
Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> wrote: > On Thu, Dec 07, 2017 at 02:46:39PM +, Christopherson, Sean J wrote: > > > + for (i = 0; i < 2; i++) { > > > + va_page = list_first_entry(>va_pages, > > > +

RE: [intel-sgx-kernel-dev] [PATCH v7 4/8] intel_sgx: driver for Intel Software Guard Extensions

2017-12-08 Thread Christopherson, Sean J
Jarkko Sakkinen wrote: > On Thu, Dec 07, 2017 at 02:46:39PM +0000, Christopherson, Sean J wrote: > > > + for (i = 0; i < 2; i++) { > > > + va_page = list_first_entry(>va_pages, > > > +struct sgx_va_pa

RE: [intel-sgx-kernel-dev] [PATCH v7 4/8] intel_sgx: driver for Intel Software Guard Extensions

2017-12-07 Thread Christopherson, Sean J
Jarkko Sakkinen wrote: > +static void sgx_ewb(struct sgx_encl *encl, struct sgx_encl_page *entry) > +{ > + struct sgx_va_page *va_page; > + unsigned int va_offset; > + int ret; > + int i; > + > + for (i = 0; i < 2; i++) { > +

RE: [intel-sgx-kernel-dev] [PATCH v7 4/8] intel_sgx: driver for Intel Software Guard Extensions

2017-12-07 Thread Christopherson, Sean J
Jarkko Sakkinen wrote: > +static void sgx_ewb(struct sgx_encl *encl, struct sgx_encl_page *entry) > +{ > + struct sgx_va_page *va_page; > + unsigned int va_offset; > + int ret; > + int i; > + > + for (i = 0; i < 2; i++) { > + va_page = list_first_entry(>va_pages, >