Commit graph

27907 commits

Author SHA1 Message Date
Anthony Liguori 003e26bc9f Merge remote-tracking branch 'mdroth/qga-pull-2013-7-25' into staging
# By Laszlo Ersek
# Via Michael Roth
* mdroth/qga-pull-2013-7-25:
  qga: escape cmdline args when registering win32 service (CVE-2013-2231)
  ga_install_service(): nest error paths more idiomatically
  qga/service-win32.c: diagnostic output should go to stderr

Message-id: 1374784644-29078-1-git-send-email-mdroth@linux.vnet.ibm.com
2013-07-25 15:58:29 -05:00
Anthony Liguori d1ed9f412d Merge remote-tracking branch 'kraxel/seabios-1.7.3' into staging
# By Gerd Hoffmann
# Via Gerd Hoffmann
* kraxel/seabios-1.7.3:
  seabios: update to 1.7.3

Message-id: 1374673573-25074-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 15:57:18 -05:00
Anthony Liguori 874ec3c5b3 Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging
* riku/linux-user-for-upstream: (21 commits)
  linux-user: Handle compressed ISA encodings when processing MIPS exceptions
  linux-user: Unlock mmap_lock when resuming guest from page_unprotect
  linux-user: Reset copied CPUs in cpu_copy() always
  linux-user: Fix epoll on ARM hosts
  linux-user: fix segmentation fault passing with h2g(x) != x
  linux-user: Fix pipe syscall return for SPARC
  linux-user: Fix target_stat and target_stat64 for OpenRISC
  linux-user: Avoid conditional cpu_reset()
  configure: Make NPTL non-optional
  linux-user: Enable NPTL for x86-64
  linux-user: Add i386 TLS setter
  linux-user: Clean up handling of clone() argument order
  linux-user: Add missing 'break' in i386 get_thread_area syscall
  linux-user: Enable NPTL for m68k
  linux-user: Enable NPTL for SPARC targets
  linux-user: Enable NPTL for OpenRISC
  linux-user: Move includes of target-specific headers to end of qemu.h
  configure: Enable threading for unicore32-linux-user
  configure: Enable threading on all ppc and mips linux-user targets
  configure: Don't say target_nptl="no" if there is no linux-user target
  ...

Conflicts:
	linux-user/main.c

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 15:56:06 -05:00
Laszlo Ersek 340d51df55 qga: escape cmdline args when registering win32 service (CVE-2013-2231)
Reported-by: Lev Veyde <lveyde@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-07-25 14:49:04 -05:00
Laszlo Ersek 108365fdb0 ga_install_service(): nest error paths more idiomatically
Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-07-25 14:49:04 -05:00
Laszlo Ersek febf1c49be qga/service-win32.c: diagnostic output should go to stderr
Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-07-25 14:49:04 -05:00
Paolo Bonzini d2f5ea9704 pc-testdev: add I/O port to test memory.c auto split/combine
The ports at 0xe8..0xeb have impl.min/max_access_size == 1, so
that memory accesses are split and combined by the memory core.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-29-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:28 -05:00
Paolo Bonzini e7342aa39b memory: check memory region endianness, not target's
When combining multiple accesses into a single value, we need to do so
in the device's desired endianness.  The target endianness does not have
any influence.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-28-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:28 -05:00
Paolo Bonzini 547e9201c5 memory: pass MemoryRegion to access_with_adjusted_size
The accessors all use a MemoryRegion opaque value.  Avoid going
uselessly through void*.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-27-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:28 -05:00
Paolo Bonzini e11ef3d184 memory: move functions around
Prepare for next patch, no semantic change.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-26-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:28 -05:00
Paolo Bonzini 8fefa31be9 qtest: add test for ISA I/O space endianness
This writes a register and reads its 1/2/4 byte parts.  Masking
is done in the device model.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-25-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:28 -05:00
Paolo Bonzini 9c9984242c default-configs/ppc64: add all components of i82378 SuperIO chip used by prep
The device provides an ISA bus so that pseries can also run the
endianness test.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-24-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:28 -05:00
Paolo Bonzini 85d3846a39 default-configs: add SuperIO to SH4
The device provides an ISA bus to run the endianness test on.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-23-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:28 -05:00
Paolo Bonzini be6d08be25 default-configs: add test device to all machines supporting ISA
This will let these machines run an endianness test for ISA
I/O port space.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-22-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:28 -05:00
Paolo Bonzini 2b8fbcd870 sparc64: unbreak
... by making apb a subclass of TYPE_PCI_HOST_BRIDGE.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-21-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:28 -05:00
Paolo Bonzini b23ea25f50 sh4: unbreak r2d
... by making sh_pci a subclass of TYPE_PCI_HOST_BRIDGE.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-20-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini b332d24a8e mips: degrade BIOS error to warning
No free MIPS BIOS is available, so it makes little sense to quit.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-19-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 504054357b pc-testdev: remove useless cpu_to_le64/le64_to_cpu
So far the device was only used on little-endian machines.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-18-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini b7faba7163 pc-testdev: support 8 and 16-bit accesses to 0xe0
This will let us use the testdev to test endianness.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-17-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini f36a6382b8 Revert "ioport: remove LITTLE_ENDIAN mark for portio"
This reverts commit c3cb8e7780.

The scenario where I/O ports are accessed with DEVICE_LITTLE_ENDIAN
endianness now works and will soon be unit tested.  Since the PortioList
indirection assumes little endian, define portio_ops the same way.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-16-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 61fcb62862 isa_mmio: delete
It is not used anymore.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-15-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 0a70e094cd ebus: do not use isa_mmio
This is untested, because ebus does not have a libqos module.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-14-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 5519ad0c24 sparc64: remove indirection for I/O port access
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-13-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini e37b80faa6 mips_fulong2e: do not use isa_mmio
This board is little-endian, but still isa_mmio should die. :)

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-12-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini bdb75c7987 mipssim: do not use isa_mmio
Untested, this board does not support PCI so it cannot run endianness-test.
It should fix endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-11-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 6850150217 ppc440_bamboo: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-10-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini ee77854fa5 mips_malta: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-9-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 3959496874 mips_r4k: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-8-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini f51100cc51 mips_jazz: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-7-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:26 -05:00
Paolo Bonzini 921f8040d3 prep: fix I/O port endianness
Do not swap endianness here, it will happen during cpu_{in,out}{b,w,l}.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-6-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:26 -05:00
Alexey Kardashevskiy 66aab867ce spapr_pci: remove indirection for I/O port access
This fixes endianness bugs in I/O port access.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-5-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:26 -05:00
Paolo Bonzini 2b1096e02d ppc_newworld: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-4-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:26 -05:00
Paolo Bonzini 7d52857ea5 ppc_oldworld: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-3-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:25 -05:00
Paolo Bonzini 4759ab6b2d sh4: do not use isa_mmio
This fixes endianness bugs in I/O port access (for sh4eb).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-2-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:25 -05:00
Gerd Hoffmann 41b8280a1c seabios: update to 1.7.3
Changes summary (git shortlog rel-1.7.2.2..rel-1.7.3):

Alex Williamson (4):
      seabios q35: Enable all PIRQn IRQs at startup
      seabios q35: Add new PCI slot to irq routing function
      seabios: Add a dummy PCI slot to irq mapping function
      pciinit: Enable default VGA device

Asias He (2):
      virtio-scsi: Set _DRIVER_OK flag before scsi target scanning
      virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd}

Avik Sil (1):
      USB-EHCI: Fix null pointer assignment

Christian Gmeiner (5):
      geodevga: fix errors in geode_fp_* functions
      geodevga: move framebuffer setup
      geodevga: move output setup to own function
      geodevga: add debug to msr functions
      geodevga: fix wrong define name

David Woodhouse (26):
      Add macros for pushing and popping struct bregs
      Clean up #if in pirtable.c. CONFIG_PIRTABLE can't be set if CONFIG_COREBOOT is
      post: Export functions which will be used individually by CSM
      Export callrom() for CSM to use
      Export copy_smbios() from biostables.c
      Import LegacyBios.h from OVMF
      Complete and checksum EFI_COMPATIBILITY16_TABLE at build time
      Add pic_save_mask() and pic_restore_mask() functions
      Add CSM support
      Add README.CSM
      Add find_pmtimer() function
      Enable PMTIMER for CSM build
      Fix rom_reserve()/rom_confirm() for CSM oprom dispatch
      Don't calibrate TSC if PMTIMER is already set up
      Move find_pmtimer() to ACPI table setup where it logically belongs
      Use find_pmtimer() after copying Xen ACPI tables
      Use find_pmtimer() after copying coreboot ACPI tables
      Unify return path for CSM to go via csm_return()
      Make CONFIG_OPTIONROMS_DEPLOYED depend on CONFIG_QEMU
      Implement !CONFIG_OPTIONROMS support for CSM
      Implement !CONFIG_BOOT for CSM
      Enable VGA output when settings bochs-specific mode
      Disable CONFIG_THREAD_OPTIONROMS for CSM build
      Fix return type of le64_to_cpu() and be64_to_cpu()
      Rename find_pmtimer() to find_acpi_features()
      Add acpi_reboot() reset method using RESET_REG

Gerd Hoffmann (3):
      config: allow DEBUG_IO for !QEMU
      coreboot: add qemu detection
      tweak coreboot qemu detection

Hu Tao (1):
      Add pvpanic device driver

Kevin O'Connor (99):
      pmm: Use 'struct segoff_s' in pmm header.
      Minor: Update README - variable changes are now reset on soft-reboots.
      Normalize POST initialization function name suffixes.
      POST: Reorganize post init functions for better grouping and reusability.
      Fix rebase error in commit 8a0a972f that broke LOWMEM variables.
      Support calling a function other than maininit() from reloc_preinit().
      Ensure exported symbols are visible in the final link
      POST: Move QEMU specific ramsize and BIOS table setup to paravirt.c.
      POST: Reorganize post entry and "preinit" functions.
      POST: Move cpu caching and dma setup to platform_hardware_setup().
      Undo incorrect assumptions about Xen in commit 6ca0460f.
      Determine century during init and store in VARLOW mem during runtime.
      No need to check both CONFIG_THREADS and CONFIG_THREAD_OPTIONROMS.
      Add runningOnQEMU() and runningOnXen() for runtime platform detection.
      Consistently use CONFIG_COREBOOT, CONFIG_QEMU, and runningOnXen().
      Convert kvm_para_available() to runningOnKVM().
      Minor - move definitions to paravirt.c from paravirt.h.
      Only perform SMP setup on QEMU.
      Start device_hardware_setup in mainint even with CONFIG_THREAD_OPTIONROMS.
      The mathcp setup touches the PIC and thus move to the "setup" phase.
      Update tools/acpi_extract.py to handle iasl 20130117 release.
      Support skipping content when reading from QEMU fw_cfg romfile entries.
      Convert fw_cfg ACPI entries into romfile entries.
      Convert fw_cfg SMBIOS entries into romfile entries.
      Convert basic integer fw_cfg entries into romfile entries.
      Convert fw_cfg NUMA entries into a romfile entry.
      Process fw_cfg e820 entries during the fw_cfg setup stage.
      Integrate qemu_cfg_preinit() into qemu_romfile_init().
      Group QEMU platform setup together and move to paravirt.c.
      vgabios: Bochs/QEMU vgabios support should depend on CONFIG_QEMU.
      Warn on unaligned PCI ROM structure in option roms.
      Fix Makefile - don't reference "out/" directly, instead use "$(OUT)".
      build: Don't require $(OUT) to be a sub-directory of the main directory.
      Rename rom_get_top() to rom_get_max().
      Report on f-segment UMB ram also.
      Clarify build generated "zone low" values.
      Verify CC is valid during build tests.
      Disable handle_post() on CSM builds.
      Remove unnecessary "export" declarations from assembler functions.
      Minor assembler enhancements to __csm_return.
      Introduce VARFSEG for variables that will reside in the f-segment.
      Convert VAR16VISIBLE, VAR16EXPORT, and VAR32VISIBLE to VARFSEG.
      Don't relocate "varlow" variable references at runtime.
      Move malloc's ZoneFSeg and ZoneLow setup to malloc_init.
      Calculate "RamSize" needed by 16bit interface dynamically.
      Eliminate separate BiosTableSpace[] space for f-segment allocations.
      Use CONFIG_ prefix for Kconfig variables; use BUILD_ for others.
      Try to detect an unsuccessful hard-reboot to prevent soft-reboot loops.
      Minor - fix confusing final_sec32low_start name in layoutrom.py.
      Minor - introduce numeric defines for the IVT offset of hw irqs.
      Separate out 16bit PCI-BIOS entry point from regular int 0x1a entry point.
      Support using the "extra stack" for all 16bit irq entry points.
      Minor - improve comments and grouping of handle_08().
      floppy: Introduce 'struct floppy_pio_s' for floppy PIO ops.
      floppy: Cleanup floppy irq wait handling.
      floppy: Clean up Check Interrupt Status code.
      floppy: Move recalibration and results parsing to floppy_cmd().
      floppy: Improve floppy_pio() error checking.
      floppy: Implement media format sensing.
      floppy: Actually do controller reset in floppy_reset().
      Minor - note that passing QEMU config via cmos is deprecated.
      Cache boot-fail-wait to avoid romfile access after POST.
      Rename src/ssdt-susp.dsl to src/ssdt-misc.dsl.
      acpi: Eliminate BDAT parameter passing to DSDT code.
      Add additional dependency checks to Makefile.
      Don't use __FILE__ in virtio-ring.c.
      shadow: Don't use PCIDevices list in make_bios_readonly().
      smm: Don't use PCIDevices list in smm_setup().
      Add VARVERIFY32INIT attribute for variables only available during "init".
      Use VARVERIFY32INIT on global variables that point to "tmp" memory.
      vgabios: Fix stdvga_perform_gray_scale_summing().
      vgabios: Fix cirrus memory clear on mode switch.
      Minor - add missing newline to floppy debug statement.
      Fix bug in NUMA node setup - don't create SRAT if NUMA not present.
      Update README - copy *.aml files for QEMU.
      Add dependencies to vgafixup.py and buildversion.sh scripts.
      Set ZF prior to keyboard read call in check_for_keystroke().
      mptable: Don't describe pci-to-pci bridges.
      mptable: Use same PCI irqs as ACPI code.
      Cleanup QEMU_CFG_NUMA fw_cfg processing - split into two romfile entries.
      Use container_of on romfile entries.
      acpi: Move ACPI table definitions from acpi.c to acpi.h.
      acpi: Remove dead code with descriptions of bit flags.
      acpi: Use cpu_to_leXX() consistently.
      Minor - explicitly close files in buildrom.py.
      Minor - move "tracked memory alloc" code in pmm.c.
      Introduce and convert pmm code to use standard list helpers.
      Minor - relocate code in stacks.c to keep low-level thread code together.
      Introduce helper function have_threads() in stacks.c.
      Convert stacks.c to use standard list manipulation code.
      Convert boot.c to use standard list manipulation code.
      Convert pciinit.c to use standard list manipulation code.
      Convert PCIDevices list to use standard list manipultion code.
      Revert "Convert pciinit.c to use standard list manipulation code."
      Fix error in hlist_for_each_entry_safe macro.
      Convert pciinit.c to use standard list manipulation code.
      make qemu_cfg_init depend on QEMU_HARDWARE instead of QEMU
      Another fix for hlist_for_each_entry_safe.
      Minor - remove debugging dprintf added to pciinit.c.

Laszlo Ersek (1):
      Enable VGA output when setting Cirrus-specific mode

Michael S. Tsirkin (1):
      acpi: make default DSDT optional

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-07-24 15:37:43 +02:00
Stefan Weil 0cd8eaa011 po/Makefile: Use macro quiet-command for nice looking messages
Suppress also the "... done" message from msgmerge.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-23 15:45:24 -05:00
Stefan Weil 1fa4492318 po/Makefile: Fix generation of messages.po
* Tell xgettext that we use UTF-8 encoding (this is currently optional).

* Set charset=UTF-8 in messages.po. This avoids warnings from msgmerge:
  warning: Charset "CHARSET" is not a portable encoding name.

* Use filename relative to root directory (ui/gtk.c instead of ../ui/gtk.c
  or $(SRC_PATH)/ui/gtk.c) for comments in *.po files.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-23 15:45:23 -05:00
Stefan Weil 00134a6203 po/Makefile: Fix *.mo generation for out-of-tree builds (regression)
Commit f84756554e added a wildcard search
for *.po files. This search found no files for out of tree builds, so
those builds no longer created and installed *.mo files.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-23 15:45:23 -05:00
Stefan Weil 18e12d49ed po/Makefile: Fix and improve help message
The help message contains single quotes which got lost in the output.
Fix also a typo and use two instead of three lines.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-23 15:45:23 -05:00
Anthony Liguori f03d07d468 Merge remote-tracking branch 'quintela/migration.next' into staging
# By Michael R. Hines (8) and others
# Via Juan Quintela
* quintela/migration.next:
  migration: add autoconvergence documentation
  Fix real mode guest segments dpl value in savevm
  Fix real mode guest migration
  rdma: account for the time spent in MIG_STATE_SETUP through QMP
  rdma: introduce MIG_STATE_NONE and change MIG_STATE_SETUP state transition
  rdma: allow state transitions between other states besides ACTIVE
  rdma: send pc.ram
  rdma: core logic
  rdma: introduce ram_handle_compressed()
  rdma: bugfix: ram_control_save_page()
  rdma: update documentation to reflect new unpin support

Message-id: 1374590725-14144-1-git-send-email-quintela@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-23 10:57:23 -05:00
Anthony Liguori 3988982c82 QOM CPUState refactorings
* Fix NULL pointer dereference in gdbstub
 * Introduce vaddr type
 * Introduce CPUClass::set_pc()
 * Introduce CPUClass::synchronize_from_tb()
 * Introduce CPUClass::get_phys_page_debug()
 * Introduce CPUClass::memory_rw_debug()
 * Move singlestep_enabled and gdb_regs fields out of CPU_COMMON
 * Adopt CPUState in more APIs
 * Propagate CPUState in gdbstub
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJR7dNJAAoJEPou0S0+fgE/R8IQAKByM7NGK9JCbMuuZgLzbtib
 J1t6cpdn6ghD/qTNUoC6TuCLB0XHlFenfHtLSC9uqMXZPX1i6UZIo2yRA69X2IEu
 NjUU6LdoduEYL0jBkZeBSvx1SgMVwiabR6kvQorpEzmJWXQdRav8aNCQuGEgvIcb
 sv8kA6Jwh0+S4HJm3gGMs/wBSSeVpP3SUB14RiZESIFQpOovP+i1Qs8qTtclYf4j
 P3qxwoUCJy0S9ayQ6bGJKTbVkY4oCgZHQzDJ09rRT3KM0SMto/cfmlks2zynbeak
 6RXa7iJ8UO4AyxcL37Va5QfVx+EKeu6TpMPxEEFqqgoxac9p4QPspvMmCv6XM4Ul
 TGldagWXHnyN9R5p/w6xMWoKizBE2AUPZh/N8CHI0zAvmaz0pfsiOotVEfs5lbi6
 B5At9lgikagLV43Usi090xOIa3sVL5N+lqxm8PB6UlWbdpFPSBU6Vgx9UBbQniAd
 eB0SP5BUaqM5pkoCHXprrOyCLs3rkEflS1/o1jd+LxH1czQXruns1bEKal/PW22m
 a4TmDQd4X0IvgcziJzo5TuwR4cqQWc5REr2M+EnyMsb0oT5bdCoDZc9oSz+uOW3I
 Qs5hMjs2mG1192heO6HF5YwFzv5RT2POXLtjM+eW72zN4uMrOiIsXU+neQUyWb20
 4+RywuU7mCFOX70UisL9
 =AkgR
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging

QOM CPUState refactorings

* Fix NULL pointer dereference in gdbstub
* Introduce vaddr type
* Introduce CPUClass::set_pc()
* Introduce CPUClass::synchronize_from_tb()
* Introduce CPUClass::get_phys_page_debug()
* Introduce CPUClass::memory_rw_debug()
* Move singlestep_enabled and gdb_regs fields out of CPU_COMMON
* Adopt CPUState in more APIs
* Propagate CPUState in gdbstub

# gpg: Signature made Mon 22 Jul 2013 07:50:17 PM CDT using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found

# By Andreas Färber (21) and others
# Via Andreas Färber
* afaerber/tags/qom-cpu-for-anthony: (24 commits)
  linux-user: Use X86CPU property to retrieve CPUID family
  gdbstub: Change gdb_register_coprocessor() argument to CPUState
  cpu: Move gdb_regs field from CPU_COMMON to CPUState
  gdbstub: Change GDBState::{c,g}_cpu and find_cpu() to CPUState
  cpu: Introduce CPUClass::memory_rw_debug() for target_memory_rw_debug()
  exec: Change cpu_memory_rw_debug() argument to CPUState
  cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook
  gdbstub: Change gdb_{read,write}_register() argument to CPUState
  gdbstub: Change gdb_handlesig() argument to CPUState
  gdbstub: Change syscall callback argument to CPUState
  kvm: Change kvm_{insert,remove}_breakpoint() argument to CPUState
  cpu: Change cpu_single_step() argument to CPUState
  gdbstub: Update gdb_handlesig() and gdb_signalled() Coding Style
  cpu: Move singlestep_enabled field from CPU_COMMON to CPUState
  target-alpha: Copy implver to DisasContext
  target-alpha: Copy singlestep_enabled to DisasContext
  cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()
  target-unicore32: Implement CPUClass::set_pc()
  target-moxie: Implement CPUClass::set_pc()
  target-m68k: Implement CPUClass::set_pc()
  ...
2013-07-23 10:57:04 -05:00
Anthony Liguori 931f0adf64 QOM device refactorings
* Avoid TYPE_* in VMStateDescription name
 * Replace some DO_UPCAST()s and FROM_SYSBUS()s with QOM casts
 * Limit legacy SCSI command line handling to non-hotplugged devices
 * Replace some SysBusDeviceClass::init with DeviceClass::realize
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJR7cDeAAoJEPou0S0+fgE/BUAP/2t5wHCy94Iq6AktO0I/83Jd
 jxflabk7I54UdN37D0jYEUrcp3NYfYY4IUdYOfgF+XWsvcrTTdLlEE1eMVR9nSqQ
 q+MNGjHX4oLxwua2wG1OpUc2/TnKuYu2ZzgNeZec3C57N0iEABSiCYlLOPIl7QVO
 WdPa7EnFTP7Ds/HlwSytatm799deVNrIEl4KTnNzV/rGMkHYI9vK/O9bCVltAiqM
 TWgWcQUVmx5a1GCjs3tL+L4L6qgFQHX8qu+qTNF/5Prm8wPGCsdFkhLWL2xvZiDN
 tCjgfcSF91+e/0VTlraFXX/OyZptGuLi3HTKDHbHsGwycEBJkK7DhVoX4jYZa+JR
 zErl6Aa79EEqTKJK8Oeugv8FnWshrjO2rtxy2gFsUnIBrst0G/kNDGjP63btAHGV
 A9zzfX2/GKWOF199gmBhF0YyShJagEKacvWHpE4U50NQnCd+Ka8tLedNjur8jJos
 t5x9ojB9D2GXb9OiWDW4SuuyVOsNTLhm8wudIudoejvEhG+lNY7LHHQbPnEAfYny
 eXNZREM7GFPj8dSNjqn/WzfO6lp7pV+Cb9zOhk77CekqtOdArr4uMd6+JlWKm7iU
 LrNW518wpgU6Q5INPIWtV6+8Fm73xaCSLLq7guG3W831TFbu1qqaWxuyksGWHOLf
 nPM8UcJAJq6EUQKIro4c
 =PXnV
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into staging

QOM device refactorings

* Avoid TYPE_* in VMStateDescription name
* Replace some DO_UPCAST()s and FROM_SYSBUS()s with QOM casts
* Limit legacy SCSI command line handling to non-hotplugged devices
* Replace some SysBusDeviceClass::init with DeviceClass::realize

# gpg: Signature made Mon 22 Jul 2013 06:31:42 PM CDT using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found

# By Hu Tao (26) and others
# Via Andreas Färber
* afaerber/tags/qom-devices-for-anthony: (55 commits)
  isa-bus: Drop isabus_bridge_init() since it does nothing
  ioapic: Use QOM realize for ioapic
  kvmvapic: Use QOM realize
  kvm/clock: Use QOM realize for kvmclock
  hpet: Use QOM realize for hpet
  scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline()
  megasas: Legacy command line handling fix
  scsi/esp: Use QOM realize for scsi esp
  fw_cfg: Use QOM realize for fw_cfg
  ahci: Use QOM realize for ahci
  pflash_cfi02: Use QOM realize for pflash_cfi02
  pflash_cfi01: Use QOM realize for pflash_cfi01
  fdc: Improve error propagation for QOM realize
  fdc: Use QOM realize for fdc
  kvm/clock: QOM'ify some more
  hpet: QOM'ify some more
  scsi/esp: QOM'ify some more
  fwcfg: QOM'ify some more
  ahci: QOM'ify some more
  pflash-cfi02: QOM'ify some more
  ...
2013-07-23 10:56:55 -05:00
Kwok Cheung Yeung a033381758 linux-user: Handle compressed ISA encodings when processing MIPS exceptions
Decode trap instructions during the handling of an EXCP_BREAK or EXCP_TRAP
according to the current ISA mode.

Signed-off-by: Kwok Cheung Yeung <kcy@codesourcery.com>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-23 17:31:25 +03:00
Alexander Graf d02532f08e linux-user: Unlock mmap_lock when resuming guest from page_unprotect
The page_unprotect() function is running everything locked. Before every
potential exit path of the function mmap_unlock() gets called to make sure
we don't leak the lock.

However, the function calls tb_invalidate_phys_page() which again can
exit a signal through longjmp, leaving our mmap_unlock() attempts in vain.

Add a hint to tb_invalidate_phys_page() that we need to unlock before we
can leave back into guest context, so that we don't leak the lock.

This fixes 16-bit i386 wine programs running in linux-user for me.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-23 17:28:28 +03:00
Alexander Graf b24c882b94 linux-user: Reset copied CPUs in cpu_copy() always
When a new thread gets created, we need to reset non arch specific state to
get the new CPU into clean state.

However this reset should happen before the arch specific CPU contents get
copied over. Otherwise we end up having clean reset state in our newly created
thread.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-23 17:28:28 +03:00
Alexander Graf ddaa7e5a2a linux-user: Fix epoll on ARM hosts
The epoll emulation uses data structures without packing them, so the
compiler might choose to add padding inside.

This patch makes the most offending one (target_epoll_event) a packed
structure to make sure we don't pad it by accident. ARM would pad it,
so declare the padding mandatory for ARM targets.

This fixes i386-on-ARM epoll emulation for me.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-23 17:28:28 +03:00
Alexander Graf 732f9e89a1 linux-user: fix segmentation fault passing with h2g(x) != x
When forwarding a segmentation fault into the guest process, we were passing
the host's address directly into the guest process's signal descriptor.

That obviously confused the guest process, since it didn't know what to make
of the (usually 32-bit truncated) address. Passing in h2g(address) makes the
guest process a lot happier.

To make the code more obvious, introduce a h2g_nocheck() macro that does the
same as h2g(), but allows us to convert addresses that may be outside of guest
mapped range into the guest's view of address space.

This fixes java running in arm-linux-user for me.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-23 17:28:28 +03:00
Peter Maydell 82f05b69e6 linux-user: Fix pipe syscall return for SPARC
SPARC is one of the CPUs which has a funny syscall ABI for the
pipe syscall; add it to the set of special cases in do_pipe().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-23 17:28:28 +03:00
Peter Maydell c7819dfbd2 linux-user: Fix target_stat and target_stat64 for OpenRISC
OpenRISC uses the asm-generic versions of target_stat and
target_stat64, but it was incorrectly using the x86/ARM/etc version
due to a misplaced defined(TARGET_OPENRISC).  The previously unused
OpenRISC section of the ifdef ladder also defined an incorrect
target_stat and omitted the target_stat64 definition.  Fix
target_stat, provide target_stat64, and add a comment noting that
these are the asm-generic versions for the benefit of future ports.

Reviewed-by: Jia Liu <proljc@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-23 17:28:28 +03:00
Juan Quintela 9781c3716a migration: add autoconvergence documentation
This hunk got lost during merge.  It is documentation.

Spotted-by: Peter Lieven <lieven-lists@dlhnet.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2013-07-23 15:21:09 +02:00