• The current codebase ignores MTRR (Memory Type Range Register)
    configuration writes and reads because Qemu does not implement caching.
    All BIOS/firmware in know of for x86 do implement a mode called
    Cache-as-RAM (CAR) which locks down the CPU cache lines and uses the CPU
    cache like RAM before RAM is enabled. Qemu assumes RAM is accessible
    from the start, but it would be nice to be able to run real
    BIOS/firmware in Qemu. For that, we need CAR support and for CAR support
    we have to support MTRRs.
    
    This patch is a first step in that direction. MTRRs are MSRs supported
    by all recent x86 CPUs, even old i586. Besides influencing cache, the
    MTRRs can be written and read back, so discarding MTRR writes violates
    the expectations of existing code out there.
    
    An added benefit of this patch is that it fixes the following Linux
    kernel error message present in recent kernels (provided the BIOS has
    the recent MTRR patches applied):
     ------------[ cut here ]------------
    WARNING: at arch/x86/kernel/cpu/mtrr/main.c:1500 mtrr_trim_uncached_memory+0x382/0x384()
    WARNING: strange, CPU MTRRs all blank?
    Modules linked in:
    Supported: Yes
    Pid: 0, comm: swapper Not tainted 2.6.27.7-9-default #1
     [<c0106570>] dump_trace+0x6b/0x249
     [<c01070a5>] show_trace+0x20/0x39
     [<c0343c02>] dump_stack+0x71/0x76
     [<c012acb2>] warn_slowpath+0x6f/0x90
     [<c0542f8f>] mtrr_trim_uncached_memory+0x382/0x384
     [<c053f24d>] setup_arch+0x40d/0x639
     [<c053a6ac>] start_kernel+0x6b/0x31f
     =======================
     ---[ end trace 4eaa2a86a8e2da22 ]---
    
    Handle common x86 MTRR reads and writes, but don't act on them.
    
    Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6449 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Dir »
  • Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6448 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse File »
  • Derived from Stuart Brady's patch: Show the target directory as prefix
    to the current module when building in quiet mode. This helps to gain
    overview of the current build progress, specifically when running
    parallelized builds.
    
    Furthermore, suppress make command echoing when entering subdirs and
    replace $(subst subdir-,,$@) with $* in the related rule.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6447 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse File »
  • This fixes the warning:
    
    /scratch/froydnj/qemu.git/hw/vga.c:1515: warning: redundant redeclaration of 'rgb_to_pixel_dup_table'
    /scratch/froydnj/qemu.git/hw/vga.c:1248: warning: previous declaration of 'rgb_to_pixel_dup_table' was here
    
    Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6446 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Dir »
  • Should solve 100% cpu ioport poll after reboot.
    
    Signed-off-by: Dor Laor <dor@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6445 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • If link is down, pretend that the packet has been successfully sent.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6444 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Mac OS X 10.5 supports 64-bit userspace on an x86_64 kernel and
    by default uses 32-bit userspace applications, so the detection for
    the host architecture fails.
    
    This patch enabled building of x86_64 code on x86_64 capable CPUS
    with Mac OS X.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6443 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • This patch defines PCI vendor and device IDs in pci.h (matching those
    from Linux's pci_ids.h), and uses those definitions where appropriate.
    
    Change from v1:
      Introduces pci_config_set_vendor_id() / pci_config_set_device_id()
      accessors as suggested by Anthony Liguori.
    
    Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6442 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Dir »
  • this patch fixes a bug and improves the generic pixel conversion
    function in vnc.c.
    The bug is that when a new vnc client connects we need to reset the flag
    has_WMVi but currently we don't.
    The generic pixel conversion function is vnc_convert_pixel and currently
    is not very efficient since uses the division and multiplication
    operators.
    To make it more efficient I changed to use bit shift operators instead.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6441 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • A subsystem vendor ID of zero isn't allowed, so we use our
    default ID.
    
    Gerd points out that although the PCI subsystem vendor ID is
    treated by the guest as the virtio vendor ID:
    
       /* we use the subsystem vendor/device id as the virtio vendor/device
        * id.  this allows us to use the same PCI vendor/device id for all
        * virtio devices and to identify the particular virtio driver by
        * the subsytem ids */
        vp_dev->vdev.id.vendor = pci_dev->subsystem_vendor;
        vp_dev->vdev.id.device = pci_dev->subsystem_device;
    
    it looks like only the device ID is used right now:
    
       # grep virtio modules.alias
       alias virtio:d00000001v* virtio_net
       alias virtio:d00000002v* virtio_blk
       alias virtio:d00000003v* virtio_console
       alias virtio:d00000004v* virtio-rng
       alias virtio:d00000005v* virtio_balloon
       alias pci:v00001AF4d*sv*sd*bc*sc*i* virtio_pci
       alias virtio:d00000009v* 9pnet_virtio
    
    so setting the subsystem vendor id to something != zero shouldn't cause
    trouble.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6440 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Also use the existing macro for the PCI vendor ID
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6439 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Gerd added these macros a while back.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6438 c046a42c-6fe2-441c-8c8c-71466251a162
    aliguori authored
     
    Browse Code »
  • Linux changed its physical address location in the elf header from
    0xc0000000 to 0 on 2.6.25, causing later kernels to fail booting
    with the -kernel option.
    
    This patch assures that the lowest segment in the elf binary is loaded
    to KERNEL_LOAD_ADDR, which is where the firmware expects it.
    
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
    
    git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6437 c046a42c-6fe2-441c-8c8c-71466251a162
    aurel32 authored
     
    Browse Code »