qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 06639f: chardev/char-win-stdio: Pass Ctrl+C t


From: Paolo Bonzini
Subject: [Qemu-commits] [qemu/qemu] 06639f: chardev/char-win-stdio: Pass Ctrl+C to guest with ...
Date: Mon, 21 Nov 2022 13:21:55 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 06639f8ff53d1dbfa709377499e6c30eca9c3c9a
      
https://github.com/qemu/qemu/commit/06639f8ff53d1dbfa709377499e6c30eca9c3c9a
  Author: Bin Meng <bin.meng@windriver.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M chardev/char-win-stdio.c

  Log Message:
  -----------
  chardev/char-win-stdio: Pass Ctrl+C to guest with a multiplexed monitor

At present when pressing Ctrl+C from a guest running on QEMU Windows
with a multiplexed monitor, e.g.: -serial mon:stdio, QEMU executable
just exits. This behavior is inconsistent with the Linux version.

Such behavior is caused by unconditionally setting the input mode
ENABLE_PROCESSED_INPUT for a console's input buffer. Fix this by
testing whether the chardev is allowed to do so.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20221025141015.612291-1-bin.meng@windriver.com>


  Commit: a216ec85b78ea96b51950665879524132f6e678c
      
https://github.com/qemu/qemu/commit/a216ec85b78ea96b51950665879524132f6e678c
  Author: Fiona Ebner <f.ebner@proxmox.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M migration/channel-block.c

  Log Message:
  -----------
  migration/channel-block: fix return value for qio_channel_block_{readv,writev}

in the error case. The documentation in include/io/channel.h states
that -1 or QIO_CHANNEL_ERR_BLOCK should be returned upon error. Simply
passing along the return value from the bdrv-functions has the
potential to confuse the call sides. Non-blocking mode is not
implemented currently, so -1 it is.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 4cc47b439594327b213f9b6a67803f1a503c2cb7
      
https://github.com/qemu/qemu/commit/4cc47b439594327b213f9b6a67803f1a503c2cb7
  Author: Leonardo Bras <leobras@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M migration/multifd.c

  Log Message:
  -----------
  migration/multifd/zero-copy: Create helper function for flushing

Move flushing code from multifd_send_sync_main() to a new helper, and call
it in multifd_send_sync_main().

Signed-off-by: Leonardo Bras <leobras@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 4934a5dd7c68f5ab15f17498db4fc20ed6db9578
      
https://github.com/qemu/qemu/commit/4934a5dd7c68f5ab15f17498db4fc20ed6db9578
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Fix possible infinite loop of ram save process

When starting ram saving procedure (especially at the completion phase),
always set last_seen_block to non-NULL to make sure we can always correctly
detect the case where "we've migrated all the dirty pages".

Then we'll guarantee both last_seen_block and pss.block will be valid
always before the loop starts.

See the comment in the code for some details.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: f5816b5c86ed399c99ce8662a4ed96aab32c5eef
      
https://github.com/qemu/qemu/commit/f5816b5c86ed399c99ce8662a4ed96aab32c5eef
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M migration/qemu-file.c

  Log Message:
  -----------
  migration: Fix race on qemu_file_shutdown()

In qemu_file_shutdown(), there's a possible race if with current order of
operation.  There're two major things to do:

  (1) Do real shutdown() (e.g. shutdown() syscall on socket)
  (2) Update qemufile's last_error

We must do (2) before (1) otherwise there can be a race condition like:

      page receiver                     other thread
      -------------                     ------------
      qemu_get_buffer()
                                        do shutdown()
        returns 0 (buffer all zero)
        (meanwhile we didn't check this retcode)
      try to detect IO error
        last_error==NULL, IO okay
      install ALL-ZERO page
                                        set last_error
      --> guest crash!

To fix this, we can also check retval of qemu_get_buffer(), but not all
APIs can be properly checked and ultimately we still need to go back to
qemu_file_get_error().  E.g. qemu_get_byte() doesn't return error.

Maybe some day a rework of qemufile API is really needed, but for now keep
using qemu_file_get_error() and fix it by not allowing that race condition
to happen.  Here shutdown() is indeed special because the last_error was
emulated.  For real -EIO errors it'll always be set when e.g. sendmsg()
error triggers so we won't miss those ones, only shutdown() is a bit tricky
here.

Cc: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: afed4273b5c9438dfbaa0b4762d0433f295ccdc1
      
https://github.com/qemu/qemu/commit/afed4273b5c9438dfbaa0b4762d0433f295ccdc1
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Disallow postcopy preempt to be used with compress

The preempt mode requires the capability to assign channel for each of the
page, while the compression logic will currently assign pages to different
compress thread/local-channel so potentially they're incompatible.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: cedb70eafb4fd51d9c714981509d97b9f4055be5
      
https://github.com/qemu/qemu/commit/cedb70eafb4fd51d9c714981509d97b9f4055be5
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M include/exec/ram_addr.h
    M include/exec/ramblock.h
    M include/qemu/bitmap.h
    M util/bitmap.c

  Log Message:
  -----------
  migration: Use non-atomic ops for clear log bitmap

Since we already have bitmap_mutex to protect either the dirty bitmap or
the clear log bitmap, we don't need atomic operations to set/clear/test on
the clear log bitmap.  Switching all ops from atomic to non-atomic
versions, meanwhile touch up the comments to show which lock is in charge.

Introduced non-atomic version of bitmap_test_and_clear_atomic(), mostly the
same as the atomic version but simplified a few places, e.g. dropped the
"old_bits" variable, and also the explicit memory barriers.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 6f39c90b86b9d3772779f873ed88aaa75a220aba
      
https://github.com/qemu/qemu/commit/6f39c90b86b9d3772779f873ed88aaa75a220aba
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M migration/migration.c
    M migration/ram.c

  Log Message:
  -----------
  migration: Disable multifd explicitly with compression

Multifd thread model does not work for compression, explicitly disable it.

Note that previuosly even we can enable both of them, nothing will go
wrong, because the compression code has higher priority so multifd feature
will just be ignored.  Now we'll fail even earlier at config time so the
user should be aware of the consequence better.

Note that there can be a slight chance of breaking existing users, but
let's assume they're not majority and not serious users, or they should
have found that multifd is not working already.

With that, we can safely drop the check in ram_save_target_page() for using
multifd, because when multifd=on then compression=off, then the removed
check on save_page_use_compression() will also always return false too.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: b5280437a7f49cf617cdd99bbbe2c7bd1652408b
      
https://github.com/qemu/qemu/commit/b5280437a7f49cf617cdd99bbbe2c7bd1652408b
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M migration/block.c

  Log Message:
  -----------
  migration: Block migration comment or code is wrong

And it appears that what is wrong is the code. During bulk stage we
need to make sure that some block is dirty, but no games with
max_size at all.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 93e2da36ed944d05e78905e95983a44624ed064c
      
https://github.com/qemu/qemu/commit/93e2da36ed944d05e78905e95983a44624ed064c
  Author: Strahinja Jankovic <strahinjapjankovic@gmail.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M hw/sd/allwinner-sdhost.c
    M include/hw/sd/allwinner-sdhost.h

  Log Message:
  -----------
  hw/sd: Fix sun4i allwinner-sdhost for U-Boot

Trying to run U-Boot for Cubieboard (Allwinner A10) fails because it cannot
access SD card. The problem is that FIFO register in current
allwinner-sdhost implementation is at the address corresponding to
Allwinner H3, but not A10.
Linux kernel is not affected since Linux driver uses DMA access and does
not use FIFO register for reading/writing.

This patch adds new class parameter `is_sun4i` and based on that
parameter uses register at offset 0x100 either as FIFO register (if
sun4i) or as threshold register (if not sun4i; in this case register at
0x200 is FIFO register).

Tested with U-Boot and Linux kernel image built for Cubieboard and
OrangePi PC.

Signed-off-by: Strahinja Jankovic <strahinja.p.jankovic@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20221112214900.24152-1-strahinja.p.jankovic@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 69e7e60d011846f066af97589660eef52898519a
      
https://github.com/qemu/qemu/commit/69e7e60d011846f066af97589660eef52898519a
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M hw/intc/arm_gic.c

  Log Message:
  -----------
  hw/intc: clean-up access to GIC multi-byte registers

gic_dist_readb was returning a word value which just happened to work
as a result of the way we OR the data together. Lets fix it so only
the explicit byte is returned for each part of GICD_TYPER. I've
changed the return type to uint8_t although the overflow is only
detected with an explicit -Wconversion.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 3d5af538a4fa8456a7e54b8115afe3d6358c1ce5
      
https://github.com/qemu/qemu/commit/3d5af538a4fa8456a7e54b8115afe3d6358c1ce5
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M hw/intc/arm_gic.c

  Log Message:
  -----------
  hw/intc: add implementation of GICD_IIDR to Arm GIC

a66a24585f (hw/intc/arm_gic: Implement read of GICC_IIDR) implemented
this for the CPU interface register. The fact we don't implement it
shows up when running Xen with -d guest_error which is definitely
wrong because the guest is perfectly entitled to read it.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: c4462523ff0790cbefb1c206cc34c85ec686b1d5
      
https://github.com/qemu/qemu/commit/c4462523ff0790cbefb1c206cc34c85ec686b1d5
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M tests/avocado/boot_linux.py

  Log Message:
  -----------
  tests/avocado/boot_linux.py: Bump aarch64 virt test timeout to 720s

The two tests
tests/avocado/boot_linux.py:BootLinuxAarch64.test_virt_tcg_gicv2
tests/avocado/boot_linux.py:BootLinuxAarch64.test_virt_tcg_gicv3

take quite a long time to run, and the current timeout of 240s
is not enough for the tests to complete on slow machines:
we've seen these tests time out in the gitlab CI in the
'avocado-system-alpine' CI job, for instance. The timeout
is also insufficient for running the test with a debug build
of QEMU: on my machine the tests take over 10 minutes to run
in that config.

Push the timeout up to 720s so that the test definitely has
enough time to complete.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: 312b71abce3005ca7294dc0db7d548dc7cc41fbf
      
https://github.com/qemu/qemu/commit/312b71abce3005ca7294dc0db7d548dc7cc41fbf
  Author: Ard Biesheuvel <ardb@kernel.org>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Limit LPA2 effective output address when TCR.DS == 0

With LPA2, the effective output address size is at most 48 bits when
TCR.DS == 0. This case is currently unhandled in the page table walker,
where we happily assume LVA/64k granule when outputsize > 48 and
param.ds == 0, resulting in the wrong conversion to be used from a
page table descriptor to a physical address.

    if (outputsize > 48) {
        if (param.ds) {
            descaddr |= extract64(descriptor, 8, 2) << 50;
        } else {
            descaddr |= extract64(descriptor, 12, 4) << 48;
        }

So cap the outputsize to 48 when TCR.DS is cleared, as per the
architecture.

Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221116170316.259695-1-ardb@kernel.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 050143bfc70c1d7d623fa48d2f82830ebf5775b1
      
https://github.com/qemu/qemu/commit/050143bfc70c1d7d623fa48d2f82830ebf5775b1
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M chardev/char-win-stdio.c

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

chardev fixes

# -----BEGIN PGP SIGNATURE-----
#
# iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmN7KeQcHG1hcmNhbmRy
# ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5TSbD/4vqW5PGyXZw2q9h46S
# TuQ76IxPdN81j5dZg6wt+yq8XTTDGnufYTE8WLA3b9zCQCEJbPXbS7d1Zrx9gJrW
# UuRC19p6b9FR9iU4w/SKWN/XKUpmM+3qCCwad1N/Rn3I2cRU1YsWFR6hL1L7IQLA
# 3LEImZIPKBWQ2Sf2mgYmxlmO+xMuAxPefQ1/t/62yKjYrFzWkjIduKO1oUXfFlE2
# GYrz5x1+AaZ00GOnOJpvEBZdqZEVePIrd/AJAPTrmdRjiZWbq93a0ss5nZq2OT2V
# 25QG+CXzBht8gDAXZ9aIrFP5muarCuHrz5dvuTAkcGa+SfgkXiFovb7Mp2OE2nef
# COP4emq50WJWUM8+k2W9jc93Rg27tQhXt3JC9v8Cm6mgs00QZpCvPB/EhhEa46fz
# Gq/+g084Urb2JnTX2g/eog6+yboLsXhAq/Ke3FT7gzsD/JwkawnG5LG8gmEztnzG
# yjlX5HLsgS7dhg9BAfM2d3oVQM4Y1G8O8Xr3dfGQocRS3AYTHMw69AeIfxPb4Ax9
# 1vd+viS+dtabGpDYmKyT58ZVFOREYtTPTcU2ym5CxbR+B6DDUXwMhM7CESXwB96R
# +iv2La5g7HbXemgUWa54/HqIGJtgJAEHWdgcZ6mzYMtyGAJL7YC7I/Yx93M1A21G
# o5BpcgZ2ZzbUot6vISs2r4SE2A==
# =AcEH
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 21 Nov 2022 02:33:56 EST
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "marcandre.lureau@redhat.com"
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" 
[full]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" 
[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:
  chardev/char-win-stdio: Pass Ctrl+C to guest with a multiplexed monitor

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: af29446f32df4f369d4ee32d721fc3c989095731
      
https://github.com/qemu/qemu/commit/af29446f32df4f369d4ee32d721fc3c989095731
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M include/exec/ram_addr.h
    M include/exec/ramblock.h
    M include/qemu/bitmap.h
    M migration/block.c
    M migration/channel-block.c
    M migration/migration.c
    M migration/multifd.c
    M migration/qemu-file.c
    M migration/ram.c
    M util/bitmap.c

  Log Message:
  -----------
  Merge tag 'next-pull-request' of https://gitlab.com/juan.quintela/qemu into 
staging

Migration PULL request (take 3)

Hi

Drop everything that is not a bug fix:
- fixes by peter
- fix comment on block creation (me)
- fix return values from qio_channel_block()

Please, apply.

(take 1)
It includes:
- Leonardo fix for zero_copy flush
- Fiona fix for return value of readv/writev
- Peter Xu cleanups
- Peter Xu preempt patches
- Patches ready from zero page (me)
- AVX2 support (ling)
- fix for slow networking and reordering of first packets (manish)

Please, apply.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmN7dhUACgkQ9IfvGFhy
# 1yN0GhAAmpBGFomPXqOhixXcZdCOpFvLVKU13O+okp2NgY9W5Qlicf6ANo0cbvUh
# VVLCnXToySbP+7TLLqZjT4mVgM6EUIk1xqUXXICJ1mXIznvMnMtnseMNX033E2RL
# mhIVx+2AsoClWR9AdQVrzvjwR/gmzEa915w1HnHVfLFSPWmIfd9iWvOEenf5SYY5
# R7yAq0tWohOAtPiyrFAchcyTidW7pB2ZqD85ZEuGQ6EBpPxHM2NZ46NuK52j02k3
# eKGrKBFAh4QTRf5+QT0ASAGUqxPYM3iT/WOw3FZkZDQoedcReeECgDh1gfdd27iH
# Rebn+UHThgofBAspFVrJs9rSVlOnDdDp7yY1YDC6s6285Dci9JyWe0raIyvfdBK7
# h+AtBFLZVkIR0LXu4NlVe4IHnO5t/XVsLPwZ+7SQ9fc3gezAn4kAiEf+m8umTgho
# n3Jo+2dl52QoMOW2OsX9199g0lorQAby6bJVG4xbq82ijE9N1NHuLe44w9OGZTKg
# 697cNPDaoSRrvAdCPPh5KaZXsxpfLPxoMlZWxCTsNvs/jCzGs7AnvbU0QHlB+skU
# R2Ae42QBq6ZSogtN8tNZFPH82Z6xTOJNILtmMgEQGAjLf3yOd8T5gZLsYNujTOyJ
# ZsahXU0yRTkGmCkzCyr//mGu4KEPWtDOq27QqQPFfayvhr16ECw=
# =dosb
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 21 Nov 2022 07:59:01 EST
# gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full]
# gpg:                 aka "Juan Quintela <quintela@trasno.org>" [full]
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723

* tag 'next-pull-request' of https://gitlab.com/juan.quintela/qemu:
  migration: Block migration comment or code is wrong
  migration: Disable multifd explicitly with compression
  migration: Use non-atomic ops for clear log bitmap
  migration: Disallow postcopy preempt to be used with compress
  migration: Fix race on qemu_file_shutdown()
  migration: Fix possible infinite loop of ram save process
  migration/multifd/zero-copy: Create helper function for flushing
  migration/channel-block: fix return value for qio_channel_block_{readv,writev}

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 0b710ae5c5d6386ec2cab89aad06067b167e263e
      
https://github.com/qemu/qemu/commit/0b710ae5c5d6386ec2cab89aad06067b167e263e
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M hw/intc/arm_gic.c
    M hw/sd/allwinner-sdhost.c
    M include/hw/sd/allwinner-sdhost.h
    M target/arm/ptw.c
    M tests/avocado/boot_linux.py

  Log Message:
  -----------
  Merge tag 'pull-target-arm-20221121' of 
https://git.linaro.org/people/pmaydell/qemu-arm into staging

target-arm queue:
 * hw/sd: Fix sun4i allwinner-sdhost for U-Boot
 * hw/intc: add implementation of GICD_IIDR to Arm GIC
 * tests/avocado/boot_linux.py: Bump aarch64 virt test timeout
 * target/arm: Limit LPA2 effective output address when TCR.DS == 0

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmN7disZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3i8sEACcJmCKplkJ3KlBqBCXdldF
# pNQde6fIAEvUtFGkPr8OLFixIp13aLlw3/7sieHl6o76GMw1u26kd/qTykypID/T
# j3rxZC7ospo2j3MfLLy0TiG/fwzCwa6G0SIdKUOjkwX52IgWE/gUlvtjJvtLcNEN
# nta2dm5PWcF6fxDZwdYUGo3akwi8qbIlBxUeQR3VTUzXC+7F22pDzA8lp8QpHeW0
# inaLNtlEbRc5+rnOuwhOK5mnYiTwTN40vEz89v940Ii/CIFmPOAmx2rxsrmnVbLq
# uGqzXoN4OMurl2gco7LUMS2mshVBfpVOyZqaaXn/3dXkQ/W1fN37iCZF8Z2E8P2M
# YvcdxgYWoFmP7mlr9S1k4RgQTGVRS9j6XviGi62Zra2enNx5769JUhJFifQBYqLA
# V3FcizuHqUKsItJtGMO3gXR02BEE53o8c6WJ18uflTNVaY9wZ5MDqgGw/hKmfWLS
# /mjFdwwTbW7IZ0beW3pl9szXAduhGNoegTsfkn9xrANa62Jx1GSs/G0+mdSnA9oL
# 1YB2EDidiTlizbrn0aK+Lgls5/FG9qP+ReY7GhW2ZYvPuKesja6BJEAyEW6Xg3Sj
# D70L8/AzZtn8AHu/aKotLZ6UHVTNxFg4AHwte9fJYrZe72e6aR+8XQaCBPz47pi8
# NHAnGWWc28SdNCau7I8uMg==
# =0yEm
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 21 Nov 2022 07:59:23 EST
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [full]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [full]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" 
[full]
# gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [unknown]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* tag 'pull-target-arm-20221121' of 
https://git.linaro.org/people/pmaydell/qemu-arm:
  target/arm: Limit LPA2 effective output address when TCR.DS == 0
  tests/avocado/boot_linux.py: Bump aarch64 virt test timeout to 720s
  hw/intc: add implementation of GICD_IIDR to Arm GIC
  hw/intc: clean-up access to GIC multi-byte registers
  hw/sd: Fix sun4i allwinner-sdhost for U-Boot

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: bd142b2391a4369f39f9f4e8c48b15ed18280446
      
https://github.com/qemu/qemu/commit/bd142b2391a4369f39f9f4e8c48b15ed18280446
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M hw/net/rtl8139.c

  Log Message:
  -----------
  rtl8139: avoid clobbering tx descriptor bits

The device turns the Tx Descriptor into a Tx Status descriptor after
fully reading the descriptor. This involves clearing Tx Own (bit 31) to
indicate that the driver has ownership of the descriptor again as well
as several other bits.

The code keeps the first dword of the Tx Descriptor in the txdw0 local
variable. txdw0 is reused to build the first word of the Tx Status
descriptor. Later on the code uses txdw0 again, incorrectly assuming
that it still contains the first dword of the Tx Descriptor. The tx
offloading code misbehaves because it sees bogus bits in txdw0.

Use a separate local variable for Tx Status and preserve Tx Descriptor
in txdw0.

Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20221117165554.1773409-2-stefanha@redhat.com>


  Commit: c74831a02c818f89d10f5475cd0fb9ba40bfb2a8
      
https://github.com/qemu/qemu/commit/c74831a02c818f89d10f5475cd0fb9ba40bfb2a8
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M hw/net/rtl8139.c

  Log Message:
  -----------
  rtl8139: keep Tx command mode 0 and 1 separate

There are two Tx Descriptor formats called mode 0 and mode 1. The mode
is determined by the Large Send bit.

CP_TX_IPCS (bit 18) is defined in mode 1 but the code checks the bit
unconditionally. In mode 0 bit 18 is part of the Large Send MSS value.

Explicitly check the Large Send bit to distinguish Tx command modes.
This avoids bugs where modes are confused. Note that I didn't find any
actual bugs aside from needlessly computing the IP checksum when the
Large Send bit is enabled.

Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20221117165554.1773409-3-stefanha@redhat.com>


  Commit: 6d71357a3b651ec9db126e4862b77e13165427f5
      
https://github.com/qemu/qemu/commit/6d71357a3b651ec9db126e4862b77e13165427f5
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    M hw/net/rtl8139.c

  Log Message:
  -----------
  rtl8139: honor large send MSS value

The Large-Send Task Offload Tx Descriptor (9.2.1 Transmit) has a
Large-Send MSS value where the driver specifies the MSS. See the
datasheet here:
http://realtek.info/pdf/rtl8139cp.pdf

The code ignores this value and uses a hardcoded MSS of 1500 bytes
instead. When the MTU is less than 1500 bytes the hardcoded value
results in IP fragmentation and poor performance.

Use the Large-Send MSS value to correctly size Large-Send packets.

Jason Wang <jasowang@redhat.com> noticed that the Large-Send MSS value
mask was incorrect so it is adjusted to match the datasheet and Linux
8139cp driver.

This issue was discussed in the past here:
https://lore.kernel.org/all/20161114162505.GD26664@stefanha-x1.localdomain/

Reported-by: Russell King - ARM Linux <linux@armlinux.org.uk>
Reported-by: Tobias Fiebig <tobias+git@fiebig.nl>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1312
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20221117165554.1773409-4-stefanha@redhat.com>


Compare: https://github.com/qemu/qemu/compare/a082fab9d259...6d71357a3b65



reply via email to

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