From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: KVM: x86: drop alignment checks from KVM_MSR_SYSTEM_TIME address Date: Fri, 22 Mar 2013 18:19:47 -0300 Message-ID: <20130322211947.GA2685@amt.cnet> References: <20130322191407.GA23681@amt.cnet> <20130322192100.GA9382@redhat.com> <20130322194735.GA21288@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andy Honig , kvm To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:7468 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423092Ab3CVVV0 (ORCPT ); Fri, 22 Mar 2013 17:21:26 -0400 Content-Disposition: inline In-Reply-To: <20130322194735.GA21288@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: The alignment check is not necessary given that "KVM: x86: Convert MSR_KVM_SYSTEM_TIME to use gfn_to_hva_cache" (0b79459b482e85cb742) uses kvm_write_guest which is able to handle data across page properly. Signed-off-by: Marcelo Tosatti diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f19ac0a..ec830fa 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1952,10 +1952,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) gpa_offset = data & ~(PAGE_MASK | 1); - /* Check that the address is 32-byte aligned. */ - if (gpa_offset & (sizeof(struct pvclock_vcpu_time_info) - 1)) - break; - if (kvm_gfn_to_hva_cache_init(vcpu->kvm, &vcpu->arch.pv_time, data & ~1ULL)) vcpu->arch.pv_time_enabled = false;