ide: cleanup warnings
Add \n.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/xen_disk: Remove unused local variable
cppcheck report:hw/xen_disk.c:309: style: Variable 'len' is assigned a value that is never used
Cc: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide: Turn debug messages into assertions
These printfs aren't really debug messages, but clearly indicate a bug if theyever become effective. Noone uses DEBUG_IDE, let's re-enable the checkunconditionally and make it an assertion instead of printfs in the device...
ahci: Unbreak bar registration
Fix regression of 667bb59: ahci_init initializes ahci.mem, so we have tomove bar registration after it.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge branch 'ppc-next' of git://repo.or.cz/qemu/agraf
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Conflicts: cpu-all.h
Merge remote-tracking branch 'agraf/xen-next' into staging
PPC: Qdev'ify e500 pci
The e500 PCI controller isn't qdev'ified yet. This leads to severe issueswhen running with -drive.
To be able to use a virtio disk with an e500 VM, let's convert the PCIcontroller over to qdev.
Reviewed-by: Paul Brook <paul@codesourcery.com>...
PPC: Make MPC8544DS obey -cpu switch
The MPC8544DS board emulation code ignored the user defined -cpu switch.This patch enables it to only provide a sane default, not force an e500v2CPU inside.
Signed-off-by: Alexander Graf <agraf@suse.de>
PPC: Make MPC8544DS emulation work w/o KVM
The MPC8544DS board emulation was only used with KVM so far, so someparts of the code didn't provide proper values for non-KVM execution.
This patch makes the machine work without KVM enabled. To actually usethis, you also need proper e500v2 MMU emulation....
PPC MPC7544DS: Use new TLB helper function
Now that we have some nice helpers that can find us a TLB entry, let'suse that on the machine initialization code, so we don't need to knowabout the internals of the TLB array.
Fix off-by-one error in sizing pSeries hcall table
The pSeries machine uses two tables to look up guest hcalls for emulation.One of these is exactly one entry too small to hold all the hcalls it needsto, leading to memory corruption.
This patch fixes the bug, and while we're at it, make both tables 'static'...
pseries: Increase maximum CPUs to 256
The original pSeries machine was limited to 32 CPUs, more or lessarbitrarily. Particularly when we get SMT KVM guests it will bepretty easy to exceed this. Therefore, raise the max number of CPUsin a pseries machine guest to 256....
Make pSeries 'model' property more closely resemble real hardware
Currently, the qemu emulated pseries machine puts"qemu,emulated-pSeries-LPAR" in the device tree's root level 'model'property. Unfortunately this confuses some installers and ybin, which...
Place pseries vty devices at addresses more similar to existing machines
Currently the qemu pseries machine numbers its virtual serial devicesfrom 0. However, existing pSeries machines running pHyp number them from0x30000000.
In theory these indices are arbitrary, since everything necessary for the...
monitor: add PPC BookE SPRs
Read them via KVM_GET_SREGS in kvm_arch_get_registers(),and display them in "info registers".
Also get CR and PID from the existing KVM_GET_REGS.
Signed-off-by: Scott Wood <scottwood@freescale.com>Signed-off-by: Alexander Graf <agraf@suse.de>
usb-musb: uninline functions
Prototype without "inline" keyword breaks the build with some gccversions. Noticed by Alexander Graf.
Fix this by removing the inline keywork everywhere. Some functionscan't be inlined anyway as the are referenced using function pointers....
lsi53c895a: Rename 'sense' to 'status'
The 'sense' field in the HBA status structure is misnamed, as itactually carries the SCSI status. Rename it.
Signed-off-by: Hannes Reinecke <hare@suse.de>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
ac97: Remove unused local variables
cppcheck report:hw/ac97.c:1004: style: Variable 'written' is assigned a value that is never usedhw/ac97.c:1072: style: Variable 'written' is assigned a value that is never used
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
Fix typos in comments (instanciation -> instantiation)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Fix typos in comments and code (occured -> occurred and related)
The code changed here is an unused data type name (evt_flush_occurred).
Fix typo in comment (responsiblity -> responsibility)
Fix typos in comment (threshhold -> threshold, mapp -> map)
Fix typos in comments (imediately -> immediately)
Fix typos in comments (interupt -> interrupt)
Fix typos in comments (accessable -> accessible, priveleged -> privileged)
Fix typo in comment (colum -> column)
Fix typo in comment (auxilliary -> auxiliary)
xen: Add Xen hypercall for sleep state in the cmos_s3 callback.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Alexander Graf <agraf@suse.de>
xen: Introduce Xen Interrupt Controller
Every set_irq call makes a Xen hypercall.
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>
xen: Introduce the Xen mapcache
On IA32 host or IA32 PAE host, at present, generally, we can't createan HVM guest with more than 2G memory, because generally it's almostimpossible for Qemu to find a large enough and consecutive virtualaddress space to map an HVM guest's whole physical address space....
pci: Use of qemu_put_ram_ptr in pci_add_option_rom.
Prevent a deadlock caused by leaving a map cache bucket locked by thepreceding qemu_get_ram_ptr() call.
Signed-off-By: John Baboval <john.baboval@virtualcomputer.com>Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
xen: Initialize event channels and io rings
Open and bind event channels; map ioreq and buffered ioreq rings.
Signed-off-by: Arun Sharma <arun.sharma@intel.com>Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
xen: Add initialisation of Xen
The xenpv machine use the common init function.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
pc_memory_init: Move memory calculation to the caller.
This patch moves above_4g_mem_size and below_4g_mem_size calculation inthe caller of pc_memory_init (pc_init1). And the prototype ofpc_memory_init is changed because there is no need anymore to have...
xen: Add xenfv machine
Introduce the Xen FV (Fully Virtualized) machine to Qemu, some more Xenspecific call will be added in further patches.
pc, Disable vmport initialisation with Xen.
This is because there is not synchronisation of the vcpu registerbetween Xen and QEMU, so vmport can't work properly.
This patch introduces no_vmport parameter to pc_basic_device_init.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>...
piix_pci: Introduces Xen specific call for irq.
This patch introduces Xen specific call in piix_pci.
The specific part for Xen is in write_config, set_irq and get_pirq.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
machine, Add default_machine_opts to QEMUMachine.
With this new field, we can specified which accelerator use to run themachine, if the accelerator is not already specified by either aconfiguration file or the command line options.
Currently, the only use will be made in the xenfv machine....
xen: Replace some tab-indents with spaces (clean-up).
And put braces for blocks with a single statement.
xen: Support new libxc calls from xen unstable.
This patch updates the libxenctrl calls in Qemu to use the new interface,otherwise Qemu wouldn't be able to build against new versions of thelibrary.
We check libxenctrl version in configure, from Xen 3.3.0 to Xen...
Fix typo in code and comments
Replace writeable -> writable
Merge remote-tracking branch 'mst/for_anthony' into staging
Merge remote-tracking branch 'kraxel/usb.7.pull' into staging
Merge remote branch 'origin/master' into pci
Conflicts: exec.c
pci: Add class 0x403 as 'audio controller'
Used by HD audio controllers like our intel-hda.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
MSI: Robust resource release
msi_init may fail, so we need to check on uninit if the cap wasactually installed. This also avoids that the users need to check.
eepro100: Support byte/word writes to pointer register
pointer is a 32 bit register, but may be written using 8 or 16 bit writes.Add support for byte/word writes.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
eepro100: Support byte/word read/write access to MDI control register
MDI control is a 32 bit register, but may be read or written using8 or 16 bit access. Data is latched when the MSB is written.
Add support for byte/word read/write access.
eepro100: Support byte read access to general control register
The general control register is a byte register.Add support for byte reads.
eepro100: Support 32 bit read/write access to flash register
eepro100: Fix endianness issues
Like other Intel devices, e100 (eepro100) uses little endian byte order.
This patch was tested with these combinations:
i386 host, i386 + mipsel guests (le-le)mipsel host, i386 guest (le-le)i386 host, mips + ppc guests (le-be)...
eepro100: Support byte/word writes to port address
port is a 32 bit register, but may be written using 8 or 16 bit writes.Add support for byte/word writes.
eepro100: Pad received short frames
QEMU sends frames smaller than 60 bytes to ethernet nics.Such frames are rejected by real NICs and their emulations.To avoid this behaviour, other NIC emulations pad receivedframes. This patch enables this workaround for eepro100, too....
eepro100: Remove unused structure element
cppcheck reports that 'packet' is unused.
It was only used to calculate the size of the preceding data.Removing it saves a lot of stack space (local variable rx).
eepro100: Remove type casts which are no longer needed
eepro100: Avoid duplicate debug messages
When DEBUG_EEPRO100 was enabled, unsupported writes were logged twice.Now logging in eepro100_write1 and eepro100_write2 is similar to thelogging in eepro100_write4 (which already was correct).
usb: mass storage fix
Initialize scsi_len with zero when starting a new request, so anystuff leftover from the previous request is cleared out. This mayhappen in case the data returned by the scsi command doesn't fitinto the buffer provided by the guest....
uhci: switch to QTAILQ
uhci: keep uhci state pointer in async packet struct.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ohci: get ohci state via container_of()
musb: get musb state via container_of()
usb: move complete callback to port ops
usb: control buffer fixes
Windows allows control transfers to pass up to 4k of data, so raise ourcontrol buffer size to 4k. For control out transfers the usb core code copiesthe control request data to a buffer before calling the device's handle_control...
spice: don't create updates in spice server context.
This patch moves the creation of spice screen updates from the spiceserver context to qemu iothread context (display refresh timer to beexact). This way we avoid accessing qemu internals (display surface)...
spice: don't call displaystate callbacks from spice server context.
This patch moves the displaystate callback calls for setting the cursorand the mouse pointer from spice server to qemu (iothread) context.This allows us to simplify locking.
spice: drop obsolete iothread locking
We don't use qemu internals from spice server context any more.Thus we don't also need to grab the iothread mutex from spiceserver context. And we don't have to temporarely release thelock to avoid deadlocks. Drop all the calls....
atapi: Move comment to proper place
Move misplaced comment for media_is_dvd()
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
atapi: Explain why we need a 'media not present' state
After the re-org of the atapi code, it might not be intuitive for areader of the code to understand why we're inserting a 'media notpresent' state between cd changes.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
ide/atapi: fix set but unused
Signed-off-by: Alon Levy <alevy@redhat.com>Acked-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
milkymist-vgafb: fix console resizing
After enabling the framebuffer, ensure that the console is resized.
Signed-off-by: Michael Walle <michael@walle.cc>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
milkymist-sysctl: fix timers
Prevent timers from firing right after starting.
lm32: add Milkymist Minimac2 support
This patch adds support for Milkymist's minimal Ethernet MAC v2. Itsuperseds minimac1.
kvm: create kvmclock when one of the flags are present
kvmclock presence can be signalled by two different flags. So fordevice creation, we have to test for both.
Signed-off-by: Glauber Costa <glommer@redhat.com>Signed-off-by: Avi Kivity <avi@redhat.com>
Merge remote-tracking branch 'amitshah/for-anthony' into staging
Merge remote-tracking branch 'jvrao/for-anthony' into staging
virtio-serial: Fix endianness bug in the config space
The virtio serial specification requres that the values in the configspace are encoded in native endian of the guest.
The qemu virtio-serial code did not do conversion to the guest endianformat what caused problems when host and guest use different format....
char: Allow devices to use a single multiplexed chardev.
This fixes regression caused by commit2d6c1ef40f3678ab47a4d14fb5dadaa486bfcda6("char: Prevent multiple devices opening same chardev"):
-nodefaults -nographic -chardev stdio,id=stdio,mux=on,signal=off \...
virtio-console: notify backend of guest open / close
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Reviewed-by: Alon Levy <alevy@redhat.com>Signed-off-by: Amit Shah <amit.shah@redhat.com>
ioapic: Do not set irr for masked edge IRQs
So far we set IRR for edge IRQs even if the pin is masked. If the guestlater on unmasks and switches the pin to level-triggered mode, irr willremain set, causing an IRQ storm. The point is that setting IRR is not...
v9fs_walk: As per 9p2000 RFC, MAXWELEM >= nwnames >= 0.
The nwnames field in TWALK message is assumed to be >=0 and <= MAXWELEMwhich is defined as macro P9_MAXWELEM (16) in virtio-9p.h as per 9p2000RFC. Appropriate changes are required in V9fsWalkState and v9fs_walk....
hw/virtio-9p-local.c: Remove unnecessary null char in symlink file
This patch removes the addition of null char in symlink filewhich is being appended to file in case of mapped security model.Without this patch, the extra null char causes LTP testcase lstat03...
virtio-9p: Bugfix to send correct iounit
LCREATE function packs address of iounit in the pdu, fix that to sendactual iounit itself.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>Acked-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
virtio-9p: removexattr on default acl should return 0
If we don't have default acl, removexattr on default aclshould return 0
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
virtio-9p: Print the pdu details on return
virtio-9p: move 9p files around
Now that we start adding more files related to 9pfsit make sense to move them to a separate directory
pflash: Restore & fix lazy ROMD switching
Commit 5145b3d1cc revealed a bug in the lazy ROMD switch-back logic, butresolved it by breaking that feature. This approach addresses the issueby switching back to ROMD after a certain amount of read accesseswithout further unlock sequences....
Merge branch 'for-anthony' of git://repo.or.cz/qemu/kevin
rtl8139: Fix compilation for w32/w64
Compilation for Windows needs a different declaration for theprintf format attribute, so use the macro which was defined forthis purpose.
Cc: Benjamin Poirier <benjamin.poirier@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
ide/atapi: Introduce CHECK_READY flag for commands
Some commands are supposed to report a Not Ready Condition (i.e. they requirea medium to be present in order to execute successfully). Instead ofduplicating the check in each command implementation, let's add a flag and...
ide/atapi: Factor commands out
In preparation for a table of function pointers, factor each command out fromide_atapi_cmd() into its own function.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide/atapi: Use table instead of switch for commands
ide/atapi: Replace bdrv_get_geometry calls by s->nb_sectors
The disk size can only change when the medium is changed, and the changecallback takes care of updating s->nb_sectors in this case.
ide: Split atapi.c out
Besides moving code, this patch only fixes some whitespace issues in the movedcode and makes all functions in atapi.c static which can be static.
atapi: Add 'medium ready' to 'medium not ready' transition on cd change
MMC-5 Table F.1 lists errors that can be thrown for the TEST_UNIT_READYcommand. Going from medium not ready to medium ready states iscommunicated by throwing an error.
This adds the missing 'tray opened' event that we fail to report to...
trace: Remove %s in grlib trace events
Trace events cannot use %s in their format strings because tracebackends vary in how they can deference pointers (if at all). Recordingconst char * values is not meaningful if their contents are not recordedtoo....
rtl8139: add format attribute to DPRINTF
gcc can check the format string for correctness even when debugging output isnot enabled.Have to make sure arguments are always available. They are optimized out ifunneeded.
Signed-off-by: Benjamin Poirier <benjamin.poirier@gmail.com>...
rtl8139: use variadic macro for debug statements
Removes double (( )) to make DEBUG_PRINT compatible with real function calls.Change the name to DPRINTF to be consistent with other DPRINTF macrosthroughout qemu.Include the "RTL8139: " prefix in the macro. This changes some debug output...
rtl8139: use TARGET_FMT_plx in debug messages
Prevents a compilation failure when DEBUG_RTL8139 is defined:
CC libhw32/rtl8139.occ1: warnings being treated as errorshw/rtl8139.c: In function ‘rtl8139_cplus_transmit_one’:hw/rtl8139.c:1960: error: format ‘%8lx’ expects type ‘long unsigned int’, but argument 5 has type ‘target_phys_addr_t’...
Merge remote-tracking branch 'awilliam/ipxe' into staging