[PULL v2 1/6] docs/system/deprecated: Fix note on fdc drive properties

2021-03-16 Thread Markus Armbruster
Commit 4a27a638e7 "fdc: Deprecate configuring floppies with -global isa-fdc" actually deprecated any use of floppy controller driver properties, not just with -global. Correct the deprecation note accordingly. Fixes: 4a27a638e718b445648de6b27c709353551d9b44 Signed-off-by: Markus Armbruster

[Bug 1919253] Re: QEMU doesn't build reproducibly anymore in 5.2.0

2021-03-16 Thread Apteryx
Hello, this problem is resolved when using Meson 0.57.1, as suggested by bonzini on #qemu (OFTC). -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1919253 Title: QEMU doesn't build reproducibly

[RFC v8 27/44] target/arm: remove kvm include file for PSCI and arm-powerctl

2021-03-16 Thread Claudio Fontana
The QEMU PSCI implementation is not used for KVM, we do not need the kvm constants header. Signed-off-by: Claudio Fontana --- target/arm/arm-powerctl.h | 2 -- target/arm/psci.c | 1 - 2 files changed, 3 deletions(-) diff --git a/target/arm/arm-powerctl.h b/target/arm/arm-powerctl.h

[RFC v8 43/44] target/arm: cpu-sve: new module

2021-03-16 Thread Claudio Fontana
extract the SVE-related cpu object properties and functions, and move them to a separate module. Disentangle SVE from pauth that is a separate, TCG-only feature. Signed-off-by: Claudio Fontana --- target/arm/cpu-sve.h | 40 + target/arm/cpu.h | 20 +-- target/arm/cpu-sve.c

[PULL v2 3/6] fdc: Inline fdctrl_connect_drives() into fdctrl_realize_common()

2021-03-16 Thread Markus Armbruster
The previous commit rendered the name fdctrl_connect_drives() somewhat misleading. Get rid of it by inlining the (now pretty simple) function into its only caller. Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé Reviewed-by: John Snow Message-id:

[RFC v8 28/44] target/arm: move kvm-const.h, kvm.c, kvm64.c, kvm_arm.h to kvm/

2021-03-16 Thread Claudio Fontana
and adapt the code including the header references, and trace-events / trace.h Signed-off-by: Claudio Fontana --- meson.build | 2 +- target/arm/cpu.h | 2 +- target/arm/{ => kvm}/kvm-consts.h | 0 target/arm/{ => kvm}/kvm_arm.h| 0

[RFC v8 38/44] target/arm: move kvm cpu properties setting to kvm-cpu

2021-03-16 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/cpu.c | 4 target/arm/kvm/kvm-cpu.c | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 3d6501c2c5..ac01fa0bae 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -786,10

Re: [PATCH v2] tests/acceptance: Add bFLT loader linux-user test

2021-03-16 Thread Willian Rampazzo
Hi Thomas, Sorry for the late reply. On Wed, Mar 10, 2021 at 2:49 AM Thomas Huth wrote: > > On 09/03/2021 23.27, Philippe Mathieu-Daudé wrote: > > ping? > > I guess we really need someone who could act as a maintainer for the > tests/acceptance directory, who could pick up patches and send pull

[RFC v8 22/44] target/arm: split a15 cpu model and 32bit class functions to cpu32.c

2021-03-16 Thread Claudio Fontana
provide helper functions there to initialize 32bit models, and export the a15 cpu model. We still need to keep around a15 until we sort out the board configurations. cpu.c will continue to contain the common parts between 32 and 64. Note that we need to build cpu32 also for TARGET_AARCH64,

[RFC v8 42/44] target/arm: move TCG gt timer creation code in tcg/

2021-03-16 Thread Claudio Fontana
we need to be careful not to use if (tcg_enabled()) here, because of the VMSTATE definitions in machine.c, which are only protected by CONFIG_TCG, and thus it would break the --enable-tcg --enable-kvm build. Signed-off-by: Claudio Fontana --- target/arm/tcg/tcg-cpu.h| 1 +

[RFC v8 19/44] target/arm: move arm_sctlr away from tcg helpers

2021-03-16 Thread Claudio Fontana
this function is used for kvm too, add it to the cpu-common module. Signed-off-by: Claudio Fontana --- target/arm/cpu-common.c | 11 +++ target/arm/tcg/helper.c | 11 --- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/target/arm/cpu-common.c

[RFC v8 39/44] accel: move call to accel_init_interfaces

2021-03-16 Thread Claudio Fontana
move the call for sysemu specifically in machine_run_board_init, mirror the calling sequence for user mode too. Suggested-by: Paolo Bonzini Signed-off-by: Claudio Fontana --- bsd-user/main.c | 2 +- hw/core/machine.c | 1 + linux-user/main.c | 2 +- softmmu/vl.c | 1 - 4 files changed,

Re: Windows 10 won't run on default x86_64 machine anymore

2021-03-16 Thread Igor Mammedov
On Tue, 16 Mar 2021 18:33:47 +0100 Paolo Bonzini wrote: > On 16/03/21 17:49, Igor Mammedov wrote: > > | smm=on | smm=off| > > -- > > QEMU6.0 pc-i440fx-5.2 |pass| pass | > > defaut smm-compat=on |

[RFC v8 18/44] target/arm: move sve_zcr_len_for_el to common_cpu

2021-03-16 Thread Claudio Fontana
it is required by arch-dump.c and cpu.c, so apparently we need this for KVM too Signed-off-by: Claudio Fontana --- target/arm/cpu-common.c | 43 + target/arm/tcg/helper.c | 33 --- 2 files changed, 43 insertions(+), 33

[RFC v8 33/44] tests: do not run test-hmp on all machines for ARM KVM-only

2021-03-16 Thread Claudio Fontana
on ARM we currently list and build all machines, even when building KVM-only, without TCG. Until we fix this (and we only list and build machines that are compatible with KVM), only test specifically using the "virt" machine in this case. Signed-off-by: Claudio Fontana Cc: Philippe

Re: Half a usb-redir idea

2021-03-16 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (phi...@redhat.com) wrote: > On 3/16/21 6:21 PM, Dr. David Alan Gilbert wrote: > > Hi, > > I've got a half-baked idea, which I thought might be worth mentioning. > > > > How hard would it be to give qemu a usbredir server rather than client? > > It would have nothing

[RFC v8 20/44] target/arm: move arm_cpu_list to common_cpu

2021-03-16 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/cpu-common.c | 42 + target/arm/tcg/helper.c | 41 2 files changed, 42 insertions(+), 41 deletions(-) diff --git

[RFC v8 36/44] Revert "target/arm: Restrict v8M IDAU to TCG"

2021-03-16 Thread Claudio Fontana
This reverts commit 6e937ba7f8fb90d66cb3781f7fed32fb4239556a This change breaks quickly at startup, as all interfaces in boards are checked in vl.c in select_machine(): { GSList *machines = object_class_get_list(TYPE_MACHINE, false); } In order to restrict v8M IDAU to TCG, we need to first

[RFC v8 40/44] accel: add double dispatch mechanism for class initialization

2021-03-16 Thread Claudio Fontana
while on x86 all CPU classes can use the same set of TCGCPUOps, on ARM the right accel behavior depends on the type of the CPU. So we need a way to specialize the accel behavior according to the CPU. Therefore, add a second initialization, after the accel_cpu->cpu_class_init, that allows to do

[RFC v8 41/44] target/arm: add tcg cpu accel class

2021-03-16 Thread Claudio Fontana
start by moving minimal init and realizefn code. Signed-off-by: Claudio Fontana Cc: Paolo Bonzini --- target/arm/tcg/tcg-cpu.h| 4 ++- target/arm/cpu.c| 38 +++ target/arm/tcg/sysemu/tcg-cpu.c | 27 +++

[RFC v8 29/44] target/arm: cleanup cpu includes

2021-03-16 Thread Claudio Fontana
cpu.c, cpu32.c, cpu64.c, tcg/sysemu/tcg-cpu.c, all need a good cleanup when it comes to included header files. Signed-off-by: Claudio Fontana --- target/arm/cpu.c| 8 ++-- target/arm/cpu32.c | 14 -- target/arm/cpu64.c | 6 --

[RFC v8 35/44] tests: do not run qom-test on all machines for ARM KVM-only

2021-03-16 Thread Claudio Fontana
on ARM we currently list and build all machines, even when building KVM-only, without TCG. Until we fix this (and we only list and build machines that are compatible with KVM), only test specifically using the "virt" machine in this case. Signed-off-by: Claudio Fontana Cc: Philippe

[RFC v8 37/44] target/arm: create kvm cpu accel class

2021-03-16 Thread Claudio Fontana
start by moving minimal init and realizefn code. Signed-off-by: Claudio Fontana --- target/arm/internals.h | 1 - target/arm/cpu-sysemu.c| 32 -- target/arm/cpu.c | 43 +++-- target/arm/kvm/kvm-cpu.c | 122 +

[RFC v8 05/44] target/arm: only build psci for TCG

2021-03-16 Thread Claudio Fontana
We do not move psci.c to tcg/ because we expect other hypervisors to use it (waiting for HVF enablement). Signed-off-by: Claudio Fontana Cc: Alexander Graf --- target/arm/meson.build | 4 1 file changed, 4 insertions(+) diff --git a/target/arm/meson.build b/target/arm/meson.build index

[RFC v8 31/44] tests/qtest: skip bios-tables-test test_acpi_oem_fields_virt for KVM

2021-03-16 Thread Claudio Fontana
test is TCG-only. Signed-off-by: Claudio Fontana Cc: Philippe Mathieu-Daudé --- tests/qtest/bios-tables-test.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index e020c83d2a..bd7b85909c 100644 ---

[RFC v8 30/44] target/arm: remove broad "else" statements when checking accels

2021-03-16 Thread Claudio Fontana
There might be more than just KVM and TCG in the future, so where appropriate, replace broad "else" statements with the appropriate if (accel_enabled()) check. Also invert some checks for !kvm_enabled() or !tcg_enabled() where it seems appropriate to do so. Note that to make qtest happy we need

[RFC v8 26/44] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled()

2021-03-16 Thread Claudio Fontana
After this patch it is possible to build only kvm: ./configure --disable-tcg --enable-kvm Signed-off-by: Claudio Fontana --- target/arm/cpu-sysemu.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/arm/cpu-sysemu.c b/target/arm/cpu-sysemu.c index

[RFC v8 02/44] target/arm: move helpers to tcg/

2021-03-16 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson [claudio: moved vec_internal.h and op_addsub.h to tcg/ too] Signed-off-by: Claudio Fontana --- meson.build | 1 + target/arm/{ => tcg}/op_addsub.h | 0 target/arm/tcg/trace.h | 1 +

[RFC v8 21/44] target/arm: move aarch64_sync_32_to_64 (and vv) to cpu code

2021-03-16 Thread Claudio Fontana
and arm_phys_excp_target_el since it is tied up inside the same #ifdef block. aarch64_sync_32_to_64 and aarch64_sync_64_to_32 are mixed in with the TCG helpers, but they shouldn't, as they are needed for KVM too. kvm_arch_get_registers() { if (!is_a64(env)) {

[RFC v8 23/44] target/arm: move sve_exception_el out of TCG helpers

2021-03-16 Thread Claudio Fontana
we need this for KVM too. Signed-off-by: Claudio Fontana --- target/arm/cpu-sysemu.c | 60 target/arm/cpu-user.c | 5 target/arm/tcg/helper.c | 61 - 3 files changed, 65 insertions(+), 61 deletions(-) diff

[RFC v8 25/44] target/arm: cpu: fix style

2021-03-16 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Philippe Mathieu-Daudé --- target/arm/cpu-sysemu.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/target/arm/cpu-sysemu.c b/target/arm/cpu-sysemu.c index 126263dbf4..eb928832a9 100644 ---

[RFC v8 16/44] target/arm: split vfp state setting from tcg helpers

2021-03-16 Thread Claudio Fontana
cpu-vfp.c: vfp_get_fpsr and vfp_set_fpsr are needed also for KVM, so create a new cpu-vfp.c tcg/cpu-vfp.c: vfp_get_fpscr_from_host and vv are TCG-only, so we move the implementation to tcg/cpu-vfp.c kvm/helper-stubs.c: vfp_get_fpscr_from_host and vv stubs for KVM.

[RFC v8 24/44] target/arm: refactor exception and cpu code

2021-03-16 Thread Claudio Fontana
move exception code out of tcg/ as we need part of it for KVM too. put the exception code into separate cpu modules as appropriate, including: cpu-sysemu.c tcg/tcg-cpu.c tcg/sysemu/tcg-cpu.c to avoid naming confusion with the existing cpu_tcg.c, containg cpu models definitions for 32bit

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

2021-03-16 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 +++

[RFC v8 13/44] target/arm: kvm: add stubs for some helpers

2021-03-16 Thread Claudio Fontana
at least the armv7m one should go away with proper configuration changes (only enabling possible boards for KVM). Signed-off-by: Claudio Fontana --- target/arm/kvm/helper-stubs.c | 27 +++ target/arm/kvm/meson.build| 3 +++ target/arm/meson.build| 1 + 3

Re: [PATCH 7/7] block/nbd: stop manipulating in_flight counter

2021-03-16 Thread Vladimir Sementsov-Ogievskiy
16.03.2021 19:08, Roman Kagan wrote: On Mon, Mar 15, 2021 at 11:15:44PM +0300, Vladimir Sementsov-Ogievskiy wrote: 15.03.2021 09:06, Roman Kagan wrote: As the reconnect logic no longer interferes with drained sections, it appears unnecessary to explicitly manipulate the in_flight counter.

[RFC v8 15/44] target/arm: add temporary stub for arm_rebuild_hflags

2021-03-16 Thread Claudio Fontana
this should go away once the configuration and hw/arm is clean Signed-off-by: Claudio Fontana --- hw/arm/boot.c | 5 - target/arm/arm-powerctl.c | 8 +--- target/arm/kvm/helper-stubs.c | 6 ++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git

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

2021-03-16 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

[RFC v8 14/44] target/arm: move cpsr_read, cpsr_write to cpu_common

2021-03-16 Thread Claudio Fontana
we need as a result to move switch_mode too, so we put an implementation into cpu_user and cpu_sysemu. Signed-off-by: Claudio Fontana --- target/arm/cpu.h| 2 + target/arm/cpu-common.c | 192 +++ target/arm/cpu-sysemu.c | 30 ++

[RFC v8 10/44] target/arm: cpregs: fix style (mostly just comments)

2021-03-16 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/cpregs.h | 54 ++--- target/arm/cpregs.c | 60 ++ target/arm/tcg/cpregs.c | 253 ++-- 3 files changed, 241 insertions(+), 126 deletions(-) diff --git a/target/arm/cpregs.h

[RFC v8 12/44] target/arm: only perform TCG cpu and machine inits if TCG enabled

2021-03-16 Thread Claudio Fontana
of note, cpreg lists were previously initialized by TCG first, and then thrown away and replaced with the data coming from KVM. Now we just initialize once, either for TCG or for KVM. Signed-off-by: Claudio Fontana --- target/arm/cpu.c | 32 ++--

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

2021-03-16 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 |

[RFC v8 17/44] target/arm: move arm_mmu_idx* to cpu-mmu

2021-03-16 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/cpu-mmu.c| 95 + target/arm/tcg/helper.c | 95 - 2 files changed, 95 insertions(+), 95 deletions(-) diff --git a/target/arm/cpu-mmu.c b/target/arm/cpu-mmu.c index

[RFC v8 08/44] target/arm: cpu-mmu: fix comment style

2021-03-16 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/cpu-mmu.h| 3 +- target/arm/cpu-mmu-sysemu.c | 149 2 files changed, 101 insertions(+), 51 deletions(-) diff --git a/target/arm/cpu-mmu.h b/target/arm/cpu-mmu.h index fdedc8fb92..01b060613a 100644 ---

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

2021-03-16 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

[RFC v8 11/44] target/arm: move cpu definitions to common cpu module

2021-03-16 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/cpu-common.c | 41 + target/arm/tcg/helper.c | 29 - target/arm/meson.build | 1 + 3 files changed, 42 insertions(+), 29 deletions(-) create mode 100644 target/arm/cpu-common.c

[RFC v8 01/44] target/arm: move translate modules to tcg/

2021-03-16 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/{ => tcg}/translate-a64.h | 0 target/arm/{ => tcg}/translate.h | 0 target/arm/{ => tcg}/a32-uncond.decode| 0 target/arm/{ => tcg}/a32.decode | 0 target/arm/{ => tcg}/m-nocp.decode

[RFC v8 00/44] arm cleanup experiment for kvm-only build

2021-03-16 Thread Claudio Fontana
Here a new version of the series that enables kvm-only builds. The goal here is to enable the KVM-only build. In this iteration, SVE AARCH64 CPU properties have been refactored slightly, to split the functionality from cpu to cpu-sve first, and then putting the accel-specific stuff in tcg/ and

Question about two option formats for netdev

2021-03-16 Thread Masahiro Yamada
Hi. I have a question about adding a network device. qemu-system-arm -machine vexpress-a9 \ -net nic,model=lan9118 -net user ... works for me, but 'man qemu-system-arm' says this is "Legacy option". Is there any new (or recommended) form to use a lan9118 device? If I understand

[RFC v8 06/44] target/arm: split off cpu-sysemu.c

2021-03-16 Thread Claudio Fontana
move work is needed later on to split things into tcg-specific portions and kvm-specific portions of this Signed-off-by: Claudio Fontana --- target/arm/internals.h | 8 ++- target/arm/cpu-sysemu.c | 105 target/arm/cpu.c| 83

[PATCH v27 08/20] meson: add target_user_arch

2021-03-16 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

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

2021-03-16 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

[RFC v8 04/44] target/arm: tcg: add sysemu and user subsirs

2021-03-16 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/tcg/meson.build| 3 +++ target/arm/tcg/sysemu/meson.build | 3 +++ target/arm/tcg/user/meson.build | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 target/arm/tcg/sysemu/meson.build create mode 100644

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

2021-03-16 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

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

2021-03-16 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

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

2021-03-16 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 +++

[RFC v8 03/44] arm: tcg: only build under CONFIG_TCG

2021-03-16 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/tcg/meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build index 0bd4e9d954..3b4146d079 100644 --- a/target/arm/tcg/meson.build +++

[PATCH v27 00/20] i386 cleanup PART 2

2021-03-16 Thread Claudio Fontana
v26 -> v27: rebased on latest master 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

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

2021-03-16 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

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

2021-03-16 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 +

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

2021-03-16 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:

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

2021-03-16 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 v27 09/20] i386: split off sysemu-only functionality in tcg-cpu

2021-03-16 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 v27 10/20] i386: split smm helper (sysemu)

2021-03-16 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

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

2021-03-16 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

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

2021-03-16 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

Re: [PATCH 6/7] block/nbd: decouple reconnect from drain

2021-03-16 Thread Vladimir Sementsov-Ogievskiy
16.03.2021 19:03, Roman Kagan wrote: On Mon, Mar 15, 2021 at 11:10:14PM +0300, Vladimir Sementsov-Ogievskiy wrote: 15.03.2021 09:06, Roman Kagan wrote: The reconnection logic doesn't need to stop while in a drained section. Moreover it has to be active during the drained section, as the

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

2021-03-16 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, _err); if (local_err != NULL) { goto fail; } However, we can improve at least accel_cpu to return a meaningful bool

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

2021-03-16 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 v27 01/20] target/i386: Rename helper_fldt, helper_fstt

2021-03-16 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:

Re: [PATCH v2 1/4] accel: Introduce 'query-accels' QMP command

2021-03-16 Thread Philippe Mathieu-Daudé
On 3/16/21 6:29 PM, Eric Blake wrote: > On 3/16/21 12:24 PM, Philippe Mathieu-Daudé wrote: >> Introduce the 'query-accels' QMP command which returns a list >> of built-in accelerator names. >> >> - Accelerator is a QAPI enum of all existing accelerators, >> >> - AcceleratorInfo is a QAPI structure

Re: [PATCH v4 1/3] target/arm: Add support for FEAT_TLBIRANGE

2021-03-16 Thread Richard Henderson
On 3/16/21 9:49 AM, Rebecca Cran wrote: +for (page = addr; page < (addr + length); page += TARGET_PAGE_SIZE) { This test means that it's impossible to flush the last page of the address space (addr + length == 0). I think better to do for (l = 0; l < length; l += TARGET_PAGE_SIZE)

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-16 Thread Vladimir Sementsov-Ogievskiy
16.03.2021 15:25, Max Reitz wrote: On 15.03.21 15:40, Vladimir Sementsov-Ogievskiy wrote: 15.03.2021 12:58, Max Reitz wrote: [...] The question is whether it really makes sense to even have a seqcache_read() path when in reality it’s probably never accessed.  I mean, besides the fact that

Re: [PULL 00/11] 20210315 patches

2021-03-16 Thread Paolo Bonzini
On 15/03/21 19:38, Alexander Bulekov wrote: https://gitlab.com/a1xndr/qemu tags/20210315-pull-request Pulled, thanks. Paolo

[PULL v3 00/42] Block layer patches and object-add QAPIfication

2021-03-16 Thread Kevin Wolf
The following changes since commit 6e31b3a5c34c6e5be7ef60773e607f189eaa15f3: Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2021-03-16 10:53:47 +) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

Re: Windows 10 won't run on default x86_64 machine anymore

2021-03-16 Thread Paolo Bonzini
On 16/03/21 17:27, Reinoud Zandijk wrote: On Tue, Mar 16, 2021 at 01:49:57PM +0100, Paolo Bonzini wrote: On 16/03/21 13:13, Igor Mammedov wrote: Although I don't know about nvmm case, this function also needs to be updated if smi isn't supported. can you submit a patch for this please?

Re: Windows 10 won't run on default x86_64 machine anymore

2021-03-16 Thread Paolo Bonzini
On 16/03/21 17:49, Igor Mammedov wrote: | smm=on | smm=off| -- QEMU6.0 pc-i440fx-5.2 |pass| pass | defaut smm-compat=on ||| --

Re: [PATCH v2 0/3] vl: QAPIfy -object

2021-03-16 Thread Kevin Wolf
Am 12.03.2021 um 18:35 hat Paolo Bonzini geschrieben: > This is a replacement for -object QAPIfication that keeps QemuOpts > in order to not break some of the CLI parsing extensions that OptsVisitor > includes. Since keyval is not used, support for directly passing > JSON syntax to the option

Re: [PATCH v2 3/4] qtest/bios-tables-test: Make test build-independent from accelerator

2021-03-16 Thread Eric Blake
On 3/16/21 12:24 PM, Philippe Mathieu-Daudé wrote: > Now than we can probe if the TCG accelerator is available > at runtime with a QMP command, do it once at the beginning > and only register the tests we can run. > We can then replace the #ifdef'ry by an assertion. > > Signed-off-by: Philippe

Re: [PATCH v2 2/4] tests/qtest: Add qtest_has_accel() method

2021-03-16 Thread Eric Blake
On 3/16/21 12:24 PM, Philippe Mathieu-Daudé wrote: > Introduce the qtest_has_accel() method which allows > to query at runtime if a QEMU instance has an accelerator which allows a runtime query on whether a QEMU instance > built-in. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Since v1: >

Re: [PATCH v2 1/4] accel: Introduce 'query-accels' QMP command

2021-03-16 Thread Eric Blake
On 3/16/21 12:24 PM, Philippe Mathieu-Daudé wrote: > Introduce the 'query-accels' QMP command which returns a list > of built-in accelerator names. > > - Accelerator is a QAPI enum of all existing accelerators, > > - AcceleratorInfo is a QAPI structure providing accelerator > specific

[PATCH v2 4/4] tests/qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore

2021-03-16 Thread Philippe Mathieu-Daudé
Since commit 82bf7ae84ce ("target/arm: Remove KVM support for 32-bit Arm hosts") we can remove the comment / check added in commit ab6b6a4 and directly run the bios-tables-test. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH v2 3/4] qtest/bios-tables-test: Make test build-independent from accelerator

2021-03-16 Thread Philippe Mathieu-Daudé
Now than we can probe if the TCG accelerator is available at runtime with a QMP command, do it once at the beginning and only register the tests we can run. We can then replace the #ifdef'ry by an assertion. Signed-off-by: Philippe Mathieu-Daudé --- v2: use global tcg_accel_available, call

Re: [RFC v2 00/13] vDPA software assisted live migration

2021-03-16 Thread Eugenio Perez Martin
On Tue, Mar 16, 2021 at 9:28 AM Jason Wang wrote: > > > 在 2021/3/16 上午3:48, Eugenio Pérez 写道: > > This series enable shadow virtqueue for vhost-net devices. This is a > > new method of vhost devices migration: Instead of relay on vhost > > device's dirty logging capability, SW assisted LM

Re: [PATCH v2 4/4] tests/qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore

2021-03-16 Thread Eric Blake
On 3/16/21 12:24 PM, Philippe Mathieu-Daudé wrote: > Since commit 82bf7ae84ce ("target/arm: Remove KVM support for > 32-bit Arm hosts") we can remove the comment / check added in > commit ab6b6a4 and directly run the bios-tables-test. > > Signed-off-by: Philippe Mathieu-Daudé > --- >

Half a usb-redir idea

2021-03-16 Thread Dr. David Alan Gilbert
Hi, I've got a half-baked idea, which I thought might be worth mentioning. How hard would it be to give qemu a usbredir server rather than client? It would have nothing guest visible but would look logically like the front (?) half of a usb interface; then you could use all of the existing qemu

Re: [PATCH v7 0/8] Pegasos2 emulation

2021-03-16 Thread BALATON Zoltan
On Tue, 16 Mar 2021, Mark Cave-Ayland wrote: On 16/03/2021 13:06, BALATON Zoltan wrote: The PATCH 1 doesn't seem to be needed to have a working Pegasos 2 machine, does it? It is needed (as well as all other patches in the series). Patch 1 is needed for getting serial output which is the only

[PATCH v2 1/4] accel: Introduce 'query-accels' QMP command

2021-03-16 Thread Philippe Mathieu-Daudé
Introduce the 'query-accels' QMP command which returns a list of built-in accelerator names. - Accelerator is a QAPI enum of all existing accelerators, - AcceleratorInfo is a QAPI structure providing accelerator specific information. Currently the common structure base provides the name of

[PATCH v2 2/4] tests/qtest: Add qtest_has_accel() method

2021-03-16 Thread Philippe Mathieu-Daudé
Introduce the qtest_has_accel() method which allows to query at runtime if a QEMU instance has an accelerator built-in. Signed-off-by: Philippe Mathieu-Daudé --- Since v1: - rename qtest_probe_accel() -> qtest_has_accel() - run with -machine none before creating QTestState ---

[PATCH v2 0/4] qtests: Check accelerator available at runtime via QMP 'query-accels'

2021-03-16 Thread Philippe Mathieu-Daudé
Hi, This series aims at having accelerator-independent qtests by querying a QEMU instance at runtime to check the list of built-in accelerators. First we add the 'query-accels' QMP command, then we add the qtest_has_accel() method to libqtest, finally we use this new method to allow running

Re: [PULL 00/11] QOM and fdc patches patches for 2021-03-16

2021-03-16 Thread Eric Blake
On 3/16/21 11:52 AM, Markus Armbruster wrote: > The following changes since commit 6e31b3a5c34c6e5be7ef60773e607f189eaa15f3: > > Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into > staging (2021-03-16 10:53:47 +) > > are available in the Git repository at: > >

[PULL 10/10] vfio/migrate: Move switch of dirty tracking into vfio_memory_listener

2021-03-16 Thread Alex Williamson
From: Keqian Zhu For now the switch of vfio dirty page tracking is integrated into @vfio_save_handler. The reason is that some PCI vendor driver may start to track dirty base on _SAVING state of device, so if dirty tracking is started before setting device state, vfio will report full-dirty to

Re: [PULL 00/11] QOM and fdc patches patches for 2021-03-16

2021-03-16 Thread Markus Armbruster
Duplicate sent by accident, my apologies.

Re: [PATCH 8/8] tools/virtiofsd: Replacing malloc-like calls with GLib's variants

2021-03-16 Thread Stefan Hajnoczi
On Mon, Mar 15, 2021 at 12:46:29PM +0200, Mahmoud Mandour wrote: > On Mon, Mar 15, 2021 at 12:01 PM Stefan Hajnoczi > wrote: > > > On Sun, Mar 14, 2021 at 05:23:24AM +0200, Mahmoud Mandour wrote: > > > @@ -130,7 +130,7 @@ static struct fuse_req *fuse_ll_alloc_req(struct > > fuse_session *se) > >

[PULL 08/10] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration

2021-03-16 Thread Alex Williamson
From: Shenming Lu In VFIO migration resume phase and some guest startups, there are already unmasked vectors in the vector table when calling vfio_msix_enable(). So in order to avoid inefficiently disabling and enabling vectors repeatedly, let's allocate all needed vectors first and then enable

[PULL 07/10] vfio: Set the priority of the VFIO VM state change handler explicitly

2021-03-16 Thread Alex Williamson
From: Shenming Lu In the VFIO VM state change handler when stopping the VM, the _RUNNING bit in device_state is cleared which makes the VFIO device stop, including no longer generating interrupts. Then we can save the pending states of all interrupts in the GIC VM state change handler (on ARM).

Re: Windows 10 won't run on default x86_64 machine anymore

2021-03-16 Thread Igor Mammedov
On Tue, 16 Mar 2021 17:28:52 +0100 Reinoud Zandijk wrote: > On Tue, Mar 16, 2021 at 01:53:01PM +0100, Igor Mammedov wrote: > > > The image file was downloaded pre-installed from Microsoft for Edge > > > browser > > > evaluation. I used it first on Qemu 5.1 IIRC and it kept working in Qemu > >

Re: [PULL v2 00/42] Block layer patches and object-add QAPIfication

2021-03-16 Thread Stefan Hajnoczi
On Tue, Mar 16, 2021 at 03:55:59PM +0100, Kevin Wolf wrote: > Am 16.03.2021 um 15:35 hat Kevin Wolf geschrieben: > > Am 16.03.2021 um 14:17 hat Peter Maydell geschrieben: > > > On Mon, 15 Mar 2021 at 12:35, Kevin Wolf wrote: > > > > > > > > The following changes since commit > > > >

[PULL 03/11] qapi: Implement deprecated-output=hide for QMP command results

2021-03-16 Thread Markus Armbruster
This policy suppresses deprecated bits in output, and thus permits "testing the future". Implement it for QMP command results. Example: when QEMU is run with -compat deprecated-output=hide, then {"execute": "query-cpus-fast"} yields {"return": [{"thread-id": 9805, "props": {"core-id":

[PULL 04/10] vfio: Do not register any IOMMU_NOTIFIER_DEVIOTLB_UNMAP notifier

2021-03-16 Thread Alex Williamson
From: Eric Auger In an attempt to fix smmu/virtio-iommu - vhost regression, commit 958ec334bca3 ("vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support") broke virtio-iommu integration. This is due to the fact VFIO registers IOMMU_NOTIFIER_ALL notifiers, which includes

<    1   2   3   4   5   6   >