From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM: PIT: fix pit_state copy in set_pit2/get_pit2 Date: Tue, 25 Aug 2009 15:33:02 +0300 Message-ID: <4A93D9FE.8080906@redhat.com> References: <0463F45F3606F4428ED35AC8C709F92E0897FE903F@pdsmsx502.ccr.corp.intel.com> <4A894A5B.2080901@redhat.com> <0463F45F3606F4428ED35AC8C709F92E0899F3DD99@pdsmsx502.ccr.corp.intel.com> <4A8BB304.6020202@redhat.com> <0463F45F3606F4428ED35AC8C709F92E0899F3E6E2@pdsmsx502.ccr.corp.intel.com> <4A93BADC.4090106@redhat.com> <20090825122921.GA18813@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Xu, Jiajun" , "'kvm-devel'" To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39891 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754715AbZHYMdD (ORCPT ); Tue, 25 Aug 2009 08:33:03 -0400 In-Reply-To: <20090825122921.GA18813@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 08/25/2009 03:29 PM, Marcelo Tosatti wrote: > The kvm_pit_state2 structure contains extra space, so the memcpy > in kvm_vm_ioctl_set_pit2 corrupts kvm->arch.vpit->pit_state. > > Fix it by memcpy'ing the channel information and assigning flags > manually. > Good catch; applied. -- error compiling committee.c: too many arguments to function