linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] KVM changes for 4.18 merge window
@ 2018-06-12 14:03 Paolo Bonzini
  2018-06-12 18:43 ` Linus Torvalds
  2018-06-13  2:18 ` Linus Torvalds
  0 siblings, 2 replies; 19+ messages in thread
From: Paolo Bonzini @ 2018-06-12 14:03 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, rkrcmar, kvm

Linus,

The following changes since commit 73fcb1a370c76b202d406e95d9dabb76eaccf484:

  Merge branch 'akpm' (patches from Andrew) (2018-05-18 21:24:26 -0700)

are available in the git repository at:


  git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus

for you to fetch changes up to 766d3571d8e50d3a73b77043dc632226f9e6b389:

  kvm: fix typo in flag name (2018-06-12 15:06:35 +0200)

Sorry for the late pull request, I really wanted to get the top four
patches in because a (wrong) patch for that bug was sent to the list
about a week ago.  I didn't get as much attention/as many reviews as I
hoped for, but here they are anyway.  They aren't complicated, only
a bit tedious, so I'm not (too) worried.

Paolo

----------------------------------------------------------------
Small update for KVM.

* ARM: lazy context-switching of FPSIMD registers on arm64, "split"
regions for vGIC redistributor

* s390: cleanups for nested, clock handling, crypto, storage keys and
control register bits

* x86: many bugfixes, implement more Hyper-V super powers,
implement lapic_timer_advance_ns even when the LAPIC timer
is emulated using the processor's VMX preemption timer.  Two
security-related bugfixes at the top of the branch.

----------------------------------------------------------------
Arnd Bergmann (1):
      KVM: x86: use timespec64 for KVM_HC_CLOCK_PAIRING

Christian Borntraeger (1):
      Merge tag 'kvm-s390-master-4.17-1'

Christoffer Dall (1):
      KVM: arm/arm64: Introduce kvm_arch_vcpu_run_pid_change

Dan Carpenter (1):
      KVM: x86: prevent integer overflows in KVM_MEMORY_ENCRYPT_REG_REGION

Dave Martin (18):
      arm64: fpsimd: Fix TIF_FOREIGN_FPSTATE after invalidating cpu regs
      thread_info: Add update_thread_flag() helpers
      arm64: Use update{,_tsk}_thread_flag()
      KVM: arm64: Convert lazy FPSIMD context switch trap to C
      arm64: fpsimd: Generalise context saving for non-task contexts
      arm64: fpsimd: Avoid FPSIMD context leakage for the init task
      arm64: fpsimd: Eliminate task->mm checks
      arm64/sve: Refactor user SVE trap maintenance for external use
      KVM: arm64: Repurpose vcpu_arch.debug_flags for general-purpose flags
      KVM: arm64: Optimise FPSIMD handling to reduce guest/host thrashing
      arm64/sve: Move read_zcr_features() out of cpufeature.h
      arm64/sve: Switch sve_pffr() argument from task to thread
      arm64/sve: Move sve_pffr() to fpsimd.h and make inline
      KVM: arm64: Save host SVE context as appropriate
      KVM: arm64: Remove eager host SVE state saving
      KVM: arm64: Remove redundant *exit_code changes in fpsimd_guest_exit()
      KVM: arm64: Fold redundant exit code checks out of fixup_guest_exit()
      KVM: arm64: Invoke FPSIMD context switch trap from C

David Hildenbrand (4):
      KVM: s390: introduce defines for control registers
      KVM: s390: no need to inititalize kvm->arch members to 0
      KVM: s390: generalize kvm_s390_get_tod_clock_ext()
      KVM: s390: vsie: simplify < 8k address checks

Eric Auger (13):
      KVM: arm/arm64: Set dist->spis to NULL after kfree
      KVM: arm/arm64: Document KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION
      KVM: arm/arm64: Replace the single rdist region by a list
      KVM: arm/arm64: Helper to locate free rdist index
      KVM: arm/arm64: Revisit Redistributor TYPER last bit computation
      KVM: arm/arm64: Adapt vgic_v3_check_base to multiple rdist regions
      KVM: arm/arm64: Helper to register a new redistributor region
      KVM: arm/arm64: Remove kvm_vgic_vcpu_early_init
      KVM: arm/arm64: Check vcpu redist base before registering an iodev
      KVM: arm/arm64: Check all vcpu redistributors are set on map_resources
      KVM: arm/arm64: Add KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION
      KVM: arm/arm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION
      KVM: arm/arm64: Bump VGIC_V3_MAX_CPUS to 512

Felix Wilhelm (1):
      kvm: nVMX: Enforce cpl=0 for VMX instructions

Greg Kroah-Hartman (1):
      kvm: no need to check return value of debugfs_create functions

Janosch Frank (1):
      KVM: s390: Add storage key facility interpretation control

Jim Mattson (11):
      kvm: vmx: Introduce lapic_mode enumeration
      kvm: vmx: Basic APIC virtualization controls have three settings
      kvm: nVMX: Eliminate APIC access page sharing between L1 and L2
      kvm: mmu: Add guest_mode to kvm_mmu_page_role
      kvm: mmu: Don't expose private memslots to L2
      kvm: nVMX: Use nested_run_pending rather than from_vmentry
      KVM: nVMX: Restore the VMCS12 offsets for v4.0 fields
      KVM: nVMX: Ensure that VMCS12 field offsets do not change
      kvm: x86: Amend the KVM_GET_SUPPORTED_CPUID API documentation
      kvm: nVMX: Restrict VMX capability MSR changes
      kvm: nVMX: Add support for "VMWRITE to any supported field"

Jingqi Liu (1):
      KVM: x86: Expose CLDEMOTE CPU feature to guest VM

Junaid Shahid (1):
      kvm: x86: Refactor mmu_free_roots()

K. Y. Srinivasan (5):
      X86/Hyper-V: Enlighten APIC access
      X86/Hyper-V: Enable IPI enlightenments
      X86/Hyper-V: Enhanced IPI enlightenment
      X86/Hyper-V: Consolidate code for converting cpumask to vpset
      X86/Hyper-V: Consolidate the allocation of the hypercall input page

Liran Alon (6):
      KVM: nVMX: Use vmx local var for referencing vpid02
      KVM: nVMX: Don't flush TLB when vmcs12 uses VPID
      KVM: nVMX: Emulate L1 individual-address invvpid by L0 individual-address invvpid
      KVM: docs: mmu: Fix link to NPT presentation from KVM Forum 2008
      KVM: docs: mmu: KVM support exposing SLAT to guests
      KVM: docs: nVMX: Remove known limitations as they do not exist now

Marc Orr (1):
      kvm: Make VM ioctl do valloc for some archs

Mark Rutland (1):
      arm64: KVM: Use lm_alias() for kvm_ksym_ref()

Michael S. Tsirkin (1):
      kvm: fix typo in flag name

Paolo Bonzini (5):
      Merge tag 'kvmarm-for-v4.18' of git://git.kernel.org/.../kvmarm/kvmarm into HEAD
      Merge tag 'kvm-s390-next-4.18-1' of git://git.kernel.org/.../kvms390/linux into HEAD
      KVM: x86: introduce linear_{read,write}_system
      KVM: x86: pass kvm_vcpu to kvm_read_guest_virt and kvm_write_guest_virt_system
      kvm: x86: use correct privilege level for sgdt/sidt/fxsave/fxrstor access

Radim Krčmář (1):
      Merge branch 'x86/hyperv' of git://git.kernel.org/.../tip/tip

Sean Christopherson (1):
      KVM: x86: remove obsolete EXPORT... of handle_mmio_page_fault

Souptick Joarder (1):
      kvm: Change return type to vm_fault_t

Thomas Gleixner (2):
      x86/Hyper-V/hv_apic: Include asm/apic.h
      x86/Hyper-V/hv_apic: Build the Hyper-V APIC conditionally

Tony Krowiak (1):
      KVM: s390: reset crypto attributes for all vcpus

Vitaly Kuznetsov (8):
      KVM: x86: VMX: hyper-v: Enlightened MSR-Bitmap support
      x86/hyper-v: move struct hv_flush_pcpu{,ex} definitions to common header
      KVM: x86: hyperv: use defines when parsing hypercall parameters
      KVM: x86: hyperv: do rep check for each hypercall separately
      KVM: introduce kvm_make_vcpus_request_mask() API
      KVM: x86: hyperv: simplistic HVCALL_FLUSH_VIRTUAL_ADDRESS_{LIST,SPACE} implementation
      KVM: x86: hyperv: simplistic HVCALL_FLUSH_VIRTUAL_ADDRESS_{LIST,SPACE}_EX implementation
      KVM: x86: hyperv: declare KVM_CAP_HYPERV_TLBFLUSH capability

Wanpeng Li (2):
      KVM: X86: Fix reserved bits check for MOV to CR3
      KVM: VMX: Optimize tscdeadline timer latency

 Documentation/virtual/kvm/api.txt                 |  27 +-
 Documentation/virtual/kvm/devices/arm-vgic-v3.txt |  30 +-
 Documentation/virtual/kvm/mmu.txt                 |   6 +-
 Documentation/virtual/kvm/nested-vmx.txt          |  11 -
 arch/arm/include/asm/kvm_host.h                   |  14 +-
 arch/arm/include/uapi/asm/kvm.h                   |   1 +
 arch/arm64/Kconfig                                |   7 +
 arch/arm64/include/asm/cpufeature.h               |  29 --
 arch/arm64/include/asm/fpsimd.h                   |  21 +
 arch/arm64/include/asm/kvm_asm.h                  |   8 +-
 arch/arm64/include/asm/kvm_host.h                 |  49 ++-
 arch/arm64/include/asm/processor.h                |  15 +-
 arch/arm64/include/asm/thread_info.h              |  13 +-
 arch/arm64/include/uapi/asm/kvm.h                 |   1 +
 arch/arm64/kernel/fpsimd.c                        | 177 ++++----
 arch/arm64/kernel/ptrace.c                        |   1 +
 arch/arm64/kvm/Kconfig                            |   1 +
 arch/arm64/kvm/Makefile                           |   2 +-
 arch/arm64/kvm/debug.c                            |   8 +-
 arch/arm64/kvm/fpsimd.c                           | 110 +++++
 arch/arm64/kvm/hyp/debug-sr.c                     |   6 +-
 arch/arm64/kvm/hyp/entry.S                        |  43 --
 arch/arm64/kvm/hyp/hyp-entry.S                    |  19 -
 arch/arm64/kvm/hyp/switch.c                       | 124 ++++--
 arch/arm64/kvm/hyp/sysreg-sr.c                    |   4 +-
 arch/arm64/kvm/sys_regs.c                         |   9 +-
 arch/mips/kvm/mips.c                              |   2 +-
 arch/powerpc/kvm/book3s_hv.c                      |   3 +-
 arch/powerpc/kvm/powerpc.c                        |   2 +-
 arch/s390/include/asm/ctl_reg.h                   |  12 +
 arch/s390/include/asm/kvm_host.h                  |   1 +
 arch/s390/include/asm/mmu.h                       |   2 +-
 arch/s390/include/asm/mmu_context.h               |   2 +-
 arch/s390/include/asm/pgtable.h                   |   4 +-
 arch/s390/kvm/guestdbg.c                          |   2 +-
 arch/s390/kvm/interrupt.c                         |  20 +-
 arch/s390/kvm/kvm-s390.c                          |  61 +--
 arch/s390/kvm/kvm-s390.h                          |  13 +
 arch/s390/kvm/priv.c                              |  28 +-
 arch/s390/kvm/vsie.c                              |  10 +-
 arch/s390/mm/gmap.c                               |   6 +-
 arch/s390/mm/pgtable.c                            |   4 +-
 arch/x86/hyperv/Makefile                          |   3 +-
 arch/x86/hyperv/hv_apic.c                         | 256 +++++++++++
 arch/x86/hyperv/hv_init.c                         |  32 +-
 arch/x86/hyperv/mmu.c                             |  97 +----
 arch/x86/include/asm/hyperv-tlfs.h                |  55 ++-
 arch/x86/include/asm/kvm_emulate.h                |   6 +-
 arch/x86/include/asm/kvm_host.h                   |   7 +-
 arch/x86/include/asm/mshyperv.h                   |  44 +-
 arch/x86/include/asm/vmx.h                        |   2 +
 arch/x86/kvm/cpuid.c                              |   3 +-
 arch/x86/kvm/emulate.c                            |  76 ++--
 arch/x86/kvm/hyperv.c                             | 171 +++++++-
 arch/x86/kvm/lapic.c                              |  12 +-
 arch/x86/kvm/lapic.h                              |  14 +
 arch/x86/kvm/mmu.c                                |  78 ++--
 arch/x86/kvm/svm.c                                |  16 +-
 arch/x86/kvm/trace.h                              |  51 +++
 arch/x86/kvm/vmx.c                                | 489 +++++++++++++++++-----
 arch/x86/kvm/x86.c                                |  97 +++--
 arch/x86/kvm/x86.h                                |   4 +-
 include/kvm/arm_vgic.h                            |  17 +-
 include/linux/kvm_host.h                          |  19 +-
 include/linux/sched.h                             |   6 +
 include/linux/thread_info.h                       |  11 +
 include/uapi/linux/kvm.h                          |   5 +-
 tools/include/uapi/linux/kvm.h                    |   4 +-
 virt/kvm/Kconfig                                  |   3 +
 virt/kvm/arm/arm.c                                |  32 +-
 virt/kvm/arm/vgic/vgic-debug.c                    |  17 +-
 virt/kvm/arm/vgic/vgic-init.c                     | 100 +++--
 virt/kvm/arm/vgic/vgic-kvm-device.c               |  53 ++-
 virt/kvm/arm/vgic/vgic-mmio-v3.c                  | 112 ++++-
 virt/kvm/arm/vgic/vgic-v3.c                       |  99 ++++-
 virt/kvm/arm/vgic/vgic.h                          |  46 +-
 virt/kvm/kvm_main.c                               |  83 ++--
 77 files changed, 2191 insertions(+), 837 deletions(-)
 create mode 100644 arch/arm64/kvm/fpsimd.c
 create mode 100644 arch/x86/hyperv/hv_apic.c

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-12 14:03 [GIT PULL] KVM changes for 4.18 merge window Paolo Bonzini
@ 2018-06-12 18:43 ` Linus Torvalds
  2018-06-13 13:41   ` Dave Martin
  2018-06-13  2:18 ` Linus Torvalds
  1 sibling, 1 reply; 19+ messages in thread
From: Linus Torvalds @ 2018-06-12 18:43 UTC (permalink / raw)
  To: Paolo Bonzini, Catalin Marinas, Marc Zyngier, Dave Martin
  Cc: Linux Kernel Mailing List, Radim Krčmář, KVM list

On Tue, Jun 12, 2018 at 7:03 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>   git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus

Grr. Several tedious conflicts. I fixed them all up, and they all
looked trivial, but since most of them were to ARM cases, I couldn't
even test the end result.

I suspect the 'workaround_flags' could be merged into the (now)
allegedly generic 'flags' field in the arm64 kvm_vcpu_arch structure,
but I (obviously) didn't actually do that.

Adding some ARM people to the cc so that somebody on that side checks my merge.

(Still going through my basic build tests, not pushed out yet, but I'm
assuming that will finish cleanly and it should be pushed out soon).

Thanks,

              Linus

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-12 14:03 [GIT PULL] KVM changes for 4.18 merge window Paolo Bonzini
  2018-06-12 18:43 ` Linus Torvalds
@ 2018-06-13  2:18 ` Linus Torvalds
  2018-06-13  2:41   ` Linus Torvalds
  2018-06-13 10:09   ` Paolo Bonzini
  1 sibling, 2 replies; 19+ messages in thread
From: Linus Torvalds @ 2018-06-13  2:18 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Linux Kernel Mailing List, Radim Krčmář, KVM list

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

On Tue, Jun 12, 2018 at 7:03 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> * x86: many bugfixes, implement more Hyper-V super powers,

Uhhuh, I didn't notice this initially, because my basic sanity tests
are with everything enabled, but this breaks the build:

  ERROR: "ms_hyperv" [arch/x86/kvm/kvm-intel.ko] undefined!

The attached patch _may_ be the right thing to do. It's not pretty.

Hmm? And why was this not found before it hit my tree?

                  Linus

[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 719 bytes --]

 arch/x86/kvm/vmx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index fc61e25966e4..d0dd35d582da 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4429,6 +4429,7 @@ static int alloc_loaded_vmcs(struct loaded_vmcs *loaded_vmcs)
 			goto out_vmcs;
 		memset(loaded_vmcs->msr_bitmap, 0xff, PAGE_SIZE);
 
+#if IS_ENABLED(CONFIG_HYPERV)
 		if (static_branch_unlikely(&enable_evmcs) &&
 		    (ms_hyperv.nested_features & HV_X64_NESTED_MSR_BITMAP)) {
 			struct hv_enlightened_vmcs *evmcs =
@@ -4436,6 +4437,8 @@ static int alloc_loaded_vmcs(struct loaded_vmcs *loaded_vmcs)
 
 			evmcs->hv_enlightenments_control.msr_bitmap = 1;
 		}
+#endif
+
 	}
 	return 0;
 

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13  2:18 ` Linus Torvalds
@ 2018-06-13  2:41   ` Linus Torvalds
  2018-06-13  2:50     ` Wanpeng Li
  2018-06-13 10:09   ` Paolo Bonzini
  1 sibling, 1 reply; 19+ messages in thread
From: Linus Torvalds @ 2018-06-13  2:41 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Linux Kernel Mailing List, Radim Krčmář, KVM list

On Tue, Jun 12, 2018 at 7:18 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> The attached patch _may_ be the right thing to do. It's not pretty.

.. and when I decided to actually do some minimal kvm testing with
that patch, I notice that we've apparently broken kvm entirely during
this merge window, and I just get

  Error: KVM_CREATE_VM ioctl
  Warning: Failed init: kvm__init

when doing lkvm run.

Bisecting. But that's unrelated to the recent kvm build breakage.

               Linus

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13  2:41   ` Linus Torvalds
@ 2018-06-13  2:50     ` Wanpeng Li
  2018-06-13  3:00       ` Linus Torvalds
  0 siblings, 1 reply; 19+ messages in thread
From: Wanpeng Li @ 2018-06-13  2:50 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Paolo Bonzini, LKML, Radim Krcmar, kvm

On Wed, 13 Jun 2018 at 10:42, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Tue, Jun 12, 2018 at 7:18 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > The attached patch _may_ be the right thing to do. It's not pretty.
>
> .. and when I decided to actually do some minimal kvm testing with
> that patch, I notice that we've apparently broken kvm entirely during
> this merge window, and I just get
>
>   Error: KVM_CREATE_VM ioctl
>   Warning: Failed init: kvm__init
>
> when doing lkvm run.
>
> Bisecting. But that's unrelated to the recent kvm build breakage.

Yeah, it happens before the KVM GIT PULL on Linus's tree, you will see
the warning above unless you lauch the guest w/ root user, maybe other
subsystems' modifications break something.

Regards,
Wanpeng Li

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13  2:50     ` Wanpeng Li
@ 2018-06-13  3:00       ` Linus Torvalds
  2018-06-13  3:26         ` Linus Torvalds
  0 siblings, 1 reply; 19+ messages in thread
From: Linus Torvalds @ 2018-06-13  3:00 UTC (permalink / raw)
  To: Wanpeng Li, Greg Kroah-Hartman
  Cc: Paolo Bonzini, Linux Kernel Mailing List,
	Radim Krčmář,
	KVM list

On Tue, Jun 12, 2018 at 7:51 PM Wanpeng Li <kernellwp@gmail.com> wrote:
> >
> > Bisecting. But that's unrelated to the recent kvm build breakage.
>
> Yeah, it happens before the KVM GIT PULL on Linus's tree, you will see
> the warning above unless you lauch the guest w/ root user, maybe other
> subsystems' modifications break something.

Yeah, the biusection seems to actually be diving into Greg's device pulls.

Odd. I'm not seeing why that would break kvm, but maybe there's
something in the device core layer that really messed it up.

I'll continue to bisect to see.

            Linus

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13  3:00       ` Linus Torvalds
@ 2018-06-13  3:26         ` Linus Torvalds
  2018-06-13  3:52           ` Linus Torvalds
  2018-06-13  4:47           ` Greg Kroah-Hartman
  0 siblings, 2 replies; 19+ messages in thread
From: Linus Torvalds @ 2018-06-13  3:26 UTC (permalink / raw)
  To: Wanpeng Li, Greg Kroah-Hartman, Thomas Richter, Kees Cook
  Cc: Paolo Bonzini, Linux Kernel Mailing List,
	Radim Krčmář,
	KVM list

On Tue, Jun 12, 2018 at 8:00 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Yeah, the biusection seems to actually be diving into Greg's device pulls.
>
> Odd. I'm not seeing why that would break kvm, but maybe there's
> something in the device core layer that really messed it up.
>
> I'll continue to bisect to see.

Ok, so commit 95cde3c59966 ("debugfs: inode: debugfs_create_dir uses
mode permission from parent") breaks lkvm, and I think qemu-kvm too.

The commit looks like the RightThing(tm) to do, but we do not break
existing work-flows, no matter how much we'd like to.  So it gets
reverted.

Greg, Thomas, perhaps some alternative model? I'm not sure exactly
what kvm needs from debugfs.

                   Linus

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13  3:26         ` Linus Torvalds
@ 2018-06-13  3:52           ` Linus Torvalds
  2018-06-13  4:48             ` Greg Kroah-Hartman
  2018-06-13  4:47           ` Greg Kroah-Hartman
  1 sibling, 1 reply; 19+ messages in thread
From: Linus Torvalds @ 2018-06-13  3:52 UTC (permalink / raw)
  To: Wanpeng Li, Greg Kroah-Hartman, Thomas-Mich Richter, Kees Cook
  Cc: Paolo Bonzini, Linux Kernel Mailing List,
	Radim Krčmář,
	KVM list

On Tue, Jun 12, 2018 at 8:26 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> Ok, so commit 95cde3c59966 ("debugfs: inode: debugfs_create_dir uses
> mode permission from parent") breaks lkvm, and I think qemu-kvm too.
>
> The commit looks like the RightThing(tm) to do, but we do not break
> existing work-flows, no matter how much we'd like to.  So it gets
> reverted.

I suspect it's the special kvm debugfs entries - see kvm_create_vm_debugfs()

Anyway, I've verified that both qemu-kvm and kvm-tool work fine with
the revert in place.

                     Linus

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13  3:26         ` Linus Torvalds
  2018-06-13  3:52           ` Linus Torvalds
@ 2018-06-13  4:47           ` Greg Kroah-Hartman
  1 sibling, 0 replies; 19+ messages in thread
From: Greg Kroah-Hartman @ 2018-06-13  4:47 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Wanpeng Li, Thomas Richter, Kees Cook, Paolo Bonzini,
	Linux Kernel Mailing List, Radim Krčmář,
	KVM list

On Tue, Jun 12, 2018 at 08:26:46PM -0700, Linus Torvalds wrote:
> On Tue, Jun 12, 2018 at 8:00 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > Yeah, the biusection seems to actually be diving into Greg's device pulls.
> >
> > Odd. I'm not seeing why that would break kvm, but maybe there's
> > something in the device core layer that really messed it up.
> >
> > I'll continue to bisect to see.
> 
> Ok, so commit 95cde3c59966 ("debugfs: inode: debugfs_create_dir uses
> mode permission from parent") breaks lkvm, and I think qemu-kvm too.
> 
> The commit looks like the RightThing(tm) to do, but we do not break
> existing work-flows, no matter how much we'd like to.  So it gets
> reverted.
> 
> Greg, Thomas, perhaps some alternative model? I'm not sure exactly
> what kvm needs from debugfs.

I don't know either, I have a revert of that patch sitting in my queue
waiting to send to you for 4.18-rc1.  I didn't realize it was causing
breakage for others, or I would have sent it to you now.  You can revert
it yourself now if you want, so we can fix this problem now and work on
figuring out what is so "odd" about kvm's debugfs files.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13  3:52           ` Linus Torvalds
@ 2018-06-13  4:48             ` Greg Kroah-Hartman
  2018-06-13  4:52               ` Linus Torvalds
  0 siblings, 1 reply; 19+ messages in thread
From: Greg Kroah-Hartman @ 2018-06-13  4:48 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Wanpeng Li, Thomas-Mich Richter, Kees Cook, Paolo Bonzini,
	Linux Kernel Mailing List, Radim Krčmář,
	KVM list

On Tue, Jun 12, 2018 at 08:52:08PM -0700, Linus Torvalds wrote:
> On Tue, Jun 12, 2018 at 8:26 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > Ok, so commit 95cde3c59966 ("debugfs: inode: debugfs_create_dir uses
> > mode permission from parent") breaks lkvm, and I think qemu-kvm too.
> >
> > The commit looks like the RightThing(tm) to do, but we do not break
> > existing work-flows, no matter how much we'd like to.  So it gets
> > reverted.
> 
> I suspect it's the special kvm debugfs entries - see kvm_create_vm_debugfs()
> 
> Anyway, I've verified that both qemu-kvm and kvm-tool work fine with
> the revert in place.

I should have read the whole thread :)

The revert is fine, I'll work on the kvm debugfs file stuff for 4.19.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13  4:48             ` Greg Kroah-Hartman
@ 2018-06-13  4:52               ` Linus Torvalds
  2018-06-13 10:03                 ` Wanpeng Li
  0 siblings, 1 reply; 19+ messages in thread
From: Linus Torvalds @ 2018-06-13  4:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Wanpeng Li, Thomas-Mich Richter, Kees Cook, Paolo Bonzini,
	Linux Kernel Mailing List, Radim Krčmář,
	KVM list

On Tue, Jun 12, 2018 at 9:49 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> The revert is fine, I'll work on the kvm debugfs file stuff for 4.19.

Yeah,  I did two fairly brute-force fixes for two different issues
(the only common thread was kvm - testing the first fix was what then
got me to the debugfs revert).

I'm going to be start traveling towards Japan and China tomorrow
morning, so I wanted to just get the problems I noticed out of my
tree. Both of the two top commits in my tree probably have better more
targeted fixes eventually.

            Linus

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13  4:52               ` Linus Torvalds
@ 2018-06-13 10:03                 ` Wanpeng Li
  0 siblings, 0 replies; 19+ messages in thread
From: Wanpeng Li @ 2018-06-13 10:03 UTC (permalink / raw)
  To: torvalds; +Cc: gregkh, tmricht, keescook, pbonzini, linux-kernel, rkrcmar, kvm

On Wed, 13 Jun 2018 at 12:53, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Tue, Jun 12, 2018 at 9:49 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> I'm going to be start traveling towards Japan and China tomorrow
> morning, so I wanted to just get the problems I noticed out of my

Great!, welcome to our country(China),  and looking forward to see you
at Linux Conf. :)

Regards,
Wanpeng Li

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13  2:18 ` Linus Torvalds
  2018-06-13  2:41   ` Linus Torvalds
@ 2018-06-13 10:09   ` Paolo Bonzini
  2018-06-13 10:59     ` Vitaly Kuznetsov
  2018-06-13 13:56     ` Linus Torvalds
  1 sibling, 2 replies; 19+ messages in thread
From: Paolo Bonzini @ 2018-06-13 10:09 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux Kernel Mailing List, Radim Krčmář, KVM list

On 13/06/2018 04:18, Linus Torvalds wrote:
> On Tue, Jun 12, 2018 at 7:03 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> * x86: many bugfixes, implement more Hyper-V super powers,
> 
> Uhhuh, I didn't notice this initially, because my basic sanity tests
> are with everything enabled, but this breaks the build:
> 
>   ERROR: "ms_hyperv" [arch/x86/kvm/kvm-intel.ko] undefined!
> 
> The attached patch _may_ be the right thing to do. It's not pretty.
> 
> Hmm? And why was this not found before it hit my tree?

Because I should do more "make randconfig"s, probably.

Paolo


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13 10:09   ` Paolo Bonzini
@ 2018-06-13 10:59     ` Vitaly Kuznetsov
  2018-06-13 14:00       ` Linus Torvalds
  2018-06-13 13:56     ` Linus Torvalds
  1 sibling, 1 reply; 19+ messages in thread
From: Vitaly Kuznetsov @ 2018-06-13 10:59 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Linus Torvalds, Linux Kernel Mailing List,
	Radim Krčmář,
	KVM list

Paolo Bonzini <pbonzini@redhat.com> writes:

> On 13/06/2018 04:18, Linus Torvalds wrote:
>> On Tue, Jun 12, 2018 at 7:03 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>>>
>>> * x86: many bugfixes, implement more Hyper-V super powers,
>> 
>> Uhhuh, I didn't notice this initially, because my basic sanity tests
>> are with everything enabled, but this breaks the build:
>> 
>>   ERROR: "ms_hyperv" [arch/x86/kvm/kvm-intel.ko] undefined!
>> 
>> The attached patch _may_ be the right thing to do. It's not pretty.
>> 
>> Hmm? And why was this not found before it hit my tree?
>
> Because I should do more "make randconfig"s, probably.
>

This was reported before by Arnd Bergmann:

https://www.spinics.net/lists/kvm/msg169536.html

but it seems his patch got lost.

Sorry for the breakage :-)

-- 
  Vitaly

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-12 18:43 ` Linus Torvalds
@ 2018-06-13 13:41   ` Dave Martin
  0 siblings, 0 replies; 19+ messages in thread
From: Dave Martin @ 2018-06-13 13:41 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Paolo Bonzini, Catalin Marinas, Marc Zyngier,
	Linux Kernel Mailing List, Radim Krčmář,
	KVM list

On Tue, Jun 12, 2018 at 07:43:50PM +0100, Linus Torvalds wrote:
> On Tue, Jun 12, 2018 at 7:03 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> >   git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus
> 
> Grr. Several tedious conflicts. I fixed them all up, and they all
> looked trivial, but since most of them were to ARM cases, I couldn't
> even test the end result.
> 
> I suspect the 'workaround_flags' could be merged into the (now)
> allegedly generic 'flags' field in the arm64 kvm_vcpu_arch structure,
> but I (obviously) didn't actually do that.

I think we decided that it was a bit premature to merge them, but we
will likely be able to do that later on.

> Adding some ARM people to the cc so that somebody on that side checks my merge.
> 
> (Still going through my basic build tests, not pushed out yet, but I'm
> assuming that will finish cleanly and it should be pushed out soon).

I've now build-tested master (f5b7769eb0) in a few configurations
(particularly KVM + !KVM) for arch/arm.  The main risk there is missing
new hooks called by the core virt/kvm/arm code.

For arm64 I've now done some basic boot/run/KVM testing as appropriate
on Juno and the Arm fast model for various configs (defconfig,
ARM64_SVE=n, KVM=n).

For the KVM/SVE interactions in particular, the merge looks good to me.

Cheers
---Dave

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13 10:09   ` Paolo Bonzini
  2018-06-13 10:59     ` Vitaly Kuznetsov
@ 2018-06-13 13:56     ` Linus Torvalds
  2018-06-13 14:26       ` Paolo Bonzini
  1 sibling, 1 reply; 19+ messages in thread
From: Linus Torvalds @ 2018-06-13 13:56 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Linux Kernel Mailing List, Radim Krčmář, KVM list

On Wed, Jun 13, 2018 at 3:09 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 13/06/2018 04:18, Linus Torvalds wrote:
> >
> > Hmm? And why was this not found before it hit my tree?
>
> Because I should do more "make randconfig"s, probably.

Well, being in linux-next should have found it too. I know linux-next
had a lot of kvm stuff in it, was this not there?

                Linus

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13 10:59     ` Vitaly Kuznetsov
@ 2018-06-13 14:00       ` Linus Torvalds
  0 siblings, 0 replies; 19+ messages in thread
From: Linus Torvalds @ 2018-06-13 14:00 UTC (permalink / raw)
  To: Vitaly Kuznetsov
  Cc: Paolo Bonzini, Linux Kernel Mailing List,
	Radim Krčmář,
	KVM list

On Wed, Jun 13, 2018 at 4:00 AM Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
>
> This was reported before by Arnd Bergmann:
>
> https://www.spinics.net/lists/kvm/msg169536.html
>
> but it seems his patch got lost.

So I think his patch is closer to what the code *should* do. Mine was
a big ugly #if around the whole thing, but I really think that *all*
those

     if (static_branch_unlikely(&enable_evmcs)...

cases should probably be using IS_ENABLED(CONFIG_HYPERV) too.

Preferably by simply having a helper macro or inline function to do both tests.

I intentionally did just he big brute-force thing, I'm hoping the kvm
hyper-v people will clean this up.

But obviously this also showed a lack of testing.

                    Linus

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13 13:56     ` Linus Torvalds
@ 2018-06-13 14:26       ` Paolo Bonzini
  2018-06-13 14:29         ` Linus Torvalds
  0 siblings, 1 reply; 19+ messages in thread
From: Paolo Bonzini @ 2018-06-13 14:26 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Linux Kernel Mailing List, Radim Krčmář, KVM list

On 13/06/2018 15:56, Linus Torvalds wrote:
> On Wed, Jun 13, 2018 at 3:09 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> On 13/06/2018 04:18, Linus Torvalds wrote:
>>>
>>> Hmm? And why was this not found before it hit my tree?
>>
>> Because I should do more "make randconfig"s, probably.
> 
> Well, being in linux-next should have found it too. I know linux-next
> had a lot of kvm stuff in it, was this not there?

It was, I suppose that's how Arnd found it.

I also checked my reflog in case I force-pushed something by mistake
(kvm/next doesn't rebase, but you never know) and that didn't happen
either.  I'll fix the "no virt stuff" build in my pre-pull-request
routine.  I already have KVM-but-no-CONFIG_KVM_GUEST build---and the
other way round---I'll remove CONFIG_HYPERV too from the former.

Paolo

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [GIT PULL] KVM changes for 4.18 merge window
  2018-06-13 14:26       ` Paolo Bonzini
@ 2018-06-13 14:29         ` Linus Torvalds
  0 siblings, 0 replies; 19+ messages in thread
From: Linus Torvalds @ 2018-06-13 14:29 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Linux Kernel Mailing List, Radim Krčmář, KVM list

On Wed, Jun 13, 2018 at 7:27 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> > Well, being in linux-next should have found it too. I know linux-next
> > had a lot of kvm stuff in it, was this not there?
>
> It was, I suppose that's how Arnd found it.

Ok, apparently the 0day bot doesn't trigger this case, or it's just
that even with randconfig you needed to hit just he right set of
combinations.

Oh well. Water under the bridge, hopefully your added tests will make
sure at least _this_ particular issue doesn't happen again...

           Linus

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-06-13 14:30 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-12 14:03 [GIT PULL] KVM changes for 4.18 merge window Paolo Bonzini
2018-06-12 18:43 ` Linus Torvalds
2018-06-13 13:41   ` Dave Martin
2018-06-13  2:18 ` Linus Torvalds
2018-06-13  2:41   ` Linus Torvalds
2018-06-13  2:50     ` Wanpeng Li
2018-06-13  3:00       ` Linus Torvalds
2018-06-13  3:26         ` Linus Torvalds
2018-06-13  3:52           ` Linus Torvalds
2018-06-13  4:48             ` Greg Kroah-Hartman
2018-06-13  4:52               ` Linus Torvalds
2018-06-13 10:03                 ` Wanpeng Li
2018-06-13  4:47           ` Greg Kroah-Hartman
2018-06-13 10:09   ` Paolo Bonzini
2018-06-13 10:59     ` Vitaly Kuznetsov
2018-06-13 14:00       ` Linus Torvalds
2018-06-13 13:56     ` Linus Torvalds
2018-06-13 14:26       ` Paolo Bonzini
2018-06-13 14:29         ` Linus Torvalds

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).