qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] migrate to fd - how to use with HMP?
Date: Fri, 28 Feb 2014 17:55:26 +0100	[thread overview]
Message-ID: <20140228165526.GA28466@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <53106549.2050208@ozlabs.ru>

On Fri, Feb 28, 2014 at 09:30:33PM +1100, Alexey Kardashevskiy wrote:
> On 02/28/2014 09:27 PM, Stefan Hajnoczi wrote:
> > On Fri, Feb 28, 2014 at 03:05:12PM +1100, Alexey Kardashevskiy wrote:
> >> However once socket_scm_helper talked to "mon" (./qemu.monitor), I cannot
> >> get any response from it via "socat UNIX-CONNECT:./qemu.monitor STDIN".
> > 
> > Have you tried with QMP?  Perhaps the HMP monitor handles
> > connect/disconnect differently from the QMP monitor.
> > 
> > I guess this will require more step-by-step debugging of monitor.c to
> > find out what's going on.
> 
> 
> One of my questions is still unanswered :) Is socket_scm_helper assumed to
> be correct or it is a bug? Because if it is correct, I do not know what to
> think. Thanks.
> 
> 
> diff --git a/tests/qemu-iotests/socket_scm_helper.c
> b/tests/qemu-iotests/socket_scm_helper.c
> index 0e2b285..8195983 100644
> --- a/tests/qemu-iotests/socket_scm_helper.c
> +++ b/tests/qemu-iotests/socket_scm_helper.c
> @@ -52,7 +52,7 @@ static int send_fd(int fd, int fd_to_send)
>      cmsg->cmsg_len = CMSG_LEN(sizeof(int));
>      cmsg->cmsg_level = SOL_SOCKET;
>      cmsg->cmsg_type = SCM_RIGHTS;
> -    memcpy(CMSG_DATA(cmsg), &fd, sizeof(int));
> +    memcpy(CMSG_DATA(cmsg), &fd_to_send, sizeof(int));

Don't assume the 045 test or socket_scm_helper is correct.  Your patch
makes sense.  Please post it to qemu-devel.

Stefan

      reply	other threads:[~2014-02-28 16:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28  4:05 [Qemu-devel] migrate to fd - how to use with HMP? Alexey Kardashevskiy
2014-02-28 10:27 ` Stefan Hajnoczi
2014-02-28 10:30   ` Alexey Kardashevskiy
2014-02-28 16:55     ` Stefan Hajnoczi [this message]

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=20140228165526.GA28466@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).