public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Roman Kagan <rkagan@virtuozzo.com>
Cc: kvm@vger.kernel.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Denis V. Lunev" <den@openvz.org>
Subject: Re: [PATCH 2/2] x86:kvm:hyperv: guest->host event signaling via eventfd
Date: Wed, 6 Dec 2017 10:28:33 -0500	[thread overview]
Message-ID: <20171206152833.GK28074@char.us.oracle.com> (raw)
In-Reply-To: <20171204190044.14125-3-rkagan@virtuozzo.com>

.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?

  parent reply	other threads:[~2017-12-06 15:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 19:00 [PATCH 0/2] x86:kvm:hyperv: guest->host event signaling via eventfd Roman Kagan
2017-12-04 19:00 ` [PATCH 1/2] x86:kvm:hyperv: factor out kvm.arch.hyperv (de)init Roman Kagan
2017-12-04 19:00 ` [PATCH 2/2] x86:kvm:hyperv: guest->host event signaling via eventfd Roman Kagan
2017-12-06 15:19   ` Vitaly Kuznetsov
2017-12-06 17:00     ` Roman Kagan
2017-12-06 17:09       ` Vitaly Kuznetsov
2017-12-06 17:32         ` Roman Kagan
2017-12-06 15:28   ` Konrad Rzeszutek Wilk [this message]
2017-12-06 16:37     ` Roman Kagan
2017-12-07  4:31   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171206152833.GK28074@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=den@openvz.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkagan@virtuozzo.com \
    --cc=rkrcmar@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox