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

15116 Commits

Author SHA1 Message Date
Anthony Liguori d6034a3a61 Merge remote-tracking branch 'qemu-kvm/uq/master' into staging 2011-06-22 07:13:10 -05:00
Anthony Liguori fdba9594df Merge remote-tracking branch 'mst/for_anthony' into staging
Conflicts:
	hw/usb-uhci.c
2011-06-22 07:11:09 -05:00
Anthony Liguori 7ee28fd303 Merge remote-tracking branch 'agraf/xen-next' into staging 2011-06-22 07:07:55 -05:00
Marcelo Tosatti ca98557ad2 kvm: fix FPU state subsection
There is no need to specify version on the subsection fields.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-21 13:53:18 -03:00
Andre Przywara 31e8c69697 KVM: Fix XSAVE feature bit enumeration
When iterating through the XSAVE feature enumeration CPUID leaf (0xD)
we should not stop at the first zero EAX, but instead keep scanning
since there are gaps in the enumeration (ECX=1 for instance).
This fixes the proper usage of AVX in KVM guests.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:26:21 -03:00
Jan Kiszka 3d39c95933 Remove unneeded kvm.h from cpu-exec.c
This was obsoleted by 6792a57bf1.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:24:14 -03:00
Jan Kiszka ba9bc59e1f kvm: x86: Pass KVMState to kvm_arch_get_supported_cpuid
kvm_arch_get_supported_cpuid checks for global cpuid restrictions, it
does not require any CPUState reference. Changing its interface allows
to call it before any VCPU is initialized.

CC: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:24:00 -03:00
Jan Kiszka 4bef75b533 kvm: Clean up stubs
No one references kvm_check_extension, kvm_has_vcpu_events, and
kvm_has_robust_singlestep outside KVM code.

kvm_update_guest_debug is never called, thus has no job besides
returning an error.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:21:09 -03:00
Jan Kiszka 3d0388f76f kvm: ppc: Drop KVM_CAP build dependencies
No longer needed with accompanied kernel headers.

CC: Alexander Graf <agraf@suse.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:20:50 -03:00
Jan Kiszka e56ff191b6 kvm: x86: Drop KVM_CAP build dependencies
No longer needed with accompanied kernel headers.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:19:54 -03:00
Jan Kiszka ba4047cf84 kvm: Drop KVM_CAP build dependencies
No longer needed with accompanied kernel headers. We are only left with
build dependencies that are controlled by kvm arch headers.

CC: Alexander Graf <agraf@suse.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:18:43 -03:00
Jan Kiszka 1480b74f9a kvm: Drop useless zero-initializations
Backing KVMState is alreay zero-initialized.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:17:55 -03:00
Jan Kiszka 0bed3bba7d kvm: ppc: Drop CONFIG_KVM_PPC_PVR
Required header support is now unconditionally available.

CC: Alexander Graf <agraf@suse.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:17:33 -03:00
Jan Kiszka 5802e066eb kvm: Drop CONFIG_KVM_PARA
The kvm_para.h header is now always available.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:16:45 -03:00
Jan Kiszka e205c7902f Switch build system to accompanied kernel headers
This helps reducing our build-time checks for feature support in the
available Linux kernel headers. And it helps users that do not have
sufficiently recent headers installed on their build machine.

Consequently, the patch removes and build-time checks for kvm and vhost
in configure, the --kerneldir switch, and KVM_CFLAGS. Kernel headers are
supposed to be provided by QEMU only.

s390 needs some extra love as it carries redefinitions from kernel
headers.

CC: Alexander Graf <agraf@suse.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:16:12 -03:00
Jan Kiszka 51b24e34d4 Import kernel headers
These kernel headers and the COPYING file were automatically imported
from current Linux git, cb0a02ecf9 (post 3.0-rc2).

Licensing:
asm-powerpc	GPLv2
asm-s390	GPLv2
asm-x86		Linux top-level license (GPLv2 with exception)
linux/kvm*:	Linux top-level license (GPLv2 with exception)
linux/vhost:	Linux top-level license (GPLv2 with exception)
linux/virtio*:	3-clause BSB

CC: Alexander Graf <agraf@suse.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:13:34 -03:00
Jan Kiszka 87fdd47668 Add kernel header update script
This helper pulls the required kernel headers for KVM and vhost into a
specified directory. The update is triggered via

    scripts/update-linux-headers.sh LINUX_PATH

and will place the output under linux-headers/linux and linux-headers/asm-*.
It also imports the COPYING to care for headers without an explicit license.

CC: Alexander Graf <agraf@suse.de>
CC: Christoph Hellwig <hch@lst.de>
CC: Peter Maydell <peter.maydell@linaro.org>
CC: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-06-20 15:12:22 -03:00
Frediano Ziglio bcd2491a48 cmd: fix operator precedence
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-06-20 17:08:57 +01:00
Alexandre Raymond 77bec68668 Fix typo in cpus.c
filed -> failed

Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-06-20 16:42:35 +01:00
Christophe Fergeau bf79d49982 lsi: Fix unused-but-set-variable warning
This warning is new in gcc 4.6.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-06-20 16:42:35 +01:00
Jan Kiszka 42cc8fa620 kvm: x86: Save/restore FPU OP, IP and DP
These FPU states are properly maintained by KVM but not yet by TCG. So
far we unconditionally set them to 0 in the guest which may cause
state corruptions, though not with modern guests.

To avoid breaking backward migration, use a conditional subsection that
is only written if any of the three fields is non-zero. The guest's
FNINIT clears them frequently, and cleared IA32_MISC_ENABLE MSR[2]
reduces the probability of non-zero values further so that this
subsection is not expected to restrict migration in any common scenario.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-06-19 15:57:56 +03:00
Steven Smith 01195b7347 xen: Add the Xen platform pci device
Introduce a new emulated PCI device, specific to fully virtualized Xen
guests.  The device is necessary for PV on HVM drivers to work.

Signed-off-by: Steven Smith <ssmith@xensource.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-19 04:43:04 +02:00
Stefano Stabellini bf09551a6b xen: fix interrupt routing
Compared to the last version I only added a comment to the code.

- remove i440FX-xen and i440fx_write_config_xen
we don't need to intercept pci config writes to i440FX anymore;

- introduce PIIX3-xen and piix3_write_config_xen
we do need to intercept pci config write to the PCI-ISA bridge to update
the PCI link routing;

- set the number of PIIX3-xen interrupts line to 128;

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-19 04:42:57 +02:00
Stefano Stabellini ebed85058b xen: only track the linear framebuffer
Xen can only do dirty bit tracking for one memory region, so we should
explicitly avoid trying to track anything but the vga vram region.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-19 04:42:41 +02:00
Stefano Stabellini 45dcd36e1e cirrus_vga: reset lfb_addr after a pci config write if the BAR is unmapped
If the cirrus_vga PCI BAR is unmapped than we should not only reset
map_addr but also lfb_addr, otherwise we'll keep trying to map
the old lfb_addr in map_linear_vram.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-19 04:40:05 +02:00
Stefano Stabellini 712c2b4149 xen: mapcache performance improvements
Use qemu_invalidate_entry in cpu_physical_memory_unmap.

Do not lock mapcache entries in qemu_get_ram_ptr if the address falls in
the ramblock with offset == 0. We don't need to do that because the
callers of qemu_get_ram_ptr either try to map an entire block, other
from the main ramblock, or until the end of a page to implement a single
read or write in the main ramblock.
If we don't lock mapcache entries in qemu_get_ram_ptr we don't need to
call qemu_invalidate_entry in qemu_put_ram_ptr anymore because we can
leave with few long lived block mappings requested by devices.

Also move the call to qemu_ram_addr_from_mapcache at the beginning of
qemu_ram_addr_from_host.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-19 04:40:05 +02:00
Stefano Stabellini 38bee5dc94 exec.c: refactor cpu_physical_memory_map
Introduce qemu_ram_ptr_length that takes an address and a size as
parameters rather than just an address.

Refactor cpu_physical_memory_map so that we call qemu_ram_ptr_length only
once rather than calling qemu_get_ram_ptr one time per page.
This is not only more efficient but also tries to simplify the logic of
the function.
Currently we are relying on the fact that all the pages are mapped
contiguously in qemu's address space: we have a check to make sure that
the virtual address returned by qemu_get_ram_ptr from the second call on
is consecutive. Now we are making this more explicit replacing all the
calls to qemu_get_ram_ptr with a single call to qemu_ram_ptr_length
passing a size argument.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: agraf@suse.de
CC: anthony@codemonkey.ws
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-19 04:40:05 +02:00
Stefano Stabellini 6506e4f995 xen: remove xen_map_block and xen_unmap_block
Replace xen_map_block with qemu_map_cache with the appropriate locking
and size parameters.
Replace xen_unmap_block with qemu_invalidate_entry.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-19 04:40:05 +02:00
Stefano Stabellini cd306087e5 xen: remove qemu_map_cache_unlock
There is no need for qemu_map_cache_unlock, just use
qemu_invalidate_entry instead.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-19 04:40:04 +02:00
Stefano Stabellini c13390cd38 xen: fix qemu_map_cache with size != MCACHE_BUCKET_SIZE
Fix the implementation of qemu_map_cache: correctly support size
arguments different from 0 or MCACHE_BUCKET_SIZE.
The new implementation supports locked mapcache entries with size
multiple of MCACHE_BUCKET_SIZE. qemu_invalidate_entry can correctly
find and unmap these "large" mapcache entries given that the virtual
address passed to qemu_invalidate_entry is the same returned by
qemu_map_cache when the locked mapcache entry was created.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-19 04:40:04 +02:00
Anthony PERARD b4dd7802ca xen: Introduce VGA sync dirty bitmap support
This patch introduces phys memory client for Xen.

Only sync dirty_bitmap and set_memory are actually implemented.
migration_log will stay empty for the moment.

Xen can only log one range for bit change, so only the range in the
first call will be synced.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-19 04:40:04 +02:00
Anthony PERARD b87de24e6c xen: Add xc_domain_add_to_physmap to xen_interface.
This function will be used to support sync dirty bitmap.

This come with a check against every Xen release, and special
implementation for Xen version that doesn't have this specific call.

This function will not be usable with Xen 3.3 because the behavior is
different.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2011-06-19 04:40:04 +02:00
Michael S. Tsirkin 0e6264db2c wdt: remove unused variables
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2011-06-16 00:20:12 +03:00
Michael S. Tsirkin efa6435159 alpha: remove unused variable
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Richard Henderson  <rth@twiddle.net>
2011-06-16 00:20:12 +03:00
Michael S. Tsirkin b6fb147cc0 alpha/translate: remve unused variables
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Richard Henderson  <rth@twiddle.net>
2011-06-16 00:20:12 +03:00
Michael S. Tsirkin 990def582b get_maintainer: update to match qemu tree
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-06-16 00:20:06 +03:00
Michael S. Tsirkin c6a99b6051 get_maintainer.pl: copy utility from Linux
Our MAINTAINERS file format matches Linux so
get the utility to parse it from there.
Updated as of linux 3.0-rc3

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-06-15 18:32:08 +03:00
Michael S. Tsirkin 9047c0b406 usb-ehci: move device/vendor/class id to qdev
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-06-15 18:32:08 +03:00
Michael S. Tsirkin cdfdec7f10 ppce500: move device/vendor/class id to qdev
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-06-15 18:32:08 +03:00
Isaku Yamahata c2afc92290 pci: don't call qdev pci init method
As pci id initialization is moved to common layer,
some initialization function can be empty.
So don't call init method if NULL.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2011-06-15 18:32:08 +03:00
Michael S. Tsirkin befeac45d4 Merge remote-tracking branch 'origin/master' into pci
Conflicts:
	hw/virtio-pci.c
2011-06-15 18:27:15 +03:00
Peter Maydell eb47d7c5d9 hw/9118.c: Implement active-low interrupt support
The 9118 ethernet controller interrupt line is active low unless
the IRQ config register is programmed to set both the IRQ_POL
(polarity: active-high) and IRQ_TYPE (type: push-pull) bits:
implement support for inverting the irq output in other configurations.
This also requires that we support setting the bits in the first
place, and that we correctly preserve them across software reset.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-06-15 13:23:37 +02:00
Andreas Färber 953ffe0f93 Introduce format string for pid_t
BeOS and Haiku on i386 use long for 32-bit types, including pid_t.
Using %d with pid_t therefore results in a warning.

Unfortunately POSIX:2008 does not define a PRId* string for pid_t.

In some places pid_t was previously casted to long and %ld hardcoded.
The predecessor of this patch added another upcast for the simpletrace
filename but was not applied to date.

Since new uses of pid_t with %d keep creeping in, let's instead define
an OS-dependent format string and use that consistently.

Cc: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Ingo Weinhold <ingo_weinhold@gmx.de>
Cc: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-06-15 19:58:48 +00:00
Juha Riihimäki 1e36f6a5b5 smc91c111: qdevify reset
Register the smc91c111 reset function as a qdev reset function.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-06-15 19:46:46 +00:00
Blue Swirl 22e1e72960 Merge branch 'cocoa-for-upstream' of git://repo.or.cz/qemu/afaerber
* 'cocoa-for-upstream' of git://repo.or.cz/qemu/afaerber:
  Darwin: Fix compilation warning regarding the deprecated daemon() function
  cocoa: Avoid warning related to multiple handleEvent: definitions
  cocoa: Revert dependency on VNC
  cocoa: Provide central qemu_main() prototype
  Fix libfdt warnings on Darwin
  configure: Fix check for fdatasync()
  Remove warning in printf due to type mismatch
  Cocoa: avoid displaying window when command-line contains '-h' or '-help'
  Fix compilation warning due to incorrectly specified type
  cocoa: do not create a spurious window for -version
2011-06-15 18:31:56 +00:00
Matthew Fernandez c235d7387c Command line support for altering the log file location
Add command line support for logging to a location other than /tmp/qemu.log.

With logging enabled (command line option -d), the log is written to
the hard-coded path /tmp/qemu.log. This patch adds support for writing
the log to a different location by passing the -D option.

Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-06-15 16:51:24 +00:00
Anthony Liguori 71f34ad053 Merge remote-tracking branch 'alon/pull-libcacard-1' into staging 2011-06-15 09:03:49 -05:00
Anthony Liguori b45a9b1851 Merge remote-tracking branch 'qemu-kvm/uq/master' into staging 2011-06-15 09:03:33 -05:00
Anthony Liguori f897235e0a Merge remote-tracking branch 'kraxel/usb.16' into staging 2011-06-15 09:03:22 -05:00
Anthony Liguori 1f8bedba79 Merge remote-tracking branch 'kwolf/for-anthony' into staging 2011-06-15 09:02:18 -05:00