qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: xiaoqiang zhao <zxq_yx_007@163.com>
To: michael@walle.cc, Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, edgar.iglesias@gmail.com, agraf@suse.de,
	peter.maydell@linaro.org, Paolo Bonzini <paolo.bonzini@gmail.com>
Subject: Re: [Qemu-devel] [PATCH v4 0/4] QOM'ify hw/char devices
Date: Fri, 20 May 2016 10:41:12 +0800	[thread overview]
Message-ID: <573E7948.2020006@163.com> (raw)
In-Reply-To: <ec03321b0da35d7f7e8cbbd0fcb65e1b@walle.cc>



在 2016年05月19日 21:45, michael@walle.cc 写道:
> Am 2016-05-19 13:32, schrieb Paolo Bonzini:
>> Michael, can you test patches 3 and 4?
>
> Doesn't work for me:
>   $ qemu-system-lm32 -kernel serial.bin -serial vc -serial vc
> Unexpected error in parse_chr() at 
> /home/mwalle/repos/qemu/hw/core/qdev-properties-system.c:149:
> qemu-system-lm32: Property 'lm32-uart.chardev' can't take value 
> 'serial0', it's in use
>
> serial0 seems already be claimed. Please note that even
>   $ qemu-system-lm32 -kernel serial.bin
> and
>   $ qemu-system-lm32
> does not work.
>
> "-serial .. -serial --" should still work, shouldn't it?
>
> I've uploaded a small test binary to http://milkymist.walle.cc/tests/ 
> which should prints 'A' and 'U' characters on the UARTs.
>
> -michael

Hi, michael:

It seems that qemu_char_get_next_serial()  call the qemu_chr_fe_claim, 
which is also called by
qdev_prop_set_chr ! This cause chr->avail_connectinos less than 1. as 
the error message said:
"it's in use".
A stright fix is to call the qemu_chr_fe_release after 
qemu_char_get_next_serial and the call the
qdev_prop_set_chr, the error is gone! I have test with your test cases 
and it works.

Or another way, can we modify qemu_char_get_next_serial and just skip 
the call of qemu_chr_fe_claim?

  reply	other threads:[~2016-05-20  2:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19  3:43 [Qemu-devel] [PATCH v4 0/4] QOM'ify hw/char devices xiaoqiang zhao
2016-05-19  3:43 ` [Qemu-devel] [PATCH v4 1/4] hw/char: QOM'ify escc.c xiaoqiang zhao
2016-05-19  3:43 ` [Qemu-devel] [PATCH v4 2/4] hw/char: QOM'ify etraxfs_ser.c xiaoqiang zhao
2016-05-19  3:43 ` [Qemu-devel] [PATCH v4 3/4] hw/char: QOM'ify lm32_juart.c xiaoqiang zhao
2016-05-19  3:43 ` [Qemu-devel] [PATCH v4 4/4] hw/char: QOM'ify lm32_uart.c xiaoqiang zhao
2016-05-19 11:32 ` [Qemu-devel] [PATCH v4 0/4] QOM'ify hw/char devices Paolo Bonzini
2016-05-19 11:51   ` michael
2016-05-19 13:45   ` michael
2016-05-20  2:41     ` xiaoqiang zhao [this message]
2016-05-20 11:08       ` Paolo Bonzini
2016-05-20 12:27         ` xiaoqiang zhao
2016-05-20 14:52       ` Markus Armbruster
2016-05-20 15:01         ` Paolo Bonzini

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=573E7948.2020006@163.com \
    --to=zxq_yx_007@163.com \
    --cc=agraf@suse.de \
    --cc=edgar.iglesias@gmail.com \
    --cc=michael@walle.cc \
    --cc=paolo.bonzini@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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).