Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
dprintf is already claimed by POSIX[1], and on at least one system
is implemented as a macro
[1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html
Signed-off-by: malc <av1474@comtv.ru>
|
|
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
|
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
When several PCI bridges were in use, monitor command "info pci" would
enter into infinite loop. Buses behind the bridge were not discoverable
because secondary and subordinate bus numbers were not used properly.
Other buses were not found because bus search terminated on first miss.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
It's currently not used by PPC machines. Refactor so that also Sparc64
machines can use it.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
This provides the same information as reverted commit 2ba6edf0. Not
much, just better than nothing.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Option "-device DRIVER,?" and monitor command "device_add DRIVER,?"
print the supported properties instead of creating a device. The
former also terminates the program.
This is commit 2ba6edf0 (just reverted) done right.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
This reverts commit 2ba6edf0dd740166632df80caa85992b20791a68.
The commit has two issues:
* When it runs from the monitor, e.g. "device_add e1000,?", it prints
to stderr instead of the monitor.
* Help looks to callers just like failed device creation. This makes
main() exit unsuccessfully on "-device e1000,?".
We need to do this differently.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
This reverts commit 922910ce42d15bdb7c2347436b1b5798b5401de4.
The commit has four issues:
* When it runs from the monitor, e.g. "device_add e1000,mac=?", it
prints to stderr instead of the monitor.
* Help looks to callers just like failed device creation. This makes
main() exit unsuccessfully on "-device e1000,mac=?".
* It has an undocumented side effect on -global: "-global e1000.mac=?"
prints help, but only when we actually add an e1000 device.
* It does not work for properties that accept the value "?".
We need to do this differently.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Help was shoehorned into device creation, qdev_device_add(). Since
help doesn't create a device, it returns NULL, which looks to callers
just like failed device creation. Monitor handler do_device_add()
doesn't care, but main() exits unsuccessfully.
Move help out of device creation, into new qdev_device_help().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Also add reset control.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
This requires an updated OpenBIOS image.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
If an I/O request fails right away instead of getting an error only in the
callback, we still need to consider rerror/werror.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Current code assumes that only write requests are ever going to be restarted.
This is wrong since rerror=stop exists. Instead of directly starting writes,
use the same request processing as used for new requests.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
We need a function that handles a single request. Create one by splitting out
code from virtio_blk_handle_output.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
This fixes CONFIG_FB_CIRRUS for Linux guests and probably much more:
When switching away from linearly mapped vram, we also have to restore
the I/O handlers for the LFB.
This regression was once introduced by commit 2bec46dc97.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
This commit enables one to use multiple virtio-serial devices and to
assign ports to arbitrary devices like this:
-device virtio-serial,id=foo -device virtio-serial,id=bar \
-device virtserialport,bus=foo.0,name=foo \
-device virtserialport,bus=bar.0,name=bar
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
sparc64 timer has tick counter which can be set and read,
and tick compare value used as deadline to fire timer interrupt.
The timer is not used as periodic timer, instead deadline
is set each time new timer interrupt is needed.
v3 -> v4:
- coding style
v2 -> v3:
- added missing timer debug output macro
- CPUTimer struct and typedef moved to cpu.h
- change CPU_SAVE_VERSION to 6, older save formats not supported
v1 -> v2:
- new conversion helpers cpu_to_timer_ticks and timer_to_cpu_ticks
- save offset from clock source to implement cpu_tick_set_count
- renamed struct sun4u_timer to CPUTimer
- load and save cpu timers
v0 -> v1:
- coding style
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Buffer block writes to avoid flushing every word access onto backing
storage device. This significantly speeds up flash emulation for flashes
connected through an 8 or 16-bit bus combined with backing storage (-pflash).
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
|
|
When using ballooning to manage overcommitted memory on a host, a system for
guests to communicate their memory usage to the host can provide information
that will minimize the impact of ballooning on the guests. The current method
employs a daemon running in each guest that communicates memory statistics to a
host daemon at a specified time interval. The host daemon aggregates this
information and inflates and/or deflates balloons according to the level of
host memory pressure. This approach is effective but overly complex since a
daemon must be installed inside each guest and coordinated to communicate with
the host. A simpler approach is to collect memory statistics in the virtio
balloon driver and communicate them directly to the hypervisor.
Signed-off-by: Adam Litke <agl@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Win32 suffers from a very big memory leak when dealing with SCSI devices.
Each read/write request allocates memory with qemu_memalign (ie
VirtualAlloc) but frees it with qemu_free (ie free).
Pair all qemu_memalign() calls with qemu_vfree() to prevent such leaks.
Signed-off-by: Herve Poussineau <hpoussin@reactos.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
PCI bridges' qdev info structures must indicate bridge header type,
otherwise critical bridge registers (esp. PCI_PRIMARY_BUS,
PCI_SECONDARY_BUS, PCI_SUBORDINATE_BUS) will not be writable.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
This file was renamed to ease the reviews of the recent changes
that went in.
Now that the changes are done, rename the file back to its original
name.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
If migration takes place between write of the bmdma address register and
write of the command register (to initiate DMA), the destination will
not properly start the DMA op, hanging the guest:
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd c8/00:16:41:00:00/00:00:00:00:00/e0 tag 0 dma 11264 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
Fix by sending current transfer information in the migration data.
We need to update ide version to 4 for this to work. As we don't
have subsectios, we need to chain the update increase until
vmstate_ide_pci (quintela)
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
This commit completes the do_pci_info() conversion to
QObject by adding support to PCI bridge devices.
This is done by recursively adding devices in the
"pci_bridge" key.
IMPORTANT: This code is being added separately because I could
NOT test it properly. According to Michael Tsirkin, it depends
on ultrasparc and it would take time to do the proper setup.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
The returned QObject is a QList of all buses. Each bus is
represented by a QDict, which has a key with a QList of all
PCI devices attached to it. Each device is represented by
a QDict.
As has happended to other complex conversions, it's hard to
split this commit as part of it are new functions which are
called by each other.
IMPORTANT: support for printing PCI bridge attached devices
is NOT part of this commit, it's going to be added by the
next commit, as it's untested.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
When called with property value "?",
a help text will be printed (instead of an error message).
This is useful for command lines like
qemu -device e1000,mac=?
and is already standard for other command line options.
A better help text could be provided by extending
the Property structure with a desc field.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
When called with property "?", a list of supported
properties will be printed (instead of an error message).
This is useful for command lines like
qemu -device e1000,?
and was already standard for other options like model=?
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Fix HdrS offsets for Sparc64. The initrd address must be offset by
KERNBASE.
Use rom_ptr mechanism to actually write to the kernel image.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
When wcycle is non zero the area is already opened for readable IO.
Avoiding the re-registration of the memarea significantly speeds up
the flash emulation. In particular for flashes connected through 8 or
16-bit buses.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
|
|
Flashes connected through an 8 bit bus cannot handle write buffers
larger than 256 bytes.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
|
|
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
|
|
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
|
|
According to Sun4M System Architecture Manual chapter 5.3.2, a limit
of 0 will not generate interrupts.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Commit 930c86820e introduced a regression to eth_send: eth_tx_desc_put
manipulates the host's tx descriptor copy before writing it back, but
two lines down the descriptor is evaluated again, leaving us with an
invalid next address if host and guest endianness differ. So this was
the actual issue commit 2e87c5b937 tried to paper over.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: malc <av1474@comtv.ru>
|
|
Commit b3a219883e uncovered that we attached the Wolfson with an I2C
address shifted left by one. Fixing this makes sound work again for
the Musicpal.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: malc <av1474@comtv.ru>
|
|
Byte swap PCI config values.
Remove old bogus PCI config mechanism so that device 0:0.0 can be probed.
This requires OpenBIOS r667.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
|
|
Windows 7 BSODs under load with HAL_RTC_IRQF_WILL_NOT_CLEAR error.
It happens here:
hal!HalpRtcUnmaskClock:
8281b93a 8bff mov edi,edi
8281b93c 56 push esi
8281b93d 33f6 xor esi,esi
8281b93f 6a0c push 0Ch
8281b941 e8b2ffffff call hal!CMOS_READ (8281b8f8)
8281b946 84c0 test al,al
8281b948 7920 jns hal!HalpRtcUnmaskClock+0x30 (8281b96a)
8281b94a 6a0a push 0Ah
8281b94c 46 inc esi
8281b94d e854c8ffff call hal!KeStallExecutionProcessor (828181a6)
8281b952 83fe64 cmp esi,64h
8281b955 72e8 jb hal!HalpRtcUnmaskClock+0x5 (8281b93f)
8281b957 6a00 push 0
8281b959 6a00 push 0
8281b95b 6a00 push 0
8281b95d 680a010000 push 10Ah
8281b962 6a5c push 5Ch
8281b964 ff1500c38082 call dword ptr [hal!_imp__KeBugCheckEx (8280c300)]
8281b96a 5e pop esi
8281b96b c3 ret
So it loops for 100(64h) times reading register C before BSOD. Lets
reduce number of immediate reinjection well under this limit.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
This commit enables the use of MSI interrupts for virtqueue
notifications for ports. We use nr_ports + 1 (for control channel) msi
entries for the ports, as only the in_vq operations need an interrupt on
the guest.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
This commit adds a simple chardev-based serial port. Any data the guest
sends is forwarded to the chardev and vice-versa.
Sample uses for such a device can be obtaining info from the guest like
the file systems used, apps installed, etc. for offline usage and
logged-in users, clipboard copy-paste, etc. for online usage.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
The port 'id' or number is internal state between the guest kernel and
our bus implementation. This is invocation-dependent and isn't part of
the guest-host ABI.
To correcly enumerate and map ports between the host and the guest, the
'name' property is used.
Example:
-device virtserialport,name=org.qemu.port.0
This invocation will get us a char device in the guest at:
/dev/virtio-ports/org.qemu.port.0
which can be a symlink to
/dev/vport0p3
This 'name' property is exposed by the guest kernel in a sysfs
attribute:
/sys/kernel/virtio-ports/vport0p3/name
A simple udev script can pick up this name and create the symlink
mentioned above.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|