qemu
15 years agoETRAX: Drop the _t for the internal PIC type.
Edgar E. Iglesias [Tue, 5 May 2009 10:41:35 +0000 (12:41 +0200)]
ETRAX: Drop the _t for the internal PIC type.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>

15 years agoETRAX: Simplify the interrupt controller model.
Edgar E. Iglesias [Tue, 5 May 2009 10:38:39 +0000 (12:38 +0200)]
ETRAX: Simplify the interrupt controller model.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>

15 years agoETRAX: Simplify interrupt signaling.
Edgar E. Iglesias [Tue, 5 May 2009 10:25:35 +0000 (12:25 +0200)]
ETRAX: Simplify interrupt signaling.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>

15 years agoFix compiler warnings in nwfpe code.
Paul Brook [Mon, 4 May 2009 14:19:04 +0000 (15:19 +0100)]
Fix compiler warnings in nwfpe code.

Signed-off-by: Paul Brook <paul@codesourcery.com>

15 years agotarget-mips: proper sign extension for 'SUBU rd, zero, rt'
Aurelien Jarno [Mon, 4 May 2009 07:54:57 +0000 (09:54 +0200)]
target-mips: proper sign extension for 'SUBU rd, zero, rt'

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

15 years agotarget-mips: fix comments about SUB/DSUB
Aurelien Jarno [Mon, 4 May 2009 07:36:22 +0000 (09:36 +0200)]
target-mips: fix comments about SUB/DSUB

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

15 years agoqemu-options.hx: fix description of cache=none suboption
Aurelien Jarno [Sun, 3 May 2009 21:29:14 +0000 (23:29 +0200)]
qemu-options.hx: fix description of cache=none suboption

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

15 years agoSuppress type mismatch warnings in VDE code.
Paul Brook [Sun, 3 May 2009 21:40:54 +0000 (22:40 +0100)]
Suppress type mismatch warnings in VDE code.

Signed-off-by: Paul Brook <paul@codesourcery.com>

15 years agominor fix of pci_register_bus()
Isaku Yamahata [Fri, 1 May 2009 09:33:53 +0000 (18:33 +0900)]
minor fix of pci_register_bus()

keep first_bus linked list correct.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>

15 years agouse PCI_HEADER_TYPE.
Isaku Yamahata [Sun, 3 May 2009 19:03:00 +0000 (19:03 +0000)]
use PCI_HEADER_TYPE.

use symbolic value instead of 0x0e and related value.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>

15 years agoFix typos in comments in exec.c
Stuart Brady [Sun, 3 May 2009 11:15:06 +0000 (12:15 +0100)]
Fix typos in comments in exec.c

This patch fixes several typos in comments in exec.c:

            longet -> longer
       recommanded -> recommended
        ajustments -> adjustments
   inconsistancies -> inconsistencies
           phsical -> physical
       positionned -> positioned
       succesfully -> successfully
      regon_offset -> region_offset

and also:

      start_region -> start_addr

Signed-off-by: Stuart Brady <stuart.brady@gmail.com>

15 years agoOptimize cmp x, 0 case
Blue Swirl [Sun, 3 May 2009 18:51:27 +0000 (18:51 +0000)]
Optimize cmp x, 0 case

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

15 years agoReindent
Blue Swirl [Sun, 3 May 2009 18:51:22 +0000 (18:51 +0000)]
Reindent

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

15 years agoHandle NULL bdrv.
Paul Brook [Sun, 3 May 2009 15:52:16 +0000 (16:52 +0100)]
Handle NULL bdrv.

Signed-off-by: Paul Brook <paul@codesourcery.com>

15 years agoImprove instruction name comments for easier searching
Blue Swirl [Sat, 2 May 2009 20:19:46 +0000 (20:19 +0000)]
Improve instruction name comments for easier searching

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

15 years agoClarify: dmmuregs[1] is not a typo
Blue Swirl [Sat, 2 May 2009 19:52:32 +0000 (22:52 +0300)]
Clarify: dmmuregs[1] is not a typo

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

15 years agoOptimize operations with immediate parameters
Blue Swirl [Sat, 2 May 2009 19:14:05 +0000 (19:14 +0000)]
Optimize operations with immediate parameters

15 years agoFix Sparc64 sign extension problems
Blue Swirl [Sat, 2 May 2009 18:58:57 +0000 (18:58 +0000)]
Fix Sparc64 sign extension problems

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

15 years agoFix hw/acpi.c build w/ DEBUG enabled
Alex Williamson [Wed, 14 May 2008 16:38:46 +0000 (10:38 -0600)]
Fix hw/acpi.c build w/ DEBUG enabled

Trivial build warning/fixes when the local DEBUG define is enabled.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agoMake sure not to fall through on error in loadvm
Anthony Liguori [Fri, 1 May 2009 14:36:03 +0000 (09:36 -0500)]
Make sure not to fall through on error in loadvm

This is from the KVM tree

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agoPci nic: pci_register_device can fail
Chris Wright [Mon, 21 Apr 2008 23:02:48 +0000 (16:02 -0700)]
Pci nic: pci_register_device can fail

The pci_register_device() call in PCI nic initialization routines can
fail.  Handle this failure and propagate a meaningful error message to
the user instead of generating a SEGV.

Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agoFix serial option with -drive
Anthony Liguori [Fri, 1 May 2009 14:26:16 +0000 (09:26 -0500)]
Fix serial option with -drive

This is from the KVM tree.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agoBuild fix for !CONFIG_GDBSTUB case
Xiantao Zhang [Thu, 27 Nov 2008 09:23:27 +0000 (17:23 +0800)]
Build fix for !CONFIG_GDBSTUB case

Once CONFIG_GDBSTUB not configured, compile will generate error.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agosuport device driver initialization model
Glauber Costa [Thu, 23 Apr 2009 19:20:55 +0000 (15:20 -0400)]
suport device driver initialization model

According to PnP specification, Appendix B, Option ROMs
that support DDIM (device driver initialization model) should
have their memory space writeable.

KVM deviates from us here, by removing the IO_MEM_ROM flag,
to allow for PCI option ROMs (they require DDIM). However,
there's absolutely no reason we can't do the same.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agofix virtio_blk_inhdr comment
Christoph Hellwig [Thu, 23 Apr 2009 10:58:51 +0000 (12:58 +0200)]
fix virtio_blk_inhdr comment

The inhdr is at the end of the S/G list, not the beginning.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agoqemu-io: Optionally verify only part of read data
Kevin Wolf [Thu, 23 Apr 2009 13:11:13 +0000 (15:11 +0200)]
qemu-io: Optionally verify only part of read data

There are reasonable test cases where a read must span areas that are not
uniformly filled with one pattern but contains several parts. This makes -P
useless for them currently.

Introducing additional options which determine the part of the read data that
should be verified with the given pattern allows to check such reads.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agoHardware watchdog
Richard W.M. Jones [Sat, 25 Apr 2009 12:56:19 +0000 (13:56 +0100)]
Hardware watchdog

Here is an updated hardware watchdog patch, which should fix
everything that was raised about the previous version ...

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agonet: Fix -net socket parameter checks
Jan Kiszka [Sun, 26 Apr 2009 16:53:42 +0000 (18:53 +0200)]
net: Fix -net socket parameter checks

My commit ea053add700d8abe203cd79a9ffb082aee4eabc0 broke -net socket by
overwriting an intermediate buffer in the added check_param. Fix this
by switching check_param to automatic buffer allocation and release, ie.
callers no longer have to worry about providing a scratch buffer.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agokvm: Avoid COW if KVM MMU is asynchronous
Jan Kiszka [Sun, 26 Apr 2009 16:03:40 +0000 (18:03 +0200)]
kvm: Avoid COW if KVM MMU is asynchronous

Avi Kivity wrote:
> Suggest wrapping in a function and hiding it deep inside kvm-all.c.
>

Done in v2:

---------->

If the KVM MMU is asynchronous (kernel does not support MMU_NOTIFIER),
we have to avoid COW for the guest memory. Otherwise we risk serious
breakage when guest pages change there physical locations due to COW
after fork. Seen when forking smbd during runtime via -smb.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agovnc: kill leftover debug statement.
Gerd Hoffmann [Mon, 27 Apr 2009 14:39:53 +0000 (16:39 +0200)]
vnc: kill leftover debug statement.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agovnc: no need to set force_update for incremental update requests.
Gerd Hoffmann [Mon, 27 Apr 2009 14:39:52 +0000 (16:39 +0200)]
vnc: no need to set force_update for incremental update requests.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agovnc: fix server surface pixel format.
Gerd Hoffmann [Mon, 27 Apr 2009 14:39:51 +0000 (16:39 +0200)]
vnc: fix server surface pixel format.

Format must be identical to the guest surface, we can't work with
the 32 bpp used by the default surface allocator.

Without this patch vnc doesn't get the conversions right when sending
pixel data to the client.  The bug triggers if
  (a) the client doesn't support WMVi, and
  (b) the guest screen depth is != 32 bpp.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agovirtio-blk: add SGI_IO passthru support
Christoph Hellwig [Mon, 27 Apr 2009 08:29:14 +0000 (10:29 +0200)]
virtio-blk: add SGI_IO passthru support

[had the qemu list address wrong the first time, reply to this message,
 not the previous if you were on Cc]

Add support for SG_IO passthru (packet commands) to the virtio-blk
backend.  Conceptually based on an older patch from Hannes Reinecke
but largely rewritten to match the code structure and layering in
virtio-blk.

Note that currently we issue the hose SG_IO synchronously.  We could
easily switch to async I/O, but that would required either bloating
the VirtIOBlockReq by the size of struct sg_io_hdr or an additional
memory allocation for each SG_IO request.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agoppc: include cache-utils.o in BLOCK_OBJS
Mark McLoughlin [Mon, 27 Apr 2009 17:38:42 +0000 (18:38 +0100)]
ppc: include cache-utils.o in BLOCK_OBJS

On ppc, cutils.o needs cache-utils.o or an undefined reference to
qemu_cache_conf results.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agovnc: fix segfault
Gerd Hoffmann [Mon, 27 Apr 2009 15:24:51 +0000 (17:24 +0200)]
vnc: fix segfault

Move down cmp_bytes initialization.  Must be after vga_hw_update()
call, because that one might change the screen depth.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agonet: Avoid gcc'ism in net_host_device_add
Jan Kiszka [Tue, 28 Apr 2009 19:25:58 +0000 (21:25 +0200)]
net: Avoid gcc'ism in net_host_device_add

>> +    if (net_client_init(device, opts ? : "") < 0) {
>
> Is this a gcc extension?  Do we want to introduce this construct to the
> code base.

Valid remark, fix below.

Thanks,
Jan

-------->

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agovnc: windup keypad keys for qemu console emulation
Gerd Hoffmann [Tue, 28 Apr 2009 10:06:47 +0000 (12:06 +0200)]
vnc: windup keypad keys for qemu console emulation

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agokvm: Relax aligment check of kvm_set_phys_mem
Jan Kiszka [Thu, 30 Apr 2009 08:17:39 +0000 (10:17 +0200)]
kvm: Relax aligment check of kvm_set_phys_mem

There is no need to reject an unaligned memory region registration if
the region will be I/O memory and it will not split an existing KVM
slot. This fixes KVM support on PPC.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

15 years agoRemove redundant cirrus vga ram functions.
Paul Brook [Fri, 1 May 2009 14:16:15 +0000 (15:16 +0100)]
Remove redundant cirrus vga ram functions.

Signed-off-by: Paul Brook <paul@codesourcery.com>

15 years agoRemove redundant #define
Consul [Thu, 30 Apr 2009 20:52:46 +0000 (13:52 -0700)]
Remove redundant #define

Suppress a warning
audio/dsoundaudio.c:35:1: warning: "WIN32_LEAN_AND_MEAN" redefined
<command line>:4:1: warning: this is the location of the previous definition

Signed-off-by: Alex Ivanov <void@aleksoft.net>

15 years agoRemove cpu_get_io_memory_{read,write}.
Paul Brook [Thu, 30 Apr 2009 17:37:55 +0000 (18:37 +0100)]
Remove cpu_get_io_memory_{read,write}.

Signed-off-by: Paul Brook <paul@codesourcery.com>

15 years agoRemove vga LFB accessor hacks.
Paul Brook [Thu, 30 Apr 2009 17:30:38 +0000 (18:30 +0100)]
Remove vga LFB accessor hacks.

These are redundant now that we remap the LFB ram area.

Signed-off-by: Paul Brook <paul@codesourcery.com>

15 years agogitignore qemu-options.texi
François Revol [Wed, 29 Apr 2009 19:04:10 +0000 (21:04 +0200)]
gitignore qemu-options.texi

$subj

François.

Signed-off-by: François Revol <revol@free.fr>

15 years agoFix qemu_event_init
Jan Kiszka [Wed, 29 Apr 2009 18:38:28 +0000 (18:38 +0000)]
Fix qemu_event_init

Falling through to "fail" made qemu_event_init() close the pipe fds
immediately again, breaking timer event notification.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

15 years agoFix powerpc 604 reset vector
Tristan Gingold [Tue, 28 Apr 2009 18:07:01 +0000 (18:07 +0000)]
Fix powerpc 604 reset vector

According to 604eUM_book (see 8.3.3 Reset inputs p8-54), the IP bit is set
for hreset and the vector is at offset 0x100 from the exception prefix.

No difference in this area between 604 and 604e.

Signed-off-by: Tristan Gingold <gingold@adacore.com>

15 years agoFix PPC reset
Blue Swirl [Tue, 28 Apr 2009 18:00:30 +0000 (18:00 +0000)]
Fix PPC reset

15 years agoSilence missing pkg-config error messages
Blue Swirl [Tue, 28 Apr 2009 17:05:24 +0000 (17:05 +0000)]
Silence missing pkg-config error messages

15 years agosparc64 fix context value for ITLB fault
Igor Kovalenko [Mon, 27 Apr 2009 20:10:08 +0000 (00:10 +0400)]
sparc64 fix context value for ITLB fault

Revert previous change to get_physical_address_code:
I/D MMU context register is shared, so using dmmuregs[1] is correct

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>

15 years agosparc64 fix TLB match code
Igor Kovalenko [Mon, 27 Apr 2009 19:06:33 +0000 (23:06 +0400)]
sparc64 fix TLB match code

TLB match code must respect page size, otherwise 4M page mappings may
be not found.

Also correct a typo in get_physical_address_code which should use IMMU
registers.

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>

--
Kind regards,
Igor V. Kovalenko

15 years agoSynch to VGA
Blue Swirl [Mon, 27 Apr 2009 18:10:37 +0000 (18:10 +0000)]
Synch to VGA

15 years ago[RESEND] Fix vga segfaults or screen corruption with large memory guests
Avi Kivity [Mon, 27 Apr 2009 17:57:12 +0000 (17:57 +0000)]
[RESEND] Fix vga segfaults or screen corruption with large memory guests

page0 and friends are ram addresses; a smaller size will overflow and
cause a segfault or random corruption.

Change them to ram_addr_t.

Signed-off-by: Avi Kivity <avi@redhat.com>

15 years agobuild system: Silence failing configure tests
Jan Kiszka [Mon, 27 Apr 2009 17:16:55 +0000 (17:16 +0000)]
build system: Silence failing configure tests

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

15 years agofix net.c compile warning
Robert Reif [Mon, 27 Apr 2009 17:11:36 +0000 (17:11 +0000)]
fix net.c compile warning

Fix net.c compile warning:

CC net.o
net.c: In function \91net_slirp_redir\92:
net.c:623: warning: format not a string literal and no format arguments

Signed-off-by: Robert Reif <reif@earthlink.net>

15 years agoRecognize V9 stores and CAS accesses as writes
Blue Swirl [Sat, 25 Apr 2009 19:07:16 +0000 (19:07 +0000)]
Recognize V9 stores and CAS accesses as writes

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

15 years agoFix a warning in sparc64-linux-user build
Blue Swirl [Sat, 25 Apr 2009 16:28:27 +0000 (16:28 +0000)]
Fix a warning in sparc64-linux-user build

15 years agoMerge branch 'master' of blueswir1@git.sv.gnu.org:/srv/git/qemu
Blue Swirl [Sat, 25 Apr 2009 15:26:25 +0000 (15:26 +0000)]
Merge branch 'master' of blueswir1@git.sv.gnu.org:/srv/git/qemu

15 years agosparc64 support TSB related MMU registers
Igor Kovalenko [Sat, 25 Apr 2009 14:17:25 +0000 (18:17 +0400)]
sparc64 support TSB related MMU registers

Posting updated patch to the list...

>>> On Fri, Apr 24, 2009 at 9:42 PM, Blue Swirl <blauwirbel@gmail.com> wrote:
>>>  >
>>>  > Nice, though I didn't notice any visible improvement in my tests.
>>>
>>> This early in boot process there is not much to output; and I test
>>>  recent kernel which may use different startup sequence.
>>>  I modified openbios cif handler to output arguments and I now can see
>>>  visible difference.
>>>
>>>
>>>  >
>>>  > About the patch, there are a few problems:
>>>  > - it breaks Sparc32
>>>
>>> You mean it stops working?
>>
>> Does not even build.

Fixed now.

>>>  > - commented out code is ugly
>>>  > - if and else should be on the same line as '{' or '}'
>>>  > - long lines should be wrapped
>>>  > - in the line:
>>>  > +    return (((tag_access_register & 0x1fff)<<48)|(tag_access_register >> 22));
>>>  >  there should be white space between ) and << and 48.
>>>  >
>>>

>>
>> Also the ")|(" in between is crowded.
>>
>> Maybe the coding style does not describe this well enough.

BTW Supplying indent template would be great.

Please see the updated patch qemu-sparc64-tsb-asi-2.patch attached.

--
Kind regards,
Igor V. Kovalenko

15 years agoCRIS: cris_mmu_result_t -> cris_mmu_result
Edgar E. Iglesias [Sat, 25 Apr 2009 13:51:53 +0000 (15:51 +0200)]
CRIS: cris_mmu_result_t -> cris_mmu_result

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>

15 years agoFix Win32 warning
Blue Swirl [Sat, 25 Apr 2009 12:56:37 +0000 (12:56 +0000)]
Fix Win32 warning

15 years agoFix compilation when x86_64 is defined
Blue Swirl [Sat, 25 Apr 2009 08:00:11 +0000 (08:00 +0000)]
Fix compilation when x86_64 is defined

15 years agoFix warning
Blue Swirl [Sat, 25 Apr 2009 07:31:43 +0000 (07:31 +0000)]
Fix warning

15 years agoblock-vvfat: fix a warning
Aurelien Jarno [Fri, 24 Apr 2009 22:08:05 +0000 (00:08 +0200)]
block-vvfat: fix a warning

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

15 years agoqemu: introduce iothread (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:04:07 +0000 (18:04 +0000)]
qemu: introduce iothread (Marcelo Tosatti)

Fill in the hooks and introduce iothread.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7248 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: handle stop request in main loop (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:04:02 +0000 (18:04 +0000)]
qemu: handle stop request in main loop (Marcelo Tosatti)

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7247 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: refactor tcg cpu execution loop (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:03:57 +0000 (18:03 +0000)]
qemu: refactor tcg cpu execution loop (Marcelo Tosatti)

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7246 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: use debug_requested global instead of cpu_exec return (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:03:54 +0000 (18:03 +0000)]
qemu: use debug_requested global instead of cpu_exec return (Marcelo Tosatti)

Necessary for the next refactoring patch.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7245 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: introduce lock/unlock_iothread (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:03:49 +0000 (18:03 +0000)]
qemu: introduce lock/unlock_iothread (Marcelo Tosatti)

Hook to allow iothread to drop the global mutex.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7244 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: introduce qemu_cpu_kick (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:03:45 +0000 (18:03 +0000)]
qemu: introduce qemu_cpu_kick (Marcelo Tosatti)

To notify cpu of pending interrupt.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7243 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: introduce qemu_init_vcpu (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:03:41 +0000 (18:03 +0000)]
qemu: introduce qemu_init_vcpu (Marcelo Tosatti)

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7242 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: refactor main_loop (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:03:33 +0000 (18:03 +0000)]
qemu: refactor main_loop (Marcelo Tosatti)

Break main loop into 3 main functions.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7241 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: factor out event notification / rearm alarm timer on main_loop_wait (Marcelo...
aliguori [Fri, 24 Apr 2009 18:03:29 +0000 (18:03 +0000)]
qemu: factor out event notification / rearm alarm timer on main_loop_wait (Marcelo Tosatti)

Special events that have no particular event descriptor (either fd for UNIX
or HANDLE for Windows) associated with make use of an artificial one.

Factor the alarm timer notification so that it can be used for other events,
and move dyntick timer rearm to main_loop_wait.

aliguori: made sure to return a value in qemu_event_init() on win32

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7240 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: introduce qemu_init_main_loop (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:03:25 +0000 (18:03 +0000)]
qemu: introduce qemu_init_main_loop (Marcelo Tosatti)

Hook to allow iothread initialization.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7239 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: per-arch cpu_has_work (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:03:20 +0000 (18:03 +0000)]
qemu: per-arch cpu_has_work (Marcelo Tosatti)

Blue Swirl: fix Sparc32 breakage

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7238 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: mutex/thread/cond wrappers and configure tweaks (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:03:15 +0000 (18:03 +0000)]
qemu: mutex/thread/cond wrappers and configure tweaks (Marcelo Tosatti)

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7237 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu: create helper for event notification (Marcelo Tosatti)
aliguori [Fri, 24 Apr 2009 18:03:11 +0000 (18:03 +0000)]
qemu: create helper for event notification (Marcelo Tosatti)

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7236 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix typo, thanks to Andreas Faerber for spotting
blueswir1 [Thu, 23 Apr 2009 18:42:30 +0000 (18:42 +0000)]
Fix typo, thanks to Andreas Faerber for spotting

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7235 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoUse a more natural order
blueswir1 [Thu, 23 Apr 2009 18:29:47 +0000 (18:29 +0000)]
Use a more natural order

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7234 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix i386-linux-user build (Laurent Desnogues)
aliguori [Thu, 23 Apr 2009 13:16:56 +0000 (13:16 +0000)]
Fix i386-linux-user build (Laurent Desnogues)

This broke due to r7230.

Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7233 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agomonitor: Fix warning in do_info_numa (Jan Kiszka)
aliguori [Wed, 22 Apr 2009 20:20:29 +0000 (20:20 +0000)]
monitor: Fix warning in do_info_numa (Jan Kiszka)

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7232 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoChange RTC time drift IRQ re-injection (Gleb Natapov)
aliguori [Wed, 22 Apr 2009 20:20:22 +0000 (20:20 +0000)]
Change RTC time drift IRQ re-injection (Gleb Natapov)

Currently IRQ are reinjected as soon as they are acknowledged to
the RTC, but Windows sometimes do acknowledgement in a loop with
global interrupt disabled waiting for interrupt to be cleared and
it does not mask RTC vector in PIC/APIC while doing this. In such
situation interrupt injection always fails and RTC interrupt is never
cleared.

Instead of reinjecting coalesced IRQs on acknowledgement the patch below
reinjects them by accelerating RTC clock a bit. This way RTC interrupt
is not constantly raced after coalesced interrupt.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7231 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoput valid data into exit_int_info if needed (Gleb Natapov)
aliguori [Wed, 22 Apr 2009 20:20:07 +0000 (20:20 +0000)]
put valid data into exit_int_info if needed (Gleb Natapov)

If fault happened during event delivery exit_int_info should contain
valid info about the event on vm exit.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7230 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoimplement qemu_blockalign (Stefano Stabellini)
aliguori [Wed, 22 Apr 2009 20:20:00 +0000 (20:20 +0000)]
implement qemu_blockalign (Stefano Stabellini)

this patch adds a buffer_alignment field to BlockDriverState and
implements a qemu_blockalign function that uses that field to allocate a
memory aligned buffer to be used by the block driver.
buffer_alignment is initialized to 512 but each block driver can set
a different value (at the moment none of them do).
This patch modifies ide.c, block-qcow.c, block-qcow2.c and block.c to
use qemu_blockalign instead of qemu_memalign.
There is only one place left that still uses qemu_memalign to allocate
buffers used by block drivers that is posix-aio-compat:handle_aiocb_rw
because it is not possible to get the BlockDriverState from that
function. However I think it is not important because posix-aio-compat
already deals with driver specific code so it is supposed to know its
own needs.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7229 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoxen: add -vga xenfb option, configure xenfb (Gerd Hoffmann)
aliguori [Wed, 22 Apr 2009 15:19:53 +0000 (15:19 +0000)]
xen: add -vga xenfb option, configure xenfb (Gerd Hoffmann)

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7228 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agosimplify vga selection (Gerd Hoffmann)
aliguori [Wed, 22 Apr 2009 15:19:48 +0000 (15:19 +0000)]
simplify vga selection (Gerd Hoffmann)

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7227 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoxen: pv domain builder. (Gerd Hoffmann)
aliguori [Wed, 22 Apr 2009 15:19:44 +0000 (15:19 +0000)]
xen: pv domain builder. (Gerd Hoffmann)

This adds domain building support for paravirtual domains to qemu.
This allows booting xen guests directly with qemu, without Xend
and the management stack.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7226 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoxen: blk & nic configuration via cmd line. (Gerd Hoffmann)
aliguori [Wed, 22 Apr 2009 15:19:39 +0000 (15:19 +0000)]
xen: blk & nic configuration via cmd line. (Gerd Hoffmann)

This patch makes qemu create backend and frontend device entries in
xenstore for devices configured on the command line.  It will use
qdisk and qnic backend names, so the qemu internal backends will
be used.

Disks can be created using -drive if=xen,file=...
Nics can be created using -net nic,macaddr=...

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7225 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoxen: add net backend driver. (Gerd Hoffmann)
aliguori [Wed, 22 Apr 2009 15:19:35 +0000 (15:19 +0000)]
xen: add net backend driver. (Gerd Hoffmann)

This patch adds a network interface backend driver to qemu.  It is a pure
userspace implemention using the gntdev interface.  It uses "qnet" as
backend name in xenstore so it doesn't interfere with the netback
backend (aka "vnif").

The network backend is hooked into the corrosponding qemu vlan, i.e.
vif 0 is hooked into vlan 0.  To make the packages actually arrive
somewhere you additionally have to link the vlan to the outside world
using the usual qemu command line options such as "-net tap,...".

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7224 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoxen: add block device backend driver. (Gerd Hoffmann)
aliguori [Wed, 22 Apr 2009 15:19:30 +0000 (15:19 +0000)]
xen: add block device backend driver. (Gerd Hoffmann)

This patch adds a block device backend driver to qemu.  It is a pure
userspace implemention using the gntdev interface.  It uses "qdisk" as
backend name in xenstore so it doesn't interfere with the other existing
backends (blkback aka "vbd" and tapdisk aka "tap").

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7223 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoxen: add framebuffer backend driver (Gerd Hoffmann)
aliguori [Wed, 22 Apr 2009 15:19:25 +0000 (15:19 +0000)]
xen: add framebuffer backend driver (Gerd Hoffmann)

This patch adds a frsamebuffer (and kbd+mouse) backend driver.  It
it based on current xen-unstable code.  It has been changed to make
use of the common backend driver code.  It also has been changed to
compile with xen headers older than release 3.3

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7222 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoxen: add console backend driver. (Gerd Hoffmann)
aliguori [Wed, 22 Apr 2009 15:19:19 +0000 (15:19 +0000)]
xen: add console backend driver. (Gerd Hoffmann)

This patch adds a xenconsole backend driver.  It it based on current
xen-unstable code.  It has been changed to make use of the common
backend driver code.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7221 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoxen: backend driver core (Gerd Hoffmann)
aliguori [Wed, 22 Apr 2009 15:19:15 +0000 (15:19 +0000)]
xen: backend driver core (Gerd Hoffmann)

This patch adds infrastructure for xen backend drivers living in qemu,
so drivers don't need to implement common stuff on their own.  It's
mostly xenbus management stuff: some functions to access xentore,
setting up xenstore watches, callbacks on device discovery and state
changes, handle event channel, ...

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7220 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoxen: groundwork for xen support (Gerd Hoffmann)
aliguori [Wed, 22 Apr 2009 15:19:10 +0000 (15:19 +0000)]
xen: groundwork for xen support (Gerd Hoffmann)

- configure script and build system changes.
- wind up new machine type.
- add -xen-* command line options.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7219 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoupdate .gitignore: add qemu-io (Gerd Hoffmann)
aliguori [Wed, 22 Apr 2009 13:05:35 +0000 (13:05 +0000)]
update .gitignore: add qemu-io (Gerd Hoffmann)

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7218 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqcow2: Add plausibility check for L1/L2 entries (Kevin Wolf)
aliguori [Tue, 21 Apr 2009 23:12:02 +0000 (23:12 +0000)]
qcow2: Add plausibility check for L1/L2 entries (Kevin Wolf)

From: Kevin Wolf <kwolf@redhat.com>

All L1 and L2 entries must point at the start of a cluster. If there is some
offset into the cluster, the entry is corrupted.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7217 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqcow2: Refcount checking code cleanup (Kevin Wolf)
aliguori [Tue, 21 Apr 2009 23:11:58 +0000 (23:11 +0000)]
qcow2: Refcount checking code cleanup (Kevin Wolf)

This is purely cosmetical changes to make the code easier to read. Move L2
table processing from a deeply nested block to its own function, add some
comments.

Patch v2: Fix misplaced bracket causing false positives

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7216 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoIntroduce qemu-img check subcommand (Kevin Wolf)
aliguori [Tue, 21 Apr 2009 23:11:53 +0000 (23:11 +0000)]
Introduce qemu-img check subcommand (Kevin Wolf)

From: Kevin Wolf <kwolf@redhat.com>

Now that block drivers can provide check functions, expose them through
qemu-img.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7215 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoIntroduce bdrv_check (Kevin Wolf)
aliguori [Tue, 21 Apr 2009 23:11:50 +0000 (23:11 +0000)]
Introduce bdrv_check (Kevin Wolf)

From: Kevin Wolf <kwolf@redhat.com>

Introduce a new bdrv_check function pointer for block drivers. Modify qcow2 to
return an error status in check_refcounts(), so it can implement bdrv_check.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7214 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqcow2: Fix warnings in check_refcount() (Kevin Wolf)
aliguori [Tue, 21 Apr 2009 23:11:45 +0000 (23:11 +0000)]
qcow2: Fix warnings in check_refcount() (Kevin Wolf)

From: Kevin Wolf <kwolf@redhat.com>

This code is currently only compiled when DEBUG_ALLOC is defined, so you
usually don't see compiler warnings on it. This patch series wants to enable
the code, so fix the format string warnings first.

While we're at it, let's print error messages to stderr.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7213 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agosending NUMA topology to BIOS (Andre Przywara)
aliguori [Tue, 21 Apr 2009 22:31:41 +0000 (22:31 +0000)]
sending NUMA topology to BIOS (Andre Przywara)

uses the QEMU firmware configuration interfacce to send the NUMA
topology to the BIOS, which has to setup the tables. Only one firmware
configuration channel is used.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7212 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoadd info numa command to monitor (Andre Przywara)
aliguori [Tue, 21 Apr 2009 22:30:47 +0000 (22:30 +0000)]
add info numa command to monitor (Andre Przywara)

adds an "info numa" command to the monitor to output the current
topology. Since NUMA is advertised via static ACPI tables, no changes are
possible during runtime.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7211 c046a42c-6fe2-441c-8c8c-71466251a162