Misc (mostly x86) patches for 2019-10-24
The following changes since commit e9d42461920f6f40f4d847a5ba18e90d095ed0b9:
Merge remote-tracking branch 'remotes/kraxel/tags/audio-20191018-pull-request' into staging (2019-10-18 14:13:11 +0100)
are available in the git repository at:
git://github.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to bf13bfab0840d34a74938ddf567d52e9010dbdc6:
i386: implement IGNNE (2019-10-25 13:18:21 +0200)
----------------------------------------------------------------
* Bulgarian translation update (Alexander)
* RTC and PC refactorings (Hervé, Philippe, Sergio)
* RTC fix (Marcelo)
* More comprehensive MCE logging (Mario)
* x86 IGNNE implementation (Paolo)
* Microvm machine type (Sergio)
* Support for UMONITOR/UMWAIT/TPAUSE (Tao)
* Do not use %m in common code (Thomas)
* NoNonArchitecturalCoreSharing Hyper-V enlightenment (Vitaly)
* getpagesize cleanups (Wei)
----------------------------------------------------------------
Alexander Shopov (1):
Updated Bulgarian translation (19) - 4.1.0
Hervé Poussineau (2):
mc146818rtc: move structure to header file
mc146818rtc: always register rtc to rtc list
Laurent Vivier (1):
runstate: ignore exit request in finish migrate state
Marcelo Tosatti (1):
mc146818rtc: fix timer interrupt reinjection
Mario Smarduch (1):
target/i386: log MCE guest and host addresses
Paolo Bonzini (6):
memory-device: simplify Makefile.objs conditions hw/i386: split PCMachineState deriving X86MachineState from it
audio: fix missing break
target/i386: move FERR handling to target/i386 target/i386: introduce cpu_set_fpus
i386: implement IGNNE
Philippe Mathieu-Daudé (7):
hw/timer/mc146818rtc: Only include qapi-commands-misc on I386
hw/i386/pc: Extract pc_gsi_create()
hw/i386/pc: Move gsi_state creation code
hw/i386/pc: Extract pc_i8259_create()
hw/i386/pc: Remove kvm_i386.h include
mc146818rtc: Move RTC_ISA_IRQ definition
mc146818rtc: Include mc146818rtc_regs.h directly in mc146818rtc.cSergio Lopez (14):
hw/virtio: Factorize virtio-mmio headers
hw/i386/pc: rename functions shared with non-PC machines hw/i386/pc: fix code style issues on functions that will be moved out hw/i386/pc: replace use of strtol with qemu_strtoui in x86_load_linux() hw/i386/pc: avoid an assignment in if condition in x86_load_linux() hw/i386/pc: remove commented out code from x86_load_linux() hw/i386/pc: move shared x86 functions to x86.c and export them hw/i386: make x86.c independent from PCMachineState
fw_cfg: add "modify" functions for all types
hw/intc/apic: reject pic ints if isa_pic == NULL
roms: add microvm-bios (qboot) as binary and git submodule docs/microvm.rst: document the new microvm machine type hw/i386: Introduce the microvm machine type
MAINTAINERS: add microvm related files
Tao Xu (2):
x86/cpu: Add support for UMONITOR/UMWAIT/TPAUSE target/i386: Add support for save/load IA32_UMWAIT_CONTROL MSR
Thomas Huth (1):
Do not use %m in common code to print error messages
Vitaly Kuznetsov (1):
i386/kvm: add NoNonArchitecturalCoreSharing Hyper-V enlightenment
Wei Yang (2):
checkpatch: suggest qemu_real_host_page_size instead of getpagesize() or sysconf(_SC_PAGESIZE)
core: replace getpagesize() with qemu_real_host_page_size
.gitmodules | 3 + MAINTAINERS | 9 + accel/kvm/kvm-all.c | 6 +- audio/paaudio.c | 1 + backends/hostmem.c | 2 +- block.c | 4 +- block/file-posix.c | 9 +- block/io.c | 2 +- block/parallels.c | 2 +- block/qcow2-cache.c | 2 +- contrib/vhost-user-gpu/vugbm.c | 2 +- default-configs/i386-softmmu.mak | 1 + docs/hyperv.txt | 13 + docs/microvm.rst | 108 +++++ exec.c | 6 +- hw/acpi/cpu_hotplug.c | 10 +- hw/i386/Kconfig | 10 + hw/i386/Makefile.objs | 2 + hw/i386/acpi-build.c | 29 +- hw/i386/amd_iommu.c | 3 +- hw/i386/intel_iommu.c | 3 +- hw/i386/microvm.c | 572 +++++++++++++++++++++++++ hw/i386/pc.c | 832 +++++------------------------------- hw/i386/pc_piix.c | 67 ++- hw/i386/pc_q35.c | 64 ++- hw/i386/pc_sysfw.c | 60 +-- hw/i386/x86.c | 795 ++++++++++++++++++++++++++++++++++ hw/i386/xen/xen-hvm.c | 28 +- hw/intc/apic.c | 2 +- hw/intc/ioapic.c | 2 +- hw/intc/s390_flic_kvm.c | 2 +- hw/mem/Makefile.objs | 2 +- hw/misc/tmp421.c | 4 +- hw/nvram/fw_cfg.c | 29 ++ hw/ppc/mac_newworld.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/rdma/vmw/pvrdma_main.c | 2 +- hw/timer/mc146818rtc.c | 94 ++-- hw/vfio/spapr.c | 7 +- hw/virtio/virtio-mmio.c | 48 +-- include/exec/ram_addr.h | 2 +- include/hw/i386/microvm.h | 71 +++ include/hw/i386/pc.h | 32 +- include/hw/i386/x86.h | 96 +++++ include/hw/nvram/fw_cfg.h | 42 ++ include/hw/timer/mc146818rtc.h | 36 +- include/hw/timer/mc146818rtc_regs.h | 2 - include/hw/virtio/virtio-mmio.h | 73 ++++ include/qemu/osdep.h | 4 +- migration/migration.c | 2 +- migration/postcopy-ram.c | 4 +- monitor/misc.c | 2 +- pc-bios/bios-microvm.bin | Bin 0 -> 65536 bytes po/bg.po | 10 +- roms/Makefile | 6 + roms/qboot | 1 + scripts/checkpatch.pl | 6 + target/i386/cpu.c | 4 +- target/i386/cpu.h | 11 +- target/i386/fpu_helper.c | 60 ++- target/i386/hyperv-proto.h | 1 + target/i386/kvm.c | 74 +++- target/i386/machine.c | 20 + target/ppc/kvm.c | 2 +- tests/rtc-test.c | 1 + tests/vhost-user-bridge.c | 8 +- util/main-loop.c | 3 +- util/mmap-alloc.c | 10 +- util/oslib-posix.c | 4 +- util/oslib-win32.c | 2 +- util/systemd.c | 4 +- util/vfio-helpers.c | 12 +- vl.c | 3 + 73 files changed, 2342 insertions(+), 1107 deletions(-) create mode 100644 docs/microvm.rst create mode 100644 hw/i386/microvm.c create mode 100644 hw/i386/x86.c create mode 100644 include/hw/i386/microvm.h create mode 100644 include/hw/i386/x86.h create mode 100644 include/hw/virtio/virtio-mmio.h create mode 100644 pc-bios/bios-microvm.bin create mode 160000 roms/qboot
Signature · 1 line
1.8.3.1
[PULL v2 37/39] target/i386: move FERR handling to target/i386
Move it out of pc.c since it is strictly tied to TCG. This is almost exclusively code movement, the next patch will implement IGNNE.
--- hw/i386/pc.c | 17 +++-------------- hw/i386/pc_piix.c | 4 +++- hw/i386/pc_q35.c | 4 +++- include/hw/i386/pc.h | 1 - target/i386/cpu.h | 3 ++- target/i386/fpu_helper.c | 26 +++++++++++++++++++++++++- 6 files changed, 36 insertions(+), 19 deletions(-)
hw/i386/pc.c +3 -14
@@ -381,23 +381,12 @@ static uint64_t ioport80_read(void *opaque, hwaddr addr, unsigned size) }/* MSDOS compatibility mode FPU exception support */ -static qemu_irq ferr_irq; - -void pc_register_ferr_irq (qemu_irq irq) -{ - ferr_irq = irq; -} - -/* XXX: add IGNNE support */ -void cpu_set_ferr (CPUX86State *s) -{ -qemu_irq_raise (ferr_irq); -} -static void ioportF0_write (void *opaque,hwaddr addr,uint64_t data,unsigned size) { -qemu_irq_lower (ferr_irq); +if (tcg_enabled ()) { +cpu_clear_ferr (); + } }static uint64_t ioportF0_read (void *opaque,hwaddr addr,unsigned size)
hw/i386/pc_piix.c +3 -1
@@ -213,7 +213,9 @@ static void pc_init1(MachineState *machine,ioapic_init_gsi (gsi_state,"i440fx" ); } -pc_register_ferr_irq (x86ms->gsi[13 ]); +if (tcg_enabled ()) { +x86_register_ferr_irq (x86ms->gsi[13 ]); + }pc_vga_init (isa_bus, pcmc->pci_enabled ? pci_bus :NULL );
hw/i386/pc_q35.c +3 -1
@@ -261,7 +261,9 @@ static void pc_q35_init(MachineState *machine)ioapic_init_gsi (gsi_state,"q35" ); } -pc_register_ferr_irq (x86ms->gsi[13 ]); +if (tcg_enabled ()) { +x86_register_ferr_irq (x86ms->gsi[13 ]); + }assert (pcms->vmport !=ON_OFF_AUTO__MAX );if (pcms->vmport ==ON_OFF_AUTO_AUTO ) {
include/hw/i386/pc.h +0 -1
@@ -176,7 +176,6 @@ void vmmouse_set_data(const uint32_t *data);extern int fd_bootchk;bool pc_machine_is_smm_enabled (PCMachineState *pcms); -void pc_register_ferr_irq (qemu_irq irq);void pc_acpi_smi_interrupt (void *opaque,int irq,int level);void pc_hot_add_cpu (MachineState *ms,const int64_t id,Error **errp);
target/i386/cpu.h +2 -1
@@ -1761,7 +1761,8 @@ int cpu_x86_support_mca_broadcast(CPUX86State *env);int cpu_get_pic_interrupt (CPUX86State *s);/* MSDOS compatibility mode FPU exception support */ -void cpu_set_ferr (CPUX86State *s); +void x86_register_ferr_irq (qemu_irq irq); +void cpu_clear_ferr (void );/* mpx_helper.c */ void cpu_sync_bndcs_hflags (CPUX86State *env);
target/i386/fpu_helper.c +25 -1
@@ -26,6 +26,10 @@#include "exec/cpu_ldst.h" #include "fpu/softfloat.h" +#ifdef CONFIG_SOFTMMU +#include "hw/irq.h" +#endif +#define FPU_RC_MASK 0xc00#define FPU_RC_NEAR 0x000#define FPU_RC_DOWN 0x400
@@ -58,6 +62,26 @@#define floatx80_l2e make_floatx80(0x3fff, 0xb8aa3b295c17f0bcLL)#define floatx80_l2t make_floatx80(0x4000, 0xd49a784bcd1b8afeLL) +#if !defined(CONFIG_USER_ONLY ) +static qemu_irq ferr_irq; + +void x86_register_ferr_irq (qemu_irq irq) +{ + ferr_irq = irq; +} + +void cpu_clear_ferr (void ) +{ +qemu_irq_lower (ferr_irq); +} + +static void cpu_set_ferr (void ) +{ +qemu_irq_raise (ferr_irq); +} +#endif + +static inline void fpush (CPUX86State *env) { env->fpstt = (env->fpstt -1 ) &7 ;
@@ -137,7 +161,7 @@ static void fpu_raise_exception(CPUX86State *env, uintptr_t retaddr) }#if !defined(CONFIG_USER_ONLY ) else { -cpu_set_ferr (env); +cpu_set_ferr (); }#endif }
Signature · 1 line
1.8.3.1
Peter Maydell
AppliedQuoted 14 lines · Paolo Bonzini
The following changes since commit
e9d42461920f6f40f4d847a5ba18e90d095ed0b9:Merge remote-tracking branch 'remotes/kraxel/tags/audio-20191018-pull-request' into staging (2019-10-18 14:13:11 +0100)
are available in the git repository at:
git://github.com/bonzini/qemu.gittags/for-upstreamfor you to fetch changes up to
bf13bfab0840d34a74938ddf567d52e9010dbdc6:i386: implement IGNNE (2019-10-25 13:18:21 +0200)
Quoted 11 lines
----------------------------------------------------------------
* Bulgarian translation update (Alexander)
* RTC and PC refactorings (Hervé, Philippe, Sergio)
* RTC fix (Marcelo)
* More comprehensive MCE logging (Mario)
* x86 IGNNE implementation (Paolo)
* Microvm machine type (Sergio)
* Support for UMONITOR/UMWAIT/TPAUSE (Tao)
* Do not use %m in common code (Thomas)
* NoNonArchitecturalCoreSharing Hyper-V enlightenment (Vitaly)
* getpagesize cleanups (Wei)
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.
-- PMM