aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-09-10Remove bit-rotten threshold handlingmalc
Thanks to Toshiya Takeda for bringing up an unrelated issue which led to this. Signed-off-by: malc <av1474@comtv.ru>
2009-09-10F_DUPFD_CLOEXEC is not universally availablemalc
The same issue (and the same patch to the byte) was experienced/proposed by Vince Weaver. Signed-off-by: malc <av1474@comtv.ru>
2009-09-10Add information w.r.t default GUS IRQ assigmentmalc
2009-09-10Fix formattingmalc
2009-09-10Fix formatting, get rid of conf and fix descriptionmalc
2009-09-10Fix formatting and and description fieldmalc
2009-09-10qdev/isa: convert real time clockGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-09-10qdev/isa: finish pckbd conversionGerd Hoffmann
drop old init path and switch remaining users to isa_create_simple(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-09-10qdev/isa: convert ne2000Gerd Hoffmann
Also split the isa bits into a separate source file, so we don't drag in a dependency for isa-bus.o for machines which want ne2k_pci only. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-09-10qdev/isa: convert gravis ultrasoundGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-09-10qdev/isa: convert cs4231a sound cardGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-09-10qdev/isa: convert soundblasterGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-09-10qdev: add isa_create() functionGerd Hoffmann
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>
2009-09-10qdev: tag isabus-bridge as no-userGerd Hoffmann
isabus-bridge isn't supposed to be added via -device ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-09-10qdev: simplify isa irq assignmentsGerd Hoffmann
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>
2009-09-10qdev: drop iobase properties from isa busGerd Hoffmann
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>
2009-09-10qdev: add property type for 32bit signed integers.Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-09-10isapc: pick a more sane default cpu for such old hardware.Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-09-10isapc: Fix irq routingGerd Hoffmann
Only send irqs to ioapic in case we have one. Fixes qemu segfault. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-09-10Allow to unscale the output window with a Ctrl-Alt-u hotkeymalc
Signed-off-by: malc <av1474@comtv.ru>
2009-09-09Fix VMSTATE_PCI_DEVICE versionJuan Quintela
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>
2009-09-09don't call cpu_sychronize_state from reset handlersGlauber Costa
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>
2009-09-09RTC polling mode brokenBernhard Kauer
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>
2009-09-09qemu-kvm: fix segfault when running kvm without /dev/kvm, falling back to ↵Dustin Kirkland
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>
2009-09-09configure: fix Linux AIO detectionLuiz Capitulino
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>
2009-09-09Fix compilation warnings when DEBUG_BUFFERED_FILE is definedPierre Riteau
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>
2009-09-09qcow2: Order concurrent AIO requests on the same unallocated clusterKevin Wolf
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>
2009-09-09qcow2: Fix metadata preallocationKevin Wolf
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>
2009-09-09fix VNC SASL detectionJuan Quintela
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>
2009-09-09optionrom: make clean should remove raw and .dJuan Quintela
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09otionrom: Use local CFLAGS no global oneJuan Quintela
It is needed by %.o : %.c rule. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09Remove CFLAGS parameter in cc-optionJuan Quintela
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>
2009-09-09Fix for commit 3f9cb1c14dc368f41447db5f78d6248c4f100ad4Naphtali Sprei
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>
2009-09-09mv from strdup to qemu_strdup in qemu-option.cJean-Christophe DUBOIS
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>
2009-09-09mv strdup to qemu_strdup in vl.cJean-Christophe DUBOIS
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>
2009-09-09fix vl.c compilation if CONFIG_KVM is not definedJean-Christophe DUBOIS
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>
2009-09-09fix PATH_MAX conditional compilationJean-Christophe DUBOIS
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>
2009-09-09eepro100: Clean code which sets the PCI device idStefan Weil
* 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>
2009-09-09qemu-io: Improve portability (win32 now supported).Stefan Weil
* 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>
2009-09-09Fix spelling in comment.Stefan Weil
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>
2009-09-09qdev: convert tcx to reset + vmsdGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09qdev: integrate vmstateGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09qdev: convert rtl8139 to resetGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09qdev: integrate resetGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09qdev/scsi+usb: convert usb-storage to qdev.Gerd Hoffmann
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>
2009-09-09qdev/scsi: add scsi bus support to qdev, convert drivers.Gerd Hoffmann
* 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>
2009-09-09qdev/usb: convert ohci.Gerd Hoffmann
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>
2009-09-09qdev/usb: convert uhci.Gerd Hoffmann
Hookup pci device into qdev. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09qdev/usb: add some convinience aliases.Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-09qdev/usb: make qemu aware of usb busses.Gerd Hoffmann
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>