qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 0/4] QOM'ify hw/char devices


From: xiaoqiang zhao
Subject: Re: [Qemu-devel] [PATCH v4 0/4] QOM'ify hw/char devices
Date: Fri, 20 May 2016 10:41:12 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0



在 2016年05月19日 21:45, address@hidden 写道:
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 via email to

[Prev in Thread] Current Thread [Next in Thread]