* [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19
@ 2023-09-09 10:26 Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 01/34] target/s390x: Fix the "ignored match" case in VSTRS Michael Tokarev
` (33 more replies)
0 siblings, 34 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:26 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Michael Tokarev
The following patches are queued for QEMU stable v8.1.1:
https://gitlab.com/qemu-project/qemu/-/commits/staging-8.1
Patch freeze is 2023-09-19, and the release is planned for 2023-09-21:
https://wiki.qemu.org/Planning/8.1
Please respond here or CC qemu-stable@nongnu.org on any additional patches
you think should (or shouldn't) be included in the release.
The changes which are staging for inclusion, with the original commit hash
from master branch, are given below the bottom line.
Thanks!
/mjt
--------------------------------------
01 791b2b6a9302 Ilya Leoshkevich:
target/s390x: Fix the "ignored match" case in VSTRS
02 23e87d419f34 Ilya Leoshkevich:
target/s390x: Use a 16-bit immediate in VREP
03 6db3518ba4fc Ilya Leoshkevich:
target/s390x: Fix VSTL with a large length
04 6a2ea6151835 Ilya Leoshkevich:
target/s390x: Check reserved bits of VFMIN/VFMAX's M5
05 d19436291013 Thomas Huth:
include/hw/virtio/virtio-gpu: Fix virtio-gpu with blob on big endian hosts
06 5e0d65909c6f Akihiko Odaki:
kvm: Introduce kvm_arch_get_default_type hook
07 1ab445af8cd9 Akihiko Odaki:
accel/kvm: Specify default IPA size for arm64
08 4b3520fd93cd Richard Henderson:
target/arm: Fix SME ST1Q
09 cd1e4db73646 Richard Henderson:
target/arm: Fix 64-bit SSRA
10 09a3fffae00b Philippe Mathieu-Daudé:
docs/about/license: Update LICENSE URL
11 86e4f93d827d Richard Henderson:
softmmu: Assert data in bounds in iotlb_to_section
12 0d58c660689f Richard Henderson:
softmmu: Use async_run_on_cpu in tcg_commit
13 f187609f27b2 Fabiano Rosas:
block-migration: Ensure we don't crash during migration cleanup
14 9e771a2fc68d Alex Bennée:
target/arm: properly document FEAT_CRC32
15 aec338d63bc2 Richard Henderson:
linux-user: Adjust brk for load_bias
16 c1f27a0c6ae4 Paolo Bonzini:
target/i386: raise FERR interrupt with iothread locked
17 cb6ccdc9ca70 Bilal Elmoussaoui:
ui/dbus: Properly dispose touch/mouse dbus objects
18 7b8589d7ce7e Nicholas Piggin:
ppc/vof: Fix missed fields in VOF cleanup
19 6ec65b69ba17 Maksim Kostin:
hw/ppc/e500: fix broken snapshot replay
20 af03aeb631ee Richard Henderson:
target/ppc: Flush inputs to zero with NJ in ppc_store_vscr
21 718209358f2e Nicholas Piggin:
target/ppc: Fix LQ, STQ register-pair order for big-endian
22 c3461c6264a7 Niklas Cassel:
hw/ide/core: set ERR_STAT in unsupported command completion
23 2967dc8209dd Niklas Cassel:
hw/ide/ahci: write D2H FIS when processing NCQ command
24 e2a5d9b3d9c3 Niklas Cassel:
hw/ide/ahci: simplify and document PxCI handling
25 d73b84d0b664 Niklas Cassel:
hw/ide/ahci: PxSACT and PxCI is cleared when PxCMD.ST is cleared
26 1a16ce64fda1 Niklas Cassel:
hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set
27 7e85cb0db4c6 Niklas Cassel:
hw/ide/ahci: fix ahci_write_fis_sdb()
28 9f8942353765 Niklas Cassel:
hw/ide/ahci: fix broken SError handling
29 97b8aa5ae9ff Hang Yu:
hw/i2c/aspeed: Fix Tx count and Rx size error in buffer pool mode
30 961faf3ddbd8 Hang Yu:
hw/i2c/aspeed: Fix TXBUF transmission start position error
31 bcd8e243083c Thomas Huth:
qemu-options.hx: Rephrase the descriptions of the -hd* and -cdrom options
32 b21a6e31a182 Markus Armbruster:
docs tests: Fix use of migrate_set_parameter
33 90a0778421ac Thomas Huth:
hw/net/vmxnet3: Fix guest-triggerable assert()
34 95bef686e490 Marc-André Lureau:
qxl: don't assert() if device isn't yet initialized
^ permalink raw reply [flat|nested] 41+ messages in thread
* [Stable-8.1.1 01/34] target/s390x: Fix the "ignored match" case in VSTRS
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
@ 2023-09-09 10:26 ` Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 02/34] target/s390x: Use a 16-bit immediate in VREP Michael Tokarev
` (32 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:26 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Ilya Leoshkevich, Claudio Fontana, David Hildenbrand,
Thomas Huth, Michael Tokarev
From: Ilya Leoshkevich <iii@linux.ibm.com>
Currently the emulation of VSTRS recognizes partial matches in presence
of \0 in the haystack, which, according to PoP, is not correct:
If the ZS flag is one and a zero byte was detected
in the second operand, then there can not be a
partial match ...
Add a check for this. While at it, fold a number of explicitly handled
special cases into the generic logic.
Cc: qemu-stable@nongnu.org
Reported-by: Claudio Fontana <cfontana@suse.de>
Closes: https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg00633.html
Fixes: 1d706f314191 ("target/s390x: vxeh2: vector string search")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230804233748.218935-3-iii@linux.ibm.com>
Tested-by: Claudio Fontana <cfontana@suse.de>
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 791b2b6a930273db694b9ba48bbb406e78715927)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/s390x/tcg/vec_string_helper.c b/target/s390x/tcg/vec_string_helper.c
index 9b85becdfb..a19f429768 100644
--- a/target/s390x/tcg/vec_string_helper.c
+++ b/target/s390x/tcg/vec_string_helper.c
@@ -474,9 +474,9 @@ DEF_VSTRC_CC_RT_HELPER(32)
static int vstrs(S390Vector *v1, const S390Vector *v2, const S390Vector *v3,
const S390Vector *v4, uint8_t es, bool zs)
{
- int substr_elen, substr_0, str_elen, i, j, k, cc;
+ int substr_elen, i, j, k, cc;
int nelem = 16 >> es;
- bool eos = false;
+ int str_leftmost_0;
substr_elen = s390_vec_read_element8(v4, 7) >> es;
@@ -498,47 +498,20 @@ static int vstrs(S390Vector *v1, const S390Vector *v2, const S390Vector *v3,
}
/* If ZS, look for eos in the searched string. */
+ str_leftmost_0 = nelem;
if (zs) {
for (k = 0; k < nelem; k++) {
if (s390_vec_read_element(v2, k, es) == 0) {
- eos = true;
+ str_leftmost_0 = k;
break;
}
}
- str_elen = k;
- } else {
- str_elen = nelem;
}
- substr_0 = s390_vec_read_element(v3, 0, es);
-
- for (k = 0; ; k++) {
- for (; k < str_elen; k++) {
- if (s390_vec_read_element(v2, k, es) == substr_0) {
- break;
- }
- }
-
- /* If we reached the end of the string, no match. */
- if (k == str_elen) {
- cc = eos; /* no match (with or without zero char) */
- goto done;
- }
-
- /* If the substring is only one char, match. */
- if (substr_elen == 1) {
- cc = 2; /* full match */
- goto done;
- }
-
- /* If the match begins at the last char, we have a partial match. */
- if (k == str_elen - 1) {
- cc = 3; /* partial match */
- goto done;
- }
-
+ cc = str_leftmost_0 == nelem ? 0 : 1; /* No match. */
+ for (k = 0; k < nelem; k++) {
i = MIN(nelem, k + substr_elen);
- for (j = k + 1; j < i; j++) {
+ for (j = k; j < i; j++) {
uint32_t e2 = s390_vec_read_element(v2, j, es);
uint32_t e3 = s390_vec_read_element(v3, j - k, es);
if (e2 != e3) {
@@ -546,9 +519,16 @@ static int vstrs(S390Vector *v1, const S390Vector *v2, const S390Vector *v3,
}
}
if (j == i) {
- /* Matched up until "end". */
- cc = i - k == substr_elen ? 2 : 3; /* full or partial match */
- goto done;
+ /* All elements matched. */
+ if (k > str_leftmost_0) {
+ cc = 1; /* Ignored match. */
+ k = nelem;
+ } else if (i - k == substr_elen) {
+ cc = 2; /* Full match. */
+ } else {
+ cc = 3; /* Partial match. */
+ }
+ break;
}
}
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 02/34] target/s390x: Use a 16-bit immediate in VREP
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 01/34] target/s390x: Fix the "ignored match" case in VSTRS Michael Tokarev
@ 2023-09-09 10:26 ` Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 03/34] target/s390x: Fix VSTL with a large length Michael Tokarev
` (31 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:26 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Ilya Leoshkevich, David Hildenbrand, Thomas Huth,
Michael Tokarev
From: Ilya Leoshkevich <iii@linux.ibm.com>
Unlike most other instructions that contain an immediate element index,
VREP's one is 16-bit, and not 4-bit. The code uses only 8 bits, so
using, e.g., 0x101 does not lead to a specification exception.
Fix by checking all 16 bits.
Cc: qemu-stable@nongnu.org
Fixes: 28d08731b1d8 ("s390x/tcg: Implement VECTOR REPLICATE")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230807163459.849766-1-iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 23e87d419f347b6b5f4da3bf70d222acc24cdb64)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/s390x/tcg/translate_vx.c.inc b/target/s390x/tcg/translate_vx.c.inc
index f8df121d3d..a6d840d406 100644
--- a/target/s390x/tcg/translate_vx.c.inc
+++ b/target/s390x/tcg/translate_vx.c.inc
@@ -57,7 +57,7 @@
#define FPF_LONG 3
#define FPF_EXT 4
-static inline bool valid_vec_element(uint8_t enr, MemOp es)
+static inline bool valid_vec_element(uint16_t enr, MemOp es)
{
return !(enr & ~(NUM_VEC_ELEMENTS(es) - 1));
}
@@ -964,7 +964,7 @@ static DisasJumpType op_vpdi(DisasContext *s, DisasOps *o)
static DisasJumpType op_vrep(DisasContext *s, DisasOps *o)
{
- const uint8_t enr = get_field(s, i2);
+ const uint16_t enr = get_field(s, i2);
const uint8_t es = get_field(s, m4);
if (es > ES_64 || !valid_vec_element(enr, es)) {
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 03/34] target/s390x: Fix VSTL with a large length
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 01/34] target/s390x: Fix the "ignored match" case in VSTRS Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 02/34] target/s390x: Use a 16-bit immediate in VREP Michael Tokarev
@ 2023-09-09 10:26 ` Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 04/34] target/s390x: Check reserved bits of VFMIN/VFMAX's M5 Michael Tokarev
` (30 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:26 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Ilya Leoshkevich, David Hildenbrand, Thomas Huth,
Michael Tokarev
From: Ilya Leoshkevich <iii@linux.ibm.com>
The length is always truncated to 16 bytes. Do not probe more than
that.
Cc: qemu-stable@nongnu.org
Fixes: 0e0a5b49ad58 ("s390x/tcg: Implement VECTOR STORE WITH LENGTH")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230804235624.263260-1-iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 6db3518ba4fcddd71049718f138552999f0d97b4)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/s390x/tcg/vec_helper.c b/target/s390x/tcg/vec_helper.c
index 48d86722b2..dafc4c3582 100644
--- a/target/s390x/tcg/vec_helper.c
+++ b/target/s390x/tcg/vec_helper.c
@@ -193,7 +193,7 @@ void HELPER(vstl)(CPUS390XState *env, const void *v1, uint64_t addr,
uint64_t bytes)
{
/* Probe write access before actually modifying memory */
- probe_write_access(env, addr, bytes, GETPC());
+ probe_write_access(env, addr, MIN(bytes, 16), GETPC());
if (likely(bytes >= 16)) {
cpu_stq_data_ra(env, addr, s390_vec_read_element64(v1, 0), GETPC());
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 04/34] target/s390x: Check reserved bits of VFMIN/VFMAX's M5
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (2 preceding siblings ...)
2023-09-09 10:26 ` [Stable-8.1.1 03/34] target/s390x: Fix VSTL with a large length Michael Tokarev
@ 2023-09-09 10:26 ` Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 05/34] include/hw/virtio/virtio-gpu: Fix virtio-gpu with blob on big endian hosts Michael Tokarev
` (29 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:26 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Ilya Leoshkevich, David Hildenbrand, Thomas Huth,
Michael Tokarev
From: Ilya Leoshkevich <iii@linux.ibm.com>
VFMIN and VFMAX should raise a specification exceptions when bits 1-3
of M5 are set.
Cc: qemu-stable@nongnu.org
Fixes: da4807527f3b ("s390x/tcg: Implement VECTOR FP (MAXIMUM|MINIMUM)")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20230804234621.252522-1-iii@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit 6a2ea6151835aa4f5fee29382a421c13b0e6619f)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/s390x/tcg/translate_vx.c.inc b/target/s390x/tcg/translate_vx.c.inc
index a6d840d406..ec94d39df0 100644
--- a/target/s390x/tcg/translate_vx.c.inc
+++ b/target/s390x/tcg/translate_vx.c.inc
@@ -3047,7 +3047,7 @@ static DisasJumpType op_vfmax(DisasContext *s, DisasOps *o)
const uint8_t m5 = get_field(s, m5);
gen_helper_gvec_3_ptr *fn;
- if (m6 == 5 || m6 == 6 || m6 == 7 || m6 >= 13) {
+ if (m6 == 5 || m6 == 6 || m6 == 7 || m6 >= 13 || (m5 & 7)) {
gen_program_exception(s, PGM_SPECIFICATION);
return DISAS_NORETURN;
}
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 05/34] include/hw/virtio/virtio-gpu: Fix virtio-gpu with blob on big endian hosts
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (3 preceding siblings ...)
2023-09-09 10:26 ` [Stable-8.1.1 04/34] target/s390x: Check reserved bits of VFMIN/VFMAX's M5 Michael Tokarev
@ 2023-09-09 10:26 ` Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 06/34] kvm: Introduce kvm_arch_get_default_type hook Michael Tokarev
` (28 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:26 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Thomas Huth, Marc-André Lureau, Michael Tokarev
From: Thomas Huth <thuth@redhat.com>
Using "-device virtio-gpu,blob=true" currently does not work on big
endian hosts (like s390x). The guest kernel prints an error message
like:
[drm:virtio_gpu_dequeue_ctrl_func [virtio_gpu]] *ERROR* response 0x1200 (command 0x10c)
and the display stays black. When running QEMU with "-d guest_errors",
it shows an error message like this:
virtio_gpu_create_mapping_iov: nr_entries is too big (83886080 > 16384)
which indicates that this value has not been properly byte-swapped.
And indeed, the virtio_gpu_create_blob_bswap() function (that should
swap the fields in the related structure) fails to swap some of the
entries. After correctly swapping all missing values here, too, the
virtio-gpu device is now also working with blob=true on s390x hosts.
Fixes: e0933d91b1 ("virtio-gpu: Add virtio_gpu_resource_create_blob")
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2230469
Message-Id: <20230815122007.928049-1-thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit d194362910138776e8abd6bb3c9fb3693254e95f)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/include/hw/virtio/virtio-gpu-bswap.h b/include/hw/virtio/virtio-gpu-bswap.h
index 9124108485..637a0585d0 100644
--- a/include/hw/virtio/virtio-gpu-bswap.h
+++ b/include/hw/virtio/virtio-gpu-bswap.h
@@ -63,7 +63,10 @@ virtio_gpu_create_blob_bswap(struct virtio_gpu_resource_create_blob *cblob)
{
virtio_gpu_ctrl_hdr_bswap(&cblob->hdr);
le32_to_cpus(&cblob->resource_id);
+ le32_to_cpus(&cblob->blob_mem);
le32_to_cpus(&cblob->blob_flags);
+ le32_to_cpus(&cblob->nr_entries);
+ le64_to_cpus(&cblob->blob_id);
le64_to_cpus(&cblob->size);
}
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 06/34] kvm: Introduce kvm_arch_get_default_type hook
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (4 preceding siblings ...)
2023-09-09 10:26 ` [Stable-8.1.1 05/34] include/hw/virtio/virtio-gpu: Fix virtio-gpu with blob on big endian hosts Michael Tokarev
@ 2023-09-09 10:26 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 07/34] accel/kvm: Specify default IPA size for arm64 Michael Tokarev
` (27 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:26 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Akihiko Odaki, Peter Maydell,
Philippe Mathieu-Daudé, Michael Tokarev
From: Akihiko Odaki <akihiko.odaki@daynix.com>
kvm_arch_get_default_type() returns the default KVM type. This hook is
particularly useful to derive a KVM type that is valid for "none"
machine model, which is used by libvirt to probe the availability of
KVM.
For MIPS, the existing mips_kvm_type() is reused. This function ensures
the availability of VZ which is mandatory to use KVM on the current
QEMU.
Cc: qemu-stable@nongnu.org
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-id: 20230727073134.134102-2-akihiko.odaki@daynix.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: added doc comment for new function]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 5e0d65909c6f335d578b90491e165440c99adf81)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 7b3da8dc3a..b472301637 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -2458,7 +2458,7 @@ static int kvm_init(MachineState *ms)
KVMState *s;
const KVMCapabilityInfo *missing_cap;
int ret;
- int type = 0;
+ int type;
uint64_t dirty_log_manual_caps;
qemu_mutex_init(&kml_slots_lock);
@@ -2523,6 +2523,8 @@ static int kvm_init(MachineState *ms)
type = mc->kvm_type(ms, kvm_type);
} else if (mc->kvm_type) {
type = mc->kvm_type(ms, NULL);
+ } else {
+ type = kvm_arch_get_default_type(ms);
}
do {
diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c
index 3ad0a223df..b74b358874 100644
--- a/hw/mips/loongson3_virt.c
+++ b/hw/mips/loongson3_virt.c
@@ -29,7 +29,6 @@
#include "qemu/datadir.h"
#include "qapi/error.h"
#include "elf.h"
-#include "kvm_mips.h"
#include "hw/char/serial.h"
#include "hw/intc/loongson_liointc.h"
#include "hw/mips/mips.h"
@@ -612,7 +611,6 @@ static void loongson3v_machine_class_init(ObjectClass *oc, void *data)
mc->max_cpus = LOONGSON_MAX_VCPUS;
mc->default_ram_id = "loongson3.highram";
mc->default_ram_size = 1600 * MiB;
- mc->kvm_type = mips_kvm_type;
mc->minimum_page_bits = 14;
mc->default_nic = "virtio-net-pci";
}
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 115f0cca79..ccaf55caf7 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -369,6 +369,8 @@ int kvm_arch_get_registers(CPUState *cpu);
int kvm_arch_put_registers(CPUState *cpu, int level);
+int kvm_arch_get_default_type(MachineState *ms);
+
int kvm_arch_init(MachineState *ms, KVMState *s);
int kvm_arch_init_vcpu(CPUState *cpu);
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index b4c7654f49..40f577bfd5 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -247,6 +247,11 @@ int kvm_arm_get_max_vm_ipa_size(MachineState *ms, bool *fixed_ipa)
return ret > 0 ? ret : 40;
}
+int kvm_arch_get_default_type(MachineState *ms)
+{
+ return 0;
+}
+
int kvm_arch_init(MachineState *ms, KVMState *s)
{
int ret = 0;
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index ebfaf3d24c..b45ce20fd8 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -2556,6 +2556,11 @@ static void register_smram_listener(Notifier *n, void *unused)
&smram_address_space, 1, "kvm-smram");
}
+int kvm_arch_get_default_type(MachineState *ms)
+{
+ return 0;
+}
+
int kvm_arch_init(MachineState *ms, KVMState *s)
{
uint64_t identity_base = 0xfffbc000;
diff --git a/target/mips/kvm.c b/target/mips/kvm.c
index c14e8f550f..e98aad01bd 100644
--- a/target/mips/kvm.c
+++ b/target/mips/kvm.c
@@ -1266,7 +1266,7 @@ int kvm_arch_msi_data_to_gsi(uint32_t data)
abort();
}
-int mips_kvm_type(MachineState *machine, const char *vm_type)
+int kvm_arch_get_default_type(MachineState *machine)
{
#if defined(KVM_CAP_MIPS_VZ)
int r;
diff --git a/target/mips/kvm_mips.h b/target/mips/kvm_mips.h
index 171d53dbe1..c711269d0a 100644
--- a/target/mips/kvm_mips.h
+++ b/target/mips/kvm_mips.h
@@ -25,13 +25,4 @@ void kvm_mips_reset_vcpu(MIPSCPU *cpu);
int kvm_mips_set_interrupt(MIPSCPU *cpu, int irq, int level);
int kvm_mips_set_ipi_interrupt(MIPSCPU *cpu, int irq, int level);
-#ifdef CONFIG_KVM
-int mips_kvm_type(MachineState *machine, const char *vm_type);
-#else
-static inline int mips_kvm_type(MachineState *machine, const char *vm_type)
-{
- return 0;
-}
-#endif
-
#endif /* KVM_MIPS_H */
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index a8a935e267..dc1182cd37 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -108,6 +108,11 @@ static int kvm_ppc_register_host_cpu_type(void);
static void kvmppc_get_cpu_characteristics(KVMState *s);
static int kvmppc_get_dec_bits(void);
+int kvm_arch_get_default_type(MachineState *ms)
+{
+ return 0;
+}
+
int kvm_arch_init(MachineState *ms, KVMState *s)
{
cap_interrupt_unset = kvm_check_extension(s, KVM_CAP_PPC_UNSET_IRQ);
diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c
index b1fd2233c0..dbcf26f27d 100644
--- a/target/riscv/kvm.c
+++ b/target/riscv/kvm.c
@@ -914,6 +914,11 @@ int kvm_arch_add_msi_route_post(struct kvm_irq_routing_entry *route,
return 0;
}
+int kvm_arch_get_default_type(MachineState *ms)
+{
+ return 0;
+}
+
int kvm_arch_init(MachineState *ms, KVMState *s)
{
return 0;
diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c
index a9e5880349..9117fab6e8 100644
--- a/target/s390x/kvm/kvm.c
+++ b/target/s390x/kvm/kvm.c
@@ -340,6 +340,11 @@ static void ccw_machine_class_foreach(ObjectClass *oc, void *opaque)
mc->default_cpu_type = S390_CPU_TYPE_NAME("host");
}
+int kvm_arch_get_default_type(MachineState *ms)
+{
+ return 0;
+}
+
int kvm_arch_init(MachineState *ms, KVMState *s)
{
object_class_foreach(ccw_machine_class_foreach, TYPE_S390_CCW_MACHINE,
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 07/34] accel/kvm: Specify default IPA size for arm64
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (5 preceding siblings ...)
2023-09-09 10:26 ` [Stable-8.1.1 06/34] kvm: Introduce kvm_arch_get_default_type hook Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 08/34] target/arm: Fix SME ST1Q Michael Tokarev
` (26 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Akihiko Odaki, Peter Maydell, Michael Tokarev
From: Akihiko Odaki <akihiko.odaki@daynix.com>
Before this change, the default KVM type, which is used for non-virt
machine models, was 0.
The kernel documentation says:
> On arm64, the physical address size for a VM (IPA Size limit) is
> limited to 40bits by default. The limit can be configured if the host
> supports the extension KVM_CAP_ARM_VM_IPA_SIZE. When supported, use
> KVM_VM_TYPE_ARM_IPA_SIZE(IPA_Bits) to set the size in the machine type
> identifier, where IPA_Bits is the maximum width of any physical
> address used by the VM. The IPA_Bits is encoded in bits[7-0] of the
> machine type identifier.
>
> e.g, to configure a guest to use 48bit physical address size::
>
> vm_fd = ioctl(dev_fd, KVM_CREATE_VM, KVM_VM_TYPE_ARM_IPA_SIZE(48));
>
> The requested size (IPA_Bits) must be:
>
> == =========================================================
> 0 Implies default size, 40bits (for backward compatibility)
> N Implies N bits, where N is a positive integer such that,
> 32 <= N <= Host_IPA_Limit
> == =========================================================
> Host_IPA_Limit is the maximum possible value for IPA_Bits on the host
> and is dependent on the CPU capability and the kernel configuration.
> The limit can be retrieved using KVM_CAP_ARM_VM_IPA_SIZE of the
> KVM_CHECK_EXTENSION ioctl() at run-time.
>
> Creation of the VM will fail if the requested IPA size (whether it is
> implicit or explicit) is unsupported on the host.
https://docs.kernel.org/virt/kvm/api.html#kvm-create-vm
So if Host_IPA_Limit < 40, specifying 0 as the type will fail. This
actually confused libvirt, which uses "none" machine model to probe the
KVM availability, on M2 MacBook Air.
Fix this by using Host_IPA_Limit as the default type when
KVM_CAP_ARM_VM_IPA_SIZE is available.
Cc: qemu-stable@nongnu.org
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-id: 20230727073134.134102-3-akihiko.odaki@daynix.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 1ab445af8cd99343f29032b5944023ad7d8edebf)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 40f577bfd5..23aeb09949 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -249,7 +249,9 @@ int kvm_arm_get_max_vm_ipa_size(MachineState *ms, bool *fixed_ipa)
int kvm_arch_get_default_type(MachineState *ms)
{
- return 0;
+ bool fixed_ipa;
+ int size = kvm_arm_get_max_vm_ipa_size(ms, &fixed_ipa);
+ return fixed_ipa ? 0 : size;
}
int kvm_arch_init(MachineState *ms, KVMState *s)
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 08/34] target/arm: Fix SME ST1Q
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (6 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 07/34] accel/kvm: Specify default IPA size for arm64 Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 09/34] target/arm: Fix 64-bit SSRA Michael Tokarev
` (25 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Richard Henderson, Philippe Mathieu-Daudé,
Peter Maydell, Michael Tokarev
From: Richard Henderson <richard.henderson@linaro.org>
A typo, noted in the bug report, resulting in an
incorrect write offset.
Cc: qemu-stable@nongnu.org
Fixes: 7390e0e9ab8 ("target/arm: Implement SME LD1, ST1")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1833
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230818214255.146905-1-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 4b3520fd93cd49cc56dfcab45d90735cc2e35af7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/arm/tcg/sme_helper.c b/target/arm/tcg/sme_helper.c
index 1e67fcac30..296826ffe6 100644
--- a/target/arm/tcg/sme_helper.c
+++ b/target/arm/tcg/sme_helper.c
@@ -379,7 +379,7 @@ static inline void HNAME##_host(void *za, intptr_t off, void *host) \
{ \
uint64_t *ptr = za + off; \
HOST(host, ptr[BE]); \
- HOST(host + 1, ptr[!BE]); \
+ HOST(host + 8, ptr[!BE]); \
} \
static inline void VNAME##_v_host(void *za, intptr_t off, void *host) \
{ \
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 09/34] target/arm: Fix 64-bit SSRA
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (7 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 08/34] target/arm: Fix SME ST1Q Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 10/34] docs/about/license: Update LICENSE URL Michael Tokarev
` (24 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Richard Henderson, Philippe Mathieu-Daudé,
Peter Maydell, Michael Tokarev
From: Richard Henderson <richard.henderson@linaro.org>
Typo applied byte-wise shift instead of double-word shift.
Cc: qemu-stable@nongnu.org
Fixes: 631e565450c ("target/arm: Create gen_gvec_[us]sra")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1737
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230821022025.397682-1-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit cd1e4db73646006039f25879af3bff55b2295ff3)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c
index b71ac2d0d5..39541ecdf0 100644
--- a/target/arm/tcg/translate.c
+++ b/target/arm/tcg/translate.c
@@ -3053,7 +3053,7 @@ void gen_gvec_ssra(unsigned vece, uint32_t rd_ofs, uint32_t rm_ofs,
.vece = MO_32 },
{ .fni8 = gen_ssra64_i64,
.fniv = gen_ssra_vec,
- .fno = gen_helper_gvec_ssra_b,
+ .fno = gen_helper_gvec_ssra_d,
.prefer_i64 = TCG_TARGET_REG_BITS == 64,
.opt_opc = vecop_list,
.load_dest = true,
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 10/34] docs/about/license: Update LICENSE URL
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (8 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 09/34] target/arm: Fix 64-bit SSRA Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section Michael Tokarev
` (23 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Philippe Mathieu-Daudé,
Daniel P . Berrangé, Thomas Huth, Stefan Hajnoczi,
Michael Tokarev
From: Philippe Mathieu-Daudé <philmd@linaro.org>
In early 2021 (see commit 2ad784339e "docs: update README to use
GitLab repo URLs") almost all of the code base was converted to
point to GitLab instead of git.qemu.org. During 2023, git.qemu.org
switched from a git mirror to a http redirect to GitLab (see [1]).
Update the LICENSE URL to match its previous content, displaying
the file raw content similarly to gitweb 'blob_plain' format ([2]).
[1] https://lore.kernel.org/qemu-devel/CABgObfZu3mFc8tM20K-yXdt7F-7eV-uKZN4sKDarSeu7DYoRbA@mail.gmail.com/
[2] https://git-scm.com/docs/gitweb#Documentation/gitweb.txt-blobplain
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20230822125716.55295-1-philmd@linaro.org>
(cherry picked from commit 09a3fffae00b042bed8ad9c351b1a58c505fde37)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/docs/about/license.rst b/docs/about/license.rst
index cde3d2d25d..303c55d61b 100644
--- a/docs/about/license.rst
+++ b/docs/about/license.rst
@@ -8,4 +8,4 @@ QEMU is a trademark of Fabrice Bellard.
QEMU is released under the `GNU General Public
License <https://www.gnu.org/licenses/gpl-2.0.txt>`__, version 2. Parts
of QEMU have specific licenses, see file
-`LICENSE <https://git.qemu.org/?p=qemu.git;a=blob_plain;f=LICENSE>`__.
+`LICENSE <https://gitlab.com/qemu-project/qemu/-/raw/master/LICENSE>`__.
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (9 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 10/34] docs/about/license: Update LICENSE URL Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-18 9:19 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 12/34] softmmu: Use async_run_on_cpu in tcg_commit Michael Tokarev
` (22 subsequent siblings)
33 siblings, 1 reply; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Richard Henderson, Alex Bennée, Michael Tokarev
From: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit 86e4f93d827d3c1efd00cd8a906e38a2c0f2b5bc)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 3df73542e1..7597dc1c39 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -2413,9 +2413,15 @@ MemoryRegionSection *iotlb_to_section(CPUState *cpu,
int asidx = cpu_asidx_from_attrs(cpu, attrs);
CPUAddressSpace *cpuas = &cpu->cpu_ases[asidx];
AddressSpaceDispatch *d = qatomic_rcu_read(&cpuas->memory_dispatch);
- MemoryRegionSection *sections = d->map.sections;
+ int section_index = index & ~TARGET_PAGE_MASK;
+ MemoryRegionSection *ret;
+
+ assert(section_index < d->map.sections_nb);
+ ret = d->map.sections + section_index;
+ assert(ret->mr);
+ assert(ret->mr->ops);
- return §ions[index & ~TARGET_PAGE_MASK];
+ return ret;
}
static void io_mem_init(void)
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 12/34] softmmu: Use async_run_on_cpu in tcg_commit
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (10 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 13/34] block-migration: Ensure we don't crash during migration cleanup Michael Tokarev
` (21 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Richard Henderson, Alex Bennée, Michael Tokarev
From: Richard Henderson <richard.henderson@linaro.org>
After system startup, run the update to memory_dispatch
and the tlb_flush on the cpu. This eliminates a race,
wherein a running cpu sees the memory_dispatch change
but has not yet seen the tlb_flush.
Since the update now happens on the cpu, we need not use
qatomic_rcu_read to protect the read of memory_dispatch.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1826
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1834
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1846
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit 0d58c660689f6da1e3feff8a997014003d928b3b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/accel/tcg/cpu-exec-common.c b/accel/tcg/cpu-exec-common.c
index 9a5fabf625..7e35d7f4b5 100644
--- a/accel/tcg/cpu-exec-common.c
+++ b/accel/tcg/cpu-exec-common.c
@@ -33,36 +33,6 @@ void cpu_loop_exit_noexc(CPUState *cpu)
cpu_loop_exit(cpu);
}
-#if defined(CONFIG_SOFTMMU)
-void cpu_reloading_memory_map(void)
-{
- if (qemu_in_vcpu_thread() && current_cpu->running) {
- /* The guest can in theory prolong the RCU critical section as long
- * as it feels like. The major problem with this is that because it
- * can do multiple reconfigurations of the memory map within the
- * critical section, we could potentially accumulate an unbounded
- * collection of memory data structures awaiting reclamation.
- *
- * Because the only thing we're currently protecting with RCU is the
- * memory data structures, it's sufficient to break the critical section
- * in this callback, which we know will get called every time the
- * memory map is rearranged.
- *
- * (If we add anything else in the system that uses RCU to protect
- * its data structures, we will need to implement some other mechanism
- * to force TCG CPUs to exit the critical section, at which point this
- * part of this callback might become unnecessary.)
- *
- * This pair matches cpu_exec's rcu_read_lock()/rcu_read_unlock(), which
- * only protects cpu->as->dispatch. Since we know our caller is about
- * to reload it, it's safe to split the critical section.
- */
- rcu_read_unlock();
- rcu_read_lock();
- }
-}
-#endif
-
void cpu_loop_exit(CPUState *cpu)
{
/* Undo the setting in cpu_tb_exec. */
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index 87dc9a752c..41788c0bdd 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -133,7 +133,6 @@ static inline void cpu_physical_memory_write(hwaddr addr,
{
cpu_physical_memory_rw(addr, (void *)buf, len, true);
}
-void cpu_reloading_memory_map(void);
void *cpu_physical_memory_map(hwaddr addr,
hwaddr *plen,
bool is_write);
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 7597dc1c39..18277ddd67 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -680,8 +680,7 @@ address_space_translate_for_iotlb(CPUState *cpu, int asidx, hwaddr orig_addr,
IOMMUTLBEntry iotlb;
int iommu_idx;
hwaddr addr = orig_addr;
- AddressSpaceDispatch *d =
- qatomic_rcu_read(&cpu->cpu_ases[asidx].memory_dispatch);
+ AddressSpaceDispatch *d = cpu->cpu_ases[asidx].memory_dispatch;
for (;;) {
section = address_space_translate_internal(d, addr, &addr, plen, false);
@@ -2412,7 +2411,7 @@ MemoryRegionSection *iotlb_to_section(CPUState *cpu,
{
int asidx = cpu_asidx_from_attrs(cpu, attrs);
CPUAddressSpace *cpuas = &cpu->cpu_ases[asidx];
- AddressSpaceDispatch *d = qatomic_rcu_read(&cpuas->memory_dispatch);
+ AddressSpaceDispatch *d = cpuas->memory_dispatch;
int section_index = index & ~TARGET_PAGE_MASK;
MemoryRegionSection *ret;
@@ -2487,23 +2486,42 @@ static void tcg_log_global_after_sync(MemoryListener *listener)
}
}
+static void tcg_commit_cpu(CPUState *cpu, run_on_cpu_data data)
+{
+ CPUAddressSpace *cpuas = data.host_ptr;
+
+ cpuas->memory_dispatch = address_space_to_dispatch(cpuas->as);
+ tlb_flush(cpu);
+}
+
static void tcg_commit(MemoryListener *listener)
{
CPUAddressSpace *cpuas;
- AddressSpaceDispatch *d;
+ CPUState *cpu;
assert(tcg_enabled());
/* since each CPU stores ram addresses in its TLB cache, we must
reset the modified entries */
cpuas = container_of(listener, CPUAddressSpace, tcg_as_listener);
- cpu_reloading_memory_map();
- /* The CPU and TLB are protected by the iothread lock.
- * We reload the dispatch pointer now because cpu_reloading_memory_map()
- * may have split the RCU critical section.
+ cpu = cpuas->cpu;
+
+ /*
+ * Defer changes to as->memory_dispatch until the cpu is quiescent.
+ * Otherwise we race between (1) other cpu threads and (2) ongoing
+ * i/o for the current cpu thread, with data cached by mmu_lookup().
+ *
+ * In addition, queueing the work function will kick the cpu back to
+ * the main loop, which will end the RCU critical section and reclaim
+ * the memory data structures.
+ *
+ * That said, the listener is also called during realize, before
+ * all of the tcg machinery for run-on is initialized: thus halt_cond.
*/
- d = address_space_to_dispatch(cpuas->as);
- qatomic_rcu_set(&cpuas->memory_dispatch, d);
- tlb_flush(cpuas->cpu);
+ if (cpu->halt_cond) {
+ async_run_on_cpu(cpu, tcg_commit_cpu, RUN_ON_CPU_HOST_PTR(cpuas));
+ } else {
+ tcg_commit_cpu(cpu, RUN_ON_CPU_HOST_PTR(cpuas));
+ }
}
static void memory_map_init(void)
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 13/34] block-migration: Ensure we don't crash during migration cleanup
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (11 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 12/34] softmmu: Use async_run_on_cpu in tcg_commit Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 14/34] target/arm: properly document FEAT_CRC32 Michael Tokarev
` (20 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Fabiano Rosas, Stefan Hajnoczi, Michael Tokarev
From: Fabiano Rosas <farosas@suse.de>
We can fail the blk_insert_bs() at init_blk_migration(), leaving the
BlkMigDevState without a dirty_bitmap and BlockDriverState. Account
for the possibly missing elements when doing cleanup.
Fix the following crashes:
Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
0x0000555555ec83ef in bdrv_release_dirty_bitmap (bitmap=0x0) at ../block/dirty-bitmap.c:359
359 BlockDriverState *bs = bitmap->bs;
#0 0x0000555555ec83ef in bdrv_release_dirty_bitmap (bitmap=0x0) at ../block/dirty-bitmap.c:359
#1 0x0000555555bba331 in unset_dirty_tracking () at ../migration/block.c:371
#2 0x0000555555bbad98 in block_migration_cleanup_bmds () at ../migration/block.c:681
Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
0x0000555555e971ff in bdrv_op_unblock (bs=0x0, op=BLOCK_OP_TYPE_BACKUP_SOURCE, reason=0x0) at ../block.c:7073
7073 QLIST_FOREACH_SAFE(blocker, &bs->op_blockers[op], list, next) {
#0 0x0000555555e971ff in bdrv_op_unblock (bs=0x0, op=BLOCK_OP_TYPE_BACKUP_SOURCE, reason=0x0) at ../block.c:7073
#1 0x0000555555e9734a in bdrv_op_unblock_all (bs=0x0, reason=0x0) at ../block.c:7095
#2 0x0000555555bbae13 in block_migration_cleanup_bmds () at ../migration/block.c:690
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Message-id: 20230731203338.27581-1-farosas@suse.de
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit f187609f27b261702a17f79d20bf252ee0d4f9cd)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/migration/block.c b/migration/block.c
index b9580a6c7e..86c2256a2b 100644
--- a/migration/block.c
+++ b/migration/block.c
@@ -368,7 +368,9 @@ static void unset_dirty_tracking(void)
BlkMigDevState *bmds;
QSIMPLEQ_FOREACH(bmds, &block_mig_state.bmds_list, entry) {
- bdrv_release_dirty_bitmap(bmds->dirty_bitmap);
+ if (bmds->dirty_bitmap) {
+ bdrv_release_dirty_bitmap(bmds->dirty_bitmap);
+ }
}
}
@@ -676,13 +678,18 @@ static int64_t get_remaining_dirty(void)
static void block_migration_cleanup_bmds(void)
{
BlkMigDevState *bmds;
+ BlockDriverState *bs;
AioContext *ctx;
unset_dirty_tracking();
while ((bmds = QSIMPLEQ_FIRST(&block_mig_state.bmds_list)) != NULL) {
QSIMPLEQ_REMOVE_HEAD(&block_mig_state.bmds_list, entry);
- bdrv_op_unblock_all(blk_bs(bmds->blk), bmds->blocker);
+
+ bs = blk_bs(bmds->blk);
+ if (bs) {
+ bdrv_op_unblock_all(bs, bmds->blocker);
+ }
error_free(bmds->blocker);
/* Save ctx, because bmds->blk can disappear during blk_unref. */
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 14/34] target/arm: properly document FEAT_CRC32
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (12 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 13/34] block-migration: Ensure we don't crash during migration cleanup Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 15/34] linux-user: Adjust brk for load_bias Michael Tokarev
` (19 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Alex Bennée, Philippe Mathieu-Daudé,
Peter Maydell, Michael Tokarev
From: Alex Bennée <alex.bennee@linaro.org>
This is a mandatory feature for Armv8.1 architectures but we don't
state the feature clearly in our emulation list. Also include
FEAT_CRC32 comment in aarch64_max_tcg_initfn for ease of grepping.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20230824075406.1515566-1-alex.bennee@linaro.org
Cc: qemu-stable@nongnu.org
Message-Id: <20230222110104.3996971-1-alex.bennee@linaro.org>
[PMM: pluralize 'instructions' in docs]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 9e771a2fc68d98c5719b877e008d1dca64e6896e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst
index bdafc68819..d47b78eca9 100644
--- a/docs/system/arm/emulation.rst
+++ b/docs/system/arm/emulation.rst
@@ -14,6 +14,7 @@ the following architecture extensions:
- FEAT_BBM at level 2 (Translation table break-before-make levels)
- FEAT_BF16 (AArch64 BFloat16 instructions)
- FEAT_BTI (Branch Target Identification)
+- FEAT_CRC32 (CRC32 instructions)
- FEAT_CSV2 (Cache speculation variant 2)
- FEAT_CSV2_1p1 (Cache speculation variant 2, version 1.1)
- FEAT_CSV2_1p2 (Cache speculation variant 2, version 1.2)
diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c
index 8019f00bc3..1975253dea 100644
--- a/target/arm/tcg/cpu64.c
+++ b/target/arm/tcg/cpu64.c
@@ -743,7 +743,7 @@ void aarch64_max_tcg_initfn(Object *obj)
t = FIELD_DP64(t, ID_AA64ISAR0, AES, 2); /* FEAT_PMULL */
t = FIELD_DP64(t, ID_AA64ISAR0, SHA1, 1); /* FEAT_SHA1 */
t = FIELD_DP64(t, ID_AA64ISAR0, SHA2, 2); /* FEAT_SHA512 */
- t = FIELD_DP64(t, ID_AA64ISAR0, CRC32, 1);
+ t = FIELD_DP64(t, ID_AA64ISAR0, CRC32, 1); /* FEAT_CRC32 */
t = FIELD_DP64(t, ID_AA64ISAR0, ATOMIC, 2); /* FEAT_LSE */
t = FIELD_DP64(t, ID_AA64ISAR0, RDM, 1); /* FEAT_RDM */
t = FIELD_DP64(t, ID_AA64ISAR0, SHA3, 1); /* FEAT_SHA3 */
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 15/34] linux-user: Adjust brk for load_bias
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (13 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 14/34] target/arm: properly document FEAT_CRC32 Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 16/34] target/i386: raise FERR interrupt with iothread locked Michael Tokarev
` (18 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Richard Henderson, Helge Deller, Ilya Leoshkevich,
Philippe Mathieu-Daudé, Michael Tokarev
From: Richard Henderson <richard.henderson@linaro.org>
PIE executables are usually linked at offset 0 and are
relocated somewhere during load. The hiaddr needs to
be adjusted to keep the brk next to the executable.
Cc: qemu-stable@nongnu.org
Fixes: 1f356e8c013 ("linux-user: Adjust initial brk when interpreter is close to executable")
Tested-by: Helge Deller <deller@gmx.de>
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit aec338d63bc28f1f13d5e64c561d7f1dd0e4b07e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index ac03beb01b..a69e7d7eab 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -3204,7 +3204,7 @@ static void load_elf_image(const char *image_name, int image_fd,
info->start_data = -1;
info->end_data = 0;
/* Usual start for brk is after all sections of the main executable. */
- info->brk = TARGET_PAGE_ALIGN(hiaddr);
+ info->brk = TARGET_PAGE_ALIGN(hiaddr + load_bias);
info->elf_flags = ehdr->e_flags;
prot_exec = PROT_EXEC;
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 16/34] target/i386: raise FERR interrupt with iothread locked
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (14 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 15/34] linux-user: Adjust brk for load_bias Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 17/34] ui/dbus: Properly dispose touch/mouse dbus objects Michael Tokarev
` (17 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Paolo Bonzini, Richard Henderson,
Philippe Mathieu-Daudé, Michael Tokarev
From: Paolo Bonzini <pbonzini@redhat.com>
Otherwise tcg_handle_interrupt() triggers an assertion failure:
#5 0x0000555555c97369 in tcg_handle_interrupt (cpu=0x555557434cb0, mask=2) at ../accel/tcg/tcg-accel-ops.c:83
#6 tcg_handle_interrupt (cpu=0x555557434cb0, mask=2) at ../accel/tcg/tcg-accel-ops.c:81
#7 0x0000555555b4d58b in pic_irq_request (opaque=<optimized out>, irq=<optimized out>, level=1) at ../hw/i386/x86.c:555
#8 0x0000555555b4f218 in gsi_handler (opaque=0x5555579423d0, n=13, level=1) at ../hw/i386/x86.c:611
#9 0x00007fffa42bde14 in code_gen_buffer ()
#10 0x0000555555c724bb in cpu_tb_exec (cpu=cpu@entry=0x555557434cb0, itb=<optimized out>, tb_exit=tb_exit@entry=0x7fffe9bfd658) at ../accel/tcg/cpu-exec.c:457
Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1808
Reported-by: NyanCatTW1 <https://gitlab.com/a0939712328>
Co-developed-by: Richard Henderson <richard.henderson@linaro.org>'
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit c1f27a0c6ae4059a1d809e9c2bc4d47b823c32a3)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/i386/tcg/sysemu/fpu_helper.c b/target/i386/tcg/sysemu/fpu_helper.c
index 1c3610da3b..93506cdd94 100644
--- a/target/i386/tcg/sysemu/fpu_helper.c
+++ b/target/i386/tcg/sysemu/fpu_helper.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/main-loop.h"
#include "cpu.h"
#include "hw/irq.h"
@@ -31,7 +32,9 @@ void x86_register_ferr_irq(qemu_irq irq)
void fpu_check_raise_ferr_irq(CPUX86State *env)
{
if (ferr_irq && !(env->hflags2 & HF2_IGNNE_MASK)) {
+ qemu_mutex_lock_iothread();
qemu_irq_raise(ferr_irq);
+ qemu_mutex_unlock_iothread();
return;
}
}
@@ -45,6 +48,9 @@ void cpu_clear_ignne(void)
void cpu_set_ignne(void)
{
CPUX86State *env = &X86_CPU(first_cpu)->env;
+
+ assert(qemu_mutex_iothread_locked());
+
env->hflags2 |= HF2_IGNNE_MASK;
/*
* We get here in response to a write to port F0h. The chipset should
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 90c7b32f36..e0a622941c 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -4619,7 +4619,11 @@ static bool disas_insn(DisasContext *s, CPUState *cpu)
case 0x0a: /* grp d9/2 */
switch (rm) {
case 0: /* fnop */
- /* check exceptions (FreeBSD FPU probe) */
+ /*
+ * check exceptions (FreeBSD FPU probe)
+ * needs to be treated as I/O because of ferr_irq
+ */
+ translator_io_start(&s->base);
gen_helper_fwait(cpu_env);
update_fip = false;
break;
@@ -5548,6 +5552,8 @@ static bool disas_insn(DisasContext *s, CPUState *cpu)
(HF_MP_MASK | HF_TS_MASK)) {
gen_exception(s, EXCP07_PREX);
} else {
+ /* needs to be treated as I/O because of ferr_irq */
+ translator_io_start(&s->base);
gen_helper_fwait(cpu_env);
}
break;
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 17/34] ui/dbus: Properly dispose touch/mouse dbus objects
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (15 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 16/34] target/i386: raise FERR interrupt with iothread locked Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 18/34] ppc/vof: Fix missed fields in VOF cleanup Michael Tokarev
` (16 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Bilal Elmoussaoui, Marc-André Lureau,
Michael Tokarev
From: Bilal Elmoussaoui <belmouss@redhat.com>
Fixes: 142ca628a7 ("ui: add a D-Bus display backend")
Fixes: de9f844ce2 ("ui/dbus: Expose a touch device interface")
Signed-off-by: Bilal Elmoussaoui <belmouss@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230901124507.94087-1-belmouss@redhat.com>
(cherry picked from commit cb6ccdc9ca705cd8c3ef50e51c16a3732c2fa734)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/ui/dbus-console.c b/ui/dbus-console.c
index e19774f985..36f7349585 100644
--- a/ui/dbus-console.c
+++ b/ui/dbus-console.c
@@ -150,6 +150,8 @@ dbus_display_console_dispose(GObject *object)
DBusDisplayConsole *ddc = DBUS_DISPLAY_CONSOLE(object);
unregister_displaychangelistener(&ddc->dcl);
+ g_clear_object(&ddc->iface_touch);
+ g_clear_object(&ddc->iface_mouse);
g_clear_object(&ddc->iface_kbd);
g_clear_object(&ddc->iface);
g_clear_pointer(&ddc->listeners, g_hash_table_unref);
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 18/34] ppc/vof: Fix missed fields in VOF cleanup
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (16 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 17/34] ui/dbus: Properly dispose touch/mouse dbus objects Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 19/34] hw/ppc/e500: fix broken snapshot replay Michael Tokarev
` (15 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Nicholas Piggin, Alexey Kardashevskiy,
Cédric Le Goater, Michael Tokarev
From: Nicholas Piggin <npiggin@gmail.com>
Failing to reset the of_instance_last makes ihandle allocation continue
to increase, which causes record-replay replay fail to match the
recorded trace.
Not resetting claimed_base makes VOF eventually run out of memory after
some resets.
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>
Fixes: fc8c745d501 ("spapr: Implement Open Firmware client interface")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
(cherry picked from commit 7b8589d7ce7e23f26ff53338d575a5cbd7818e28)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c
index 18c3f92317..e3b430a81f 100644
--- a/hw/ppc/vof.c
+++ b/hw/ppc/vof.c
@@ -1024,6 +1024,8 @@ void vof_cleanup(Vof *vof)
}
vof->claimed = NULL;
vof->of_instances = NULL;
+ vof->of_instance_last = 0;
+ vof->claimed_base = 0;
}
void vof_build_dt(void *fdt, Vof *vof)
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 19/34] hw/ppc/e500: fix broken snapshot replay
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (17 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 18/34] ppc/vof: Fix missed fields in VOF cleanup Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 20/34] target/ppc: Flush inputs to zero with NJ in ppc_store_vscr Michael Tokarev
` (14 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Maksim Kostin, Vitaly Cheptsov, Nicholas Piggin,
Cédric Le Goater, Michael Tokarev
From: Maksim Kostin <maksim.kostin@ispras.ru>
ppce500_reset_device_tree is registered for system reset, but after
c4b075318eb1 this function rerandomizes rng-seed via
qemu_guest_getrandom_nofail. And when loading a snapshot, it tries to read
EVENT_RANDOM that doesn't exist, so we have an error:
qemu-system-ppc: Missing random event in the replay log
To fix this, use qemu_register_reset_nosnapshotload instead of
qemu_register_reset.
Reported-by: Vitaly Cheptsov <cheptsov@ispras.ru>
Fixes: c4b075318eb1 ("hw/ppc: pass random seed to fdt ")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1634
Signed-off-by: Maksim Kostin <maksim.kostin@ispras.ru>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
(cherry picked from commit 6ec65b69ba17c954414fa23a397fb8a3fcfb4a43)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 67793a86f1..d5b6820d1d 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -712,7 +712,7 @@ static int ppce500_prep_device_tree(PPCE500MachineState *machine,
p->kernel_base = kernel_base;
p->kernel_size = kernel_size;
- qemu_register_reset(ppce500_reset_device_tree, p);
+ qemu_register_reset_nosnapshotload(ppce500_reset_device_tree, p);
p->notifier.notify = ppce500_init_notify;
qemu_add_machine_init_done_notifier(&p->notifier);
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 20/34] target/ppc: Flush inputs to zero with NJ in ppc_store_vscr
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (18 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 19/34] hw/ppc/e500: fix broken snapshot replay Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 21/34] target/ppc: Fix LQ, STQ register-pair order for big-endian Michael Tokarev
` (13 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Richard Henderson, Nicholas Piggin,
Cédric Le Goater, Michael Tokarev
From: Richard Henderson <richard.henderson@linaro.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1779
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
(cherry picked from commit af03aeb631eeb81a44d2c0ff5b429cd4b5dc2799)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/ppc/cpu.c b/target/ppc/cpu.c
index 424f2e1741..48257f7225 100644
--- a/target/ppc/cpu.c
+++ b/target/ppc/cpu.c
@@ -59,6 +59,7 @@ void ppc_store_vscr(CPUPPCState *env, uint32_t vscr)
env->vscr_sat.u64[0] = vscr & (1u << VSCR_SAT);
env->vscr_sat.u64[1] = 0;
set_flush_to_zero((vscr >> VSCR_NJ) & 1, &env->vec_status);
+ set_flush_inputs_to_zero((vscr >> VSCR_NJ) & 1, &env->vec_status);
}
uint32_t ppc_get_vscr(CPUPPCState *env)
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 21/34] target/ppc: Fix LQ, STQ register-pair order for big-endian
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (19 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 20/34] target/ppc: Flush inputs to zero with NJ in ppc_store_vscr Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 22/34] hw/ide/core: set ERR_STAT in unsupported command completion Michael Tokarev
` (12 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Nicholas Piggin, Ivan Warren, Richard Henderson,
Cédric Le Goater, Michael Tokarev
From: Nicholas Piggin <npiggin@gmail.com>
LQ, STQ have the same register-pair ordering as LQARX/STQARX., which is
the even (lower) register contains the most significant bits. This is
not implemented correctly for big-endian.
do_ldst_quad() has variables low_addr_gpr and high_addr_gpr which is
confusing because they are low and high addresses, whereas LQARX/STQARX.
and most such things use the low and high values for lo/hi variables.
The conversion to native 128-bit memory access functions missed this
strangeness.
Fix this by changing the if condition, and change the variable names to
hi/lo to match convention.
Cc: qemu-stable@nongnu.org
Reported-by: Ivan Warren <ivan@vmfacility.fr>
Fixes: 57b38ffd0c6f ("target/ppc: Use tcg_gen_qemu_{ld,st}_i128 for LQARX, LQ, STQ")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1836
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
(cherry picked from commit 718209358f2e4f231cbacf974c3299c4fe7beb83)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/ppc/translate/fixedpoint-impl.c.inc b/target/ppc/translate/fixedpoint-impl.c.inc
index f47f1a50e8..b423c09c26 100644
--- a/target/ppc/translate/fixedpoint-impl.c.inc
+++ b/target/ppc/translate/fixedpoint-impl.c.inc
@@ -71,7 +71,7 @@ static bool do_ldst_quad(DisasContext *ctx, arg_D *a, bool store, bool prefixed)
{
#if defined(TARGET_PPC64)
TCGv ea;
- TCGv_i64 low_addr_gpr, high_addr_gpr;
+ TCGv_i64 lo, hi;
TCGv_i128 t16;
REQUIRE_INSNS_FLAGS(ctx, 64BX);
@@ -94,21 +94,21 @@ static bool do_ldst_quad(DisasContext *ctx, arg_D *a, bool store, bool prefixed)
gen_set_access_type(ctx, ACCESS_INT);
ea = do_ea_calc(ctx, a->ra, tcg_constant_tl(a->si));
- if (prefixed || !ctx->le_mode) {
- low_addr_gpr = cpu_gpr[a->rt];
- high_addr_gpr = cpu_gpr[a->rt + 1];
+ if (ctx->le_mode && prefixed) {
+ lo = cpu_gpr[a->rt];
+ hi = cpu_gpr[a->rt + 1];
} else {
- low_addr_gpr = cpu_gpr[a->rt + 1];
- high_addr_gpr = cpu_gpr[a->rt];
+ lo = cpu_gpr[a->rt + 1];
+ hi = cpu_gpr[a->rt];
}
t16 = tcg_temp_new_i128();
if (store) {
- tcg_gen_concat_i64_i128(t16, low_addr_gpr, high_addr_gpr);
+ tcg_gen_concat_i64_i128(t16, lo, hi);
tcg_gen_qemu_st_i128(t16, ea, ctx->mem_idx, DEF_MEMOP(MO_128));
} else {
tcg_gen_qemu_ld_i128(t16, ea, ctx->mem_idx, DEF_MEMOP(MO_128));
- tcg_gen_extr_i128_i64(low_addr_gpr, high_addr_gpr, t16);
+ tcg_gen_extr_i128_i64(lo, hi, t16);
}
#else
qemu_build_not_reached();
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 22/34] hw/ide/core: set ERR_STAT in unsupported command completion
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (20 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 21/34] target/ppc: Fix LQ, STQ register-pair order for big-endian Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 23/34] hw/ide/ahci: write D2H FIS when processing NCQ command Michael Tokarev
` (11 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Niklas Cassel, Philippe Mathieu-Daudé,
John Snow, Michael Tokarev
From: Niklas Cassel <niklas.cassel@wdc.com>
Currently, the first time sending an unsupported command
(e.g. READ LOG DMA EXT) will not have ERR_STAT set in the completion.
Sending the unsupported command again, will correctly have ERR_STAT set.
When ide_cmd_permitted() returns false, it calls ide_abort_command().
ide_abort_command() first calls ide_transfer_stop(), which will call
ide_transfer_halt() and ide_cmd_done(), after that ide_abort_command()
sets ERR_STAT in status.
ide_cmd_done() for AHCI will call ahci_write_fis_d2h() which writes the
current status in the FIS, and raises an IRQ. (The status here will not
have ERR_STAT set!).
Thus, we cannot call ide_transfer_stop() before setting ERR_STAT, as
ide_transfer_stop() will result in the FIS being written and an IRQ
being raised.
The reason why it works the second time, is that ERR_STAT will still
be set from the previous command, so when writing the FIS, the
completion will correctly have ERR_STAT set.
Set ERR_STAT before writing the FIS (calling cmd_done), so that we will
raise an error IRQ correctly when receiving an unsupported command.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230609140844.202795-3-nks@flawful.org
Signed-off-by: John Snow <jsnow@redhat.com>
(cherry picked from commit c3461c6264a7c8ca15b117e91fe5da786924a784)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/ide/core.c b/hw/ide/core.c
index de48ff9f86..07971c0218 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -533,9 +533,9 @@ BlockAIOCB *ide_issue_trim(
void ide_abort_command(IDEState *s)
{
- ide_transfer_stop(s);
s->status = READY_STAT | ERR_STAT;
s->error = ABRT_ERR;
+ ide_transfer_stop(s);
}
static void ide_set_retry(IDEState *s)
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 23/34] hw/ide/ahci: write D2H FIS when processing NCQ command
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (21 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 22/34] hw/ide/core: set ERR_STAT in unsupported command completion Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 24/34] hw/ide/ahci: simplify and document PxCI handling Michael Tokarev
` (10 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Niklas Cassel, John Snow, Michael Tokarev
From: Niklas Cassel <niklas.cassel@wdc.com>
The way that BUSY + PxCI is cleared for NCQ (FPDMA QUEUED) commands is
described in SATA 3.5a Gold:
11.15 FPDMA QUEUED command protocol
DFPDMAQ2: ClearInterfaceBsy
"Transmit Register Device to Host FIS with the BSY bit cleared to zero
and the DRQ bit cleared to zero and Interrupt bit cleared to zero to
mark interface ready for the next command."
PxCI is currently cleared by handle_cmd(), but we don't write the D2H
FIS to the FIS Receive Area that actually caused PxCI to be cleared.
Similar to how ahci_pio_transfer() calls ahci_write_fis_pio() with an
additional parameter to write a PIO Setup FIS without raising an IRQ,
add a parameter to ahci_write_fis_d2h() so that ahci_write_fis_d2h()
also can write the FIS to the FIS Receive Area without raising an IRQ.
Change process_ncq_command() to call ahci_write_fis_d2h() without
raising an IRQ (similar to ahci_pio_transfer()), such that the FIS
Receive Area is in sync with the PxTFD shadow register.
E.g. Linux reads status and error fields from the FIS Receive Area
directly, so it is wise to keep the FIS Receive Area and the PxTFD
shadow register in sync.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Message-id: 20230609140844.202795-4-nks@flawful.org
Signed-off-by: John Snow <jsnow@redhat.com>
(cherry picked from commit 2967dc8209dd27b61a6ab7bad78cf7c6ec58ddb4)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 48d550f633..4b272397fd 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -43,7 +43,7 @@
static void check_cmd(AHCIState *s, int port);
static int handle_cmd(AHCIState *s, int port, uint8_t slot);
static void ahci_reset_port(AHCIState *s, int port);
-static bool ahci_write_fis_d2h(AHCIDevice *ad);
+static bool ahci_write_fis_d2h(AHCIDevice *ad, bool d2h_fis_i);
static void ahci_init_d2h(AHCIDevice *ad);
static int ahci_dma_prepare_buf(const IDEDMA *dma, int32_t limit);
static bool ahci_map_clb_address(AHCIDevice *ad);
@@ -618,7 +618,7 @@ static void ahci_init_d2h(AHCIDevice *ad)
return;
}
- if (ahci_write_fis_d2h(ad)) {
+ if (ahci_write_fis_d2h(ad, true)) {
ad->init_d2h_sent = true;
/* We're emulating receiving the first Reg H2D Fis from the device;
* Update the SIG register, but otherwise proceed as normal. */
@@ -850,7 +850,7 @@ static void ahci_write_fis_pio(AHCIDevice *ad, uint16_t len, bool pio_fis_i)
}
}
-static bool ahci_write_fis_d2h(AHCIDevice *ad)
+static bool ahci_write_fis_d2h(AHCIDevice *ad, bool d2h_fis_i)
{
AHCIPortRegs *pr = &ad->port_regs;
uint8_t *d2h_fis;
@@ -864,7 +864,7 @@ static bool ahci_write_fis_d2h(AHCIDevice *ad)
d2h_fis = &ad->res_fis[RES_FIS_RFIS];
d2h_fis[0] = SATA_FIS_TYPE_REGISTER_D2H;
- d2h_fis[1] = (1 << 6); /* interrupt bit */
+ d2h_fis[1] = d2h_fis_i ? (1 << 6) : 0; /* interrupt bit */
d2h_fis[2] = s->status;
d2h_fis[3] = s->error;
@@ -890,7 +890,10 @@ static bool ahci_write_fis_d2h(AHCIDevice *ad)
ahci_trigger_irq(ad->hba, ad, AHCI_PORT_IRQ_BIT_TFES);
}
- ahci_trigger_irq(ad->hba, ad, AHCI_PORT_IRQ_BIT_DHRS);
+ if (d2h_fis_i) {
+ ahci_trigger_irq(ad->hba, ad, AHCI_PORT_IRQ_BIT_DHRS);
+ }
+
return true;
}
@@ -1120,6 +1123,8 @@ static void process_ncq_command(AHCIState *s, int port, const uint8_t *cmd_fis,
return;
}
+ ahci_write_fis_d2h(ad, false);
+
ncq_tfs->used = 1;
ncq_tfs->drive = ad;
ncq_tfs->slot = slot;
@@ -1506,7 +1511,7 @@ static void ahci_cmd_done(const IDEDMA *dma)
}
/* update d2h status */
- ahci_write_fis_d2h(ad);
+ ahci_write_fis_d2h(ad, true);
if (ad->port_regs.cmd_issue && !ad->check_bh) {
ad->check_bh = qemu_bh_new_guarded(ahci_check_cmd_bh, ad,
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 24/34] hw/ide/ahci: simplify and document PxCI handling
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (22 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 23/34] hw/ide/ahci: write D2H FIS when processing NCQ command Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 25/34] hw/ide/ahci: PxSACT and PxCI is cleared when PxCMD.ST is cleared Michael Tokarev
` (9 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Niklas Cassel, John Snow, Michael Tokarev
From: Niklas Cassel <niklas.cassel@wdc.com>
The AHCI spec states that:
For NCQ, PxCI is cleared on command queued successfully.
For non-NCQ, PxCI is cleared on command completed successfully.
(A non-NCQ command that completes with error does not clear PxCI.)
The current QEMU implementation either clears PxCI in check_cmd(),
or in ahci_cmd_done().
check_cmd() will clear PxCI for a command if handle_cmd() returns 0.
handle_cmd() will return -1 if BUSY or DRQ is set.
The QEMU implementation for NCQ commands will currently not set BUSY
or DRQ, so they will always have PxCI cleared by handle_cmd().
ahci_cmd_done() will never even get called for NCQ commands.
Non-NCQ commands are executed by ide_bus_exec_cmd().
Non-NCQ commands in QEMU are implemented either in a sync or in an async
way.
For non-NCQ commands implemented in a sync way, the command handler will
return true, and when ide_bus_exec_cmd() sees that a command handler
returns true, it will call ide_cmd_done() (which will call
ahci_cmd_done()). For a command implemented in a sync way,
ahci_cmd_done() will do nothing (since busy_slot is not set). Instead,
after ide_bus_exec_cmd() has finished, check_cmd() will clear PxCI for
these commands.
For non-NCQ commands implemented in an async way (using either aiocb or
pio_aiocb), the command handler will return false, ide_bus_exec_cmd()
will not call ide_cmd_done(), instead it is expected that the async
callback function will call ide_cmd_done() once the async command is
done. handle_cmd() will set busy_slot, if and only if BUSY or DRQ is
set, and this is checked _after_ ide_bus_exec_cmd() has returned.
handle_cmd() will return -1, so check_cmd() will not clear PxCI.
When the async callback calls ide_cmd_done() (which will call
ahci_cmd_done()), it will see that busy_slot is set, and
ahci_cmd_done() will clear PxCI.
This seems racy, since busy_slot is set _after_ ide_bus_exec_cmd() has
returned. The callback might come before busy_slot gets set. And it is
quite confusing that ahci_cmd_done() will be called for all non-NCQ
commands when the command is done, but will only clear PxCI in certain
cases, even though it will always write a D2H FIS and raise an IRQ.
Even worse, in the case where ahci_cmd_done() does not clear PxCI, it
still raises an IRQ. Host software might thus read an old PxCI value,
since PxCI is cleared (by check_cmd()) after the IRQ has been raised.
Try to simplify this by always setting busy_slot for non-NCQ commands,
such that ahci_cmd_done() will always be responsible for clearing PxCI
for non-NCQ commands.
For NCQ commands, clear PxCI when we receive the D2H FIS, but before
raising the IRQ, see AHCI 1.3.1, section 5.3.8, states RegFIS:Entry and
RegFIS:ClearCI.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Message-id: 20230609140844.202795-5-nks@flawful.org
Signed-off-by: John Snow <jsnow@redhat.com>
(cherry picked from commit e2a5d9b3d9c3d311618160603cc9bc04fbd98796)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 4b272397fd..3deaf01add 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -41,9 +41,10 @@
#include "trace.h"
static void check_cmd(AHCIState *s, int port);
-static int handle_cmd(AHCIState *s, int port, uint8_t slot);
+static void handle_cmd(AHCIState *s, int port, uint8_t slot);
static void ahci_reset_port(AHCIState *s, int port);
static bool ahci_write_fis_d2h(AHCIDevice *ad, bool d2h_fis_i);
+static void ahci_clear_cmd_issue(AHCIDevice *ad, uint8_t slot);
static void ahci_init_d2h(AHCIDevice *ad);
static int ahci_dma_prepare_buf(const IDEDMA *dma, int32_t limit);
static bool ahci_map_clb_address(AHCIDevice *ad);
@@ -591,9 +592,8 @@ static void check_cmd(AHCIState *s, int port)
if ((pr->cmd & PORT_CMD_START) && pr->cmd_issue) {
for (slot = 0; (slot < 32) && pr->cmd_issue; slot++) {
- if ((pr->cmd_issue & (1U << slot)) &&
- !handle_cmd(s, port, slot)) {
- pr->cmd_issue &= ~(1U << slot);
+ if (pr->cmd_issue & (1U << slot)) {
+ handle_cmd(s, port, slot);
}
}
}
@@ -1123,6 +1123,22 @@ static void process_ncq_command(AHCIState *s, int port, const uint8_t *cmd_fis,
return;
}
+ /*
+ * A NCQ command clears the bit in PxCI after the command has been QUEUED
+ * successfully (ERROR not set, BUSY and DRQ cleared).
+ *
+ * For NCQ commands, PxCI will always be cleared here.
+ *
+ * (Once the NCQ command is COMPLETED, the device will send a SDB FIS with
+ * the interrupt bit set, which will clear PxSACT and raise an interrupt.)
+ */
+ ahci_clear_cmd_issue(ad, slot);
+
+ /*
+ * In reality, for NCQ commands, PxCI is cleared after receiving a D2H FIS
+ * without the interrupt bit set, but since ahci_write_fis_d2h() can raise
+ * an IRQ on error, we need to call them in reverse order.
+ */
ahci_write_fis_d2h(ad, false);
ncq_tfs->used = 1;
@@ -1197,6 +1213,7 @@ static void handle_reg_h2d_fis(AHCIState *s, int port,
{
IDEState *ide_state = &s->dev[port].port.ifs[0];
AHCICmdHdr *cmd = get_cmd_header(s, port, slot);
+ AHCIDevice *ad = &s->dev[port];
uint16_t opts = le16_to_cpu(cmd->opts);
if (cmd_fis[1] & 0x0F) {
@@ -1273,11 +1290,19 @@ static void handle_reg_h2d_fis(AHCIState *s, int port,
/* Reset transferred byte counter */
cmd->status = 0;
+ /*
+ * A non-NCQ command clears the bit in PxCI after the command has COMPLETED
+ * successfully (ERROR not set, BUSY and DRQ cleared).
+ *
+ * For non-NCQ commands, PxCI will always be cleared by ahci_cmd_done().
+ */
+ ad->busy_slot = slot;
+
/* We're ready to process the command in FIS byte 2. */
ide_bus_exec_cmd(&s->dev[port].port, cmd_fis[2]);
}
-static int handle_cmd(AHCIState *s, int port, uint8_t slot)
+static void handle_cmd(AHCIState *s, int port, uint8_t slot)
{
IDEState *ide_state;
uint64_t tbl_addr;
@@ -1288,12 +1313,12 @@ static int handle_cmd(AHCIState *s, int port, uint8_t slot)
if (s->dev[port].port.ifs[0].status & (BUSY_STAT|DRQ_STAT)) {
/* Engine currently busy, try again later */
trace_handle_cmd_busy(s, port);
- return -1;
+ return;
}
if (!s->dev[port].lst) {
trace_handle_cmd_nolist(s, port);
- return -1;
+ return;
}
cmd = get_cmd_header(s, port, slot);
/* remember current slot handle for later */
@@ -1303,7 +1328,7 @@ static int handle_cmd(AHCIState *s, int port, uint8_t slot)
ide_state = &s->dev[port].port.ifs[0];
if (!ide_state->blk) {
trace_handle_cmd_badport(s, port);
- return -1;
+ return;
}
tbl_addr = le64_to_cpu(cmd->tbl_addr);
@@ -1312,7 +1337,7 @@ static int handle_cmd(AHCIState *s, int port, uint8_t slot)
DMA_DIRECTION_TO_DEVICE, MEMTXATTRS_UNSPECIFIED);
if (!cmd_fis) {
trace_handle_cmd_badfis(s, port);
- return -1;
+ return;
} else if (cmd_len != 0x80) {
ahci_trigger_irq(s, &s->dev[port], AHCI_PORT_IRQ_BIT_HBFS);
trace_handle_cmd_badmap(s, port, cmd_len);
@@ -1336,15 +1361,6 @@ static int handle_cmd(AHCIState *s, int port, uint8_t slot)
out:
dma_memory_unmap(s->as, cmd_fis, cmd_len, DMA_DIRECTION_TO_DEVICE,
cmd_len);
-
- if (s->dev[port].port.ifs[0].status & (BUSY_STAT|DRQ_STAT)) {
- /* async command, complete later */
- s->dev[port].busy_slot = slot;
- return -1;
- }
-
- /* done handling the command */
- return 0;
}
/* Transfer PIO data between RAM and device */
@@ -1498,6 +1514,16 @@ static int ahci_dma_rw_buf(const IDEDMA *dma, bool is_write)
return 1;
}
+static void ahci_clear_cmd_issue(AHCIDevice *ad, uint8_t slot)
+{
+ IDEState *ide_state = &ad->port.ifs[0];
+
+ if (!(ide_state->status & (BUSY_STAT | DRQ_STAT))) {
+ ad->port_regs.cmd_issue &= ~(1 << slot);
+ }
+}
+
+/* Non-NCQ command is done - This function is never called for NCQ commands. */
static void ahci_cmd_done(const IDEDMA *dma)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
@@ -1506,11 +1532,15 @@ static void ahci_cmd_done(const IDEDMA *dma)
/* no longer busy */
if (ad->busy_slot != -1) {
- ad->port_regs.cmd_issue &= ~(1 << ad->busy_slot);
+ ahci_clear_cmd_issue(ad, ad->busy_slot);
ad->busy_slot = -1;
}
- /* update d2h status */
+ /*
+ * In reality, for non-NCQ commands, PxCI is cleared after receiving a D2H
+ * FIS with the interrupt bit set, but since ahci_write_fis_d2h() will raise
+ * an IRQ, we need to call them in reverse order.
+ */
ahci_write_fis_d2h(ad, true);
if (ad->port_regs.cmd_issue && !ad->check_bh) {
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 25/34] hw/ide/ahci: PxSACT and PxCI is cleared when PxCMD.ST is cleared
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (23 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 24/34] hw/ide/ahci: simplify and document PxCI handling Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 26/34] hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set Michael Tokarev
` (8 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Niklas Cassel, Philippe Mathieu-Daudé,
John Snow, Michael Tokarev
From: Niklas Cassel <niklas.cassel@wdc.com>
According to AHCI 1.3.1 definition of PxSACT:
This field is cleared when PxCMD.ST is written from a '1' to a '0' by
software. This field is not cleared by a COMRESET or a software reset.
According to AHCI 1.3.1 definition of PxCI:
This field is also cleared when PxCMD.ST is written from a '1' to a '0'
by software.
Clearing PxCMD.ST is part of the error recovery procedure, see
AHCI 1.3.1, section "6.2 Error Recovery".
If we don't clear PxCI on error recovery, the previous command will
incorrectly still be marked as pending after error recovery.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230609140844.202795-6-nks@flawful.org
Signed-off-by: John Snow <jsnow@redhat.com>
(cherry picked from commit d73b84d0b664e60fffb66f46e84d0db4a8e1c713)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 3deaf01add..a31e6fa65e 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -329,6 +329,11 @@ static void ahci_port_write(AHCIState *s, int port, int offset, uint32_t val)
ahci_check_irq(s);
break;
case AHCI_PORT_REG_CMD:
+ if ((pr->cmd & PORT_CMD_START) && !(val & PORT_CMD_START)) {
+ pr->scr_act = 0;
+ pr->cmd_issue = 0;
+ }
+
/* Block any Read-only fields from being set;
* including LIST_ON and FIS_ON.
* The spec requires to set ICC bits to zero after the ICC change
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 26/34] hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (24 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 25/34] hw/ide/ahci: PxSACT and PxCI is cleared when PxCMD.ST is cleared Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 27/34] hw/ide/ahci: fix ahci_write_fis_sdb() Michael Tokarev
` (7 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Niklas Cassel, John Snow, Michael Tokarev
From: Niklas Cassel <niklas.cassel@wdc.com>
For NCQ, PxCI is cleared on command queued successfully.
For non-NCQ, PxCI is cleared on command completed successfully.
Successfully means ERR_STAT, BUSY and DRQ are all cleared.
A command that has ERR_STAT set, does not get to clear PxCI.
See AHCI 1.3.1, section 5.3.8, states RegFIS:Entry and RegFIS:ClearCI,
and 5.3.16.5 ERR:FatalTaskfile.
In the case of non-NCQ commands, not clearing PxCI is needed in order
for host software to be able to see which command slot that failed.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Message-id: 20230609140844.202795-7-nks@flawful.org
Signed-off-by: John Snow <jsnow@redhat.com>
(cherry picked from commit 1a16ce64fda11bdf50f0c4ab5d9fdde72c1383a2)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index a31e6fa65e..12aaadc554 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1523,7 +1523,8 @@ static void ahci_clear_cmd_issue(AHCIDevice *ad, uint8_t slot)
{
IDEState *ide_state = &ad->port.ifs[0];
- if (!(ide_state->status & (BUSY_STAT | DRQ_STAT))) {
+ if (!(ide_state->status & ERR_STAT) &&
+ !(ide_state->status & (BUSY_STAT | DRQ_STAT))) {
ad->port_regs.cmd_issue &= ~(1 << slot);
}
}
@@ -1532,6 +1533,7 @@ static void ahci_clear_cmd_issue(AHCIDevice *ad, uint8_t slot)
static void ahci_cmd_done(const IDEDMA *dma)
{
AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma);
+ IDEState *ide_state = &ad->port.ifs[0];
trace_ahci_cmd_done(ad->hba, ad->port_no);
@@ -1548,7 +1550,8 @@ static void ahci_cmd_done(const IDEDMA *dma)
*/
ahci_write_fis_d2h(ad, true);
- if (ad->port_regs.cmd_issue && !ad->check_bh) {
+ if (!(ide_state->status & ERR_STAT) &&
+ ad->port_regs.cmd_issue && !ad->check_bh) {
ad->check_bh = qemu_bh_new_guarded(ahci_check_cmd_bh, ad,
&ad->mem_reentrancy_guard);
qemu_bh_schedule(ad->check_bh);
diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c
index f53f12aa99..a2c94c6e06 100644
--- a/tests/qtest/libqos/ahci.c
+++ b/tests/qtest/libqos/ahci.c
@@ -404,57 +404,110 @@ void ahci_port_clear(AHCIQState *ahci, uint8_t port)
/**
* Check a port for errors.
*/
-void ahci_port_check_error(AHCIQState *ahci, uint8_t port,
- uint32_t imask, uint8_t emask)
+void ahci_port_check_error(AHCIQState *ahci, AHCICommand *cmd)
{
+ uint8_t port = cmd->port;
uint32_t reg;
- /* The upper 9 bits of the IS register all indicate errors. */
- reg = ahci_px_rreg(ahci, port, AHCI_PX_IS);
- reg &= ~imask;
- reg >>= 23;
- g_assert_cmphex(reg, ==, 0);
+ /* If expecting TF error, ensure that TFES is set. */
+ if (cmd->errors) {
+ reg = ahci_px_rreg(ahci, port, AHCI_PX_IS);
+ ASSERT_BIT_SET(reg, AHCI_PX_IS_TFES);
+ } else {
+ /* The upper 9 bits of the IS register all indicate errors. */
+ reg = ahci_px_rreg(ahci, port, AHCI_PX_IS);
+ reg &= ~cmd->interrupts;
+ reg >>= 23;
+ g_assert_cmphex(reg, ==, 0);
+ }
- /* The Sata Error Register should be empty. */
+ /* The Sata Error Register should be empty, even when expecting TF error. */
reg = ahci_px_rreg(ahci, port, AHCI_PX_SERR);
g_assert_cmphex(reg, ==, 0);
+ /* If expecting TF error, and TFES was set, perform error recovery
+ * (see AHCI 1.3 section 6.2.2.1) such that we can send new commands. */
+ if (cmd->errors) {
+ /* This will clear PxCI. */
+ ahci_px_clr(ahci, port, AHCI_PX_CMD, AHCI_PX_CMD_ST);
+
+ /* The port has 500ms to disengage. */
+ usleep(500000);
+ reg = ahci_px_rreg(ahci, port, AHCI_PX_CMD);
+ ASSERT_BIT_CLEAR(reg, AHCI_PX_CMD_CR);
+
+ /* Clear PxIS. */
+ reg = ahci_px_rreg(ahci, port, AHCI_PX_IS);
+ ahci_px_wreg(ahci, port, AHCI_PX_IS, reg);
+
+ /* Check if we need to perform a COMRESET.
+ * Not implemented right now, as there is no reason why our QEMU model
+ * should need a COMRESET when expecting TF error. */
+ reg = ahci_px_rreg(ahci, port, AHCI_PX_TFD);
+ ASSERT_BIT_CLEAR(reg, AHCI_PX_TFD_STS_BSY | AHCI_PX_TFD_STS_DRQ);
+
+ /* Enable issuing new commands. */
+ ahci_px_set(ahci, port, AHCI_PX_CMD, AHCI_PX_CMD_ST);
+ }
+
/* The TFD also has two error sections. */
reg = ahci_px_rreg(ahci, port, AHCI_PX_TFD);
- if (!emask) {
+ if (!cmd->errors) {
ASSERT_BIT_CLEAR(reg, AHCI_PX_TFD_STS_ERR);
} else {
ASSERT_BIT_SET(reg, AHCI_PX_TFD_STS_ERR);
}
- ASSERT_BIT_CLEAR(reg, AHCI_PX_TFD_ERR & (~emask << 8));
- ASSERT_BIT_SET(reg, AHCI_PX_TFD_ERR & (emask << 8));
+ ASSERT_BIT_CLEAR(reg, AHCI_PX_TFD_ERR & (~cmd->errors << 8));
+ ASSERT_BIT_SET(reg, AHCI_PX_TFD_ERR & (cmd->errors << 8));
}
-void ahci_port_check_interrupts(AHCIQState *ahci, uint8_t port,
- uint32_t intr_mask)
+void ahci_port_check_interrupts(AHCIQState *ahci, AHCICommand *cmd)
{
+ uint8_t port = cmd->port;
uint32_t reg;
+ /* If we expect errors, error handling in ahci_port_check_error() will
+ * already have cleared PxIS, so in that case this function cannot verify
+ * and clear expected interrupts. */
+ if (cmd->errors) {
+ return;
+ }
+
/* Check for expected interrupts */
reg = ahci_px_rreg(ahci, port, AHCI_PX_IS);
- ASSERT_BIT_SET(reg, intr_mask);
+ ASSERT_BIT_SET(reg, cmd->interrupts);
/* Clear expected interrupts and assert all interrupts now cleared. */
- ahci_px_wreg(ahci, port, AHCI_PX_IS, intr_mask);
+ ahci_px_wreg(ahci, port, AHCI_PX_IS, cmd->interrupts);
g_assert_cmphex(ahci_px_rreg(ahci, port, AHCI_PX_IS), ==, 0);
}
-void ahci_port_check_nonbusy(AHCIQState *ahci, uint8_t port, uint8_t slot)
+void ahci_port_check_nonbusy(AHCIQState *ahci, AHCICommand *cmd)
{
+ uint8_t slot = cmd->slot;
+ uint8_t port = cmd->port;
uint32_t reg;
- /* Assert that the command slot is no longer busy (NCQ) */
+ /* For NCQ command with error PxSACT bit should still be set.
+ * For NCQ command without error, PxSACT bit should be cleared.
+ * For non-NCQ command, PxSACT bit should always be cleared. */
reg = ahci_px_rreg(ahci, port, AHCI_PX_SACT);
- ASSERT_BIT_CLEAR(reg, (1 << slot));
+ if (cmd->props->ncq && cmd->errors) {
+ ASSERT_BIT_SET(reg, (1 << slot));
+ } else {
+ ASSERT_BIT_CLEAR(reg, (1 << slot));
+ }
- /* Non-NCQ */
+ /* For non-NCQ command with error, PxCI bit should still be set.
+ * For non-NCQ command without error, PxCI bit should be cleared.
+ * For NCQ command without error, PxCI bit should be cleared.
+ * For NCQ command with error, PxCI bit may or may not be cleared. */
reg = ahci_px_rreg(ahci, port, AHCI_PX_CI);
- ASSERT_BIT_CLEAR(reg, (1 << slot));
+ if (!cmd->props->ncq && cmd->errors) {
+ ASSERT_BIT_SET(reg, (1 << slot));
+ } else if (!cmd->errors) {
+ ASSERT_BIT_CLEAR(reg, (1 << slot));
+ }
/* And assert that we are generally not busy. */
reg = ahci_px_rreg(ahci, port, AHCI_PX_TFD);
@@ -1207,9 +1260,10 @@ void ahci_command_wait(AHCIQState *ahci, AHCICommand *cmd)
#define RSET(REG, MASK) (BITSET(ahci_px_rreg(ahci, cmd->port, (REG)), (MASK)))
- while (RSET(AHCI_PX_TFD, AHCI_PX_TFD_STS_BSY) ||
- RSET(AHCI_PX_CI, 1 << cmd->slot) ||
- (cmd->props->ncq && RSET(AHCI_PX_SACT, 1 << cmd->slot))) {
+ while (!RSET(AHCI_PX_TFD, AHCI_PX_TFD_STS_ERR) &&
+ (RSET(AHCI_PX_TFD, AHCI_PX_TFD_STS_BSY) ||
+ RSET(AHCI_PX_CI, 1 << cmd->slot) ||
+ (cmd->props->ncq && RSET(AHCI_PX_SACT, 1 << cmd->slot)))) {
usleep(50);
}
@@ -1226,9 +1280,9 @@ void ahci_command_verify(AHCIQState *ahci, AHCICommand *cmd)
uint8_t slot = cmd->slot;
uint8_t port = cmd->port;
- ahci_port_check_error(ahci, port, cmd->interrupts, cmd->errors);
- ahci_port_check_interrupts(ahci, port, cmd->interrupts);
- ahci_port_check_nonbusy(ahci, port, slot);
+ ahci_port_check_nonbusy(ahci, cmd);
+ ahci_port_check_error(ahci, cmd);
+ ahci_port_check_interrupts(ahci, cmd);
ahci_port_check_cmd_sanity(ahci, cmd);
if (cmd->interrupts & AHCI_PX_IS_DHRS) {
ahci_port_check_d2h_sanity(ahci, port, slot);
diff --git a/tests/qtest/libqos/ahci.h b/tests/qtest/libqos/ahci.h
index 88835b6228..48017864bf 100644
--- a/tests/qtest/libqos/ahci.h
+++ b/tests/qtest/libqos/ahci.h
@@ -590,11 +590,9 @@ void ahci_set_command_header(AHCIQState *ahci, uint8_t port,
void ahci_destroy_command(AHCIQState *ahci, uint8_t port, uint8_t slot);
/* AHCI sanity check routines */
-void ahci_port_check_error(AHCIQState *ahci, uint8_t port,
- uint32_t imask, uint8_t emask);
-void ahci_port_check_interrupts(AHCIQState *ahci, uint8_t port,
- uint32_t intr_mask);
-void ahci_port_check_nonbusy(AHCIQState *ahci, uint8_t port, uint8_t slot);
+void ahci_port_check_error(AHCIQState *ahci, AHCICommand *cmd);
+void ahci_port_check_interrupts(AHCIQState *ahci, AHCICommand *cmd);
+void ahci_port_check_nonbusy(AHCIQState *ahci, AHCICommand *cmd);
void ahci_port_check_d2h_sanity(AHCIQState *ahci, uint8_t port, uint8_t slot);
void ahci_port_check_pio_sanity(AHCIQState *ahci, AHCICommand *cmd);
void ahci_port_check_cmd_sanity(AHCIQState *ahci, AHCICommand *cmd);
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 27/34] hw/ide/ahci: fix ahci_write_fis_sdb()
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (25 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 26/34] hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 28/34] hw/ide/ahci: fix broken SError handling Michael Tokarev
` (6 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Niklas Cassel, Philippe Mathieu-Daudé,
John Snow, Michael Tokarev
From: Niklas Cassel <niklas.cassel@wdc.com>
When there is an error, we need to raise a TFES error irq, see AHCI 1.3.1,
5.3.13.1 SDB:Entry.
If ERR_STAT is set, we jump to state ERR:FatalTaskfile, which will raise
a TFES IRQ unconditionally, regardless if the I bit is set in the FIS or
not.
Thus, we should never raise a normal IRQ after having sent an error IRQ.
It is valid to signal successfully completed commands as finished in the
same SDB FIS that generates the error IRQ. The important thing is that
commands that did not complete successfully (e.g. commands that were
aborted, do not get the finished bit set).
Before this commit, there was never a TFES IRQ raised on NCQ error.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230609140844.202795-8-nks@flawful.org
Signed-off-by: John Snow <jsnow@redhat.com>
(cherry picked from commit 7e85cb0db4c693b4e084a00e66fe73a22ed1688a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index 12aaadc554..ef6c9fc378 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -806,8 +806,14 @@ static void ahci_write_fis_sdb(AHCIState *s, NCQTransferState *ncq_tfs)
pr->scr_act &= ~ad->finished;
ad->finished = 0;
- /* Trigger IRQ if interrupt bit is set (which currently, it always is) */
- if (sdb_fis->flags & 0x40) {
+ /*
+ * TFES IRQ is always raised if ERR_STAT is set, regardless of I bit.
+ * If ERR_STAT is not set, trigger SDBS IRQ if interrupt bit is set
+ * (which currently, it always is).
+ */
+ if (sdb_fis->status & ERR_STAT) {
+ ahci_trigger_irq(s, ad, AHCI_PORT_IRQ_BIT_TFES);
+ } else if (sdb_fis->flags & 0x40) {
ahci_trigger_irq(s, ad, AHCI_PORT_IRQ_BIT_SDBS);
}
}
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 28/34] hw/ide/ahci: fix broken SError handling
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (26 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 27/34] hw/ide/ahci: fix ahci_write_fis_sdb() Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 29/34] hw/i2c/aspeed: Fix Tx count and Rx size error in buffer pool mode Michael Tokarev
` (5 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Niklas Cassel, Philippe Mathieu-Daudé,
John Snow, Michael Tokarev
From: Niklas Cassel <niklas.cassel@wdc.com>
When encountering an NCQ error, you should not write the NCQ tag to the
SError register. This is completely wrong.
The SError register has a clear definition, where each bit represents a
different error, see PxSERR definition in AHCI 1.3.1.
If we write a random value (like the NCQ tag) in SError, e.g. Linux will
read SError, and will trigger arbitrary error handling depending on the
NCQ tag that happened to be executing.
In case of success, ncq_cb() will call ncq_finish().
In case of error, ncq_cb() will call ncq_err() (which will clear
ncq_tfs->used), and then call ncq_finish(), thus using ncq_tfs->used is
sufficient to tell if finished should get set or not.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230609140844.202795-9-nks@flawful.org
Signed-off-by: John Snow <jsnow@redhat.com>
(cherry picked from commit 9f89423537653de07ca40c18b5ff5b70b104cc93)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index ef6c9fc378..d0a774bc17 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1012,7 +1012,6 @@ static void ncq_err(NCQTransferState *ncq_tfs)
ide_state->error = ABRT_ERR;
ide_state->status = READY_STAT | ERR_STAT;
- ncq_tfs->drive->port_regs.scr_err |= (1 << ncq_tfs->tag);
qemu_sglist_destroy(&ncq_tfs->sglist);
ncq_tfs->used = 0;
}
@@ -1022,7 +1021,7 @@ static void ncq_finish(NCQTransferState *ncq_tfs)
/* If we didn't error out, set our finished bit. Errored commands
* do not get a bit set for the SDB FIS ACT register, nor do they
* clear the outstanding bit in scr_act (PxSACT). */
- if (!(ncq_tfs->drive->port_regs.scr_err & (1 << ncq_tfs->tag))) {
+ if (ncq_tfs->used) {
ncq_tfs->drive->finished |= (1 << ncq_tfs->tag);
}
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 29/34] hw/i2c/aspeed: Fix Tx count and Rx size error in buffer pool mode
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (27 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 28/34] hw/ide/ahci: fix broken SError handling Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 30/34] hw/i2c/aspeed: Fix TXBUF transmission start position error Michael Tokarev
` (4 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Hang Yu, Cédric Le Goater, Michael Tokarev
From: Hang Yu <francis_yuu@stu.pku.edu.cn>
Fixed inconsistency between the regisiter bit field definition header file
and the ast2600 datasheet. The reg name is I2CD1C:Pool Buffer Control
Register in old register mode and I2CC0C: Master/Slave Pool Buffer Control
Register in new register mode. They share bit field
[12:8]:Transmit Data Byte Count and bit field
[29:24]:Actual Received Pool Buffer Size according to the datasheet.
According to the ast2600 datasheet,the actual Tx count is
Transmit Data Byte Count plus 1, and the max Rx size is
Receive Pool Buffer Size plus 1, both in Pool Buffer Control Register.
The version before forgot to plus 1, and mistake Rx count for Rx size.
Signed-off-by: Hang Yu <francis_yuu@stu.pku.edu.cn>
Fixes: 3be3d6ccf2ad ("aspeed: i2c: Migrate to registerfields API")
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
(cherry picked from commit 97b8aa5ae9ff197394395eda5062ea3681e09c28)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
index 1f071a3811..e485d8bfb8 100644
--- a/hw/i2c/aspeed_i2c.c
+++ b/hw/i2c/aspeed_i2c.c
@@ -236,7 +236,7 @@ static int aspeed_i2c_bus_send(AspeedI2CBus *bus, uint8_t pool_start)
uint32_t reg_byte_buf = aspeed_i2c_bus_byte_buf_offset(bus);
uint32_t reg_dma_len = aspeed_i2c_bus_dma_len_offset(bus);
int pool_tx_count = SHARED_ARRAY_FIELD_EX32(bus->regs, reg_pool_ctrl,
- TX_COUNT);
+ TX_COUNT) + 1;
if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, TX_BUFF_EN)) {
for (i = pool_start; i < pool_tx_count; i++) {
@@ -293,7 +293,7 @@ static void aspeed_i2c_bus_recv(AspeedI2CBus *bus)
uint32_t reg_dma_len = aspeed_i2c_bus_dma_len_offset(bus);
uint32_t reg_dma_addr = aspeed_i2c_bus_dma_addr_offset(bus);
int pool_rx_count = SHARED_ARRAY_FIELD_EX32(bus->regs, reg_pool_ctrl,
- RX_COUNT);
+ RX_SIZE) + 1;
if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, RX_BUFF_EN)) {
uint8_t *pool_base = aic->bus_pool_base(bus);
@@ -418,7 +418,7 @@ static void aspeed_i2c_bus_cmd_dump(AspeedI2CBus *bus)
uint32_t reg_intr_sts = aspeed_i2c_bus_intr_sts_offset(bus);
uint32_t reg_dma_len = aspeed_i2c_bus_dma_len_offset(bus);
if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, RX_BUFF_EN)) {
- count = SHARED_ARRAY_FIELD_EX32(bus->regs, reg_pool_ctrl, TX_COUNT);
+ count = SHARED_ARRAY_FIELD_EX32(bus->regs, reg_pool_ctrl, TX_COUNT) + 1;
} else if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, RX_DMA_EN)) {
count = bus->regs[reg_dma_len];
} else { /* BYTE mode */
@@ -490,7 +490,7 @@ static void aspeed_i2c_bus_handle_cmd(AspeedI2CBus *bus, uint64_t value)
*/
if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, TX_BUFF_EN)) {
if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_pool_ctrl, TX_COUNT)
- == 1) {
+ == 0) {
SHARED_ARRAY_FIELD_DP32(bus->regs, reg_cmd, M_TX_CMD, 0);
} else {
/*
diff --git a/include/hw/i2c/aspeed_i2c.h b/include/hw/i2c/aspeed_i2c.h
index 51c944efea..2e1e15aaf0 100644
--- a/include/hw/i2c/aspeed_i2c.h
+++ b/include/hw/i2c/aspeed_i2c.h
@@ -139,9 +139,9 @@ REG32(I2CD_CMD, 0x14) /* I2CD Command/Status */
REG32(I2CD_DEV_ADDR, 0x18) /* Slave Device Address */
SHARED_FIELD(SLAVE_DEV_ADDR1, 0, 7)
REG32(I2CD_POOL_CTRL, 0x1C) /* Pool Buffer Control */
- SHARED_FIELD(RX_COUNT, 24, 5)
+ SHARED_FIELD(RX_COUNT, 24, 6)
SHARED_FIELD(RX_SIZE, 16, 5)
- SHARED_FIELD(TX_COUNT, 9, 5)
+ SHARED_FIELD(TX_COUNT, 8, 5)
FIELD(I2CD_POOL_CTRL, OFFSET, 2, 6) /* AST2400 */
REG32(I2CD_BYTE_BUF, 0x20) /* Transmit/Receive Byte Buffer */
SHARED_FIELD(RX_BUF, 8, 8)
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 30/34] hw/i2c/aspeed: Fix TXBUF transmission start position error
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (28 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 29/34] hw/i2c/aspeed: Fix Tx count and Rx size error in buffer pool mode Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 31/34] qemu-options.hx: Rephrase the descriptions of the -hd* and -cdrom options Michael Tokarev
` (3 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Hang Yu, Cédric Le Goater, Michael Tokarev
From: Hang Yu <francis_yuu@stu.pku.edu.cn>
According to the ast2600 datasheet and the linux aspeed i2c driver,
the TXBUF transmission start position should be TXBUF[0] instead
of TXBUF[1],so the arg pool_start is useless,and the address is not
included in TXBUF.So even if Tx Count equals zero,there is at least
1 byte data needs to be transmitted,and M_TX_CMD should not be cleared
at this condition.The driver url is:
https://github.com/AspeedTech-BMC/linux/blob/aspeed-master-v5.15/drivers/i2c/busses/i2c-ast2600.c
Signed-off-by: Hang Yu <francis_yuu@stu.pku.edu.cn>
Fixes: 6054fc73e8f4 ("aspeed/i2c: Add support for pool buffer transfers")
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
(cherry picked from commit 961faf3ddbd8ffcdf776bbcf88af0bc97218114a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
index e485d8bfb8..44905d7899 100644
--- a/hw/i2c/aspeed_i2c.c
+++ b/hw/i2c/aspeed_i2c.c
@@ -226,7 +226,7 @@ static int aspeed_i2c_dma_read(AspeedI2CBus *bus, uint8_t *data)
return 0;
}
-static int aspeed_i2c_bus_send(AspeedI2CBus *bus, uint8_t pool_start)
+static int aspeed_i2c_bus_send(AspeedI2CBus *bus)
{
AspeedI2CClass *aic = ASPEED_I2C_GET_CLASS(bus->controller);
int ret = -1;
@@ -239,7 +239,7 @@ static int aspeed_i2c_bus_send(AspeedI2CBus *bus, uint8_t pool_start)
TX_COUNT) + 1;
if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, TX_BUFF_EN)) {
- for (i = pool_start; i < pool_tx_count; i++) {
+ for (i = 0; i < pool_tx_count; i++) {
uint8_t *pool_base = aic->bus_pool_base(bus);
trace_aspeed_i2c_bus_send("BUF", i + 1, pool_tx_count,
@@ -273,7 +273,7 @@ static int aspeed_i2c_bus_send(AspeedI2CBus *bus, uint8_t pool_start)
}
SHARED_ARRAY_FIELD_DP32(bus->regs, reg_cmd, TX_DMA_EN, 0);
} else {
- trace_aspeed_i2c_bus_send("BYTE", pool_start, 1,
+ trace_aspeed_i2c_bus_send("BYTE", 0, 1,
bus->regs[reg_byte_buf]);
ret = i2c_send(bus->bus, bus->regs[reg_byte_buf]);
}
@@ -446,10 +446,8 @@ static void aspeed_i2c_bus_cmd_dump(AspeedI2CBus *bus)
*/
static void aspeed_i2c_bus_handle_cmd(AspeedI2CBus *bus, uint64_t value)
{
- uint8_t pool_start = 0;
uint32_t reg_intr_sts = aspeed_i2c_bus_intr_sts_offset(bus);
uint32_t reg_cmd = aspeed_i2c_bus_cmd_offset(bus);
- uint32_t reg_pool_ctrl = aspeed_i2c_bus_pool_ctrl_offset(bus);
uint32_t reg_dma_len = aspeed_i2c_bus_dma_len_offset(bus);
if (!aspeed_i2c_check_sram(bus)) {
@@ -483,27 +481,11 @@ static void aspeed_i2c_bus_handle_cmd(AspeedI2CBus *bus, uint64_t value)
SHARED_ARRAY_FIELD_DP32(bus->regs, reg_cmd, M_START_CMD, 0);
- /*
- * The START command is also a TX command, as the slave
- * address is sent on the bus. Drop the TX flag if nothing
- * else needs to be sent in this sequence.
- */
- if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, TX_BUFF_EN)) {
- if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_pool_ctrl, TX_COUNT)
- == 0) {
- SHARED_ARRAY_FIELD_DP32(bus->regs, reg_cmd, M_TX_CMD, 0);
- } else {
- /*
- * Increase the start index in the TX pool buffer to
- * skip the address byte.
- */
- pool_start++;
- }
- } else if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, TX_DMA_EN)) {
+ if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, TX_DMA_EN)) {
if (bus->regs[reg_dma_len] == 0) {
SHARED_ARRAY_FIELD_DP32(bus->regs, reg_cmd, M_TX_CMD, 0);
}
- } else {
+ } else if (!SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, TX_BUFF_EN)) {
SHARED_ARRAY_FIELD_DP32(bus->regs, reg_cmd, M_TX_CMD, 0);
}
@@ -520,7 +502,7 @@ static void aspeed_i2c_bus_handle_cmd(AspeedI2CBus *bus, uint64_t value)
if (SHARED_ARRAY_FIELD_EX32(bus->regs, reg_cmd, M_TX_CMD)) {
aspeed_i2c_set_state(bus, I2CD_MTXD);
- if (aspeed_i2c_bus_send(bus, pool_start)) {
+ if (aspeed_i2c_bus_send(bus)) {
SHARED_ARRAY_FIELD_DP32(bus->regs, reg_intr_sts, TX_NAK, 1);
i2c_end_transfer(bus->bus);
} else {
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 31/34] qemu-options.hx: Rephrase the descriptions of the -hd* and -cdrom options
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (29 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 30/34] hw/i2c/aspeed: Fix TXBUF transmission start position error Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 32/34] docs tests: Fix use of migrate_set_parameter Michael Tokarev
` (2 subsequent siblings)
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Thomas Huth, Alex Bennée, Michael Tokarev
From: Thomas Huth <thuth@redhat.com>
The current description says that these options will create a device
on the IDE bus, which is only true on x86. So rephrase these sentences
a little bit to speak of "default bus" instead.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit bcd8e243083c878884e52d609deddbe6be17c730)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/qemu-options.hx b/qemu-options.hx
index 29b98c3d4c..b56f6b2fb2 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1209,10 +1209,10 @@ SRST
ERST
DEF("hda", HAS_ARG, QEMU_OPTION_hda,
- "-hda/-hdb file use 'file' as IDE hard disk 0/1 image\n", QEMU_ARCH_ALL)
+ "-hda/-hdb file use 'file' as hard disk 0/1 image\n", QEMU_ARCH_ALL)
DEF("hdb", HAS_ARG, QEMU_OPTION_hdb, "", QEMU_ARCH_ALL)
DEF("hdc", HAS_ARG, QEMU_OPTION_hdc,
- "-hdc/-hdd file use 'file' as IDE hard disk 2/3 image\n", QEMU_ARCH_ALL)
+ "-hdc/-hdd file use 'file' as hard disk 2/3 image\n", QEMU_ARCH_ALL)
DEF("hdd", HAS_ARG, QEMU_OPTION_hdd, "", QEMU_ARCH_ALL)
SRST
``-hda file``
@@ -1222,18 +1222,22 @@ SRST
``-hdc file``
\
``-hdd file``
- Use file as hard disk 0, 1, 2 or 3 image (see the :ref:`disk images`
- chapter in the System Emulation Users Guide).
+ Use file as hard disk 0, 1, 2 or 3 image on the default bus of the
+ emulated machine (this is for example the IDE bus on most x86 machines,
+ but it can also be SCSI, virtio or something else on other target
+ architectures). See also the :ref:`disk images` chapter in the System
+ Emulation Users Guide.
ERST
DEF("cdrom", HAS_ARG, QEMU_OPTION_cdrom,
- "-cdrom file use 'file' as IDE cdrom image (cdrom is ide1 master)\n",
+ "-cdrom file use 'file' as CD-ROM image\n",
QEMU_ARCH_ALL)
SRST
``-cdrom file``
- Use file as CD-ROM image (you cannot use ``-hdc`` and ``-cdrom`` at
- the same time). You can use the host CD-ROM by using ``/dev/cdrom``
- as filename.
+ Use file as CD-ROM image on the default bus of the emulated machine
+ (which is IDE1 master on x86, so you cannot use ``-hdc`` and ``-cdrom``
+ at the same time there). On systems that support it, you can use the
+ host CD-ROM by using ``/dev/cdrom`` as filename.
ERST
DEF("blockdev", HAS_ARG, QEMU_OPTION_blockdev,
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 32/34] docs tests: Fix use of migrate_set_parameter
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (30 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 31/34] qemu-options.hx: Rephrase the descriptions of the -hd* and -cdrom options Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 33/34] hw/net/vmxnet3: Fix guest-triggerable assert() Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 34/34] qxl: don't assert() if device isn't yet initialized Michael Tokarev
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Markus Armbruster, Thomas Huth, Michael Tokarev
From: Markus Armbruster <armbru@redhat.com>
docs/multi-thread-compression.txt uses parameter names with
underscores instead of dashes. Wrong since day one.
docs/rdma.txt, tests/qemu-iotests/181, and tests/qtest/test-hmp.c are
wrong the same way since commit cbde7be900d2 (v6.0.0). Hard to see,
as test-hmp doesn't check whether the commands work, and iotest 181
appears to be unaffected.
Fixes: 263170e679df (docs: Add a doc about multiple thread compression)
Fixes: cbde7be900d2 (migrate: remove QMP/HMP commands for speed, downtime and cache size)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit b21a6e31a182a5ae7436a444f840d49aac07c94f)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/docs/multi-thread-compression.txt b/docs/multi-thread-compression.txt
index bb88c6bdf1..95b1556f67 100644
--- a/docs/multi-thread-compression.txt
+++ b/docs/multi-thread-compression.txt
@@ -117,13 +117,13 @@ to support the multiple thread compression migration:
{qemu} migrate_set_capability compress on
3. Set the compression thread count on source:
- {qemu} migrate_set_parameter compress_threads 12
+ {qemu} migrate_set_parameter compress-threads 12
4. Set the compression level on the source:
- {qemu} migrate_set_parameter compress_level 1
+ {qemu} migrate_set_parameter compress-level 1
5. Set the decompression thread count on destination:
- {qemu} migrate_set_parameter decompress_threads 3
+ {qemu} migrate_set_parameter decompress-threads 3
6. Start outgoing migration:
{qemu} migrate -d tcp:destination.host:4444
@@ -133,9 +133,9 @@ to support the multiple thread compression migration:
The following are the default settings:
compress: off
- compress_threads: 8
- decompress_threads: 2
- compress_level: 1 (which means best speed)
+ compress-threads: 8
+ decompress-threads: 2
+ compress-level: 1 (which means best speed)
So, only the first two steps are required to use the multiple
thread compression in migration. You can do more if the default
diff --git a/docs/rdma.txt b/docs/rdma.txt
index 2b4cdea1d8..bd8dd799a9 100644
--- a/docs/rdma.txt
+++ b/docs/rdma.txt
@@ -89,7 +89,7 @@ RUNNING:
First, set the migration speed to match your hardware's capabilities:
QEMU Monitor Command:
-$ migrate_set_parameter max_bandwidth 40g # or whatever is the MAX of your RDMA device
+$ migrate_set_parameter max-bandwidth 40g # or whatever is the MAX of your RDMA device
Next, on the destination machine, add the following to the QEMU command line:
diff --git a/tests/qemu-iotests/181 b/tests/qemu-iotests/181
index cb96d09ae5..dc90a10757 100755
--- a/tests/qemu-iotests/181
+++ b/tests/qemu-iotests/181
@@ -109,7 +109,7 @@ if [ ${QEMU_STATUS[$dest]} -lt 0 ]; then
_notrun 'Postcopy is not supported'
fi
-_send_qemu_cmd $src 'migrate_set_parameter max_bandwidth 4k' "(qemu)"
+_send_qemu_cmd $src 'migrate_set_parameter max-bandwidth 4k' "(qemu)"
_send_qemu_cmd $src 'migrate_set_capability postcopy-ram on' "(qemu)"
_send_qemu_cmd $src "migrate -d unix:${MIG_SOCKET}" "(qemu)"
_send_qemu_cmd $src 'migrate_start_postcopy' "(qemu)"
diff --git a/tests/qtest/test-hmp.c b/tests/qtest/test-hmp.c
index 6704be239b..c0d2d70689 100644
--- a/tests/qtest/test-hmp.c
+++ b/tests/qtest/test-hmp.c
@@ -45,9 +45,9 @@ static const char *hmp_cmds[] = {
"log all",
"log none",
"memsave 0 4096 \"/dev/null\"",
- "migrate_set_parameter xbzrle_cache_size 1",
- "migrate_set_parameter downtime_limit 1",
- "migrate_set_parameter max_bandwidth 1",
+ "migrate_set_parameter xbzrle-cache-size 1",
+ "migrate_set_parameter downtime-limit 1",
+ "migrate_set_parameter max-bandwidth 1",
"netdev_add user,id=net1",
"set_link net1 off",
"set_link net1 on",
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 33/34] hw/net/vmxnet3: Fix guest-triggerable assert()
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (31 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 32/34] docs tests: Fix use of migrate_set_parameter Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 34/34] qxl: don't assert() if device isn't yet initialized Michael Tokarev
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Thomas Huth, Philippe Mathieu-Daudé,
Michael Tokarev
From: Thomas Huth <thuth@redhat.com>
The assert() that checks for valid MTU sizes can be triggered by
the guest (e.g. with the reproducer code from the bug ticket
https://gitlab.com/qemu-project/qemu/-/issues/517 ). Let's avoid
this problem by simply logging the error and refusing to activate
the device instead.
Fixes: d05dcd94ae ("net: vmxnet3: validate configuration values during activate")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
[Mjt: change format specifier from %d to %u for uint32_t argument]
(cherry picked from commit 90a0778421acdf4ca903be64c8ed19378183c944)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 5dfacb1098..3fb108751a 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -1439,7 +1439,10 @@ static void vmxnet3_activate_device(VMXNET3State *s)
vmxnet3_setup_rx_filtering(s);
/* Cache fields from shared memory */
s->mtu = VMXNET3_READ_DRV_SHARED32(d, s->drv_shmem, devRead.misc.mtu);
- assert(VMXNET3_MIN_MTU <= s->mtu && s->mtu <= VMXNET3_MAX_MTU);
+ if (s->mtu < VMXNET3_MIN_MTU || s->mtu > VMXNET3_MAX_MTU) {
+ qemu_log_mask(LOG_GUEST_ERROR, "vmxnet3: Bad MTU size: %u\n", s->mtu);
+ return;
+ }
VMW_CFPRN("MTU is %u", s->mtu);
s->max_rx_frags =
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* [Stable-8.1.1 34/34] qxl: don't assert() if device isn't yet initialized
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
` (32 preceding siblings ...)
2023-09-09 10:27 ` [Stable-8.1.1 33/34] hw/net/vmxnet3: Fix guest-triggerable assert() Michael Tokarev
@ 2023-09-09 10:27 ` Michael Tokarev
33 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-09 10:27 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-stable, Marc-André Lureau, Thomas Huth, Michael Tokarev
From: Marc-André Lureau <marcandre.lureau@redhat.com>
If the PCI BAR isn't yet mapped or was unmapped, QXL_IO_SET_MODE will
assert(). Instead, report a guest bug and keep going.
This can be reproduced with:
cat << EOF | ./qemu-system-x86_64 -vga qxl -m 2048 -nodefaults -qtest stdio
outl 0xcf8 0x8000101c
outl 0xcfc 0xc000
outl 0xcf8 0x80001001
outl 0xcfc 0x01000000
outl 0xc006 0x00
EOF
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1829
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit 95bef686e490bc3afc3f51f5fc6e20bf260b938c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index f1c0eb7dfc..70b73820b2 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -1591,7 +1591,10 @@ static void qxl_set_mode(PCIQXLDevice *d, unsigned int modenr, int loadvm)
}
d->guest_slots[0].slot = slot;
- assert(qxl_add_memslot(d, 0, devmem, QXL_SYNC) == 0);
+ if (qxl_add_memslot(d, 0, devmem, QXL_SYNC) != 0) {
+ qxl_set_guest_bug(d, "device isn't initialized yet");
+ return;
+ }
d->guest_primary.surface = surface;
qxl_create_guest_primary(d, 0, QXL_SYNC);
--
2.39.2
^ permalink raw reply related [flat|nested] 41+ messages in thread
* Re: [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section
2023-09-09 10:27 ` [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section Michael Tokarev
@ 2023-09-18 9:19 ` Michael Tokarev
2023-09-19 7:23 ` Michael Tokarev
2023-09-20 9:23 ` Alex Bennée
0 siblings, 2 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-18 9:19 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Richard Henderson, Alex Bennée
09.09.2023 13:27, Michael Tokarev wrote:
> From: Richard Henderson <richard.henderson@linaro.org>
>
> Acked-by: Alex Bennée <alex.bennee@linaro.org>
> Suggested-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> (cherry picked from commit 86e4f93d827d3c1efd00cd8a906e38a2c0f2b5bc)
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
>
> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
> index 3df73542e1..7597dc1c39 100644
> --- a/softmmu/physmem.c
> +++ b/softmmu/physmem.c
> @@ -2413,9 +2413,15 @@ MemoryRegionSection *iotlb_to_section(CPUState *cpu,
> int asidx = cpu_asidx_from_attrs(cpu, attrs);
> CPUAddressSpace *cpuas = &cpu->cpu_ases[asidx];
> AddressSpaceDispatch *d = qatomic_rcu_read(&cpuas->memory_dispatch);
> - MemoryRegionSection *sections = d->map.sections;
> + int section_index = index & ~TARGET_PAGE_MASK;
> + MemoryRegionSection *ret;
> +
> + assert(section_index < d->map.sections_nb);
This assert now triggers on staging-8.1
https://ci.debian.net/data/autopkgtest/testing/amd64/d/dropbear/37993610/log.gz
https://ci.debian.net/data/autopkgtest/testing/amd64/c/cryptsetup/37993606/log.gz
> + ret = d->map.sections + section_index;
> + assert(ret->mr);
> + assert(ret->mr->ops);
>
> - return §ions[index & ~TARGET_PAGE_MASK];
> + return ret;
> }
>
> static void io_mem_init(void)
In this upload I removed softmmu-Use-async_run_on_cpu-in-tcg_commit.patch (0d58c660689f6da1),
and the test run uses tcg and -smp 4, which is the configuration which 0d58c6606
was supposed to fix.
qemu-system-x86_64 -no-user-config -nodefaults -name autopkgtest-cryptsetup-cryptroot-sysvinit \
-machine type=q35,graphics=off -cpu qemu64,-svm,-vmx -smp cpus=4 -m size=2G \
-vga none -display none -object rng....
I wonder if I should keep 0d58c6606 for 8.1.1 (the deadline is tomorrow)..
Thanks,
/mjt
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section
2023-09-18 9:19 ` Michael Tokarev
@ 2023-09-19 7:23 ` Michael Tokarev
2023-09-20 15:04 ` Alex Bennée
2023-09-20 9:23 ` Alex Bennée
1 sibling, 1 reply; 41+ messages in thread
From: Michael Tokarev @ 2023-09-19 7:23 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-stable, Richard Henderson, Alex Bennée
18.09.2023 12:19, Michael Tokarev wrote:
> 09.09.2023 13:27, Michael Tokarev wrote:
>> From: Richard Henderson <richard.henderson@linaro.org>
>>
>> Acked-by: Alex Bennée <alex.bennee@linaro.org>
>> Suggested-by: Alex Bennée <alex.bennee@linaro.org>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> (cherry picked from commit 86e4f93d827d3c1efd00cd8a906e38a2c0f2b5bc)
>> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
>>
>> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
>> index 3df73542e1..7597dc1c39 100644
>> --- a/softmmu/physmem.c
>> +++ b/softmmu/physmem.c
>> @@ -2413,9 +2413,15 @@ MemoryRegionSection *iotlb_to_section(CPUState *cpu,
>> int asidx = cpu_asidx_from_attrs(cpu, attrs);
>> CPUAddressSpace *cpuas = &cpu->cpu_ases[asidx];
>> AddressSpaceDispatch *d = qatomic_rcu_read(&cpuas->memory_dispatch);
>> - MemoryRegionSection *sections = d->map.sections;
>> + int section_index = index & ~TARGET_PAGE_MASK;
>> + MemoryRegionSection *ret;
>> +
>> + assert(section_index < d->map.sections_nb);
>
> This assert now triggers on staging-8.1
>
> https://ci.debian.net/data/autopkgtest/testing/amd64/d/dropbear/37993610/log.gz
> https://ci.debian.net/data/autopkgtest/testing/amd64/c/cryptsetup/37993606/log.gz
>
>> + ret = d->map.sections + section_index;
>> + assert(ret->mr);
>> + assert(ret->mr->ops);
>> - return §ions[index & ~TARGET_PAGE_MASK];
>> + return ret;
>> }
>> static void io_mem_init(void)
>
> In this upload I removed softmmu-Use-async_run_on_cpu-in-tcg_commit.patch (0d58c660689f6da1),
> and the test run uses tcg and -smp 4, which is the configuration which 0d58c6606
> was supposed to fix.
So, should this change not be in 8.1.1 too (together with 0d58c6606),
or is it just the "messenger"?
Or both should go?
Today is the deadline day for 8.1.1.
Thanks!
/mjt
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section
2023-09-18 9:19 ` Michael Tokarev
2023-09-19 7:23 ` Michael Tokarev
@ 2023-09-20 9:23 ` Alex Bennée
2023-09-22 20:21 ` Michael Tokarev
1 sibling, 1 reply; 41+ messages in thread
From: Alex Bennée @ 2023-09-20 9:23 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-devel, qemu-stable, Richard Henderson
Michael Tokarev <mjt@tls.msk.ru> writes:
> 09.09.2023 13:27, Michael Tokarev wrote:
>> From: Richard Henderson <richard.henderson@linaro.org>
>> Acked-by: Alex Bennée <alex.bennee@linaro.org>
>> Suggested-by: Alex Bennée <alex.bennee@linaro.org>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> (cherry picked from commit 86e4f93d827d3c1efd00cd8a906e38a2c0f2b5bc)
>> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
>> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
>> index 3df73542e1..7597dc1c39 100644
>> --- a/softmmu/physmem.c
>> +++ b/softmmu/physmem.c
>> @@ -2413,9 +2413,15 @@ MemoryRegionSection *iotlb_to_section(CPUState *cpu,
>> int asidx = cpu_asidx_from_attrs(cpu, attrs);
>> CPUAddressSpace *cpuas = &cpu->cpu_ases[asidx];
>> AddressSpaceDispatch *d = qatomic_rcu_read(&cpuas->memory_dispatch);
>> - MemoryRegionSection *sections = d->map.sections;
>> + int section_index = index & ~TARGET_PAGE_MASK;
>> + MemoryRegionSection *ret;
>> +
>> + assert(section_index < d->map.sections_nb);
>
> This assert now triggers on staging-8.1
>
> https://ci.debian.net/data/autopkgtest/testing/amd64/d/dropbear/37993610/log.gz
> https://ci.debian.net/data/autopkgtest/testing/amd64/c/cryptsetup/37993606/log.gz
The asserts are basically there to detect when we attempt to do a MR
lookup and it is not fully committed. If they are firing its because
things have gone wrong (which we know because we still have patches in
flight for the full fix).
The main benefit of the assert is we fail early rather than later on in
various cryptic ways (evidenced by the fact we raised 3 different bugs
which exhibited slightly different symptoms that where all fundamentally
caused by getting bogus memory region data).
>
>> + ret = d->map.sections + section_index;
>> + assert(ret->mr);
>> + assert(ret->mr->ops);
>> - return §ions[index & ~TARGET_PAGE_MASK];
>> + return ret;
>> }
>> static void io_mem_init(void)
>
> In this upload I removed softmmu-Use-async_run_on_cpu-in-tcg_commit.patch (0d58c660689f6da1),
> and the test run uses tcg and -smp 4, which is the configuration which 0d58c6606
> was supposed to fix.
>
> qemu-system-x86_64 -no-user-config -nodefaults -name autopkgtest-cryptsetup-cryptroot-sysvinit \
> -machine type=q35,graphics=off -cpu qemu64,-svm,-vmx -smp cpus=4 -m size=2G \
> -vga none -display none -object rng....
>
> I wonder if I should keep 0d58c6606 for 8.1.1 (the deadline is
> tomorrow)..
Unfortunately 0d58c is not the full fix, it papered over one crack but
revealed others. It might be leading to a false sense of security. So I
would argue:
- keep the assert - better to fail early than to fail later in a hard
to understand way
- toss a coin for the 0d58c66 fix, if we include it we may end up
reverting later once we have the "complete" fix but at least its
slightly better for x86 while definitely breaking MIPS
>
> Thanks,
>
> /mjt
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section
2023-09-19 7:23 ` Michael Tokarev
@ 2023-09-20 15:04 ` Alex Bennée
2023-09-22 14:43 ` Michael Tokarev
0 siblings, 1 reply; 41+ messages in thread
From: Alex Bennée @ 2023-09-20 15:04 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-devel, qemu-stable, Richard Henderson
Michael Tokarev <mjt@tls.msk.ru> writes:
> 18.09.2023 12:19, Michael Tokarev wrote:
>> 09.09.2023 13:27, Michael Tokarev wrote:
>>> From: Richard Henderson <richard.henderson@linaro.org>
>>>
>>> Acked-by: Alex Bennée <alex.bennee@linaro.org>
>>> Suggested-by: Alex Bennée <alex.bennee@linaro.org>
>>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>>> (cherry picked from commit 86e4f93d827d3c1efd00cd8a906e38a2c0f2b5bc)
>>> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
>>>
>>> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
>>> index 3df73542e1..7597dc1c39 100644
>>> --- a/softmmu/physmem.c
>>> +++ b/softmmu/physmem.c
>>> @@ -2413,9 +2413,15 @@ MemoryRegionSection *iotlb_to_section(CPUState *cpu,
>>> int asidx = cpu_asidx_from_attrs(cpu, attrs);
>>> CPUAddressSpace *cpuas = &cpu->cpu_ases[asidx];
>>> AddressSpaceDispatch *d = qatomic_rcu_read(&cpuas->memory_dispatch);
>>> - MemoryRegionSection *sections = d->map.sections;
>>> + int section_index = index & ~TARGET_PAGE_MASK;
>>> + MemoryRegionSection *ret;
>>> +
>>> + assert(section_index < d->map.sections_nb);
>> This assert now triggers on staging-8.1
>> https://ci.debian.net/data/autopkgtest/testing/amd64/d/dropbear/37993610/log.gz
>> https://ci.debian.net/data/autopkgtest/testing/amd64/c/cryptsetup/37993606/log.gz
>>
>>> + ret = d->map.sections + section_index;
>>> + assert(ret->mr);
>>> + assert(ret->mr->ops);
>>> - return §ions[index & ~TARGET_PAGE_MASK];
>>> + return ret;
>>> }
>>> static void io_mem_init(void)
>> In this upload I removed
>> softmmu-Use-async_run_on_cpu-in-tcg_commit.patch (0d58c660689f6da1),
>> and the test run uses tcg and -smp 4, which is the configuration which 0d58c6606
>> was supposed to fix.
>
> So, should this change not be in 8.1.1 too (together with 0d58c6606),
> or is it just the "messenger"?
Sorry my previous reply was eaten by my MUA.
The main purpose of the asserts is to catch corruption to the Memory
Regions early so we don't see weird failures later on (c.f. the 3
separate bugs for crashes in slightly different places).
IOW is we are crashing on the asserts in this patch but it's booting
without it we are just getting lucky.
>
> Or both should go?
>
> Today is the deadline day for 8.1.1.
>
> Thanks!
>
> /mjt
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section
2023-09-20 15:04 ` Alex Bennée
@ 2023-09-22 14:43 ` Michael Tokarev
0 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-22 14:43 UTC (permalink / raw)
To: Alex Bennée; +Cc: qemu-devel, qemu-stable, Richard Henderson
20.09.2023 18:04, Alex Bennée wrote:
..
> Sorry my previous reply was eaten by my MUA.
That happens.. especially when MUA becomes hungry :)
> The main purpose of the asserts is to catch corruption to the Memory
> Regions early so we don't see weird failures later on (c.f. the 3
> separate bugs for crashes in slightly different places).
>
> IOW is we are crashing on the asserts in this patch but it's booting
> without it we are just getting lucky.
Thank you very much for this summary. Yeah, this confirms my thought,
but I wanted to be sure. I left it in.
/mjt
^ permalink raw reply [flat|nested] 41+ messages in thread
* Re: [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section
2023-09-20 9:23 ` Alex Bennée
@ 2023-09-22 20:21 ` Michael Tokarev
0 siblings, 0 replies; 41+ messages in thread
From: Michael Tokarev @ 2023-09-22 20:21 UTC (permalink / raw)
To: Alex Bennée; +Cc: qemu-devel, qemu-stable, Richard Henderson
20.09.2023 12:23, Alex Bennée:
..
>> I wonder if I should keep 0d58c6606 for 8.1.1 (the deadline is
>> tomorrow)..
>
> Unfortunately 0d58c is not the full fix, it papered over one crack but
> revealed others. It might be leading to a false sense of security. So I
> would argue:
>
> - keep the assert - better to fail early than to fail later in a hard
> to understand way
> - toss a coin for the 0d58c66 fix, if we include it we may end up
> reverting later once we have the "complete" fix but at least its
> slightly better for x86 while definitely breaking MIPS
Heh. I've read this email just now, way after 8.1.1 has been tagged and
the announcement sent.
I haven't included 0d58c66 for now, without tossing coins - just to be
on-par with 8.1.0, or else it is confusing at best (which stable releases
brings with new issues).
This whole thing is definitely worth a 8.1.2 once the fix is in.
Meanwhile I pushed qemu with 0d58c66 and the "always require can_do_io"
patchset to debian, - this one fixed all regressions so far.
https://salsa.debian.org/qemu-team/qemu/-/tree/debian/1%258.1.0+ds-6/debian/patches/always-can-do-io-1866
https://gitlab.com/mjt0k/qemu/-/commits/staging-8.1-always-require-can_do_io/
Thank you for the thoughts, much apprecated!
/mjt
^ permalink raw reply [flat|nested] 41+ messages in thread
end of thread, other threads:[~2023-09-22 20:22 UTC | newest]
Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-09 10:26 [Stable-8.1.1 00/34] Patch Round-up for stable 8.1.1, freeze on 2023-09-19 Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 01/34] target/s390x: Fix the "ignored match" case in VSTRS Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 02/34] target/s390x: Use a 16-bit immediate in VREP Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 03/34] target/s390x: Fix VSTL with a large length Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 04/34] target/s390x: Check reserved bits of VFMIN/VFMAX's M5 Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 05/34] include/hw/virtio/virtio-gpu: Fix virtio-gpu with blob on big endian hosts Michael Tokarev
2023-09-09 10:26 ` [Stable-8.1.1 06/34] kvm: Introduce kvm_arch_get_default_type hook Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 07/34] accel/kvm: Specify default IPA size for arm64 Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 08/34] target/arm: Fix SME ST1Q Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 09/34] target/arm: Fix 64-bit SSRA Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 10/34] docs/about/license: Update LICENSE URL Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 11/34] softmmu: Assert data in bounds in iotlb_to_section Michael Tokarev
2023-09-18 9:19 ` Michael Tokarev
2023-09-19 7:23 ` Michael Tokarev
2023-09-20 15:04 ` Alex Bennée
2023-09-22 14:43 ` Michael Tokarev
2023-09-20 9:23 ` Alex Bennée
2023-09-22 20:21 ` Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 12/34] softmmu: Use async_run_on_cpu in tcg_commit Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 13/34] block-migration: Ensure we don't crash during migration cleanup Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 14/34] target/arm: properly document FEAT_CRC32 Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 15/34] linux-user: Adjust brk for load_bias Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 16/34] target/i386: raise FERR interrupt with iothread locked Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 17/34] ui/dbus: Properly dispose touch/mouse dbus objects Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 18/34] ppc/vof: Fix missed fields in VOF cleanup Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 19/34] hw/ppc/e500: fix broken snapshot replay Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 20/34] target/ppc: Flush inputs to zero with NJ in ppc_store_vscr Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 21/34] target/ppc: Fix LQ, STQ register-pair order for big-endian Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 22/34] hw/ide/core: set ERR_STAT in unsupported command completion Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 23/34] hw/ide/ahci: write D2H FIS when processing NCQ command Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 24/34] hw/ide/ahci: simplify and document PxCI handling Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 25/34] hw/ide/ahci: PxSACT and PxCI is cleared when PxCMD.ST is cleared Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 26/34] hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 27/34] hw/ide/ahci: fix ahci_write_fis_sdb() Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 28/34] hw/ide/ahci: fix broken SError handling Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 29/34] hw/i2c/aspeed: Fix Tx count and Rx size error in buffer pool mode Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 30/34] hw/i2c/aspeed: Fix TXBUF transmission start position error Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 31/34] qemu-options.hx: Rephrase the descriptions of the -hd* and -cdrom options Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 32/34] docs tests: Fix use of migrate_set_parameter Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 33/34] hw/net/vmxnet3: Fix guest-triggerable assert() Michael Tokarev
2023-09-09 10:27 ` [Stable-8.1.1 34/34] qxl: don't assert() if device isn't yet initialized Michael Tokarev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).