From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 2/2] x86:kvm:hyperv: guest->host event signaling via eventfd Date: Wed, 6 Dec 2017 10:28:33 -0500 Message-ID: <20171206152833.GK28074@char.us.oracle.com> References: <20171204190044.14125-1-rkagan@virtuozzo.com> <20171204190044.14125-3-rkagan@virtuozzo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , "Denis V. Lunev" To: Roman Kagan Return-path: Received: from userp2120.oracle.com ([156.151.31.85]:49062 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751362AbdLFP2m (ORCPT ); Wed, 6 Dec 2017 10:28:42 -0500 Content-Disposition: inline In-Reply-To: <20171204190044.14125-3-rkagan@virtuozzo.com> Sender: kvm-owner@vger.kernel.org List-ID: .snip.. > +static u16 hvcall_sigevent_param(struct kvm_vcpu *vcpu, gpa_t gpa, u32 *conn_id) > +{ > + struct page *page; > + void *pg; > + struct hv_input_signal_event *msg; > + > + if ((gpa & (__alignof__(*msg) - 1)) || > + offset_in_page(gpa) + sizeof(*msg) > PAGE_SIZE) > + return HV_STATUS_INVALID_ALIGNMENT; > + > + page = kvm_vcpu_gfn_to_page(vcpu, gpa >> PAGE_SHIFT); > + if (is_error_page(page)) > + return HV_STATUS_INSUFFICIENT_MEMORY; > + > + pg = kmap_atomic(page); > + msg = pg + offset_in_page(gpa); > + *conn_id = msg->connectionid.u.id + msg->flag_number; Here it is u32.. > + kunmap_atomic(pg); > + return HV_STATUS_SUCCESS; > +} > + .. snip.. > +static int kvm_hv_eventfd_assign(struct kvm *kvm, int conn_id, int fd) It is uint32 in the hypercall, but here you are making it an 'int'. Is that intentional? Or could it be the same type?