All of lore.kernel.org
 help / color / mirror / Atom feed
* [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory, vl.c) changes for QEMU 6.0
@ 2020-12-10 12:19 Paolo Bonzini
  2020-12-10 12:19 ` [PULL 001/113] target/i386: fix operand order for PDEP and PEXT Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Paolo Bonzini @ 2020-12-10 12:19 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit 5e7b204dbfae9a562fc73684986f936b97f63877:

  Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2020-12-09 20:08:54 +0000)

are available in the Git repository at:

  https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to aeea99accef39f34dd1090c4aee86b7052076ce9:

  scripts: kernel-doc: remove unnecessary change wrt Linux (2020-12-09 18:16:05 -0500)

----------------------------------------------------------------
* Fix for NULL segments (Bin Meng)
* Support for 32768 CPUs on x86 without IOMMU (David)
* PDEP/PEXT fix and testcase (myself)
* Remove bios_name and ram_size globals (myself)
* qemu_init rationalization (myself)
* Update kernel-doc (myself + upstream patches)
* Propagate MemTxResult across DMA and PCI functions (Philippe)
* Remove master/slave when applicable (Philippe)
* WHPX support for in-kernel irqchip (Sunil)

----------------------------------------------------------------

v1->v2: Avoid &x->y on NULL
	Fix 32-bit compilation of test-i386-bmi2
	Fix conflicts

Alexander A. Klimov (1):
      Replace HTTP links with HTTPS ones: documentation

André Almeida (2):
      kernel-doc: fix processing nested structs with attributes
      kernel-doc: add support for ____cacheline_aligned_in_smp attribute

Bin Meng (1):
      target/i386: seg_helper: Correct segment selector nullification in the RET/IRET helper

David Woodhouse (1):
      target/i386: Support up to 32768 CPUs without IRQ remapping

Jonathan Cameron (1):
      kernel-doc: add support for ____cacheline_aligned attribute

Jonathan Neuschäfer (1):
      scripts/kernel-doc: Add support for named variable macro arguments

Mauro Carvalho Chehab (19):
      scripts: kernel-doc: proper handle @foo->bar()
      scripts: kernel-doc: accept negation like !@var
      scripts: kernel-doc: accept blank lines on parameter description
      scripts/kernel-doc: parse __ETHTOOL_DECLARE_LINK_MODE_MASK
      scripts/kernel-doc: handle function pointer prototypes
      kernel-doc: include line numbers for function prototypes
      scripts: kernel-doc: add support for typedef enum
      scripts: kernel-doc: make it more compatible with Sphinx 3.x
      scripts: kernel-doc: use a less pedantic markup for funcs on Sphinx 3.x
      scripts: kernel-doc: fix troubles with line counts
      scripts: kernel-doc: reimplement -nofunction argument
      scripts: kernel-doc: fix typedef identification
      scripts: kernel-doc: don't mangle with parameter list
      scripts: kernel-doc: allow passing desired Sphinx C domain dialect
      scripts: kernel-doc: fix line number handling
      scripts: kernel-doc: try to use c:function if possible
      scripts: kernel-doc: fix typedef parsing
      scripts: kernel-doc: split typedef complex regex
      scripts: kernel-doc: use :c:union when needed

Paolo Bonzini (69):
      target/i386: fix operand order for PDEP and PEXT
      qom: eliminate identical functions
      alpha: remove bios_name
      arm: remove bios_name
      hppa: remove bios_name
      i386: remove bios_name
      lm32: remove bios_name
      m68k: remove bios_name
      mips: remove bios_name
      moxie: remove bios_name
      ppc: remove bios_name
      rx: move BIOS load from MCU to board
      s390: remove bios_name
      sh4: remove bios_name
      sparc: remove bios_name
      digic: remove bios_name
      vl: remove bios_name
      arm: do not use ram_size global
      cris: do not use ram_size global
      hppa: do not use ram_size global
      i386: do not use ram_size global
      m68k: do not use ram_size global
      microblaze: do not use ram_size global
      mips: do not use ram_size global
      moxie: do not use ram_size global
      nios2: do not use ram_size global
      ppc: do not use ram_size global
      riscv: do not use ram_size global
      s390x: do not use ram_size global
      sparc64: do not use ram_size global
      make ram_size local to vl.c
      treewide: do not use short-form boolean options
      vl: extract validation of -smp to machine.c
      vl: remove bogus check
      vl: split various early command line options to a separate function
      vl: move various initialization routines out of qemu_init
      vl: extract qemu_init_subsystems
      vl: move prelaunch part of qemu_init to new functions
      vl: extract various command line validation snippets to a new function
      vl: preconfig and loadvm are mutually exclusive
      vl: extract various command line desugaring snippets to a new function
      qemu-option: restrict qemu_opts_set to merge-lists QemuOpts
      vl: create "-net nic -net user" default earlier
      vl: load plugins as late as possible
      vl: extract default devices to separate functions
      vl: move CHECKPOINT_INIT after preconfig
      vl: separate qemu_create_early_backends
      vl: separate qemu_create_late_backends
      vl: separate qemu_create_machine
      vl: separate qemu_apply_machine_options
      vl: separate qemu_resolve_machine_memdev
      vl: initialize displays before preconfig loop
      vl: move -global check earlier
      migration, vl: start migration via qmp_migrate_incoming
      vl: start VM via qmp_cont
      hmp: introduce cmd_available
      vl: extract softmmu/datadir.c
      vl: extract machine done notifiers
      vl: extract softmmu/rtc.c
      vl: remove serial_max_hds
      vl: clean up -boot variables
      config-file: move -set implementation to vl.c
      docs: temporarily disable the kernel-doc extension
      Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments"
      Revert "kernel-doc: Use c:struct for Sphinx 3.0 and later"
      Revert "kernel-doc: Handle function typedefs without asterisks"
      Revert "kernel-doc: Handle function typedefs that return pointers"
      Revert "docs: temporarily disable the kernel-doc extension"
      scripts: kernel-doc: remove unnecessary change wrt Linux

Philippe Mathieu-Daudé (16):
      docs/devel/loads-stores: Add regexp for DMA functions
      dma: Document address_space_map/address_space_unmap() prototypes
      dma: Let dma_memory_set() propagate MemTxResult
      dma: Let dma_memory_rw() propagate MemTxResult
      dma: Let dma_memory_read() propagate MemTxResult
      dma: Let dma_memory_write() propagate MemTxResult
      pci: Let pci_dma_rw() propagate MemTxResult
      pci: Let pci_dma_read() propagate MemTxResult
      pci: Let pci_dma_write() propagate MemTxResult
      hw/ssi/aspeed_smc: Rename 'max_slaves' variable as 'max_peripherals'
      hw/ssi: Update coding style to make checkpatch.pl happy
      hw/ssi: Rename SSI 'slave' as 'peripheral'
      hw/core/stream: Rename StreamSlave as StreamSink
      hw/dma/xilinx_axidma: Rename StreamSlave as StreamSink
      hw/net/xilinx_axienet: Rename StreamSlave as StreamSink
      hw/char/serial: Clean up unnecessary code

Pierre-Louis Bossart (1):
      scripts/kernel-doc: optionally treat warnings as errors

Sunil Muthuswamy (1):
      WHPX: support for the kernel-irqchip on/off

 MAINTAINERS                                 |    1 +
 docs/devel/loads-stores.rst                 |    2 +
 docs/specs/tpm.rst                          |    2 +-
 docs/sphinx/kerneldoc.py                    |    6 +-
 hw/alpha/dp264.c                            |    3 +-
 hw/arm/aspeed.c                             |    8 +-
 hw/arm/boot.c                               |    1 +
 hw/arm/cubieboard.c                         |    2 +-
 hw/arm/digic_boards.c                       |   20 +-
 hw/arm/highbank.c                           |    9 +-
 hw/arm/npcm7xx_boards.c                     |    6 +-
 hw/arm/orangepi.c                           |    2 +-
 hw/arm/sbsa-ref.c                           |    3 +
 hw/arm/spitz.c                              |   32 +-
 hw/arm/stellaris.c                          |    4 +-
 hw/arm/tosa.c                               |   12 +-
 hw/arm/vexpress.c                           |    9 +-
 hw/arm/virt.c                               |    3 +
 hw/arm/z2.c                                 |   14 +-
 hw/avr/boot.c                               |    1 +
 hw/block/m25p80.c                           |   14 +-
 hw/char/serial.c                            |   13 +-
 hw/core/generic-loader.c                    |    3 +-
 hw/core/loader.c                            |    1 +
 hw/core/machine.c                           |   56 +
 hw/core/numa.c                              |   10 +-
 hw/core/stream.c                            |   20 +-
 hw/cris/axis_dev88.c                        |    1 +
 hw/cris/boot.c                              |    2 +-
 hw/cris/boot.h                              |    1 +
 hw/display/ads7846.c                        |   12 +-
 hw/display/cg3.c                            |    1 +
 hw/display/pxa2xx_lcd.c                     |    5 +-
 hw/display/ssd0323.c                        |   12 +-
 hw/display/tcx.c                            |    1 +
 hw/dma/xilinx_axidma.c                      |   58 +-
 hw/hppa/machine.c                           |   14 +-
 hw/i386/fw_cfg.c                            |    2 +-
 hw/i386/kvm/apic.c                          |    7 +
 hw/i386/microvm.c                           |    7 +-
 hw/i386/pc.c                                |   16 +-
 hw/i386/pc_sysfw.c                          |    4 +-
 hw/i386/vmport.c                            |    3 +-
 hw/i386/x86.c                               |   17 +-
 hw/i386/xen/xen-hvm.c                       |    2 +-
 hw/intc/apic_common.c                       |    3 +-
 hw/lm32/milkymist.c                         |    5 +-
 hw/m68k/mcf5206.c                           |    4 +-
 hw/m68k/mcf5208.c                           |   14 +-
 hw/m68k/next-cube.c                         |    4 +-
 hw/m68k/q800.c                              |    5 +-
 hw/microblaze/boot.c                        |    9 +-
 hw/mips/fuloong2e.c                         |   11 +-
 hw/mips/jazz.c                              |    7 +-
 hw/mips/malta.c                             |    9 +-
 hw/mips/mipssim.c                           |    7 +-
 hw/misc/max111x.c                           |   18 +-
 hw/moxie/moxiesim.c                         |    8 +-
 hw/net/xilinx_axienet.c                     |   44 +-
 hw/nios2/boot.c                             |    9 +-
 hw/nvram/fw_cfg.c                           |    1 +
 hw/pci-host/prep.c                          |    1 +
 hw/pci/pci.c                                |    1 +
 hw/ppc/e500.c                               |    5 +-
 hw/ppc/mac_newworld.c                       |    5 +-
 hw/ppc/mac_oldworld.c                       |    5 +-
 hw/ppc/pnv.c                                |    6 +-
 hw/ppc/ppc405_boards.c                      |    7 +-
 hw/ppc/ppc440_bamboo.c                      |    1 +
 hw/ppc/prep.c                               |    6 +-
 hw/ppc/sam460ex.c                           |    1 +
 hw/ppc/spapr.c                              |   11 +-
 hw/ppc/spapr_vio.c                          |    4 +-
 hw/ppc/virtex_ml507.c                       |    1 +
 hw/riscv/boot.c                             |    6 +-
 hw/rx/rx-gdbsim.c                           |   10 +
 hw/rx/rx62n.c                               |    9 -
 hw/s390x/ipl.c                              |   19 +-
 hw/s390x/s390-skeys.c                       |    6 +-
 hw/s390x/s390-virtio-ccw.c                  |    7 +-
 hw/sd/ssi-sd.c                              |   12 +-
 hw/sh4/shix.c                               |    3 +-
 hw/smbios/smbios.c                          |    8 +-
 hw/sparc/leon3.c                            |    5 +-
 hw/sparc/sun4m.c                            |    3 +-
 hw/sparc64/sparc64.c                        |    3 +-
 hw/sparc64/sun4u.c                          |    7 +-
 hw/ssi/aspeed_smc.c                         |   53 +-
 hw/ssi/pl022.c                              |    2 +-
 hw/ssi/ssi.c                                |   48 +-
 hw/ssi/xilinx_spips.c                       |    9 +-
 hw/virtio/virtio-balloon.c                  |    3 +-
 include/exec/cpu-common.h                   |    2 -
 include/hw/boards.h                         |    2 +
 include/hw/i386/x86.h                       |    3 +-
 include/hw/misc/max111x.h                   |    2 +-
 include/hw/pci/pci.h                        |   50 +-
 include/hw/qdev-core.h                      |    8 -
 include/hw/ssi/aspeed_smc.h                 |    2 +-
 include/hw/ssi/ssi.h                        |   56 +-
 include/hw/ssi/xilinx_spips.h               |    2 +-
 include/hw/stream.h                         |   41 +-
 include/migration/misc.h                    |    1 -
 include/qemu-common.h                       |   21 -
 include/qemu/config-file.h                  |    1 -
 include/qemu/datadir.h                      |   28 +
 include/qemu/option.h                       |    3 +-
 include/standard-headers/asm-x86/kvm_para.h |    1 +
 include/sysemu/dma.h                        |  117 +-
 include/sysemu/sysemu.h                     |   10 +-
 include/sysemu/whpx.h                       |   22 +
 migration/migration.c                       |   37 +-
 monitor/hmp.c                               |   18 +-
 monitor/qmp-cmds.c                          |    3 +-
 python/qemu/machine.py                      |    2 +-
 qemu-options.hx                             |   32 +-
 qom/object.c                                |   36 +-
 scripts/kernel-doc                          |  455 ++++---
 softmmu/cpus.c                              |    3 +-
 softmmu/datadir.c                           |  129 ++
 softmmu/dma-helpers.c                       |    7 +-
 softmmu/meson.build                         |    2 +
 softmmu/qdev-monitor.c                      |    6 -
 softmmu/rtc.c                               |  190 +++
 softmmu/vl.c                                | 1755 ++++++++++++---------------
 target/arm/arm-semi.c                       |    3 +-
 target/i386/cpu.c                           |    8 +-
 target/i386/kvm.c                           |   77 +-
 target/i386/kvm_i386.h                      |    2 +
 target/i386/meson.build                     |    1 +
 target/i386/seg_helper.c                    |    5 +-
 target/i386/translate.c                     |    8 +-
 target/i386/whp-dispatch.h                  |    9 +-
 target/i386/whpx-all.c                      |  291 ++++-
 target/i386/whpx-apic.c                     |  274 +++++
 target/m68k/m68k-semi.c                     |    5 +-
 target/s390x/excp_helper.c                  |    3 +-
 target/s390x/mem_helper.c                   |   10 +-
 target/s390x/mmu_helper.c                   |    4 +-
 tests/qtest/bios-tables-test.c              |    4 +-
 tests/qtest/fuzz/fuzz.c                     |    1 +
 tests/qtest/pflash-cfi02-test.c             |    4 +-
 tests/qtest/test-filter-redirector.c        |    8 +-
 tests/qtest/vhost-user-test.c               |    8 +-
 tests/tcg/i386/Makefile.target              |    3 +
 tests/tcg/i386/test-i386-bmi2.c             |   41 +
 tests/test-char.c                           |    8 +-
 tests/test-qemu-opts.c                      |   20 +-
 ui/keymaps.c                                |    1 +
 util/qemu-config.c                          |   33 -
 util/qemu-option.c                          |    9 +-
 151 files changed, 2922 insertions(+), 1812 deletions(-)
 create mode 100644 include/qemu/datadir.h
 create mode 100644 softmmu/datadir.c
 create mode 100644 softmmu/rtc.c
 create mode 100644 target/i386/whpx-apic.c
 create mode 100644 tests/tcg/i386/test-i386-bmi2.c
-- 
2.26.2



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PULL 001/113] target/i386: fix operand order for PDEP and PEXT
  2020-12-10 12:19 [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory, vl.c) changes for QEMU 6.0 Paolo Bonzini
@ 2020-12-10 12:19 ` Paolo Bonzini
  2020-12-10 12:19 ` [PULL 002/113] target/i386: Support up to 32768 CPUs without IRQ remapping Paolo Bonzini
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2020-12-10 12:19 UTC (permalink / raw)
  To: qemu-devel

For PDEP and PEXT, the mask is provided in the memory (mod+r/m)
operand, and therefore is loaded in s->T0 by gen_ldst_modrm.
The source is provided in the second source operand (VEX.vvvv)
and therefore is loaded in s->T1.  Fix the order in which
they are passed to the helpers.

Reported-by: Lenard Szolnoki <blog@lenardszolnoki.com>
Analyzed-by: Lenard Szolnoki <blog@lenardszolnoki.com>
Fixes: https://bugs.launchpad.net/qemu/+bug/1605123
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/translate.c         |  8 +++----
 tests/tcg/i386/Makefile.target  |  3 +++
 tests/tcg/i386/test-i386-bmi2.c | 41 +++++++++++++++++++++++++++++++++
 3 files changed, 48 insertions(+), 4 deletions(-)
 create mode 100644 tests/tcg/i386/test-i386-bmi2.c

diff --git a/target/i386/translate.c b/target/i386/translate.c
index 4c57307e42..e8f5f5803a 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -3936,14 +3936,14 @@ static void gen_sse(CPUX86State *env, DisasContext *s, int b,
                 }
                 ot = mo_64_32(s->dflag);
                 gen_ldst_modrm(env, s, modrm, ot, OR_TMP0, 0);
-                /* Note that by zero-extending the mask operand, we
+                /* Note that by zero-extending the source operand, we
                    automatically handle zero-extending the result.  */
                 if (ot == MO_64) {
                     tcg_gen_mov_tl(s->T1, cpu_regs[s->vex_v]);
                 } else {
                     tcg_gen_ext32u_tl(s->T1, cpu_regs[s->vex_v]);
                 }
-                gen_helper_pdep(cpu_regs[reg], s->T0, s->T1);
+                gen_helper_pdep(cpu_regs[reg], s->T1, s->T0);
                 break;
 
             case 0x2f5: /* pext Gy, By, Ey */
@@ -3954,14 +3954,14 @@ static void gen_sse(CPUX86State *env, DisasContext *s, int b,
                 }
                 ot = mo_64_32(s->dflag);
                 gen_ldst_modrm(env, s, modrm, ot, OR_TMP0, 0);
-                /* Note that by zero-extending the mask operand, we
+                /* Note that by zero-extending the source operand, we
                    automatically handle zero-extending the result.  */
                 if (ot == MO_64) {
                     tcg_gen_mov_tl(s->T1, cpu_regs[s->vex_v]);
                 } else {
                     tcg_gen_ext32u_tl(s->T1, cpu_regs[s->vex_v]);
                 }
-                gen_helper_pext(cpu_regs[reg], s->T0, s->T1);
+                gen_helper_pext(cpu_regs[reg], s->T1, s->T0);
                 break;
 
             case 0x1f6: /* adcx Gy, Ey */
diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target
index a66232a67d..ad187cb2c9 100644
--- a/tests/tcg/i386/Makefile.target
+++ b/tests/tcg/i386/Makefile.target
@@ -18,6 +18,9 @@ test-i386-pcmpistri: CFLAGS += -msse4.2
 run-test-i386-pcmpistri: QEMU_OPTS += -cpu max
 run-plugin-test-i386-pcmpistri-%: QEMU_OPTS += -cpu max
 
+run-test-i386-bmi2: QEMU_OPTS += -cpu max
+run-plugin-test-i386-bmi2-%: QEMU_OPTS += -cpu max
+
 #
 # hello-i386 is a barebones app
 #
diff --git a/tests/tcg/i386/test-i386-bmi2.c b/tests/tcg/i386/test-i386-bmi2.c
new file mode 100644
index 0000000000..b61f05b69e
--- /dev/null
+++ b/tests/tcg/i386/test-i386-bmi2.c
@@ -0,0 +1,41 @@
+/* See if various BMI2 instructions give expected results */
+#include <assert.h>
+#include <stdint.h>
+
+int main(int argc, char *argv[]) {
+    uint64_t ehlo = 0x202020204f4c4845ull;
+    uint64_t mask = 0xa080800302020001ull;
+    uint64_t result64;
+    uint32_t result32;
+
+#ifdef __x86_64
+    /* 64 bits */
+    asm volatile ("pextq   %2, %1, %0" : "=r"(result64) : "r"(ehlo), "m"(mask));
+    assert(result64 == 133);
+
+    asm volatile ("pdepq   %2, %1, %0" : "=r"(result64) : "r"(result64), "m"(mask));
+    assert(result64 == (ehlo & mask));
+
+    asm volatile ("pextq   %2, %1, %0" : "=r"(result64) : "r"(-1ull), "m"(mask));
+    assert(result64 == 511); /* mask has 9 bits set */
+
+    asm volatile ("pdepq   %2, %1, %0" : "=r"(result64) : "r"(-1ull), "m"(mask));
+    assert(result64 == mask);
+#endif
+
+    /* 32 bits */
+    asm volatile ("pextl   %2, %k1, %k0" : "=r"(result32) : "r"((uint32_t) ehlo), "m"(mask));
+    assert(result32 == 5);
+
+    asm volatile ("pdepl   %2, %k1, %k0" : "=r"(result32) : "r"(result32), "m"(mask));
+    assert(result32 == (uint32_t)(ehlo & mask));
+
+    asm volatile ("pextl   %2, %k1, %k0" : "=r"(result32) : "r"(-1ull), "m"(mask));
+    assert(result32 == 7); /* mask has 3 bits set */
+
+    asm volatile ("pdepl   %2, %k1, %k0" : "=r"(result32) : "r"(-1ull), "m"(mask));
+    assert(result32 == (uint32_t)mask);
+
+    return 0;
+}
+
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 002/113] target/i386: Support up to 32768 CPUs without IRQ remapping
  2020-12-10 12:19 [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory, vl.c) changes for QEMU 6.0 Paolo Bonzini
  2020-12-10 12:19 ` [PULL 001/113] target/i386: fix operand order for PDEP and PEXT Paolo Bonzini
@ 2020-12-10 12:19 ` Paolo Bonzini
  2020-12-10 12:19 ` [PULL 051/113] treewide: do not use short-form boolean options Paolo Bonzini
  2020-12-10 17:00 ` [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory, vl.c) changes for QEMU 6.0 Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2020-12-10 12:19 UTC (permalink / raw)
  To: qemu-devel

From: David Woodhouse <dwmw2@infradead.org>

The IOAPIC has an 'Extended Destination ID' field in its RTE, which maps
to bits 11-4 of the MSI address. Since those address bits fall within a
given 4KiB page they were historically non-trivial to use on real hardware.

The Intel IOMMU uses the lowest bit to indicate a remappable format MSI,
and then the remaining 7 bits are part of the index.

Where the remappable format bit isn't set, we can actually use the other
seven to allow external (IOAPIC and MSI) interrupts to reach up to 32768
CPUs instead of just the 255 permitted on bare metal.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Message-Id: <78097f9218300e63e751e077a0a5ca029b56ba46.camel@infradead.org>
[Fix UBSAN warning. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
---
 hw/i386/kvm/apic.c                          |  7 ++
 hw/i386/pc.c                                | 16 ++---
 include/standard-headers/asm-x86/kvm_para.h |  1 +
 target/i386/cpu.c                           |  5 +-
 target/i386/kvm.c                           | 77 ++++++++++++++++-----
 target/i386/kvm_i386.h                      |  2 +
 6 files changed, 78 insertions(+), 30 deletions(-)

diff --git a/hw/i386/kvm/apic.c b/hw/i386/kvm/apic.c
index dd29906061..b226b674e8 100644
--- a/hw/i386/kvm/apic.c
+++ b/hw/i386/kvm/apic.c
@@ -183,6 +183,13 @@ static void kvm_send_msi(MSIMessage *msg)
 {
     int ret;
 
+    /*
+     * The message has already passed through interrupt remapping if enabled,
+     * but the legacy extended destination ID in low bits still needs to be
+     * handled.
+     */
+    msg->address = kvm_swizzle_msi_ext_dest_id(msg->address);
+
     ret = kvm_irqchip_send_msi(kvm_state, *msg);
     if (ret < 0) {
         fprintf(stderr, "KVM: injection failed, MSI lost (%s)\n",
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 9e29f3792b..640fb5b0b7 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -104,6 +104,7 @@ const size_t pc_compat_5_2_len = G_N_ELEMENTS(pc_compat_5_2);
 
 GlobalProperty pc_compat_5_1[] = {
     { "ICH9-LPC", "x-smi-cpu-hotplug", "off" },
+    { TYPE_X86_CPU, "kvm-msi-ext-dest-id", "off" },
 };
 const size_t pc_compat_5_1_len = G_N_ELEMENTS(pc_compat_5_1);
 
@@ -796,17 +797,12 @@ void pc_machine_done(Notifier *notifier, void *data)
         fw_cfg_modify_i16(x86ms->fw_cfg, FW_CFG_NB_CPUS, x86ms->boot_cpus);
     }
 
-    if (x86ms->apic_id_limit > 255 && !xen_enabled()) {
-        IntelIOMMUState *iommu = INTEL_IOMMU_DEVICE(x86_iommu_get_default());
 
-        if (!iommu || !x86_iommu_ir_supported(X86_IOMMU_DEVICE(iommu)) ||
-            iommu->intr_eim != ON_OFF_AUTO_ON) {
-            error_report("current -smp configuration requires "
-                         "Extended Interrupt Mode enabled. "
-                         "You can add an IOMMU using: "
-                         "-device intel-iommu,intremap=on,eim=on");
-            exit(EXIT_FAILURE);
-        }
+    if (x86ms->apic_id_limit > 255 && !xen_enabled() &&
+        !kvm_irqchip_in_kernel()) {
+        error_report("current -smp configuration requires kernel "
+                     "irqchip support.");
+        exit(EXIT_FAILURE);
     }
 }
 
diff --git a/include/standard-headers/asm-x86/kvm_para.h b/include/standard-headers/asm-x86/kvm_para.h
index 07877d3295..215d01b4ec 100644
--- a/include/standard-headers/asm-x86/kvm_para.h
+++ b/include/standard-headers/asm-x86/kvm_para.h
@@ -32,6 +32,7 @@
 #define KVM_FEATURE_POLL_CONTROL	12
 #define KVM_FEATURE_PV_SCHED_YIELD	13
 #define KVM_FEATURE_ASYNC_PF_INT	14
+#define KVM_FEATURE_MSI_EXT_DEST_ID	15
 
 #define KVM_HINTS_REALTIME      0
 
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 5a8c96072e..b90ed05897 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -799,7 +799,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
             "kvmclock", "kvm-nopiodelay", "kvm-mmu", "kvmclock",
             "kvm-asyncpf", "kvm-steal-time", "kvm-pv-eoi", "kvm-pv-unhalt",
             NULL, "kvm-pv-tlb-flush", NULL, "kvm-pv-ipi",
-            "kvm-poll-control", "kvm-pv-sched-yield", "kvm-asyncpf-int", NULL,
+            "kvm-poll-control", "kvm-pv-sched-yield", "kvm-asyncpf-int", "kvm-msi-ext-dest-id",
             NULL, NULL, NULL, NULL,
             NULL, NULL, NULL, NULL,
             "kvmclock-stable-bit", NULL, NULL, NULL,
@@ -4114,6 +4114,7 @@ static PropValue kvm_default_props[] = {
     { "kvm-pv-eoi", "on" },
     { "kvmclock-stable-bit", "on" },
     { "x2apic", "on" },
+    { "kvm-msi-ext-dest-id", "off" },
     { "acpi", "off" },
     { "monitor", "off" },
     { "svm", "off" },
@@ -5140,6 +5141,8 @@ static void x86_cpu_load_model(X86CPU *cpu, X86CPUModel *model)
     if (kvm_enabled()) {
         if (!kvm_irqchip_in_kernel()) {
             x86_cpu_change_kvm_default("x2apic", "off");
+        } else if (kvm_irqchip_is_split() && kvm_enable_x2apic()) {
+            x86_cpu_change_kvm_default("kvm-msi-ext-dest-id", "on");
         }
 
         x86_cpu_apply_props(cpu, kvm_default_props);
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index a2934dda02..bcfa4b03e0 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -416,6 +416,9 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function,
         if (!kvm_irqchip_in_kernel()) {
             ret &= ~(1U << KVM_FEATURE_PV_UNHALT);
         }
+        if (kvm_irqchip_is_split()) {
+            ret |= 1U << KVM_FEATURE_MSI_EXT_DEST_ID;
+        }
     } else if (function == KVM_CPUID_FEATURES && reg == R_EDX) {
         ret |= 1U << KVM_HINTS_REALTIME;
     }
@@ -4589,38 +4592,74 @@ int kvm_arch_irqchip_create(KVMState *s)
     }
 }
 
+uint64_t kvm_swizzle_msi_ext_dest_id(uint64_t address)
+{
+    CPUX86State *env;
+    uint64_t ext_id;
+
+    if (!first_cpu) {
+        return address;
+    }
+    env = &X86_CPU(first_cpu)->env;
+    if (!(env->features[FEAT_KVM] & (1 << KVM_FEATURE_MSI_EXT_DEST_ID))) {
+        return address;
+    }
+
+    /*
+     * If the remappable format bit is set, or the upper bits are
+     * already set in address_hi, or the low extended bits aren't
+     * there anyway, do nothing.
+     */
+    ext_id = address & (0xff << MSI_ADDR_DEST_IDX_SHIFT);
+    if (!ext_id || (ext_id & (1 << MSI_ADDR_DEST_IDX_SHIFT)) || (address >> 32)) {
+        return address;
+    }
+
+    address &= ~ext_id;
+    address |= ext_id << 35;
+    return address;
+}
+
 int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
                              uint64_t address, uint32_t data, PCIDevice *dev)
 {
     X86IOMMUState *iommu = x86_iommu_get_default();
 
     if (iommu) {
-        int ret;
-        MSIMessage src, dst;
         X86IOMMUClass *class = X86_IOMMU_DEVICE_GET_CLASS(iommu);
 
-        if (!class->int_remap) {
-            return 0;
-        }
+        if (class->int_remap) {
+            int ret;
+            MSIMessage src, dst;
 
-        src.address = route->u.msi.address_hi;
-        src.address <<= VTD_MSI_ADDR_HI_SHIFT;
-        src.address |= route->u.msi.address_lo;
-        src.data = route->u.msi.data;
+            src.address = route->u.msi.address_hi;
+            src.address <<= VTD_MSI_ADDR_HI_SHIFT;
+            src.address |= route->u.msi.address_lo;
+            src.data = route->u.msi.data;
 
-        ret = class->int_remap(iommu, &src, &dst, dev ? \
-                               pci_requester_id(dev) : \
-                               X86_IOMMU_SID_INVALID);
-        if (ret) {
-            trace_kvm_x86_fixup_msi_error(route->gsi);
-            return 1;
-        }
+            ret = class->int_remap(iommu, &src, &dst, dev ?     \
+                                   pci_requester_id(dev) :      \
+                                   X86_IOMMU_SID_INVALID);
+            if (ret) {
+                trace_kvm_x86_fixup_msi_error(route->gsi);
+                return 1;
+            }
+
+            /*
+             * Handled untranslated compatibilty format interrupt with
+             * extended destination ID in the low bits 11-5. */
+            dst.address = kvm_swizzle_msi_ext_dest_id(dst.address);
 
-        route->u.msi.address_hi = dst.address >> VTD_MSI_ADDR_HI_SHIFT;
-        route->u.msi.address_lo = dst.address & VTD_MSI_ADDR_LO_MASK;
-        route->u.msi.data = dst.data;
+            route->u.msi.address_hi = dst.address >> VTD_MSI_ADDR_HI_SHIFT;
+            route->u.msi.address_lo = dst.address & VTD_MSI_ADDR_LO_MASK;
+            route->u.msi.data = dst.data;
+            return 0;
+        }
     }
 
+    address = kvm_swizzle_msi_ext_dest_id(address);
+    route->u.msi.address_hi = address >> VTD_MSI_ADDR_HI_SHIFT;
+    route->u.msi.address_lo = address & VTD_MSI_ADDR_LO_MASK;
     return 0;
 }
 
diff --git a/target/i386/kvm_i386.h b/target/i386/kvm_i386.h
index a4a619cebb..dc72508389 100644
--- a/target/i386/kvm_i386.h
+++ b/target/i386/kvm_i386.h
@@ -48,4 +48,6 @@ bool kvm_has_waitpkg(void);
 
 bool kvm_hv_vpindex_settable(void);
 
+uint64_t kvm_swizzle_msi_ext_dest_id(uint64_t address);
+
 #endif
-- 
2.26.2




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PULL 051/113] treewide: do not use short-form boolean options
  2020-12-10 12:19 [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory, vl.c) changes for QEMU 6.0 Paolo Bonzini
  2020-12-10 12:19 ` [PULL 001/113] target/i386: fix operand order for PDEP and PEXT Paolo Bonzini
  2020-12-10 12:19 ` [PULL 002/113] target/i386: Support up to 32768 CPUs without IRQ remapping Paolo Bonzini
@ 2020-12-10 12:19 ` Paolo Bonzini
  2020-12-10 17:00 ` [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory, vl.c) changes for QEMU 6.0 Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2020-12-10 12:19 UTC (permalink / raw)
  To: qemu-devel

They are going to be deprecated, avoid warnings on stdout while the
tests run.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/specs/tpm.rst                   |  2 +-
 python/qemu/machine.py               |  2 +-
 qemu-options.hx                      | 32 ++++++++++++++--------------
 tests/qtest/bios-tables-test.c       |  4 ++--
 tests/qtest/pflash-cfi02-test.c      |  4 ++--
 tests/qtest/test-filter-redirector.c |  8 +++----
 tests/qtest/vhost-user-test.c        |  8 +++----
 tests/test-char.c                    |  8 +++----
 8 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst
index 5e9aef4db3..3be190343a 100644
--- a/docs/specs/tpm.rst
+++ b/docs/specs/tpm.rst
@@ -343,7 +343,7 @@ In case an Arm virt machine is emulated, use the following command line:
     -device tpm-tis-device,tpmdev=tpm0 \
     -device virtio-blk-pci,drive=drv0 \
     -drive format=qcow2,file=hda.qcow2,if=none,id=drv0 \
-    -drive if=pflash,format=raw,file=flash0.img,readonly \
+    -drive if=pflash,format=raw,file=flash0.img,readonly=on \
     -drive if=pflash,format=raw,file=flash1.img
 
 In case SeaBIOS is used as firmware, it should show the TPM menu item
diff --git a/python/qemu/machine.py b/python/qemu/machine.py
index 64d966aeeb..7a40f4604b 100644
--- a/python/qemu/machine.py
+++ b/python/qemu/machine.py
@@ -292,7 +292,7 @@ class QEMUMachine:
         for _ in range(self._console_index):
             args.extend(['-serial', 'null'])
         if self._console_set:
-            chardev = ('socket,id=console,path=%s,server,nowait' %
+            chardev = ('socket,id=console,path=%s,server=on,wait=off' %
                        self._console_address)
             args.extend(['-chardev', chardev])
             if self._console_device_type is None:
diff --git a/qemu-options.hx b/qemu-options.hx
index 104632ea34..e60ad42976 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1406,25 +1406,25 @@ ERST
 
 DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev,
     "-fsdev local,id=id,path=path,security_model=mapped-xattr|mapped-file|passthrough|none\n"
-    " [,writeout=immediate][,readonly][,fmode=fmode][,dmode=dmode]\n"
+    " [,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode]\n"
     " [[,throttling.bps-total=b]|[[,throttling.bps-read=r][,throttling.bps-write=w]]]\n"
     " [[,throttling.iops-total=i]|[[,throttling.iops-read=r][,throttling.iops-write=w]]]\n"
     " [[,throttling.bps-total-max=bm]|[[,throttling.bps-read-max=rm][,throttling.bps-write-max=wm]]]\n"
     " [[,throttling.iops-total-max=im]|[[,throttling.iops-read-max=irm][,throttling.iops-write-max=iwm]]]\n"
     " [[,throttling.iops-size=is]]\n"
-    "-fsdev proxy,id=id,socket=socket[,writeout=immediate][,readonly]\n"
-    "-fsdev proxy,id=id,sock_fd=sock_fd[,writeout=immediate][,readonly]\n"
+    "-fsdev proxy,id=id,socket=socket[,writeout=immediate][,readonly=on]\n"
+    "-fsdev proxy,id=id,sock_fd=sock_fd[,writeout=immediate][,readonly=on]\n"
     "-fsdev synth,id=id\n",
     QEMU_ARCH_ALL)
 
 SRST
-``-fsdev local,id=id,path=path,security_model=security_model [,writeout=writeout][,readonly][,fmode=fmode][,dmode=dmode] [,throttling.option=value[,throttling.option=value[,...]]]``
+``-fsdev local,id=id,path=path,security_model=security_model [,writeout=writeout][,readonly=on][,fmode=fmode][,dmode=dmode] [,throttling.option=value[,throttling.option=value[,...]]]``
   \ 
-``-fsdev proxy,id=id,socket=socket[,writeout=writeout][,readonly]``
+``-fsdev proxy,id=id,socket=socket[,writeout=writeout][,readonly=on]``
   \
-``-fsdev proxy,id=id,sock_fd=sock_fd[,writeout=writeout][,readonly]``
+``-fsdev proxy,id=id,sock_fd=sock_fd[,writeout=writeout][,readonly=on]``
   \
-``-fsdev synth,id=id[,readonly]``
+``-fsdev synth,id=id[,readonly=on]``
     Define a new file system device. Valid options are:
 
     ``local``
@@ -1467,7 +1467,7 @@ SRST
         guest only when the data has been reported as written by the
         storage subsystem.
 
-    ``readonly``
+    ``readonly=on``
         Enables exporting 9p share as a readonly mount for guests. By
         default read-write access is given.
 
@@ -1532,18 +1532,18 @@ ERST
 
 DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs,
     "-virtfs local,path=path,mount_tag=tag,security_model=mapped-xattr|mapped-file|passthrough|none\n"
-    "        [,id=id][,writeout=immediate][,readonly][,fmode=fmode][,dmode=dmode][,multidevs=remap|forbid|warn]\n"
-    "-virtfs proxy,mount_tag=tag,socket=socket[,id=id][,writeout=immediate][,readonly]\n"
-    "-virtfs proxy,mount_tag=tag,sock_fd=sock_fd[,id=id][,writeout=immediate][,readonly]\n"
-    "-virtfs synth,mount_tag=tag[,id=id][,readonly]\n",
+    "        [,id=id][,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode][,multidevs=remap|forbid|warn]\n"
+    "-virtfs proxy,mount_tag=tag,socket=socket[,id=id][,writeout=immediate][,readonly=on]\n"
+    "-virtfs proxy,mount_tag=tag,sock_fd=sock_fd[,id=id][,writeout=immediate][,readonly=on]\n"
+    "-virtfs synth,mount_tag=tag[,id=id][,readonly=on]\n",
     QEMU_ARCH_ALL)
 
 SRST
-``-virtfs local,path=path,mount_tag=mount_tag ,security_model=security_model[,writeout=writeout][,readonly] [,fmode=fmode][,dmode=dmode][,multidevs=multidevs]``
+``-virtfs local,path=path,mount_tag=mount_tag ,security_model=security_model[,writeout=writeout][,readonly=on] [,fmode=fmode][,dmode=dmode][,multidevs=multidevs]``
   \ 
-``-virtfs proxy,socket=socket,mount_tag=mount_tag [,writeout=writeout][,readonly]``
+``-virtfs proxy,socket=socket,mount_tag=mount_tag [,writeout=writeout][,readonly=on]``
   \ 
-``-virtfs proxy,sock_fd=sock_fd,mount_tag=mount_tag [,writeout=writeout][,readonly]``
+``-virtfs proxy,sock_fd=sock_fd,mount_tag=mount_tag [,writeout=writeout][,readonly=on]``
   \
 ``-virtfs synth,mount_tag=mount_tag``
     Define a new virtual filesystem device and expose it to the guest using
@@ -1598,7 +1598,7 @@ SRST
         guest only when the data has been reported as written by the
         storage subsystem.
 
-    ``readonly``
+    ``readonly=on``
         Enables exporting 9p share as a readonly mount for guests. By
         default read-write access is given.
 
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 64a9a772ee..4cb523dfb7 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -674,14 +674,14 @@ static void test_acpi_one(const char *params, test_data *data)
         if (data->cd) {
             args = g_strdup_printf("-machine %s %s -accel tcg "
                 "-nodefaults -nographic "
-                "-drive if=pflash,format=raw,file=%s,readonly "
+                "-drive if=pflash,format=raw,file=%s,readonly=on "
                 "-drive if=pflash,format=raw,file=%s,snapshot=on -cdrom %s %s",
                 data->machine, data->tcg_only ? "" : "-accel kvm",
                 data->uefi_fl1, data->uefi_fl2, data->cd, params ? params : "");
         } else {
             args = g_strdup_printf("-machine %s %s -accel tcg "
                 "-nodefaults -nographic "
-                "-drive if=pflash,format=raw,file=%s,readonly "
+                "-drive if=pflash,format=raw,file=%s,readonly=on "
                 "-drive if=pflash,format=raw,file=%s,snapshot=on %s",
                 data->machine, data->tcg_only ? "" : "-accel kvm",
                 data->uefi_fl1, data->uefi_fl2, params ? params : "");
diff --git a/tests/qtest/pflash-cfi02-test.c b/tests/qtest/pflash-cfi02-test.c
index afb702b565..60db81a3a2 100644
--- a/tests/qtest/pflash-cfi02-test.c
+++ b/tests/qtest/pflash-cfi02-test.c
@@ -261,7 +261,7 @@ static void test_geometry(const void *opaque)
     const FlashConfig *config = opaque;
     QTestState *qtest;
     qtest = qtest_initf("-M musicpal"
-                        " -drive if=pflash,file=%s,format=raw,copy-on-read"
+                        " -drive if=pflash,file=%s,format=raw,copy-on-read=on"
                         /* Device geometry properties. */
                         " -global driver=cfi.pflash02,"
                         "property=num-blocks0,value=%d"
@@ -581,7 +581,7 @@ static void test_cfi_in_autoselect(const void *opaque)
     const FlashConfig *config = opaque;
     QTestState *qtest;
     qtest = qtest_initf("-M musicpal"
-                        " -drive if=pflash,file=%s,format=raw,copy-on-read",
+                        " -drive if=pflash,file=%s,format=raw,copy-on-read=on",
                         image_path);
     FlashConfig explicit_config = expand_config_defaults(config);
     explicit_config.qtest = qtest;
diff --git a/tests/qtest/test-filter-redirector.c b/tests/qtest/test-filter-redirector.c
index 829db8c2ea..4269b2cdd9 100644
--- a/tests/qtest/test-filter-redirector.c
+++ b/tests/qtest/test-filter-redirector.c
@@ -95,8 +95,8 @@ static void test_redirector_tx(void)
     qts = qtest_initf(
         "-netdev socket,id=qtest-bn0,fd=%d "
         "-device %s,netdev=qtest-bn0,id=qtest-e0 "
-        "-chardev socket,id=redirector0,path=%s,server,nowait "
-        "-chardev socket,id=redirector1,path=%s,server,nowait "
+        "-chardev socket,id=redirector0,path=%s,server=on,wait=off "
+        "-chardev socket,id=redirector1,path=%s,server=on,wait=off "
         "-chardev socket,id=redirector2,path=%s "
         "-object filter-redirector,id=qtest-f0,netdev=qtest-bn0,"
         "queue=tx,outdev=redirector0 "
@@ -165,8 +165,8 @@ static void test_redirector_rx(void)
     qts = qtest_initf(
         "-netdev socket,id=qtest-bn0,fd=%d "
         "-device %s,netdev=qtest-bn0,id=qtest-e0 "
-        "-chardev socket,id=redirector0,path=%s,server,nowait "
-        "-chardev socket,id=redirector1,path=%s,server,nowait "
+        "-chardev socket,id=redirector0,path=%s,server=on,wait=off "
+        "-chardev socket,id=redirector1,path=%s,server=on,wait=off "
         "-chardev socket,id=redirector2,path=%s "
         "-object filter-redirector,id=qtest-f0,netdev=qtest-bn0,"
         "queue=rx,indev=redirector0 "
diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c
index 3df5322614..1a5f5313ff 100644
--- a/tests/qtest/vhost-user-test.c
+++ b/tests/qtest/vhost-user-test.c
@@ -537,7 +537,7 @@ static void test_server_create_chr(TestServer *server, const gchar *opt)
 
 static void test_server_listen(TestServer *server)
 {
-    test_server_create_chr(server, ",server,nowait");
+    test_server_create_chr(server, ",server=on,wait=off");
 }
 
 static void test_server_free(TestServer *server)
@@ -846,7 +846,7 @@ static void *vhost_user_test_setup_reconnect(GString *cmd_line, void *arg)
 
     g_thread_new("connect", connect_thread, s);
     append_mem_opts(s, cmd_line, 256, TEST_MEMFD_AUTO);
-    s->vu_ops->append_opts(s, cmd_line, ",server");
+    s->vu_ops->append_opts(s, cmd_line, ",server=on");
 
     g_test_queue_destroy(vhost_user_test_cleanup, s);
 
@@ -883,7 +883,7 @@ static void *vhost_user_test_setup_connect_fail(GString *cmd_line, void *arg)
 
     g_thread_new("connect", connect_thread, s);
     append_mem_opts(s, cmd_line, 256, TEST_MEMFD_AUTO);
-    s->vu_ops->append_opts(s, cmd_line, ",server");
+    s->vu_ops->append_opts(s, cmd_line, ",server=on");
 
     g_test_queue_destroy(vhost_user_test_cleanup, s);
 
@@ -898,7 +898,7 @@ static void *vhost_user_test_setup_flags_mismatch(GString *cmd_line, void *arg)
 
     g_thread_new("connect", connect_thread, s);
     append_mem_opts(s, cmd_line, 256, TEST_MEMFD_AUTO);
-    s->vu_ops->append_opts(s, cmd_line, ",server");
+    s->vu_ops->append_opts(s, cmd_line, ",server=on");
 
     g_test_queue_destroy(vhost_user_test_cleanup, s);
 
diff --git a/tests/test-char.c b/tests/test-char.c
index 9196e566e9..953e0d1c1f 100644
--- a/tests/test-char.c
+++ b/tests/test-char.c
@@ -413,7 +413,7 @@ static void char_websock_test(void)
     CharBackend client_be;
     Chardev *chr_client;
     Chardev *chr = qemu_chr_new("server",
-                                "websocket:127.0.0.1:0,server,nowait", NULL);
+                                "websocket:127.0.0.1:0,server=on,wait=off", NULL);
     const char handshake[] = "GET / HTTP/1.1\r\n"
                              "Upgrade: websocket\r\n"
                              "Connection: Upgrade\r\n"
@@ -696,7 +696,7 @@ char_socket_addr_to_opt_str(SocketAddress *addr, bool fd_pass,
         fd = ioc->fd;
         ioc->fd = -1;
         optstr = g_strdup_printf("socket,id=cdev0,fd=%d%s",
-                                 fd, is_listen ? ",server,nowait" : "");
+                                 fd, is_listen ? ",server=on,wait=off" : "");
         object_unref(OBJECT(ioc));
         return optstr;
     } else {
@@ -706,13 +706,13 @@ char_socket_addr_to_opt_str(SocketAddress *addr, bool fd_pass,
                                    addr->u.inet.host,
                                    addr->u.inet.port,
                                    reconnect ? reconnect : "",
-                                   is_listen ? ",server,nowait" : "");
+                                   is_listen ? ",server=on,wait=off" : "");
 
         case SOCKET_ADDRESS_TYPE_UNIX:
             return g_strdup_printf("socket,id=cdev0,path=%s%s%s",
                                    addr->u.q_unix.path,
                                    reconnect ? reconnect : "",
-                                   is_listen ? ",server,nowait" : "");
+                                   is_listen ? ",server=on,wait=off" : "");
 
         default:
             g_assert_not_reached();
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory,  vl.c) changes for QEMU 6.0
  2020-12-10 12:19 [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory, vl.c) changes for QEMU 6.0 Paolo Bonzini
                   ` (2 preceding siblings ...)
  2020-12-10 12:19 ` [PULL 051/113] treewide: do not use short-form boolean options Paolo Bonzini
@ 2020-12-10 17:00 ` Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2020-12-10 17:00 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

On Thu, 10 Dec 2020 at 13:37, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit 5e7b204dbfae9a562fc73684986f936b97f63877:
>
>   Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2020-12-09 20:08:54 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to aeea99accef39f34dd1090c4aee86b7052076ce9:
>
>   scripts: kernel-doc: remove unnecessary change wrt Linux (2020-12-09 18:16:05 -0500)
>
> ----------------------------------------------------------------
> * Fix for NULL segments (Bin Meng)
> * Support for 32768 CPUs on x86 without IOMMU (David)
> * PDEP/PEXT fix and testcase (myself)
> * Remove bios_name and ram_size globals (myself)
> * qemu_init rationalization (myself)
> * Update kernel-doc (myself + upstream patches)
> * Propagate MemTxResult across DMA and PCI functions (Philippe)
> * Remove master/slave when applicable (Philippe)
> * WHPX support for in-kernel irqchip (Sunil)

Warning building test-i386-bmi2.c:

make[2]: Entering directory
'/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/i386-linux-user'
/home/petmay01/linaro/qemu-for-merges/tests/docker/docker.py --engine
auto cc --cc gcc -i qemu/fedora-i386-cross -s /hom
e/petmay01/linaro/qemu-for-merges --   -Wall -O0 -g
-fno-strict-aliasing -m32 /home/petmay01/linaro/qemu-for-merges/test
s/tcg/i386/test-i386-bmi2.c -o test-i386-bmi2  -static
/home/petmay01/linaro/qemu-for-merges/tests/tcg/i386/test-i386-bmi2.c:
In function 'main':
/home/petmay01/linaro/qemu-for-merges/tests/tcg/i386/test-i386-bmi2.c:8:14:
warning: unused variable 'result64' [-Wunuse
d-variable]
    8 |     uint64_t result64;
      |              ^~~~~~~~
make[2]: Leaving directory
'/home/petmay01/linaro/qemu-for-merges/build/all-linux-static/tests/tcg/i386-linux-user'

thanks

-- PMM


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory,  vl.c) changes for QEMU 6.0
  2020-12-11 12:31 Paolo Bonzini
@ 2020-12-11 15:00 ` Peter Maydell
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2020-12-11 15:00 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

On Fri, 11 Dec 2020 at 12:34, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit 379e9eaed497a2e09b5985e1e15967d7bfea8296:
>
>   Merge remote-tracking branch 'remotes/legoater/tags/pull-aspeed-20201210' into staging (2020-12-10 14:26:35 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 953d0c333e2825656ba1ec5bd1c18bc53485b39c:
>
>   scripts: kernel-doc: remove unnecessary change wrt Linux (2020-12-10 12:15:25 -0500)
>
> ----------------------------------------------------------------
> * Fix for NULL segments (Bin Meng)
> * Support for 32768 CPUs on x86 without IOMMU (David)
> * PDEP/PEXT fix and testcase (myself)
> * Remove bios_name and ram_size globals (myself)
> * qemu_init rationalization (myself)
> * Update kernel-doc (myself + upstream patches)
> * Propagate MemTxResult across DMA and PCI functions (Philippe)
> * Remove master/slave when applicable (Philippe)
> * WHPX support for in-kernel irqchip (Sunil)
>
> ----------------------------------------------------------------
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/6.0
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory, vl.c) changes for QEMU 6.0
@ 2020-12-11 12:31 Paolo Bonzini
  2020-12-11 15:00 ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2020-12-11 12:31 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit 379e9eaed497a2e09b5985e1e15967d7bfea8296:

  Merge remote-tracking branch 'remotes/legoater/tags/pull-aspeed-20201210' into staging (2020-12-10 14:26:35 +0000)

are available in the Git repository at:

  https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 953d0c333e2825656ba1ec5bd1c18bc53485b39c:

  scripts: kernel-doc: remove unnecessary change wrt Linux (2020-12-10 12:15:25 -0500)

----------------------------------------------------------------
* Fix for NULL segments (Bin Meng)
* Support for 32768 CPUs on x86 without IOMMU (David)
* PDEP/PEXT fix and testcase (myself)
* Remove bios_name and ram_size globals (myself)
* qemu_init rationalization (myself)
* Update kernel-doc (myself + upstream patches)
* Propagate MemTxResult across DMA and PCI functions (Philippe)
* Remove master/slave when applicable (Philippe)
* WHPX support for in-kernel irqchip (Sunil)

----------------------------------------------------------------

v2->v3: Fix warning on 32-bit compilation of test-i386-bmi2

Alexander A. Klimov (1):
      Replace HTTP links with HTTPS ones: documentation

André Almeida (2):
      kernel-doc: fix processing nested structs with attributes
      kernel-doc: add support for ____cacheline_aligned_in_smp attribute

Bin Meng (1):
      target/i386: seg_helper: Correct segment selector nullification in the RET/IRET helper

David Woodhouse (1):
      target/i386: Support up to 32768 CPUs without IRQ remapping

Jonathan Cameron (1):
      kernel-doc: add support for ____cacheline_aligned attribute

Jonathan Neuschäfer (1):
      scripts/kernel-doc: Add support for named variable macro arguments

Mauro Carvalho Chehab (19):
      scripts: kernel-doc: proper handle @foo->bar()
      scripts: kernel-doc: accept negation like !@var
      scripts: kernel-doc: accept blank lines on parameter description
      scripts/kernel-doc: parse __ETHTOOL_DECLARE_LINK_MODE_MASK
      scripts/kernel-doc: handle function pointer prototypes
      kernel-doc: include line numbers for function prototypes
      scripts: kernel-doc: add support for typedef enum
      scripts: kernel-doc: make it more compatible with Sphinx 3.x
      scripts: kernel-doc: use a less pedantic markup for funcs on Sphinx 3.x
      scripts: kernel-doc: fix troubles with line counts
      scripts: kernel-doc: reimplement -nofunction argument
      scripts: kernel-doc: fix typedef identification
      scripts: kernel-doc: don't mangle with parameter list
      scripts: kernel-doc: allow passing desired Sphinx C domain dialect
      scripts: kernel-doc: fix line number handling
      scripts: kernel-doc: try to use c:function if possible
      scripts: kernel-doc: fix typedef parsing
      scripts: kernel-doc: split typedef complex regex
      scripts: kernel-doc: use :c:union when needed

Paolo Bonzini (69):
      target/i386: fix operand order for PDEP and PEXT
      qom: eliminate identical functions
      alpha: remove bios_name
      arm: remove bios_name
      hppa: remove bios_name
      i386: remove bios_name
      lm32: remove bios_name
      m68k: remove bios_name
      mips: remove bios_name
      moxie: remove bios_name
      ppc: remove bios_name
      rx: move BIOS load from MCU to board
      s390: remove bios_name
      sh4: remove bios_name
      sparc: remove bios_name
      digic: remove bios_name
      vl: remove bios_name
      arm: do not use ram_size global
      cris: do not use ram_size global
      hppa: do not use ram_size global
      i386: do not use ram_size global
      m68k: do not use ram_size global
      microblaze: do not use ram_size global
      mips: do not use ram_size global
      moxie: do not use ram_size global
      nios2: do not use ram_size global
      ppc: do not use ram_size global
      riscv: do not use ram_size global
      s390x: do not use ram_size global
      sparc64: do not use ram_size global
      make ram_size local to vl.c
      treewide: do not use short-form boolean options
      vl: extract validation of -smp to machine.c
      vl: remove bogus check
      vl: split various early command line options to a separate function
      vl: move various initialization routines out of qemu_init
      vl: extract qemu_init_subsystems
      vl: move prelaunch part of qemu_init to new functions
      vl: extract various command line validation snippets to a new function
      vl: preconfig and loadvm are mutually exclusive
      vl: extract various command line desugaring snippets to a new function
      qemu-option: restrict qemu_opts_set to merge-lists QemuOpts
      vl: create "-net nic -net user" default earlier
      vl: load plugins as late as possible
      vl: extract default devices to separate functions
      vl: move CHECKPOINT_INIT after preconfig
      vl: separate qemu_create_early_backends
      vl: separate qemu_create_late_backends
      vl: separate qemu_create_machine
      vl: separate qemu_apply_machine_options
      vl: separate qemu_resolve_machine_memdev
      vl: initialize displays before preconfig loop
      vl: move -global check earlier
      migration, vl: start migration via qmp_migrate_incoming
      vl: start VM via qmp_cont
      hmp: introduce cmd_available
      vl: extract softmmu/datadir.c
      vl: extract machine done notifiers
      vl: extract softmmu/rtc.c
      vl: remove serial_max_hds
      vl: clean up -boot variables
      config-file: move -set implementation to vl.c
      docs: temporarily disable the kernel-doc extension
      Revert "scripts/kerneldoc: For Sphinx 3 use c:macro for macros with arguments"
      Revert "kernel-doc: Use c:struct for Sphinx 3.0 and later"
      Revert "kernel-doc: Handle function typedefs without asterisks"
      Revert "kernel-doc: Handle function typedefs that return pointers"
      Revert "docs: temporarily disable the kernel-doc extension"
      scripts: kernel-doc: remove unnecessary change wrt Linux

Philippe Mathieu-Daudé (16):
      docs/devel/loads-stores: Add regexp for DMA functions
      dma: Document address_space_map/address_space_unmap() prototypes
      dma: Let dma_memory_set() propagate MemTxResult
      dma: Let dma_memory_rw() propagate MemTxResult
      dma: Let dma_memory_read() propagate MemTxResult
      dma: Let dma_memory_write() propagate MemTxResult
      pci: Let pci_dma_rw() propagate MemTxResult
      pci: Let pci_dma_read() propagate MemTxResult
      pci: Let pci_dma_write() propagate MemTxResult
      hw/ssi/aspeed_smc: Rename 'max_slaves' variable as 'max_peripherals'
      hw/ssi: Update coding style to make checkpatch.pl happy
      hw/ssi: Rename SSI 'slave' as 'peripheral'
      hw/core/stream: Rename StreamSlave as StreamSink
      hw/dma/xilinx_axidma: Rename StreamSlave as StreamSink
      hw/net/xilinx_axienet: Rename StreamSlave as StreamSink
      hw/char/serial: Clean up unnecessary code

Pierre-Louis Bossart (1):
      scripts/kernel-doc: optionally treat warnings as errors

Sunil Muthuswamy (1):
      WHPX: support for the kernel-irqchip on/off

 MAINTAINERS                                 |    1 +
 docs/devel/loads-stores.rst                 |    2 +
 docs/specs/tpm.rst                          |    2 +-
 docs/sphinx/kerneldoc.py                    |    6 +-
 hw/alpha/dp264.c                            |    3 +-
 hw/arm/aspeed.c                             |    8 +-
 hw/arm/boot.c                               |    1 +
 hw/arm/cubieboard.c                         |    2 +-
 hw/arm/digic_boards.c                       |   20 +-
 hw/arm/highbank.c                           |    9 +-
 hw/arm/npcm7xx_boards.c                     |    6 +-
 hw/arm/orangepi.c                           |    2 +-
 hw/arm/sbsa-ref.c                           |    3 +
 hw/arm/spitz.c                              |   32 +-
 hw/arm/stellaris.c                          |    4 +-
 hw/arm/tosa.c                               |   12 +-
 hw/arm/vexpress.c                           |    9 +-
 hw/arm/virt.c                               |    3 +
 hw/arm/z2.c                                 |   14 +-
 hw/avr/boot.c                               |    1 +
 hw/block/m25p80.c                           |   14 +-
 hw/char/serial.c                            |   13 +-
 hw/core/generic-loader.c                    |    3 +-
 hw/core/loader.c                            |    1 +
 hw/core/machine.c                           |   56 +
 hw/core/numa.c                              |   10 +-
 hw/core/stream.c                            |   20 +-
 hw/cris/axis_dev88.c                        |    1 +
 hw/cris/boot.c                              |    2 +-
 hw/cris/boot.h                              |    1 +
 hw/display/ads7846.c                        |   12 +-
 hw/display/cg3.c                            |    1 +
 hw/display/pxa2xx_lcd.c                     |    5 +-
 hw/display/ssd0323.c                        |   12 +-
 hw/display/tcx.c                            |    1 +
 hw/dma/xilinx_axidma.c                      |   58 +-
 hw/hppa/machine.c                           |   14 +-
 hw/i386/fw_cfg.c                            |    2 +-
 hw/i386/kvm/apic.c                          |    7 +
 hw/i386/microvm.c                           |    7 +-
 hw/i386/pc.c                                |   16 +-
 hw/i386/pc_sysfw.c                          |    4 +-
 hw/i386/vmport.c                            |    3 +-
 hw/i386/x86.c                               |   17 +-
 hw/i386/xen/xen-hvm.c                       |    2 +-
 hw/intc/apic_common.c                       |    3 +-
 hw/lm32/milkymist.c                         |    5 +-
 hw/m68k/mcf5206.c                           |    4 +-
 hw/m68k/mcf5208.c                           |   14 +-
 hw/m68k/next-cube.c                         |    4 +-
 hw/m68k/q800.c                              |    5 +-
 hw/microblaze/boot.c                        |    9 +-
 hw/mips/fuloong2e.c                         |   11 +-
 hw/mips/jazz.c                              |    7 +-
 hw/mips/malta.c                             |    9 +-
 hw/mips/mipssim.c                           |    7 +-
 hw/misc/max111x.c                           |   18 +-
 hw/moxie/moxiesim.c                         |    8 +-
 hw/net/xilinx_axienet.c                     |   44 +-
 hw/nios2/boot.c                             |    9 +-
 hw/nvram/fw_cfg.c                           |    1 +
 hw/pci-host/prep.c                          |    1 +
 hw/pci/pci.c                                |    1 +
 hw/ppc/e500.c                               |    5 +-
 hw/ppc/mac_newworld.c                       |    5 +-
 hw/ppc/mac_oldworld.c                       |    5 +-
 hw/ppc/pnv.c                                |    6 +-
 hw/ppc/ppc405_boards.c                      |    7 +-
 hw/ppc/ppc440_bamboo.c                      |    1 +
 hw/ppc/prep.c                               |    6 +-
 hw/ppc/sam460ex.c                           |    1 +
 hw/ppc/spapr.c                              |   11 +-
 hw/ppc/spapr_vio.c                          |    4 +-
 hw/ppc/virtex_ml507.c                       |    1 +
 hw/riscv/boot.c                             |    6 +-
 hw/rx/rx-gdbsim.c                           |   10 +
 hw/rx/rx62n.c                               |    9 -
 hw/s390x/ipl.c                              |   19 +-
 hw/s390x/s390-skeys.c                       |    6 +-
 hw/s390x/s390-virtio-ccw.c                  |    7 +-
 hw/sd/ssi-sd.c                              |   12 +-
 hw/sh4/shix.c                               |    3 +-
 hw/smbios/smbios.c                          |    8 +-
 hw/sparc/leon3.c                            |    5 +-
 hw/sparc/sun4m.c                            |    3 +-
 hw/sparc64/sparc64.c                        |    3 +-
 hw/sparc64/sun4u.c                          |    7 +-
 hw/ssi/aspeed_smc.c                         |   53 +-
 hw/ssi/pl022.c                              |    2 +-
 hw/ssi/ssi.c                                |   48 +-
 hw/ssi/xilinx_spips.c                       |    9 +-
 hw/virtio/virtio-balloon.c                  |    3 +-
 include/exec/cpu-common.h                   |    2 -
 include/hw/boards.h                         |    2 +
 include/hw/i386/x86.h                       |    3 +-
 include/hw/misc/max111x.h                   |    2 +-
 include/hw/pci/pci.h                        |   50 +-
 include/hw/qdev-core.h                      |    8 -
 include/hw/ssi/aspeed_smc.h                 |    2 +-
 include/hw/ssi/ssi.h                        |   56 +-
 include/hw/ssi/xilinx_spips.h               |    2 +-
 include/hw/stream.h                         |   41 +-
 include/migration/misc.h                    |    1 -
 include/qemu-common.h                       |   21 -
 include/qemu/config-file.h                  |    1 -
 include/qemu/datadir.h                      |   28 +
 include/qemu/option.h                       |    3 +-
 include/standard-headers/asm-x86/kvm_para.h |    1 +
 include/sysemu/dma.h                        |  117 +-
 include/sysemu/sysemu.h                     |   10 +-
 include/sysemu/whpx.h                       |   22 +
 migration/migration.c                       |   37 +-
 monitor/hmp.c                               |   18 +-
 monitor/qmp-cmds.c                          |    3 +-
 python/qemu/machine.py                      |    2 +-
 qemu-options.hx                             |   32 +-
 qom/object.c                                |   36 +-
 scripts/kernel-doc                          |  455 ++++---
 softmmu/cpus.c                              |    3 +-
 softmmu/datadir.c                           |  129 ++
 softmmu/dma-helpers.c                       |    7 +-
 softmmu/meson.build                         |    2 +
 softmmu/qdev-monitor.c                      |    6 -
 softmmu/rtc.c                               |  190 +++
 softmmu/vl.c                                | 1755 ++++++++++++---------------
 target/arm/arm-semi.c                       |    3 +-
 target/i386/cpu.c                           |    8 +-
 target/i386/kvm.c                           |   77 +-
 target/i386/kvm_i386.h                      |    2 +
 target/i386/meson.build                     |    1 +
 target/i386/seg_helper.c                    |    5 +-
 target/i386/translate.c                     |    8 +-
 target/i386/whp-dispatch.h                  |    9 +-
 target/i386/whpx-all.c                      |  291 ++++-
 target/i386/whpx-apic.c                     |  274 +++++
 target/m68k/m68k-semi.c                     |    5 +-
 target/s390x/excp_helper.c                  |    3 +-
 target/s390x/mem_helper.c                   |   10 +-
 target/s390x/mmu_helper.c                   |    4 +-
 tests/qtest/bios-tables-test.c              |    4 +-
 tests/qtest/fuzz/fuzz.c                     |    1 +
 tests/qtest/pflash-cfi02-test.c             |    4 +-
 tests/qtest/test-filter-redirector.c        |    8 +-
 tests/qtest/vhost-user-test.c               |    8 +-
 tests/tcg/i386/Makefile.target              |    3 +
 tests/tcg/i386/test-i386-bmi2.c             |   42 +
 tests/test-char.c                           |    8 +-
 tests/test-qemu-opts.c                      |   20 +-
 ui/keymaps.c                                |    1 +
 util/qemu-config.c                          |   33 -
 util/qemu-option.c                          |    9 +-
 151 files changed, 2923 insertions(+), 1812 deletions(-)
 create mode 100644 include/qemu/datadir.h
 create mode 100644 softmmu/datadir.c
 create mode 100644 softmmu/rtc.c
 create mode 100644 target/i386/whpx-apic.c
 create mode 100644 tests/tcg/i386/test-i386-bmi2.c
-- 
2.26.2



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-11 15:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 12:19 [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory, vl.c) changes for QEMU 6.0 Paolo Bonzini
2020-12-10 12:19 ` [PULL 001/113] target/i386: fix operand order for PDEP and PEXT Paolo Bonzini
2020-12-10 12:19 ` [PULL 002/113] target/i386: Support up to 32768 CPUs without IRQ remapping Paolo Bonzini
2020-12-10 12:19 ` [PULL 051/113] treewide: do not use short-form boolean options Paolo Bonzini
2020-12-10 17:00 ` [PULL v2 000/113] First batch of misc (i386, kernel-doc, memory, vl.c) changes for QEMU 6.0 Peter Maydell
2020-12-11 12:31 Paolo Bonzini
2020-12-11 15:00 ` Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.