Skip to contentSkip to conversation

Misc patches for 2019-01-23

GIT PULL Paolo Bonzini 2 participants 6 messages Jan 23, 2019 – Jan 24, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

The following changes since commit cce871c504694cf1034adf525556e3ca3c7eebb6:

hw/block/xen: use proper format string for printing sectors (2019-01-21 14:45:49 +0000)

are available in the git repository at:

git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 3cf01054d896fa88ea0dd31c5abb605c2e68bb29:

docker: disable Xen on CentOS 7 (2019-01-23 01:40:47 +0100)

----------------------------------------------------------------
* cpu-exec fixes (Emilio, Laurent)
* high address load for linuxboot (Zhijian)
* PVH support (Liam, Stefano)
* Linux header update (Paolo)
* enable vhost-net for all targets that have virtio-net (Paolo)
* vhost-user-test cleanups (Paolo)
* misc i386 changes (Paolo, Robert)
* hexloader-test change to avoid O_NONBLOCK on stdin (Peter)
* configure tweak for openpty (Thomas)
* elf2dmp port to Windows (Viktor)

----------------------------------------------------------------
v1->v2: clang fixes, new patch to tie PVH support to the machine type

Emilio G. Cota (2):
cpu-exec: add assert_no_pages_locked() after longjmp
cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic

Laurent Vivier (1):
cpus: ignore ESRCH in qemu_cpu_kick_thread()

Li Zhijian (4):
unify len and addr type for memory/address APIs hw/core/loader.c: Read as long as possible in load_image_size()
i386: import & use bootparam.h
i386: allow to load initrd below 4 GB for recent linux

Liam Merwick (4):
elf: Add optional function ptr to load_elf() to parse ELF notes elf-ops.h: Add get_elf_note_type()
pvh: Add x86/HVM direct boot ABI header file
pvh: Boot uncompressed kernel using direct boot ABI

Paolo Bonzini (23):
scripts/update-linux-headers.sh: adjust for Linux 4.21-rc1 (or 5.0-rc1)
include: update Linux headers to 4.21-rc1/5.0-rc1
vhost-net: move stubs to a separate file
vhost-net-user: add stubs for when no virtio-net device is present
vhost: restrict Linux dependency to kernel vhost
vhost-net: compile it on all targets that have virtio-net.
vhost-net: revamp configure logic
vhost-user-test: use g_cond_broadcast
vhost-user-test: signal data_cond when s->rings changes
vhost-user: support cross-endian vnet headers
vhost-user-test: support VHOST_USER_PROTOCOL_F_CROSS_ENDIAN
vhost-user-test: skip if there is no memory at address 0
vhost-user-test: reduce usage of global_qtest
vhost-user-test: create a main loop per TestServer
vhost-user-test: small changes to init_hugepagefs
vhost-user-test: create a temporary directory per TestServer
tap: flush STDOUT on newline
i386: remove the 'INTEL_PT' CPUID bit from named CPU models
target-i386: hvf: remove MPX support
monitor: do not use QTAILQ_FOREACH_SAFE across critical sections
crypto: finish removing TABs
ui: vnc: finish removing TABs
docker: disable Xen on CentOS 7

Peter Maydell (1):
tests/hexloader-test: Don't pass -nographic to the QEMU under test

Robert Hoo (2):
i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model Revert "i386: Add CPUID bit for PCONFIG"

Stefano Garzarella (7):
pvh: load initrd and expose it through fw_cfg
linuxboot_dma: remove duplicate definitions of FW_CFG
linuxboot_dma: move common functions in a new header
optionrom: add new PVH option rom hw/i386/pc: use PVH option rom optionrom/pvh: load initrd from fw_cfg hw/i386/pc: enable PVH only for machine type >= 4.0

Thomas Huth (1):
configure: Add a proper check for openpty() in libutil

Viktor Prutyanov (6):
contrib/elf2dmp: fix elf.h including contrib/elf2dmp: use GLib in ELF processing contrib/elf2dmp: use GLib in PDB processing contrib/elf2dmp: fix structures definitions contrib/elf2dmp: fix printf format
configure: enable elf2dmp build for Windows hosts

 .gitignore                                         |    4 +
 Makefile                                           |    6 +-
 accel/tcg/cpu-exec.c                               |    4 +
 backends/Makefile.objs                             |    5 +-
 configure                                          |  118 ++-
 contrib/elf2dmp/kdbg.h                             |   12 +-
 contrib/elf2dmp/main.c                             |   27 +-
 contrib/elf2dmp/pdb.c                              |   33 +-
 contrib/elf2dmp/pdb.h                              |    4 +-
 contrib/elf2dmp/pe.h                               |    6 +-
 contrib/elf2dmp/qemu_elf.c                         |   27 +-
 contrib/elf2dmp/qemu_elf.h                         |   10 +-
 cpus.c                                             |    2 +-
 crypto/aes.c                                       |  414 ++++----
 crypto/desrfb.c                                    |  594 +++++------
 default-configs/virtio.mak                         |    4 +-
 exec.c                                             |   47 +-
 hw/alpha/dp264.c                                   |    4 +-
 hw/arm/armv7m.c                                    |    3 +-
 hw/arm/boot.c                                      |    2 +-
 hw/core/generic-loader.c                           |    2 +-
 hw/core/loader.c                                   |   35 +-
 hw/cris/boot.c                                     |    3 +-
 hw/hppa/machine.c                                  |    6 +-
 hw/i386/multiboot.c                                |    2 +-
 hw/i386/pc.c                                       |  191 +++-
 hw/i386/pc_piix.c                                  |    3 +
 hw/i386/pc_q35.c                                   |    3 +
 hw/lm32/lm32_boards.c                              |    6 +-
 hw/lm32/milkymist.c                                |    3 +-
 hw/m68k/an5206.c                                   |    2 +-
 hw/m68k/mcf5208.c                                  |    2 +-
 hw/microblaze/boot.c                               |    7 +-
 hw/mips/mips_fulong2e.c                            |    5 +-
 hw/mips/mips_malta.c                               |    5 +-
 hw/mips/mips_mipssim.c                             |    5 +-
 hw/mips/mips_r4k.c                                 |    5 +-
 hw/moxie/moxiesim.c                                |    2 +-
 hw/net/Makefile.objs                               |    4 +-
 hw/net/vhost_net-stub.c                            |   92 ++
 hw/net/vhost_net.c                                 |   85 +-
 hw/nios2/boot.c                                    |    7 +-
 hw/openrisc/openrisc_sim.c                         |    2 +-
 hw/pci-host/prep.c                                 |    2 +-
 hw/ppc/e500.c                                      |    3 +-
 hw/ppc/mac_newworld.c                              |    5 +-
 hw/ppc/mac_oldworld.c                              |    5 +-
 hw/ppc/ppc440_bamboo.c                             |    2 +-
 hw/ppc/sam460ex.c                                  |    3 +-
 hw/ppc/spapr.c                                     |    7 +-
 hw/ppc/virtex_ml507.c                              |    2 +-
 hw/riscv/sifive_e.c                                |    2 +-
 hw/riscv/sifive_u.c                                |    2 +-
 hw/riscv/spike.c                                   |    2 +-
 hw/riscv/virt.c                                    |    2 +-
 hw/s390x/ipl.c                                     |    9 +-
 hw/sparc/leon3.c                                   |    3 +-
 hw/sparc/sun4m.c                                   |    6 +-
 hw/sparc64/sun4u.c                                 |    4 +-
 hw/tricore/tricore_testboard.c                     |    2 +-
 hw/virtio/Makefile.objs                            |    8 +-
 hw/virtio/vhost-backend.c                          |   12 +-
 hw/virtio/vhost-user.c                             |   13 +-
 hw/virtio/vhost.c                                  |    2 +-
 hw/xtensa/sim.c                                    |   12 +-
 hw/xtensa/xtfpga.c                                 |    2 +-
 include/elf.h                                      |   10 +
 include/exec/cpu-all.h                             |    2 +-
 include/exec/cpu-common.h                          |    8 +-
 include/exec/memory.h                              |   22 +-
 include/exec/poison.h                              |    1 -
 include/hw/elf_ops.h                               |   77 ++
 include/hw/i386/pc.h                               |    3 +
 include/hw/loader.h                                |    9 +-
 include/hw/xen/start_info.h                        |  146 +++
 include/standard-headers/asm-x86/bootparam.h       |   34 +
 include/standard-headers/drm/drm_fourcc.h          |   63 ++
 include/standard-headers/linux/ethtool.h           |   19 +-
 include/standard-headers/linux/input-event-codes.h |   17 +
 include/standard-headers/linux/pci_regs.h          |    1 +
 include/standard-headers/linux/vhost_types.h       |  128 +++
 include/standard-headers/linux/virtio_balloon.h    |    8 +
 include/standard-headers/linux/virtio_blk.h        |   54 +
 include/standard-headers/linux/virtio_config.h     |    3 +
 include/standard-headers/linux/virtio_gpu.h        |   18 +
 include/standard-headers/linux/virtio_ring.h       |   52 +
 linux-headers/asm-arm/unistd-common.h              |    1 +
 linux-headers/asm-arm64/unistd.h                   |    1 +
 linux-headers/asm-generic/unistd.h                 |   10 +-
 linux-headers/asm-mips/sgidefs.h                   |    8 -
 linux-headers/asm-mips/unistd.h                    | 1074 +-------------------
 linux-headers/asm-mips/unistd_n32.h                |  338 ++++++
 linux-headers/asm-mips/unistd_n64.h                |  334 ++++++
 linux-headers/asm-mips/unistd_o32.h                |  374 +++++++
 linux-headers/asm-powerpc/unistd.h                 |  389 +------
 linux-headers/asm-powerpc/unistd_32.h              |  381 +++++++
 linux-headers/asm-powerpc/unistd_64.h              |  372 +++++++
 linux-headers/linux/kvm.h                          |   29 +
 linux-headers/linux/vfio.h                         |   92 ++
 linux-headers/linux/vhost.h                        |  113 +-
 linux-headers/linux/vhost_types.h                  |    1 +
 monitor.c                                          |    5 +-
 net/Makefile.objs                                  |    4 +-
 net/net.c                                          |    2 +-
 net/vhost-user-stub.c                              |   23 +
 net/vhost-user.c                                   |   13 +
 pc-bios/optionrom/Makefile                         |    5 +-
 pc-bios/optionrom/linuxboot_dma.c                  |  114 +--
 pc-bios/optionrom/optrom.h                         |  110 ++
 pc-bios/optionrom/optrom_fw_cfg.h                  |   92 ++
 pc-bios/optionrom/pvh.S                            |  200 ++++
 pc-bios/optionrom/pvh_main.c                       |  133 +++
 pc-bios/pvh.bin                                    |  Bin 0 -> 1536 bytes
 scripts/tap-driver.pl                              |    1 +
 scripts/tap-merge.pl                               |    1 +
 scripts/update-linux-headers.sh                    |   17 +
 target/i386/cpu.c                                  |   13 +-
 target/i386/cpu.h                                  |    1 -
 target/i386/hvf/x86_cpuid.c                        |   18 +-
 tests/Makefile.include                             |    9 +-
 tests/docker/dockerfiles/centos7.docker            |    5 +-
 tests/hexloader-test.c                             |    2 +-
 tests/vhost-user-test.c                            |  248 +++--
 ui/vnc-enc-hextile-template.h                      |  268 ++---
 ui/vnc-enc-zywrle.h                                |  394 +++----
 125 files changed, 4781 insertions(+), 3002 deletions(-)
 create mode 100644 hw/net/vhost_net-stub.c
 create mode 100644 include/hw/xen/start_info.h
 create mode 100644 include/standard-headers/asm-x86/bootparam.h
 create mode 100644 include/standard-headers/linux/vhost_types.h
 create mode 100644 linux-headers/asm-mips/unistd_n32.h
 create mode 100644 linux-headers/asm-mips/unistd_n64.h
 create mode 100644 linux-headers/asm-mips/unistd_o32.h
 create mode 100644 linux-headers/asm-powerpc/unistd_32.h
 create mode 100644 linux-headers/asm-powerpc/unistd_64.h
 create mode 100644 linux-headers/linux/vhost_types.h
 create mode 100644 net/vhost-user-stub.c
 create mode 100644 pc-bios/optionrom/optrom.h
 create mode 100644 pc-bios/optionrom/optrom_fw_cfg.h
 create mode 100644 pc-bios/optionrom/pvh.S
 create mode 100644 pc-bios/optionrom/pvh_main.c
 create mode 100644 pc-bios/pvh.bin
Signature · 1 line
1.8.3.1
#1 lore raw

[Qemu-devel] [PULL 33/51] hw/i386/pc: enable PVH only for machine type >= 4.0

From: Stefano Garzarella <[email protected]>

In order to avoid migration issues, we enable PVH only for machine type >= 4.0

---
 hw/i386/pc.c         | 4 +++-
 hw/i386/pc_piix.c    | 3 +++
 hw/i386/pc_q35.c     | 3 +++
 include/hw/i386/pc.h | 3 +++
 4 files changed, 12 insertions(+), 1 deletion(-)
hw/i386/pc.c +3 -1
index 2833b13..3be4a06 100644
@@ -1211,7 +1211,8 @@ static void load_linux(PCMachineState *pcms,
          * saving the PVH entry point used by the x86/HVM direct boot ABI.
          * If load_elfboot() is successful, populate the fw_cfg info.
          */
-        if (load_elfboot(kernel_filename, kernel_size,
+        if (pcmc->pvh_enabled &&
+            load_elfboot(kernel_filename, kernel_size,
                          header, pvh_start_addr, fw_cfg)) {
             fclose(f);
 
@@ -2774,6 +2775,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
     pcmc->acpi_data_size = 0x20000 + 0x8000;
     pcmc->save_tsc_khz = true;
     pcmc->linuxboot_dma_enabled = true;
+    pcmc->pvh_enabled = true;
     assert(!mc->get_hotplug_handler);
     mc->get_hotplug_handler = pc_get_hotpug_handler;
     mc->cpu_index_to_instance_props = pc_cpu_index_to_props;
hw/i386/pc_piix.c +3 -0
index 63c84e3..fd0f2c2 100644
@@ -440,9 +440,12 @@ DEFINE_I440FX_MACHINE(v4_0, "pc-i440fx-4.0", NULL,
 
 static void pc_i440fx_3_1_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
+
     pc_i440fx_4_0_machine_options(m);
     m->is_default = 0;
     m->alias = NULL;
+    pcmc->pvh_enabled = false;
     compat_props_add(m->compat_props, hw_compat_3_1, hw_compat_3_1_len);
     compat_props_add(m->compat_props, pc_compat_3_1, pc_compat_3_1_len);
 }
hw/i386/pc_q35.c +3 -0
index b7b7959..4a175ea 100644
@@ -376,9 +376,12 @@ DEFINE_Q35_MACHINE(v4_0, "pc-q35-4.0", NULL,
 
 static void pc_q35_3_1_machine_options(MachineClass *m)
 {
+    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
+
     pc_q35_4_0_machine_options(m);
     m->default_kernel_irqchip_split = false;
     m->alias = NULL;
+    pcmc->pvh_enabled = false;
     compat_props_add(m->compat_props, hw_compat_3_1, hw_compat_3_1_len);
     compat_props_add(m->compat_props, pc_compat_3_1, pc_compat_3_1_len);
 }
include/hw/i386/pc.h +3 -0
index 0abbe45..e4e2c13 100644
@@ -133,6 +133,9 @@ struct PCMachineClass {
 
     /* use DMA capable linuxboot option rom */
     bool linuxboot_dma_enabled;
+
+    /* use PVH to load kernels that support this feature */
+    bool pvh_enabled;
 };
 
 #define TYPE_PC_MACHINE "generic-pc-machine"
Signature · 1 line
1.8.3.1
#2 lore raw

[Qemu-devel] [PULL 29/51] linuxboot_dma: move common functions in a new header

In reply to Paolo Bonzini

From: Stefano Garzarella <[email protected]>

In order to allow other option roms to use these common useful functions and definitions, this patch put them in two new C header files called optrom.h and optrom_fw_cfg.h. We also add useful out*() in*() functions for different size, and new fw_cfg functions to use when DMA feature is not available.

---
 pc-bios/optionrom/linuxboot_dma.c | 102 +++++++----------------------------
 pc-bios/optionrom/optrom.h        | 110 ++++++++++++++++++++++++++++++++++++++
 pc-bios/optionrom/optrom_fw_cfg.h |  92 +++++++++++++++++++++++++++++++
 3 files changed, 221 insertions(+), 83 deletions(-)
 create mode 100644 pc-bios/optionrom/optrom.h
 create mode 100644 pc-bios/optionrom/optrom_fw_cfg.h
pc-bios/optionrom/linuxboot_dma.c +19 -83
index f728dc8..cbcf667 100644
@@ -58,21 +58,13 @@ asm(
 "   jmp load_kernel\n"
 );
 
-#define BIOS_CFG_DMA_ADDR_HIGH 0x514
-#define BIOS_CFG_DMA_ADDR_LOW  0x518
-
-#define uint64_t unsigned long long
-#define uint32_t unsigned int
-#define uint16_t unsigned short
-
-#include "../../include/standard-headers/linux/qemu_fw_cfg.h"
-
-#define barrier() asm("" : : : "memory")
-
-static inline void outl(uint32_t value, uint16_t port)
-{
-    asm("outl %0, %w1" : : "a"(value), "Nd"(port));
-}
+/*
+ * The includes of C headers must be after the asm block to avoid compiler
+ * errors.
+ */
+#include <stdint.h>
+#include "optrom.h"
+#include "optrom_fw_cfg.h"
 
 static inline void set_es(void *addr)
 {
@@ -80,12 +72,6 @@ static inline void set_es(void *addr)
     asm("movl %0, %%es" : : "r"(seg));
 }
 
-#ifdef __clang__
-#define ADDR32
-#else
-#define ADDR32 "addr32 "
-#endif
-
 static inline uint16_t readw_es(uint16_t offset)
 {
     uint16_t val;
@@ -108,56 +94,6 @@ static inline void writel_es(uint16_t offset, uint32_t val)
     asm(ADDR32 "movl %0, %%es:(%1)" : : "r"(val), "r"((uint32_t)offset));
 }
 
-static inline uint32_t bswap32(uint32_t x)
-{
-    asm("bswapl %0" : "=r" (x) : "0" (x));
-    return x;
-}
-
-static inline uint64_t bswap64(uint64_t x)
-{
-    asm("bswapl %%eax; bswapl %%edx; xchg %%eax, %%edx" : "=A" (x) : "0" (x));
-    return x;
-}
-
-static inline uint64_t cpu_to_be64(uint64_t x)
-{
-    return bswap64(x);
-}
-
-static inline uint32_t cpu_to_be32(uint32_t x)
-{
-    return bswap32(x);
-}
-
-static inline uint32_t be32_to_cpu(uint32_t x)
-{
-    return bswap32(x);
-}
-
-/* clang is happy to inline this function, and bloats the
- * ROM.
- */
-static __attribute__((__noinline__))
-void bios_cfg_read_entry(void *buf, uint16_t entry, uint32_t len)
-{
-    struct fw_cfg_dma_access access;
-    uint32_t control = (entry << 16) | FW_CFG_DMA_CTL_SELECT
-                        | FW_CFG_DMA_CTL_READ;
-
-    access.address = cpu_to_be64((uint64_t)(uint32_t)buf);
-    access.length = cpu_to_be32(len);
-    access.control = cpu_to_be32(control);
-
-    barrier();
-
-    outl(cpu_to_be32((uint32_t)&access), BIOS_CFG_DMA_ADDR_LOW);
-
-    while (be32_to_cpu(access.control) & ~FW_CFG_DMA_CTL_ERROR) {
-        barrier();
-    }
-}
-
 /* Return top of memory using BIOS function E801. */
 static uint32_t get_e801_addr(void)
 {
@@ -211,9 +147,9 @@ void load_kernel(void)
     uint32_t initrd_end_page, max_allowed_page;
     uint32_t segment_addr, stack_addr;
 
-    bios_cfg_read_entry(&setup_addr, FW_CFG_SETUP_ADDR, 4);
-    bios_cfg_read_entry(&setup_size, FW_CFG_SETUP_SIZE, 4);
-    bios_cfg_read_entry(setup_addr, FW_CFG_SETUP_DATA, setup_size);
+    bios_cfg_read_entry_dma(&setup_addr, FW_CFG_SETUP_ADDR, 4);
+    bios_cfg_read_entry_dma(&setup_size, FW_CFG_SETUP_SIZE, 4);
+    bios_cfg_read_entry_dma(setup_addr, FW_CFG_SETUP_DATA, setup_size);
 
     set_es(setup_addr);
 
@@ -223,8 +159,8 @@ void load_kernel(void)
         writel_es(0x22c, 0x37ffffff);
     }
 
-    bios_cfg_read_entry(&initrd_addr, FW_CFG_INITRD_ADDR, 4);
-    bios_cfg_read_entry(&initrd_size, FW_CFG_INITRD_SIZE, 4);
+    bios_cfg_read_entry_dma(&initrd_addr, FW_CFG_INITRD_ADDR, 4);
+    bios_cfg_read_entry_dma(&initrd_size, FW_CFG_INITRD_SIZE, 4);
 
     initrd_end_page = ((uint32_t)(initrd_addr + initrd_size) & -4096);
     max_allowed_page = (readl_es(0x22c) & -4096);
@@ -239,15 +175,15 @@ void load_kernel(void)
 
     }
 
-    bios_cfg_read_entry(initrd_addr, FW_CFG_INITRD_DATA, initrd_size);
+    bios_cfg_read_entry_dma(initrd_addr, FW_CFG_INITRD_DATA, initrd_size);
 
-    bios_cfg_read_entry(&kernel_addr, FW_CFG_KERNEL_ADDR, 4);
-    bios_cfg_read_entry(&kernel_size, FW_CFG_KERNEL_SIZE, 4);
-    bios_cfg_read_entry(kernel_addr, FW_CFG_KERNEL_DATA, kernel_size);
+    bios_cfg_read_entry_dma(&kernel_addr, FW_CFG_KERNEL_ADDR, 4);
+    bios_cfg_read_entry_dma(&kernel_size, FW_CFG_KERNEL_SIZE, 4);
+    bios_cfg_read_entry_dma(kernel_addr, FW_CFG_KERNEL_DATA, kernel_size);
 
-    bios_cfg_read_entry(&cmdline_addr, FW_CFG_CMDLINE_ADDR, 4);
-    bios_cfg_read_entry(&cmdline_size, FW_CFG_CMDLINE_SIZE, 4);
-    bios_cfg_read_entry(cmdline_addr, FW_CFG_CMDLINE_DATA, cmdline_size);
+    bios_cfg_read_entry_dma(&cmdline_addr, FW_CFG_CMDLINE_ADDR, 4);
+    bios_cfg_read_entry_dma(&cmdline_size, FW_CFG_CMDLINE_SIZE, 4);
+    bios_cfg_read_entry_dma(cmdline_addr, FW_CFG_CMDLINE_DATA, cmdline_size);
 
     /* Boot linux */
     segment_addr = ((uint32_t)setup_addr >> 4);
pc-bios/optionrom/optrom.h new file +110 -0

110 lines not on this page · raw message

pc-bios/optionrom/optrom_fw_cfg.h new file +92 -0

92 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#3 lore raw

[Qemu-devel] [PULL 30/51] optionrom: add new PVH option rom

In reply to Paolo Bonzini

From: Stefano Garzarella <[email protected]>

The new pvh.bin option rom can be used with SeaBIOS to boot uncompressed kernel using the x86/HVM direct boot ABI.

pvh.S contains the entry point of the option rom. It runs in real mode, loads the e820 table querying the BIOS, and then it switches to 32bit protected mode and jumps to the pvh_load_kernel() written in pvh_main.c. pvh_load_kernel() loads the cmdline and kernel entry_point using fw_cfg, then it looks for RSDP, fills the hvm_start_info required by x86/HVM ABI, and finally jumps to the kernel entry_point.

---
 .gitignore                   |   4 +
 Makefile                     |   2 +-
 pc-bios/optionrom/Makefile   |   5 +-
 pc-bios/optionrom/pvh.S      | 200 +++++++++++++++++++++++++++++++++++++++++++
 pc-bios/optionrom/pvh_main.c | 116 +++++++++++++++++++++++++
 pc-bios/pvh.bin              | Bin 0 -> 1536 bytes
 6 files changed, 325 insertions(+), 2 deletions(-)
 create mode 100644 pc-bios/optionrom/pvh.S
 create mode 100644 pc-bios/optionrom/pvh_main.c
 create mode 100644 pc-bios/pvh.bin
.gitignore +4 -0
index 0430257..321095b 100644
@@ -103,6 +103,10 @@
 /pc-bios/optionrom/linuxboot_dma.bin
 /pc-bios/optionrom/linuxboot_dma.raw
 /pc-bios/optionrom/linuxboot_dma.img
+/pc-bios/optionrom/pvh.asm
+/pc-bios/optionrom/pvh.bin
+/pc-bios/optionrom/pvh.raw
+/pc-bios/optionrom/pvh.img
 /pc-bios/optionrom/multiboot.asm
 /pc-bios/optionrom/multiboot.bin
 /pc-bios/optionrom/multiboot.raw
Makefile +1 -1
index dccba1d..6de3a38 100644
@@ -669,7 +669,7 @@ efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
 efi-e1000e.rom efi-vmxnet3.rom \
 qemu-icon.bmp qemu_logo_no_text.svg \
 bamboo.dtb canyonlands.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
-multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin \
+multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin \
 s390-ccw.img s390-netboot.img \
 spapr-rtas.bin slof.bin skiboot.lid \
 palcode-clipper \
pc-bios/optionrom/Makefile +4 -1
index a9a9e5e..e33a24d 100644
@@ -37,7 +37,7 @@ Wa = -Wa,
 ASFLAGS += -32
 QEMU_CFLAGS += $(call cc-c-option, $(QEMU_CFLAGS), $(Wa)-32)
 
-build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
+build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin pvh.bin
 
 # suppress auto-removal of intermediate files
 .SECONDARY:
@@ -46,6 +46,9 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin
 %.o: %.S
 	$(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@,"AS","$(TARGET_DIR)$@")
 
+pvh.img: pvh.o pvh_main.o
+	$(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $^,"BUILD","$(TARGET_DIR)$@")
+
 %.img: %.o
 	$(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_I386_EMULATION) -T $(SRC_PATH)/pc-bios/optionrom/flat.lds -s -o $@ $<,"BUILD","$(TARGET_DIR)$@")
 
pc-bios/optionrom/pvh.S new file +200 -0

200 lines not on this page · raw message

pc-bios/optionrom/pvh_main.c new file +116 -0

116 lines not on this page · raw message

pc-bios/pvh.bin new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..38a41761014957d50eb55d790b6957888cbeee0a
GIT binary patch
Signature · 1 line
1.8.3.1
#4 lore raw
In reply to Paolo Bonzini
Quoted 245 lines · Paolo Bonzini

The following changes since commit cce871c504694cf1034adf525556e3ca3c7eebb6:

hw/block/xen: use proper format string for printing sectors (2019-01-21 14:45:49 +0000)

are available in the git repository at:

git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 3cf01054d896fa88ea0dd31c5abb605c2e68bb29:

docker: disable Xen on CentOS 7 (2019-01-23 01:40:47 +0100)

----------------------------------------------------------------
* cpu-exec fixes (Emilio, Laurent)
* high address load for linuxboot (Zhijian)
* PVH support (Liam, Stefano)
* Linux header update (Paolo)
* enable vhost-net for all targets that have virtio-net (Paolo)
* vhost-user-test cleanups (Paolo)
* misc i386 changes (Paolo, Robert)
* hexloader-test change to avoid O_NONBLOCK on stdin (Peter)
* configure tweak for openpty (Thomas)
* elf2dmp port to Windows (Viktor)

----------------------------------------------------------------
v1->v2: clang fixes, new patch to tie PVH support to the machine type

Emilio G. Cota (2):
cpu-exec: add assert_no_pages_locked() after longjmp
cpu-exec: reset BQL after longjmp in cpu_exec_step_atomic

Laurent Vivier (1):
cpus: ignore ESRCH in qemu_cpu_kick_thread()

Li Zhijian (4):
unify len and addr type for memory/address APIs hw/core/loader.c: Read as long as possible in load_image_size()
i386: import & use bootparam.h
i386: allow to load initrd below 4 GB for recent linux

Liam Merwick (4):
elf: Add optional function ptr to load_elf() to parse ELF notes elf-ops.h: Add get_elf_note_type()
pvh: Add x86/HVM direct boot ABI header file
pvh: Boot uncompressed kernel using direct boot ABI

Paolo Bonzini (23):
scripts/update-linux-headers.sh: adjust for Linux 4.21-rc1 (or 5.0-rc1)
include: update Linux headers to 4.21-rc1/5.0-rc1
vhost-net: move stubs to a separate file
vhost-net-user: add stubs for when no virtio-net device is present
vhost: restrict Linux dependency to kernel vhost
vhost-net: compile it on all targets that have virtio-net.
vhost-net: revamp configure logic
vhost-user-test: use g_cond_broadcast
vhost-user-test: signal data_cond when s->rings changes
vhost-user: support cross-endian vnet headers
vhost-user-test: support VHOST_USER_PROTOCOL_F_CROSS_ENDIAN
vhost-user-test: skip if there is no memory at address 0
vhost-user-test: reduce usage of global_qtest
vhost-user-test: create a main loop per TestServer
vhost-user-test: small changes to init_hugepagefs
vhost-user-test: create a temporary directory per TestServer
tap: flush STDOUT on newline
i386: remove the 'INTEL_PT' CPUID bit from named CPU models
target-i386: hvf: remove MPX support
monitor: do not use QTAILQ_FOREACH_SAFE across critical sections
crypto: finish removing TABs
ui: vnc: finish removing TABs
docker: disable Xen on CentOS 7

Peter Maydell (1):
tests/hexloader-test: Don't pass -nographic to the QEMU under test

Robert Hoo (2):
i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model Revert "i386: Add CPUID bit for PCONFIG"

Stefano Garzarella (7):
pvh: load initrd and expose it through fw_cfg
linuxboot_dma: remove duplicate definitions of FW_CFG
linuxboot_dma: move common functions in a new header
optionrom: add new PVH option rom hw/i386/pc: use PVH option rom optionrom/pvh: load initrd from fw_cfg hw/i386/pc: enable PVH only for machine type >= 4.0

Thomas Huth (1):
configure: Add a proper check for openpty() in libutil

Viktor Prutyanov (6):
contrib/elf2dmp: fix elf.h including contrib/elf2dmp: use GLib in ELF processing contrib/elf2dmp: use GLib in PDB processing contrib/elf2dmp: fix structures definitions contrib/elf2dmp: fix printf format
configure: enable elf2dmp build for Windows hosts

 .gitignore                                         |    4 +
 Makefile                                           |    6 +-
 accel/tcg/cpu-exec.c                               |    4 +
 backends/Makefile.objs                             |    5 +-
 configure                                          |  118 ++-
 contrib/elf2dmp/kdbg.h                             |   12 +-
 contrib/elf2dmp/main.c                             |   27 +-
 contrib/elf2dmp/pdb.c                              |   33 +-
 contrib/elf2dmp/pdb.h                              |    4 +-
 contrib/elf2dmp/pe.h                               |    6 +-
 contrib/elf2dmp/qemu_elf.c                         |   27 +-
 contrib/elf2dmp/qemu_elf.h                         |   10 +-
 cpus.c                                             |    2 +-
 crypto/aes.c                                       |  414 ++++----
 crypto/desrfb.c                                    |  594 +++++------
 default-configs/virtio.mak                         |    4 +-
 exec.c                                             |   47 +-
 hw/alpha/dp264.c                                   |    4 +-
 hw/arm/armv7m.c                                    |    3 +-
 hw/arm/boot.c                                      |    2 +-
 hw/core/generic-loader.c                           |    2 +-
 hw/core/loader.c                                   |   35 +-
 hw/cris/boot.c                                     |    3 +-
 hw/hppa/machine.c                                  |    6 +-
 hw/i386/multiboot.c                                |    2 +-
 hw/i386/pc.c                                       |  191 +++-
 hw/i386/pc_piix.c                                  |    3 +
 hw/i386/pc_q35.c                                   |    3 +
 hw/lm32/lm32_boards.c                              |    6 +-
 hw/lm32/milkymist.c                                |    3 +-
 hw/m68k/an5206.c                                   |    2 +-
 hw/m68k/mcf5208.c                                  |    2 +-
 hw/microblaze/boot.c                               |    7 +-
 hw/mips/mips_fulong2e.c                            |    5 +-
 hw/mips/mips_malta.c                               |    5 +-
 hw/mips/mips_mipssim.c                             |    5 +-
 hw/mips/mips_r4k.c                                 |    5 +-
 hw/moxie/moxiesim.c                                |    2 +-
 hw/net/Makefile.objs                               |    4 +-
 hw/net/vhost_net-stub.c                            |   92 ++
 hw/net/vhost_net.c                                 |   85 +-
 hw/nios2/boot.c                                    |    7 +-
 hw/openrisc/openrisc_sim.c                         |    2 +-
 hw/pci-host/prep.c                                 |    2 +-
 hw/ppc/e500.c                                      |    3 +-
 hw/ppc/mac_newworld.c                              |    5 +-
 hw/ppc/mac_oldworld.c                              |    5 +-
 hw/ppc/ppc440_bamboo.c                             |    2 +-
 hw/ppc/sam460ex.c                                  |    3 +-
 hw/ppc/spapr.c                                     |    7 +-
 hw/ppc/virtex_ml507.c                              |    2 +-
 hw/riscv/sifive_e.c                                |    2 +-
 hw/riscv/sifive_u.c                                |    2 +-
 hw/riscv/spike.c                                   |    2 +-
 hw/riscv/virt.c                                    |    2 +-
 hw/s390x/ipl.c                                     |    9 +-
 hw/sparc/leon3.c                                   |    3 +-
 hw/sparc/sun4m.c                                   |    6 +-
 hw/sparc64/sun4u.c                                 |    4 +-
 hw/tricore/tricore_testboard.c                     |    2 +-
 hw/virtio/Makefile.objs                            |    8 +-
 hw/virtio/vhost-backend.c                          |   12 +-
 hw/virtio/vhost-user.c                             |   13 +-
 hw/virtio/vhost.c                                  |    2 +-
 hw/xtensa/sim.c                                    |   12 +-
 hw/xtensa/xtfpga.c                                 |    2 +-
 include/elf.h                                      |   10 +
 include/exec/cpu-all.h                             |    2 +-
 include/exec/cpu-common.h                          |    8 +-
 include/exec/memory.h                              |   22 +-
 include/exec/poison.h                              |    1 -
 include/hw/elf_ops.h                               |   77 ++
 include/hw/i386/pc.h                               |    3 +
 include/hw/loader.h                                |    9 +-
 include/hw/xen/start_info.h                        |  146 +++
 include/standard-headers/asm-x86/bootparam.h       |   34 +
 include/standard-headers/drm/drm_fourcc.h          |   63 ++
 include/standard-headers/linux/ethtool.h           |   19 +-
 include/standard-headers/linux/input-event-codes.h |   17 +
 include/standard-headers/linux/pci_regs.h          |    1 +
 include/standard-headers/linux/vhost_types.h       |  128 +++
 include/standard-headers/linux/virtio_balloon.h    |    8 +
 include/standard-headers/linux/virtio_blk.h        |   54 +
 include/standard-headers/linux/virtio_config.h     |    3 +
 include/standard-headers/linux/virtio_gpu.h        |   18 +
 include/standard-headers/linux/virtio_ring.h       |   52 +
 linux-headers/asm-arm/unistd-common.h              |    1 +
 linux-headers/asm-arm64/unistd.h                   |    1 +
 linux-headers/asm-generic/unistd.h                 |   10 +-
 linux-headers/asm-mips/sgidefs.h                   |    8 -
 linux-headers/asm-mips/unistd.h                    | 1074 +-------------------
 linux-headers/asm-mips/unistd_n32.h                |  338 ++++++
 linux-headers/asm-mips/unistd_n64.h                |  334 ++++++
 linux-headers/asm-mips/unistd_o32.h                |  374 +++++++
 linux-headers/asm-powerpc/unistd.h                 |  389 +------
 linux-headers/asm-powerpc/unistd_32.h              |  381 +++++++
 linux-headers/asm-powerpc/unistd_64.h              |  372 +++++++
 linux-headers/linux/kvm.h                          |   29 +
 linux-headers/linux/vfio.h                         |   92 ++
 linux-headers/linux/vhost.h                        |  113 +-
 linux-headers/linux/vhost_types.h                  |    1 +
 monitor.c                                          |    5 +-
 net/Makefile.objs                                  |    4 +-
 net/net.c                                          |    2 +-
 net/vhost-user-stub.c                              |   23 +
 net/vhost-user.c                                   |   13 +
 pc-bios/optionrom/Makefile                         |    5 +-
 pc-bios/optionrom/linuxboot_dma.c                  |  114 +--
 pc-bios/optionrom/optrom.h                         |  110 ++
 pc-bios/optionrom/optrom_fw_cfg.h                  |   92 ++
 pc-bios/optionrom/pvh.S                            |  200 ++++
 pc-bios/optionrom/pvh_main.c                       |  133 +++
 pc-bios/pvh.bin                                    |  Bin 0 -> 1536 bytes
 scripts/tap-driver.pl                              |    1 +
 scripts/tap-merge.pl                               |    1 +
 scripts/update-linux-headers.sh                    |   17 +
 target/i386/cpu.c                                  |   13 +-
 target/i386/cpu.h                                  |    1 -
 target/i386/hvf/x86_cpuid.c                        |   18 +-
 tests/Makefile.include                             |    9 +-
 tests/docker/dockerfiles/centos7.docker            |    5 +-
 tests/hexloader-test.c                             |    2 +-
 tests/vhost-user-test.c                            |  248 +++--
 ui/vnc-enc-hextile-template.h                      |  268 ++---
 ui/vnc-enc-zywrle.h                                |  394 +++----
 125 files changed, 4781 insertions(+), 3002 deletions(-)
 create mode 100644 hw/net/vhost_net-stub.c
 create mode 100644 include/hw/xen/start_info.h
 create mode 100644 include/standard-headers/asm-x86/bootparam.h
 create mode 100644 include/standard-headers/linux/vhost_types.h
 create mode 100644 linux-headers/asm-mips/unistd_n32.h
 create mode 100644 linux-headers/asm-mips/unistd_n64.h
 create mode 100644 linux-headers/asm-mips/unistd_o32.h
 create mode 100644 linux-headers/asm-powerpc/unistd_32.h
 create mode 100644 linux-headers/asm-powerpc/unistd_64.h
 create mode 100644 linux-headers/linux/vhost_types.h
 create mode 100644 net/vhost-user-stub.c
 create mode 100644 pc-bios/optionrom/optrom.h
 create mode 100644 pc-bios/optionrom/optrom_fw_cfg.h
 create mode 100644 pc-bios/optionrom/pvh.S
 create mode 100644 pc-bios/optionrom/pvh_main.c
 create mode 100644 pc-bios/pvh.bin

--
1.8.3.1

Signature · 2 lines
12345678901234567890123456789012345678901234567890123456789012345678901234567890
         1         2         3         4         5         6         7         8
#5 lore raw
In reply to Paolo Bonzini
Quoted 13 lines · Paolo Bonzini

The following changes since commit cce871c504694cf1034adf525556e3ca3c7eebb6:

hw/block/xen: use proper format string for printing sectors (2019-01-21 14:45:49 +0000)

are available in the git repository at:

git://github.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 3cf01054d896fa88ea0dd31c5abb605c2e68bb29:

docker: disable Xen on CentOS 7 (2019-01-23 01:40:47 +0100)

Quoted 11 lines

----------------------------------------------------------------
* cpu-exec fixes (Emilio, Laurent)
* high address load for linuxboot (Zhijian)
* PVH support (Liam, Stefano)
* Linux header update (Paolo)
* enable vhost-net for all targets that have virtio-net (Paolo)
* vhost-user-test cleanups (Paolo)
* misc i386 changes (Paolo, Robert)
* hexloader-test change to avoid O_NONBLOCK on stdin (Peter)
* configure tweak for openpty (Thomas)
* elf2dmp port to Windows (Viktor)

I get this intermittent failure in vhost-user-test on osx host:

manooth$ QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386 ./tests/vhost-user-test /i386/vhost-user/migrate:
(./tests/vhost-user-test:11590): GLib-WARNING **: 11:54:26.837:
poll(2) failed due to: Bad file descriptor.
Trace/BPT trap: 5

Happens about one time in five when running the test manually.

thanks
-- PMM