qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Blake <eblake@redhat.com>, Andrew Jones <drjones@redhat.com>,
	qemu-devel@nongnu.org
Cc: kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org
Subject: Re: [Qemu-devel] [PATCH] backends: Introduce chr-testdev
Date: Fri, 11 Jul 2014 17:49:10 +0200	[thread overview]
Message-ID: <53C00776.6090406@redhat.com> (raw)
In-Reply-To: <53C002FB.3000805@redhat.com>

Il 11/07/2014 17:30, Eric Blake ha scritto:
> On 07/11/2014 01:44 AM, Andrew Jones wrote:
>> From: Paolo Bonzini <pbonzini@redhat.com>
>>
>> From: Paolo Bonzini <pbonzini@redhat.com>
>>
>> chr-testdev enables a virtio serial channel to be used for guest
>> initiated qemu exits. hw/misc/debugexit already enables guest
>> initiated qemu exits, but only for PC targets. chr-testdev supports
>> any virtio-capable target. kvm-unit-tests/arm is already making use
>> of this backend.
>>
>> Currently there is a single command implemented, "q".  It takes a
>> (prefix) argument for the exit code, thus an exit is implemented by
>> writing, e.g. "1q", to the virtio-serial port.
>>
>> It can be used as:
>>    $QEMU ... \
>>      -device virtio-serial-device \
>>      -device virtserialport,chardev=ctd -chardev testdev,id=ctd
>>
>> or, use:
>>    $QEMU ... \
>>      -device virtio-serial-device \
>>      -device virtconsole,chardev=ctd -chardev testdev,id=ctd
>>
>> to bind it to virtio-serial port0.
>>
>
>> +
>> +    switch (c) {
>> +    case 'q':
>> +        exit((arg << 1) | 1);
>> +        break;
>
> I'm trying to figure out the motive for only exiting with odd numbers.
> That is, 'q' => 1, '1q' => 3, '2q' => 5, '3q' => 7.  It means that at
> most, I can do '127q' => 255 before I suffer from exit() limiting things
> to 8 bits.  This wasn't explained in the commit message.

It's just for parity with isa-debugexit.

Paolo

      reply	other threads:[~2014-07-11 15:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11  7:44 [Qemu-devel] [PATCH] backends: Introduce chr-testdev Andrew Jones
2014-07-11 15:30 ` Eric Blake
2014-07-11 15:49   ` Paolo Bonzini [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=53C00776.6090406@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=christoffer.dall@linaro.org \
    --cc=drjones@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --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).