From: "Jan Beulich" Subject: Re: [PATCH v3 11/13] x86/altp2m: define and implement alternate p2m HVMOP types. Date: Tue, 07 Jul 2015 08:33:34 +0100 Message-ID: <559B9CEE020000780008D259@mail.emea.novell.com> References: <1435774177-6345-1-git-send-email-edmund.h.white@intel.com> <1435774177-6345-12-git-send-email-edmund.h.white@intel.com> <559A53D5.5030209@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <559A53D5.5030209@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Ed White Cc: Ravi Sahita , Wei Liu , George Dunlap , Tim Deegan , Ian Jackson , xen-devel@lists.xen.org, tlengyel@novetta.com, Daniel De Graaf List-Id: xen-devel@lists.xenproject.org >>> On 06.07.15 at 12:09, wrote: > On 01/07/15 19:09, Ed White wrote: >> Signed-off-by: Ed White > > I am still very much unconvinced by the argument against having a single > HVMOP_altp2m and a set of subops. do_domctl() and do_sysctl() are > examples of a subop style hypercall with different XSM settings for > different subops. +1 >> + case HVMOP_altp2m_vcpu_enable_notify: >> + { >> + struct domain *curr_d = current->domain; >> + struct vcpu *curr = current; >> + struct xen_hvm_altp2m_vcpu_enable_notify a; >> + p2m_type_t p2mt; >> + >> + if ( copy_from_guest(&a, arg, 1) ) >> + return -EFAULT; >> + >> + if ( !is_hvm_domain(curr_d) || !hvm_altp2m_supported() || >> + !curr_d->arch.altp2m_active || >> + gfn_x(vcpu_altp2m(curr).veinfo_gfn) != INVALID_GFN) > > Brackets around the boolean operation on this line, and a space inside > the final bracket. The latter is a requirement, while the former really is optional. Jan