From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: Reason for extra struct kvm_run parameter in MMIO handling? Date: Mon, 9 Feb 2015 17:21:54 +0100 Message-ID: <20150209162154.GA1804@potion.brq.redhat.com> References: <54D4FA45.1000103@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "kvm@vger.kernel.org" , Paolo Bonzini , Gleb Natapov , "kvmarm@lists.cs.columbia.edu" To: Andre Przywara Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40501 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932284AbbBIQWM (ORCPT ); Mon, 9 Feb 2015 11:22:12 -0500 Content-Disposition: inline In-Reply-To: <54D4FA45.1000103@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: 2015-02-06 17:30+0000, Andre Przywara: > As kvm_run is a member of kvm_vcpu, the vcpu alone should be sufficient, > right? Yes. > Also I see the very top of the call chain is effectively: > kvm_arch_vcpu_ioctl_run(vcpu, vcpu->run); :( > So is that just legacy code still lingering around from the dawn of time > and nobody dared to rework this or is there a particular reason for > doing so? Probably laziness in 9a2bb7f486dc639a1cf2ad803bf2227f0dc0809d. > I am asking because I lack the kvm_run pointer in the MMIO handler, so I > just use vcpu->run and I wonder if there are potential issues in doing so. We do it at few places already, so there, hopefully, is no problem.