[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 3909c0: virtio: disable ioeventfd for record/
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 3909c0: virtio: disable ioeventfd for record/replay |
Date: |
Fri, 09 Jul 2021 06:35:42 -0700 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 3909c079454a49b113c60a5cd91d749f78ca1c7f
https://github.com/qemu/qemu/commit/3909c079454a49b113c60a5cd91d749f78ca1c7f
Author: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
Date: 2021-07-02 (Fri, 02 Jul 2021)
Changed paths:
M hw/s390x/virtio-ccw.c
M hw/virtio/virtio-mmio.c
M hw/virtio/virtio-pci.c
Log Message:
-----------
virtio: disable ioeventfd for record/replay
virtio devices support separate iothreads waiting for
events from file descriptors. These are asynchronous
events that can't be recorded and replayed, therefore
this patch disables ioeventfd for all devices when
record or replay is enabled.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Message-Id: <162125678869.1252810.4317416444097392406.stgit@pasha-ThinkPad-X280>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 9cf4fd872d14ae109ce1ee430bf67499c2682fa5
https://github.com/qemu/qemu/commit/9cf4fd872d14ae109ce1ee430bf67499c2682fa5
Author: Greg Kurz <groug@kaod.org>
Date: 2021-07-02 (Fri, 02 Jul 2021)
Changed paths:
M hw/block/dataplane/virtio-blk.c
M hw/scsi/virtio-scsi-dataplane.c
M hw/virtio/virtio.c
Log Message:
-----------
virtio: Clarify MR transaction optimization
The device model batching its ioeventfds in a single MR transaction is
an optimization. Clarify this in virtio-scsi, virtio-blk and generic
virtio code. Also clarify that the transaction must commit before
closing ioeventfds so that no one is tempted to merge the loops
in the start functions error path and in the stop functions.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <162125799728.1394228.339855768563326832.stgit@bahia.lan>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 9b0ca75e0196a72523232063db1e07ae36a5077a
https://github.com/qemu/qemu/commit/9b0ca75e0196a72523232063db1e07ae36a5077a
Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
Date: 2021-07-03 (Sat, 03 Jul 2021)
Changed paths:
M hw/pci-host/q35.c
Log Message:
-----------
hw/pci-host/q35: Ignore write of reserved PCIEXBAR LENGTH field
libFuzzer triggered the following assertion:
cat << EOF | qemu-system-i386 -M pc-q35-5.0 \
-nographic -monitor none -serial none \
-qtest stdio -d guest_errors -trace pci\*
outl 0xcf8 0xf2000060
outl 0xcfc 0x8400056e
EOF
pci_cfg_write mch 00:0 @0x60 <- 0x8400056e
Aborted (core dumped)
This is because guest wrote MCH_HOST_BRIDGE_PCIEXBAR_LENGTH_RVD
(reserved value) to the PCIE XBAR register.
There is no indication on the datasheet about what occurs when
this value is written. Simply ignore it on QEMU (and report an
guest error):
pci_cfg_write mch 00:0 @0x60 <- 0x8400056e
Q35: Reserved PCIEXBAR LENGTH
pci_cfg_read mch 00:0 @0x0 -> 0x8086
pci_cfg_read mch 00:0 @0x0 -> 0x29c08086
...
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
BugLink: https://bugs.launchpad.net/qemu/+bug/1878641
Fixes: df2d8b3ed4 ("q35: Introduce q35 pc based chipset emulator")
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210526142438.281477-1-f4bug@amsat.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 80ebfd69b906186a12f0dc892a49188b4d672fdc
https://github.com/qemu/qemu/commit/80ebfd69b906186a12f0dc892a49188b4d672fdc
Author: Andrew Melnychenko <andrew@daynix.com>
Date: 2021-07-03 (Sat, 03 Jul 2021)
Changed paths:
M hw/virtio/virtio-pci.c
Log Message:
-----------
virtio-pci: Added check for virtio device presence in mm callbacks.
During unplug the virtio device is unplugged from virtio-bus on pci. In some
cases,
requests to virtio-pci mm may acquire during/after unplug. Added check that
virtio
device is on the bus, for "common" memory region.
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Message-Id: <20210609095843.141378-2-andrew@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: bf697371db87cc1a2d04f5e8dda1b4b3e2be0f0d
https://github.com/qemu/qemu/commit/bf697371db87cc1a2d04f5e8dda1b4b3e2be0f0d
Author: Andrew Melnychenko <andrew@daynix.com>
Date: 2021-07-03 (Sat, 03 Jul 2021)
Changed paths:
M hw/virtio/virtio-pci.c
Log Message:
-----------
virtio-pci: Added check for virtio device in PCI config cbs.
Now, if virtio device is not present on virtio-bus - pci config callbacks
will not lead to possible crush. The read will return "-1" which should be
interpreted by a driver that pci device may be unplugged.
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Message-Id: <20210609095843.141378-3-andrew@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: df07a8f8cb743e0ff86346bcb49fe09240e4be6c
https://github.com/qemu/qemu/commit/df07a8f8cb743e0ff86346bcb49fe09240e4be6c
Author: Andrew Melnychenko <andrew@daynix.com>
Date: 2021-07-03 (Sat, 03 Jul 2021)
Changed paths:
M hw/virtio/virtio-pci.c
Log Message:
-----------
virtio-pci: Changed return values for "notify", "device" and "isr" read.
At some point, after unplugging virtio-pci the virtio device may be unrealised,
but the memory regions may be present in flatview. So, it's a possible situation
when memory region's callbacks are called for "unplugged" device.
Previous two patches made sure this case does not cause QEMU to crash.
This patch adds check for "notify" memory region. Now reads will return "-1" if
a virtio
device is not present on a virtio bus.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1938042
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1743098
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Message-Id: <20210609095843.141378-4-andrew@daynix.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 109c20ea28cc0d82fa353e692345b172cb5721cc
https://github.com/qemu/qemu/commit/109c20ea28cc0d82fa353e692345b172cb5721cc
Author: Laurent Vivier <lvivier@redhat.com>
Date: 2021-07-03 (Sat, 03 Jul 2021)
Changed paths:
M hw/net/virtio-net.c
Log Message:
-----------
migration: failover: reset partially_hotplugged
When the card is plugged back, reset the partially_hotplugged flag to false
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1787194
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20210629152937.619193-1-lvivier@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: a4344574fd47336b6d8fc85ce1f66d4262e7dafd
https://github.com/qemu/qemu/commit/a4344574fd47336b6d8fc85ce1f66d4262e7dafd
Author: Igor Mammedov <imammedo@redhat.com>
Date: 2021-07-03 (Sat, 03 Jul 2021)
Changed paths:
M tests/qtest/bios-tables-test-allowed-diff.h
Log Message:
-----------
tests: acpi: prepare for changing DSDT tables
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20210624204229.998824-2-imammedo@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: John Sucaet <john.sucaet@ekinops.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 7193d7cdd93e50f0e5f09803b98d27d3f9b147ac
https://github.com/qemu/qemu/commit/7193d7cdd93e50f0e5f09803b98d27d3f9b147ac
Author: Igor Mammedov <imammedo@redhat.com>
Date: 2021-07-03 (Sat, 03 Jul 2021)
Changed paths:
M hw/i386/acpi-build.c
Log Message:
-----------
acpi: pc: revert back to v5.2 PCI slot enumeration
Commit [1] moved _SUN variable from only hot-pluggable to
all devices. This made linux kernel enumerate extra slots
that weren't present before. If extra slot happens to be
be enumerated first and there is a device in th same slot
but on other bridge, linux kernel will add -N suffix to
slot name of the later, thus changing NIC name compared to
QEMU 5.2. This in some case confuses systemd, if it is
using SLOT NIC naming scheme and interface name becomes
not the same as it was under QEMU-5.2.
Reproducer QEMU CLI:
-M pc-i440fx-5.2 -nodefaults \
-device pci-bridge,chassis_nr=1,id=pci.1,bus=pci.0,addr=0x3 \
-device virtio-net-pci,id=nic1,bus=pci.1,addr=0x1 \
-device virtio-net-pci,id=nic2,bus=pci.1,addr=0x2 \
-device virtio-net-pci,id=nic3,bus=pci.1,addr=0x3
with RHEL8 guest produces following results:
v5.2:
kernel: virtio_net virtio0 ens1: renamed from eth0
kernel: virtio_net virtio2 ens3: renamed from eth2
kernel: virtio_net virtio1 enp1s2: renamed from eth1
(slot 2 is assigned to empty bus 0 slot and virtio1
is assigned to 2-2 slot, and renaming falls back,
for some reason, to path based naming scheme)
v6.0:
kernel: virtio_net virtio0 ens1: renamed from eth0
kernel: virtio_net virtio2 ens3: renamed from eth2
systemd-udevd[299]: Error changing net interface name 'eth1' to 'ens3':
File exists
systemd-udevd[299]: could not rename interface '3' from 'eth1' to 'ens3':
File exists
(with commit [1] kernel assigns virtio2 to 3-2 slot
since bridge advertises _SUN=0x3 and kernel assigns
slot 3 to bridge. Still it manages to rename virtio2
correctly to ens3, however systemd gets confused with virtio1
where slot allocation exactly the same (2-2) as in 5.2 case
and tries to rename it to ens3 which is rightfully taken by
virtio2)
I'm not sure what breaks in systemd interface renaming (it probably
should be investigated), but on QEMU side we can safely revert
_SUN to 5.2 behavior (i.e. avoid cold-plugged bridges and non
hot-pluggable device classes), without breaking acpi-index, which uses
slot numbers but it doesn't have to use _SUN, it could use an arbitrary
variable name that has the same slot value).
It will help existing VMs to keep networking with non trivial
configs in working order since systemd will do its interface
renaming magic as it used to do.
1)
Fixes: b7f23f62e40 (pci: acpi: add _DSM method to PCI devices)
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20210624204229.998824-3-imammedo@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: John Sucaet <john.sucaet@ekinops.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 40f23e4e52f6188036062abea432560e5cdd239a
https://github.com/qemu/qemu/commit/40f23e4e52f6188036062abea432560e5cdd239a
Author: Igor Mammedov <imammedo@redhat.com>
Date: 2021-07-03 (Sat, 03 Jul 2021)
Changed paths:
M tests/data/acpi/pc/DSDT
M tests/data/acpi/pc/DSDT.acpihmat
M tests/data/acpi/pc/DSDT.bridge
M tests/data/acpi/pc/DSDT.cphp
M tests/data/acpi/pc/DSDT.dimmpxm
M tests/data/acpi/pc/DSDT.hpbridge
M tests/data/acpi/pc/DSDT.ipmikcs
M tests/data/acpi/pc/DSDT.memhp
M tests/data/acpi/pc/DSDT.nohpet
M tests/data/acpi/pc/DSDT.numamem
M tests/qtest/bios-tables-test-allowed-diff.h
Log Message:
-----------
tests: acpi: pc: update expected DSDT blobs
@@ -930,20 +930,20 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ",
0x00000001)
Device (S00)
{
Name (_ADR, Zero) // _ADR: Address
- Name (_SUN, Zero) // _SUN: Slot User Number
+ Name (ASUN, Zero)
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
{
- Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
+ Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, ASUN))
}
}
Device (S10)
{
Name (_ADR, 0x00020000) // _ADR: Address
- Name (_SUN, 0x02) // _SUN: Slot User Number
+ Name (ASUN, 0x02)
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
{
- Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
+ Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, ASUN))
}
Method (_S1D, 0, NotSerialized) // _S1D: S1 Device State
with a hank per bridge:
@@ -965,10 +965,10 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ",
0x00000001)
Device (S18)
{
Name (_ADR, 0x00030000) // _ADR: Address
- Name (_SUN, 0x03) // _SUN: Slot User Number
+ Name (ASUN, 0x03)
Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method
{
- Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
+ Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, ASUN))
}
}
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20210624204229.998824-4-imammedo@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: John Sucaet <john.sucaet@ekinops.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: ee80f5ba22c660453c012a92c766f13498fd6a09
https://github.com/qemu/qemu/commit/ee80f5ba22c660453c012a92c766f13498fd6a09
Author: Gerd Hoffmann <kraxel@redhat.com>
Date: 2021-07-03 (Sat, 03 Jul 2021)
Changed paths:
M hw/acpi/generic_event_device.c
Log Message:
-----------
acpi/ged: fix reset cause
Reset requests should use SHUTDOWN_CAUSE_GUEST_RESET not
SHUTDOWN_CAUSE_GUEST_SHUTDOWN.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20210624110057.2398779-1-kraxel@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 9e2423ef58f37e1d9def4ef33b054cb7e86da1f7
https://github.com/qemu/qemu/commit/9e2423ef58f37e1d9def4ef33b054cb7e86da1f7
Author: Vincent Bernat <vincent@bernat.ch>
Date: 2021-07-03 (Sat, 03 Jul 2021)
Changed paths:
M docs/pcie_pci_bridge.txt
Log Message:
-----------
docs: add slot when adding new PCIe root port
Without providing a specific slot, QEMU won't be able to create the
second additional PCIe root port with the following error:
$ qemu-system-x86_64 [...] -machine q35 \
> -device pcie-root-port,bus=pcie.0,id=rp1 \
> -device pcie-root-port,bus=pcie.0,id=rp2
qemu-system-x86_64: -device pcie-root-port,bus=pcie.0,id=rp2:
Can't add chassis slot, error -16
This is due to the fact they both try to use slot 0. Update the
documentation to specify a slot for each new PCIe root port.
Signed-off-by: Vincent Bernat <vincent@bernat.ch>
Message-Id: <20210614114357.1146725-1-vincent@bernat.ch>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: e3e01466bff42b5ea977340d8d7d90df482b0c97
https://github.com/qemu/qemu/commit/e3e01466bff42b5ea977340d8d7d90df482b0c97
Author: Mathieu Poirier <mathieu.poirier@linaro.org>
Date: 2021-07-07 (Wed, 07 Jul 2021)
Changed paths:
M MAINTAINERS
Log Message:
-----------
MAINTAINERS: Add maintainer for vhost-user RNG implementation
This patch adds entry for the vhost-user-rng related files.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Message-Id: <20210614202842.581640-6-mathieu.poirier@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 05de778b5b8ab0b402996769117b88c7ea5c7c61
https://github.com/qemu/qemu/commit/05de778b5b8ab0b402996769117b88c7ea5c7c61
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2021-07-09 (Fri, 09 Jul 2021)
Changed paths:
M MAINTAINERS
M docs/pcie_pci_bridge.txt
M hw/acpi/generic_event_device.c
M hw/block/dataplane/virtio-blk.c
M hw/i386/acpi-build.c
M hw/net/virtio-net.c
M hw/pci-host/q35.c
M hw/s390x/virtio-ccw.c
M hw/scsi/virtio-scsi-dataplane.c
M hw/virtio/virtio-mmio.c
M hw/virtio/virtio-pci.c
M hw/virtio/virtio.c
M tests/data/acpi/pc/DSDT
M tests/data/acpi/pc/DSDT.acpihmat
M tests/data/acpi/pc/DSDT.bridge
M tests/data/acpi/pc/DSDT.cphp
M tests/data/acpi/pc/DSDT.dimmpxm
M tests/data/acpi/pc/DSDT.hpbridge
M tests/data/acpi/pc/DSDT.ipmikcs
M tests/data/acpi/pc/DSDT.memhp
M tests/data/acpi/pc/DSDT.nohpet
M tests/data/acpi/pc/DSDT.numamem
Log Message:
-----------
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc,pci,virtio: bugfixes, improvements
vhost-user-rng support.
Fixes all over the place.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Wed 07 Jul 2021 14:29:30 BST
# gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg: issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67
# Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* remotes/mst/tags/for_upstream:
MAINTAINERS: Add maintainer for vhost-user RNG implementation
docs: add slot when adding new PCIe root port
acpi/ged: fix reset cause
tests: acpi: pc: update expected DSDT blobs
acpi: pc: revert back to v5.2 PCI slot enumeration
tests: acpi: prepare for changing DSDT tables
migration: failover: reset partially_hotplugged
virtio-pci: Changed return values for "notify", "device" and "isr" read.
virtio-pci: Added check for virtio device in PCI config cbs.
virtio-pci: Added check for virtio device presence in mm callbacks.
hw/pci-host/q35: Ignore write of reserved PCIEXBAR LENGTH field
virtio: Clarify MR transaction optimization
virtio: disable ioeventfd for record/replay
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/53c0123118a1...05de778b5b8a