[Devel] [PATCH RHEL7 COMMIT] kvm/x86: Coding style fixes

Konstantin Khorenko khorenko at virtuozzo.com
Tue Feb 16 01:50:08 PST 2016


The commit is pushed to "branch-rh7-3.10.0-327.4.5.vz7.11.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.4.5.vz7.11.2
------>
commit 21fe0897909465395c2cfb907e4d7afb5ac09df9
Author: Andrey Smetanin <asmetanin at virtuozzo.com>
Date:   Tue Feb 16 13:50:08 2016 +0400

    kvm/x86: Coding style fixes
    
    Patch series description:
    Hyper-V SynIC support
    
    patches contains:
    * Hyper-V RESET, VP_INDEX, VP_RUNTIME msr's support
    * Hyper-V synthetic interrupt controller(SynIC)
    * Hyper-V SynIC timers
    
    https://jira.sw.ru/browse/PSBM-32435
    
    Andrey Smetanin (36-2):
      kvm/x86: Coding style fixes
      (dropped) kvm/x86: Vcpu based page access routines usage
      kvm/x86: get(set)_msr_hyperv() -> kvm_hv_get(set)_msr() rename
      kvm/x86: Align logging messages to MS one
      (dropped) kvm/x86: Use is_64_bit_mode() helper
      ms/kvm/x86: Hyper-V HV_X64_MSR_RESET msr
      ms/kvm/x86: Hyper-V HV_X64_MSR_VP_INDEX export for QEMU.
      ms/kvm/x86: Hyper-V HV_X64_MSR_VP_RUNTIME support
      ms/kvm/eventfd: avoid loop inside irqfd_update()
      ms/kvm/eventfd: factor out kvm_notify_acked_gsi()
      ms/kvm/eventfd: add arch-specific set_irq
      ms/kvm/irqchip: allow only multiple irqchip routes per GSI
      ms/drivers/hv: share Hyper-V SynIC constants with userspace
      ms/kvm/irqchip: kvm_arch_irq_routing_update renaming split
      ms/kvm/x86: per-vcpu apicv deactivation support
      ms/kvm/x86: Hyper-V synthetic interrupt controller
      ms/kvm/x86: Hyper-V kvm exit
      ms/drivers/hv: replace enum hv_message_type by u32
      ms/drivers/hv: Move HV_SYNIC_STIMER_COUNT into Hyper-V UAPI x86 header
      ms/drivers/hv: Move struct hv_message into UAPI Hyper-V x86 header
      ms/drivers/hv: Move struct hv_timer_message_payload into UAPI Hyper-V x86 header
      ms/kvm/x86: Rearrange func's declarations inside Hyper-V header
      ms/kvm/x86: Added Hyper-V vcpu_to_hv_vcpu()/hv_vcpu_to_vcpu() helpers
      ms/kvm/x86: Hyper-V internal helper to read MSR HV_X64_MSR_TIME_REF_COUNT
      ms/kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack
      ms/kvm/x86: Hyper-V SynIC timers
      ms/kvm/x86: Remove Hyper-V SynIC timer stopping
      ms/kvm/x86: Hyper-V timers fix incorrect logical operation
      ms/kvm/x86: Drop stimer_stop() function
      ms/kvm/x86: Hyper-V unify stimer_start() and stimer_restart()
      ms/kvm/x86: Reorg stimer_expiration() to better control timer restart
      ms/kvm/x86: Hyper-V fix SynIC timer disabling condition
      ms/kvm/x86: Skip SynIC vector check for QEMU side
      ms/kvm/x86: Update SynIC timers on guest entry only
      ms/kvm/x86: Hyper-V SynIC tracepoints
      ms/kvm/x86: Hyper-V SynIC timers tracepoints
    
    Signed-off-by: Andrey Smetanin <asmetanin at virtuozzo.com>
---
 arch/x86/kvm/hyperv.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 625223b..5828875 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -33,6 +33,7 @@
 static bool kvm_hv_msr_partition_wide(u32 msr)
 {
 	bool r = false;
+
 	switch (msr) {
 	case HV_X64_MSR_GUEST_OS_ID:
 	case HV_X64_MSR_HYPERCALL:
@@ -142,13 +143,16 @@ static int set_msr_hyperv_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data,
 	case HV_X64_MSR_REFERENCE_TSC: {
 		u64 gfn;
 		HV_REFERENCE_TSC_PAGE tsc_ref;
+
 		memset(&tsc_ref, 0, sizeof(tsc_ref));
 		hv->hv_tsc_page = data;
 		if (!(data & HV_X64_MSR_TSC_REFERENCE_ENABLE))
 			break;
 		gfn = data >> HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT;
-		if (kvm_write_guest(kvm, gfn << HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT,
-			&tsc_ref, sizeof(tsc_ref)))
+		if (kvm_write_guest(
+				kvm,
+				gfn << HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT,
+				&tsc_ref, sizeof(tsc_ref)))
 			return 1;
 		mark_page_dirty(kvm, gfn);
 		break;
@@ -190,7 +194,8 @@ static int set_msr_hyperv(struct kvm_vcpu *vcpu, u32 msr, u64 data)
 			return 1;
 		hv->hv_vapic = data;
 		mark_page_dirty(vcpu->kvm, gfn);
-		if (kvm_lapic_enable_pv_eoi(vcpu, gfn_to_gpa(gfn) | KVM_MSR_ENABLED))
+		if (kvm_lapic_enable_pv_eoi(vcpu,
+					    gfn_to_gpa(gfn) | KVM_MSR_ENABLED))
 			return 1;
 		break;
 	}
@@ -254,6 +259,7 @@ static int get_msr_hyperv(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
 	case HV_X64_MSR_VP_INDEX: {
 		int r;
 		struct kvm_vcpu *v;
+
 		kvm_for_each_vcpu(r, v, vcpu->kvm) {
 			if (v == vcpu) {
 				data = r;
@@ -283,6 +289,7 @@ int kvm_hv_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data, bool host)
 {
 	if (kvm_hv_msr_partition_wide(msr)) {
 		int r;
+
 		mutex_lock(&vcpu->kvm->lock);
 		r = set_msr_hyperv_pw(vcpu, msr, data, host);
 		mutex_unlock(&vcpu->kvm->lock);
@@ -295,6 +302,7 @@ int kvm_hv_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
 {
 	if (kvm_hv_msr_partition_wide(msr)) {
 		int r;
+
 		mutex_lock(&vcpu->kvm->lock);
 		r = get_msr_hyperv_pw(vcpu, msr, pdata);
 		mutex_unlock(&vcpu->kvm->lock);


More information about the Devel mailing list