hw/unin_pci.c: convert to PCIDeviceInfo to initialize ids
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/usb-ohci.c: convert to PCIDeviceInfo to initialize ids
hw/versatile_pci.c: convert to PCIDeviceInfo to initialize ids
hw/vga-pci.c: convert to PCIDeviceInfo to initialize ids
hw/pcnet-pci.c: convert to PCIDeviceInfo to initialize ids
hw/piix4.c: convert to PCIDeviceInfo to initialize ids
hw/piix_pci.c: convert to PCIDeviceInfo to initialize ids
hw/qxl.c: convert to PCIDeviceInfo to initialize ids
hw/rtl8139.c: convert to PCIDeviceInfo to initialize ids
hw/sh_pci.c: convert to PCIDeviceInfo to initialize ids
hw/sun4u.c: convert to PCIDeviceInfo to initialize ids
hw/ide/cmd646.c: convert to PCIDeviceInfo to initialize ids
hw/ide/ich.c: convert to PCIDeviceInfo to initialize ids
hw/ide/via.c: convert to PCIDeviceInfo to initialize ids
hw/intel-hda.c: convert to PCIDeviceInfo to initialize ids
hw/ioh3420.c: convert to PCIDeviceInfo to initialize ids
hw/ivshmem.c: convert to PCIDeviceInfo to initialize ids
hw/lsi53c895a.c: convert to PCIDeviceInfo to initialize ids
hw/ne2000.c: convert to PCIDeviceInfo to initialize ids
hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids
hw/bonito.c: convert to PCIDeviceInfo to initialize ids
hw/cirrus_vga.c: convert to PCIDeviceInfo to initialize ids
hw/e1000.c: convert to PCIDeviceInfo to initialize ids
hw/es1370.c: convert to PCIDeviceInfo to initialize ids
hw/grackle_pci.c: convert to PCIDeviceInfo to initialize ids
hw/gt64xxx.c: convert to PCIDeviceInfo to initialize ids
dec_pci: convert to PCIDeviceInfo to initialize ids
apb_pci: convert to PCIDeviceInfo to initialize ids
Use PCIDeviceInfo to initialize ids.
ide/piix: convert to PCIDeviceInfo to initialize ids
vmware_vga.c: convert to PCIDeviceInfo to initialize ids
hw/ac97.c: convert to PCIDeviceInfo to initialize ids
pci: move ids of config space into PCIDeviceInfo
vender id/device id... in configuration space are read-only registerswhich are commonly defined for all pci devices.So move those initialization into common place.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
usb-uhci: convert to PCIDEviceInfo to initialize ids
eepro100: convert to PCIDeviceInfo to initialize ids
CPUPhysMemoryClient: batch addresses in catchup
When a phys memory client registers and we play catchup by walkingthe page tables, we can make a huge improvement in the number oftimes the set_memory callback is called by batching contiguouspages together. With a 4G guest, this reduces the number of callbacks...
ich/ahci: fix uninitialized memory use
The commit 667bb59d2358daeef179583c944becba3f1f9680uses d->ahci.mem before it is initialized byahci_init(). Fix this by calling ahci_init() first thingso that it's safe to use all fields in the ahci state struct....
Merge remote branch 'origin/master' into pci
Conflicts: exec.c
CPUPhysMemoryClient: Pass guest physical address not region offset
When we're trying to get a newly registered phys memory client updatedwith the current page mappings, we end up passing the region offset(a ram_addr_t) as the start address rather than the actual guest...
CPUPhysMemoryClient: Fix typo in phys memory client registration
When we register a physical memory client, we try to walk the pagetables, calling the set_memory hook for every entry. Effectivelyplaying catchup for the client for everything already registered....
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.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
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).
qemu-img resize: Fix option parsing
For shrinking images, you're supposed to use a negative size. However, theleading minus makes getopt think that it's an option and so you get the helptext if you don't use -- like in 'qemu-img resize test.img -- -1G'....
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>
qemu-progress.c: printf isn't signal safe
Change the signal handling to indicate a signal is pending, ratherthen printing directly from the signal handler.
In addition make the signal prints go to stderr, rather than stdout.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>...
NBD: Avoid leaking a couple of strings when the NBD device is closed
Signed-off-by: Nick Thomas <nick@bytemark.co.uk>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
lm32: fix exception handling
Global interrupt enable bit is already saved within the exception handlerhelper routine. Thus remove extra code in translation routines.
Additionally, debug exceptions has always DEBA as base address.
Signed-off-by: Michael Walle <michael@walle.cc>...
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: use qemu_free consistently
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
x86: Allow multiple cpu feature matches of lookup_feature
kvmclock is represented by two feature bits. Therefore, lookup_featureneeds to continue its search even after the first match. Enhance itaccordingly and switch to a bool return type at this chance....
kvm: add kvmclock to its second bit
We have two bits that can represent kvmclock in cpuid.They signal the guest which msr set to use. When we tweak flagsinvolving this value - specially when we use "-", we have to act on both.
Signed-off-by: Glauber Costa <glommer@redhat.com>...
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>
Break up user and system cpu_interrupt implementations
Both have only two lines in common, and we will convert the systemservice into a callback which is of no use for user mode operation.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>CC: Riku Voipio <riku.voipio@iki.fi>...
Redirect cpu_interrupt to callback handler
This allows to override the interrupt handling of QEMU in system mode.KVM will make use of it to set a specialized handler.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
kvm: Install specialized interrupt handler
KVM only requires to set the raised IRQ in CPUState and to kick thereceiving vcpu if it is remote. Installing a specialized handler allowspotential future changes to the TCG code path without risking KVM sideeffects....
fix crash in migration, 32-bit userspace on 64-bit host
This change fixes a long-standing immediate crash (memory corruptionand abort in glibc malloc code) in migration on 32bits.
The bug is present since this commit:
commit 692d9aca97b865b0f7903565274a52606910f129...
kvm: use kernel-provided para_features instead of statically coming up with new capabilities
Use the features provided by KVM_GET_SUPPORTED_CPUID directly tomask out features from guest-visible cpuid.
The old get_para_features() mechanism is kept for older kernels that do not implement it....
linux-user: Fix compilation for "old" linux versions
Debian Lenny and other installations with older linux versionsfailed to compile linux-user because some CLONE_xxx macros areundefined.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Fix buffer overrun in sched_getaffinity
Zeroing of the cpu array should start from &cpus[kernel_ret]not &cpus[num_zeros_to_fill].
This fixes a crash in EFL's edje_cc running under qemu-arm.
Signed-off-by: Mike McCormack <mj.mccormack@samsung.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
Don't zero out buffer in sched_getaffinity
The kernel doesn't fill the buffer provided to sched_getaffinitywith zero bytes, so neither should QEMU.
Merge branch 'patches' of git://qemu.weilnetz.de/git/qemu
virtfs: fix build due from rename
The latest virtfs pull broke the cris-softmmu target.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.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: Detect chardev release by NULL handlers as well as NULL opaque
Juan says he prefers these extra checks to ensure a user of a chardev isreleasing it.
Requested-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Amit Shah <amit.shah@redhat.com>
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 \...
spice-chardev: listen to frontend guest open / close
Note the vmc_register_interface() in spice_chr_write is left in placein case someone uses spice-chardev with a frontend which does not haveguest open / close notification.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>...
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>
chardev: Allow frontends to notify backends of guest open / close
Some frontends know when the guest has opened the "channel" and is activelylistening to it, for example virtio-serial. This patch adds 2 new qemu-chardevfunctions which can be used by frontends to signal guest open / close, and...
target-arm: Don't update base register on abort in Thumb T1 LDM
Make sure the base register isn't updated if it is in the load listfor a Thumb LDM (T1 encoding) which aborts partway through the load.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
target-arm: fix LDMIA bug on page boundarytarget-arm: fix LDMIA bug on page boundary
When consecutive memory locations are on page boundary, a base register may beloaded before page fault occurs. After page fault handling, it losts the memorylocation information. To solve this problem, loading a base register has to put back....
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...
vl.c: Replace -virtfs string manipulation with QemuOpts
The -virtfs option creates an fsdev representing the pass-through filesystem and a guest-visible virtio-9p-pci device that can access thisfile system. This patch replaces the string manipulation used to build...
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....
darwin-user: Remove unneeded null pointer check
cppcheck reports this error:
commpage.c:223: error: Possible null pointer dereference:value - otherwise it is redundant to check if value is null at line 214
The null pointer check in line 214 is indeed not needed....
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>...
qed: Fix consistency check on 32-bit hosts
The qed_bytes_to_clusters() function is normally used with size_tlengths. Consistency check used it with file size length and thereforefailed on 32-bit hosts when the image file is 4 GB or more.
Make qed_bytes_to_clusters() explicitly 64-bit and update consistency...
Add dd-style SIGUSR1 progress reporting
This introduces support for dd-style progress reporting on POSIXsystems, if the user hasn't specified -p to report progress. If sent aSIGUSR1, qemu-img will report current progress for commands thatsupport progress reporting....
Remove obsolete 'enabled' variable from progress state
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>