* [PULL 0/3] Fixes 20200721 patches
@ 2020-07-21 14:02 Gerd Hoffmann
2020-07-21 14:02 ` [PULL 1/3] xhci: fix valid.max_access_size to access address registers Gerd Hoffmann
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2020-07-21 14:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
The following changes since commit af3d69058e09bede9900f266a618ed11f76f49f3:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200720' into staging (2020-07-20 15:58:07 +0100)
are available in the Git repository at:
git://git.kraxel.org/qemu tags/fixes-20200721-pull-request
for you to fetch changes up to d87350b065128e8156e7aca93e89a1ab9e5fa63d:
module: ignore NULL type (2020-07-21 10:56:51 +0200)
----------------------------------------------------------------
fixes for xhci and modular builds.
----------------------------------------------------------------
Gerd Hoffmann (2):
qxl: fix modular builds with dtrace
module: ignore NULL type
Laurent Vivier (1):
xhci: fix valid.max_access_size to access address registers
hw/display/qxl.c | 9 +++++++++
hw/usb/hcd-xhci.c | 4 ++--
util/module.c | 3 +++
3 files changed, 14 insertions(+), 2 deletions(-)
--
2.18.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PULL 1/3] xhci: fix valid.max_access_size to access address registers
2020-07-21 14:02 [PULL 0/3] Fixes 20200721 patches Gerd Hoffmann
@ 2020-07-21 14:02 ` Gerd Hoffmann
2020-07-21 14:02 ` [PULL 2/3] qxl: fix modular builds with dtrace Gerd Hoffmann
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2020-07-21 14:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Gerd Hoffmann
From: Laurent Vivier <lvivier@redhat.com>
QEMU XHCI advertises AC64 (64-bit addressing) but doesn't allow
64-bit mode access in "runtime" and "operational" MemoryRegionOps.
Set the max_access_size based on sizeof(dma_addr_t) as AC64 is set.
XHCI specs:
"If the xHC supports 64-bit addressing (AC64 = ‘1’), then software
should write 64-bit registers using only Qword accesses. If a
system is incapable of issuing Qword accesses, then writes to the
64-bit address fields shall be performed using 2 Dword accesses;
low Dword-first, high-Dword second. If the xHC supports 32-bit
addressing (AC64 = ‘0’), then the high Dword of registers containing
64-bit address fields are unused and software should write addresses
using only Dword accesses"
The problem has been detected with SLOF, as linux kernel always accesses
registers using 32-bit access even if AC64 is set and revealed by
5d971f9e6725 ("memory: Revert "memory: accept mismatching sizes in memory_region_access_valid"")
Suggested-by: Alexey Kardashevskiy <aik@au1.ibm.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-id: 20200721083322.90651-1-lvivier@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-xhci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index b330e36fe6cc..67a18fe2b64c 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3184,7 +3184,7 @@ static const MemoryRegionOps xhci_oper_ops = {
.read = xhci_oper_read,
.write = xhci_oper_write,
.valid.min_access_size = 4,
- .valid.max_access_size = 4,
+ .valid.max_access_size = sizeof(dma_addr_t),
.endianness = DEVICE_LITTLE_ENDIAN,
};
@@ -3200,7 +3200,7 @@ static const MemoryRegionOps xhci_runtime_ops = {
.read = xhci_runtime_read,
.write = xhci_runtime_write,
.valid.min_access_size = 4,
- .valid.max_access_size = 4,
+ .valid.max_access_size = sizeof(dma_addr_t),
.endianness = DEVICE_LITTLE_ENDIAN,
};
--
2.18.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PULL 2/3] qxl: fix modular builds with dtrace
2020-07-21 14:02 [PULL 0/3] Fixes 20200721 patches Gerd Hoffmann
2020-07-21 14:02 ` [PULL 1/3] xhci: fix valid.max_access_size to access address registers Gerd Hoffmann
@ 2020-07-21 14:02 ` Gerd Hoffmann
2020-07-21 14:02 ` [PULL 3/3] module: ignore NULL type Gerd Hoffmann
2020-07-21 17:31 ` [PULL 0/3] Fixes 20200721 patches Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2020-07-21 14:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Checking the enable/disable state of tracepoints via
trace_event_get_state_backends() does not work for modules.
qxl checks the state for a small optimization (avoid g_strndup
call in case log_buf will not be used anyway), so we can just
drop that check for modular builds.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200720100352.2477-2-kraxel@redhat.com>
---
hw/display/qxl.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index d5627119ec62..11871340e75d 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -1762,7 +1762,16 @@ async_common:
qxl_set_mode(d, val, 0);
break;
case QXL_IO_LOG:
+#ifdef CONFIG_MODULES
+ /*
+ * FIXME
+ * trace_event_get_state_backends() does not work for modules,
+ * it leads to "undefined symbol: qemu_qxl_io_log_semaphore"
+ */
+ if (true) {
+#else
if (trace_event_get_state_backends(TRACE_QXL_IO_LOG) || d->guestdebug) {
+#endif
/* We cannot trust the guest to NUL terminate d->ram->log_buf */
char *log_buf = g_strndup((const char *)d->ram->log_buf,
sizeof(d->ram->log_buf));
--
2.18.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PULL 3/3] module: ignore NULL type
2020-07-21 14:02 [PULL 0/3] Fixes 20200721 patches Gerd Hoffmann
2020-07-21 14:02 ` [PULL 1/3] xhci: fix valid.max_access_size to access address registers Gerd Hoffmann
2020-07-21 14:02 ` [PULL 2/3] qxl: fix modular builds with dtrace Gerd Hoffmann
@ 2020-07-21 14:02 ` Gerd Hoffmann
2020-07-21 17:31 ` [PULL 0/3] Fixes 20200721 patches Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2020-07-21 14:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Just return in case module_load_qom_one(NULL) is called.
vga_interface_available() can do that.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200720100352.2477-3-kraxel@redhat.com>
---
util/module.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/util/module.c b/util/module.c
index 90e9bd42c6c7..0ab00851f0a4 100644
--- a/util/module.c
+++ b/util/module.c
@@ -275,6 +275,9 @@ void module_load_qom_one(const char *type)
{
int i;
+ if (!type) {
+ return;
+ }
if (module_loaded_qom_all) {
return;
}
--
2.18.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PULL 0/3] Fixes 20200721 patches
2020-07-21 14:02 [PULL 0/3] Fixes 20200721 patches Gerd Hoffmann
` (2 preceding siblings ...)
2020-07-21 14:02 ` [PULL 3/3] module: ignore NULL type Gerd Hoffmann
@ 2020-07-21 17:31 ` Peter Maydell
3 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2020-07-21 17:31 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On Tue, 21 Jul 2020 at 15:05, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> The following changes since commit af3d69058e09bede9900f266a618ed11f76f49f3:
>
> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200720' into staging (2020-07-20 15:58:07 +0100)
>
> are available in the Git repository at:
>
> git://git.kraxel.org/qemu tags/fixes-20200721-pull-request
>
> for you to fetch changes up to d87350b065128e8156e7aca93e89a1ab9e5fa63d:
>
> module: ignore NULL type (2020-07-21 10:56:51 +0200)
>
> ----------------------------------------------------------------
> fixes for xhci and modular builds.
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.1
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-07-21 17:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-21 14:02 [PULL 0/3] Fixes 20200721 patches Gerd Hoffmann
2020-07-21 14:02 ` [PULL 1/3] xhci: fix valid.max_access_size to access address registers Gerd Hoffmann
2020-07-21 14:02 ` [PULL 2/3] qxl: fix modular builds with dtrace Gerd Hoffmann
2020-07-21 14:02 ` [PULL 3/3] module: ignore NULL type Gerd Hoffmann
2020-07-21 17:31 ` [PULL 0/3] Fixes 20200721 patches Peter Maydell
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).