History

Merge tag 'kvm-4.13-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull more KVM updates from Radim Krčmář: "Second batch of KVM updates for v4.13 Common: - add uevents for VM creation/destruction - annotate and properly access RCU-protected objects s390: - rename IOCTL added in the first v4.13 merge x86: - emulate VMLOAD VMSAVE feature in SVM - support paravirtual asynchronous page fault while nested - add Hyper-V userspace interfaces for better migration - improve master clock corner cases - extend internal error reporting after EPT misconfig - correct single-stepping of emulated instructions in SVM - handle MCE during VM entry - fix nVMX VM entry checks and nVMX VMCS shadowing" * tag 'kvm-4.13-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (28 commits) kvm: x86: hyperv: make VP_INDEX managed by userspace KVM: async_pf: Let guest support delivery of async_pf from guest mode KVM: async_pf: Force a nested vmexit if the injected #PF is async_pf KVM: async_pf: Add L1 guest async_pf #PF vmexit handler KVM: x86: Simplify kvm_x86_ops->queue_exception parameter list kvm: x86: hyperv: add KVM_CAP_HYPERV_SYNIC2 KVM: x86: make backwards_tsc_observed a per-VM variable KVM: trigger uevents when creating or destroying a VM KVM: SVM: Enable Virtual VMLOAD VMSAVE feature KVM: SVM: Add Virtual VMLOAD VMSAVE feature definition KVM: SVM: Rename lbr_ctl field in the vmcb control area KVM: SVM: Prepare for new bit definition in lbr_ctl KVM: SVM: handle singlestep exception when skipping emulated instructions KVM: x86: take slots_lock in kvm_free_pit KVM: s390: Fix KVM_S390_GET_CMMA_BITS ioctl definition kvm: vmx: Properly handle machine check during VM-entry KVM: x86: update master clock before computing kvmclock_offset kvm: nVMX: Shadow "high" parts of shadowed 64-bit VMCS fields kvm: nVMX: Fix nested_vmx_check_msr_bitmap_controls kvm: nVMX: Validate the I/O bitmaps on nested VM-entry ...

Linus Torvalds committed 9 years ago

Commit e37a07e2 parents a80099a d3457c821 files · +470 −207Browse files

Showing the changes to include/linux (1 of 21 files). Show all

Unified · Split

include/linux/kvm_host.h+11−6
@@ -234,7 +234,7 @@ struct kvm_vcpu { · 233 unmodified lines
234234
235235 int guest_fpu_loaded, guest_xcr0_loaded;
236236 struct swait_queue_head wq;
237− struct pid *pid;
237+ struct pid __rcu *pid;
238238 int sigset_active;
239239 sigset_t sigset;
240240 struct kvm_vcpu_stat stat;
@@ -390,7 +390,7 @@ struct kvm { · 149 unmodified lines
390390 spinlock_t mmu_lock;
391391 struct mutex slots_lock;
392392 struct mm_struct *mm; /* userspace tied to this vm */
393− struct kvm_memslots *memslots[KVM_ADDRESS_SPACE_NUM];
393+ struct kvm_memslots __rcu *memslots[KVM_ADDRESS_SPACE_NUM];
394394 struct kvm_vcpu *vcpus[KVM_MAX_VCPUS];
395395
396396 /*
@@ -404,7 +404,7 @@ struct kvm { · 7 unmodified lines
404404 int last_boosted_vcpu;
405405 struct list_head vm_list;
406406 struct mutex lock;
407− struct kvm_io_bus *buses[KVM_NR_BUSES];
407+ struct kvm_io_bus __rcu *buses[KVM_NR_BUSES];
408408 #ifdef CONFIG_HAVE_KVM_EVENTFD
409409 struct {
410410 spinlock_t lock;
@@ -473,6 +473,12 @@ struct kvm { · 62 unmodified lines
473473 #define vcpu_err(vcpu, fmt, ...) \
474474 kvm_err("vcpu%i " fmt, (vcpu)->vcpu_id, ## __VA_ARGS__)
475475
476+static inline struct kvm_io_bus *kvm_get_bus(struct kvm *kvm, enum kvm_bus idx)
477+{
478+ return srcu_dereference_check(kvm->buses[idx], &kvm->srcu,
479+ lockdep_is_held(&kvm->slots_lock));
480+}
481+
476482 static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i)
477483 {
478484 /* Pairs with smp_wmb() in kvm_vm_ioctl_create_vcpu, in case
@@ -562,9 +568,8 @@ void kvm_put_kvm(struct kvm *kvm); · 83 unmodified lines
562568
563569 static inline struct kvm_memslots *__kvm_memslots(struct kvm *kvm, int as_id)
564570 {
565− return rcu_dereference_check(kvm->memslots[as_id],
566− srcu_read_lock_held(&kvm->srcu)
567− || lockdep_is_held(&kvm->slots_lock));
571+ return srcu_dereference_check(kvm->memslots[as_id], &kvm->srcu,
572+ lockdep_is_held(&kvm->slots_lock));
568573 }
569574
570575 static inline struct kvm_memslots *kvm_memslots(struct kvm *kvm)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t