linux-next: manual merge of the kvm tree with the kvm-fixes tree

2019-02-17 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the kvm tree got conflicts in:

  arch/x86/kvm/vmx/vmx.c
  arch/x86/kvm/vmx/vmx.h

between commit:

  c112b5f50232 ("KVM: x86: Recompute PID.ON when clearing PID.SN")

from the kvm-fixes tree and commit:

  abd2fb15a57e ("KVM: x86: Sync the pending Posted-Interrupts")

from the kvm tree.

These 2 commits are very similar so I just used the latter version of
the comflicting bits.

I fixed it up (see above) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell


pgpiLjJ_uvIFa.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the kvm tree with the kvm-fixes tree

2018-03-28 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the kvm tree got a conflict in:

  arch/x86/kvm/vmx.c

between commit:

  9d1887ef3252 ("KVM: nVMX: sync vmcs02 segment regs prior to vmx_set_cr0")

from the kvm-fixes tree and commit:

  2bb8cafea80b ("KVM: vVMX: signal failure for nested VMEntry if 
emulation_required")

from the kvm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/kvm/vmx.c
index 92496b9b5f2b,9bc05f5349c8..
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@@ -10952,6 -11081,21 +11092,16 @@@ static int prepare_vmcs02(struct kvm_vc
/* Note: modifies VM_ENTRY/EXIT_CONTROLS and GUEST/HOST_IA32_EFER */
vmx_set_efer(vcpu, vcpu->arch.efer);
  
 -  if (vmx->nested.dirty_vmcs12) {
 -  prepare_vmcs02_full(vcpu, vmcs12, from_vmentry);
 -  vmx->nested.dirty_vmcs12 = false;
 -  }
 -
+   /*
+* Guest state is invalid and unrestricted guest is disabled,
+* which means L1 attempted VMEntry to L2 with invalid state.
+* Fail the VMEntry.
+*/
+   if (vmx->emulation_required) {
+   *entry_failure_code = ENTRY_FAIL_DEFAULT;
+   return 1;
+   }
+ 
/* Shadow page tables on either EPT or shadow page tables. */
if (nested_vmx_load_cr3(vcpu, vmcs12->guest_cr3, 
nested_cpu_has_ept(vmcs12),
entry_failure_code))


pgpyL1d08Z8Ab.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the kvm tree with the kvm-fixes tree

2018-03-28 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the kvm tree got a conflict in:

  arch/x86/kvm/vmx.c

between commit:

  9d1887ef3252 ("KVM: nVMX: sync vmcs02 segment regs prior to vmx_set_cr0")

from the kvm-fixes tree and commit:

  2bb8cafea80b ("KVM: vVMX: signal failure for nested VMEntry if 
emulation_required")

from the kvm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/kvm/vmx.c
index 92496b9b5f2b,9bc05f5349c8..
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@@ -10952,6 -11081,21 +11092,16 @@@ static int prepare_vmcs02(struct kvm_vc
/* Note: modifies VM_ENTRY/EXIT_CONTROLS and GUEST/HOST_IA32_EFER */
vmx_set_efer(vcpu, vcpu->arch.efer);
  
 -  if (vmx->nested.dirty_vmcs12) {
 -  prepare_vmcs02_full(vcpu, vmcs12, from_vmentry);
 -  vmx->nested.dirty_vmcs12 = false;
 -  }
 -
+   /*
+* Guest state is invalid and unrestricted guest is disabled,
+* which means L1 attempted VMEntry to L2 with invalid state.
+* Fail the VMEntry.
+*/
+   if (vmx->emulation_required) {
+   *entry_failure_code = ENTRY_FAIL_DEFAULT;
+   return 1;
+   }
+ 
/* Shadow page tables on either EPT or shadow page tables. */
if (nested_vmx_load_cr3(vcpu, vmcs12->guest_cr3, 
nested_cpu_has_ept(vmcs12),
entry_failure_code))


pgpyL1d08Z8Ab.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the kvm tree with the kvm-fixes tree

2018-03-28 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the kvm tree got conflicts in:

  arch/x86/kernel/kvm.c

between commit:

  17a1079d9c63 ("KVM: x86: Fix pv tlb flush dependencies")

from the kvm-fixes tree and commit:

  6beacf74c257 ("KVM: X86: Don't use PV TLB flush with dedicated physical CPUs")

from the kvm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/kernel/kvm.c
index fae86e36e399,4ccbff63cb86..
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@@ -546,7 -546,8 +546,8 @@@ static void __init kvm_guest_init(void
}
  
if (kvm_para_has_feature(KVM_FEATURE_PV_TLB_FLUSH) &&
+   !kvm_para_has_hint(KVM_HINTS_DEDICATED) &&
 -  !kvm_para_has_feature(KVM_FEATURE_STEAL_TIME))
 +  kvm_para_has_feature(KVM_FEATURE_STEAL_TIME))
pv_mmu_ops.flush_tlb_others = kvm_flush_tlb_others;
  
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI))
@@@ -635,7 -641,8 +641,8 @@@ static __init int kvm_setup_pv_tlb_flus
int cpu;
  
if (kvm_para_has_feature(KVM_FEATURE_PV_TLB_FLUSH) &&
+   !kvm_para_has_hint(KVM_HINTS_DEDICATED) &&
 -  !kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) {
 +  kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) {
for_each_possible_cpu(cpu) {
zalloc_cpumask_var_node(per_cpu_ptr(&__pv_tlb_mask, 
cpu),
GFP_KERNEL, cpu_to_node(cpu));


pgp6fEKOClamC.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the kvm tree with the kvm-fixes tree

2018-03-28 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the kvm tree got conflicts in:

  arch/x86/kernel/kvm.c

between commit:

  17a1079d9c63 ("KVM: x86: Fix pv tlb flush dependencies")

from the kvm-fixes tree and commit:

  6beacf74c257 ("KVM: X86: Don't use PV TLB flush with dedicated physical CPUs")

from the kvm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/kernel/kvm.c
index fae86e36e399,4ccbff63cb86..
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@@ -546,7 -546,8 +546,8 @@@ static void __init kvm_guest_init(void
}
  
if (kvm_para_has_feature(KVM_FEATURE_PV_TLB_FLUSH) &&
+   !kvm_para_has_hint(KVM_HINTS_DEDICATED) &&
 -  !kvm_para_has_feature(KVM_FEATURE_STEAL_TIME))
 +  kvm_para_has_feature(KVM_FEATURE_STEAL_TIME))
pv_mmu_ops.flush_tlb_others = kvm_flush_tlb_others;
  
if (kvm_para_has_feature(KVM_FEATURE_PV_EOI))
@@@ -635,7 -641,8 +641,8 @@@ static __init int kvm_setup_pv_tlb_flus
int cpu;
  
if (kvm_para_has_feature(KVM_FEATURE_PV_TLB_FLUSH) &&
+   !kvm_para_has_hint(KVM_HINTS_DEDICATED) &&
 -  !kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) {
 +  kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) {
for_each_possible_cpu(cpu) {
zalloc_cpumask_var_node(per_cpu_ptr(&__pv_tlb_mask, 
cpu),
GFP_KERNEL, cpu_to_node(cpu));


pgp6fEKOClamC.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the kvm tree with the kvm-fixes tree

2018-03-25 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the kvm tree got a conflict in:

  arch/x86/kvm/vmx.c

between commit:

  9d1887ef3252 ("KVM: nVMX: sync vmcs02 segment regs prior to vmx_set_cr0")

from the kvm-fixes tree and commit:

  2bb8cafea80b ("KVM: vVMX: signal failure for nested VMEntry if 
emulation_required")

from the kvm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/kvm/vmx.c
index 92496b9b5f2b,b4d8da6c62c8..
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@@ -10952,6 -11010,19 +11021,14 @@@ static int prepare_vmcs02(struct kvm_vc
/* Note: modifies VM_ENTRY/EXIT_CONTROLS and GUEST/HOST_IA32_EFER */
vmx_set_efer(vcpu, vcpu->arch.efer);
  
 -  if (vmx->nested.dirty_vmcs12) {
 -  prepare_vmcs02_full(vcpu, vmcs12, from_vmentry);
 -  vmx->nested.dirty_vmcs12 = false;
 -  }
 -
+   /*
+* Guest state is invalid and unrestricted guest is disabled,
+* which means L1 attempted VMEntry to L2 with invalid state.
+* Fail the VMEntry.
+*/
+   if (vmx->emulation_required)
+   return 1;
+ 
/* Shadow page tables on either EPT or shadow page tables. */
if (nested_vmx_load_cr3(vcpu, vmcs12->guest_cr3, 
nested_cpu_has_ept(vmcs12),
entry_failure_code))


pgpVrgLAJzdY_.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the kvm tree with the kvm-fixes tree

2018-03-25 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the kvm tree got a conflict in:

  arch/x86/kvm/vmx.c

between commit:

  9d1887ef3252 ("KVM: nVMX: sync vmcs02 segment regs prior to vmx_set_cr0")

from the kvm-fixes tree and commit:

  2bb8cafea80b ("KVM: vVMX: signal failure for nested VMEntry if 
emulation_required")

from the kvm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/kvm/vmx.c
index 92496b9b5f2b,b4d8da6c62c8..
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@@ -10952,6 -11010,19 +11021,14 @@@ static int prepare_vmcs02(struct kvm_vc
/* Note: modifies VM_ENTRY/EXIT_CONTROLS and GUEST/HOST_IA32_EFER */
vmx_set_efer(vcpu, vcpu->arch.efer);
  
 -  if (vmx->nested.dirty_vmcs12) {
 -  prepare_vmcs02_full(vcpu, vmcs12, from_vmentry);
 -  vmx->nested.dirty_vmcs12 = false;
 -  }
 -
+   /*
+* Guest state is invalid and unrestricted guest is disabled,
+* which means L1 attempted VMEntry to L2 with invalid state.
+* Fail the VMEntry.
+*/
+   if (vmx->emulation_required)
+   return 1;
+ 
/* Shadow page tables on either EPT or shadow page tables. */
if (nested_vmx_load_cr3(vcpu, vmcs12->guest_cr3, 
nested_cpu_has_ept(vmcs12),
entry_failure_code))


pgpVrgLAJzdY_.pgp
Description: OpenPGP digital signature