Re: [PATCH v2 2/5] hw/arm: ast2600: Set AST2600_MAX_IRQ to value from datasheet

2021-03-01 Thread Philippe Mathieu-Daudé
On 3/1/21 2:06 AM, Andrew Jeffery wrote: > The datasheet says we have 197 IRQs allocated, and we need more than 128 > to describe IRQs from LPC devices. Raise the value now to allow > modelling of the LPC devices. > > Signed-off-by: Andrew Jeffery > --- > hw/arm/aspeed_ast2600.c | 2 +- > 1 file

Re: [PULL 27/29] vl: deprecate -writeconfig

2021-03-01 Thread Markus Armbruster
Paolo Bonzini writes: > The functionality of -writeconfig is limited and the code > does not even try to detect cases where it prints incorrect > syntax (for example if values have a quote in them, since > qemu_config_parse does not support any kind of escaping) > so remove it. > > Signed-off-by:

Re: [PATCH v2 3/5] hw/arm: ast2600: Correct the iBT interrupt ID

2021-03-01 Thread Philippe Mathieu-Daudé
On 3/1/21 2:06 AM, Andrew Jeffery wrote: > The AST2600 allocates distinct GIC IRQs for the LPC subdevices such as > the iBT device. Previously on the AST2400 and AST2500 the LPC subdevices > shared a single LPC IRQ. > > Signed-off-by: Andrew Jeffery > --- > hw/arm/aspeed_ast2600.c | 2 +- > 1 fi

Re: [PATCH 1/2] target/mips: Fold jazz behaviour into mips_cpu_do_transaction_failed

2021-03-01 Thread Philippe Mathieu-Daudé
On 2/28/21 10:39 PM, Richard Henderson wrote: > On 2/28/21 8:14 AM, Philippe Mathieu-Daudé wrote: >>> +/* Used for the jazz board to modify mips_cpu_do_transaction_failed. */ >> >> Isn't it possible to have other (old) boards doing something similar? > > It's possible, but I doubt any need to.

Re: issue with meson and recursion: negation missing in add?

2021-03-01 Thread Philippe Mathieu-Daudé
On 2/27/21 11:23 PM, Claudio Fontana wrote: > Hi Paolo, > > I don't know how to handle an issue in the current way we are using meson > with recursion, ie always recursing, > and testing multiple options inside the recursed directory. > > In the case of ARM, we have: > > target/arm/tcg/meson.bu

Re: [PATCH 1/3] docs: vhost-user: clean up request/reply description

2021-03-01 Thread Philippe Mathieu-Daudé
On 2/26/21 3:34 PM, Paolo Bonzini wrote: > It is not necessary to mention which side is sending/receiving > each payload; it is more interesting to say which is the request > and which is the reply. This also matches what vhost-user-gpu.rst > already does. > > While at it, ensure that all message

Re: [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse

2021-03-01 Thread Markus Armbruster
Samuel Thibault writes: > Hello, > > Daniel P. Berrangé, le lun. 22 févr. 2021 09:39:41 +, a ecrit: >> In general callers shouldn't care about which format was parsed. The use >> of [] is just a mechanism to reliably separate the port from the address. >> Once you have the address part getadd

Re: [PATCH] hw/pci: Have safer pcie_bus_realize() by checking error path

2021-03-01 Thread Philippe Mathieu-Daudé
ping? On 2/1/21 4:37 PM, Philippe Mathieu-Daudé wrote: > While pci_bus_realize() currently does not use the Error* argument, > it would be an error to leave pcie_bus_realize() setting bus->flags > if pci_bus_realize() had failed. > > Fix by using a local Error* and return early (propagating the e

Re: [PATCH] gitlab-ci: Disable vhost-kernel in build-disable job

2021-03-01 Thread Philippe Mathieu-Daudé
ping? On 1/31/21 11:46 AM, Philippe Mathieu-Daudé wrote: > Commit 299e6f19b3e ("vhost-net: revamp configure logic") added > the --enable-vhost-kernel option. > Disable it in the build-disable job. > > Signed-off-by: Philippe Mathieu-Daudé > --- > .gitlab-ci.yml | 1 + > 1 file changed, 1 insert

[PATCH v2 1/3] migration/ram: Modify the code comment of ram_save_host_page()

2021-03-01 Thread Kunkun Jiang
The ram_save_host_page() has been modified several times since its birth. But the comment hasn't been modified as it should be. It'd better to modify the comment to explain ram_save_host_page() more clearly. Signed-off-by: Keqian Zhu Signed-off-by: Kunkun Jiang --- migration/ram.c | 14 ++--

[PATCH v2 2/3] migration/ram: Modify ram_save_host_page() to match the comment

2021-03-01 Thread Kunkun Jiang
According to the comment, when the host page is a huge page, the migration_rate_limit() should be executed. If not, this function can be omitted to save time. Signed-off-by: Keqian Zhu Signed-off-by: Kunkun Jiang --- migration/ram.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH v2 3/3] migration/ram: Optimize ram_save_host_page()

2021-03-01 Thread Kunkun Jiang
Starting from pss->page, ram_save_host_page() will check every page and send the dirty pages up to the end of the current host page or the boundary of used_length of the block. If the host page size is a huge page, the step "check" will take a lot of time. This will improve performance to use migr

[PATCH v2 0/3] Some modifications about ram_save_host_page()

2021-03-01 Thread Kunkun Jiang
Hi, This series include patches as below: Patch 1-2: - modified the comment and code of ram_save_host_page() to make them match each other Patch 3: - optimized ram_save_host_page() by using migration_bitmap_find_dirty() to find dirty pages History: v1 -> v2: - Modify ram_save_host_page() comm

Re: [RFC PATCH 0/3] Add migration support for VFIO PCI devices in SMMUv3 nested stage mode

2021-03-01 Thread Kunkun Jiang
kindly ping, Any comments and reviews are welcome. Thanks. Kunkun Jiang. On 2021/2/19 17:42, Kunkun Jiang wrote: Hi all, Since the SMMUv3's nested translation stages[1] has been introduced by Eric, we need to pay attention to the migration of VFIO PCI devices in SMMUv3 nested stage mode. At p

Re: [PATCH v4 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse

2021-03-01 Thread Samuel Thibault
Markus Armbruster, le lun. 01 mars 2021 09:15:41 +0100, a ecrit: > Samuel Thibault writes: > > Specifying [127.0.0.1] would be odd, but for instance > > > > ssh localhost -D '[127.0.0.1]':23456 > > > > happens to listen on 127.0.0.1. So I would say that common practice > > really is that [] only

Re: [PATCH v25 14/20] i386: separate fpu_helper into user and sysemu parts

2021-03-01 Thread Claudio Fontana
On 2/26/21 7:42 PM, Richard Henderson wrote: > On 2/26/21 9:51 AM, Claudio Fontana wrote: >> +/* fpu_helper.c */ >> + >> +void do_fsave(CPUX86State *env, target_ulong ptr, int data32, uintptr_t ra); >> +void do_frstor(CPUX86State *env, target_ulong ptr, int data32, uintptr_t >> ra); >> +void do_fx

Re: [PATCH 1/2] target/mips: Fold jazz behaviour into mips_cpu_do_transaction_failed

2021-03-01 Thread Philippe Mathieu-Daudé
On 2/28/21 12:25 AM, Richard Henderson wrote: > Add a flag to MIPSCPUClass in order to avoid needing to > replace mips_tcg_ops.do_transaction_failed. > > Signed-off-by: Richard Henderson > --- > target/mips/cpu-qom.h | 3 +++ > hw/mips/jazz.c | 35 +++

[PATCH v26 01/20] target/i386: Rename helper_fldt, helper_fstt

2021-03-01 Thread Claudio Fontana
From: Richard Henderson Change the prefix from "helper" to "do". The former should be reserved for those functions that are called from TCG; the latter is in use within the file already for those functions that are called from the helper functions, adding a "retaddr" argument. Signed-off-by: Ri

[PATCH v26 02/20] target/i386: Split out do_fsave, do_frstor, do_fxsave, do_fxrstor

2021-03-01 Thread Claudio Fontana
From: Richard Henderson The helper_* functions must use GETPC() to unwind from TCG. The cpu_x86_* functions cannot, and directly calling the helper_* functions is a bug. Split out new functions that perform the work and can be used by both. Signed-off-by: Richard Henderson Reviewed-by: Philipp

[PATCH v26 00/20] i386 cleanup PART 2

2021-03-01 Thread Claudio Fontana
v25 -> v26: * i386: separate fpu_helper into user and sysemu parts - removed the splitting of the user mode into their own user/fpu_helper.c, seems not worth it. v24 -> v25: * i386: separate fpu_helper into user and sysemu parts - added 2 preliminary patches to the series (from Richard) -

[PATCH v26 03/20] i386: split cpu accelerators from cpu.c, using AccelCPUClass

2021-03-01 Thread Claudio Fontana
i386 is the first user of AccelCPUClass, allowing to split cpu.c into: cpu.ccpuid and common x86 cpu functionality host-cpu.c host x86 cpu functions and "host" cpu type kvm/kvm-cpu.cKVM x86 AccelCPUClass hvf/hvf-cpu.cHVF x86 AccelCPUClass tcg/tcg-cpu.cTCG x86 AccelCPU

[PATCH v26 08/20] meson: add target_user_arch

2021-03-01 Thread Claudio Fontana
the lack of target_user_arch makes it hard to fully leverage the build system in order to separate user code from sysemu code. Provide it, so that we can avoid the proliferation of #ifdef in target code. Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée [claudio: added changes for new ta

[PATCH v26 05/20] accel: introduce new accessor functions

2021-03-01 Thread Claudio Fontana
avoid open coding the accesses to cpu->accel_cpu interfaces, and instead introduce: accel_cpu_instance_init, accel_cpu_realizefn to be used by the targets/ initfn code, and by cpu_exec_realizefn respectively. Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée Reviewed-by: Richard Henderso

[PATCH v26 13/20] i386: split misc helper user stubs and sysemu part

2021-03-01 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/i386/tcg/misc_helper.c| 463 --- target/i386/tcg/sysemu/misc_helper.c | 438 + target/i386/tcg/user/misc_stubs.c| 75 + target/i386/tcg/sysemu/meson.build |

[PATCH v26 09/20] i386: split off sysemu-only functionality in tcg-cpu

2021-03-01 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/i386/tcg/tcg-cpu.h | 24 + target/i386/tcg/sysemu/tcg-cpu.c | 83 ++ target/i386/tcg/tcg-cpu.c | 75 ++- target/i386/tcg/meson.build|

[PATCH v26 10/20] i386: split smm helper (sysemu)

2021-03-01 Thread Claudio Fontana
smm is only really useful for sysemu, split in two modules around the CONFIG_USER_ONLY, in order to remove the ifdef and use the build system instead. add cpu_abort() when detecting attempts to enter SMM mode via SMI interrupt in user-mode, and assert that the cpu is not in SMM mode while translat

[PATCH v26 06/20] target/i386: fix host_cpu_adjust_phys_bits error handling

2021-03-01 Thread Claudio Fontana
move the check for phys_bits outside of host_cpu_adjust_phys_bits, because otherwise it is impossible to return an error condition explicitly. Signed-off-by: Claudio Fontana Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- target/i386/host-cpu.c

[PATCH v26 19/20] target/i386: gdbstub: only write CR0/CR2/CR3/EFER for sysemu

2021-03-01 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Cc: Paolo Bonzini Reviewed-by: Richard Henderson --- target/i386/gdbstub.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/target/i386/gdbstub.c b/target/i386/gdbstub.c index 4ad1295425..098a2ad15a 100644 --- a/target/i386/gdbstub.c +++ b/target/i3

[PATCH v26 07/20] accel-cpu: make cpu_realizefn return a bool

2021-03-01 Thread Claudio Fontana
overall, all devices' realize functions take an Error **errp, but return void. hw/core/qdev.c code, which realizes devices, therefore does: local_err = NULL; dc->realize(dev, &local_err); if (local_err != NULL) { goto fail; } However, we can improve at least accel_cpu to return a meaningful

[PATCH v26 11/20] i386: split tcg excp_helper into sysemu and user parts

2021-03-01 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/i386/tcg/excp_helper.c| 572 -- target/i386/tcg/sysemu/excp_helper.c | 581 +++ target/i386/tcg/user/excp_helper.c | 39 ++ target/i386/tcg/sysemu/meson.build |

[PATCH v26 15/20] i386: split svm_helper into sysemu and stub-only user

2021-03-01 Thread Claudio Fontana
For now we just copy over the previous user stubs, but really, everything that requires s->cpl == 0 should be impossible to trigger from user-mode emulation. Later on we should add a check that asserts this easily f.e.: static bool check_cpl0(DisasContext *s) { int cpl = s->cpl; #ifdef CON

[PATCH v26 04/20] cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn

2021-03-01 Thread Claudio Fontana
move the call to accel_cpu->cpu_realizefn to the general cpu_exec_realizefn from target/i386, so it does not need to be called for every target explicitly as we enable more targets. Signed-off-by: Claudio Fontana Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- cpu.c |

[PATCH v26 12/20] i386: move TCG bpt_helper into sysemu/

2021-03-01 Thread Claudio Fontana
for user-mode, assert that the hidden IOBPT flags are not set while attempting to generate io_bpt helpers. Signed-off-by: Claudio Fontana Cc: Paolo Bonzini Reviewed-by: Richard Henderson --- target/i386/helper.h| 7 + target/i386/tcg/helper-tcg.h| 3 + target/i386/t

[PATCH v26 16/20] i386: split seg_helper into user-only and sysemu parts

2021-03-01 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/i386/tcg/helper-tcg.h| 5 + target/i386/tcg/seg_helper.h| 66 target/i386/tcg/seg_helper.c| 233 +--- target/i386/tcg/sysemu/seg_helper.c | 125 +++ ta

[PATCH v26 18/20] target/i386: gdbstub: introduce aux functions to read/write CS64 regs

2021-03-01 Thread Claudio Fontana
a number of registers are read as 64bit under the condition that (hflags & HF_CS64_MASK) || TARGET_X86_64) and a number of registers are written as 64bit under the condition that (hflags & HF_CS64_MASK). Provide some auxiliary functions that do that. Signed-off-by: Claudio Fontana Cc: Paolo Bon

[PATCH v26 17/20] i386: split off sysemu part of cpu.c

2021-03-01 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/i386/cpu-internal.h | 70 +++ target/i386/cpu-sysemu.c | 352 + target/i386/cpu.c | 385 + target/i386/meson.build| 1 + 4 files chan

[PATCH v26 20/20] i386: make cpu_load_efer sysemu-only

2021-03-01 Thread Claudio Fontana
cpu_load_efer is now used only for sysemu code. Therefore, move this function implementation to sysemu-only section of helper.c Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/i386/cpu.h| 20 +--- target/i386/helper.c | 13 + 2 files cha

[PATCH v26 14/20] i386: separate fpu_helper sysemu-only parts

2021-03-01 Thread Claudio Fontana
create a separate tcg/sysemu/fpu_helper.c for the sysemu-only parts. For user mode, some small #ifdefs remain in tcg/fpu_helper.c which do not seem worth splitting into their own user-mode module. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/i386/cpu.h

Re: Bogus "is either too old or uses too old a Python version" from docs/meson.build

2021-03-01 Thread Markus Armbruster
Peter Maydell writes: > On Thu, 25 Feb 2021 at 13:41, Markus Armbruster wrote: >> Peter Maydell writes: >> > I'm not sure what could reasonably be done. The Sphinx test is just >> > "try building a trivial document with our config (which is what >> > enforces the version requirement)". >> >> Th

Re: [PATCH v26 00/20] i386 cleanup PART 2

2021-03-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210301085450.1732-1-cfont...@suse.de/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210301085450.1732-1-cfont...@suse.de Subject: [PATCH v26 00/20] i386 cleanup PART 2 === TES

[PATCH] docs/devel/qgraph: improve qgraph documentation

2021-03-01 Thread Emanuele Giuseppe Esposito
Improve current qgraph documentation with a more concrete example and clearer motivation. This patch depends on the previous serie "libqos/qgraph: format qgraph comments for sphinx documentation" Signed-off-by: Emanuele Giuseppe Esposito --- docs/devel/qgraph.rst | 509 +

Re: [RFC PATCH 4/5] hw/acpi/aml-build: add processor hierarchy node structure

2021-03-01 Thread Andrew Jones
On Fri, Feb 26, 2021 at 10:23:03AM +0800, Ying Fang wrote: > > > On 2/25/2021 7:47 PM, Andrew Jones wrote: > > On Thu, Feb 25, 2021 at 04:56:26PM +0800, Ying Fang wrote: > > > Add the processor hierarchy node structures to build ACPI information > > > for CPU topology. Since the private resources

Re: [RFC PATCH 0/5] hw/arm/virt: Introduce cpu topology support

2021-03-01 Thread Andrew Jones
On Fri, Feb 26, 2021 at 04:41:45PM +0800, Ying Fang wrote: > > > On 2/25/2021 8:02 PM, Andrew Jones wrote: > > On Thu, Feb 25, 2021 at 04:56:22PM +0800, Ying Fang wrote: > > > An accurate cpu topology may help improve the cpu scheduler's decision > > > making when dealing with multi-core system.

Re: [PATCH 1/1] qga-vss: Use dynamic linking for GLib

2021-03-01 Thread Konstantin Kostiuk
ping On Wed, Feb 17, 2021 at 2:54 PM Konstantin Kostiuk wrote: > ping > > On Tue, Feb 9, 2021 at 4:54 PM Kostiantyn Kostiuk > wrote: > >> The current GLib version implements the DllMain function. DllMain is also >> present in the provider.cpp code. So in the case of static linking, the >> DllMa

Re: [PATCH 1/1] qemu_timer.c: add timer_deadline_ms() helper

2021-03-01 Thread Greg Kurz
On Thu, 25 Feb 2021 18:29:14 -0300 Daniel Henrique Barboza wrote: > The pSeries machine is using QEMUTimer internals to return the timeout > in seconds for a timer object, in hw/ppc/spapr.c, function > spapr_drc_unplug_timeout_remaining_sec(). > > Create a helper in qemu-timer.c to retrieve the

Re: [PATCH v2 0/2] gitlab-ci.yml: Add jobs to test CFI

2021-03-01 Thread Daniel P . Berrangé
On Fri, Feb 26, 2021 at 10:21:06AM -0500, Daniele Buono wrote: > Build jobs are on the longer side (about 2h and 20m), but I thought it > would be better to just have 6 large jobs than tens of smaller ones. IMHO that is a not viable. Our longest job today is approx 60 minutes, and that is already

Re: [PULL 27/29] vl: deprecate -writeconfig

2021-03-01 Thread Paolo Bonzini
On 01/03/21 09:00, Markus Armbruster wrote: +warn_report("-writeconfig is deprecated. It will go away in QEMU 6.2 with no replacement"); if (strcmp(optarg, "-") == 0) { fp = stdout; } else { Forgot to tw

Re: [PATCH 08/25] hmp: replace "O" parser with keyval

2021-03-01 Thread Markus Armbruster
Paolo Bonzini writes: > On 25/01/21 10:00, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> HMP is using QemuOpts to parse free-form commands device_add, >>> netdev_add and object_add. However, none of these need QemuOpts >>> for validation (these three QemuOptsLists are all of the cat

Re: [PATCH 2/3] docs: vhost-user: rewrite section on ring state machine

2021-03-01 Thread Stefan Hajnoczi
On Fri, Feb 26, 2021 at 09:34:12AM -0500, Paolo Bonzini wrote: > This section is using the word "back-end" to refer to the > "slave's back-end", and talking about the "client" for > what the rest of the document calls the "slave". > > Rework it to free the use of the term "back-end", which in > th

Re: [PATCH 1/3] docs: vhost-user: clean up request/reply description

2021-03-01 Thread Stefan Hajnoczi
On Fri, Feb 26, 2021 at 09:34:11AM -0500, Paolo Bonzini wrote: > It is not necessary to mention which side is sending/receiving > each payload; it is more interesting to say which is the request > and which is the reply. This also matches what vhost-user-gpu.rst > already does. > > While at it, e

Re: [PATCH 08/25] hmp: replace "O" parser with keyval

2021-03-01 Thread Paolo Bonzini
On 01/03/21 11:14, Markus Armbruster wrote: There is no reason to reject those IDs other than spoiling the fun we're having with setting traps for our users. Since QOM is treating '/' specially in paths, and uses IDs as path components, it should reject '/' in IDs. Same reasoning as for file na

Re: [PATCH 3/3] docs: vhost-user: replace master/slave with front-end/back-end

2021-03-01 Thread Stefan Hajnoczi
On Fri, Feb 26, 2021 at 09:34:13AM -0500, Paolo Bonzini wrote: > -In the current implementation QEMU is the *master*, and the *slave* is > -the external process consuming the virtio queues, for example a > +In the current implementation QEMU is the *front-end*, and the *back-end* > +is the external

Re: [PATCH 1/3] docs: vhost-user: clean up request/reply description

2021-03-01 Thread Stefano Garzarella
On Fri, Feb 26, 2021 at 09:34:11AM -0500, Paolo Bonzini wrote: It is not necessary to mention which side is sending/receiving each payload; it is more interesting to say which is the request and which is the reply. This also matches what vhost-user-gpu.rst already does. While at it, ensure that

Re: [PATCH v2 2/5] hw/arm: ast2600: Set AST2600_MAX_IRQ to value from datasheet

2021-03-01 Thread Cédric Le Goater
On 3/1/21 2:06 AM, Andrew Jeffery wrote: > The datasheet says we have 197 IRQs allocated, and we need more than 128 > to describe IRQs from LPC devices. Raise the value now to allow > modelling of the LPC devices. > > Signed-off-by: Andrew Jeffery Reviewed-by: Cédric Le Goater > --- > hw/arm/

Re: [PATCH v2 3/5] hw/arm: ast2600: Correct the iBT interrupt ID

2021-03-01 Thread Cédric Le Goater
On 3/1/21 2:06 AM, Andrew Jeffery wrote: > The AST2600 allocates distinct GIC IRQs for the LPC subdevices such as > the iBT device. Previously on the AST2400 and AST2500 the LPC subdevices > shared a single LPC IRQ. > > Signed-off-by: Andrew Jeffery Reviewed-by: Cédric Le Goater > --- > hw/a

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-01 Thread John Paul Adrian Glaubitz
Hi Michael! On 2/22/21 3:58 PM, Michael Tokarev wrote: > 22.02.2021 17:54, John Paul Adrian Glaubitz wrote: > >> OK, gotcha. Is it supposed to work with systemd-binfmt? It looks like it >> depends >> on the old binfmt-support package. > > the qemu 4-line patch does not depend on any particular

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-01 Thread Michael Tokarev
01.03.2021 13:35, John Paul Adrian Glaubitz wrote: .. I have been trying to get qemu-user working with sbuild as it is shipped in Debian unstable now but I didn't have any success. Do you have some instructions somewhere how to get qemu-user working with sbuild? Have you seen #983087 which I

Re: [PATCH v3 12/21] sd: emmc: add CMD21 tuning sequence

2021-03-01 Thread Dr. David Alan Gilbert
* Sai Pavan Boddu (sai.pavan.bo...@xilinx.com) wrote: > eMMC cards support tuning sequence for entering HS200 mode. > > Signed-off-by: Sai Pavan Boddu > Signed-off-by: Edgar E. Iglesias > --- > hw/sd/sd.c | 47 +++ > 1 file changed, 47 insertions(+) >

Re: [PATCH 08/25] hmp: replace "O" parser with keyval

2021-03-01 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini writes: > >> HMP is using QemuOpts to parse free-form commands device_add, >> netdev_add and object_add. However, none of these need QemuOpts >> for validation (these three QemuOptsLists are all of the catch-all >> kind), and keyval is already able to p

Re: [PATCH] iotests: Fix up python style in 300

2021-03-01 Thread Kevin Wolf
Am 15.02.2021 um 23:05 hat Eric Blake geschrieben: > Break some long lines, and relax our type hints to be more generic to > any JSON, in order to more easily permit the additional JSON depth now > possible in migration parameters. Detected by iotest 297. > > Fixes: ca4bfec41d56 > (qemu-iotests:

Re: [PATCH v2 5/5] hw/misc: Model KCS devices in the Aspeed LPC controller

2021-03-01 Thread Cédric Le Goater
On 3/1/21 2:06 AM, Andrew Jeffery wrote: > Keyboard-Controller-Style devices for IPMI purposes are exposed via LPC > IO cycles from the BMC to the host. > > Expose support on the BMC side by implementing the usual MMIO > behaviours, and expose the ability to inspect the KCS registers in > "host" s

Re: [PATCH 3/3] docs: vhost-user: replace master/slave with front-end/back-end

2021-03-01 Thread Paolo Bonzini
On 01/03/21 11:23, Stefan Hajnoczi wrote: The spec uses "backend" but this patch uses "back-end". Searching the web shows that "back end", "back-end", and "backend" are all commonly used. I don't think there is a right or wrong choice since all spellings are popular. It would be nice to stay con

Re: [PATCH 1/3] docs: vhost-user: clean up request/reply description

2021-03-01 Thread Paolo Bonzini
On 01/03/21 11:32, Stefano Garzarella wrote: As for the slave messages, how about adding this to the beginning of this section? + For this type of message, the request is sent by the master and the + reply is sent by the slave. Ok. Paolo

[PATCH v1] acpi: increase maximum size for "etc/table-loader" blob

2021-03-01 Thread David Hildenbrand
The resizeable memory region that is created for the cmd blob has a maximum size of ACPI_BUILD_ALIGN_SIZE - 4k. This used to be sufficient, however, as we try fitting in additional data (e.g., vmgenid, nvdimm, intel-iommu), we require more than 4k and can crash QEMU when trying to resize the resize

Re: block/throttle and burst bucket

2021-03-01 Thread Kevin Wolf
Am 26.02.2021 um 13:33 hat Peter Lieven geschrieben: > Am 26.02.21 um 10:27 schrieb Alberto Garcia: > > On Thu 25 Feb 2021 06:34:48 PM CET, Peter Lieven wrote: > >> I was wondering if there is a way to check from outside (qmp etc.) if > >> a throttled block device has exceeded the iops_max_length

Re: [PATCH v3 02/21] sd: emmc: Add support for eMMC cards

2021-03-01 Thread Cédric Le Goater
On 2/28/21 8:33 PM, Sai Pavan Boddu wrote: > Add eMMC device built on top of SD card. > > Signed-off-by: Sai Pavan Boddu > --- > include/hw/sd/sd.h | 2 ++ > hw/sd/sd.c | 20 > 2 files changed, 22 insertions(+) > > diff --git a/include/hw/sd/sd.h b/include/hw/sd/sd

Re: [PATCH v3 04/21] sd: emmc: update OCR fields for eMMC

2021-03-01 Thread Cédric Le Goater
On 2/28/21 8:33 PM, Sai Pavan Boddu wrote: > From: Vincent Palatin > > eMMC OCR register doesn't has UHS-II field and voltage fields are > different. > > Signed-off-by: Vincent Palatin > Signed-off-by: Sai Pavan Boddu > --- > hw/sd/sd.c | 27 --- > 1 file changed, 24 i

Re: [virtio-dev] [VHOST USER SPEC PATCH] vhost-user.rst: add clarifying language about protocol negotiation

2021-03-01 Thread Stefan Hajnoczi
On Fri, Feb 26, 2021 at 11:16:19AM +, Alex Bennée wrote: > In practice the protocol negotiation between vhost master and slave > occurs before the final feature negotiation between backend and > frontend. This has lead to an inconsistency between the rust-vmm vhost > implementation and the libv

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-01 Thread John Paul Adrian Glaubitz
On 3/1/21 11:40 AM, Michael Tokarev wrote: > 01.03.2021 13:35, John Paul Adrian Glaubitz wrote: > .. >> I have been trying to get qemu-user working with sbuild as it is shipped in >> Debian >> unstable now but I didn't have any success. >> >> Do you have some instructions somewhere how to get qemu

Re: [RFC PATCH v2 3/4] block: Support multiple reopening with x-blockdev-reopen

2021-03-01 Thread Kevin Wolf
Am 25.02.2021 um 18:02 hat Vladimir Sementsov-Ogievskiy geschrieben: > 24.02.2021 15:33, Kevin Wolf wrote: > > Am 09.02.2021 um 09:03 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > 08.02.2021 21:44, Alberto Garcia wrote: > > > > Signed-off-by: Alberto Garcia > > > > --- > > > >qapi/block-

Re: [PATCH v3 05/21] sd: emmc: Add support for EXT_CSD & CSD for eMMC

2021-03-01 Thread Cédric Le Goater
On 2/28/21 8:33 PM, Sai Pavan Boddu wrote: > From: Vincent Palatin > > eMMC CSD is similar to SD with an option to refer EXT_CSD for larger > devices. > > Signed-off-by: Vincent Palatin > [clg: Add user friendly macros for EXT_CSD register] > Signed-off-by: Cédric Le Goater > [spb: updated com

Re: [PATCH 00/14] deprecations: remove many old deprecations

2021-03-01 Thread Kevin Wolf
Am 25.02.2021 um 18:32 hat Jim Fehlig geschrieben: > Adding xen-devel and Ian to cc. > > On 2/24/21 6:11 AM, Daniel P. Berrangé wrote: > > The following features have been deprecated for well over the 2 > > release cycle we promise > > This reminded me of a bug report we received late last year w

Re: [PATCH v2 5/5] hw/block/nvme: report non-mdts command size limit for dsm

2021-03-01 Thread Klaus Jensen
On Feb 22 22:12, Klaus Jensen wrote: > On Feb 23 05:55, Keith Busch wrote: > > On Mon, Feb 22, 2021 at 07:47:59PM +0100, Klaus Jensen wrote: > > > +typedef struct NvmeIdCtrlNvm { > > > +uint8_t vsl; > > > +uint8_t wzsl; > > > +uint8_t wusl; > > > +uint8_t dmrl; > > >

[PATCH] KVM: x86: do not fail if software breakpoint has already been removed

2021-03-01 Thread Paolo Bonzini
If kvm_arch_remove_sw_breakpoint finds that a software breakpoint does not have an INT3 instruction, it fails. This can happen if one sets a software breakpoint in a kernel module and then reloads it. gdb then thinks the breakpoint cannot be deleted and there is no way to add it back. Suggested-

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-01 Thread Michael Tokarev
01.03.2021 14:07, John Paul Adrian Glaubitz wrote: On 3/1/21 11:40 AM, Michael Tokarev wrote: 01.03.2021 13:35, John Paul Adrian Glaubitz wrote: .. I have been trying to get qemu-user working with sbuild as it is shipped in Debian unstable now but I didn't have any success. Do you have some i

[PATCH] KVM: x86: deprecate -M kernel-irqchip=off except for -M isapc

2021-03-01 Thread Paolo Bonzini
The userspace local APIC is basically untested and does not support many features such as TSC deadline timer, x2APIC or PV spinlocks. On the other hand, the PIT and IOAPIC are okay as they are not tied to the processor and are tested with -M kernel-irqchip=split. Therefore, deprecate the local AP

Re: [PATCH] multiprocess: move feature to meson_options.txt

2021-03-01 Thread Stefan Hajnoczi
On Fri, Feb 26, 2021 at 09:50:59AM +0100, Philippe Mathieu-Daudé wrote: > On 2/26/21 8:48 AM, Paolo Bonzini wrote: > > On 26/02/21 00:16, Philippe Mathieu-Daudé wrote: > >>> I personally don’t have any preference for the name. > >> Great. > >> > >> So with the summary/description updated as: > >> >

Re: [PATCH v2] blockjob: report a better error message

2021-03-01 Thread Kevin Wolf
Am 25.02.2021 um 11:36 hat Stefano Garzarella geschrieben: > When a block job fails, we report strerror(-job->job.ret) error > message, also if the job set an error object. > Let's report a better error message using error_get_pretty(job->job.err). > > If an error object was not set, strerror(-job

[RFC PATCH] docs/system: add a gentle prompt for the complexity to come

2021-03-01 Thread Alex Bennée
We all know the QEMU command line can become a fiendishly complex beast. Lets gently prepare our user for the horrors to come by referencing where other example command lines can be found in the manual. Signed-off-by: Alex Bennée --- docs/system/quickstart.rst | 8 docs/system/targets.r

Re: [PATCH 1/3] docs: vhost-user: clean up request/reply description

2021-03-01 Thread Alex Bennée
Paolo Bonzini writes: > It is not necessary to mention which side is sending/receiving > each payload; it is more interesting to say which is the request > and which is the reply. This also matches what vhost-user-gpu.rst > already does. > > While at it, ensure that all messages list both the

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-01 Thread John Paul Adrian Glaubitz
On 3/1/21 12:16 PM, Michael Tokarev wrote: > Oh. You tried to use qemu-user, not qemu-user-static.. > Well. I tried both packages. I also tried systemd-binfmt and binfmt-support, neither worked. > This is all about how qemu-user works, be it debian or > any other distribution, - it is basically t

[PATCH v2] hw/nvme: move nvme emulation out of hw/block

2021-03-01 Thread Klaus Jensen
From: Klaus Jensen With the introduction of the nvme-subsystem device we are really cluttering up the hw/block directory. As suggested by Philippe previously, move the nvme emulation to hw/nvme. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen --- v2: * rebased on nvme-next

Re: [PATCH v2] hw/nvme: move nvme emulation out of hw/block

2021-03-01 Thread Klaus Jensen
On Mar 1 12:35, Klaus Jensen wrote: > From: Klaus Jensen > > With the introduction of the nvme-subsystem device we are really > cluttering up the hw/block directory. > > As suggested by Philippe previously, move the nvme emulation to > hw/nvme. > > Suggested-by: Philippe Mathieu-Daudé > Signe

Re: [PATCH 1/1] qga-vss: Use dynamic linking for GLib

2021-03-01 Thread Philippe Mathieu-Daudé
Cc'ing Paolo/Marc-André/Daniel On 2/9/21 3:54 PM, Kostiantyn Kostiuk wrote: > The current GLib version implements the DllMain function. DllMain is also > present in the provider.cpp code. So in the case of static linking, the > DllMain redefinition error occurs. For now, just switch to dynamic lin

[PATCH 1/2] coreaudio: Drop support for macOS older than 10.6

2021-03-01 Thread Akihiko Odaki
Mac OS X 10.6 was released in 2009. Signed-off-by: Akihiko Odaki --- audio/coreaudio.c | 103 -- 1 file changed, 103 deletions(-) diff --git a/audio/coreaudio.c b/audio/coreaudio.c index b7c02e0e516..c5f0b615d64 100644 --- a/audio/coreaudio.c +++ b/au

[PATCH 2/2] coreaudio: Handle output device change

2021-03-01 Thread Akihiko Odaki
An output device change can occur when plugging or unplugging an earphone. Signed-off-by: Akihiko Odaki --- audio/coreaudio.c | 327 +- 1 file changed, 236 insertions(+), 91 deletions(-) diff --git a/audio/coreaudio.c b/audio/coreaudio.c index c5f0b61

Re: [RFC PATCH 3/3] hw/block/pflash: use memory_region_init_rom_device_from_file()

2021-03-01 Thread Philippe Mathieu-Daudé
On 2/26/21 9:23 AM, David Edmondson wrote: > On Friday, 2021-02-26 at 00:02:38 +01, Philippe Mathieu-Daudé wrote: > >> If the block drive is read-only we will model a "protected" flash >> device. We can thus use memory_region_init_rom_device_from_file() >> which mmap the backing file when creating

Re: [RFC v1 00/38] arm cleanup experiment for kvm-only build

2021-03-01 Thread Claudio Fontana
On 2/23/21 10:18 AM, Philippe Mathieu-Daudé wrote: > On 2/22/21 8:00 PM, Alex Bennée wrote: >> >> Claudio Fontana writes: >> >>> Hi all, >>> >>> this is an experiment, a cleanup based on and requiring the series >>> "i386 cleanup PART 2": >>> >>> https://lists.gnu.org/archive/html/qemu-devel/2021-

Re: [RFC PATCH 1/3] exec/memory: Introduce memory_region_init_rom_device_from_file()

2021-03-01 Thread Stefano Garzarella
I don't know this code very well, but I have a couple of comments below :-) On Fri, Feb 26, 2021 at 12:02:36AM +0100, Philippe Mathieu-Daudé wrote: Introduce memory_region_init_rom_device_from_file() which mmap the backing file of ROM devices. This allows to reduce QEMU memory footprint as the

[RFC PATCH v2 0/3] hw/block/pflash: Mmap read-only backend files with MAP_SHARED

2021-03-01 Thread Philippe Mathieu-Daudé
Since v1: - check driver is "raw" (David) - ignore CFI02 for now Hi, This series aims to reduce the memory footprint of flash devices when the backing file is read-only. When a backing file is read-only, the model considers the flash is in "protected" mode. No write are allowed, but the MMIO sta

[RFC PATCH v2 1/3] exec/memory: Introduce memory_region_init_rom_device_from_file()

2021-03-01 Thread Philippe Mathieu-Daudé
Introduce memory_region_init_rom_device_from_file() which mmap the backing file of ROM devices. This allows to reduce QEMU memory footprint as the same file can be shared between multiple instances of QEMU. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 85

[RFC PATCH v2 2/3] hw/block/pflash: Move code around

2021-03-01 Thread Philippe Mathieu-Daudé
First do the block checks, so we know if it is read-only or not. Then create the MemoryRegion. This will allow optimization in the next commit. Reviewed-by: David Edmondson Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi01.c | 24 hw/block/pflash_cfi02.c |

Re: [PATCH v2 19/31] qapi/qom: QAPIfy object-add

2021-03-01 Thread Kevin Wolf
Am 26.02.2021 um 12:30 hat Paolo Bonzini geschrieben: > On 24/02/21 14:52, Kevin Wolf wrote: > > +v = qobject_output_visitor_new(&qobj); > > +visit_type_ObjectOptions(v, NULL, &options, &error_abort); > > +visit_complete(v, &qobj); > > +visit_free(v); > > + > > +props = qobject_

[RFC PATCH v2 3/3] hw/block/pflash: use memory_region_init_rom_device_from_file()

2021-03-01 Thread Philippe Mathieu-Daudé
If the block drive is read-only we will model a "protected" flash device. We can thus use memory_region_init_rom_device_from_file() which mmap the backing file when creating the MemoryRegion. If the same backing file is used by multiple QEMU instances, this reduces the memory footprint (this is oft

Re: [virtio-dev] [VHOST USER SPEC PATCH] vhost-user.rst: add clarifying language about protocol negotiation

2021-03-01 Thread Alex Bennée
Stefan Hajnoczi writes: > On Fri, Feb 26, 2021 at 11:16:19AM +, Alex Bennée wrote: >> In practice the protocol negotiation between vhost master and slave >> occurs before the final feature negotiation between backend and >> frontend. This has lead to an inconsistency between the rust-vmm vh

Re: [PATCH 08/25] hmp: replace "O" parser with keyval

2021-03-01 Thread Paolo Bonzini
On 01/03/21 11:43, Markus Armbruster wrote: With proper initialization, I get { "driver": "help" } instead. If this change is okay, the commit message should explain it. Matches "qemu-system-x86_64 -device help,e1000", so it should be okay. Paolo

Re: [RFC PATCH v2 3/4] block: Support multiple reopening with x-blockdev-reopen

2021-03-01 Thread Vladimir Sementsov-Ogievskiy
01.03.2021 14:07, Kevin Wolf wrote: Am 25.02.2021 um 18:02 hat Vladimir Sementsov-Ogievskiy geschrieben: 24.02.2021 15:33, Kevin Wolf wrote: Am 09.02.2021 um 09:03 hat Vladimir Sementsov-Ogievskiy geschrieben: 08.02.2021 21:44, Alberto Garcia wrote: Signed-off-by: Alberto Garcia --- qapi

Re: [RFC PATCH 1/3] exec/memory: Introduce memory_region_init_rom_device_from_file()

2021-03-01 Thread Philippe Mathieu-Daudé
On 3/1/21 12:53 PM, Stefano Garzarella wrote: > I don't know this code very well, but I have a couple of comments below :-) > > On Fri, Feb 26, 2021 at 12:02:36AM +0100, Philippe Mathieu-Daudé wrote: >> Introduce memory_region_init_rom_device_from_file() which mmap >> the backing file of ROM devic

Re: [PATCH v3 06/21] sd: emmc: Update CMD8 to send EXT_CSD register

2021-03-01 Thread Cédric Le Goater
On 2/28/21 8:33 PM, Sai Pavan Boddu wrote: > From: Vincent Palatin > > Sends the EXT_CSD register as response to CMD8. > > Signed-off-by: Vincent Palatin > Signed-off-by: Sai Pavan Boddu > --- > hw/sd/sd.c | 52 > 1 file changed, 36 inserti

Re: [PATCH v3 07/21] sd: sdmmc-internal: Add command string for SEND_OP_CMD

2021-03-01 Thread Cédric Le Goater
On 2/28/21 8:33 PM, Sai Pavan Boddu wrote: > From: Cédric Le Goater > > This adds extra info to trace log. > > Signed-off-by: Sai Pavan Boddu >From and Signed-off-by are not in sync :) C. > --- > hw/sd/sdmmc-internal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

  1   2   3   4   5   >