[PULL 38/53] target/i386: Correct the warning message of Intel PT

2020-07-06 Thread Paolo Bonzini
From: Luwei Kang The CPUID level need to be set to 0x14 manually on old machine-type if Intel PT is enabled in guest. E.g. the CPUID[0].EAX(level)=7 and CPUID[7].EBX[25](intel-pt)=1 when the Qemu with "-machine pc-i440fx-3.1 -cpu qemu64,+intel-pt" parameter. This patch corrects the warning

[PULL 51/53] target/i386: Add SERIALIZE cpu feature

2020-07-06 Thread Paolo Bonzini
From: Cathy Zhang The availability of the SERIALIZATION instruction is indicated by the presence of the CPUID feature flag SERIALIZE, which is defined as CPUID.(EAX=7,ECX=0):ECX[bit 14]. The release spec link is as follows: https://software.intel.com/content/dam/develop/public/us/en/documents/\

[PULL 48/53] target/i386/kvm: Simplify get_para_features()

2020-07-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The KVMState* argument is now unused, drop it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck Message-Id: <20200623105052.1700-6-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- target/i386/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PULL 53/53] scripts: improve message when TAP based tests fail

2020-07-06 Thread Paolo Bonzini
From: Daniel P. Berrangé If one of the qtests fails, the TAP driver prints out a message like: ERROR - too few tests run (expected 3, got 1) which fails to tell you which test program failed. This is a critical ommission when many tests are running in parallel as their output is interleaved.

[PULL 19/53] MAINTAINERS: Add Cameron as HVF co-maintainer

2020-07-06 Thread Paolo Bonzini
From: Roman Bolshakov Similar patch was sent a while ago but got lost. While at it, add a status wiki page. Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov Message-Id: <20200624225850.16982-9-r.bolsha...@yadro.com> Signed-off-by: Paolo Bonzini --- MAINTAINERS | 2 ++ 1 file changed, 2

[PULL 33/53] target/i386: sev: fail query-sev-capabilities if QEMU cannot use SEV

2020-07-06 Thread Paolo Bonzini
In some cases, such as if the kvm-amd "sev" module parameter is set to 0, SEV will be unavailable but query-sev-capabilities will still return all the information. This tricks libvirt into erroneously reporting that SEV is available. Check the actual usability of the feature and return the

[PULL 47/53] accel/kvm: Simplify kvm_check_extension_list()

2020-07-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The KVMState* argument is now unused, drop it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck Message-Id: <20200623105052.1700-4-phi...@redhat.com> Signed-off-by: Paolo Bonzini --- accel/kvm/kvm-all.c | 6 +++--- 1 file changed, 3

[PULL 01/53] tcg/svm: use host cr4 during NPT page table walk

2020-07-06 Thread Paolo Bonzini
From: Alexander Boettcher During a page table walk of TCG+SVM the code in target/i386/excp_helper.c get_hphys() uses the cr4 register of the guest instead of the hypervisor to check for the PSE bit. In the test case we have, the guest have not enabled (yet) the PSE bit and so the page table walk

[PULL 42/53] cpu-throttle: new module, extracted from cpus.c

2020-07-06 Thread Paolo Bonzini
From: Claudio Fontana move the vcpu throttling functionality into its own module. This functionality is not specific to any accelerator, and it is used currently by migration to slow down guests to try to have migrations converge, and by the cocoa MacOS UI to throttle speed. cpu-throttle

[PULL 11/53] coverity: provide Coverity-friendly MIN_CONST and MAX_CONST

2020-07-06 Thread Paolo Bonzini
From: Eric Blake Coverity has problems seeing through __builtin_choose_expr, which result in it abandoning analysis of later functions that utilize a definition that used MIN_CONST or MAX_CONST, such as in qemu-file.c: 50DECLARE_BITMAP(may_free, MAX_IOV_SIZE); CID 1429992 (#1 of 1):

[PULL 40/53] pc: fix leak in pc_system_flash_cleanup_unused

2020-07-06 Thread Paolo Bonzini
From: Alexander Bulekov tries to fix a leak detected when building with --enable-sanitizers: ./i386-softmmu/qemu-system-i386 Upon exit: ==13576==ERROR: LeakSanitizer: detected memory leaks Direct leak of 1216 byte(s) in 1 object(s) allocated from: #0 0x7f9d2ed5c628 in malloc

[PULL 22/53] MAINTAINERS: Cover the HAX accelerator stub

2020-07-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Cover accel/stubs/hax-stub.c in the HAXM section. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index d4d6dc7ef5..72d5871f41 100644 ---

[PULL 31/53] KVM: x86: believe what KVM says about WAITPKG

2020-07-06 Thread Paolo Bonzini
Currently, QEMU is overriding KVM_GET_SUPPORTED_CPUID's answer for the WAITPKG bit depending on the "-overcommit cpu-pm" setting. This is a bad idea because it does not even check if the host supports it, but it can be done in x86_cpu_realizefn just like we do for the MONITOR bit. This patch

[PULL 37/53] checkpatch: Change occurences of 'kernel' to 'qemu' in user messages

2020-07-06 Thread Paolo Bonzini
From: Aleksandar Markovic It is odd that we inform user that, for example, his current working directory is not kernel root, when, in face, we mean qemu root. Replace that and few other similar odd user messages. Signed-off-by: Aleksandar Markovic Message-Id:

[PULL 30/53] target/i386: implement undocumented "smsw r32" behavior

2020-07-06 Thread Paolo Bonzini
In 32-bit mode, the higher 16 bits of the destination register are undefined. In practice CR0[31:0] is stored, just like in 64-bit mode, so just remove the "if" that currently differentiates the behavior. Reviewed-by: Richard Henderson Reported-by: Roman Bolshakov Reviewed-by: Roman Bolshakov

[PULL 21/53] MAINTAINERS: Add an 'overall' entry for accelerators

2020-07-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2593e0f20f..d4d6dc7ef5

[PULL 15/53] i386: hvf: Make long mode enter and exit clearer

2020-07-06 Thread Paolo Bonzini
From: Cameron Esfahani Intel SDM "9.8.5 Initializing IA-32e Mode" and "9.8.5.4 Switching Out of IA-32e Mode Operation" define activation and deactivation of long mode only upon a change of CR0.PG but current code invokes exit_long_mode() unconditionally until LME is cleared. Signed-off-by:

[PULL 20/53] MAINTAINERS: Fix KVM path expansion glob

2020-07-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The KVM files has been moved from target-ARCH to the target/ARCH/ folder in commit fcf5ef2a. Fix the pathname expansion. Fixes: fcf5ef2a ("Move target-* CPU file into a target/ folder") Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: Alex

[PULL 24/53] Makefile: Write MINIKCONF variables as one entry per line

2020-07-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Having one entry per line helps reviews/refactors. As we are going to modify the MINIKCONF variables, split them now to ease further review. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini

[PULL 18/53] i386: hvf: Clean up synchronize functions

2020-07-06 Thread Paolo Bonzini
From: Roman Bolshakov Make them more concise and consitent with the rest of the code in the file and drop non-relevant TODO. Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov Message-Id: <20200630102824.77604-9-r.bolsha...@yadro.com> Signed-off-by: Paolo Bonzini --- target/i386/hvf/hvf.c

[PULL 23/53] Makefile: Remove dangerous EOL trailing backslash

2020-07-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé One might get caught trying to understand unexpected Makefile behavior. Trailing backslash can help to split very long lines, but are rather dangerous when nothing follow. Preserve other developers debugging time by removing this one. Reviewed-by: Thomas Huth

[PULL 25/53] accel/Kconfig: Extract accel selectors into their own config

2020-07-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Move the accel selectors from the global Kconfig.host to their own Kconfig file. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- Kconfig.host | 7 --- Makefile | 1 +

[PULL 13/53] i386: hvf: Move synchronize functions to sysemu

2020-07-06 Thread Paolo Bonzini
From: Roman Bolshakov Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov Message-Id: <20200630102824.77604-3-r.bolsha...@yadro.com> Signed-off-by: Paolo Bonzini --- cpus.c| 12 include/sysemu/hw_accel.h | 10 ++ 2 files changed, 10 insertions(+), 12

[PULL 06/53] tests/qmp-cmd-test: Add qmp/object-add-failure-modes

2020-07-06 Thread Paolo Bonzini
From: Eric Auger Merge the existing object-add test cases into a single test functions and cover more failure cases. Signed-off-by: Eric Auger Message-Id: <20200629193424.30280-4-eric.au...@redhat.com> Signed-off-by: Paolo Bonzini --- tests/qtest/qmp-cmd-test.c | 112

[PULL 09/53] target/i386: fix IEEE SSE floating-point exception raising

2020-07-06 Thread Paolo Bonzini
From: Joseph Myers The SSE instruction implementations all fail to raise the expected IEEE floating-point exceptions because they do nothing to convert the exception state from the softfloat machinery into the exception flags in MXCSR. Fix this by adding such conversions. Unlike for x87,

[PULL 16/53] i386: hvf: Move Guest LMA reset to macvm_set_cr0()

2020-07-06 Thread Paolo Bonzini
From: Roman Bolshakov The only useful purpose of hvf_reset_vcpu() is to clear "IA-32e mode guest" (LMA) VM-Entry control. But it can be moved to macvm_set_cr0() which is indirectly used by post-init and post-reset to flush emulator state. That enables clean removal of hvf_reset_vcpu(). LMA is

[PULL 17/53] i386: hvf: Don't duplicate register reset

2020-07-06 Thread Paolo Bonzini
From: Roman Bolshakov hvf_reset_vcpu() duplicates actions performed by x86_cpu_reset(). The difference is that hvf_reset_vcpu() stores initial values directly to VMCS while x86_cpu_reset() stores it in CPUX86State and then cpu_synchronize_all_post_init() or cpu_synchronize_all_post_reset()

[PULL 02/53] tests: Inject test name also when the test fails

2020-07-06 Thread Paolo Bonzini
From: Havard Skinnemoen If a test is unsuccessful, the result is "not ok", which does not match the regex because it includes a space. This regex matches both "ok" and "not ok". Signed-off-by: Havard Skinnemoen Message-Id: <20200628213046.2028271-1-hskinnem...@google.com> Signed-off-by: Paolo

[PULL 00/53] Misc patches for QEMU 5.1 soft freeze

2020-07-06 Thread Paolo Bonzini
The following changes since commit fc1bff958998910ec8d25db86cd2f53ff125f7ab: hw/misc/pca9552: Add missing TypeInfo::class_size field (2020-06-29 21:16:10 +0100) are available in the Git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to

[PULL 10/53] KVM: add support for AMD nested live migration

2020-07-06 Thread Paolo Bonzini
Support for nested guest live migration is part of Linux 5.8, add the corresponding code to QEMU. The migration format consists of a few flags, is an opaque 4k blob. The blob is in VMCB format (the control area represents the L1 VMCB control fields, the save area represents the pre-vmentry

[PULL 14/53] i386: hvf: Add hvf_cpu_synchronize_pre_loadvm()

2020-07-06 Thread Paolo Bonzini
From: Roman Bolshakov hvf lacks an implementation of cpu_synchronize_pre_loadvm(). Cc: Cameron Esfahani Signed-off-by: Roman Bolshakov Message-Id: <20200630102824.77604-4-r.bolsha...@yadro.com> Signed-off-by: Paolo Bonzini --- include/sysemu/hvf.h | 1 + include/sysemu/hw_accel.h | 3

Re: [PATCH v7 14/17] hw/sd/sdcard: Make iolen unsigned

2020-07-06 Thread Alistair Francis
On Tue, Jun 30, 2020 at 6:51 AM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > I/O request length can not be negative. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > v4: Use uint32_t (pm215) > --- > hw/sd/sd.c | 2 +- >

[PULL 07/53] hw/core/null-machine: Do not initialize unused chardev backends

2020-07-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The MachineClass uses an inverted logic (inherited from the PC machines [*]) to create the chardev backends for the default devices (see commits 998bbd74b9d..aa40fc9c964 and ac33f8fad14). As the none-machine doesn't have any hardware device, it is pointless to

[PULL 12/53] i386: hvf: Set env->eip in macvm_set_rip()

2020-07-06 Thread Paolo Bonzini
From: Roman Bolshakov cpu_synchronize_state() is currently no-op for hvf but BIOS will hang in vAPIC option ROM when cpu_synchronize_state() is wired to hvf_cpu_synchronize_state(). cpu_synchronize_state() state is called from vapic_write() during option ROM initialization. It sets dirty flag

[PULL 08/53] target/i386: set SSE FTZ in correct floating-point state

2020-07-06 Thread Paolo Bonzini
From: Joseph Myers The code to set floating-point state when MXCSR changes calls set_flush_to_zero on >fp_status, so affecting the x87 floating-point state rather than the SSE state. Fix to call it for >sse_status instead. Signed-off-by: Joseph Myers Message-Id: Signed-off-by: Paolo Bonzini

[PULL 05/53] tests/qmp-cmd-test: Add qmp/object-add-duplicate-id

2020-07-06 Thread Paolo Bonzini
From: Eric Auger This new test checks that attempting to create an object with an existing ID gracefully fails. Signed-off-by: Eric Auger Acked-by: Thomas Huth Reviewed-by: Markus Armbruster Message-Id: <20200629193424.30280-3-eric.au...@redhat.com> Signed-off-by: Paolo Bonzini ---

[PULL 03/53] util/qemu-error: prepend guest name to error message to identify affected VM owner

2020-07-06 Thread Paolo Bonzini
From: Mario Smarduch This is followup patch to the one submitted back in Oct, 19 https://lists.gnu.org/archive/html/qemu-devel/2019-10/msg02102.html My mistake here, I took my eyes of the mailing list after I got the initial thumbs up. This patch follows up on Markus comments in the above

[PULL 04/53] qom: Introduce object_property_try_add_child()

2020-07-06 Thread Paolo Bonzini
From: Eric Auger object_property_add() does not allow object_property_try_add() to gracefully fail as _abort is passed as an error handle. However such failure can easily be triggered from the QMP shell when, for instance, one attempts to create an object with an id that already exists. This is

Re: [PATCH v3 00/11] hw/sd/sdcard: Fix CVE-2020-13253 & cleanups

2020-07-06 Thread Alistair Francis
On Mon, Jun 8, 2020 at 10:48 AM Philippe Mathieu-Daudé wrote: > > Hi Alistair, > > On 6/5/20 12:22 PM, Philippe Mathieu-Daudé wrote: > > Patches 2 & 3 fix CVE-2020-13253. > > The rest are (accumulated) cleanups. > > > > Supersedes: <20200604182502.24228-1-f4...@amsat.org> > > > > Philippe

Re: [PATCH v7 12/17] hw/sd/sdcard: Simplify cmd_valid_while_locked()

2020-07-06 Thread Alistair Francis
On Tue, Jun 30, 2020 at 6:44 AM Philippe Mathieu-Daudé wrote: > > cmd_valid_while_locked() only needs to read SDRequest->cmd, > pass it directly and make it const. > > Reviewed-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- >

Re: [PATCH v5 11/21] virtio-pci: Proxy for virtio-mem

2020-07-06 Thread David Hildenbrand
On 06.07.20 17:28, Cornelia Huck wrote: > On Fri, 26 Jun 2020 09:22:38 +0200 > David Hildenbrand wrote: > >> Let's add a proxy for virtio-mem, make it a memory device, and >> pass-through the properties. >> >> Reviewed-by: Pankaj Gupta >> Cc: "Michael S. Tsirkin" >> Cc: Marcel Apfelbaum >>

Re: [PATCH v7 11/17] hw/sd/sdcard: Update the SDState documentation

2020-07-06 Thread Alistair Francis
On Tue, Jun 30, 2020 at 6:45 AM Philippe Mathieu-Daudé wrote: > > Add more descriptive comments to keep a clear separation > between static property vs runtime changeable. > > Suggested-by: Peter Maydell > Reviewed-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by:

Re: [PATCH v3 28/44] qom: Use returned bool to check for failure, manual part

2020-07-06 Thread Vladimir Sementsov-Ogievskiy
On 06.07.2020 11:09, Markus Armbruster wrote: The previous commit used Coccinelle to convert from checking the Error object to checking the return value. Convert a few more manually. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH v7 06/17] hw/sd/sdcard: Restrict Class 6 commands to SCSD cards

2020-07-06 Thread Alistair Francis
On Tue, Jun 30, 2020 at 6:44 AM Philippe Mathieu-Daudé wrote: > > Only SCSD cards support Class 6 (Block Oriented Write Protection) > commands. > > "SD Specifications Part 1 Physical Layer Simplified Spec. v3.01" > > 4.3.14 Command Functional Difference in Card Capacity Types > > * Write

Re: [PATCH rc6 22/30] target/avr: Register AVR support with the rest of QEMU

2020-07-06 Thread Thomas Huth
On 06/07/2020 16.56, Eric Blake wrote: > On 7/5/20 9:03 AM, Thomas Huth wrote: >> From: Michael Rolnik >> >> Add AVR related definitions into QEMU. >> >> [AM: Remove word 'Atmel' from filenames and all elements of code] >> Suggested-by: Aleksandar Markovic >> Signed-off-by: Michael Rolnik >>

Re: [PATCH] hw/net/can: Add missing fallthrough statements

2020-07-06 Thread Laurent Vivier
Le 30/06/2020 à 09:55, Thomas Huth a écrit : > Add fallthrough annotations to be able to compile the code without > warnings when using -Wimplicit-fallthrough in our CFLAGS. Looking > at the code, it seems like the fallthrough is indeed intended here, > so the comments should be appropriate. > >

Re: [PATCH v7 05/17] hw/sd/sdcard: Do not switch to ReceivingData if address is invalid

2020-07-06 Thread Alistair Francis
On Tue, Jun 30, 2020 at 6:42 AM Philippe Mathieu-Daudé wrote: > > Only move the state machine to ReceivingData if there is no > pending error. This avoids later OOB access while processing > commands queued. > > "SD Specifications Part 1 Physical Layer Simplified Spec. v3.01" > > 4.3.3 Data

Re: [PATCH v7 02/17] hw/sd/sdcard: Update coding style to make checkpatch.pl happy

2020-07-06 Thread Alistair Francis
On Tue, Jun 30, 2020 at 6:40 AM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > To make the next commit easier to review, clean this code first. > > Reviewed-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- >

Re: [PATCH] trivial: Remove trailing whitespaces

2020-07-06 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200706162300.1084753-1-dinec...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] trivial: Remove trailing whitespaces Type: series Message-id:

Re: [PATCH 4/4] hw/sd/milkymist: Do not create SD card within the SDHCI controller

2020-07-06 Thread Alistair Francis
On Sun, Jul 5, 2020 at 2:10 PM Philippe Mathieu-Daudé wrote: > > SDHCI controllers provide a SD Bus to plug SD cards, but don't > come with SD card plugged in :) Let the machine/board object > create and plug the SD cards when required. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by:

Re: [PATCH] trivial: Respect alphabetical order of .o files in Makefile.objs

2020-07-06 Thread Laurent Vivier
Le 29/06/2020 à 11:49, Christophe de Dinechin a écrit : > The vmgenid.o is the only file that is not in alphabetical order. > > Signed-off-by: Christophe de Dinechin > --- > stubs/Makefile.objs | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/stubs/Makefile.objs

Re: [PATCH 2/4] hw/lm32/milkymist: Comment to remember some IRQs lines are left unwired

2020-07-06 Thread Alistair Francis
On Sun, Jul 5, 2020 at 2:10 PM Philippe Mathieu-Daudé wrote: > > The 'card is readonly' and 'card inserted' IRQs are not wired. > Add a comment in case someone know where to wire them. > > Signed-off-by: Philippe Mathieu-Daudé I'm not convinced adding fixmes or todos in the code is the right

Re: [PATCH 3/4] hw/sd/milkymist: Create the SDBus at init()

2020-07-06 Thread Alistair Francis
On Sun, Jul 5, 2020 at 2:10 PM Philippe Mathieu-Daudé wrote: > > We don't need to wait until realize() to create the SDBus, > create it in init() directly. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/sd/milkymist-memcard.c | 6 +++--- > 1 file

Re: [PATCH 1/4] hw/lm32/milkymist: Un-inline milkymist_memcard_create()

2020-07-06 Thread Alistair Francis
On Sun, Jul 5, 2020 at 2:13 PM Philippe Mathieu-Daudé wrote: > > As we will modify milkymist_memcard_create(), move it first > to the source file where it is used. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/lm32/milkymist-hw.h | 11

Re: [PATCH] intel_iommu: "aw-bits" error message still refers to "x-aw-bits"

2020-07-06 Thread Laurent Vivier
Le 25/06/2020 à 17:52, Menno Lageman a écrit : > Commit 4b49b586c4 ('intel_iommu: remove "x-" prefix for "aw-bits"') > removed the "x-" prefix but but didn't update the error message > accordingly. > > Signed-off-by: Menno Lageman > --- > hw/i386/intel_iommu.c | 2 +- > 1 file changed, 1

Re: [PATCH] hw/core/null-machine: Do not initialize unused chardev backends

2020-07-06 Thread Laurent Vivier
Le 24/06/2020 à 13:01, Thomas Huth a écrit : > On 24/06/2020 12.56, Philippe Mathieu-Daudé wrote: >> The MachineClass uses an inverted logic (inherited from the >> PC machines [*]) to create the chardev backends for the default >> devices (see commits 998bbd74b9d..aa40fc9c964 and ac33f8fad14). >>

[PATCH] trivial: Remove trailing whitespaces

2020-07-06 Thread Christophe de Dinechin
There are a number of unnecessary trailing whitespaces that have accumulated over time in the source code. They cause stray changes in patches if you use tools that automatically remove them. Tested by doing a `git diff -w` after the change. This could probably be turned into a pre-commit hook.

Re: [PATCH v4 08/10] hw/sd/pl181: Replace disabled fprintf()s by trace events

2020-07-06 Thread Alistair Francis
On Sun, Jul 5, 2020 at 1:51 PM Philippe Mathieu-Daudé wrote: > > Convert disabled DPRINTF() to trace events and remove ifdef'ry. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/sd/pl181.c | 26 +- > hw/sd/trace-events

Re: [PATCH v4 06/10] hw/sd/pl181: Expose a SDBus and connect the SDCard to it

2020-07-06 Thread Alistair Francis
On Sun, Jul 5, 2020 at 1:47 PM Philippe Mathieu-Daudé wrote: > > Convert the controller to the SDBus API: > - add the a TYPE_PL181_BUS object of type TYPE_SD_BUS, > - adapt the SDBusClass set_inserted/set_readonly handlers > - create the bus in the PL181 controller > - switch legacy sd_*() API to

Re: [PATCH 0/6] migration: bring savevm/loadvm/delvm over to QMP

2020-07-06 Thread Kevin Wolf
Am 06.07.2020 um 18:03 hat Daniel P. Berrangé geschrieben: > On Mon, Jul 06, 2020 at 05:50:11PM +0200, Kevin Wolf wrote: > > Am 06.07.2020 um 17:29 hat Daniel P. Berrangé geschrieben: > > > On Mon, Jul 06, 2020 at 05:27:01PM +0200, Kevin Wolf wrote: > > > > Am 03.07.2020 um 19:29 hat Denis V.

Re: [PATCH v2 9/9] hw/arm/smmuv3: Advertise SMMUv3.2 range invalidation

2020-07-06 Thread Robin Murphy
On 2020-07-02 16:26, Eric Auger wrote: Expose the RIL bit so that the guest driver uses range invalidation. Hmm, this is a v3.2 feature... so strictly, in order to advertise it you would need to claim at least v3.1 in SMMU_AIDR and implement all the mandatory v3.1 behaviour ;) Robin.

Re: [PATCH 2/6] migration: introduce savevm, loadvm, delvm QMP commands

2020-07-06 Thread Kevin Wolf
Am 03.07.2020 um 18:02 hat Daniel P. Berrangé geschrieben: > On Fri, Jul 03, 2020 at 04:49:33PM +0100, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Thu, Jul 02, 2020 at 01:12:52PM -0500, Eric Blake wrote: > > > > On 7/2/20 12:57 PM, Daniel P.

Re: [PATCH v4 07/10] hw/sd/pl181: Do not create SD card within the SDHCI controller

2020-07-06 Thread Alistair Francis
On Sun, Jul 5, 2020 at 1:52 PM Philippe Mathieu-Daudé wrote: > > SDHCI controllers provide a SD Bus to plug SD cards, but don't > come with SD card plugged in :) Let the machine/board object > create and plug the SD cards when required. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by:

Re: [PATCH 0/6] migration: bring savevm/loadvm/delvm over to QMP

2020-07-06 Thread Daniel P . Berrangé
On Mon, Jul 06, 2020 at 07:10:16PM +0300, Denis V. Lunev wrote: > On 7/6/20 7:03 PM, Daniel P. Berrangé wrote: > > On Mon, Jul 06, 2020 at 05:50:11PM +0200, Kevin Wolf wrote: > >> Am 06.07.2020 um 17:29 hat Daniel P. Berrangé geschrieben: > >>> On Mon, Jul 06, 2020 at 05:27:01PM +0200, Kevin Wolf

Re: [PATCH v4 09/11] fix the prototype of muls64/mulu64

2020-07-06 Thread Laurent Vivier
Le 02/07/2020 à 01:43, Lijun Pan a écrit : > The prototypes of muls64/mulu64 in host-utils.h should match the > definitions in host-utils.c > > Signed-off-by: Lijun Pan > --- > Reviewed-by: Richard Henderson > no change since v1 > > include/qemu/host-utils.h | 4 ++-- > 1 file changed, 2

Re: [PATCH 0/6] migration: bring savevm/loadvm/delvm over to QMP

2020-07-06 Thread Denis V. Lunev
On 7/6/20 7:03 PM, Daniel P. Berrangé wrote: > On Mon, Jul 06, 2020 at 05:50:11PM +0200, Kevin Wolf wrote: >> Am 06.07.2020 um 17:29 hat Daniel P. Berrangé geschrieben: >>> On Mon, Jul 06, 2020 at 05:27:01PM +0200, Kevin Wolf wrote: Am 03.07.2020 um 19:29 hat Denis V. Lunev geschrieben: >

Re: [PATCH v3 27/44] qom: Use returned bool to check for failure, Coccinelle part

2020-07-06 Thread Vladimir Sementsov-Ogievskiy
On 06.07.2020 11:09, Markus Armbruster wrote: The previous commit enables conversion of foo(..., ); if (err) { ... } to if (!foo(..., errp)) { ... } for QOM functions that now return true / false on success / error. Coccinelle script: @@

Re: [PATCH 0/6] migration: bring savevm/loadvm/delvm over to QMP

2020-07-06 Thread Denis V. Lunev
On 7/6/20 5:28 PM, Daniel P. Berrangé wrote: > On Fri, Jul 03, 2020 at 08:29:08PM +0300, Denis V. Lunev wrote: >> On 7/3/20 8:22 PM, Daniel P. Berrangé wrote: >>> On Fri, Jul 03, 2020 at 08:15:44PM +0300, Denis V. Lunev wrote: On 7/2/20 8:57 PM, Daniel P. Berrangé wrote: > When QMP was

Re: [PATCH 0/6] migration: bring savevm/loadvm/delvm over to QMP

2020-07-06 Thread Daniel P . Berrangé
On Mon, Jul 06, 2020 at 05:50:11PM +0200, Kevin Wolf wrote: > Am 06.07.2020 um 17:29 hat Daniel P. Berrangé geschrieben: > > On Mon, Jul 06, 2020 at 05:27:01PM +0200, Kevin Wolf wrote: > > > Am 03.07.2020 um 19:29 hat Denis V. Lunev geschrieben: > > > > On 7/3/20 8:22 PM, Daniel P. Berrangé

Re: [PATCH v3 06/44] qemu-option: Check return value instead of @err where convenient

2020-07-06 Thread Greg Kurz
On Mon, 6 Jul 2020 10:09:12 +0200 Markus Armbruster wrote: > Convert uses like > > opts = qemu_opts_create(..., ); > if (err) { > ... > } > > to > > opts = qemu_opts_create(..., ); The patch doesn't strictly do that since it also converts to errp. This is okay

Re: [PATCH v4 05/10] hw/sd/pl181: Use named GPIOs

2020-07-06 Thread Alistair Francis
On Sun, Jul 5, 2020 at 1:50 PM Philippe Mathieu-Daudé wrote: > > To make the code easier to manage/review/use, rename the > cardstatus[0] variable as 'card_readonly' and name the GPIO > "card-read-only". > Similarly with cardstatus[1], renamed as 'card_inserted' and > name its GPIO

Re: [PATCH 5/6] migration: support excluding block devs in QMP snapshot commands

2020-07-06 Thread Kevin Wolf
Am 02.07.2020 um 19:57 hat Daniel P. Berrangé geschrieben: > This wires up support for a new "exclude" parameter to the QMP commands > for snapshots (savevm, loadvm, delvm). This parameter accepts a list of > block driver state node names. > > One use case for this would be a VM using OVMF

Re: [PATCH v4 02/10] hw/sd/pl181: Rename pl181_send_command() as pl181_do_command()

2020-07-06 Thread Alistair Francis
On Sun, Jul 5, 2020 at 1:46 PM Philippe Mathieu-Daudé wrote: > > pl181_send_command() do a bus transaction (send or receive), > rename it as pl181_do_command(). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/sd/pl181.c | 4 ++-- > 1 file changed,

Re: [PATCH 3/3] linux-user: Add strace support for printing arguments of some clock and time functions

2020-07-06 Thread Laurent Vivier
Le 26/06/2020 à 23:39, Filip Bozuta a écrit : > This patch implements strace argument printing functionality for following > syscalls: > > * clock_getres, clock_gettime, clock_settime - clock and time functions > > int clock_getres(clockid_t clockid, struct timespec *res) >

Re: [PATCH 0/6] migration: bring savevm/loadvm/delvm over to QMP

2020-07-06 Thread Kevin Wolf
Am 06.07.2020 um 17:29 hat Daniel P. Berrangé geschrieben: > On Mon, Jul 06, 2020 at 05:27:01PM +0200, Kevin Wolf wrote: > > Am 03.07.2020 um 19:29 hat Denis V. Lunev geschrieben: > > > On 7/3/20 8:22 PM, Daniel P. Berrangé wrote: > > > > On Fri, Jul 03, 2020 at 08:15:44PM +0300, Denis V.

[PATCH 1/1] qga-win: Fix QGA VSS Provider service stop failure

2020-07-06 Thread Basil Salman
From: Basil Salman On one hand "guest-fsfreeze-freeze" command, "COM+ System Application service" is stopped, on the other hand "guest-fsfreeze-thaw" stops QGA VSS Provider service from "COM+ Application Admin Catalog". Invoking a series of freeze and thaw commands may result in QGA failing to

Re: [PATCH v3 26/44] qom: Make functions taking Error ** return bool, not void

2020-07-06 Thread Vladimir Sementsov-Ogievskiy
06.07.2020 11:09, Markus Armbruster wrote: See recent commit "error: Document Error API usage rules" for rationale. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 0/6] migration: bring savevm/loadvm/delvm over to QMP

2020-07-06 Thread Daniel P . Berrangé
On Mon, Jul 06, 2020 at 05:27:01PM +0200, Kevin Wolf wrote: > Am 03.07.2020 um 19:29 hat Denis V. Lunev geschrieben: > > On 7/3/20 8:22 PM, Daniel P. Berrangé wrote: > > > On Fri, Jul 03, 2020 at 08:15:44PM +0300, Denis V. Lunev wrote: > > >> On 7/2/20 8:57 PM, Daniel P. Berrangé wrote: > >

Re: [PATCH v5 11/21] virtio-pci: Proxy for virtio-mem

2020-07-06 Thread Cornelia Huck
On Fri, 26 Jun 2020 09:22:38 +0200 David Hildenbrand wrote: > Let's add a proxy for virtio-mem, make it a memory device, and > pass-through the properties. > > Reviewed-by: Pankaj Gupta > Cc: "Michael S. Tsirkin" > Cc: Marcel Apfelbaum > Cc: "Dr. David Alan Gilbert" > Cc: Igor Mammedov >

Re: [PATCH 0/6] migration: bring savevm/loadvm/delvm over to QMP

2020-07-06 Thread Kevin Wolf
Am 03.07.2020 um 19:29 hat Denis V. Lunev geschrieben: > On 7/3/20 8:22 PM, Daniel P. Berrangé wrote: > > On Fri, Jul 03, 2020 at 08:15:44PM +0300, Denis V. Lunev wrote: > >> On 7/2/20 8:57 PM, Daniel P. Berrangé wrote: > >>> When QMP was first introduced some 10+ years ago now, the snapshot >

Re: [PATCH v3 25/44] qom: Put name parameter before value / visitor parameter

2020-07-06 Thread Vladimir Sementsov-Ogievskiy
06.07.2020 11:09, Markus Armbruster wrote: The object_property_set_FOO() setters take property name and value in an unusual order: void object_property_set_FOO(Object *obj, FOO_TYPE value, const char *name, Error **errp) Having to pass value before name

Re: [PATCH rc6 22/30] target/avr: Register AVR support with the rest of QEMU

2020-07-06 Thread Eric Blake
On 7/5/20 9:03 AM, Thomas Huth wrote: From: Michael Rolnik Add AVR related definitions into QEMU. [AM: Remove word 'Atmel' from filenames and all elements of code] Suggested-by: Aleksandar Markovic Signed-off-by: Michael Rolnik Signed-off-by: Richard Henderson Signed-off-by: Aleksandar

Re: [PATCH v3 04/44] macio: Tidy up error handling in macio_newworld_realize()

2020-07-06 Thread Greg Kurz
On Mon, 6 Jul 2020 10:09:10 +0200 Markus Armbruster wrote: > macio_newworld_realize() effectively ignores ns->gpio realization > errors, leaking the Error object. Fortunately, macio_gpio_realize() > can't actually fail. Tidy up. > > Cc: Mark Cave-Ayland > Cc: David Gibson > Signed-off-by:

Re: [PATCH v3 03/44] qdev: Use returned bool to check for qdev_realize() etc. failure

2020-07-06 Thread Greg Kurz
On Mon, 06 Jul 2020 13:35:19 +0200 Markus Armbruster wrote: > Greg Kurz writes: > > > On Mon, 6 Jul 2020 10:09:09 +0200 > > Markus Armbruster wrote: > > > >> Convert > >> > >> foo(..., ); > >> if (err) { > >> ... > >> } > >> > >> to > >> > >> if (!foo(..., )) { >

Re: [PATCH v3 01/44] error: Improve examples in error.h's big comment

2020-07-06 Thread Markus Armbruster
Markus Armbruster writes: > Show errp instead of where is actually unusual. Add a > missing declaration. Add a second error pileup example. > > Signed-off-by: Markus Armbruster > Reviewed-by: Eric Blake > Reviewed-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Greg Kurz > --- >

Re: [PULL 00/10] Modules 20200702 patches

2020-07-06 Thread Claudio Fontana
On 7/3/20 2:05 PM, Paolo Bonzini wrote: > On 03/07/20 12:39, Gerd Hoffmann wrote: >> On Fri, Jul 03, 2020 at 09:54:13AM +0100, Peter Maydell wrote: >>> On Thu, 2 Jul 2020 at 13:23, Gerd Hoffmann wrote: The following changes since commit fc1bff958998910ec8d25db86cd2f53ff125f7ab:

Re: [PATCH 0/6] migration: bring savevm/loadvm/delvm over to QMP

2020-07-06 Thread Daniel P . Berrangé
On Fri, Jul 03, 2020 at 08:29:08PM +0300, Denis V. Lunev wrote: > On 7/3/20 8:22 PM, Daniel P. Berrangé wrote: > > On Fri, Jul 03, 2020 at 08:15:44PM +0300, Denis V. Lunev wrote: > >> On 7/2/20 8:57 PM, Daniel P. Berrangé wrote: > >>> When QMP was first introduced some 10+ years ago now, the

Re: DMA region abruptly removed from PCI device

2020-07-06 Thread Alex Williamson
On Mon, 6 Jul 2020 10:55:00 + Thanos Makatos wrote: > We have an issue when using the VFIO-over-socket libmuser PoC > (https://www.mail-archive.com/qemu-devel@nongnu.org/msg692251.html) instead of > the VFIO kernel module: we notice that DMA regions used by the emulated device > can be

Re: [RFC PATCH v2 08/23] hw/display/ramfb: Emit warning when old code is used

2020-07-06 Thread Philippe Mathieu-Daudé
On 7/6/20 4:15 PM, Gerd Hoffmann wrote: > On Sat, Jul 04, 2020 at 05:38:53PM +0200, Philippe Mathieu-Daudé wrote: >> This code hasn't been QOM'ified yet. Warn the user. > > False positive IMHO. This is designed to be integrated into other > devices for boot display. vfio/display.c uses it that

Re: [RFC PATCH v2 08/23] hw/display/ramfb: Emit warning when old code is used

2020-07-06 Thread Gerd Hoffmann
On Sat, Jul 04, 2020 at 05:38:53PM +0200, Philippe Mathieu-Daudé wrote: > This code hasn't been QOM'ified yet. Warn the user. False positive IMHO. This is designed to be integrated into other devices for boot display. vfio/display.c uses it that way. There also is a standalone version

Re: [PATCH v4 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helper

2020-07-06 Thread Cornelia Huck
On Mon, 6 Jul 2020 14:25:20 +0100 Stefan Hajnoczi wrote: > On Thu, May 28, 2020 at 05:35:55PM +0200, Cornelia Huck wrote: > > On Wed, 27 May 2020 11:29:21 +0100 > > Stefan Hajnoczi wrote: > > > > > Multi-queue devices achieve the best performance when each vCPU has a > > > dedicated queue.

Re: [PATCH v4 08/21] microvm/acpi: add minimal acpi support

2020-07-06 Thread Gerd Hoffmann
On Sun, Jul 05, 2020 at 07:48:14AM -0400, Michael S. Tsirkin wrote: > On Fri, Jul 03, 2020 at 09:25:10PM +0200, Gerd Hoffmann wrote: > > On Fri, Jul 03, 2020 at 09:09:43AM -0400, Michael S. Tsirkin wrote: > > > On Thu, Jul 02, 2020 at 10:48:46PM +0200, Gerd Hoffmann wrote: > > > > +/* copy AML

Re: [PATCH v3 2/9] util/qemu-openpty.c: Don't assume pty.h is glibc-only

2020-07-06 Thread Eric Blake
On 7/3/20 10:12 AM, Thomas Huth wrote: +++ b/util/qemu-openpty.c @@ -35,7 +35,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" -#if defined(__GLIBC__) +#if defined CONFIG_PTY Shouldn't there be some parentheses around CONFIG_PTY here? No, they are optional, and omitting them

Re: [PATCH v2 4/9] hw/arm/smmu: Simplify the IOTLB key format

2020-07-06 Thread Auger Eric
Hi Peter, On 7/6/20 3:26 PM, Peter Maydell wrote: > On Thu, 2 Jul 2020 at 16:27, Eric Auger wrote: >> >> Instead of using a Jenkins hash function to generate >> the key let's just use a 64 bit unsigned integer that >> contains the asid and the 40 upper bits of the iova. >> A maximum of 52-bit

[PATCH v5 5/5] vhost-user-blk: default num_queues to -smp N

2020-07-06 Thread Stefan Hajnoczi
Automatically size the number of request virtqueues to match the number of vCPUs. This ensures that completion interrupts are handled on the same vCPU that submitted the request. No IPI is necessary to complete an I/O request and performance is improved. The maximum number of MSI-X vectors and

[PATCH v5 3/5] virtio-scsi: default num_queues to -smp N

2020-07-06 Thread Stefan Hajnoczi
Automatically size the number of virtio-scsi-pci, vhost-scsi-pci, and vhost-user-scsi-pci request virtqueues to match the number of vCPUs. Other transports continue to default to 1 request virtqueue. A 1:1 virtqueue:vCPU mapping ensures that completion interrupts are handled on the same vCPU that

[PATCH v5 1/5] virtio-pci: add virtio_pci_optimal_num_queues() helper

2020-07-06 Thread Stefan Hajnoczi
Multi-queue devices achieve the best performance when each vCPU has a dedicated queue. This ensures that virtqueue used notifications are handled on the same vCPU that submitted virtqueue buffers. When another vCPU handles the the notification an IPI will be necessary to wake the submission vCPU

[PATCH v5 0/5] virtio-pci: enable blk and scsi multi-queue by default

2020-07-06 Thread Stefan Hajnoczi
v4: * Sorry for the long delay. I considered replacing this series with a simpler approach. Real hardware ships with a fixed number of queues (e.g. 128). The equivalent can be done in QEMU too. That way we don't need to magically size num_queues. In the end I decided against this

[PATCH v5 4/5] virtio-blk: default num_queues to -smp N

2020-07-06 Thread Stefan Hajnoczi
Automatically size the number of virtio-blk-pci request virtqueues to match the number of vCPUs. Other transports continue to default to 1 request virtqueue. A 1:1 virtqueue:vCPU mapping ensures that completion interrupts are handled on the same vCPU that submitted the request. No IPI is

[PATCH v5 2/5] virtio-scsi: introduce a constant for fixed virtqueues

2020-07-06 Thread Stefan Hajnoczi
The event and control virtqueues are always present, regardless of the multi-queue configuration. Define a constant so that virtqueue number calculations are easier to read. Signed-off-by: Stefan Hajnoczi Reviewed-by: Cornelia Huck Reviewed-by: Pankaj Gupta Reviewed-by: Philippe Mathieu-Daudé

<    1   2   3   4   5   >