sim-card
/
qemu
Archived
10
0
Fork 0
Commit Graph

650 Commits

Author SHA1 Message Date
Stefan Hajnoczi 94a420b170 trace: Add trace-events file for declaring trace events
This patch introduces the trace-events file where trace events can be
declared like so:

qemu_malloc(size_t size) "size %zu"
qemu_free(void *ptr) "ptr %p"

These trace event declarations are processed by a new tool called
tracetool to generate code for the trace events.  Trace event
declarations are independent of the backend tracing system (LTTng User
Space Tracing, ftrace markers, DTrace).

The default "nop" backend generates empty trace event functions.
Therefore trace events are disabled by default.

The trace-events file serves two purposes:

1. Adding trace events is easy.  It is not necessary to understand the
   details of a backend tracing system.  The trace-events file is a
   single location where trace events can be declared without code
   duplication.

2. QEMU is not tightly coupled to one particular backend tracing system.
   In order to support tracing across QEMU host platforms and to
   anticipate new backend tracing systems that are currently maturing,
   it is important to be flexible and not tied to one system.

This commit includes fixes from Prerna Saxena
<prerna@linux.vnet.ibm.com> and Blue Swirl <blauwirbel@gmail.com>.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09 16:22:44 -05:00
Hollis Blanchard 52ba784d35 Fix "make install" with a cross toolchain
We must be able to use a non-native strip executable, but not all
versions of 'install' support the --strip-program option (e.g.
OpenBSD). Accordingly, we can't use 'install -s', and we must run strip
separately.

Signed-off-by: Hollis Blanchard <hollis@penguinppc.org>
Cc: blauwirbel@gmail.com
2010-08-26 18:18:26 +02:00
Cam Macdonell 3dcbf8f9ca Disable build of ivshmem on non-KVM systems
Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-08-15 09:44:53 +00:00
Cam Macdonell 6cbf4c8c64 RESEND: Inter-VM shared memory PCI device
resend for bug fix related to removal of irqfd

Support an inter-vm shared memory device that maps a shared-memory object as a
PCI device in the guest.  This patch also supports interrupts between guest by
communicating over a unix domain socket.  This patch applies to the qemu-kvm
repository.

    -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>]

Interrupts are supported between multiple VMs by using a shared memory server
by using a chardev socket.

    -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>]
           [,chardev=<id>][,msi=on][,ioeventfd=on][,vectors=n][,role=peer|master]
    -chardev socket,path=<path>,id=<id>

The shared memory server, sample programs and init scripts are in a git repo here:

    www.gitorious.org/nahanni

Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-08-10 16:25:16 -05:00
Corentin Chary efe556adb7 vnc: tight add PNG encoding
Introduce a new encoding: VNC_ENCODING_TIGHT_PNG [1] (-269) with a new
tight filter VNC_TIGHT_PNG (0x0A). When the client tells it supports the Tight PNG
encoding, the server will use tight, but will always send encoding pixels using
PNG instead of zlib. If the client also told it support JPEG, then the server can
send JPEG, because PNG will only be used in the cases zlib was used in normal tight.

This encoding was introduced to speed up HTML5 based VNC clients like noVNC [2], but
can also be used on devices like iPhone where PNG can be rendered in hardware.

[1] http://wiki.qemu.org/VNC_Tight_PNG
[2] http://github.com/kanaka/noVNC/

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26 17:36:14 -05:00
Corentin Chary 2f6f5c7a00 vnc: tight: add JPEG and gradient subencoding with smooth image detection
Add gradient filter and JPEG compression with an heuristic to detect how
lossy the comppression will be. This code has been adapted from
libvncserver/tight.c.

JPEG support can be enabled/disabled at compile time with --enable-vnc-jpeg
and --disable-vnc-jpeg.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-07-26 17:23:53 -05:00
Alexander Graf 1ddda5cd36 AppleSMC device emulation
Intel Macs have a chip called the "AppleSMC" which they use to control
certain Apple specific parts of the hardware, like the keyboard background
light.

That chip is also used to store a key that Mac OS X uses to decrypt binaries.

This patch adds emulation for that chip, so we're getting one step further
to having Mac OS X run natively on Qemu.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-11 20:33:10 +03:00
Blue Swirl 08af49da7e piix4: compile only once
Compile piix4 in hwlib. Two compilations less for the full build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-03 06:49:47 +00:00
cmchao 02d7434111 hw/omap1.c : separate uart module
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:37 +02:00
cmchao 2c1d9ecb22 hw/omwp2.c : separate l4 interconnect module
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:37 +02:00
cmchao cc9577cfb7 hw/omap2.c : separate tap module(Test-Chip-level)
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:37 +02:00
cmchao 2d08cc7c3f hw/omap2.c : separate spi module
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:37 +02:00
cmchao 7f132a21fc hw/omap1.c : separate interrupt controller module
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:37 +02:00
cmchao 0bf4301600 hw/omap2.c : separate sdrc (sdram controller)
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:36 +02:00
cmchao f3354b0e5d hw/omap2.c : separate gpmc(general purpose memory controller)
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:36 +02:00
cmchao 011d87d033 hw/omap2.c : separate synctimer module
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:36 +02:00
cmchao c58d37cfdc hw/omap2.c : separate gptimer module
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:36 +02:00
cmchao e5c6b25a14 hw/omap1.c : separate gpio module
Signed-off-by: cmchao <cmchao@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-30 20:41:35 +02:00
Huacai Chen 051c190bce MIPS: Initial support of fulong mini pc (machine construction)
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:52 +02:00
Huacai Chen edf79e66c0 Initial support of vt82686b south bridge used by fulong mini pc
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:51 +02:00
Huacai Chen d0f7453d13 MIPS: Initial support of bonito north bridge used by fulong mini pc
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-29 23:07:51 +02:00
Venkateswararao Jujjuri (JV) 758e8e38eb virtio-9p: Make infrastructure for the new security model.
This patch adds required infrastructure for the new security model.

- A new configure option for attr/xattr.
- if CONFIG_VIRTFS will be defined if both CONFIG_LINUX and CONFIG_ATTR defined.
- Defines routines related to both security models.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-22 15:15:50 -05:00
Edgar E. Iglesias 77d4f95e11 cris: Break out image loading to hw/cris-boot.c.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
2010-06-10 14:45:46 +02:00
Richard Henderson 680c877af4 linux-user: Use qemu-malloc.c.
Since we're no longer setting PAGE_RESERVED, there's no need to
implement qemu_malloc via mmap.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28 23:27:19 +02:00
Blue Swirl 4556bd8b25 Compile dma only once
Use a qemu_irq to request CPU exit.

7 compilations less for the full build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 08:00:52 +00:00
Blue Swirl 956a3e6bb7 Compile pckbd only once
Use a qemu_irq to indicate A20 line changes. Move I/O port 92
to pckbd.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22 07:59:01 +00:00
Blue Swirl c69ea0dff2 Compile acpi_piix4, apm and pm_smbus only once
12 compilations less for the full build.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-17 19:32:37 +00:00
Isaku Yamahata 845773ab03 pc: split out piix specific part from pc.c into pc_piix.c
Finally, we can safely split out the piix specific part from pc.c
into pc_piix.c.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15 15:53:25 +00:00
Isaku Yamahata 93d89f63e5 acpi: split acpi.c into the common part and the piix4 part.
Split acpi.c into the common part and the piix4 specific part.
The common part will be used later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15 15:30:49 +00:00
Isaku Yamahata 04762841d8 acpi: split out apm register emulation from acpi.c
Split out apm register emulation for acpi.c into apm.c.
The apm emulation will be used later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15 15:27:19 +00:00
Isaku Yamahata fc0bdd995c acpi: split out piix4 smbus routines from acpi.c into pm_smbus.c
Split out piix4 smbus routines from acpi.c into pm_smbus.c and
use it.
The split out smbus emulation will be used later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-15 15:25:31 +00:00
Blue Swirl d08555c17a Compile virtio-9p-debug and virtio-9p-local once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-14 19:31:53 +00:00
Jan Kiszka 0e1a275bd4 Add KVM CFLAGS to vhost build
The configure test of vhost uses KVM CFLAGS, so the build must use them
as well. Otherwise we specifically miss what --kerneldir provides.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-03 12:39:12 -05:00
Anthony Liguori 9f10751365 virtio-9p: Add a virtio 9p device to qemu
This patch doesn't implement the 9p protocol handling
code. It adds a simple device which dump the protocol data.

[jvrao@linux.vnet.ibm.com: Little-Endian to host format conversion]
[aneesh.kumar@linux.vnet.ibm.com: Multiple-mounts support]

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-03 12:17:37 -05:00
Richard Henderson 6495a04457 linux-user: Remove ELFLOAD32.
The ABI-specific types used by linux_binprm and image_info
are different after forcing TARGET_ABI32 on.  Which means
that the parameters that load_elf_binary_multi sees are not
those that loader_exec passed.  This is inherently broken
and is more trouble than it's worth fixing.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-25 12:59:30 +00:00
Blue Swirl d3538b45ea Compile event_notifier only once
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-19 19:47:49 +00:00
Blue Swirl 04c9a0cbc2 Compile vl.c once
Since kvm.h can be used in files compiled once,
we can partially revert
b33612d035.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-19 19:46:13 +00:00
Paolo Bonzini 98c8573eb3 provide a stub version of kvm-all.c if !CONFIG_KVM
This allows limited use of kvm functions (which will return ENOSYS)
even in once-compiled modules.  The patch also improves a bit the error
messages for KVM initialization.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[blauwirbel@gmail.com: fixed Win32 build]
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-19 18:59:30 +00:00
Paolo Bonzini 28c2897373 move balloon handling to balloon.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-09 18:55:56 +02:00
Alexander Graf e9d0fc7463 Make virtio-pci building conditional again
Commit b305b9d7d6 made building of virtio-pci
conditional and not enabled on S390x, because it collides with the S390 bus.

Commit 087431d1d1 accidentially reverted that
behavior, breaking S390x again.

So here's a follow-up patch disabling building of virtio-pci on S390x again.

This unbreaks the S390x target.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-04-08 21:49:15 +02:00
Paul Brook a67ba3b6f8 Revert "Compile usb-ohci only once"
This reverts commit f1698408f1.

PCI is always little-endian. Having a user-visible "be" property is just
plain wrong.
2010-04-04 21:18:26 +01:00
Blue Swirl 240566908f sparc32: rename iommu.c to sun4m_iommu.c to make room for other IOMMUs
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-04-03 07:35:50 +00:00
Michael S. Tsirkin d59700553e vhost: vhost net support
This adds vhost net device support in qemu. Will be tied to tap device
and virtio by following patches.  Raw backend is currently missing,
will be worked on/submitted separately.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-01 13:56:43 -05:00
Michael S. Tsirkin 2292b33986 notifier: event notifier implementation
event notifiers are slightly generalized eventfd descriptors. Current
implementation depends on eventfd because vhost is the only user, and
vhost depends on eventfd anyway, but a stub is provided for non-eventfd
case.

We'll be able to further generalize this when another user comes along
and we see how to best do this.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-01 13:56:43 -05:00
Anthony Liguori 087431d1d1 virtio-pci: compile per-target
With vhost, virtio-pci needs to include kvm.h and kvm.h needs to be built
per-target.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-01 13:56:19 -05:00
Anthony Liguori b33612d035 Fix -enable-kvm
Make vl.o compiled per target and fix a thinko in hw/acpi.c.  It's not trivial
to make kvm.h consumable by compiled-once files.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-04-01 09:58:48 -05:00
Blue Swirl 2b5eb37123 Compile most PPC devices only once
Make byte swapping unconditional since PPC is big endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-30 17:36:23 +00:00
Blue Swirl add85a76bb Compile prep_pci only once
Make byte swapping unconditional since PPC is big endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:24:04 +00:00
Blue Swirl 29e922b61f Compile qemu-timer only once
Arrange various declarations so that also non-CPU code can access
them, adjust users.

Move CPU specific code to cpus.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:24:00 +00:00
Blue Swirl 5c4532ee78 Compile openpic only once
Replace TARGET_PAGE_SIZE with 4096. Make byte swapping unconditional
since PPC is big endian.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-03-29 19:23:59 +00:00