* Re: [Xen-users] Multiple serial ports in Windows HVM
[not found] <37E70E4A0E073047B15F9D771CAD8F9F01CA98D7@BGSMSX101.gar.corp.intel.com>
@ 2014-07-25 7:52 ` Ian Campbell
2014-07-25 17:40 ` White, Edmund H
0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2014-07-25 7:52 UTC (permalink / raw)
To: White, Edmund H, xen-devel; +Cc: xen-users
On Thu, 2014-07-24 at 20:08 +0000, White, Edmund H wrote:
> I have just moved from Xen 4.3 to 4.4. With 4.3 I used the xm toolstack, and I could define multiple serial ports in the config for my Windows domU like so:
>
> serial = [ "tcp::4464,server,nowait", "file:/home/ed/logs/Tgt64bcom2.log" ]
I had no idea xm would accept a list here. We should probably look at
extending libxl/xl to support that. Is that something you think you
could take a look at?
> However, the xl toolstack in 4.4 won't accept a list in the serial definition. If I change it to:
>
> serial = "tcp::4464,server,nowait"
> serial = "file:/home/ed/logs/Tgt64bcom2.log"
>
> I end up with a single serial port connected to the file.
Right, the second one has overwritten the first.
> How can I get two serial ports, with the first connected to a socket and the second connected to a file?
Until someone implements support for lists of serial devices as a
workaround you can pass arbitrary arguments to the qemu device model
using
device_model_args=["--a thing", "--b another"]
It looks like the xm serial translated pretty directly into arguments to
-serial.
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xen-users] Multiple serial ports in Windows HVM
2014-07-25 7:52 ` [Xen-users] Multiple serial ports in Windows HVM Ian Campbell
@ 2014-07-25 17:40 ` White, Edmund H
2014-07-28 9:38 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: White, Edmund H @ 2014-07-25 17:40 UTC (permalink / raw)
To: Ian Campbell, xen-devel; +Cc: xen-users
> Subject: Re: [Xen-users] Multiple serial ports in Windows HVM
>
> On Thu, 2014-07-24 at 20:08 +0000, White, Edmund H wrote:
> > I have just moved from Xen 4.3 to 4.4. With 4.3 I used the xm toolstack, and
> I could define multiple serial ports in the config for my Windows domU like
> so:
> >
> > serial = [ "tcp::4464,server,nowait",
> > "file:/home/ed/logs/Tgt64bcom2.log" ]
>
> I had no idea xm would accept a list here. We should probably look at
> extending libxl/xl to support that. Is that something you think you could take
> a look at?
>
I have literally no idea where to start, but if you give me some pointers I'll take a look.
> > However, the xl toolstack in 4.4 won't accept a list in the serial definition. If I
> change it to:
> >
> > serial = "tcp::4464,server,nowait"
> > serial = "file:/home/ed/logs/Tgt64bcom2.log"
> >
> > I end up with a single serial port connected to the file.
>
> Right, the second one has overwritten the first.
>
> > How can I get two serial ports, with the first connected to a socket and the
> second connected to a file?
>
> Until someone implements support for lists of serial devices as a workaround
> you can pass arbitrary arguments to the qemu device model using
> device_model_args=["--a thing", "--b another"]
>
> It looks like the xm serial translated pretty directly into arguments to -serial.
>
I had tried that without success before posting to the list. I tried again today and
now have it working. The successful recipe is to define the first serial port with:
serial = "tcp::4464,server,nowait"
and the second with
device_model_args = [ "-serial", "file:/home/ed/logs/Tgt64bcom2.log" ]
> Ian.
>
Ed
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xen-users] Multiple serial ports in Windows HVM
2014-07-25 17:40 ` White, Edmund H
@ 2014-07-28 9:38 ` Ian Campbell
2014-07-28 16:41 ` White, Edmund H
0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2014-07-28 9:38 UTC (permalink / raw)
To: White, Edmund H; +Cc: xen-users, xen-devel
On Fri, 2014-07-25 at 17:40 +0000, White, Edmund H wrote:
> > Subject: Re: [Xen-users] Multiple serial ports in Windows HVM
> >
> > On Thu, 2014-07-24 at 20:08 +0000, White, Edmund H wrote:
> > > I have just moved from Xen 4.3 to 4.4. With 4.3 I used the xm toolstack, and
> > I could define multiple serial ports in the config for my Windows domU like
> > so:
> > >
> > > serial = [ "tcp::4464,server,nowait",
> > > "file:/home/ed/logs/Tgt64bcom2.log" ]
> >
> > I had no idea xm would accept a list here. We should probably look at
> > extending libxl/xl to support that. Is that something you think you could take
> > a look at?
> >
>
> I have literally no idea where to start, but if you give me some pointers I'll take a look.
You would need to add a new field to libxl_domain_build_info.u.hvm in
tools/libxl/libxl_types.idl e.g. serial_list and add a LIBXL_HAVE
#define to libxl.h to signal the presence of this new field.
Then plumb it into tools/libxl/libxl_dm
libxl__build_device_model_args_*.
Lastly update xl_cmdimpl.c:parse_config_data to spot the use of a list
instead of a simple string and populate the new field (+ docs updates
etc).
George Dunlap did something very similar for the usb option in these two
commits:
c3a214819270 xl: Accept a list for usbdevice in config file
ac16730d0339 libxl: Allow multiple USB devices on HVM domain creation
I think you can pretty much just file off the usb and write serial in
its place ;-)
See http://wiki.xen.org/wiki/Submitting_Xen_Patches for more general
advice on the patch workflow etc.
> I had tried that without success before posting to the list. I tried again today and
> now have it working. The successful recipe is to define the first serial port with:
>
> serial = "tcp::4464,server,nowait"
>
> and the second with
>
> device_model_args = [ "-serial", "file:/home/ed/logs/Tgt64bcom2.log" ]
Interesting. I'd have expected:
device_model_args = [ "-serial", "tcp::4464,server,nowait",
"-serial", "file:/home/ed/logs/Tgt64bcom2.log" ]
by itself to also work equally well.
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xen-users] Multiple serial ports in Windows HVM
2014-07-28 9:38 ` Ian Campbell
@ 2014-07-28 16:41 ` White, Edmund H
2014-07-28 16:46 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: White, Edmund H @ 2014-07-28 16:41 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-users, xen-devel
> On Fri, 2014-07-25 at 17:40 +0000, White, Edmund H wrote:
> > > Subject: Re: [Xen-users] Multiple serial ports in Windows HVM
> > >
> > > On Thu, 2014-07-24 at 20:08 +0000, White, Edmund H wrote:
> > > > I have just moved from Xen 4.3 to 4.4. With 4.3 I used the xm
> > > > toolstack, and
> > > I could define multiple serial ports in the config for my Windows
> > > domU like
> > > so:
> > > >
> > > > serial = [ "tcp::4464,server,nowait",
> > > > "file:/home/ed/logs/Tgt64bcom2.log" ]
> > >
> > > I had no idea xm would accept a list here. We should probably look
> > > at extending libxl/xl to support that. Is that something you think
> > > you could take a look at?
> > >
> >
> > I have literally no idea where to start, but if you give me some pointers I'll
> take a look.
>
> You would need to add a new field to libxl_domain_build_info.u.hvm in
> tools/libxl/libxl_types.idl e.g. serial_list and add a LIBXL_HAVE #define to
> libxl.h to signal the presence of this new field.
>
> Then plumb it into tools/libxl/libxl_dm
> libxl__build_device_model_args_*.
>
> Lastly update xl_cmdimpl.c:parse_config_data to spot the use of a list
> instead of a simple string and populate the new field (+ docs updates etc).
>
> George Dunlap did something very similar for the usb option in these two
> commits:
>
> c3a214819270 xl: Accept a list for usbdevice in config file
> ac16730d0339 libxl: Allow multiple USB devices on HVM domain creation
>
> I think you can pretty much just file off the usb and write serial in its place ;-)
>
> See http://wiki.xen.org/wiki/Submitting_Xen_Patches for more general
> advice on the patch workflow etc.
>
OK. I will look into it.
One question: should the end result be that you can use a single item OR a list,
or a list only? In other words, should [] be optional or mandatory?
> > I had tried that without success before posting to the list. I tried
> > again today and now have it working. The successful recipe is to define the
> first serial port with:
> >
> > serial = "tcp::4464,server,nowait"
> >
> > and the second with
> >
> > device_model_args = [ "-serial", "file:/home/ed/logs/Tgt64bcom2.log" ]
>
> Interesting. I'd have expected:
> device_model_args = [ "-serial", "tcp::4464,server,nowait",
> "-serial", "file:/home/ed/logs/Tgt64bcom2.log" ] by itself to
> also work equally well.
>
It may have done, but I was concerned that if I didn't define the first serial port through 'serial =' there
would be some default that I didn't want.
My original attempts were failing because I was placing "-serial value" in a single string (as both the docs and
your original reply imply), and that results in something that looks correct but which qemu can't parse properly.
> Ian.
Ed
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xen-users] Multiple serial ports in Windows HVM
2014-07-28 16:41 ` White, Edmund H
@ 2014-07-28 16:46 ` Ian Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2014-07-28 16:46 UTC (permalink / raw)
To: White, Edmund H; +Cc: xen-users, xen-devel
On Mon, 2014-07-28 at 16:41 +0000, White, Edmund H wrote:
> > On Fri, 2014-07-25 at 17:40 +0000, White, Edmund H wrote:
> > > > Subject: Re: [Xen-users] Multiple serial ports in Windows HVM
> > > >
> > > > On Thu, 2014-07-24 at 20:08 +0000, White, Edmund H wrote:
> > > > > I have just moved from Xen 4.3 to 4.4. With 4.3 I used the xm
> > > > > toolstack, and
> > > > I could define multiple serial ports in the config for my Windows
> > > > domU like
> > > > so:
> > > > >
> > > > > serial = [ "tcp::4464,server,nowait",
> > > > > "file:/home/ed/logs/Tgt64bcom2.log" ]
> > > >
> > > > I had no idea xm would accept a list here. We should probably look
> > > > at extending libxl/xl to support that. Is that something you think
> > > > you could take a look at?
> > > >
> > >
> > > I have literally no idea where to start, but if you give me some pointers I'll
> > take a look.
> >
> > You would need to add a new field to libxl_domain_build_info.u.hvm in
> > tools/libxl/libxl_types.idl e.g. serial_list and add a LIBXL_HAVE #define to
> > libxl.h to signal the presence of this new field.
> >
> > Then plumb it into tools/libxl/libxl_dm
> > libxl__build_device_model_args_*.
> >
> > Lastly update xl_cmdimpl.c:parse_config_data to spot the use of a list
> > instead of a simple string and populate the new field (+ docs updates etc).
> >
> > George Dunlap did something very similar for the usb option in these two
> > commits:
> >
> > c3a214819270 xl: Accept a list for usbdevice in config file
> > ac16730d0339 libxl: Allow multiple USB devices on HVM domain creation
> >
> > I think you can pretty much just file off the usb and write serial in its place ;-)
> >
> > See http://wiki.xen.org/wiki/Submitting_Xen_Patches for more general
> > advice on the patch workflow etc.
> >
>
> OK. I will look into it.
Super, thanks!
> One question: should the end result be that you can use a single item OR a list,
> or a list only? In other words, should [] be optional or mandatory?
We need to support the old syntax for compat with old users, so [] needs
to be optional please.
> > > I had tried that without success before posting to the list. I tried
> > > again today and now have it working. The successful recipe is to define the
> > first serial port with:
> > >
> > > serial = "tcp::4464,server,nowait"
> > >
> > > and the second with
> > >
> > > device_model_args = [ "-serial", "file:/home/ed/logs/Tgt64bcom2.log" ]
> >
> > Interesting. I'd have expected:
> > device_model_args = [ "-serial", "tcp::4464,server,nowait",
> > "-serial", "file:/home/ed/logs/Tgt64bcom2.log" ] by itself to
> > also work equally well.
> >
>
> It may have done, but I was concerned that if I didn't define the first serial port through 'serial =' there
> would be some default that I didn't want.
>
> My original attempts were failing because I was placing "-serial value" in a single string (as both the docs and
> your original reply imply), and that results in something that looks correct but which qemu can't parse properly.
Oops, sorry. Do you have any suggestions for a change which would have
made the docs at least not so confusing?
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-28 16:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <37E70E4A0E073047B15F9D771CAD8F9F01CA98D7@BGSMSX101.gar.corp.intel.com>
2014-07-25 7:52 ` [Xen-users] Multiple serial ports in Windows HVM Ian Campbell
2014-07-25 17:40 ` White, Edmund H
2014-07-28 9:38 ` Ian Campbell
2014-07-28 16:41 ` White, Edmund H
2014-07-28 16:46 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.