Commit graph

4717 commits

Author SHA1 Message Date
Michael Walle 57aa265d46 lm32: add Milkymist Minimac2 support
This patch adds support for Milkymist's minimal Ethernet MAC v2. It
superseds minimac1.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-05-03 10:48:40 +02:00
Michael Walle f3172a0e2e milkymist-sysctl: fix timers
Prevent timers from firing right after starting.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-05-03 10:48:40 +02:00
Michael Walle c07050ddb9 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>
2011-05-03 10:48:40 +02:00
Glauber Costa 450fb75c47 kvm: create kvmclock when one of the flags are present
kvmclock presence can be signalled by two different flags. So for
device creation, we have to test for both.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2011-05-02 09:38:35 -03:00
Anthony Liguori 71ef18e1f2 Merge remote-tracking branch 'amitshah/for-anthony' into staging 2011-04-28 08:37:54 -05:00
Anthony Liguori e77976a247 Merge remote-tracking branch 'jvrao/for-anthony' into staging 2011-04-28 08:25:45 -05:00
Alexey Kardashevskiy 5c1c9bb24b virtio-serial: Fix endianness bug in the config space
The virtio serial specification requres that the values in the config
space are encoded in native endian of the guest.

The qemu virtio-serial code did not do conversion to the guest endian
format what caused problems when host and guest use different format.

This patch corrects the qemu side, correctly doing host-native <->
guest-native conversions when accessing the config space. This won't
break any setups that aren't already broken, and fixes the case
of different host and guest endianness.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-04-28 12:35:49 +05:30
Kusanagi Kouichi d5b27167e1 char: Allow devices to use a single multiplexed chardev.
This fixes regression caused by commit
2d6c1ef40f
("char: Prevent multiple devices opening same chardev"):

-nodefaults -nographic -chardev stdio,id=stdio,mux=on,signal=off \
 -mon stdio -device virtio-serial-pci \
 -device virtconsole,chardev=stdio -device isa-serial,chardev=stdio

fails with:

qemu-system-x86_64: -device isa-serial,chardev=stdio: Property 'isa-serial.chardev' can't take value 'stdio', it's in use

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
2011-04-28 11:03:07 +05:30
Hans de Goede 0b6d2266e3 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>
2011-04-28 11:02:28 +05:30
Jan Kiszka 47f7be394a 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 guest
later on unmasks and switches the pin to level-triggered mode, irr will
remain set, causing an IRQ storm. The point is that setting IRR is not
correct in this case according to the spec, and avoiding this resolves
the issue.

Reported-and-tested-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-04-27 20:04:51 +02:00
Harsh Prateek Bora 4f8dee2dec v9fs_walk: As per 9p2000 RFC, MAXWELEM >= nwnames >= 0.
The nwnames field in TWALK message is assumed to be >=0 and <= MAXWELEM
which is defined as macro P9_MAXWELEM (16) in virtio-9p.h as per 9p2000
RFC. Appropriate changes are required in V9fsWalkState and v9fs_walk.

Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2011-04-27 08:27:25 -07:00
Harsh Prateek Bora f35bde2f8f hw/virtio-9p-local.c: Remove unnecessary null char in symlink file
This patch removes the addition of null char in symlink file
which is being appended to file in case of mapped security model.
Without this patch, the extra null char causes LTP testcase lstat03
to fail and hence this fix is required.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2011-04-27 08:27:01 -07:00
M. Mohan Kumar 1d810aeb4e virtio-9p: Bugfix to send correct iounit
LCREATE function packs address of iounit in the pdu, fix that to send
actual 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>
2011-04-27 08:26:29 -07:00
Aneesh Kumar K.V a09947617c virtio-9p: removexattr on default acl should return 0
If we don't have default acl, removexattr on default acl
should 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>
2011-04-27 08:26:05 -07:00
Aneesh Kumar K.V 3979251518 virtio-9p: Print the pdu details on return
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2011-04-27 08:25:35 -07:00
Aneesh Kumar K.V 353ac78d49 virtio-9p: move 9p files around
Now that we start adding more files related to 9pfs
it make sense to move them to a separate directory

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2011-04-27 08:24:37 -07:00
Jan Kiszka 661bfc80e8 pflash: Restore & fix lazy ROMD switching
Commit 5145b3d1cc revealed a bug in the lazy ROMD switch-back logic, but
resolved it by breaking that feature. This approach addresses the issue
by switching back to ROMD after a certain amount of read accesses
without further unlock sequences.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-04-27 16:31:12 +02:00
Aurelien Jarno aa348082d8 Merge branch 'for-anthony' of git://repo.or.cz/qemu/kevin
* 'for-anthony' of git://repo.or.cz/qemu/kevin:
  Remove obsolete 'enabled' variable from progress state
  Add dd-style SIGUSR1 progress reporting
  qed: Fix consistency check on 32-bit hosts
  ide/atapi: Introduce CHECK_READY flag for commands
  ide/atapi: Replace bdrv_get_geometry calls by s->nb_sectors
  ide/atapi: Use table instead of switch for commands
  ide/atapi: Factor commands out
  ide: Split atapi.c out
  Improve accuracy of block migration bandwidth calculation
  atapi: Add 'medium ready' to 'medium not ready' transition on cd change
  qemu-img: allow rebase to a NULL backing file when unsafe
2011-04-27 16:26:18 +02:00
Stefan Weil c6a0487b1f rtl8139: Fix compilation for w32/w64
Compilation for Windows needs a different declaration for the
printf format attribute, so use the macro which was defined for
this purpose.

Cc: Benjamin Poirier <benjamin.poirier@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-04-27 16:22:37 +02:00
Kevin Wolf 7a2c4b8234 ide/atapi: Introduce CHECK_READY flag for commands
Some commands are supposed to report a Not Ready Condition (i.e. they require
a medium to be present in order to execute successfully). Instead of
duplicating the check in each command implementation, let's add a flag and
check it before calling the command.

This patch only converts existing checks, it does not introduce new checks for
any of the other commands that can/should report a Not Ready Condition.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-04-27 16:21:00 +02:00
Kevin Wolf e119bcaceb ide/atapi: Replace bdrv_get_geometry calls by s->nb_sectors
The disk size can only change when the medium is changed, and the change
callback takes care of updating s->nb_sectors in this case.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-04-27 16:20:59 +02:00
Kevin Wolf e1a064f982 ide/atapi: Use table instead of switch for commands
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-04-27 16:20:59 +02:00
Kevin Wolf a60cf7e7eb ide/atapi: Factor commands out
In preparation for a table of function pointers, factor each command out from
ide_atapi_cmd() into its own function.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-04-27 16:20:59 +02:00
Kevin Wolf 33231e0e22 ide: Split atapi.c out
Besides moving code, this patch only fixes some whitespace issues in the moved
code and makes all functions in atapi.c static which can be static.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-04-27 16:20:27 +02:00
Amit Shah 4b9b7092b4 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_READY
command.  Going from medium not ready to medium ready states is
communicated by throwing an error.

This adds the missing 'tray opened' event that we fail to report to
guests.  After doing this, older Linux guests properly revalidate a disc
on the change command.  HSM violation errors, which caused Linux guests
to do a soft-reset of the link, also go away:

ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6
sr 1:0:0:0: CDB: Test Unit Ready: 00 00 00 00 00 00
ata2.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0
         res 01/60:00:00:00:00/00:00:00:00:00/a0 Emask 0x3 (HSM violation)
ata2.00: status: { ERR }
ata2: soft resetting link
ata2.00: configured for MWDMA2
ata2: EH complete

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2011-04-27 14:36:57 +02:00
Stefan Hajnoczi b4548fcc03 trace: Remove %s in grlib trace events
Trace events cannot use %s in their format strings because trace
backends vary in how they can deference pointers (if at all).  Recording
const char * values is not meaningful if their contents are not recorded
too.

Change grlib trace events that rely on strings so that they communicate
similar information without using strings.

A follow-up patch explains this limitation and updates docs/tracing.txt.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-04-26 13:14:49 +01:00
Benjamin Poirier ec48c7747a rtl8139: add format attribute to DPRINTF
gcc can check the format string for correctness even when debugging output is
not enabled.
Have to make sure arguments are always available. They are optimized out if
unneeded.

Signed-off-by: Benjamin Poirier <benjamin.poirier@gmail.com>
Cc: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-04-25 22:17:56 +02:00
Benjamin Poirier 7cdeb319e4 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 macros
throughout qemu.
Include the "RTL8139: " prefix in the macro. This changes some debug output
slightly since the prefix wasn't present on all lines.

Part of the change was done using the "coccinelle" tool with the following
small semantic match:
    @@ expression E; @@

    - DEBUG_PRINT((E))
    + DPRINTF(E)

Signed-off-by: Benjamin Poirier <benjamin.poirier@gmail.com>
Cc: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-04-25 22:17:52 +02:00
Benjamin Poirier afcd9c0dcd rtl8139: use TARGET_FMT_plx in debug messages
Prevents a compilation failure when DEBUG_RTL8139 is defined:

CC    libhw32/rtl8139.o
cc1: warnings being treated as errors
hw/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’
make[1]: *** [rtl8139.o] Error 1

Signed-off-by: Benjamin Poirier <benjamin.poirier@gmail.com>
Cc: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-04-25 22:17:47 +02:00
Anthony Liguori dbf352ad6e Merge remote-tracking branch 'awilliam/ipxe' into staging 2011-04-25 10:26:10 -05:00
Juan Quintela da26fdc314 vmstate: port mac_dbdma
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela c20df14b13 mac_dbdma: create DBDMAState instead of passing one array around
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela 9039d78e64 vmstate: port piix4
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela 1fc7cee0b4 piix4: create PIIX4State
It only contains a PCIDevice by know, but it makes easy to use migration code

Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela 8e470f8a77 vmstate: port mac_nvram
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela 8a11f43bd5 mac_nvram: size is a size, no need to be a target dependent type
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela 7b9a3d86c1 vmstate: port nand
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela 51db57f7e8 nand: pin values are uint8_t
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela 38cb3aa9b4 vmstate: port max111x
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela 54d970d134 max111x: input field is only used as uint8_t
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela 99838363ba vmstate: port pxa2xx_lcd
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela 469954090f pxa2xx_lcd: up field is used as a bool and migrated as an uint8_t
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela 2b7251e0f2 pxa2xx_lcd: name anonymous struct
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:43 -05:00
Juan Quintela dd8a4dcda4 vmstate: stellaris use unused for placeholder entries
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:42 -05:00
Juan Quintela 4483c7ac31 vmstate: port stellaris gamepad
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:42 -05:00
Juan Quintela 0c067bbb26 vmstate: port syborg_keyboard
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:42 -05:00
Juan Quintela 8dc5907090 vmstate: port syborg_serial
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:42 -05:00
Juan Quintela cf1d31dc5c vmstate: port stellaris_adc
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:42 -05:00
Juan Quintela 80a526802c vmstate: port syborg_pointer
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:42 -05:00
Juan Quintela b605f22212 vmstate: port ppc4xx_pci
Signed-off-by: Juan Quintela <quintela@redhat.com>
2011-04-22 14:41:42 -05:00