Commit 06b43e08 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging



* microvm docs and fixes (Sergio, Liam)
* New processor features for Intel errata (myself, Pawan)
* Kconfig fixes (myself, Thomas)
* Revert mc146818rtc change (myself)
* Deprecate scsi-disk (myself)
* RTC fix (myself, Marcelo)

# gpg: Signature made Tue 19 Nov 2019 09:03:49 GMT
# gpg:                using RSA key BFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream:
  mc146818rtc: fix timer interrupt reinjection again
  Revert "mc146818rtc: fix timer interrupt reinjection"
  scsi: deprecate scsi-disk
  hw/i386: Move save_tsc_khz from PCMachineClass to X86MachineClass
  docs/microvm.rst: add instructions for shutting down the guest
  docs/microvm.rst: fix alignment in "Limitations"
  vfio: vfio-pci requires EDID
  hw/i386: Fix compiler warning when CONFIG_IDE_ISA is disabled
  target/i386: Export TAA_NO bit to guests
  target/i386: add PSCHANGE_NO bit for the ARCH_CAPABILITIES MSR
  microvm: fix memory leak in microvm_fix_kernel_cmdline
  scripts: Detect git worktrees for get_maintainer.pl --git

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 4b8be65e 7a3e29b1
Loading
Loading
Loading
Loading
+24 −3
Original line number Original line Diff line number Diff line
@@ -106,3 +106,24 @@ disabled::
     -device virtio-blk-device,drive=test \
     -device virtio-blk-device,drive=test \
     -netdev tap,id=tap0,script=no,downscript=no \
     -netdev tap,id=tap0,script=no,downscript=no \
     -device virtio-net-device,netdev=tap0
     -device virtio-net-device,netdev=tap0


Triggering a guest-initiated shut down
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

As the microvm machine type includes just a small set of system
devices, some x86 mechanisms for rebooting or shutting down the
system, like sending a key sequence to the keyboard or writing to an
ACPI register, doesn't have any effect in the VM.

The recommended way to trigger a guest-initiated shut down is by
generating a ``triple-fault``, which will cause the VM to initiate a
reboot. Additionally, if the ``-no-reboot`` argument is present in the
command line, QEMU will detect this event and terminate its own
execution gracefully.

Linux does support this mechanism, but by default will only be used
after other options have been tried and failed, causing the reboot to
be delayed by a small number of seconds. It's possible to instruct it
to try the triple-fault mechanism first, by adding ``reboot=t`` to the
kernel's command line.
+2 −0
Original line number Original line Diff line number Diff line
@@ -331,6 +331,8 @@ static void microvm_fix_kernel_cmdline(MachineState *machine)


    fw_cfg_modify_i32(x86ms->fw_cfg, FW_CFG_CMDLINE_SIZE, strlen(cmdline) + 1);
    fw_cfg_modify_i32(x86ms->fw_cfg, FW_CFG_CMDLINE_SIZE, strlen(cmdline) + 1);
    fw_cfg_modify_string(x86ms->fw_cfg, FW_CFG_CMDLINE_DATA, cmdline);
    fw_cfg_modify_string(x86ms->fw_cfg, FW_CFG_CMDLINE_DATA, cmdline);

    g_free(cmdline);
}
}


static void microvm_machine_state_init(MachineState *machine)
static void microvm_machine_state_init(MachineState *machine)
+0 −1
Original line number Original line Diff line number Diff line
@@ -2195,7 +2195,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data)
    /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported
    /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported
     * to be used at the moment, 32K should be enough for a while.  */
     * to be used at the moment, 32K should be enough for a while.  */
    pcmc->acpi_data_size = 0x20000 + 0x8000;
    pcmc->acpi_data_size = 0x20000 + 0x8000;
    pcmc->save_tsc_khz = true;
    pcmc->linuxboot_dma_enabled = true;
    pcmc->linuxboot_dma_enabled = true;
    pcmc->pvh_enabled = true;
    pcmc->pvh_enabled = true;
    assert(!mc->get_hotplug_handler);
    assert(!mc->get_hotplug_handler);
+4 −4
Original line number Original line Diff line number Diff line
@@ -78,7 +78,6 @@ static void pc_init1(MachineState *machine,
    X86MachineState *x86ms = X86_MACHINE(machine);
    X86MachineState *x86ms = X86_MACHINE(machine);
    MemoryRegion *system_memory = get_system_memory();
    MemoryRegion *system_memory = get_system_memory();
    MemoryRegion *system_io = get_system_io();
    MemoryRegion *system_io = get_system_io();
    int i;
    PCIBus *pci_bus;
    PCIBus *pci_bus;
    ISABus *isa_bus;
    ISABus *isa_bus;
    PCII440FXState *i440fx_state;
    PCII440FXState *i440fx_state;
@@ -253,6 +252,7 @@ static void pc_init1(MachineState *machine,
    }
    }
#ifdef CONFIG_IDE_ISA
#ifdef CONFIG_IDE_ISA
else {
else {
        int i;
        for (i = 0; i < MAX_IDE_BUS; i++) {
        for (i = 0; i < MAX_IDE_BUS; i++) {
            ISADevice *dev;
            ISADevice *dev;
            char busname[] = "ide.0";
            char busname[] = "ide.0";
@@ -567,10 +567,10 @@ DEFINE_I440FX_MACHINE(v2_6, "pc-i440fx-2.6", NULL,


static void pc_i440fx_2_5_machine_options(MachineClass *m)
static void pc_i440fx_2_5_machine_options(MachineClass *m)
{
{
    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
    X86MachineClass *x86mc = X86_MACHINE_CLASS(m);


    pc_i440fx_2_6_machine_options(m);
    pc_i440fx_2_6_machine_options(m);
    pcmc->save_tsc_khz = false;
    x86mc->save_tsc_khz = false;
    m->legacy_fw_cfg_order = 1;
    m->legacy_fw_cfg_order = 1;
    compat_props_add(m->compat_props, hw_compat_2_5, hw_compat_2_5_len);
    compat_props_add(m->compat_props, hw_compat_2_5, hw_compat_2_5_len);
    compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len);
    compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len);
+2 −2
Original line number Original line Diff line number Diff line
@@ -508,10 +508,10 @@ DEFINE_Q35_MACHINE(v2_6, "pc-q35-2.6", NULL,


static void pc_q35_2_5_machine_options(MachineClass *m)
static void pc_q35_2_5_machine_options(MachineClass *m)
{
{
    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
    X86MachineClass *x86mc = X86_MACHINE_CLASS(m);


    pc_q35_2_6_machine_options(m);
    pc_q35_2_6_machine_options(m);
    pcmc->save_tsc_khz = false;
    x86mc->save_tsc_khz = false;
    m->legacy_fw_cfg_order = 1;
    m->legacy_fw_cfg_order = 1;
    compat_props_add(m->compat_props, hw_compat_2_5, hw_compat_2_5_len);
    compat_props_add(m->compat_props, hw_compat_2_5, hw_compat_2_5_len);
    compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len);
    compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len);
Loading