qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] more serial ports on arm?
@ 2018-11-19 23:46 Jason A. Donenfeld
  2018-11-20 10:08 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Jason A. Donenfeld @ 2018-11-19 23:46 UTC (permalink / raw)
  To: QEMU Developers, qemu-arm

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

Hey guys,

I sort of lost track of the discussion, but what ever happened to
adding an extra serial port to the arm virt machine? I'm still
carrying around the attached patch to run build.wireguard.com and I'd
of course like to see a real solution upstream.

Jason

[-- Attachment #2: virt-serial-ports.patch --]
[-- Type: text/x-patch, Size: 1211 bytes --]

diff -ru qemu-3.0.0/hw/arm/virt.c qemu-3.0.0-modified/hw/arm/virt.c
--- qemu-3.0.0/hw/arm/virt.c	2018-08-14 21:10:34.000000000 +0200
+++ qemu-3.0.0-modified/hw/arm/virt.c	2018-09-14 11:48:31.914772294 +0200
@@ -672,13 +672,7 @@
     qemu_fdt_setprop(vms->fdt, nodename, "clock-names",
                          clocknames, sizeof(clocknames));
 
-    if (uart == VIRT_UART) {
-        qemu_fdt_setprop_string(vms->fdt, "/chosen", "stdout-path", nodename);
-    } else {
-        /* Mark as not usable by the normal world */
-        qemu_fdt_setprop_string(vms->fdt, nodename, "status", "disabled");
-        qemu_fdt_setprop_string(vms->fdt, nodename, "secure-status", "okay");
-    }
+    qemu_fdt_setprop_string(vms->fdt, "/chosen", "stdout-path", nodename);
 
     g_free(nodename);
 }
@@ -1497,11 +1491,11 @@
 
     fdt_add_pmu_nodes(vms);
 
+    create_uart(vms, pic, VIRT_SECURE_UART, sysmem, serial_hd(1));
     create_uart(vms, pic, VIRT_UART, sysmem, serial_hd(0));
 
     if (vms->secure) {
         create_secure_ram(vms, secure_sysmem);
-        create_uart(vms, pic, VIRT_SECURE_UART, secure_sysmem, serial_hd(1));
     }
 
     vms->highmem_ecam &= vms->highmem && (!firmware_loaded || aarch64);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-arm] more serial ports on arm?
  2018-11-19 23:46 [Qemu-devel] more serial ports on arm? Jason A. Donenfeld
@ 2018-11-20 10:08 ` Peter Maydell
  2018-12-07  4:42   ` Jason A. Donenfeld
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2018-11-20 10:08 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: QEMU Developers, qemu-arm

On 19 November 2018 at 23:46, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> Hey guys,
>
> I sort of lost track of the discussion, but what ever happened to
> adding an extra serial port to the arm virt machine? I'm still
> carrying around the attached patch to run build.wireguard.com and I'd
> of course like to see a real solution upstream.

It's still stuck, because unconditionally adding a second serial
port to the virt board breaks some commonly used existing guest
code (UEFI + Linux), and it's not clear to me what the best
command line UI is for allowing the user to request the second
serial port.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-arm] more serial ports on arm?
  2018-11-20 10:08 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
@ 2018-12-07  4:42   ` Jason A. Donenfeld
  2018-12-07 10:41     ` Peter Maydell
  2018-12-10 11:00     ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 7+ messages in thread
From: Jason A. Donenfeld @ 2018-12-07  4:42 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers, qemu-arm

On Tue, Nov 20, 2018 at 11:08 AM Peter Maydell <peter.maydell@linaro.org> wrote:
> It's still stuck, because unconditionally adding a second serial
> port to the virt board breaks some commonly used existing guest
> code (UEFI + Linux), and it's not clear to me what the best
> command line UI is for allowing the user to request the second
> serial port.

Can the UI be the same more or less as for x86? Specify a second
-serial, and then the machine gets one added? If it's in secure mode,
then it's added as serial 3 instead of 2, to remain backwards
compatible.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-arm] more serial ports on arm?
  2018-12-07  4:42   ` Jason A. Donenfeld
@ 2018-12-07 10:41     ` Peter Maydell
  2018-12-10 11:00     ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2018-12-07 10:41 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: QEMU Developers, qemu-arm

On Fri, 7 Dec 2018 at 04:43, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> On Tue, Nov 20, 2018 at 11:08 AM Peter Maydell <peter.maydell@linaro.org> wrote:
> > It's still stuck, because unconditionally adding a second serial
> > port to the virt board breaks some commonly used existing guest
> > code (UEFI + Linux), and it's not clear to me what the best
> > command line UI is for allowing the user to request the second
> > serial port.
>
> Can the UI be the same more or less as for x86? Specify a second
> -serial, and then the machine gets one added? If it's in secure mode,
> then it's added as serial 3 instead of 2, to remain backwards
> compatible.

Yeah, that was more or less my plan. I just haven't done
the work of digging around to check whether it matches
what other QEMU board models have done and whether there
are any other hidden snags yet.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-arm] more serial ports on arm?
  2018-12-07  4:42   ` Jason A. Donenfeld
  2018-12-07 10:41     ` Peter Maydell
@ 2018-12-10 11:00     ` Philippe Mathieu-Daudé
  2018-12-10 11:09       ` Peter Maydell
  1 sibling, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-12-10 11:00 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: Peter Maydell, qemu-arm, QEMU Developers

Hi Jason,

On 12/7/18 5:42 AM, Jason A. Donenfeld wrote:
> On Tue, Nov 20, 2018 at 11:08 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>> It's still stuck, because unconditionally adding a second serial
>> port to the virt board breaks some commonly used existing guest
>> code (UEFI + Linux), and it's not clear to me what the best
>> command line UI is for allowing the user to request the second
>> serial port.
> 
> Can the UI be the same more or less as for x86? Specify a second
> -serial, and then the machine gets one added? If it's in secure mode,
> then it's added as serial 3 instead of 2, to remain backwards
> compatible.

You can use various -serial arguments.

If a board supports 4 serials and you only want to see the 3rd (secure
mode as your example) you could use:

./qemu -serial null -serial null -serial stdio

serials #1 and #2 and #4 would be redirected to the null backend, thus
ignored, and you bind the secure serial to your stdio.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-arm] more serial ports on arm?
  2018-12-10 11:00     ` Philippe Mathieu-Daudé
@ 2018-12-10 11:09       ` Peter Maydell
  2018-12-10 11:12         ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2018-12-10 11:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: Jason A. Donenfeld, qemu-arm, QEMU Developers

On Mon, 10 Dec 2018 at 11:00, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> Hi Jason,
>
> On 12/7/18 5:42 AM, Jason A. Donenfeld wrote:
> > On Tue, Nov 20, 2018 at 11:08 AM Peter Maydell <peter.maydell@linaro.org> wrote:
> >> It's still stuck, because unconditionally adding a second serial
> >> port to the virt board breaks some commonly used existing guest
> >> code (UEFI + Linux), and it's not clear to me what the best
> >> command line UI is for allowing the user to request the second
> >> serial port.
> >
> > Can the UI be the same more or less as for x86? Specify a second
> > -serial, and then the machine gets one added? If it's in secure mode,
> > then it's added as serial 3 instead of 2, to remain backwards
> > compatible.
>
> You can use various -serial arguments.
>
> If a board supports 4 serials and you only want to see the 3rd (secure
> mode as your example) you could use:
>
> ./qemu -serial null -serial null -serial stdio

That's the opposite of Jason's issue, which is that the 'virt'
board only supports 1 serial port but he would like 2...

thanks
-- PMM

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-arm] more serial ports on arm?
  2018-12-10 11:09       ` Peter Maydell
@ 2018-12-10 11:12         ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-12-10 11:12 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Jason A. Donenfeld, qemu-arm, QEMU Developers

On 12/10/18 12:09 PM, Peter Maydell wrote:
> On Mon, 10 Dec 2018 at 11:00, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>>
>> Hi Jason,
>>
>> On 12/7/18 5:42 AM, Jason A. Donenfeld wrote:
>>> On Tue, Nov 20, 2018 at 11:08 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>>>> It's still stuck, because unconditionally adding a second serial
>>>> port to the virt board breaks some commonly used existing guest
>>>> code (UEFI + Linux), and it's not clear to me what the best
>>>> command line UI is for allowing the user to request the second
>>>> serial port.
>>>
>>> Can the UI be the same more or less as for x86? Specify a second
>>> -serial, and then the machine gets one added? If it's in secure mode,
>>> then it's added as serial 3 instead of 2, to remain backwards
>>> compatible.
>>
>> You can use various -serial arguments.
>>
>> If a board supports 4 serials and you only want to see the 3rd (secure
>> mode as your example) you could use:
>>
>> ./qemu -serial null -serial null -serial stdio
> 
> That's the opposite of Jason's issue, which is that the 'virt'
> board only supports 1 serial port but he would like 2...

Oh sorry Jason, I misunderstood your question.

Regards,

Phil.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-12-10 11:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-19 23:46 [Qemu-devel] more serial ports on arm? Jason A. Donenfeld
2018-11-20 10:08 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2018-12-07  4:42   ` Jason A. Donenfeld
2018-12-07 10:41     ` Peter Maydell
2018-12-10 11:00     ` Philippe Mathieu-Daudé
2018-12-10 11:09       ` Peter Maydell
2018-12-10 11:12         ` Philippe Mathieu-Daudé

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