]> Git Repo - qemu.git/commitdiff
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
authorPeter Maydell <[email protected]>
Mon, 8 Jul 2019 09:26:18 +0000 (10:26 +0100)
committerPeter Maydell <[email protected]>
Mon, 8 Jul 2019 09:26:18 +0000 (10:26 +0100)
Bugfixes.

# gpg: Signature made Fri 05 Jul 2019 21:21:52 BST
# gpg:                using RSA key BFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <[email protected]>" [full]
# gpg:                 aka "Paolo Bonzini <[email protected]>" [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:
  ioapic: use irq number instead of vector in ioapic_eoi_broadcast
  hw/i386: Fix linker error when ISAPC is disabled
  Makefile: generate header file with the list of devices enabled
  target/i386: kvm: Fix when nested state is needed for migration
  minikconf: do not include variables from MINIKCONF_ARGS in config-all-devices.mak
  target/i386: fix feature check in hyperv-stub.c
  ioapic: clear irq_eoi when updating the ioapic redirect table entry
  intel_iommu: Fix unexpected unmaps during global unmap
  intel_iommu: Fix incorrect "end" for vtd_address_space_unmap
  i386/kvm: Fix build with -m32
  checkpatch: do not warn for multiline parenthesized returned value
  pc: fix possible NULL pointer dereference in pc_machine_get_device_memory_region_size()

Signed-off-by: Peter Maydell <[email protected]>
1  2 
Makefile.target
hw/i386/pc_piix.c
target/i386/kvm.c

diff --combined Makefile.target
index a6919e0caf750ae2f3eeb1c2244ca8ed7de6d48a,7154e99f0a670b0ac49224dfac43fc8667403211..85216cace89a9a5623bd059ebe6551162dff2238
@@@ -45,6 -45,9 +45,9 @@@ include $(SRC_PATH)/tests/tcg/Makefile.
  config-target.h: config-target.h-timestamp
  config-target.h-timestamp: config-target.mak
  
+ config-devices.h: config-devices.h-timestamp
+ config-devices.h-timestamp: config-devices.mak
  ifdef CONFIG_TRACE_SYSTEMTAP
  stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp $(QEMU_PROG)-simpletrace.stp $(QEMU_PROG)-log.stp
  
@@@ -148,14 -151,15 +151,14 @@@ endif #CONFIG_BSD_USE
  #########################################################
  # System emulator target
  ifdef CONFIG_SOFTMMU
 -obj-y += arch_init.o cpus.o gdbstub.o balloon.o ioport.o numa.o
 +obj-y += arch_init.o cpus.o gdbstub.o balloon.o ioport.o
  obj-y += qtest.o
 +obj-y += dump/
  obj-y += hw/
  obj-y += monitor/
  obj-y += qapi/
  obj-y += memory.o
  obj-y += memory_mapping.o
 -obj-y += dump.o
 -obj-$(TARGET_X86_64) += win_dump.o
  obj-y += migration/ram.o
  LIBS := $(libs_softmmu) $(LIBS)
  
@@@ -167,6 -171,7 +170,7 @@@ obj-y += hw/$(TARGET_BASE_ARCH)
  endif
  
  generated-files-y += hmp-commands.h hmp-commands-info.h
+ generated-files-y += config-devices.h
  
  endif # CONFIG_SOFTMMU
  
diff --combined hw/i386/pc_piix.c
index 581b3c2baa8b929f7ff5ba5af9896552b0a09575,cc04c015c7d8b080a45aad7dc71abc3e6ed1a50b..c2280c72effb7e2a4dd5aec1eed49aca095efbdb
@@@ -23,6 -23,7 +23,7 @@@
   */
  
  #include "qemu/osdep.h"
+ #include "config-devices.h"
  
  #include "qemu/units.h"
  #include "hw/hw.h"
  
  #define MAX_IDE_BUS 2
  
+ #ifdef CONFIG_IDE_ISA
  static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
  static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
  static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
+ #endif
  
  /* PC hardware initialisation */
  static void pc_init1(MachineState *machine,
          }
          idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0");
          idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
-     } else {
+         pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state);
+     }
+ #ifdef CONFIG_IDE_ISA
+ else {
          for(i = 0; i < MAX_IDE_BUS; i++) {
              ISADevice *dev;
              char busname[] = "ide.0";
              busname[4] = '0' + i;
              idebus[i] = qdev_get_child_bus(DEVICE(dev), busname);
          }
+         pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state);
      }
-     pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state);
+ #endif
  
      if (pcmc->pci_enabled && machine_usb(machine)) {
          pci_create_simple(pci_bus, piix3_devfn + 2, "piix3-usb-uhci");
@@@ -358,6 -364,7 +364,6 @@@ static void pc_compat_1_4_fn(MachineSta
  static void pc_compat_1_3(MachineState *machine)
  {
      pc_compat_1_4_fn(machine);
 -    enable_compat_apic_id_mode();
  }
  
  /* PC compat function for pc-0.14 to pc-1.2 */
@@@ -429,11 -436,9 +435,11 @@@ static void pc_i440fx_machine_options(M
  
  static void pc_i440fx_4_1_machine_options(MachineClass *m)
  {
 +    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
      pc_i440fx_machine_options(m);
      m->alias = "pc";
      m->is_default = 1;
 +    pcmc->default_cpu_version = 1;
  }
  
  DEFINE_I440FX_MACHINE(v4_1, "pc-i440fx-4.1", NULL,
  
  static void pc_i440fx_4_0_machine_options(MachineClass *m)
  {
 +    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
      pc_i440fx_4_1_machine_options(m);
      m->alias = NULL;
      m->is_default = 0;
 +    pcmc->default_cpu_version = CPU_VERSION_LEGACY;
      compat_props_add(m->compat_props, hw_compat_4_0, hw_compat_4_0_len);
      compat_props_add(m->compat_props, pc_compat_4_0, pc_compat_4_0_len);
  }
@@@ -711,7 -714,6 +717,7 @@@ DEFINE_I440FX_MACHINE(v1_4, "pc-i440fx-
  
  static void pc_i440fx_1_3_machine_options(MachineClass *m)
  {
 +    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
      static GlobalProperty compat[] = {
          PC_CPU_MODEL_IDS("1.3.0")
          { "usb-tablet", "usb_version", "1" },
  
      pc_i440fx_1_4_machine_options(m);
      m->hw_version = "1.3.0";
 +    pcmc->compat_apic_id_mode = true;
      compat_props_add(m->compat_props, compat, G_N_ELEMENTS(compat));
  }
  
diff --combined target/i386/kvm.c
index 473a17e9a56ac87df909890d65fddb1335c966fb,31490bf8b544d5c5edf0cbe6128332eb81657ff8..ec7870c6af6dd8f3560ca119aef5a35cfb83bb85
@@@ -1043,14 -1043,15 +1043,15 @@@ static int hv_cpuid_check_and_set(CPUSt
      CPUX86State *env = &cpu->env;
      uint32_t r, fw, bits;
      uint64_t deps;
-     int i, dep_feat = 0;
+     int i, dep_feat;
  
      if (!hyperv_feat_enabled(cpu, feature) && !cpu->hyperv_passthrough) {
          return 0;
      }
  
      deps = kvm_hyperv_properties[feature].dependencies;
-     while ((dep_feat = find_next_bit(&deps, 64, dep_feat)) < 64) {
+     while (deps) {
+         dep_feat = ctz64(deps);
          if (!(hyperv_feat_enabled(cpu, dep_feat))) {
                  fprintf(stderr,
                          "Hyper-V %s requires Hyper-V %s\n",
                          kvm_hyperv_properties[dep_feat].desc);
                  return 1;
          }
-         dep_feat++;
+         deps &= ~(1ull << dep_feat);
      }
  
      for (i = 0; i < ARRAY_SIZE(kvm_hyperv_properties[feature].flags); i++) {
@@@ -1451,10 -1452,6 +1452,10 @@@ int kvm_arch_init_vcpu(CPUState *cs
              }
              break;
          }
 +        case 0x1f:
 +            if (env->nr_dies < 2) {
 +                break;
 +            }
          case 4:
          case 0xb:
          case 0xd:
                  if (i == 0xd && j == 64) {
                      break;
                  }
 +
 +                if (i == 0x1f && j == 64) {
 +                    break;
 +                }
 +
                  c->function = i;
                  c->flags = KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
                  c->index = j;
                  if (i == 0xb && !(c->ecx & 0xff00)) {
                      break;
                  }
 +                if (i == 0x1f && !(c->ecx & 0xff00)) {
 +                    break;
 +                }
                  if (i == 0xd && c->eax == 0) {
                      continue;
                  }
This page took 0.038523 seconds and 4 git commands to generate.