Hi Marc-André,
Do you want me to resend the series with the review
tag incorporated? Or are you fine to pull as-is if there
is nothing left to address from my side?
--
Roman
On Wed, Feb 26, 2025 at 11:06 AM Marc-André Lureau
wrote:
>
> Hi,
>
> On Wed, Feb 26, 2025 at 11:59 AM R
Hi Marc-Andre,
If you don't have objections to this one small doc change,
could you please pull the change?
Thanks.
--
Roman
On Wed, Feb 19, 2025 at 2:24 PM Markus Armbruster wrote:
>
> Roman Penyaev writes:
>
> > Refine documentation for the hub device, specify the max
1] https://vt100.net/docs/vt510-rm/ICH.html
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
ui/console-vc.c | 88 +
1 file changed, 88 insertions(+)
diff --git a/ui/console-vc.c b/ui/console-vc.c
index 522
ange the row number was always increasing for the QEMU
VC and represents the cursor position relative to the backscroll
buffer.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
ui/console-vc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff -
100.net/docs/vt100-ug/chapter3.html#CPR
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
ui/console-vc.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/ui/console-vc.c b/ui/console-vc.c
index 90ff0ffda8c5..d512f57e10a9 10064
B
B 2 root 20 0 0 0 0 S B
[1] https://vt100.net/docs/vt100-ug/chapter3.html#SCS
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
ui/console-vc.c | 16
1 file changed, 16 insertions(+)
diff --git a
/DECRC.html
[3]
https://wiki.archlinux.org/title/Working_with_the_serial_console#Resizing_a_terminal
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
ui/console-vc.c | 40 ++--
1 file changed, 34 insertions(+), 6
ad of inserting a "space" with the current
attribute, call `vc_clear_xy()` for the inserted character.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: Kevin Wolf
Cc: Daniel P. Berrange
Cc: qemu-devel@nongnu.org
Roman Penyaev (5):
ui/console-vc: introduce parsing
On Mon, Feb 24, 2025 at 8:25 AM Marc-André Lureau
wrote:
>
> Hi
>
> On Sun, Feb 23, 2025 at 6:56 PM Roman Penyaev wrote:
> >
> > This patch implements DCH (delete character) and ICH (insert
> > character) commands.
> >
> > DCH - Delete Character:
> &
/DECRC.html
[3]
https://wiki.archlinux.org/title/Working_with_the_serial_console#Resizing_a_terminal
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
ui/console-vc.c | 40 ++--
1 file changed, 34 insertions(+), 6
100.net/docs/vt100-ug/chapter3.html#CPR
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
ui/console-vc.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/ui/console-vc.c b/ui/console-vc.c
index 90ff0ffda8c5..d512f57e10a9 10064
1] https://vt100.net/docs/vt510-rm/ICH.html
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
ui/console-vc.c | 108 +---
1 file changed, 102 insertions(+), 6 deletions(-)
diff --git a/ui/console-vc.c b/ui/c
B
B 2 root 20 0 0 0 0 S B
[1] https://vt100.net/docs/vt100-ug/chapter3.html#SCS
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
ui/console-vc.c | 16
1 file changed, 16 insertions(+)
diff --git a
minal-based apps. Without them, the console is quite frustrating to
use.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: Kevin Wolf
Cc: Daniel P. Berrange
Cc: qemu-devel@nongnu.org
Roman Penyaev (5):
ui/console-vc: introduce parsing of the 'ESC ( ' sequence
ui/
ange the row number was always increasing for the QEMU
VC and represents the cursor position relative to the backscroll
buffer.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
ui/console-vc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff -
On Tue, Feb 18, 2025 at 8:57 AM Markus Armbruster wrote:
>
> Just realized this has been committed already. I'm not complaining, I
> was late. Address my doc nits in a followup patch?
Sent. Please take a look.
--
Roman
Refine documentation for the hub device, specify the maximum.
Signed-off-by: Roman Penyaev
Cc: Marc-André Lureau
Cc: Markus Armbruster
Cc: qemu-devel@nongnu.org
---
qapi/char.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qapi/char.json b/qapi/char.json
index
Hi Marc-Andre,
Do you plan to pull the latest version of this series,
or is there something which I have to address?
Please let me know.
Thanks.
--
Roman
On Thu, Jan 23, 2025 at 9:53 AM Roman Penyaev wrote:
>
> Mux is a character backend (host side) device, which multiplexes
>
of previously failed backend device
* Proper json support of the `mux-be-id` option
* Unit test for the `mux-be` multiplexer
[1] https://www.qemu.org/docs/master/system/qemu-manpage.html#hxtool-6
[2] https://github.com/lf-edge/eve
Signed-off-by: Roman Penyaev
Reviewed-by: "Marc-André Lureau&q
Change makes code symmetric to the code, which handles
the "connected" state, i.e. send CHR_EVENT_CLOSED when
state changes from "connected" to "disconnected".
This behavior is similar to char-socket, for example.
Signed-off-by: Roman Penyaev
Reviewed-by: "Mar
JSON lists in 'key=val' pairs format of the
util/keyval.c, despite the fact that modern QAPI way of parsing,
namely qobject_input_visitor_new_str(), is not used. Choice of keeping
QAPI list syntax may help to smoothly switch to modern parsing in the
future.
Signed-off-by: Roman Penyaev
igurations.
Signed-off-by: Roman Penyaev
Reviewed-by: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
tests/unit/test-char.c | 398 +
1 file changed, 398 insertions(+)
diff --git a/tests/unit/test-char.c b/tests/unit/test-char.c
index 98a60d
This adds a few lines describing `hub` aggregator configuration
for aggregation of several backend devices with a single frontend
device.
Signed-off-by: Roman Penyaev
Reviewed-by: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
qemu-optio
On Wed, Jan 22, 2025 at 3:44 PM Alex Bennée wrote:
>
> Roman Penyaev writes:
>
> > This patch implements a new chardev backend `hub` device, which
> > aggregates input from multiple backend devices and forwards it to a
> > single frontend device. Additionally, `h
oper json support of the `mux-be-id` option
* Unit test for the `mux-be` multiplexer
[1] https://www.qemu.org/docs/master/system/qemu-manpage.html#hxtool-6
[2] https://github.com/lf-edge/eve
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: Markus Armbruster
Cc: Kevin Wolf
Cc: D
igurations.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
tests/unit/test-char.c | 398 +
1 file changed, 398 insertions(+)
diff --git a/tests/unit/test-char.c b/tests/unit/test-char.c
index 98a60d86b143.
JSON lists in 'key=val' pairs format of the
util/keyval.c, despite the fact that modern QAPI way of parsing,
namely qobject_input_visitor_new_str(), is not used. Choice of keeping
QAPI list syntax may help to smoothly switch to modern parsing in the
future.
Signed-off-by: Roman Penyaev
Cc
Change makes code symmetric to the code, which handles
the "connected" state, i.e. send CHR_EVENT_CLOSED when
state changes from "connected" to "disconnected".
This behavior is similar to char-socket, for example.
Signed-off-by: Roman Penyaev
Reviewed-by: "A
This adds a few lines describing `hub` aggregator configuration
for aggregation of several backend devices with a single frontend
device.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
qemu-options.hx | 49 ++
On Tue, Jan 21, 2025 at 4:23 PM Roman Penyaev wrote:
>
> On Tue, Jan 21, 2025 at 4:02 PM Alex Bennée wrote:
> >
> > Roman Penyaev writes:
> >
> > > This adds a few lines describing `hub` aggregator configuration
> > > for aggregation of seve
On Tue, Jan 21, 2025 at 4:02 PM Alex Bennée wrote:
>
> Roman Penyaev writes:
>
> > This adds a few lines describing `hub` aggregator configuration
> > for aggregation of several backend devices with a single frontend
> > device.
> >
> > Signed-off-by: Ro
Hi Marc-André,
On Mon, Jan 20, 2025 at 12:21 PM Marc-André Lureau
wrote:
>
> Hi
>
> On Sat, Jan 18, 2025 at 8:41 PM Roman Penyaev wrote:
> >
> > This patch implements a new chardev backend `hub` device, which
> > aggregates input from multiple backend devices a
This adds a few lines describing `hub` aggregator configuration
for aggregation of several backend devices with a single frontend
device.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
qemu-options.hx | 48 +
JSON lists in 'key=val' pairs format of the
util/keyval.c, despite the fact that modern QAPI way of parsing,
namely qobject_input_visitor_new_str(), is not used. Choice of keeping
QAPI list sytax may help to smoothly switch to modern parsing in the
future.
Signed-off-by: Roman Penyaev
Cc
ltiplexer `mux-be`
* Handle EAGAIN on write to the backend device
* Support of watch of previously failed backend device
* Proper json support of the `mux-be-id` option
* Unit test for the `mux-be` multiplexer
[1] https://www.qemu.org/docs/master/system/qemu-manpage.html#hxtool-6
[2] https://github
igurations.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-hub.c | 4 +-
tests/unit/test-char.c | 399 +
2 files changed, 401 insertions(+), 2 deletions(-)
diff --git a/chardev/char-hub.c
Change makes code symmetric to the code, which handles
the "connected" state, i.e. send CHR_EVENT_CLOSED when
state changes from "connected" to "disconnected".
This behavior is similar to char-socket, for example.
Signed-off-by: Roman Penyaev
Cc: "Marc-André
Hi Kevin,
On Thu, Jan 16, 2025 at 12:27 PM Kevin Wolf wrote:
>
> Am 17.12.2024 um 11:32 hat Roman Penyaev geschrieben:
> > Hi Markus,
> >
> > Thanks for the explicit info. But I have a lot to ask :)
> > Do I understand correctly that there are two ways to par
On Fri, Jan 10, 2025 at 9:58 AM Daniel P. Berrangé wrote:
>
> On Fri, Jan 10, 2025 at 09:43:52AM +0100, Roman Penyaev wrote:
> > On Thu, Jan 9, 2025 at 7:07 PM Daniel P. Berrangé
> > wrote:
> > >
> > > On Thu, Jan 09, 2025 at 01:56:40PM +0100, Roman Penyaev w
On Thu, Jan 9, 2025 at 7:07 PM Daniel P. Berrangé wrote:
>
> On Thu, Jan 09, 2025 at 01:56:40PM +0100, Roman Penyaev wrote:
> > Hi,
> >
> > On Tue, Jan 7, 2025 at 3:57 PM Marc-André Lureau
> > wrote:
> > > Whether we talk about multiplexing front-end or bac
Hi,
On Tue, Jan 7, 2025 at 3:57 PM Marc-André Lureau
wrote:
>
> Hi
[cut]
> > > But next attempt to write will loop over the same backend again, which
> > > will see the "same" write multiple times.
> >
> > This case is handled by checking the difference between counters
> > `d->be_written[i]` a
On Mon, Dec 30, 2024 at 12:35 PM Marc-André Lureau
wrote:
>
> That looks like a good compromise to me, thanks. Markus, wdyt?
>
> In your patches, please change version 9.3 for 10.0 (next release).
Ok.
> btw, for some reason your series is not caught by patchew or
> patchwork.. it's a bit annoyin
Hi,
First of all Happy New Year :)
On Mon, Dec 30, 2024 at 12:41 PM Marc-André Lureau
wrote:
[cut]
> > +
> > +for (i = 0; i < d->be_cnt; i++) {
> > +written = d->be_written[i] - d->be_min_written;
> > +if (written) {
> > +/* Written in the previous call so take
t;
> > Hi
> >
> > On Wed, Oct 16, 2024 at 2:29 PM Roman Penyaev wrote:
> >
> >> This patch implements multiplexing capability of several backend
> >> devices, which opens up an opportunity to use a single frontend
> >> device on the guest, which can
Allthough the size of MAX_MUX is equal to 4 and likely will never
change, this patch changes type of constant to unsigned long to
be on the safe side.
Also add a static compile check that MAX_MUX never bigger than
`sizeof(d->mux_bitset) * BITS_PER_BYTE`.
Signed-off-by: Roman Penyaev
Reviewed
This patch simplifies (and makes less confusing) bit checks by
replacing `find_next_bit()` calls with boolean AND operation.
Resolves: Coverity CID 1563776
Signed-off-by: Roman Penyaev
Reviewed-by: "Marc-André Lureau"
Cc: Peter Maydell
Cc: Paolo Bonzini
Reviewed-by: Clément Mathieu
ing that)
* Rebase on latest master
v1..v2:
* Rebase on latest master, incorporate review tags.
Roman Penyaev (2):
chardev/char-mux: shift unsigned long to avoid 32-bit overflow
chardev/char-mux: make boolean bit check instead of find_next_bit()
chardev/char-mux.c | 15 +++
1 f
UX never bigger than
> > `sizeof(d->mux_bitset)`.
>
> This needs to be multiplied by CHAR_BIT.
>
> Paolo
>
> On 11/20/24 08:53, Roman Penyaev wrote:
> > Patchset tweaks bitset operations by changing a constant to unsigned
> > long, introduces a static com
, Oct 16, 2024 at 1:14 PM Marc-André Lureau
wrote:
>
> Hi
>
> On Wed, Oct 16, 2024 at 2:29 PM Roman Penyaev wrote:
>>
>> This patch implements multiplexing capability of several backend
>> devices, which opens up an opportunity to use a single frontend
>> device on
Patchset tweaks bitset operations by changing a constant to unsigned
long, introduces a static compile check and simplifies bitset operations.
v1..v2:
Rebase on latest master, incorporate review tags.
Roman Penyaev (2):
chardev/char-mux: shift unsigned long to avoid 32-bit overflow
chardev
Allthough the size of MAX_MUX is equal to 4 and likely will never
change, this patch changes type of constant to unsigned long to
be on the safe side.
Also add a static compile check that MAX_MUX never bigger than
`sizeof(d->mux_bitset)`.
Signed-off-by: Roman Penyaev
Reviewed-by: "Ma
This patch simplifies (and makes less confusing) bit checks by
replacing `find_next_bit()` calls with boolean AND operation.
Resolves: Coverity CID 1563776
Signed-off-by: Roman Penyaev
Reviewed-by: "Marc-André Lureau"
Cc: Peter Maydell
Reviewed-by: Clément Mathieu--Drif
Cc:
Allthough the size of MAX_MUX is equal to 4 and likely will never
change, this patch changes type of constant to unsigned long to
be on the safe side.
Also add a static compile check that MAX_MUX never bigger than
`sizeof(d->mux_bitset)`.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lur
Hi,
On Tue, Oct 22, 2024, 07:21 CLEMENT MATHIEU--DRIF <
clement.mathieu--d...@eviden.com> wrote:
>
>
> On 14/10/2024 17:24, Roman Penyaev wrote:
> > Caution: External email. Do not open attachments or click links, unless
> this email comes from a known sender and you
This patch simplifies (and makes less confusing) bit checks by
replacing `find_next_bit()` calls with boolean AND operation.
Resolves: Coverity CID 1563776
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: Peter Maydell
Cc: Clément Mathieu--Drif
Cc: qemu-devel@nongnu.org
--
Patchset tweaks bitset operations by changing a constant to unsigned
long, introduces a static compile check and simplifies bitset operations.
Roman Penyaev (2):
chardev/char-mux: shift unsigned long to avoid 32-bit overflow
chardev/char-mux: make boolean bit check instead of find_next_bit
Hi Peter,
On Fri, Nov 1, 2024 at 4:25 PM Peter Maydell wrote:
>
> On Tue, 15 Oct 2024 at 09:52, wrote:
> >
> > From: Roman Penyaev
> >
> > With bitset management now it becomes feasible to implement
> > the logic of detaching frontends from multiplexer.
On Thu, Oct 31, 2024 at 12:34 PM Marc-André Lureau
wrote:
>
> Hi Roman
>
> On Thu, Oct 31, 2024 at 3:12 PM Roman Penyaev wrote:
>>
>> Hi Marc-André,
>>
>> In this 5th version of the mux-be series it seems I addressed all the
>> comments and concern
Hi Marc-André,
In this 5th version of the mux-be series it seems I addressed all the
comments and concerns. Could you please take a look once again?
--
Roman
On Thu, Oct 17, 2024 at 4:45 PM Roman Penyaev wrote:
>
> Mux is a character backend (host side) device, which multiplexes
>
` is a socket
backend which provides biderectional communication to the virtio hvc
console.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-fe.c | 9 ++
chardev/char-mux-be.c | 290
/mux_suspend_open/g
s/resume_mux_open/mux_resume_open/g
No functional changes are made.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-mux-fe.c | 63 ++---
chardev/char.c
The test is trivial: several backends, 1 `mux-be`, 1 frontend
do the buffer write and read. Pipe is used for EAGAIN verification.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
tests/unit/test-char.c | 323 +++
Patch introduces `mux-be-id=ID` option for all chardev devices.
This is necessary to attach chardev to `mux-be` for backend
multiplexing. Actual implementation wimplementation will follow.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/
e
* Proper json support of the `mux-be-id` option
* Unit test for the `mux-be` multiplexer
[1] https://www.qemu.org/docs/master/system/qemu-manpage.html#hxtool-6
[2] https://github.com/lf-edge/eve
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
R
In the following patches backend multiplexer will be
introduced and the implementation will be named as
follows: `char-mux-be.c`. This patch renames the
frontend multiplexer from `char-mux.c` to
`char-mux-fe.c`.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@
This patch renames calls in the frontend mux implementation
to reflect its frontend nature. Patch does the following:
s/mux_chr/mux_fe_chr/g
No functional changes are made.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-fe.c
This adds a few lines describing `mux-be` multiplexer configuration
for multiplexing several backend devices with a single frontend
device.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
qemu-optio
/CHARDEV_IS_MUX_FE/g
s/MUX_CHARDEV/MUX_FE_CHARDEV/g
s/TYPE_CHARDEV_MUX/TYPE_CHARDEV_MUX_FE/g
No json or string types are changed for the sake of
compatibility.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-fe.c | 10 +-
chardev/
Hi Marc-André,
On Wed, Oct 16, 2024 at 1:36 PM Marc-André Lureau
wrote:
>
> Hi
>
> On Wed, Oct 16, 2024 at 2:28 PM Roman Penyaev wrote:
> >
> > The test is trivial: several backends, 1 `mux-be`, 1 frontend
> > do the buffer write and read. Pipe is used for EAGAI
Hi,
On Wed, Oct 16, 2024 at 1:14 PM Marc-André Lureau
wrote:
>
> Hi
>
> On Wed, Oct 16, 2024 at 2:29 PM Roman Penyaev wrote:
>>
>> This patch implements multiplexing capability of several backend
>> devices, which opens up an opportunity to use a single frontend
` is a socket
backend which provides biderectional communication to the virtio hvc
console.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-fe.c | 9 ++
chardev/char-mux-be.c | 290
/mux_suspend_open/g
s/resume_mux_open/mux_resume_open/g
No functional changes are made.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-mux-fe.c | 63 ++---
chardev/char.c
This patch renames calls in the frontend mux implementation
to reflect its frontend nature. Patch does the following:
s/mux_chr/mux_fe_chr/g
No functional changes are made.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-fe.c
This adds a few lines describing `mux-be` multiplexer configuration
for multiplexing several backend devices with a single frontend
device.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
qemu-optio
In the following patches backend multiplexer will be
introduced and the implementation will be named as
follows: `char-mux-be.c`. This patch renames the
frontend multiplexer from `char-mux.c` to
`char-mux-fe.c`.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@
Patch introduces `mux-be-id=ID` option for all chardev devices.
This is necessary to attach chardev to `mux-be` for backend
multiplexing. Actual implementation wimplementation will follow.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/
/CHARDEV_IS_MUX_FE/g
s/MUX_CHARDEV/MUX_FE_CHARDEV/g
s/TYPE_CHARDEV_MUX/TYPE_CHARDEV_MUX_FE/g
No json or string types are changed for the sake of
compatibility.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-fe.c | 10 +-
chardev/
The test is trivial: several backends, 1 `mux-be`, 1 frontend
do the buffer write and read. Pipe is used for EAGAIN verification.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
tests/unit/test-char.c | 306 +++
mux-be` multiplexer
[1] https://www.qemu.org/docs/master/system/qemu-manpage.html#hxtool-6
[2] https://github.com/lf-edge/eve
Roman Penyaev (8):
chardev/char: rename `MuxChardev` struct to `MuxFeChardev`
chardev/char: rename `char-mux.c` to `char-mux-fe.c`
chardev/char: move away mux suspend/resum
Hi,
On Tue, Oct 15, 2024, 10:50 Marc-André Lureau
wrote:
[cut]
> qemu_chr_fe_deinit(&chr_be1, false);
> > -qemu_chr_fe_deinit(&chr_be2, true);
> > +
> > +error = NULL;
>
> Unnecessary assignment,
>
> > +qmp_chardev_remove("mux-label", &error);
> > +g_assert_cmpstr(error_get
There is no sense to keep `focus`, `mux_cnt`, `prod`, `cons`
and `tag` variables as signed, those represent either size,
either position in array, which both are unsigned.
`focus` member of `MuxChardev` is kept signed, because initially
set to -1.
Signed-off-by: Roman Penyaev
Cc: "Marc-
With bitset management now it becomes feasible to implement
the logic of detaching frontends from multiplexer.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-fe.c | 2 +-
chardev/char-mux.c | 21 ++--
in the `backend` array (yes, huge confusion with
backend and frontends names).
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-mux.c | 42 +-
chardev/char.c | 2 +-
chard
`mux_cnt` struct member never goes negative or decrements,
so mux chardev can be !busy only when there are no
frontends attached. This patch fixes the always-true
check.
Fixes: a4afa548fc6d ("char: move front end handlers in CharBackend")
Signed-off-by: Roman Penyaev
Cc: "Marc-An
This patch tests:
1. feasibility of removing mux which does not have frontends attached
or frontends were prior detached.
2. inability to remove mux which has frontends attached (mux is "busy")
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu
Clean up forgotten leftovers.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/chardev-internal.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/chardev/chardev-internal.h b/chardev/chardev-internal.h
index 4e03af31476c..c3024b51fdda 10
ntend devices in any order.
Also first patches do some refactoring the purpose of which is to make
integer unsigned where possible (such as sizes or lengths).
v1->v2:
* improve if condition and assert for bit verification
Roman Penyaev (8):
chardev/char: fix qemu_chr_is_busy() check
c
Move away logic which attaches frontend device to a mux
from `char-fe.c` to actual `char-mux.c` implementation
and make it a separate function.
No logic changes are made.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-fe.c
Those are boolean variables, not signed integers.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-mux.c | 10 +-
chardev/chardev-internal.h | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/ch
On Mon, Oct 14, 2024 at 3:57 PM Marc-André Lureau
wrote:
>
> Hi Roman,
>
> On Thu, Oct 10, 2024 at 2:21 PM Roman Penyaev wrote:
>>
>> In the following patches backend multiplexer will be
>> introduced and the implementation will be named as
>> follows: `ch
On Mon, Oct 14, 2024 at 3:22 PM Marc-André Lureau
wrote:
[cut]
>>
>> +bool mux_chr_detach_frontend(MuxChardev *d, unsigned int tag)
>> +{
>> +unsigned int bit;
>> +
>> +bit = find_next_bit(&d->mux_bitset, MAX_MUX, tag);
>> +if (bit >= MAX_MUX) {
>
>
> if (bit != tag) instead?
Right,
On Mon, Oct 14, 2024 at 3:20 PM Marc-André Lureau
wrote:
>
>
>
> On Mon, Oct 14, 2024 at 3:45 PM Roman Penyaev wrote:
>>
>> Frontends can be attached and detached during run-time (although detach
>> is not implemented, but will follow). Counter variable of mux
Hi Marc-André,
On Thu, Oct 10, 2024 at 12:20 PM Marc-André Lureau
wrote:
>
> Hi Roman
>
> On Thu, Oct 10, 2024 at 1:28 PM Roman Penyaev wrote:
>>
>> `mux_cnt` struct member never goes negative or decrements,
>> so mux chardev can be !busy only when there are no
>
Those are boolean variables, not signed integers.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-mux.c | 10 +-
chardev/chardev-internal.h | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/ch
`mux_cnt` struct member never goes negative or decrements,
so mux chardev can be !busy only when there are no
frontends attached. This patch fixes the always-true
check.
Fixes: a4afa548fc6d ("char: move front end handlers in CharBackend")
Signed-off-by: Roman Penyaev
Cc: "Marc-An
ntend devices in any order.
Also first patches do some refactoring the purpose of which is to make
integer unsigned where possible (such as sizes or lengths).
Roman Penyaev (8):
chardev/char: fix qemu_chr_is_busy() check
chardev/chardev-internal: remove unused `max_size` struct member
charde
Move away logic which attaches frontend device to a mux
from `char-fe.c` to actual `char-mux.c` implementation
and make it a separate function.
No logic changes are made.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-fe.c
Clean up forgotten leftovers.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/chardev-internal.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/chardev/chardev-internal.h b/chardev/chardev-internal.h
index 4e03af31476c..c3024b51fdda 10
This patch tests:
1. feasibility of removing mux which does not have frontends attached
or frontends were prior detached.
2. inability to remove mux which has frontends attached (mux is "busy")
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu
With bitset management now it becomes feasible to implement
the logic of detaching frontends from multiplexer.
Signed-off-by: Roman Penyaev
Cc: "Marc-André Lureau"
Cc: qemu-devel@nongnu.org
---
chardev/char-fe.c | 2 +-
chardev/char-mux.c | 20 +--
1 - 100 of 153 matches
Mail list logo