Make stdvga provide the new vgabios binary (with pcibios support)
using the PCI option rom bar. Seabios will happily load it from
there. The new vga bios will also lookup the framebuffer address
in pci config space, so the magic bochs lfb @ 0xe0000000 is not
needed any more -> zap it.
Without the patch:
# dmesg | grep framebuffer
vesafb: framebuffer at 0xe0000000, mapped to 0xf7e80000, using 1875k, total 8192k
# lspci -vs2
00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller])
Subsystem: Qumranet, Inc. Device 1100
Physical Slot: 2
Flags: fast devsel
Memory at f0000000 (32-bit, prefetchable) [size=8M]
Expansion ROM at <unassigned> [disabled]
With patch applied:
# dmesg | grep framebuffer
vesafb: framebuffer at 0xf0000000, mapped to 0xf7e80000, using 1875k, total 8192k
# lspci -vs2
00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller])
Subsystem: Qumranet, Inc. Device 1100
Physical Slot: 2
Flags: fast devsel
Memory at f0000000 (32-bit, prefetchable) [size=8M]
Expansion ROM at f0800000 [disabled] [size=64K]
cheers,
Gerd
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
The HDA bus supports up to 15 codecs, with addresses 0 ... 14.
We get that wrong in two places:
* When handing out addresses we accept address 15 as valid.
* The bitmasks for two registers (WAKEEN and STATESTS) don't
have bit 14 set.
This patch fixes it.
[ v2: codestyle: add braces ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
The HDA bus supports up to 15 codecs, with addresses 0 ... 14.
We get that wrong in two places:
* When handing out addresses we accept address 15 as valid.
* The bitmasks for two registers (WAKEEN and STATESTS) don't
have bit 14 set.
This patch fixes it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
This patch adds MSI support to the intel hda audio driver. It is
enabled by default, use '-device intel-hda,msi=0' to disable it.
[ v2: codestyle: add braces ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
When the guest updates the WAKEEN register we
must re-calculate the IRQ status.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
HDA: Honor WAKEEN bits when deciding to raise an interrupt on codec
status change. This prevents an interrupt storm with the Haiku HDA
driver which does not handle codec status changes in the irq handler.
Signed-off-by: François Revol <revol@free.fr>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
Add pci exit callback for the intel-hda device and cleanup properly.
Also add an exit callback to the HDA bus implementation and make sure
it is called on qdev_free().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
Fix scsi-disk to use the usual completion paths that involve rerror/werror
handling instead of directly completing the requests in cases where
bdrv_aio_readv/writev returns NULL.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Fix virtio-blk to use the usual completion path that involves werror handling
instead of directly completing the request in cases where bdrv_aio_flush
returns NULL.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This pulls the request completion for error cases from the caller to
scsi_disk_emulate_command. This should not change semantics, but allows to
reuse scsi_handle_write_error() for flushes in the next patch.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This implements the rerror option for SCSI disks.
It also includes minor changes to the write path where the same code is used
that was criticized in the review for the changes to the read path required for
rerror support.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This patch adds three devices to qemu:
intel-hda
Intel HD Audio Controller, the PCI device. Provides a HDA bus.
Emulates ICH6 at the moment. Adding a ICH9 PCIE
variant shouldn't be hard.
hda-duplex
HDA Codec. Attaches to the HDA bus. Supports 16bit stereo,
rates 16k -> 96k, playback, recording and volume control
(with CONFIG_MIXEMU=y).
hda-output
HDA Codec without recording support. Subset of the hda-duplex
codec. Use this if you don't want your guests access your mic.
Usage: add '-device intel-hda -device hda-duplex' to your command line.
Tested guests:
* Linux works.
* Win7 works.
* DOS (mpxplay) works.
* WinXP doesn't work.
[ v2 changes ]
* Fixed endianess, big endian hosts work now.
* Fixed some emulation bugs.
* Added immediate command emulation.
* Added vmstate support.
* Make it behave like all other sound card drivers:
- can be configured via '--audio-card-list=hda'
- can be added to a VM using '-soundhw hda'
* Code style fixups.
* Zapped guest-triggerable asserts.
* Handle partial reads/writes of audio data correctly.
Cc: malc <av1474@comtv.ru>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
TRUE/FALSE are generally reserved keywords and shouldn't be defined in
a driver like this. Rename the macros to SDP_TRUE and SDP_FALSE
respectively.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
config write handlers should be idempotent.
So no need for complex range checks: a simple
one checking that we are touching the relevant capability
will do.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
- save/restore must not check w1c bits
since they are in fact guest controlled
- clear w1c bits on reset
Note: for express there are different kinds of
reset, some leave part of config space alone.
We will likely need a sticky bit mask to implement this.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Simplify logic for hotplug notification, by tracking state of the
logical interrupt condition. We then simply use this variable to make
the interrupt decision, according to spec.
API is made cleaner as we no longer force users to pass in
old slot control value.
Includes fixes by Isaku Yamahata.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Simplify code slighly by reversing the polarity
for the range check
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Extract range functions from pci.h. These will be used by later patches
by non-PCI devices. Adjust current users.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
(cherry picked from commit bf1b007123)
Checking available index upon load instead of
only when vm is running makes is easier to
debug failures.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Move timer init functions to a new file, qemu-timer-common.c. Make other
critical timer functions inlined to preserve performance in
qemu-timer.c, also move muldiv64() (used by the inline functions)
to qemu-timer.h.
Adjust block/raw-posix.c and simpletrace.c to use get_clock() directly.
Remove a similar/duplicate definition in qemu-tool.c.
Adjust hw/omap_clk.c to include qemu-timer.h because muldiv64() is used
there.
After this change, tracing can be used also for user code and
simpletrace on Win32.
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
RAM registration used incorrect offset.
Fix by using the offset obtained previously for this purpose.
Spotted by GCC 4.6.0 20100925 warning, which is also avoided.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
The werror option now affects not only write requests, but also flush requests.
Previously, it was not possible to stop a VM on a failed flush.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Instead of always assuming success for bdrv_aio_flush, actually do something
with the error. This respects the werror option and accordingly ignores the
error, reports it to the guest or stops the VM and retries after cont.
Ignoring the error is trivial, obviously. For stopping the VM and retrying
later old code can be reused, but we need to introduce a new status for "retry
a flush". For reporting to the guest, fortunately the same action is required
as for a failed read/write (status = DRDY | ERR, error = ABRT), so this code
can be reused as well.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ATA does not only have the WCACHE enabled bit in identify word 85, but also
a WCACHE supported bit in word 82. While the Linux kernel is fine with the
latter at least hdparm also needs the former before correctly displaying
the cache settings. There's also a non-zero chance other operating systems
are more picky in their volatile write cache detection.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Add qemu_activate_mouse_event_handler() calls to the usb wavom tablet so
it actually receives events. Also make sure we only remove the handler
if we registered it before.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This patch updates the vmmouse handler registration and activation.
Old behavior:
vmmouse_read_id, vmmouse_request_relative and vmmouse_request_absolute
unregister the handler and re-register it.
New behavior:
vmmouse_request_relative and vmmouse_request_absolute will unregister
the handler in case the mode did change. Then register and active the
handler with current mode if needed.
Note that the old code never ever *activates* the handler, so the
vmmouse doesn't receive events. This trips up Fedora 14 for example:
Boot a default install without usb tablet, watch the X-Server activating
the vmmouse then, enjoy a non-functional mouse.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
readv & writev, read & write respectively from the current offset
of the file & hence their use has to be preceeded by a call to lseek.
preadv/writev can be used instead, as they take the offset as an argument.
This saves one system call( lseek ).
In case preadv is not supported, it is implemented by an lseek
followed by a readv. Depending upon the configuration of QEMU, the
appropriate read & write methods are selected. This patch also fixes the
zero byte read/write bug & obviates the need to apply a fix for that bug separately.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Sanchit Garg <sancgarg@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
We would need this to make sure we handle the mapped
security model correctly for different xattr names.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
The O_DIRECT flag imposes alignment restrictions on the length and address
of userspace buffers and the file offset of I/Os.
While VirtFS/9P has plans to implement O_DIRECT behavior on the server,
for now we will stick to a behavior like NFS by bypassing the page cache
only on the client. Server may still cache the I/O.
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Synopsis
size[4] TReadlink tag[2] fid[4]
size[4] RReadlink tag[2] target[s]
Description
Readlink is used to return the contents of the symoblic link
referred by fid. Contents of symboic link is returned as a
response.
target[s] - Contents of the symbolic link referred by fid.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>