Re: [PATCH for-6.1 04/10] docs/devel/migration.rst: Format literals correctly

2021-07-26 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > In rST markup, single backticks `like this` represent "interpreted > text", which can be handled as a bunch of different things if tagged > with a specific "role": > https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#interpreted-te

Re: [PATCH for-6.1 10/10] docs/tools/virtiofsd.rst: Delete stray backtick

2021-07-26 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > The documentation of the posix_acl option has a stray backtick > at the end of the text (which is rendered literally into the HTML). > Delete it. > > Signed-off-by: Peter Maydell Acked-by: Dr. David Alan Gilbert > --- > docs/tools/virtiofsd.

Re: [PATCH] raw-format: drop WRITE and RESIZE child perms when possible

2021-07-26 Thread Vladimir Sementsov-Ogievskiy
26.07.2021 15:28, Stefan Hajnoczi wrote: The following command-line fails due to a permissions conflict: $ qemu-storage-daemon \ --blockdev driver=nvme,node-name=nvme0,device=:08:00.0,namespace=1 \ --blockdev driver=raw,node-name=l1-1,file=nvme0,offset=0,size=1073741824 \

[PATCH for-6.1? v2 1/7] mirror: Keep s->synced on error

2021-07-26 Thread Max Reitz
An error does not take us out of the READY phase, which is what s->synced signifies. It does of course mean that source and target are no longer in sync, but that is what s->actively_sync is for -- s->synced never meant that source and target are in sync, only that they were at some point (and at

[PATCH for-6.1? v2 0/7] mirror: Handle errors after READY cancel

2021-07-26 Thread Max Reitz
Hi, v1 cover letter: https://lists.nongnu.org/archive/html/qemu-block/2021-07/msg00705.html Changes in v2: - Added patch 2 (as suggested by Vladimir) - Patch 4 (ex. 3): Rebase conflicts because of patch 2 - Patch 5 (ex. 4): - Rebase conflicts because of patch 2 - Do not use job_cancel_request

[PATCH for-6.1? v2 2/7] mirror: Drop s->synced

2021-07-26 Thread Max Reitz
As of HEAD^, there is no meaning to s->synced other than whether the job is READY or not. job_is_ready() gives us that information, too. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Max Reitz --- block/mirror.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletion

[PATCH for-6.1? v2 3/7] job: @force parameter for job_cancel_sync{, _all}()

2021-07-26 Thread Max Reitz
Callers should be able to specify whether they want job_cancel_sync() to force-cancel the job or not. In fact, almost all invocations do not care about consistency of the result and just want the job to terminate as soon as possible, so they should pass force=true. The replication block driver is

[PATCH for-6.1? v2 7/7] iotests: Add mirror-ready-cancel-error test

2021-07-26 Thread Max Reitz
Test what happens when there is an I/O error after a mirror job in the READY phase has been cancelled. Signed-off-by: Max Reitz --- .../tests/mirror-ready-cancel-error | 143 ++ .../tests/mirror-ready-cancel-error.out | 5 + 2 files changed, 148 insertions(+) c

Re: [PATCH for-6.1 09/10] docs/about/removed-features: Fix markup error

2021-07-26 Thread Philippe Mathieu-Daudé
On 7/26/21 4:23 PM, Peter Maydell wrote: > The section describing the removed feature "-usbdevice ccid" had a > typo so the markup started with single backtick and ended with double > backtick; fix it. > > Signed-off-by: Peter Maydell > --- > docs/about/removed-features.rst | 2 +- > 1 file chan

[PATCH for-6.1? v2 4/7] jobs: Give Job.force_cancel more meaning

2021-07-26 Thread Max Reitz
We largely have two cancel modes for jobs: First, there is actual cancelling. The job is terminated as soon as possible, without trying to reach a consistent result. Second, we have mirror in the READY state. Technically, the job is not really cancelled, but it just is a different completion mo

[PATCH for-6.1? v2 6/7] mirror: Check job_is_cancelled() earlier

2021-07-26 Thread Max Reitz
We must check whether the job is force-cancelled early in our main loop, most importantly before any `continue` statement. For example, we used to have `continue`s before our current checking location that are triggered by `mirror_flush()` failing. So, if `mirror_flush()` kept failing, force-canc

Re: [PATCH for-6.1? v2 1/9] nbd/server: Mark variable unused in nbd_negotiate_meta_queries

2021-07-26 Thread Eric Blake
On Sun, Jul 25, 2021 at 02:24:08AM -1000, Richard Henderson wrote: > From clang-13: > nbd/server.c:976:22: error: variable 'bitmaps' set but not used \ > [-Werror,-Wunused-but-set-variable] > > which is incorrect; see //bugs.llvm.org/show_bug.cgi?id=3888. > > Cc: qemu-bl...@nongnu.org > Cc: E

[PATCH for-6.1? v2 5/7] job: Add job_cancel_requested()

2021-07-26 Thread Max Reitz
Most callers of job_is_cancelled() actually want to know whether the job is on its way to immediate termination. For example, we refuse to pause jobs that are cancelled; but this only makes sense for jobs that are really actually cancelled. A mirror job that is cancelled during READY with force=f

Re: [PATCH for-6.1 02/10] docs/devel/build-system.rst: Correct typo in example code

2021-07-26 Thread Philippe Mathieu-Daudé
On 7/26/21 4:23 PM, Peter Maydell wrote: > One of the example meson.build fragments incorrectly quotes some > symbols as 'CONFIG_FOO`; the correct syntax here is 'CONFIG_FOO'. > (This isn't a rST formatting mistake because the example is displayed > literally; it's just the wrong kind of quote.) >

Re: [PATCH v2 3/3] target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Andrew Jones
On Fri, Jul 23, 2021 at 10:33:44AM -1000, Richard Henderson wrote: > Mirror the behavour of /proc/sys/abi/sve_default_vector_length > under the real linux kernel. We have no way of passing along > a real default across exec like the kernel can, but this is a > decent way of adjusting the startup v

Re: [PATCH v2 0/3] target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Andrew Jones
On Mon, Jul 26, 2021 at 01:42:45PM +0100, Peter Maydell wrote: > On Fri, 23 Jul 2021 at 21:34, Richard Henderson > wrote: > > > > This is intended to resolve #482. > > > > Changes for v2: > > * Split out length bounding fix to new patch. > > * Use byte units for sve-default-vector-length. > >

[PATCH-for-6.1 v4 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs

2021-07-26 Thread Philippe Mathieu-Daudé
Jobs depending on another should not use the 'when: always' condition, because if a dependency failed we should not keep running jobs depending on it. The correct condition is 'when: on_success'. Fixes: 71920809cea ("gitlab-ci.yml: Add jobs to build EDK2 firmware binaries") Reported-by: Daniel P.

[PATCH-for-6.1 v4 0/4] gitlab-ci: Document custom CI/CD variables, fix 'when:' conditions

2021-07-26 Thread Philippe Mathieu-Daudé
Since v3: - Unfortunately patch 4 v2 got merged as 0a9487d80af so rebase & reword. Philippe Mathieu-Daudé (4): docs: Document GitLab custom CI/CD variables gitlab-ci: Fix 'when:' condition in acceptance_test_job_template gitlab-ci: Fix 'when:' condition in EDK2 jobs gitlab-ci: Fix 'when:

[PATCH-for-6.1 v4 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template

2021-07-26 Thread Philippe Mathieu-Daudé
Jobs depending on another should not use the 'when: always' condition, because if a dependency failed we should not keep running jobs depending on it. The correct condition is 'when: on_success'. Fixes: f56bf4caf71 ("gitlab: Run Avocado tests manually (except mainstream CI)") Reported-by: Daniel P

[PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables

2021-07-26 Thread Philippe Mathieu-Daudé
We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf ("gitlab: Run Avocado tests manually (except mainstream CI)"), but forgot to document it properly. Do it now. Suggested-by: Thomas Huth Reviewed-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé --- docs/devel/ci

Re: [PATCH RFC server 04/11] vfio-user: find and init PCI device

2021-07-26 Thread John Levon
On Mon, Jul 19, 2021 at 04:00:06PM -0400, Jagannathan Raman wrote: > +vfu_pci_set_id(o->vfu_ctx, > + pci_get_word(o->pci_dev->config + PCI_VENDOR_ID), > + pci_get_word(o->pci_dev->config + PCI_DEVICE_ID), > + pci_get_word(o->pci_dev->config

[PATCH-for-6.1 v4 4/4] gitlab-ci: Fix 'when:' condition in OpenSBI jobs

2021-07-26 Thread Philippe Mathieu-Daudé
Jobs depending on another should not use the 'when: always' condition, because if a dependency failed we should not keep running jobs depending on it. The correct condition is 'when: on_success'. Fixes: c6fc0fc1a71 ("gitlab-ci.yml: Add jobs to build OpenSBI firmware binaries") Reported-by: Daniel

[PATCH] hw/arm/nseries: Display hexadecimal value with '0x' prefix

2021-07-26 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/nseries.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index 906c915df78..af3164c5519 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -692,7 +692,7 @@ static uint32_t mipid_txrx(voi

Re: [PATCH RFC server 06/11] vfio-user: handle PCI config space accesses

2021-07-26 Thread John Levon
On Mon, Jul 19, 2021 at 04:00:08PM -0400, Jagannathan Raman wrote: > Define and register handlers for PCI config space accesses > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > hw/remote/vfio-user-obj.c | 41

Re: [PATCH v6 1/5] hw/nvme: split pmrmsc register into upper and lower

2021-07-26 Thread Klaus Jensen
Keith, Appala, any chance one of you could review this? This really needs to get to an -rc sooner rather than later :) On Jul 21 09:48, Klaus Jensen wrote: > From: Klaus Jensen > > The specification uses a set of 32 bit PMRMSCL and PMRMSCU registers to > make up the 64 bit logical PMRMSC registe

Re: [PATCH resend v2 5/5] softmmu/memory_mapping: optimize for RamDiscardManager sections

2021-07-26 Thread Peter Xu
On Tue, Jul 20, 2021 at 03:03:04PM +0200, David Hildenbrand wrote: > virtio-mem logically plugs/unplugs memory within a sparse memory region > and notifies via the RamDiscardManager interface when parts become > plugged (populated) or unplugged (discarded). > > Currently, we end up (via the two us

Re: [PATCH v6 1/5] hw/nvme: split pmrmsc register into upper and lower

2021-07-26 Thread Keith Busch
On Wed, Jul 21, 2021 at 09:48:32AM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The specification uses a set of 32 bit PMRMSCL and PMRMSCU registers to > make up the 64 bit logical PMRMSC register. > > Make it so. Looks good. Reviewed-by: Keith Busch

Re: [PATCH for-6.1? v2 2/7] mirror: Drop s->synced

2021-07-26 Thread Eric Blake
On Mon, Jul 26, 2021 at 04:46:08PM +0200, Max Reitz wrote: > As of HEAD^, there is no meaning to s->synced other than whether the job > is READY or not. job_is_ready() gives us that information, too. > > Suggested-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Max Reitz > --- > block/mirror

Re: [PATCH v2 03/22] target/loongarch: Add core definition

2021-07-26 Thread Richard Henderson
On 7/25/21 10:47 PM, Song Gao wrote: Hmm,  but where can we declared in ? such as ARM architecture declared in internals.h, is that OK? Yes. It is preferable that only things that are used outside of target/arch/ go into cpu.h, and that everything that is private to target/arch/ go into some

Re: [PATCH v2 06/22] target/loongarch: Add main translation routines

2021-07-26 Thread Richard Henderson
On 7/25/21 11:39 PM, Song Gao wrote: +void gen_base_offset_addr(TCGv addr, int base, int offset) +{ +    if (base == 0) { +    tcg_gen_movi_tl(addr, offset); +    } else if (offset == 0) { +    gen_load_gpr(addr, base); +    } else { +    tcg_gen_movi_tl(addr, offset); +    gen_op

Re: [PATCH for-6.1? v2 3/9] util/selfmap: Discard mapping on error

2021-07-26 Thread Eric Blake
On Sun, Jul 25, 2021 at 02:24:10AM -1000, Richard Henderson wrote: > From clang-13: > util/selfmap.c:26:21: error: variable 'errors' set but not used \ > [-Werror,-Wunused-but-set-variable] > > Quite right of course, but there's no reason not to check errors. > > First, incrementing errors is

Re: [PATCH for-6.1? v2 4/9] net/checksum: Remove unused variable in net_checksum_add_iov

2021-07-26 Thread Eric Blake
On Sun, Jul 25, 2021 at 02:24:11AM -1000, Richard Henderson wrote: > From clang-13: > ../qemu/net/checksum.c:189:23: error: variable 'buf_off' set but not used \ > [-Werror,-Wunused-but-set-variable] > > Signed-off-by: Richard Henderson > --- > net/checksum.c | 4 +--- > 1 file changed, 1 in

Re: [PATCH v2 0/3] target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Peter Maydell
On Mon, 26 Jul 2021 at 16:01, Andrew Jones wrote: > > On Mon, Jul 26, 2021 at 01:42:45PM +0100, Peter Maydell wrote: > > On Fri, 23 Jul 2021 at 21:34, Richard Henderson > > wrote: > > > > > > This is intended to resolve #482. > > > > > > Changes for v2: > > > * Split out length bounding fix to

Re: [PATCH] raw-format: drop WRITE and RESIZE child perms when possible

2021-07-26 Thread Kevin Wolf
Am 26.07.2021 um 16:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > 26.07.2021 15:28, Stefan Hajnoczi wrote: > > The following command-line fails due to a permissions conflict: > > > >$ qemu-storage-daemon \ > >--blockdev > > driver=nvme,node-name=nvme0,device=:08:00.0,namespac

[PATCH v2 1/3] nsis.py: create dlldir automatically

2021-07-26 Thread Gerd Hoffmann
Use objdump do figure which dlls are needed. Copy them to a temporary dlldir and pass that directory to makensis. This patch removes the need to manually copy dlls to $srcdir/dll/w{32,64} to get functional windows installers via "make installer". Signed-off-by: Gerd Hoffmann --- scripts/nsis.p

[PATCH v2 0/3] build windows installers in ci

2021-07-26 Thread Gerd Hoffmann
With 8619b5ddb56f ("ci: build & store windows installer") merged at least patch 1/3 should go into 6.1 too so the installers created by CI do actually work. Patches 2+3 are for the guest agent installer. Gerd Hoffmann (3): nsis.py: create dlldir automatically ci: build & store guest agent msi

Re: [PATCH v2 07/22] target/loongarch: Add fixed point arithmetic instruction translation

2021-07-26 Thread Richard Henderson
On 7/26/21 1:56 AM, Song Gao wrote: Hi, Richard. On 07/23/2021 08:46 AM, Richard Henderson wrote: On 7/20/21 11:53 PM, Song Gao wrote: +/* Fixed point arithmetic operation instruction translation */ +static bool trans_add_w(DisasContext *ctx, arg_add_w *a) +{ +    TCGv Rd = cpu_gpr[a->rd]; +  

[PATCH v2 2/3] ci: build & store guest agent msi

2021-07-26 Thread Gerd Hoffmann
Build guest agent windows msi install package in gitlab CI, store the result as artifact. Signed-off-by: Gerd Hoffmann --- .gitlab-ci.d/crossbuild-template.yml | 3 ++- .gitlab-ci.d/crossbuilds.yml | 2 ++ tests/docker/dockerfiles/fedora-win32-cross.docker | 1

[PATCH v2 3/3] qemu-ga/msi: fix w32 libgcc name

2021-07-26 Thread Gerd Hoffmann
This is what I find on my Fedora 34 mingw install. Signed-off-by: Gerd Hoffmann --- qga/installer/qemu-ga.wxs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qemu-ga.wxs index 9cb4c3d73302..ce7b25b5e16f 100644 --- a/qga/installer/qemu

Re: [PATCH] raw-format: drop WRITE and RESIZE child perms when possible

2021-07-26 Thread Stefan Hajnoczi
On Mon, Jul 26, 2021 at 05:42:47PM +0200, Kevin Wolf wrote: > Am 26.07.2021 um 16:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > > 26.07.2021 15:28, Stefan Hajnoczi wrote: > > > The following command-line fails due to a permissions conflict: > > > > > >$ qemu-storage-daemon \ > > >

Re: aarch64 efi boot failures with qemu 6.0+

2021-07-26 Thread Ard Biesheuvel
(cc Bjorn) On Mon, 26 Jul 2021 at 11:08, Philippe Mathieu-Daudé wrote: > > On 7/26/21 12:56 AM, Guenter Roeck wrote: > > On 7/25/21 3:14 PM, Michael S. Tsirkin wrote: > >> On Sat, Jul 24, 2021 at 11:52:34AM -0700, Guenter Roeck wrote: > >>> Hi all, > >>> > >>> starting with qemu v6.0, some of my

[PATCH v3 1/4] tpm: mark correct memory region range dirty when clearing RAM

2021-07-26 Thread David Hildenbrand
We might not start at the beginning of the memory region. Let's calculate the offset into the memory region via the difference in the host addresses. Acked-by: Stefan Berger Fixes: ffab1be70692 ("tpm: clear RAM when "memory overwrite" requested") Cc: Marc-André Lureau Cc: Paolo Bonzini Cc: "Mic

[PATCH v3 0/4] softmmu/memory_mapping: optimize dump/tpm for virtio-mem

2021-07-26 Thread David Hildenbrand
Minor fixes and cleanups, followed by an optimization for virtio-mem regarding guest dumps and tpm. virtio-mem logically plugs/unplugs memory within a sparse memory region and notifies via the RamDiscardMgr interface when parts become plugged (populated) or unplugged (discarded). Currently, guest

[PATCH v3 3/4] softmmu/memory_mapping: factor out adding physical memory ranges

2021-07-26 Thread David Hildenbrand
Let's factor out adding a MemoryRegionSection to the list, to be reused in RamDiscardManager context next. Reviewed-by: Stefan Berger Reviewed-by: Peter Xu Cc: Marc-André Lureau Cc: Paolo Bonzini Cc: "Michael S. Tsirkin" Cc: Eduardo Habkost Cc: Alex Williamson Cc: Dr. David Alan Gilbert Cc

[PATCH v3 2/4] softmmu/memory_mapping: never merge ranges accross memory regions

2021-07-26 Thread David Hildenbrand
Let's make sure to not merge when different memory regions are involved. Unlikely, but theoretically possible. Acked-by: Stefan Berger Reviewed-by: Peter Xu Cc: Marc-André Lureau Cc: Paolo Bonzini Cc: "Michael S. Tsirkin" Cc: Eduardo Habkost Cc: Alex Williamson Cc: Dr. David Alan Gilbert C

[PATCH v3 4/4] softmmu/memory_mapping: optimize for RamDiscardManager sections

2021-07-26 Thread David Hildenbrand
virtio-mem logically plugs/unplugs memory within a sparse memory region and notifies via the RamDiscardManager interface when parts become plugged (populated) or unplugged (discarded). Currently, we end up (via the two users) 1) zeroing all logically unplugged/discarded memory during TPM resets. 2

Re: [PATCH v6 2/2] tests/tcg/s390x: Test SIGILL and SIGSEGV handling

2021-07-26 Thread Ilya Leoshkevich
On Mon, 2021-07-05 at 23:04 +0200, Ilya Leoshkevich wrote: > Verify that s390x-specific uc_mcontext.psw.addr is reported correctly > and that signal handling interacts properly with debugging. > > Signed-off-by: Ilya Leoshkevich > --- >  tests/tcg/s390x/Makefile.target   |  18 +- >  t

[PATCH] hw/net/can: sja1000 fix buff2frame_bas for dlc out of std CAN 8 bytes

2021-07-26 Thread Pavel Pisa
Problem reported by openEuler fuzz-sig group. The buff2frame_bas function (hw\net\can\can_sja1000.c) infoleak(qemu5.x~qemu6.x) or stack-overflow(qemu 4.x). Reported-by: Qiang Ning Signed-off-by: Pavel Pisa --- hw/net/can/can_sja1000.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/

[PATCH for-6.1] hw/arm/boot: Report error if there is no fw_cfg device in the machine

2021-07-26 Thread Peter Maydell
If the user provides both a BIOS/firmware image and also a guest kernel filename, arm_setup_firmware_boot() will pass the kernel image to the firmware via the fw_cfg device. However we weren't checking whether there really was a fw_cfg device present, and if there wasn't we would crash. This crash

Re: [PATCH v2 3/3] qemu-ga/msi: fix w32 libgcc name

2021-07-26 Thread Marc-André Lureau
Hi On Mon, Jul 26, 2021 at 7:56 PM Gerd Hoffmann wrote: > This is what I find on my Fedora 34 mingw install. > > Signed-off-by: Gerd Hoffmann > --- > qga/installer/qemu-ga.wxs | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qga/installer/qemu-ga.wxs b/qga/installer/qem

Re: [PATCH v2 09/22] target/loongarch: Add fixed point bit instruction translation

2021-07-26 Thread Richard Henderson
On 7/26/21 2:22 AM, Song Gao wrote: Hi, Richard. On 07/23/2021 09:29 AM, Richard Henderson wrote: On 7/20/21 11:53 PM, Song Gao wrote: This patch implement fixed point bit instruction translation. This includes: - EXT.W.{B/H} - CL{O/Z}.{W/D}, CT{O/Z}.{W/D} - BYTEPICK.{W/D} - REVB.{2H/4H/2W/D}

Re: [PATCH v2 12/22] target/loongarch: Add fixed point extra instruction translation

2021-07-26 Thread Richard Henderson
On 7/26/21 2:57 AM, Song Gao wrote: Hi, Richard. On 07/23/2021 01:12 PM, Richard Henderson wrote: On 7/20/21 11:53 PM, Song Gao wrote: +target_ulong helper_cpucfg(CPULoongArchState *env, target_ulong rj) +{ +    target_ulong r = 0; + +    switch (rj) { +    case 0: +    r = env->CSR_MCSR0

Re: [PATCH for-6.1 0/2] accel/tcg: Fix hang when running in icount mode

2021-07-26 Thread Richard Henderson
On 7/25/21 8:11 AM, Richard Henderson wrote: On 7/25/21 7:44 AM, Peter Maydell wrote: This patchset fixes the intermittent hang seen when running a guest in icount mode, as reported in    https://gitlab.com/qemu-project/qemu/-/issues/499 . The underlying cause of the hang is that code in cpu_lo

Re: [PATCH for-6.1?] bitops.h: revert db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation")

2021-07-26 Thread Richard Henderson
On 7/25/21 1:05 AM, Mark Cave-Ayland wrote: Commit db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation") introduced a bitrev8() function to reverse the bit ordering required for storing the MAC address in the q800 PROM. This function is not required since QEMU implements its own revbit8() fun

Re: [PATCH v3 1/4] tpm: mark correct memory region range dirty when clearing RAM

2021-07-26 Thread Peter Xu
On Mon, Jul 26, 2021 at 06:03:43PM +0200, David Hildenbrand wrote: > We might not start at the beginning of the memory region. Let's > calculate the offset into the memory region via the difference in the > host addresses. > > Acked-by: Stefan Berger > Fixes: ffab1be70692 ("tpm: clear RAM when "m

[PATCH v3] hw/acpi: add an assertion check for non-null return from acpi_get_i386_pci_host

2021-07-26 Thread Ani Sinha
All existing code using acpi_get_i386_pci_host() checks for a non-null return value from this function call. Instead of returning early when the value returned is NULL, assert instead. Since there are only two possible host buses for i386 - q35 and i440fx, a null value return from the function does

Re: [PATCH v3 1/4] tpm: mark correct memory region range dirty when clearing RAM

2021-07-26 Thread David Hildenbrand
On 26.07.21 18:57, Peter Xu wrote: On Mon, Jul 26, 2021 at 06:03:43PM +0200, David Hildenbrand wrote: We might not start at the beginning of the memory region. Let's calculate the offset into the memory region via the difference in the host addresses. Acked-by: Stefan Berger Fixes: ffab1be7069

Re: [PATCH for-6.1? v2 0/9] Fixes for clang-13

2021-07-26 Thread Richard Henderson
On 7/25/21 2:24 AM, Richard Henderson wrote: Richard Henderson (9): nbd/server: Mark variable unused in nbd_negotiate_meta_queries accel/tcg: Remove unused variable in cpu_exec util/selfmap: Discard mapping on error net/checksum: Remove unused variable in net_checksum_add_iov hw/a

Re: [PATCH] hw/arm/nseries: Display hexadecimal value with '0x' prefix

2021-07-26 Thread Richard Henderson
On 7/26/21 5:09 AM, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/nseries.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PULL v2 0/2] Hexagon (target/hexagon) remove put_user_*/get_user_*

2021-07-26 Thread Peter Maydell
On Sun, 25 Jul 2021 at 22:42, Taylor Simpson wrote: > > The following changes since commit 7457b407edd6e8555e4b46488aab2f13959fccf8: > > Merge remote-tracking branch > 'remotes/thuth-gitlab/tags/pull-request-2021-07-19' into staging (2021-07-19 > 11:34:08 +0100) > > are available in the git re

Re: [PATCH v2 3/3] target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Richard Henderson
On 7/26/21 4:59 AM, Andrew Jones wrote: +SVE User-mode Default Vector Length Property + + +For qemu-aarch64, the cpu property `sve-default-vector-length=N` is +defined to mirror the Linux kernel parameter file +`/proc/sys/abi/sve_default_vector_length`.

Re: [PATCH v2 3/3] target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Andrew Jones
On Mon, Jul 26, 2021 at 08:33:52AM -1000, Richard Henderson wrote: > On 7/26/21 4:59 AM, Andrew Jones wrote: > > > +SVE User-mode Default Vector Length Property > > > + > > > + > > > +For qemu-aarch64, the cpu property `sve-default-vector-length=N` is > >

[PULL for-6.1 00/11] hw/nvme fixes

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Hi Peter, The following changes since commit 1d6f147f043bece029a795c6eb9d43c1abd909b6: Merge remote-tracking branch 'remotes/quic/tags/pull-hex-20210725' into staging (2021-07-26 13:36:51 +0100) are available in the Git repository at: git://git.infradead.org/qemu-nvme.

[PULL for-6.1 02/11] hw/nvme: mark nvme-subsys non-hotpluggable

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen We currently lack the infrastructure to handle subsystem hotplugging, so disable it. Reviewed-by: Hannes Reinecke Signed-off-by: Klaus Jensen --- hw/nvme/subsys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/nvme/subsys.c b/hw/nvme/subsys.c index 192223d17ca1..dc7

[PULL for-6.1 03/11] hw/nvme: unregister controller with subsystem at exit

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Make sure the controller is unregistered from the subsystem when device is removed. Reviewed-by: Hannes Reinecke Signed-off-by: Klaus Jensen --- hw/nvme/nvme.h | 1 + hw/nvme/ctrl.c | 4 hw/nvme/subsys.c | 5 + 3 files changed, 10 insertions(+) diff --git a/hw

[PULL for-6.1 01/11] hw/nvme: remove NvmeCtrl parameter from ns setup/check functions

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen The nvme_ns_setup and nvme_ns_check_constraints should not depend on the controller state. Refactor and remove it. Reviewed-by: Hannes Reinecke Signed-off-by: Klaus Jensen --- hw/nvme/nvme.h | 2 +- hw/nvme/ctrl.c | 2 +- hw/nvme/ns.c | 37 ++

[PULL for-6.1 05/11] tests/qtest/nvme-test: add persistent memory region test

2021-07-26 Thread Klaus Jensen
From: Gollu Appalanaidu This will test the PMR functionality. Signed-off-by: Gollu Appalanaidu Reviewed-by: Klaus Jensen [k.jensen: replaced memory-backend-file with memory-backend-ram] Signed-off-by: Klaus Jensen --- tests/qtest/nvme-test.c | 61 - 1

[PULL for-6.1 04/11] hw/nvme: error handling for too many mappings

2021-07-26 Thread Klaus Jensen
From: Padmakar Kalghatgi If the number of PRP/SGL mappings exceed 1024, reads and writes will fail because of an internal QEMU limitation of max 1024 vectors. Signed-off-by: Padmakar Kalghatgi Reviewed-by: Klaus Jensen [k.jensen: changed the error message to be more generic] Signed-off-by: Kla

[PULL for-6.1 07/11] hw/nvme: split pmrmsc register into upper and lower

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen The specification uses a set of 32 bit PMRMSCL and PMRMSCU registers to make up the 64 bit logical PMRMSC register. Make it so. Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- include/block/nvme.h | 31 --- hw/nvme/ctrl.c | 10 +++

[PULL for-6.1 06/11] hw/nvme: fix controller hot unplugging

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Prior to this patch the nvme-ns devices are always children of the NvmeBus owned by the NvmeCtrl. This causes the namespaces to be unrealized when the parent device is removed. However, when subsystems are involved, this is not what we want since the namespaces may be attached

[PULL for-6.1 08/11] hw/nvme: use symbolic names for registers

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Add the NvmeBarRegs enum and use these instead of explicit register offsets. Signed-off-by: Klaus Jensen Reviewed-by: Gollu Appalanaidu Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Keith Busch --- include/block/nvme.h | 29 - hw/nvme/ctrl.c

[PULL for-6.1 10/11] hw/nvme: fix mmio read

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen The new PMR test unearthed a long-standing issue with MMIO reads on big-endian hosts. Fix this by unconditionally storing all controller registers in little endian. Cc: Gollu Appalanaidu Reported-by: Peter Maydell Signed-off-by: Klaus Jensen Reviewed-by: Peter Maydell ---

Re: [PATCH-for-6.1 v4 1/4] docs: Document GitLab custom CI/CD variables

2021-07-26 Thread Willian Rampazzo
On Mon, Jul 26, 2021 at 12:08 PM Philippe Mathieu-Daudé wrote: > > We introduced the QEMU_CI_AVOCADO_TESTING variable in commit f56bf4caf > ("gitlab: Run Avocado tests manually (except mainstream CI)"), but > forgot to document it properly. Do it now. > > Suggested-by: Thomas Huth > Reviewed-by:

Re: [PATCH-for-6.1 v4 3/4] gitlab-ci: Fix 'when:' condition in EDK2 jobs

2021-07-26 Thread Willian Rampazzo
On Mon, Jul 26, 2021 at 12:07 PM Philippe Mathieu-Daudé wrote: > > Jobs depending on another should not use the 'when: always' > condition, because if a dependency failed we should not keep > running jobs depending on it. The correct condition is > 'when: on_success'. > > Fixes: 71920809cea ("gitl

Re: [PULL for-6.1 0/1] Block patches

2021-07-26 Thread Peter Maydell
On Mon, 26 Jul 2021 at 09:53, Stefan Hajnoczi wrote: > > The following changes since commit a2376507f615495b1d16685449ce0ea78c2caf9d: > > Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' > into staging (2021-07-24 11:04:57 +0100) > > are available in the Git repository at

[PULL for-6.1 09/11] hw/nvme: fix out-of-bounds reads

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Peter noticed that mmio access may read into the NvmeParams member in the NvmeCtrl struct. Fix the bounds check. Reported-by: Peter Maydell Signed-off-by: Klaus Jensen Reviewed-by: Stefan Hajnoczi Reviewed-by: Peter Maydell --- hw/nvme/ctrl.c | 27 +++

Re: [PATCH v2 3/3] target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Peter Maydell
On Mon, 26 Jul 2021 at 19:34, Richard Henderson wrote: > > On 7/26/21 4:59 AM, Andrew Jones wrote: > >> +SVE User-mode Default Vector Length Property > >> + > >> + > >> +For qemu-aarch64, the cpu property `sve-default-vector-length=N` is > >> +defined to

Re: [PATCH-for-6.1 v4 2/4] gitlab-ci: Fix 'when:' condition in acceptance_test_job_template

2021-07-26 Thread Willian Rampazzo
On Mon, Jul 26, 2021 at 12:06 PM Philippe Mathieu-Daudé wrote: > > Jobs depending on another should not use the 'when: always' > condition, because if a dependency failed we should not keep > running jobs depending on it. The correct condition is > 'when: on_success'. > > Fixes: f56bf4caf71 ("gitl

[PULL for-6.1 11/11] tests/qtest/nvme-test: add mmio read test

2021-07-26 Thread Klaus Jensen
From: Klaus Jensen Add a regression test for mmio read on big-endian hosts. Signed-off-by: Klaus Jensen Reviewed-by: Gollu Appalanaidu --- tests/qtest/nvme-test.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tests/qtest/nvme-test.c b/tests/qtest/nvme-test.c

Re: [PATCH v5 02/10] ACPI ERST: specification for ERST support

2021-07-26 Thread Eric DeVolder
On 7/26/21 5:06 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 10:42:33 -0500 Eric DeVolder wrote: On 7/19/21 10:02 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 19:26:39 + Eric DeVolder wrote: Oops, at the end of the 4th paragraph, I meant to state that "Linux does not support the

Re: [PATCH v5 05/10] ACPI ERST: support for ACPI ERST feature

2021-07-26 Thread Eric DeVolder
On 7/26/21 5:42 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 11:07:40 -0500 Eric DeVolder wrote: On 7/20/21 7:17 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 15:07:16 -0400 Eric DeVolder wrote: This change implements the support for the ACPI ERST feature. Drop this Done This

Re: [PATCH v5 07/10] ACPI ERST: trace support

2021-07-26 Thread Eric DeVolder
On 7/26/21 6:08 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 11:14:37 -0500 Eric DeVolder wrote: On 7/20/21 8:15 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 15:07:18 -0400 Eric DeVolder wrote: Provide the definitions needed to support tracing in ACPI ERST. trace points should be in

Re: [PATCH v5 08/10] ACPI ERST: create ACPI ERST table for pc/x86 machines.

2021-07-26 Thread Eric DeVolder
On 7/26/21 6:30 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 11:16:42 -0500 Eric DeVolder wrote: On 7/20/21 8:19 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 15:07:19 -0400 Eric DeVolder wrote: This change exposes ACPI ERST support for x86 guests. Signed-off-by: Eric DeVolder look

Re: [PATCH v5 06/10] ACPI ERST: build the ACPI ERST table

2021-07-26 Thread Eric DeVolder
On 7/26/21 6:00 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 11:12:41 -0500 Eric DeVolder wrote: On 7/20/21 8:16 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 15:07:17 -0400 Eric DeVolder wrote: This code is called from the machine code (if ACPI supported) to generate the ACPI ERST ta

Re: [PATCH v5 09/10] ACPI ERST: qtest for ERST

2021-07-26 Thread Eric DeVolder
On 7/26/21 6:45 AM, Igor Mammedov wrote: On Wed, 21 Jul 2021 11:18:44 -0500 Eric DeVolder wrote: On 7/20/21 8:38 AM, Igor Mammedov wrote: On Wed, 30 Jun 2021 15:07:20 -0400 Eric DeVolder wrote: This change provides a qtest that locates and then does a simple interrogation of the ERST

[PATCH] fixup! target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Richard Henderson
--- docs/system/arm/cpu-features.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/system/arm/cpu-features.rst b/docs/system/arm/cpu-features.rst index 79b87f7c5f..67847a5cc1 100644 --- a/docs/system/arm/cpu-features.rst +++ b/docs/system/arm/cpu-features.rst @@ -38

Re: [PATCH] fixup! target/arm: Add sve-default-vector-length cpu property

2021-07-26 Thread Peter Maydell
On Mon, 26 Jul 2021 at 21:11, Richard Henderson wrote: > > --- > docs/system/arm/cpu-features.rst | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/docs/system/arm/cpu-features.rst > b/docs/system/arm/cpu-features.rst > index 79b87f7c5f..67847a5cc1 100644 > --- a/docs

Re: [PATCH] Fix CPUID_Fn8000001E_EBX for AMD

2021-07-26 Thread Eduardo Habkost
CCing the original author of that code (Babu Moger). On Wed, Jun 30, 2021 at 04:25:51PM +0800, Jade Cheng wrote: > According to AMD64 Arch Programmer's Manual Appendix D, > bits 7:0 in Fn8000_001E_EBX should be physical core(s) per logical processor, > not per die. Do you mean physical cores per

Re: [PATCH for-6.1? v2 4/7] jobs: Give Job.force_cancel more meaning

2021-07-26 Thread Eric Blake
On Mon, Jul 26, 2021 at 04:46:10PM +0200, Max Reitz wrote: > We largely have two cancel modes for jobs: > > First, there is actual cancelling. The job is terminated as soon as > possible, without trying to reach a consistent result. > > Second, we have mirror in the READY state. Technically, th

[PULL for-6.1 00/12] tcg and misc patch queue

2021-07-26 Thread Richard Henderson
s/pull-tcg-20210726 for you to fetch changes up to 2bf07e788eb69bee843be274386fb20f4ab6b0f6: tests/unit: Remove unused variable from test_io (2021-07-26 07:07:28 -1000) Fix icount accounting. Replace bitrev8 with revbit8. Fixes for s

[PULL for-6.1 01/12] accel/tcg: Don't use CF_COUNT_MASK as the max value of icount_decr.u16.low

2021-07-26 Thread Richard Henderson
From: Peter Maydell In cpu_loop_exec_tb() we were bounding the number of insns we might try to execute in a TB using CF_COUNT_MASK. This is incorrect, because we can validly put up to 0x into icount_decr.u16.low. In particular, since commit 78ff82bb1b67c0d7 reduced CF_COUNT_MASK to 511 this

[PULL for-6.1 03/12] bitops.h: revert db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation")

2021-07-26 Thread Richard Henderson
From: Mark Cave-Ayland Commit db1ffc32dd ("qemu/bitops.h: add bitrev8 implementation") introduced a bitrev8() function to reverse the bit ordering required for storing the MAC address in the q800 PROM. This function is not required since QEMU implements its own revbit8() function which does exac

[PULL for-6.1 05/12] accel/tcg: Remove unused variable in cpu_exec

2021-07-26 Thread Richard Henderson
>From clang-13: accel/tcg/cpu-exec.c:783:15: error: variable 'cc' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git

[PULL for-6.1 04/12] nbd/server: Mark variable unused in nbd_negotiate_meta_queries

2021-07-26 Thread Richard Henderson
>From clang-13: nbd/server.c:976:22: error: variable 'bitmaps' set but not used \ [-Werror,-Wunused-but-set-variable] which is incorrect; see //bugs.llvm.org/show_bug.cgi?id=3888. Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Richard Henderson --- nbd/se

[PULL for-6.1 02/12] accel/tcg: Remove unnecessary check on icount_extra in cpu_loop_exec_tb()

2021-07-26 Thread Richard Henderson
From: Peter Maydell In cpu_loop_exec_tb(), we decide whether to look for a TB with exactly insns_left instructions in it using the condition (!cpu->icount_extra && insns_left > 0 && insns_left < tb->icount) The check for icount_extra == 0 is unnecessary, because we just set insns_left = MIN(0

[PULL for-6.1 07/12] net/checksum: Remove unused variable in net_checksum_add_iov

2021-07-26 Thread Richard Henderson
>From clang-13: ../qemu/net/checksum.c:189:23: error: variable 'buf_off' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by: Eric Blake Signed-off-by: Richard Henderson --- net/checksum.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/checksum.c b

[PULL for-6.1 09/12] hw/ppc/spapr_events: Remove unused variable from check_exception

2021-07-26 Thread Richard Henderson
>From clang-13: hw/ppc/spapr_events.c:937:14: error: variable 'xinfo' set but not used \ [-Werror,-Wunused-but-set-variable] Acked-by: David Gibson Signed-off-by: Richard Henderson --- hw/ppc/spapr_events.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/ppc/spapr_events.c b/hw/p

[PULL for-6.1 06/12] util/selfmap: Discard mapping on error

2021-07-26 Thread Richard Henderson
>From clang-13: util/selfmap.c:26:21: error: variable 'errors' set but not used \ [-Werror,-Wunused-but-set-variable] Quite right of course, but there's no reason not to check errors. First, incrementing errors is incorrect, because qemu_strtoul returns an errno not a count -- just or them to

[PULL for-6.1 10/12] hw/pci-hist/pnv_phb4: Fix typo in pnv_phb4_ioda_write

2021-07-26 Thread Richard Henderson
>From clang-13: hw/pci-host/pnv_phb4.c:375:18: error: variable 'v' set but not used \ [-Werror,-Wunused-but-set-variable] It's pretty clear that we meant to write back 'v' after all that computation and not 'val'. Acked-by: David Gibson Acked-by: Benjamin Herrenschmidt Reviewed-by: Cédric L

[PULL for-6.1 12/12] tests/unit: Remove unused variable from test_io

2021-07-26 Thread Richard Henderson
>From clang-13: tests/unit/test-iov.c:161:26: error: variable 't' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tests/unit/test-iov.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tes

<    1   2   3   >