1. 10 1月, 2016 8 次提交
  2. 08 1月, 2016 2 次提交
    • I
    • L
      hw/i386: fill in the CENTURY field of the FADT (FACP) ACPI table · f070efa8
      Laszlo Ersek 提交于
      The ACPI specification (minimally versions 1.0b through 6.0) define the
      FADT.CENTURY field as:
      
        The RTC CMOS RAM index to the century of data value (hundred and
        thousand year decimals). If this field contains a zero, then the RTC
        centenary feature is not supported. If this field has a non-zero value,
        then this field contains an index into RTC RAM space that OSPM can use
        to program the centenary field.
      
      The x86 targets generate ACPI payload, emulate an RTC
      (CONFIG_MC146818RTC), and that RTC supports the "centenary feature" (see
      occurrences of RTC_CENTURY in cmos_ioport_write() and cmos_ioport_read()
      in "hw/timer/mc146818rtc.c".)
      
      However, FADT.CENTURY is left at zero currently:
      
        [06Ch 0108   1]            RTC Century Index : 00
      
      which -- according to analysis done by Ruiyu Ni at Intel -- should cause
      Linux and Windows 8+ to think the RTC centenary feature is unavailable,
      and cause Windows 7 to (incorrectly) assume that the offset to use is
      constant 0x32. (0x32 happens to be the right value on QEMU, but Windows 7
      is wrong to assume anything at all).
      
      Exposing the right nonzero offset in FADT.CENTURY informs Linux and
      Windows 8+ about the right capabilities of the hardware, plus it retrofits
      our FADT to Windows 7's behavior.
      
      Regression tested with the following guests (all UEFI installs):
      - i386 Q35: Fedora 21 ("Fedlet" edition)
      - x86_64:
        - i440fx:
          - Fedora 21
          - RHEL 6 and 7
          - Windows 7 and 10
          - Windows Server 2008 R2 and 2012 R2
        - Q35:
          - Fedora 22
          - Windows 8.1
      
      Cc: "Michael S. Tsirkin" <mst@redhat.com> (supporter:ACPI/SMBIOS)
      Cc: Igor Mammedov <imammedo@redhat.com> (supporter:ACPI/SMBIOS)
      Cc: Paolo Bonzini <pbonzini@redhat.com> (maintainer:X86)
      Cc: Richard Henderson <rth@twiddle.net> (maintainer:X86)
      Cc: Eduardo Habkost <ehabkost@redhat.com> (maintainer:X86)
      Cc: Ruiyu Ni <ruiyu.ni@intel.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      
      f070efa8
  3. 23 12月, 2015 7 次提交
  4. 22 12月, 2015 2 次提交
  5. 17 12月, 2015 1 次提交
  6. 15 12月, 2015 1 次提交
    • G
      fw_cfg: remove offset argument from callback prototype · 3f8752b4
      Gabriel L. Somlo 提交于
      Read callbacks are now only invoked at item selection, before any
      data is read. As such, the value of the offset argument passed to
      the callback will always be 0. Also, the two callback instances
      currently in use both leave their offset argument unused.
      
      This patch removes the offset argument from the fw_cfg read callback
      prototype, and from the currently available instances. The unused
      (write) callback prototype is also removed (write support was removed
      earlier, in commit 023e3148).
      
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Marc Marí <markmb@redhat.com>
      Signed-off-by: NGabriel Somlo <somlo@cmu.edu>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 1446733972-1602-4-git-send-email-somlo@cmu.edu
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      3f8752b4
  7. 13 8月, 2015 1 次提交
  8. 28 7月, 2015 1 次提交
  9. 04 7月, 2015 1 次提交
  10. 23 6月, 2015 1 次提交
  11. 11 6月, 2015 2 次提交
    • L
      i386/acpi-build: fix PXB workarounds for unsupported BIOSes · 4ebc736e
      Laszlo Ersek 提交于
      The patch
      
        apci: fix PXB behaviour if used with unsupported BIOS
      
      uses the following condition to see if a "PXB mem/IO chunk" has *not* been
      configured by the BIOS:
      
        (!range_base || range_base > range_limit)
      
      When this condition evaluates to true, said patch *omits* the
      corresponding entry from the _CRS.
      
      Later on the patch checks for the opposite condition (with the intent of
      *adding* entries to the _CRS if the "PXB mem/IO chunks" *have* been
      configured). Unfortunately, the condition was negated incorrectly: only
      the first ! operator was removed, which led to the nonsensical expression
      
        (range_base || range_base > range_limit)
      
      leading to bogus entries in the _CRS, and causing BSOD in Windows Server
      2012 R2 when it runs on OVMF.
      
      The correct negative of the condition seen at the top is
      
        (range_base && range_base <= range_limit)
      
      Fix the expressions.
      
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      4ebc736e
    • L
      i386/acpi-build: more traditional _UID and _HID for PXB root buses · c96d9286
      Laszlo Ersek 提交于
      The ACPI specification permits the _HID and _UID objects to evaluate to
      strings. (See "6.1.5 _HID (Hardware ID)" and "6.1.12 _UID (Unique ID)" in
      the ACPI v6.0 spec.)
      
      With regard to related standards, the UEFI specification can also express
      a device address composed from string _HID and _UID identifiers, inside
      the Expanded ACPI Device Path Node. (See "9.3.3 ACPI Device Path", Table
      49, in the UEFI v2.5 spec.)
      
      However, numeric (integer) contents for both _HID and _UID are more
      traditional. They are recommended by the UEFI spec for size reasons:
      
        [...] the ACPI Device Path node is smaller and should be used if
        possible to reduce the size of device paths that may potentially be
        stored in nonvolatile storage [...]
      
      External tools support them better (for example the --acpi_hid and
      --acpi_uid options of "efibootmgr" only take numeric identifiers).
      Finally, numeric _HID and _UID contents are existing practice in the QEMU
      source.
      
      This patch was tested with a Fedora 20 LiveCD and a preexistent Windows
      Server 2012 R2 guest. Using "acpidump" and "iasl" in the Fedora guest, we
      get, in the SSDT:
      
      > Scope (\_SB)
      > {
      >   Device (PC04)
      >   {
      >     Name (_UID, 0x04)  // _UID: Unique ID
      >     Name (_HID, EisaId ("PNP0A03") /* PCI Bus */)  // _HID: Hardware ID
      
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      c96d9286
  12. 04 6月, 2015 7 次提交
  13. 03 6月, 2015 1 次提交
    • S
      hw/i386/acpi-build: decref after use · d370dfa9
      Shannon Zhao 提交于
      valgrind complains about:
      ==16447== 48 bytes in 2 blocks are definitely lost in loss record 2,033 of 3,310
      ==16447==    at 0x4C2845D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==16447==    by 0x2E4FD7: malloc_and_trace (vl.c:2546)
      ==16447==    by 0x64C770E: g_malloc (in /usr/lib64/libglib-2.0.so.0.3600.3)
      ==16447==    by 0x53EC3F: qint_from_int (qint.c:33)
      ==16447==    by 0x53B426: qmp_output_type_int (qmp-output-visitor.c:162)
      ==16447==    by 0x539257: visit_type_uint32 (qapi-visit-core.c:147)
      ==16447==    by 0x471D07: property_get_uint32_ptr (object.c:1651)
      ==16447==    by 0x47000C: object_property_get (object.c:822)
      ==16447==    by 0x472428: object_property_get_qobject (qom-qobject.c:37)
      ==16447==    by 0x25701A: build_append_pci_bus_devices (acpi-build.c:520)
      ==16447==    by 0x25902E: build_ssdt (acpi-build.c:1004)
      ==16447==    by 0x25A0A8: acpi_build (acpi-build.c:1420)
      Signed-off-by: NShannon Zhao <zhaoshenglong@huawei.com>
      Signed-off-by: NShannon Zhao <shannon.zhao@linaro.org>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      d370dfa9
  14. 01 6月, 2015 1 次提交
  15. 31 5月, 2015 1 次提交
    • R
      pc: acpi: fix pvpanic for buggy guests · 2332333c
      Radim Krčmář 提交于
      In the old times, we always had pvpanic in ACPI and a _STA method told
      the guest not to use it.  Automatic generation dropped the _STA method
      as the specification says that missing _STA means enabled and working.
      Some guests (Linux) had buggy drivers and this change made them unable
      to utilize pvpanic.
      
      A Linux patch is posted as well, but I think it's worth to make pvpanic
      useable on old guests at the price of three lines and few bytes of SSDT.
      
      The old _STA method was
        Method (_STA, 0, NotSerialized) {
            Store (PEST, Local0)
            If (LEqual (Local0, Zero)) {
                Return (Zero) }
            Else {
                Return (0x0F) }}
      
      Igor pointed out that we don't need to use a method to return a constant
      and that 0xB (don't show in UI) is the common definition now.
      
      Also, the device used to be PEVT.  (PEVT as in "panic event"?)
      Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      
      2332333c
  16. 29 5月, 2015 2 次提交
  17. 30 4月, 2015 1 次提交