Re: [PATCH 1/2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-04-28 Thread Bruce Rogers
>>> On 4/26/2016 at 08:54 PM, Wanpeng Li <kernel...@gmail.com> wrote: > 2016-02-09 0:29 GMT+08:00 Bruce Rogers <brog...@suse.com>: >>>>> On 2/8/2016 at 08:09 AM, Paolo Bonzini <pbonz...@redhat.com> wrote: >> >>> >>> On 03/0

Re: [PATCH 1/2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-04-28 Thread Bruce Rogers
>>> On 4/26/2016 at 08:54 PM, Wanpeng Li wrote: > 2016-02-09 0:29 GMT+08:00 Bruce Rogers : >>>>> On 2/8/2016 at 08:09 AM, Paolo Bonzini wrote: >> >>> >>> On 03/02/2016 23:51, Bruce Rogers wrote: >>>> >>>> diff --git a

[PATCH v2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-04-28 Thread Bruce Rogers
t sequences are different") Cc: sta...@vger.kernel.org Signed-off-by: Bruce Rogers <brog...@suse.com> --- arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index ee1c8a9..ab4a387 100644 --- a/arch/x86/kvm/vmx.c ++

[PATCH v2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-04-28 Thread Bruce Rogers
t sequences are different") Cc: sta...@vger.kernel.org Signed-off-by: Bruce Rogers --- arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index ee1c8a9..ab4a387 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@

Re: [PATCH] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-04-28 Thread Bruce Rogers
>>> On 4/28/2016 at 01:08 PM, Radim Kr*má* <rkrc...@redhat.com> wrote: > 2016-04-22 12:56-0600, Bruce Rogers: >> Commit d28bc9dd25ce reversed the order of two lines which initialize cr0, >> allowing the current (old) cr0 value to mess up vcpu initialization. >

Re: [PATCH] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-04-28 Thread Bruce Rogers
>>> On 4/28/2016 at 01:08 PM, Radim Kr*má* wrote: > 2016-04-22 12:56-0600, Bruce Rogers: >> Commit d28bc9dd25ce reversed the order of two lines which initialize cr0, >> allowing the current (old) cr0 value to mess up vcpu initialization. >> This was observed in the

[PATCH] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-04-22 Thread Bruce Rogers
cr0() is completely redundant. Change the order back to ensure proper vcpu initialization. The combination of booting with ovmf firmware when guest vcpus > 1 and kvm's ept=N option being set results in a VM-entry failure. This patch fixes that. Signed-off-by: Bruce Rogers <brog...@suse.com> ---

[PATCH] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-04-22 Thread Bruce Rogers
cr0() is completely redundant. Change the order back to ensure proper vcpu initialization. The combination of booting with ovmf firmware when guest vcpus > 1 and kvm's ept=N option being set results in a VM-entry failure. This patch fixes that. Signed-off-by: Bruce Rogers --- arch/x86/kvm/vmx.c | 2

Re: [PATCH 1/2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-04-22 Thread Bruce Rogers
>>> On 2/3/2016 at 04:18 PM, Nadav Amit <nadav.a...@gmail.com> wrote: > Oops. > > Anyhow, I see my patch has done a similar change in init_vmcb() , so you may > want to revert it as well. > > Nadav > > Bruce Rogers <brog...@suse.com> wrote: >

Re: [PATCH 1/2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-04-22 Thread Bruce Rogers
>>> On 2/3/2016 at 04:18 PM, Nadav Amit wrote: > Oops. > > Anyhow, I see my patch has done a similar change in init_vmcb() , so you may > want to revert it as well. > > Nadav > > Bruce Rogers wrote: > >> Commit d28bc9dd25ce reversed the order of t

Re: [PATCH 2/2] KVM: x86: allow BSP to handle INIT IPIs like APs do

2016-02-10 Thread Bruce Rogers
>>> On 2/8/2016 at 10:53 AM, Jan Kiszka wrote: > On 2016-02-08 18:38, Bruce Rogers wrote: >>>>> On 2/8/2016 at 10:27 AM, Bruce Rogers wrote: >>>>>> On 2/8/2016 at 09:40 AM, Paolo Bonzini wrote: >>

Re: [PATCH 2/2] KVM: x86: allow BSP to handle INIT IPIs like APs do

2016-02-10 Thread Bruce Rogers
>>> On 2/8/2016 at 10:53 AM, Jan Kiszka <jan.kis...@web.de> wrote: > On 2016-02-08 18:38, Bruce Rogers wrote: >>>>> On 2/8/2016 at 10:27 AM, Bruce Rogers wrote: >>>>>> On 2/8/2016 at 09:40 AM, Paolo Bonzini <pbonz...@redhat.com> wrot

Re: [PATCH 2/2] KVM: x86: allow BSP to handle INIT IPIs like APs do

2016-02-08 Thread Bruce Rogers
>>> On 2/8/2016 at 10:27 AM, Bruce Rogers wrote: > >>> On 2/8/2016 at 09:40 AM, Paolo Bonzini wrote: > >> >> On 08/02/2016 17:33, Bruce Rogers wrote: >>>>> >> >>>>> >> KVM_MP_STATE_INIT_RECEIVED is what Intel

Re: [PATCH 2/2] KVM: x86: allow BSP to handle INIT IPIs like APs do

2016-02-08 Thread Bruce Rogers
>>> On 2/8/2016 at 09:40 AM, Paolo Bonzini wrote: > > On 08/02/2016 17:33, Bruce Rogers wrote: >>>> >> >>>> >> KVM_MP_STATE_INIT_RECEIVED is what Intel calls the "wait for SIPI" >>>> >> state. The BSP neve

Re: [PATCH 2/2] KVM: x86: allow BSP to handle INIT IPIs like APs do

2016-02-08 Thread Bruce Rogers
>>> On 2/8/2016 at 08:22 AM, Jan Kiszka wrote: > On 2016-02-08 16:12, Paolo Bonzini wrote: >> >> >> On 03/02/2016 23:51, Bruce Rogers wrote: >>> The INIT IPI event handler special cases the boot-strap processor >>> (BSP) handling, a

Re: [PATCH 1/2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-02-08 Thread Bruce Rogers
>>> On 2/8/2016 at 08:09 AM, Paolo Bonzini wrote: > > On 03/02/2016 23:51, Bruce Rogers wrote: >> >> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c >> index e2951b6..21507b4 100644 >> --- a/arch/x86/kvm/vmx.c >> +++ b/arch/x86/k

Re: [PATCH 1/2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-02-08 Thread Bruce Rogers
>>> On 2/8/2016 at 08:09 AM, Paolo Bonzini <pbonz...@redhat.com> wrote: > > On 03/02/2016 23:51, Bruce Rogers wrote: >> >> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c >> index e2951b6..21507b4 100644 >> --- a/arch/x86/kvm/vmx.c >

Re: [PATCH 2/2] KVM: x86: allow BSP to handle INIT IPIs like APs do

2016-02-08 Thread Bruce Rogers
>>> On 2/8/2016 at 08:22 AM, Jan Kiszka <jan.kis...@web.de> wrote: > On 2016-02-08 16:12, Paolo Bonzini wrote: >> >> >> On 03/02/2016 23:51, Bruce Rogers wrote: >>> The INIT IPI event handler special cases the boot-strap processor >>> (BS

Re: [PATCH 2/2] KVM: x86: allow BSP to handle INIT IPIs like APs do

2016-02-08 Thread Bruce Rogers
>>> On 2/8/2016 at 09:40 AM, Paolo Bonzini <pbonz...@redhat.com> wrote: > > On 08/02/2016 17:33, Bruce Rogers wrote: >>>> >> >>>> >> KVM_MP_STATE_INIT_RECEIVED is what Intel calls the "wait for SIPI" >>>> >&

Re: [PATCH 2/2] KVM: x86: allow BSP to handle INIT IPIs like APs do

2016-02-08 Thread Bruce Rogers
>>> On 2/8/2016 at 10:27 AM, Bruce Rogers wrote: > >>> On 2/8/2016 at 09:40 AM, Paolo Bonzini <pbonz...@redhat.com> wrote: > >> >> On 08/02/2016 17:33, Bruce Rogers wrote: >>>>> >> >>>>> >> KVM_MP_STATE_INIT_

Re: [PATCH 1/2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-02-03 Thread Bruce Rogers
hange in init_vmcb() , so you may > want to revert it as well. > > Nadav > > Bruce Rogers wrote: > >> Commit d28bc9dd25ce reversed the order of two lines which initialize cr0, >> allowing the current (old) cr0 value to mess up vcpu initialization. >> This was observ

[PATCH 2/2] KVM: x86: allow BSP to handle INIT IPIs like APs do

2016-02-03 Thread Bruce Rogers
/vmlinuz --initrd=/boot/initrd --append="$(cat /proc/cmdline)\ maxcpus=1" led to identifying this change as the needed fix. With this change, an AP can now startup the BSP without error. Signed-off-by: Bruce Rogers --- arch/x86/kvm/lapic.c | 5 + 1 file changed, 1 insertion(+), 4 deletion

[PATCH 1/2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-02-03 Thread Bruce Rogers
cr0() is completely redundant. Change the order back to ensure proper vcpu intiialization. Signed-off-by: Bruce Rogers --- arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index e2951b6..21507b4 100644 --- a/arch/x86/kvm/vm

[PATCH 2/2] KVM: x86: allow BSP to handle INIT IPIs like APs do

2016-02-03 Thread Bruce Rogers
/vmlinuz --initrd=/boot/initrd --append="$(cat /proc/cmdline)\ maxcpus=1" led to identifying this change as the needed fix. With this change, an AP can now startup the BSP without error. Signed-off-by: Bruce Rogers <brog...@suse.com> --- arch/x86/kvm/lapic.c | 5 + 1 file changed, 1

[PATCH 1/2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-02-03 Thread Bruce Rogers
cr0() is completely redundant. Change the order back to ensure proper vcpu intiialization. Signed-off-by: Bruce Rogers <brog...@suse.com> --- arch/x86/kvm/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index e2951b6..21507

Re: [PATCH 1/2] KVM: x86: fix ordering of cr0 initialization code in vmx_cpu_reset

2016-02-03 Thread Bruce Rogers
patch has done a similar change in init_vmcb() , so you may > want to revert it as well. > > Nadav > > Bruce Rogers <brog...@suse.com> wrote: > >> Commit d28bc9dd25ce reversed the order of two lines which initialize cr0, >> allowing the current (old) cr