]> Git Repo - qemu.git/log
qemu.git
13 years agoMerge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging
Anthony Liguori [Thu, 20 Oct 2011 13:43:00 +0000 (08:43 -0500)]
Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging

13 years agoMerge remote-tracking branch 'aneesh/for-upstream-6' into staging
Anthony Liguori [Thu, 20 Oct 2011 13:42:08 +0000 (08:42 -0500)]
Merge remote-tracking branch 'aneesh/for-upstream-6' into staging

Conflicts:
trace-events

13 years agorunstate: Allow user to migrate twice
Luiz Capitulino [Fri, 14 Oct 2011 14:18:09 +0000 (11:18 -0300)]
runstate: Allow user to migrate twice

It should be a matter of allowing the transition POSTMIGRATE ->
FINISH_MIGRATE, but it turns out that the VM won't do the
transition the second time because it's already stopped.

So this commit also adds vm_stop_force_state() which performs
the transition even if the VM is already stopped.

While there also allow other states to migrate.

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agosavevm: qemu_savevm_state(): Drop stop VM logic
Luiz Capitulino [Thu, 13 Oct 2011 14:36:40 +0000 (11:36 -0300)]
savevm: qemu_savevm_state(): Drop stop VM logic

qemu_savevm_state() has some logic to stop the VM and to (or not to)
resume it. But this seems to be a big noop, as qemu_savevm_state()
is only called by do_savevm() when the VM is already stopped.

So, let's drop qemu_savevm_state()'s stop VM logic.

Reviewed-by: Michael Roth <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Reviewed-by: Juan Quintela <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agorunstate: Allow to transition from paused to postmigrate
Luiz Capitulino [Thu, 13 Oct 2011 17:39:59 +0000 (14:39 -0300)]
runstate: Allow to transition from paused to postmigrate

The user may already have paused the VM before starting the
migration process. If s/he does that, then the state will be
'paused' when we finish the migration process. In that case
we want to transition from 'paused' to 'postmigrate' as the
latter is now the real reason why the VM is stopped.

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agorunstate: Print state transition when invalid
Luiz Capitulino [Thu, 13 Oct 2011 13:59:07 +0000 (10:59 -0300)]
runstate: Print state transition when invalid

Makes it easier to debug.

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoQMP: Fix blockdev-snapshot-sync doc example
Luiz Capitulino [Mon, 10 Oct 2011 20:30:08 +0000 (17:30 -0300)]
QMP: Fix blockdev-snapshot-sync doc example

Fix wrong command name.

Reported-by: Eric Blake <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agotcx: convert to memory API
Avi Kivity [Wed, 5 Oct 2011 16:26:24 +0000 (18:26 +0200)]
tcx: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agotc63963xb: convert to memory API
Avi Kivity [Mon, 3 Oct 2011 12:42:42 +0000 (14:42 +0200)]
tc63963xb: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agosyborg: convert to memory API
Avi Kivity [Mon, 3 Oct 2011 12:33:26 +0000 (14:33 +0200)]
syborg: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agosun4u: convert to memory API
Avi Kivity [Mon, 3 Oct 2011 12:31:12 +0000 (14:31 +0200)]
sun4u: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agosun4m: convert to memory API
Avi Kivity [Mon, 3 Oct 2011 12:27:32 +0000 (14:27 +0200)]
sun4m: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agostrongarm: convert to memory API
Avi Kivity [Mon, 3 Oct 2011 12:14:20 +0000 (14:14 +0200)]
strongarm: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agospitz: convert to memory API
Avi Kivity [Mon, 3 Oct 2011 11:03:56 +0000 (13:03 +0200)]
spitz: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agospapr: convert to memory API
Avi Kivity [Mon, 3 Oct 2011 10:56:38 +0000 (12:56 +0200)]
spapr: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agosm501: convert to memory API
Avi Kivity [Sun, 2 Oct 2011 15:56:06 +0000 (17:56 +0200)]
sm501: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agos390-virtio: convert to memory API
Avi Kivity [Sun, 2 Oct 2011 15:06:42 +0000 (17:06 +0200)]
s390-virtio: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agorealview: convert to memory API
Avi Kivity [Sun, 2 Oct 2011 15:04:26 +0000 (17:04 +0200)]
realview: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agor2d: convert to memory API
Avi Kivity [Sun, 2 Oct 2011 14:48:42 +0000 (16:48 +0200)]
r2d: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agoppcr500_mpc8544ds: convert to memory API
Avi Kivity [Sun, 2 Oct 2011 14:43:01 +0000 (16:43 +0200)]
ppcr500_mpc8544ds: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agopci: simplify memory region registration
Avi Kivity [Thu, 11 Aug 2011 11:40:58 +0000 (14:40 +0300)]
pci: simplify memory region registration

The two code paths (for ADDRESS_SPACE_IO and ADDRESS_SPACE_MEM) are
identical.  Unify them.

Signed-off-by: Avi Kivity <[email protected]>
13 years agopxa2xx: convert to memory API (part II)
Avi Kivity [Sun, 25 Sep 2011 15:19:19 +0000 (18:19 +0300)]
pxa2xx: convert to memory API (part II)

Signed-off-by: Avi Kivity <[email protected]>
13 years agopxa2xx: convert to memory API (part I)
Avi Kivity [Sun, 25 Sep 2011 15:19:19 +0000 (18:19 +0300)]
pxa2xx: convert to memory API (part I)

Signed-off-by: Avi Kivity <[email protected]>
13 years agoppc_prep: convert to memory API
Avi Kivity [Sun, 25 Sep 2011 13:57:45 +0000 (16:57 +0300)]
ppc_prep: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agoppc_oldworld: convert to memory API
Avi Kivity [Sun, 25 Sep 2011 13:27:52 +0000 (16:27 +0300)]
ppc_oldworld: convert to memory API

Signed-off-by: Avi Kivity <[email protected]>
13 years agoi8259: Move to hw library
Jan Kiszka [Sun, 16 Oct 2011 09:53:17 +0000 (11:53 +0200)]
i8259: Move to hw library

No target-specific bits remaining, let's move it over.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agomonitor: Restrict pic/irq_info to supporting targets
Jan Kiszka [Sun, 16 Oct 2011 09:53:13 +0000 (11:53 +0200)]
monitor: Restrict pic/irq_info to supporting targets

This allows to drop various stubs and move the i8359 into hwlib.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Fix coding style
Jan Kiszka [Fri, 7 Oct 2011 07:19:54 +0000 (09:19 +0200)]
i8259: Fix coding style

No functional changes.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Convert to qdev
Jan Kiszka [Fri, 7 Oct 2011 07:19:53 +0000 (09:19 +0200)]
i8259: Convert to qdev

This key cleanup step requires to move the IRQ debugging bit from
i8259_set_irq directly to the per-PIC pic_set_irq, to pass the PIC
parameters (I/O base, ELCR address and mask, master/slave mode) as
qdev properties, and to interconnect the PICs with their environment via
GPIO pins.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoqdev: Add HEX8 property
Jan Kiszka [Fri, 7 Oct 2011 07:19:52 +0000 (09:19 +0200)]
qdev: Add HEX8 property

Signed-off-by: Jan Kiszka <[email protected]>
Reviewed-by: Andreas Färber <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Eliminate PicState2
Jan Kiszka [Fri, 7 Oct 2011 07:19:51 +0000 (09:19 +0200)]
i8259: Eliminate PicState2

Introduce a reference to the slave PIC for the few cases we need to
access it without a proper pointer at hand and drop PicState2. We could
even live without slave_pic if we had a better way of modeling the
cascade bus the PICs are attached to (in addition to the ISA bus).

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Replace PicState::pics_state with master flag
Jan Kiszka [Fri, 7 Oct 2011 07:19:50 +0000 (09:19 +0200)]
i8259: Replace PicState::pics_state with master flag

This reflects how real PICs indentify their role (in non-buffered mode):
Pass the state of the /SP input on pic_init and use it instead of
pics_state to differentiate between master and slave mode.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: PREP: Replace pic_intack_read with pic_read_irq
Jan Kiszka [Fri, 7 Oct 2011 07:19:49 +0000 (09:19 +0200)]
i8259: PREP: Replace pic_intack_read with pic_read_irq

There is nothing in the i8259 spec that justifies the special
pic_intack_read. At least the Linux PREP kernels configure the PICs
properly so that pic_read_irq returns identical values, and setting
read_reg_select in PIC0 cannot be derived from any special i8259 mode.

So switch ppc_prep to pic_read_irq and drop the now unused PIC code.

CC: Andreas Färber <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Clean up pic_ioport_read
Jan Kiszka [Fri, 7 Oct 2011 07:19:48 +0000 (09:19 +0200)]
i8259: Clean up pic_ioport_read

Drop redundant local address variable.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Fix poll command
Jan Kiszka [Fri, 7 Oct 2011 07:19:47 +0000 (09:19 +0200)]
i8259: Fix poll command

This was probably never used so far: According to the spec, polling
means ack'ing the pending IRQ and setting its corresponding bit in isr.
Moreover, we have to signal a pending IRQ via bit 7 of the returned
value, and we must not return a spurious IRQ if none is pending.

This implements the poll command without the help of pic_poll_read which
is left untouched as pic_intack_read is still using it.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Switch to per-PIC IRQ update
Jan Kiszka [Fri, 7 Oct 2011 07:19:46 +0000 (09:19 +0200)]
i8259: Switch to per-PIC IRQ update

This converts pic_update_irq to work against a single PIC instead of the
complete cascade. Along this change, the required update after
pic_set_irq1 is now moved into that function.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Clear ELCR on reset
Jan Kiszka [Fri, 7 Oct 2011 07:19:45 +0000 (09:19 +0200)]
i8259: Clear ELCR on reset

The ELCR is actually part of the chipset but we model it here for
simplicity reasons. The PIIX3 clears the ELCR on reset, which was once
broken by 4dbe19e181. Fix this by splitting up pic_init_reset from
pic_reset and clearing the register in the latter.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Update IRQ state after reset
Jan Kiszka [Fri, 7 Oct 2011 07:19:44 +0000 (09:19 +0200)]
i8259: Update IRQ state after reset

MIPS and PPC users of the i8259 output signal expect us to report state
updates also after reset. As no consumer (including the master PIC) can
misinterpret the deassert as an activation event, it is safe to simply
update the IRQ state after reset.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Reorder intack in pic_read_irq
Jan Kiszka [Fri, 7 Oct 2011 07:19:43 +0000 (09:19 +0200)]
i8259: Reorder intack in pic_read_irq

As we want to move the IRQ update to pic_intack, ordering matters: the
slave ack must be executed before the master ack to avoid missing
further pending slave IRQs.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Do not update IRQ output after spurious pic_poll_read
Jan Kiszka [Fri, 7 Oct 2011 07:19:42 +0000 (09:19 +0200)]
i8259: Do not update IRQ output after spurious pic_poll_read

If pic_poll_read finds no pending IRQ and return a spurious one instead,
no PIC state is changed, thus we do not need to call pic_update_irq.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8239: Introduce per-PIC output interrupt
Jan Kiszka [Fri, 7 Oct 2011 07:19:41 +0000 (09:19 +0200)]
i8239: Introduce per-PIC output interrupt

As a first step towards more generic master-slave support, remove
parent_irq in favor of a per-PIC output interrupt line. The slave's
line is attached to IRQ2 of the master, but it remains unused for now.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Move pic_set_irq1 after pic_update_irq
Jan Kiszka [Fri, 7 Oct 2011 07:19:40 +0000 (09:19 +0200)]
i8259: Move pic_set_irq1 after pic_update_irq

We are about to call the latter from the former. No functional changes.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Drop obsolete prototypes
Jan Kiszka [Fri, 7 Oct 2011 07:19:39 +0000 (09:19 +0200)]
i8259: Drop obsolete prototypes

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoi8259: Remove premature inline function attributes
Jan Kiszka [Fri, 7 Oct 2011 07:19:38 +0000 (09:19 +0200)]
i8259: Remove premature inline function attributes

The compiler is smarter in choosing the right optimization.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agopc: Fix and clean up PIC-to-APIC IRQ path
Jan Kiszka [Fri, 7 Oct 2011 07:19:37 +0000 (09:19 +0200)]
pc: Fix and clean up PIC-to-APIC IRQ path

The master PIC is connected to the LINTIN0 of the APICs. As the APIC
currently does not track the state of that line, we have to ask the PIC
to reinject its IRQ after the CPU picked up an event from the APIC.

This introduces pic_get_output to read the master PIC IRQ line state
without changing it. The APIC uses this function to decide if a PIC IRQ
should be reinjected on apic_update_irq. This reflects better how the
real hardware works.

The patch fixes some failures of the kvm unit tests apic and eventinj by
allowing to enable the proper CPU IRQ deassertion when the guest masks
some pending IRQs at PIC level.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agopc: Convert GSIState::i8259_irq into array
Jan Kiszka [Fri, 7 Oct 2011 07:19:36 +0000 (09:19 +0200)]
pc: Convert GSIState::i8259_irq into array

Will be required when we no longer let i8259_init allocate the PIC IRQs
but convert that chips to qdev.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agopc: Generalize ISA IRQs to GSIs
Jan Kiszka [Fri, 7 Oct 2011 07:19:35 +0000 (09:19 +0200)]
pc: Generalize ISA IRQs to GSIs

The ISA bus IRQ range is 0..15. What isa_irq_handler and IsaIrqState are
actually dealing with are the Global System Interrupts. Refactor the
code to clarify this.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agopc: Drop useless test from isa_irq_handler
Jan Kiszka [Fri, 7 Oct 2011 07:19:34 +0000 (09:19 +0200)]
pc: Drop useless test from isa_irq_handler

IsaIrqState::ioapic is always non-NULL. Probably, the concrete
qemu_irq was supposed to be tested, but that's already done by
qemu_set_irq.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: add Avnet LX60/LX110/LX200 boards
Max Filippov [Sat, 15 Oct 2011 22:56:46 +0000 (02:56 +0400)]
target-xtensa: add Avnet LX60/LX110/LX200 boards

These boards carry similar hardware: SDRAM (48M for LX110, 64M for LX60,
96M for LX200), 16 Mbyte FLASH, FPGA, 10/100 Mbps Ethernet PHY and 16550
UART. FPGA may be loaded with almost any Tensilica processor. It is also
used to implement Ethernet MAC, e.g. OpenCores 10/100 Mbps Ethernet MAC
and LED/DIP switches access.

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agohw: add OpenCores 10/100 Mbps Ethernet controller
Max Filippov [Sat, 15 Oct 2011 22:56:45 +0000 (02:56 +0400)]
hw: add OpenCores 10/100 Mbps Ethernet controller

This is OpenCores Ethernet MAC + subset of National Semiconductors
DP83838C PHY.
OpenCores Ethernet MAC project: http://opencores.org/project,ethmac

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: rename dc232b board to sim
Max Filippov [Sat, 15 Oct 2011 22:56:07 +0000 (02:56 +0400)]
target-xtensa: rename dc232b board to sim

This is to get aligned with the linux name for this machine.

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: add fsf core
Max Filippov [Sat, 15 Oct 2011 22:56:06 +0000 (02:56 +0400)]
target-xtensa: add fsf core

This is FSF big endian core implemented through linux overlay.

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: add dc232b core
Max Filippov [Sat, 15 Oct 2011 22:56:05 +0000 (02:56 +0400)]
target-xtensa: add dc232b core

This is Diamond 232L Standard Core Rev.B (LE), implemented through
linux/gdb overlay.

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: extract core configuration from overlay
Max Filippov [Sat, 15 Oct 2011 22:56:04 +0000 (02:56 +0400)]
target-xtensa: extract core configuration from overlay

Introduce overlay_tool.h that defines core configuration blocks from
data available in the linux architecture variant overlay.

Overlay data is automatically generated in the core configuration
process by Tensilica tools and can be directly converted to qemu xtensa
core description by overlay_tool.h

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: implement external interrupt mapping
Max Filippov [Sat, 15 Oct 2011 22:56:03 +0000 (02:56 +0400)]
target-xtensa: implement external interrupt mapping

Xtensa cores may have different mapping of external interrupt pins to
internal IRQ numers. Implement API to acquire core IRQ by its external
interrupt number.

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: remove hand-written xtensa cores implementations
Max Filippov [Sat, 15 Oct 2011 22:56:02 +0000 (02:56 +0400)]
target-xtensa: remove hand-written xtensa cores implementations

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: increase xtensa options accuracy
Max Filippov [Sat, 15 Oct 2011 22:56:01 +0000 (02:56 +0400)]
target-xtensa: increase xtensa options accuracy

- add separate options for each operation in the MISC_OP;
- add an option for MULSH/MULUH;
- put S32C1I under conditional store option.

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: update qemu-doc.texi
Max Filippov [Mon, 10 Oct 2011 10:48:23 +0000 (14:48 +0400)]
target-xtensa: update qemu-doc.texi

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: add MAC16 unit tests
Max Filippov [Mon, 10 Oct 2011 02:25:41 +0000 (06:25 +0400)]
target-xtensa: add MAC16 unit tests

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: implement MAC16 option
Max Filippov [Mon, 10 Oct 2011 02:25:40 +0000 (06:25 +0400)]
target-xtensa: implement MAC16 option

See ISA, 4.3.7 for the details.

- add ACC and MR special registers;
- implement MAC16 and all inner MAC* opcode groups.

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-xtensa: fix guest hang on masked CCOMPARE interrupt
Max Filippov [Mon, 10 Oct 2011 02:25:04 +0000 (06:25 +0400)]
target-xtensa: fix guest hang on masked CCOMPARE interrupt

QEMU timer is used to post CCOMPARE interrupt when the core is halted.
If that CCOMPARE interrupt is masked off then the timer must be rearmed
in the callback, otherwise it will be rearmed next time the core goes to
halt by the waiti instruction.

Add test case into timer testsuite.

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoDrop obsolete nographic timer
Jan Kiszka [Fri, 30 Sep 2011 10:31:18 +0000 (12:31 +0200)]
Drop obsolete nographic timer

We flush coalesced MMIO in the device models now, and VNC - for which
this was once introduced - is also fine without it as it has its own
refresh timer.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoMove graphic-related coalesced MMIO flushes to affected device models
Jan Kiszka [Fri, 30 Sep 2011 10:31:14 +0000 (12:31 +0200)]
Move graphic-related coalesced MMIO flushes to affected device models

This is conceptually cleaner and will allow us to drop the nographic
timer. Moreover, it will be mandatory to fully exploit future per-device
coalesced MMIO rings.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agohw/9pfs: Handle Security model parsing
M. Mohan Kumar [Fri, 14 Oct 2011 07:29:37 +0000 (12:59 +0530)]
hw/9pfs: Handle Security model parsing

Except local fs driver all other fs drivers (handle, synth) don't need
security model. Update fsdev parameter parsing accordingly.

Signed-off-by: M. Mohan Kumar <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agohw/9pfs: Use export flag for indicating security model
Aneesh Kumar K.V [Thu, 13 Oct 2011 07:51:00 +0000 (13:21 +0530)]
hw/9pfs: Use export flag for indicating security model

This helps to remove some of the structure members

Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agohw/9pfs: Rename fstype to fsdriver to make it consistent across VirtFS code
Aneesh Kumar K.V [Thu, 13 Oct 2011 06:58:04 +0000 (12:28 +0530)]
hw/9pfs: Rename fstype to fsdriver to make it consistent across VirtFS code

Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agohw/9pfs: Use export_flag for indicating whether fs driver use path names.
Aneesh Kumar K.V [Wed, 12 Oct 2011 15:29:18 +0000 (20:59 +0530)]
hw/9pfs: Use export_flag for indicating whether fs driver use path names.

This allows us to remove another member from the struct

Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agohw/9pfs: Use fs driver specific lstat
M. Mohan Kumar [Tue, 11 Oct 2011 05:45:56 +0000 (11:15 +0530)]
hw/9pfs: Use fs driver specific lstat

Use file system driver specific lstat instead of generic lstat.

Signed-off-by: M. Mohan Kumar <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agoscripts: Simpletrace log analysis script for pretty-printing 9p log.
Harsh Prateek Bora [Fri, 30 Sep 2011 10:36:15 +0000 (16:06 +0530)]
scripts: Simpletrace log analysis script for pretty-printing 9p log.

This python script allows to pretty print 9p simpletrace logs and can be
further enhanced to filter 9p logs based on command line arguments.

Sample output:
 TGETATTR (tag = 1 , fid = 0 , request_mask = 0x7ff )
 RGETATTR (tag = 1 , result_mask = 0x7ff , mode = 040777 , uid = 500 , gid = 500 )
 TXATTRWALK (tag = 1 , fid = 0 , newfid = 1 , xattr name = 36832096 )
 RXATTRWALK (tag = 1 , xattrsize  = 18446744073709551555 )
 TXATTRWALK (tag = 1 , fid = 0 , newfid = 1 , xattr name = 36744768 )
 RXATTRWALK (tag = 1 , xattrsize  = 18446744073709551555 )
 TGETATTR (tag = 1 , fid = 1 , request_mask = 0x3fff )
 RGETATTR (tag = 1 , result_mask = 0x17ff , mode = 040777 , uid = 500 , gid = 500 )
 TWALK (tag = 1 , fid = 1 , newfid = 2 , nwnames = 1 )
 RWALK (tag = 1 , nwnames = 1 , qids = 0x230aea0 )

Signed-off-by: Harsh Prateek Bora <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agohw/9pfs: Remove virtio-9p-debug.* infra to be replaced by Qemu Tracing.
Harsh Prateek Bora [Fri, 30 Sep 2011 10:36:14 +0000 (16:06 +0530)]
hw/9pfs: Remove virtio-9p-debug.* infra to be replaced by Qemu Tracing.

Removing the existing debug infrastrucure as proposed to be replaced by
Qemu Tracing infrastructure.

Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Harsh Prateek Bora <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agohw/9pfs: Introduce tracing for 9p pdu handlers
Harsh Prateek Bora [Wed, 12 Oct 2011 13:41:25 +0000 (19:11 +0530)]
hw/9pfs: Introduce tracing for 9p pdu handlers

Plan is to replace the existing debug infrastructure with Qemu tracing
infrastructure so that user can dynamically enable/disable trace events and
therefore a meaningful trace log can be generated which can be further
filtered using an analysis script.

Note: Because of current simpletrace limitations, the trace events are
logging at max 6 args, however, once the more args are supported, we can
change trace events to log more info as well. Also, This initial patch only
provides a replacement for existing debug infra. More trace events to be
added later for newly added handlers and sub-routines.

Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Harsh Prateek Bora <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agohw/9pfs: Add st_gen support for handle based fs driver
Harsh Prateek Bora [Wed, 12 Oct 2011 13:41:25 +0000 (19:11 +0530)]
hw/9pfs: Add st_gen support for handle based fs driver

Signed-off-by: Harsh Prateek Bora <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agohw/9pfs: Add st_gen support in getattr reply
Harsh Prateek Bora [Wed, 12 Oct 2011 13:41:25 +0000 (19:11 +0530)]
hw/9pfs: Add st_gen support in getattr reply

This patch use file system specific ioctl for getting i_generation
value. Not all file system support the ioctl. So we add an export
specific extended operation and assign right callback for the
file system that support i_generation ioctl

["M. Mohan Kumar" <[email protected]> we can do ioctl only for
regular files and directories on the server]

Signed-off-by: Harsh Prateek Bora <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agohw/9pfs: Add open flag mapping
M. Mohan Kumar [Wed, 12 Oct 2011 13:41:24 +0000 (19:11 +0530)]
hw/9pfs: Add open flag mapping

Some of the flags are OS/arch dependent we need to use
9P defined value on wire,

Based on the original patch from Venkateswararao Jujjuri <[email protected]>

Signed-off-by: M. Mohan Kumar <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agohw/9pfs: Ensure an error is reported to user if 9pfs mount tag is too long
Daniel P. Berrange [Wed, 12 Oct 2011 13:41:24 +0000 (19:11 +0530)]
hw/9pfs: Ensure an error is reported to user if 9pfs mount tag is too long

If the 9pfs mount tag is longer than MAX_TAG_LEN bytes, rather than
silently truncating the tag which will likely break the guest OS,
report an immediate error and exit QEMU

* hw/9pfs/virtio-9p-device.c: Report error & exit if mount tag is
  too long

Signed-off-by: Daniel P. Berrange <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agovirtio-9p: Use 9P specific Lock constants
M. Mohan Kumar [Wed, 12 Oct 2011 13:41:24 +0000 (19:11 +0530)]
virtio-9p: Use 9P specific Lock constants

Use 9P specific lock constants instead of arch specific lock constants.

Signed-off-by: M. Mohan Kumar <[email protected]>
Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agohw/9pfs: Fix build error on platform that don't support futimens
Aneesh Kumar K.V [Wed, 12 Oct 2011 13:41:24 +0000 (19:11 +0530)]
hw/9pfs: Fix build error on platform that don't support futimens

Also don't do glibc version check to find handle support. Instead
do handle syscall support in configure.

Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agoqemu-options.hx: Update virtfs command documentation
Aneesh Kumar K.V [Wed, 12 Oct 2011 13:41:24 +0000 (19:11 +0530)]
qemu-options.hx: Update virtfs command documentation

Clarify the virtfs option better
Updates from:Sripathi Kodi <[email protected]>

Signed-off-by: Aneesh Kumar K.V <[email protected]>
13 years agoMerge remote-tracking branch 'kwolf/for-anthony' into staging
Anthony Liguori [Fri, 14 Oct 2011 17:36:50 +0000 (12:36 -0500)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging

13 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Fri, 14 Oct 2011 15:47:33 +0000 (10:47 -0500)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

13 years agoMerge remote-tracking branch 'kraxel/usb.28' into staging
Anthony Liguori [Fri, 14 Oct 2011 15:46:35 +0000 (10:46 -0500)]
Merge remote-tracking branch 'kraxel/usb.28' into staging

13 years agoMerge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging
Anthony Liguori [Fri, 14 Oct 2011 15:44:52 +0000 (10:44 -0500)]
Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging

13 years agoblock: drop bdrv_has_async_rw()
Stefan Hajnoczi [Thu, 13 Oct 2011 20:09:32 +0000 (21:09 +0100)]
block: drop bdrv_has_async_rw()

Commit cd74d83345e0e3b708330ab8c4cd9111bb82cda6 ("block: switch
bdrv_read()/bdrv_write() to coroutines") removed the bdrv_has_async_rw()
callers.  This patch removes bdrv_has_async_rw() since it is no longer
used.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoblock: drop .bdrv_read()/.bdrv_write() emulation
Stefan Hajnoczi [Thu, 13 Oct 2011 20:09:31 +0000 (21:09 +0100)]
block: drop .bdrv_read()/.bdrv_write() emulation

There is no need to emulate .bdrv_read()/.bdrv_write() since these
interfaces are only called if aio and coroutine interfaces are not
present.  All valid BlockDrivers must implement either sync, aio, or
coroutine interfaces.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoblock: use coroutine interface for raw format
Stefan Hajnoczi [Thu, 13 Oct 2011 20:09:30 +0000 (21:09 +0100)]
block: use coroutine interface for raw format

The raw format delegates all operations to bs->file (the protocol).
Previously this block driver exposed both sync and aio interfaces.
Since the block layer now works in terms of coroutines, expose the
coroutine interfaces and drop the others.  This avoids unnecessary
emulation of sync and aio interfaces.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoraw-posix: remove bdrv_read()/bdrv_write()
Stefan Hajnoczi [Thu, 13 Oct 2011 20:09:29 +0000 (21:09 +0100)]
raw-posix: remove bdrv_read()/bdrv_write()

Block drivers only need to provide one of sync, aio, or coroutine
interfaces.  Since raw-posix.c provides aio interfaces, simply drop the
synchronous interfaces since they can be emulated using aio and
coroutines.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoblock: drop emulation functions that use coroutines
Stefan Hajnoczi [Thu, 13 Oct 2011 20:09:28 +0000 (21:09 +0100)]
block: drop emulation functions that use coroutines

Block drivers that implement coroutine functions used to get sync and
aio wrappers.  This is no longer necessary since all request processing
now happens in a coroutine.  If a block driver implements the coroutine
interface then none of the other interfaces will be invoked.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoblock/qcow: Fix use of free() instead of g_free()
Stefan Weil [Fri, 7 Oct 2011 05:32:47 +0000 (07:32 +0200)]
block/qcow: Fix use of free() instead of g_free()

cppcheck reported this error:

qemu/block/qcow.c:599: error: Mismatching allocation and deallocation: cluster_data

Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agosheepdog: correct spelling
Dong Xu Wang [Fri, 14 Oct 2011 07:41:06 +0000 (15:41 +0800)]
sheepdog: correct spelling

Reviewed-by: Andreas Färber <[email protected]>
Signed-off-by: Dong Xu Wang <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agotcg: Fix spelling in comment (varables -> variables)
Stefan Weil [Tue, 11 Oct 2011 17:43:15 +0000 (19:43 +0200)]
tcg: Fix spelling in comment (varables -> variables)

Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agoremove hpet.h
Paolo Bonzini [Tue, 11 Oct 2011 07:49:43 +0000 (09:49 +0200)]
remove hpet.h

It is unused since the HPET and RTC timers were removed (commit
25f3151, 2011-05-31).

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agoarm_pic: Fix typo
Andreas Färber [Sun, 9 Oct 2011 23:27:01 +0000 (01:27 +0200)]
arm_pic: Fix typo

interrput -> interrupt

Cc: Paul Brook <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agoqemu-char: Fix use of free() instead of g_free()
Stefan Weil [Fri, 7 Oct 2011 05:38:46 +0000 (07:38 +0200)]
qemu-char: Fix use of free() instead of g_free()

cppcheck reported these errors:

qemu-char.c:1667: error: Mismatching allocation and deallocation: s
qemu-char.c:1668: error: Mismatching allocation and deallocation: chr
qemu-char.c:1769: error: Mismatching allocation and deallocation: s
qemu-char.c:1770: error: Mismatching allocation and deallocation: chr

Tested-by: Dongxu Wang <[email protected]>
Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agoqemu-options: avoid #if in spicevmc texi help
Stefan Hajnoczi [Thu, 6 Oct 2011 10:24:12 +0000 (11:24 +0100)]
qemu-options: avoid #if in spicevmc texi help

Preprocessor directives cannot be used in STEXI/ETEXI sections since
they are not passed through the preprocessor.  The spicevmc chardev
option help currently uses #if, which is included verbatim in the man
page output.

Fix this by simply stating that spicevmc chardevs are available only in
builds with spice support.

Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agolinux-aio: Allow reads beyond the end of growable images
Kevin Wolf [Thu, 13 Oct 2011 13:42:52 +0000 (15:42 +0200)]
linux-aio: Allow reads beyond the end of growable images

This is the linux-aio version of commits 22afa7b5 (raw-posix, synchronous) and
ba1d1afd (posix-aio-compat). Reads now produce zeros after the end of file
instead of failing or resulting in short reads, making linux-aio compatible
with the behaviour of synchronous raw-posix requests and posix-aio-compat.

The problem can be reproduced like this:

dd if=/dev/zero of=/tmp/test.raw bs=1 count=1234
./qemu-io -k -n -g -c 'read -p 1024 512' /tmp/test.raw

Previously, the result of this was 'read failed: Invalid argument', now the
read completes successfully.

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
13 years agoblock: switch bdrv_aio_writev() to coroutines
Stefan Hajnoczi [Thu, 13 Oct 2011 12:08:25 +0000 (13:08 +0100)]
block: switch bdrv_aio_writev() to coroutines

More sync, aio, and coroutine unification.  Make bdrv_aio_writev() go
through coroutine request processing.

Remove the dirty block callback mechanism which was needed only for aio
processing and can be done more naturally in coroutine context.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoblock: mark blocks dirty on coroutine write completion
Stefan Hajnoczi [Thu, 13 Oct 2011 12:08:24 +0000 (13:08 +0100)]
block: mark blocks dirty on coroutine write completion

The aio write operation marks blocks dirty when the write operation
completes.  The coroutine write operation marks blocks dirty before
issuing the write operation.

It seems safest to mark the block dirty when the operation completes so
that anything tracking dirty blocks will not act before the change has
been made to the image file.

Make the coroutine write operation dirty blocks on write completion.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoblock: switch bdrv_aio_readv() to coroutines
Stefan Hajnoczi [Thu, 13 Oct 2011 12:08:23 +0000 (13:08 +0100)]
block: switch bdrv_aio_readv() to coroutines

More sync, aio, and coroutine unification.  Make bdrv_aio_readv() go
through coroutine request processing.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoblock: switch bdrv_read()/bdrv_write() to coroutines
Stefan Hajnoczi [Thu, 13 Oct 2011 12:08:22 +0000 (13:08 +0100)]
block: switch bdrv_read()/bdrv_write() to coroutines

The bdrv_read()/bdrv_write() functions call .bdrv_read()/.bdrv_write().
They should go through bdrv_co_do_readv() and bdrv_co_do_writev()
instead in order to unify request processing code across sync, aio, and
coroutine interfaces.  This is also an important step towards removing
BlockDriverState .bdrv_read()/.bdrv_write() in the future.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoblock: split out bdrv_co_do_readv() and bdrv_co_do_writev()
Stefan Hajnoczi [Wed, 5 Oct 2011 16:17:03 +0000 (17:17 +0100)]
block: split out bdrv_co_do_readv() and bdrv_co_do_writev()

The public interface for I/O in coroutine context is bdrv_co_readv() and
bdrv_co_writev().  Split out the request processing code into
bdrv_co_do_readv() and bdrv_co_writev() so that it can be called
internally when we refactor all request processing to use coroutines.

Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
This page took 0.072396 seconds and 4 git commands to generate.