Gerd Hoffmann [Thu, 10 Sep 2009 09:43:31 +0000 (11:43 +0200)]
qdev/isa: convert cs4231a sound card
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 10 Sep 2009 09:43:30 +0000 (11:43 +0200)]
qdev/isa: convert soundblaster
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 10 Sep 2009 09:43:29 +0000 (11:43 +0200)]
qdev: add isa_create() function
Like isa_create_simple, but doesn't call qdev_init, so one can set
properties after creating and before initializing the device.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 10 Sep 2009 09:43:28 +0000 (11:43 +0200)]
qdev: tag isabus-bridge as no-user
isabus-bridge isn't supposed to be added via -device ...
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 10 Sep 2009 09:43:27 +0000 (11:43 +0200)]
qdev: simplify isa irq assignments
isa-bus owns the isa irqs now, so it can hand them out directly.
There is no need for the separate isa_connect_irqs step, drop it.
Also hard-code isa interrupts which can't be configured anyway.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 10 Sep 2009 09:43:26 +0000 (11:43 +0200)]
qdev: drop iobase properties from isa bus
Lot of ISA devices work at fixed addresses, so having iobase
as bus property doesn't make much sense. Devices which can
have different iobases will get a device property.
Also simply hard-code stuff which can't be configured anyway.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 10 Sep 2009 09:43:25 +0000 (11:43 +0200)]
qdev: add property type for 32bit signed integers.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 10 Sep 2009 09:43:24 +0000 (11:43 +0200)]
isapc: pick a more sane default cpu for such old hardware.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 10 Sep 2009 09:43:23 +0000 (11:43 +0200)]
isapc: Fix irq routing
Only send irqs to ioapic in case we have one.
Fixes qemu segfault.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
malc [Thu, 10 Sep 2009 01:15:07 +0000 (05:15 +0400)]
Allow to unscale the output window with a Ctrl-Alt-u hotkey
Signed-off-by: malc <av1474@comtv.ru>
Juan Quintela [Wed, 9 Sep 2009 07:46:57 +0000 (09:46 +0200)]
Fix VMSTATE_PCI_DEVICE version
PCI device entries have to have a default version, not 2, because they are
used in the midle of other structures that can have _any_ version number.
We can't use proper versioning here until we have SubSections support.
Why we didn't noticed before? Because in a PC, the only device ported with
a version less that 2 is piix_pm, and for that one, default pci values are
right. If you use a virtio-console, you will see that its state it is not
loaded back.
Thanks to Amit Shah for reporting the problem and help debug the fix.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Glauber Costa [Wed, 2 Sep 2009 21:18:43 +0000 (17:18 -0400)]
don't call cpu_sychronize_state from reset handlers
Doing this will make the vcpu ioctl be issued from the I/O thread, instead
of cpu thread. The correct behaviour is to call it from within the cpu thread,
as soon as we are ready to go.
Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Bernhard Kauer [Wed, 2 Sep 2009 07:49:05 +0000 (09:49 +0200)]
RTC polling mode broken
The RTC emulation does not set the IRQ flags independent of the IRQ enable bits.
The original MC146818A datasheet from 1984 notes:
"flag bits in Register C [...] are set independent of the
state of the corresponding enable bits in Register B"
Similar sections can be found in newer documentation e.g. in rtc82885.
Qemu and Bochs set the IRQ flags only if they are enabled,
which breaks drivers polling on them.
The following patch corrects this for the update-ended-flag in Qemu only.
It does not fix the handling of the other flags.
Signed-off-by: Bernhard Kauer <kauer@tudos.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Dustin Kirkland [Thu, 3 Sep 2009 17:31:33 +0000 (12:31 -0500)]
qemu-kvm: fix segfault when running kvm without /dev/kvm, falling back to non-accelerated mode
qemu-kvm: fix segfault when running kvm without /dev/kvm, falling back
to non-accelerated mode
We're seeing segfaults on systems without access to /dev/kvm. It
looks like the global kvm_allowed is being set just a little too late
in vl.c. This patch moves the kvm initialization a bit higher in the
vl.c main, just after options processing, and solves the segfaults.
We're carrying this patch in Ubuntu 9.10 Alpha. Please apply
upstream, or advise if and why this might not be the optimal solution.
Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
Move the kvm_init() call a bit higher to fix a segfault when
/dev/kvm is not available. The kvm_allowed global needs
to be set correctly a little earlier.
Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Mon, 31 Aug 2009 16:18:12 +0000 (13:18 -0300)]
configure: fix Linux AIO detection
We should set $linux_aio to 'no' if detection failed, otherwise
its contents will be empty, which is a bug as we test for 'yes'
or 'no'.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Pierre Riteau [Tue, 1 Sep 2009 09:57:20 +0000 (11:57 +0200)]
Fix compilation warnings when DEBUG_BUFFERED_FILE is defined
gcc 4.3.2 throws warnings when DEBUG_BUFFERED_FILE is defined, because
we are using the wrong format specifiers to print size_t/ssize_t values.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Kevin Wolf [Mon, 31 Aug 2009 14:48:49 +0000 (16:48 +0200)]
qcow2: Order concurrent AIO requests on the same unallocated cluster
When two AIO requests write to the same cluster, and this cluster is
unallocated, currently both requests allocate a new cluster and the second one
merges the first one when it is completed. This means an cluster allocation, a
read and a cluster deallocation which cause some overhead. If we simply let the
second request wait until the first one is done, we improve overall performance
with AIO requests (specifially, qcow2/virtio combinations).
This patch maintains a list of in-flight requests that have allocated new
clusters. A second request touching the same cluster is limited so that it
either doesn't touch the allocation of the first request (so it can have a
non-overlapping allocation) or it waits for the first request to complete.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Kevin Wolf [Mon, 31 Aug 2009 10:26:57 +0000 (12:26 +0200)]
qcow2: Fix metadata preallocation
The wrong version of the preallocation patch has been applied, so this is the
remaining diff.
We can't use truncate to grow the image file to the right size because we don't
know if metadata has been written after the last data cluster. In this case
truncate would shrink the file and destroy its metadata. Write a zero sector at
the end of the virtual disk instead to ensure that the file is big enough.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 15:16:43 +0000 (17:16 +0200)]
fix VNC SASL detection
This test was missing the change to != no.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Sun, 30 Aug 2009 22:41:35 +0000 (00:41 +0200)]
optionrom: make clean should remove raw and .d
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Sun, 30 Aug 2009 22:48:46 +0000 (00:48 +0200)]
otionrom: Use local CFLAGS no global one
It is needed by %.o : %.c rule.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Sun, 30 Aug 2009 22:48:45 +0000 (00:48 +0200)]
Remove CFLAGS parameter in cc-option
With cc-option we are testing if gcc just accept a particular option, we don't need CFLAGS at all. And this fixes the recursive problem with CFLAGS
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Naphtali Sprei [Mon, 31 Aug 2009 16:20:58 +0000 (19:20 +0300)]
Fix for commit
3f9cb1c14dc368f41447db5f78d6248c4f100ad4
Here's a patch to fix the issue introduced by me, as Reimar Döffinger pointed out,
Reimar Döffinger wrote:
> On Thu, Aug 13, 2009 at 03:01:20PM +0300, Naphtali Sprei wrote:
>> Bug fix for segfault when run as i82551 HW:
>> Use Extended TBD only when HW supports it (i82558 and up).
>>
>> Added assertions to guard from such buffer overflow
>> Introduce the MAX_TCB_BYTE_COUNT macro
>> Allocate buf big enough as HW needs (MAX_ETH_FRAME_SIZE -> MAX_TCB_BYTE_COUNT)
>>
>>
>> I don't feel 100% OK with the "s->device >= i82558B" condition
>> since it relies on the numeric (hex) value of those defines, which currently
>> is correct, but changes (which I don't forsee now) might break it.
>
> It seems this was applied. Unfortunately this breaks things on FreeBSD.
> There seem to be multiple issues.
> First, the intel document says the 82551, 82550, 82559 models are all
> supersets of the 82558. Or in other words: they all support this
> feature.
> Only the 82557 does not.
> But then even for that the FreeBSD driver will fail.
> The reason for that is this line:
> eeprom_contents[0xa] = 0x4000;
> the value here must be 0x01000 for all 82557 models it seems.
Correct the logic of determining devices that supports
extended TxCB: only the 82557 do not support it.
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jean-Christophe DUBOIS [Wed, 2 Sep 2009 22:37:00 +0000 (00:37 +0200)]
mv from strdup to qemu_strdup in qemu-option.c
one place is using strdup() instead of qemu_strdup
Fix it
Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jean-Christophe DUBOIS [Wed, 2 Sep 2009 21:59:06 +0000 (23:59 +0200)]
mv strdup to qemu_strdup in vl.c
There are few places in vl.c not using the qemu version of
malloc/free/strdup.
Fix it.
Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jean-Christophe DUBOIS [Wed, 2 Sep 2009 21:59:04 +0000 (23:59 +0200)]
fix vl.c compilation if CONFIG_KVM is not defined
vl.c will not link if CONFIG_KVM is not defined.
This patch fixes the problem.
Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jean-Christophe DUBOIS [Wed, 2 Sep 2009 21:59:02 +0000 (23:59 +0200)]
fix PATH_MAX conditional compilation
PATH_MAX is used elsewhere in the qemu source tree without protection.
In addtion the actual code would not compile if PATH_MAX is not defined
Last the free() call is wrong as p is not malloc()ed.
Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Stefan Weil [Tue, 1 Sep 2009 20:16:10 +0000 (22:16 +0200)]
eepro100: Clean code which sets the PCI device id
* Use function pci_config_set_device_id
* Use new macro PCI_DEVICE_ID_INTEL_82557
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Stefan Weil [Mon, 31 Aug 2009 20:16:16 +0000 (22:16 +0200)]
qemu-io: Improve portability (win32 now supported).
* Add missing include for struct timeval.
* Replace non-portable strsep by local qemu_strsep.
* Use POSIX basename by including libgen.h.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Stefan Weil [Mon, 31 Aug 2009 19:42:16 +0000 (21:42 +0200)]
Fix spelling in comment.
The company which made Virtual PC was Connectix.
They use the magic string "conectix" in their disk images.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Tue, 1 Sep 2009 07:56:15 +0000 (09:56 +0200)]
qdev: convert tcx to reset + vmsd
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Tue, 1 Sep 2009 07:56:14 +0000 (09:56 +0200)]
qdev: integrate vmstate
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Tue, 1 Sep 2009 07:56:13 +0000 (09:56 +0200)]
qdev: convert rtl8139 to reset
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Tue, 1 Sep 2009 07:56:12 +0000 (09:56 +0200)]
qdev: integrate reset
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Mon, 31 Aug 2009 12:24:05 +0000 (14:24 +0200)]
qdev/scsi+usb: convert usb-storage to qdev.
Full coverage with properties and everything. You can add virtual usb
sticks this way now:
-drive if=none,id=pendrive,path=/some/where
-device usb-storage,drive=pendrive
-usbdevice disk:/path/to/image continues to work.
Other side effects:
usb storage is listed in 'info block' now.
kvm tree should be able to boot from usb via extboot (untested though).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Mon, 31 Aug 2009 12:24:04 +0000 (14:24 +0200)]
qdev/scsi: add scsi bus support to qdev, convert drivers.
* Add SCSIBus.
* Add SCSIDeviceInfo, move device callbacks here.
* add qdev/scsi helper functions.
* convert drivers.
Adding scsi disks via -device works now, i.e. you can do:
-drive id=sda,if=none,...
-device lsi
-device scsi-disk,drive=sda
legacy command lines (-drive if=scsi,...) continue to work.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Mon, 31 Aug 2009 12:24:03 +0000 (14:24 +0200)]
qdev/usb: convert ohci.
Drop num_ports argument for usb_ohci_init_pci(), everybody
calls it with num_ports == 3, so it is pointless.
Convert ohci pci device into qdev.
TODO: convert non-pci ohci adapters.
You can add a OHCI USB Controller to your virtual pc now using
'-device pci-ohci'. Specifying a id is a good idea, so you can
attach usb devices to it, like this:
-device pci-ohci,id=ohci
-device usb-mouse,bus=ohci.0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Mon, 31 Aug 2009 12:24:02 +0000 (14:24 +0200)]
qdev/usb: convert uhci.
Hookup pci device into qdev.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Mon, 31 Aug 2009 12:24:01 +0000 (14:24 +0200)]
qdev/usb: add some convinience aliases.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Mon, 31 Aug 2009 12:24:00 +0000 (14:24 +0200)]
qdev/usb: make qemu aware of usb busses.
Move usb code from vl.c to usb-bus.c and make it use the new data
structures added by qdev conversion. qemu usb core should be able
to handle multiple USB busses just fine now (untested though).
Kill some usb_*_init() legacy functions, use usb_create_simple()
instead.
Kill some FIXMEs added by the first qdev/usb patch.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Mon, 31 Aug 2009 12:23:59 +0000 (14:23 +0200)]
qdev/usb: add usb bus support to qdev, convert drivers.
* Add USBBus.
* Add USBDeviceInfo, move device callbacks here.
* Add usb-qdev helper functions.
* Switch drivers to qdev.
TODO:
* make the rest of qemu aware of usb busses and kill the FIXMEs
added by this patch.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Mon, 31 Aug 2009 12:23:58 +0000 (14:23 +0200)]
qdev: add error message to qdev_device_add().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Mon, 31 Aug 2009 12:23:57 +0000 (14:23 +0200)]
allow passing null machine pointer to drive_init().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Tue, 1 Sep 2009 00:12:33 +0000 (02:12 +0200)]
savevm: Convert loadvm handlers list to LIST
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Tue, 1 Sep 2009 00:12:32 +0000 (02:12 +0200)]
Add LIST_FOREACH_SAFE() definition
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Tue, 1 Sep 2009 00:12:31 +0000 (02:12 +0200)]
savevm: Convert savevm handlers list to TAILQ
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:33 +0000 (16:07 +0200)]
cirrus_vga: CIRRUS_HOOK_* is not used anymore
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:32 +0000 (16:07 +0200)]
cirrus_vga: rename cirrus_hook_write_cr() cirrus_vga_write_cr()
Simplify the logic to do everything inside the function.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:31 +0000 (16:07 +0200)]
cirrus_vga: rename cirrus_hook_read_cr() cirrus_vga_read_cr()
Simplify the logic to do everything inside the function. Return 0xff if index is out of range independetly of DEBUG_CIRRUS
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:30 +0000 (16:07 +0200)]
cirrus_vga: rename cirrus_hook_write_gr() cirrus_vga_write_gr()
Simplify the logic to do everything inside the function.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:29 +0000 (16:07 +0200)]
cirrus_vga: rename cirrus_hook_read_gr() cirrus_vga_read_gr()
Simplify the logic to do everything inside the function.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:28 +0000 (16:07 +0200)]
cirrus_vga: rename cirrus_hook_write_palette() cirrus_vga_write_palette()
Simplify the logic to do everything inside the function
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:27 +0000 (16:07 +0200)]
cirrus_vga: rename cirrus_hook_read_palette() cirrus_vga_read_palette()
Simplify the logic to do everything inside the function
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:26 +0000 (16:07 +0200)]
cirrus_vga: rename cirrus_hook_write_sr() cirrus_vga_write_sr()
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:25 +0000 (16:07 +0200)]
cirrus_vga: rename cirrus_hook_read_sr() cirrus_vga_read_sr()
And make it a real function
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:24 +0000 (16:07 +0200)]
vga: Rename last VGAState occurrences to VGACommonState
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:23 +0000 (16:07 +0200)]
vga and cirrus_vga: substitute switch for equivalent assigntment
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:22 +0000 (16:07 +0200)]
cirrus_vga: make cirrus_read_hidden_dac() return its result
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:21 +0000 (16:07 +0200)]
vga: change tabs to spaces
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:20 +0000 (16:07 +0200)]
cirrus_vga: Add a VGACommonState local var to cirrus_vga_ioport_{read, write}
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:19 +0000 (16:07 +0200)]
vga and cirrus_vga: create vga_ioport_invalid() and use it everywhere
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:18 +0000 (16:07 +0200)]
vga: split vga-isa-mm.o
It is only used in mips softmmu, compile only there.
it_shift field was only used for vga_isa_mm, move it from VGACommonState
to ISAVGAMMstate.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:17 +0000 (16:07 +0200)]
vga: export vga_mem_{read,write}
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:16 +0000 (16:07 +0200)]
vga: split isa bits inco vga-isa.c
Adjust all the VGAState in VGACommonState
Compile vga-isa.o in the targets that use it
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:15 +0000 (16:07 +0200)]
vga: split pci bits into vga-pci.c
Adjust all the VGAState in VGACommonState
Compile vga-pci.o only for targets that use it.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:14 +0000 (16:07 +0200)]
vga: split vga_{load, save} into pci and common parts
Once there adjust VGAState <-> VGACommonState
Export vga_common_save/vga_common_load (nreeded by wmvare_vga
Remove vga.pci_dev field, it is not needed anymore
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:13 +0000 (16:07 +0200)]
vga: export vga_ioport_{read,write}
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:12 +0000 (16:07 +0200)]
cirrus_vga: prefix vga_ioport_{read, write} with cirrus
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Mon, 31 Aug 2009 14:07:11 +0000 (16:07 +0200)]
vga: remove useless cast from void *
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Blue Swirl [Mon, 7 Sep 2009 19:00:18 +0000 (19:00 +0000)]
USB: use opaque parameter passing for monitor handle
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 6 Sep 2009 16:34:18 +0000 (16:34 +0000)]
Sparc64: use ISA bus for i8042
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 6 Sep 2009 16:32:34 +0000 (16:32 +0000)]
Sparc64: remove unused variables
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 6 Sep 2009 16:32:13 +0000 (16:32 +0000)]
Make ioport default tables const
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 6 Sep 2009 16:31:58 +0000 (16:31 +0000)]
Fix indentation
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
malc [Sun, 6 Sep 2009 02:31:09 +0000 (06:31 +0400)]
When targeting PPU use rlwinm instead of andi. if possible
andi. is microcoded and slow there.
Signed-off-by: malc <av1474@comtv.ru>
malc [Sun, 6 Sep 2009 02:49:03 +0000 (06:49 +0400)]
Checks in select_soundhw were never intended to accept abbreviations
Signed-off-by: malc <av1474@comtv.ru>
Blue Swirl [Sat, 5 Sep 2009 10:14:07 +0000 (10:14 +0000)]
Fix Sparse warnings: add "static"
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Artyom Tarasenko [Sat, 5 Sep 2009 06:24:47 +0000 (06:24 +0000)]
esp: handle "select without attention"
Up to now "select without attention" was handled the same way as
"select with attention". According to
http://www.ibiblio.org/pub/historic-linux/early-ports/Sparc/NCR/NCR53C9X.txt
select without ATN sends the CDB (Command Descriptor Block) directly,
whereas select with ATN sends one message phase byte
followed by 6, 10, or 12 command phase bytes.
The attached patch implements the behaviour described above.
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
[blauwirbel@gmail.com: cleaned up formatting]
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Fri, 4 Sep 2009 17:47:09 +0000 (17:47 +0000)]
Include sys-queue.h early to override system queue definitions on BSD
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Fri, 4 Sep 2009 17:43:37 +0000 (17:43 +0000)]
Shuffle lines to avoid gcc 3 warning about redundant redeclaration
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Anthony Liguori [Fri, 4 Sep 2009 15:13:29 +0000 (10:13 -0500)]
Bring pcbios, seabios, and vgabios into the tree as git submodules. Right now,
they aren't integrated into the build but we can do that incrementally.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Stefan Weil [Fri, 28 Aug 2009 17:37:00 +0000 (19:37 +0200)]
mips malta: Fix fdc regression and use qdev for i8042 setup
8baf73adf664e79eae201c3f618078a220a661d9 (qdev/isa: convert fdc)
breaks MIPS Malta:
Tried to create isa device isa-fdc with no isa bus present
Fix this by creating an isa bus for piix4.
This change also requires some more qdev related changes
(similar changes were applied to pc.c) and allows
cleaning of piix3/piix4 code.
Thanks to Gerd Hoffmann for his hints.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:32 +0000 (15:27 -0300)]
Introduce QDict unit-tests
This suite contains tests to assure that QDict API works as expected.
To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:
$ ./check-qdict
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:31 +0000 (15:27 -0300)]
Introduce QDict test data file
This file is used by the QDict stress test, it adds 5k nodes
on the dictionary and performs various operations.
My original file had 21k entries and almost 400k of size. After
some discussion with Eduardo Habkost, I decided to reduce the
size.
There are ways to generate this kind of data dynamically, but
it has its problems too.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:30 +0000 (15:27 -0300)]
Introduce QString unit-tests
This suite contains tests to assure that QString API works as expected.
To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:
$ ./check-qstring
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:29 +0000 (15:27 -0300)]
Introduce QInt unit-tests
This suite contains tests to assure that QInt API works as expected.
To execute it you should have check installed and build QEMU with
check support enabled (--enable-check-utests) and then run:
$ ./check-qint
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:28 +0000 (15:27 -0300)]
Add check support
Check is a unit testing framework for C.
All the QObjects have unit-tests and more will be written for the
future data types.
More info about check can be found at:
http://check.sourceforge.net/
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:27 +0000 (15:27 -0300)]
monitor: Update supported types documentation
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:26 +0000 (15:27 -0300)]
monitor: fail when 'i' type is greater than 32-bit
The 'i' argument type is for 32-bit only and most handlers
will use an 'int' to store its value.
It's better to fail gracefully when the user enters a value
greater than 32-bit than to get subtle casting bugs.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:25 +0000 (15:27 -0300)]
monitor: Drop args[] handling code
This commit drops all the code used to handle the 'args[]' array,
as now we use a dictionary to pass arguments.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:24 +0000 (15:27 -0300)]
monitor: Drop str_allocated[]
It's not used anymore, as QDict is now used to handle string
memory allocation/deallocation.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:23 +0000 (15:27 -0300)]
monitor: Drop unused macros
GET_TLONG() and GET_TPHYSADDR() are not needed anymore, QInt can
handle such conversions.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:22 +0000 (15:27 -0300)]
monitor: Split monitor_handle_command()
In order to help the integration with unit-tests and having a better
design, this commit splits monitor_handle_command() into two parts.
The parsing code is moved to a function called monitor_parse_command(),
while allocating memory and calling the handler is still done by
monitor_handle_command().
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:21 +0000 (15:27 -0300)]
monitor: Port handler_10 to use QDict
This commit ports command handlers that receive ten arguments to use
the new monitor's dictionary.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:20 +0000 (15:27 -0300)]
monitor: Drop handler_8 and handler_9
Commit
79c4f6b08009a1d23177c2be8bd003253cf3686a added handler_8 and
handler_9 handling, but there isn't any command handler with those
number of arguments.
Just drop them.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:19 +0000 (15:27 -0300)]
monitor: Port handler_7 to use QDict
This commit ports command handlers that receive seven arguments to
use the new monitor's dictionary.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:18 +0000 (15:27 -0300)]
monitor: Port handler_6 to use QDict
This commit ports command handlers that receive six arguments to use
the new monitor's dictionary.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:17 +0000 (15:27 -0300)]
monitor: Port handler_5 to use QDict
This commit ports command handlers that receive five arguments to use
the new monitor's dictionary.
Note that GET_TLONG() and GET_TPHYSADDR() macros are not used anymore.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:16 +0000 (15:27 -0300)]
monitor: Port handler_4 to use QDict
This commit ports command handlers that receive four arguments to use
the new monitor's dictionary.
Note that GET_TLONG() and GET_TPHYSADDR() macros are not used anymore.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Fri, 28 Aug 2009 18:27:15 +0000 (15:27 -0300)]
monitor: Port handler_3 to use QDict
This commit ports command handlers that receive three arguments to use
the new monitor's dictionary.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>