Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: df12798f8791a929f4d7309f67a0f437c608e7fb
      
https://github.com/qemu/qemu/commit/df12798f8791a929f4d7309f67a0f437c608e7fb
  Author: Roman Penyaev <[email protected]>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M chardev/char.c

  Log Message:
  -----------
  chardev/char: fix qemu_chr_is_busy() check

`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 <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: [email protected]
Reviewed-by: Marc-André Lureau <[email protected]>
Message-ID: <[email protected]>


  Commit: 58e5a3ae427d8a625f803fbc5f2964e6986ebeac
      
https://github.com/qemu/qemu/commit/58e5a3ae427d8a625f803fbc5f2964e6986ebeac
  Author: Roman Penyaev <[email protected]>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M chardev/chardev-internal.h

  Log Message:
  -----------
  chardev/chardev-internal: remove unused `max_size` struct member

Clean up forgotten leftovers.

Signed-off-by: Roman Penyaev <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: [email protected]
Reviewed-by: Marc-André Lureau <[email protected]>
Message-ID: <[email protected]>


  Commit: 1ba399406a8fa82ad24fd5208595ca429d2927ab
      
https://github.com/qemu/qemu/commit/1ba399406a8fa82ad24fd5208595ca429d2927ab
  Author: Roman Penyaev <[email protected]>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M chardev/char-mux.c
    M chardev/chardev-internal.h

  Log Message:
  -----------
  chardev/mux: use bool type for `linestart` and `term_got_escape`

Those are boolean variables, not signed integers.

Signed-off-by: Roman Penyaev <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: [email protected]
Reviewed-by: Marc-André Lureau <[email protected]>
Message-ID: <[email protected]>


  Commit: c64f0bc1ce2f1d117d581b3445fe8286acd413d0
      
https://github.com/qemu/qemu/commit/c64f0bc1ce2f1d117d581b3445fe8286acd413d0
  Author: Roman Penyaev <[email protected]>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M chardev/char-fe.c
    M chardev/char-mux.c
    M chardev/chardev-internal.h
    M include/chardev/char-fe.h

  Log Message:
  -----------
  chardev/mux: convert size members to unsigned int

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 <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: [email protected]
Reviewed-by: Marc-André Lureau <[email protected]>
Message-ID: <[email protected]>


  Commit: 709a4cabfb9a425118d37855fcc661559a1610bb
      
https://github.com/qemu/qemu/commit/709a4cabfb9a425118d37855fcc661559a1610bb
  Author: Roman Penyaev <[email protected]>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M chardev/char-fe.c
    M chardev/char-mux.c
    M chardev/chardev-internal.h

  Log Message:
  -----------
  chardev/mux: introduce `mux_chr_attach_frontend() call

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 <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: [email protected]
Reviewed-by: Marc-André Lureau <[email protected]>
Message-ID: <[email protected]>


  Commit: 005b6d511f23e0c2b69b4c7353defaa48c24853d
      
https://github.com/qemu/qemu/commit/005b6d511f23e0c2b69b4c7353defaa48c24853d
  Author: Roman Penyaev <[email protected]>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M chardev/char-mux.c
    M chardev/char.c
    M chardev/chardev-internal.h

  Log Message:
  -----------
  chardev/mux: switch mux frontends management to bitset

Frontends can be attached and detached during run-time (although detach
is not implemented, but will follow). Counter variable of muxes is not
enough for proper attach/detach management, so this patch implements
bitset: if bit is set for the `mux_bitset` variable, then frontend
device can be found in the `backend` array (yes, huge confusion with
backend and frontends names).

Signed-off-by: Roman Penyaev <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: [email protected]
Reviewed-by: Marc-André Lureau <[email protected]>
Message-ID: <[email protected]>


  Commit: 327993f180e22f7f18b8693bd2381b74b1f971a6
      
https://github.com/qemu/qemu/commit/327993f180e22f7f18b8693bd2381b74b1f971a6
  Author: Roman Penyaev <[email protected]>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M chardev/char-fe.c
    M chardev/char-mux.c
    M chardev/chardev-internal.h

  Log Message:
  -----------
  chardev/mux: implement detach of frontends from mux

With bitset management now it becomes feasible to implement
the logic of detaching frontends from multiplexer.

Signed-off-by: Roman Penyaev <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: [email protected]
Reviewed-by: Marc-André Lureau <[email protected]>
Message-ID: <[email protected]>


  Commit: 95806c7bee232e995ffd963a6fea0a34fbabc937
      
https://github.com/qemu/qemu/commit/95806c7bee232e995ffd963a6fea0a34fbabc937
  Author: Roman Penyaev <[email protected]>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M tests/unit/test-char.c

  Log Message:
  -----------
  tests/unit/test-char: implement a few mux remove test cases

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 <[email protected]>
Cc: "Marc-André Lureau" <[email protected]>
Cc: [email protected]
[ fixed *error leak ]
Reviewed-by: Marc-André Lureau <[email protected]>
Message-ID: <[email protected]>


  Commit: c155d13167c6ace099e351e28125f9eb3694ae27
      
https://github.com/qemu/qemu/commit/c155d13167c6ace099e351e28125f9eb3694ae27
  Author: Peter Maydell <[email protected]>
  Date:   2024-10-15 (Tue, 15 Oct 2024)

  Changed paths:
    M chardev/char-fe.c
    M chardev/char-mux.c
    M chardev/char.c
    M chardev/chardev-internal.h
    M include/chardev/char-fe.h
    M tests/unit/test-char.c

  Log Message:
  -----------
  Merge tag 'chr-pull-request' of https://gitlab.com/marcandre.lureau/qemu into 
staging

chardev patch queue

# -----BEGIN PGP SIGNATURE-----
#
# iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmcOLLEcHG1hcmNhbmRy
# ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5eTaD/0Strje27bLtepVKLQU
# ZbD9X89G8lI2l87j9odwLjWcUEFCTVBhVgSCzrRdllWTlJoc5NVSUPQT9KcuWRpx
# MOjaiR+BO/QnflAKN0GfxCQAnPfYb/29rIe2Xr8co8byVUuE32GPcAy+0xoScOHD
# tpFbZegESsJ8MJN/pmYX83rt82mcNnCxIJxSxm7f4W8+3pdmFPsGQ8Ph+oVnz2n0
# Ag32e9rPUON6yeIZDyyc9Bn+JDxH+DsB8kK5N+KwoKvFIH3Knu725m8skwZvXjl0
# HmscpivJ4JS2N//Y0s891PaBFBzQOjWgv/EtBdW/LQZTcQdjaV4ZF1mUuom/oVPJ
# ydtoJz44dkSC/dOf4J6uwWTk7PNCqlqQfHRuZqosedIAw9MFvBSq5NhfPTut2qKr
# AWPu4r82zM18a/GEjRLPXCnF2APPGa56WhSxn8jGe+FIxcCADDCA9TAzSJLPMHJ8
# 5moXFmPXjYNrT/Wj4jsso73GCCGNPSNcJa+6/avn7SW8SjJGtpj3f7Qj5Aou5i+j
# zsFyzFlAKnGQMBi1Qv4kfd4H87hqGvVahT9+uG/pKfvNQw1VB4dKMWSNs1Utiuim
# sydt2VBwx6B923/6bmZ5HTbO5S9Hfep9jgwemPONNiIi5UeUCv6wTs0f8aallrv0
# idOZFmMK5JNn2NybEgALL1x6lg==
# =+W1p
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 15 Oct 2024 09:49:53 BST
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Marc-André Lureau <[email protected]>" 
[full]
# gpg:                 aka "Marc-André Lureau <[email protected]>" 
[full]
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* tag 'chr-pull-request' of https://gitlab.com/marcandre.lureau/qemu:
  tests/unit/test-char: implement a few mux remove test cases
  chardev/mux: implement detach of frontends from mux
  chardev/mux: switch mux frontends management to bitset
  chardev/mux: introduce `mux_chr_attach_frontend() call
  chardev/mux: convert size members to unsigned int
  chardev/mux: use bool type for `linestart` and `term_got_escape`
  chardev/chardev-internal: remove unused `max_size` struct member
  chardev/char: fix qemu_chr_is_busy() check

Signed-off-by: Peter Maydell <[email protected]>


Compare: https://github.com/qemu/qemu/compare/35152940b78e...c155d13167c6

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications

Reply via email to