summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-12-05Add S390 maintainer informationv0.12.0-rc0Alexander Graf1-0/+3
This patch adds information about who handles what when it comes to S390. I'll gladly support anything that's related to the device emulation model and S390 KVM parts. Since this patchset doesn't implement S390 CPU emulation, I left that part with a question mark. As soon as Uli's patchset gets committed I'd recommend setting him there. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05Set default console to virtio on S390xAlexander Graf1-0/+26
All "normal" system emulation targets in qemu I'm aware of display output on either VGA or serial output. Our S390x virtio machine doesn't have such kind of legacy hardware. So instead we need to default to a virtio console. I'm not particularly proud of this patch. It would be a lot better to have something in the machine description that tells us about the default terminal. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05S390 GDB stubAlexander Graf1-0/+52
In order to debug funny kernel breakages it's always good to have a working gdb stub around. While Uli's patches don't include one one, I needed one that's at least good enough for 'bt' and some variable examinations during early bootup. So here it is - the absolute basics to get the qemu gdb stub running with s390x targets. Sgined-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05Add S390x virtio machine descriptionAlexander Graf2-1/+256
In order to use the new S390x virtio bus we just introduced, we also need a machine description that sets up the machine according to our PV specification. Let's add that machine description and be happy! Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05Add S390x virtio machine busAlexander Graf3-0/+461
On S390x we don't want to go through the hassle of emulating real existing hardware, because we don't need to for running Linux. So let's instead implement a machine that is 100% based on VirtIO which we fortunately implement already. This patch implements the bus that is the groundwork for such an S390x virtio machine. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05Add support for S390x system emulationAlexander Graf5-2/+208
Let's enable the basics for system emulation so we can run virtual machines with KVM! Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05Allocate physical memory in low virtual address spaceAlexander Graf1-0/+6
KVM on S390x requires the virtual address space of the guest's RAM to be within the first 256GB. The general direction I'd like to see KVM on S390 move is that this requirement is losened, but for now that's what we're stuck with. So let's just hack up qemu_ram_alloc until KVM behaves nicely :-). Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05Add KVM support for S390xAlexander Graf2-1/+486
S390x was one of the first platforms that received support for KVM back in the day. Unfortunately until now there hasn't been a qemu implementation that would enable users to actually run guests. So let's include support for KVM S390x in qemu! Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05S/390 fake TCG implementationAlexander Graf3-1/+175
Qemu won't let us run a KVM target without having host TCG support. Well, for now we don't have any so let's implement a fake target that only stubs out everything. I tried to keep the patch as close to Uli's source as possible, so whenever he feels like it he can easily diff his version against this one. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05S/390 host/target build system supportAlexander Graf1-7/+15
This patch makes configure aware of S390 hosts and guests. When not explicitly defined using --target-list= no S390 targets will be built though. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05S/390 CPU fake emulationAlexander Graf6-0/+374
Because Qemu currently requires a TCG target to exist and there are quite some useful helpers here to lay the groundwork for out KVM target, let's create a stub TCG emulation target for S390X CPUs. This is required to make tcg happy. The emulation target itself won't work though. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-05Sparc64: handle MMU global bit and nucleus contextBlue Swirl2-11/+21
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-04monitor: fix use of plain integer as NULL pointer, spotted by SparseBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-04Add "static" to please SparseBlue Swirl10-11/+11
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-04scsi: fix incorrect ?: useBlue Swirl1-1/+2
Fixes OpenBSD build. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-04monitor: use qemu_gettimeofday(), not gettimeofday()Blue Swirl1-2/+3
Fix mingw32 build. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-04win32: fix variable use before initializationBlue Swirl1-2/+2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-04monitor: rename EVENT_* to QEVENT_* to avoid conflict on mingw32Blue Swirl3-17/+17
Partially fixes mingw32 build. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-04Sparc64: fix compilation with DEBUG_MMUBlue Swirl1-15/+15
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-12-03ide: implement stub for audio control/volume readThadeu Lima de Souza Cascardo1-0/+17
This implements the audio control or volume read support as needed by some systems. A Conectiva Parolin system required this to detect an IDE device as CD-ROM, through the CDVOLREAD ioctl. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03ide: Use some already defined page macros instead of constantsThadeu Lima de Souza Cascardo1-2/+2
Some PAGE constants were used instead of the macros we already have defined in internal.h. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03eepro100: Improve debug messagesStefan Weil1-3/+3
* buf was too small for longer register names. * Use consistent upper case for nouns in register names. * Use better name for array with e100 register names. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03Remove rule for config-devices.hStefan Weil1-3/+0
Since commit a992fe3d0fc185112677286f7a02204d8245b61e config-devices.h is no longer used. So there is no need to keep the dependency rules any longer. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03eepro100: Allocate a larger buffer for regname()David Benjamin1-1/+1
This should avoid truncating the register name when debugging. Signed-off-by: David Benjamin <davidben@mit.edu> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03multiboot: Use signed type for negative error numbersKevin Wolf1-0/+1
In mb_mod_length a return value is stored that is negative in error case. With an unsigned type the check goes wrong. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03posix-aio-compat: Fix error checkKevin Wolf1-9/+9
Checking for nbytes < 0 is pointless as long as it's a size_t. If we want to use negative numbers for error codes, we should use signed types. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03qemu-img: Fix memory leakKevin Wolf1-0/+1
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03Fix compile error when LSI_DEBUG is definedRyan Harper1-3/+3
This patch fixes the follow error when LSI_DEBUG is set. CC libhw64/lsi53c895a.o cc1: warnings being treated as errors qemu/hw/lsi53c895a.c: In function 'lsi_io_mapfunc': qemu/hw/lsi53c895a.c:1932: error: format '%08x' expects type 'unsigned int', but argument 2 has type 'pcibus_t' qemu/hw/lsi53c895a.c: In function 'lsi_ram_mapfunc': /qemu/hw/lsi53c895a.c:1947: error: format '%08x' expects type 'unsigned int', but argument 2 has type 'pcibus_t' qemu/hw/lsi53c895a.c: In function 'lsi_mmio_mapfunc': qemu/hw/lsi53c895a.c:1957: error: format '%08x' expects type 'unsigned int', but argument 2 has type 'pcibus_t' make[1]: *** [lsi53c895a.o] Error 1 make: *** [subdir-libhw64] Error 2 Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03Fix build for mingw32 on windows ($$ expansion)Stefan Weil1-1/+1
Make using mingw32 on windows fails when running grep "=y$$". The command is expanded to grep "=y$ and the missing " results in an error. I don't expect a file config-devices.mak with =y somewhere in the middle of a line (they are always at the end of the line), so simplifying the regular expression to =y seems to be permitted. This avoids problems with wrong expansion. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03Fix build for mingw32 on windows ($@ in macro)Stefan Weil1-4/+5
Make using mingw32 on windows does not preserve $@ in macros when they are modified using this pattern: target: macro += something This behaviour results in an error when QEMU_CFLAGS containing "-MMD -MP -MT $@" is modified for compilation of source files which use SDL: $@ will expand to nothing, -MT no longer has the correct argument (it will take the next one from the command line) and the build will fail or run with a wrong command line. The problem is fixed by using a new macro QEMU_DGFLAGS which is not modified by a target rule. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03e1000: Fix warning from code reviewStefan Weil1-1/+3
A code review run by Steve Grubb complained about code in e1000.c: In hw/e1000.c at line 89, vlan is declared to be 4 bytes. At line 382 is an attempt to do a memmove over it with a size of 12. This was fixed by splitting the memmove in two calls and adding a comment to the declaration of vlan and data. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03multiboot: Fix module loading and setting of mmap.Adam Lackorzynski3-2/+5
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03Make -kernel for linux work with bochsbiosAlexander Graf1-5/+5
While trying to run -kernel with -bios pc-bios/pcbios.bin, I realized that I was actually writing data to %es, but only set up %ds to a 32-bit segment we want to write to. So at the end of the day the data hasn't actually been copied. Oops. So here's a fix to set ES instead of DS, which makes -kernel work with BOCHS bios again (and actually makes the code do the correct thing)! Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03Fix recently introduced bugs in -usbdevice hostMarkus Armbruster1-12/+16
Commit 26a9e82a has the following flaws: * It enabled DEBUG. * It referenced two properties by the wrong name in usb_host_device_open(), which crashes with "qdev_prop_set: property "USB Host Device.bus" not found". * It broke "-usbdevice host:auto:..." by calling parse_filter() incorrectly. * It broke parsing of "-usbdevice host:BUS.ADDR" and "-usbdevice host:VID:PRID" with a trivial pasto. * It broke wildcards in "-usbdevice host:auto:...". Before, the four filter components were stored as int, and the wildcard was encoded as -1. The faulty commit changed storage to uint32_t, and the wildcard encoding to 0. But it failed to update parse_filter() accordingly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03Fix description of size parameter in qemu-img's help textPierre Riteau1-3/+3
Valid description taken from qemu-img.texi, although it would be better to have this information recorded in only one place. Signed-off-by: Pierre Riteau <Pierre.Riteau@irisa.fr> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03Suppress optionrom build on Solaris x86Andreas Faerber1-1/+1
To avoid the build failing with: gcc -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno- builtin -I/export/home/andreas/QEMU/qemu -Wall -Wstrict-prototypes - Werror -fomit-frame-pointer -fno-builtin -I/export/home/andreas/QEMU/ qemu -c -o multiboot.o multiboot.S /var/tmp//ccd3aWyk.s: Assembler messages: /var/tmp//ccd3aWyk.s:15: Error: value of 512 too large for field of 1 bytes at 0000000000000002 gmake[1]: *** [multiboot.o] Error 1 disable recursion into pc-bios/optionrom, as done for Darwin already. Signed-off-by: Andreas Faerber <andreas.faerber@web.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03Rename DriveInfo.onerror to on_write_errorKevin Wolf1-0/+4
Either rename variables and functions to refer to write errors (which is what they actually do) or introduce a parameter to distinguish reads and writes. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03SCSI: Fix Standard INQUIRY dataLaszlo Ast1-3/+3
Vendor identification, product identification and product revision level should be padded with spaces without a terminating NULL character, see SCSI-2 standard, 8.2.5.1 Standard INQUIRY data. Signed-off-by: Laszlo Ast <laszlo.ast@siemens-enterprise.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03kvm: x86: Add support for VCPU event statesJan Kiszka5-0/+100
This patch extends the qemu-kvm state sync logic with support for KVM_GET/SET_VCPU_EVENTS, giving access to yet missing exception, interrupt and NMI states. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03kvm: x86: Fix merge artifact of f8d926e9 about mp_stateJan Kiszka1-4/+4
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03targe-ppc: Sync CPU state for KVMAlexander Graf2-0/+8
Some recent change made PPC guests always start at address 0x0 because env isn't synced to kvm_state on first bootup. I'm not sure if this is the correct bugfix, but at least it makes PPC boot again with KVM enabled. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-03target-ppc: Get MMU state on register syncAlexander Graf1-0/+30
While x86 only needs to sync cr0-4 to know all about its MMU state and enable qemu to resolve virtual to physical addresses, we need to sync all of the segment registers on PPC to know which mapping we're in. So let's grab the segment register contents to be able to use the "x" monitor command and also enable the gdbstub to resolve virtual addresses. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-12-03qemu: cleanup unused macros in cirrusMichael S. Tsirkin1-35/+0
Cirrus vga has a copy of many PCI macros, and it doesn't even use them. Clean up. We also don't need to override header type as it is NORMAL by default. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03qemu: make cirrus init value pci spec compliantMichael S. Tsirkin1-1/+0
PCI memory should be disabled at reset, otherwise we might claim transactions at address 0. I/O should also be disabled, although for cirrus it is harmless to enable it as we do not have I/O bar. Note: bios fix needed for this patch to work was already applied: previously bios incorrently assumed that it does not need to enable i/o unless device has i/o bar. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03Don't leak file descriptorsKevin Wolf20-34/+178
We're leaking file descriptors to child processes. Set FD_CLOEXEC on file descriptors that don't need to be passed to children to stop this misbehaviour. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03qemu-img: There is more than one host device driverKevin Wolf3-2/+9
I haven't heard yet of anyone using qemu-img to copy an image to a real floppy, but it's a valid use case. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03qcow2: Fix some more qemu_malloc falloutKevin Wolf2-8/+21
Oh joy... Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03qcow2: Store exact backing format lengthKevin Wolf1-7/+9
Currently qcow2 unnecessarily rounds up the length of the backing format string to the next multiple of 8. At the same time, the array in BlockDriverState can only hold 15 characters, so in effect backing formats with 9 characters or more don't work (e.g. host_device). Save the real string length and things start to work for all valid image format names. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03virtio-blk: Implement rerror optionKevin Wolf2-6/+9
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-12-03ide: Implement rerror optionKevin Wolf3-18/+39
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>