]> git.proxmox.com Git - qemu.git/log
qemu.git
13 years agoAdd get_fw_dev_path callback for pci bus.
Gleb Natapov [Wed, 8 Dec 2010 11:35:01 +0000 (13:35 +0200)]
Add get_fw_dev_path callback for pci bus.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoAdd get_fw_dev_path callback for system bus.
Gleb Natapov [Wed, 8 Dec 2010 11:35:00 +0000 (13:35 +0200)]
Add get_fw_dev_path callback for system bus.

Prints out mmio or pio used to access child device.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoAdd get_fw_dev_path callback to IDE bus.
Gleb Natapov [Wed, 8 Dec 2010 11:34:59 +0000 (13:34 +0200)]
Add get_fw_dev_path callback to IDE bus.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoStore IDE bus id in IDEBus structure for easy access.
Gleb Natapov [Wed, 8 Dec 2010 11:34:58 +0000 (13:34 +0200)]
Store IDE bus id in IDEBus structure for easy access.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoAdd get_fw_dev_path callback to ISA bus in qdev.
Gleb Natapov [Wed, 8 Dec 2010 11:34:57 +0000 (13:34 +0200)]
Add get_fw_dev_path callback to ISA bus in qdev.

Use device ioports to create unique device path.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoKeep track of ISA ports ISA device is using in qdev.
Gleb Natapov [Wed, 8 Dec 2010 11:34:56 +0000 (13:34 +0200)]
Keep track of ISA ports ISA device is using in qdev.

Store all io ports used by device in ISADevice structure.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoIntroduce new BusInfo callback get_fw_dev_path.
Gleb Natapov [Wed, 8 Dec 2010 11:34:55 +0000 (13:34 +0200)]
Introduce new BusInfo callback get_fw_dev_path.

New get_fw_dev_path callback will be used for build device path usable
by firmware in contrast to qdev qemu internal device path.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoIntroduce fw_name field to DeviceInfo structure.
Gleb Natapov [Wed, 8 Dec 2010 11:34:54 +0000 (13:34 +0200)]
Introduce fw_name field to DeviceInfo structure.

Add "fw_name" to DeviceInfo to use in device path building. In
contrast to "name" "fw_name" should refer to functionality device
provides instead of particular device model like "name" does.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agomonitor: implement x86 info mem for PAE and long modes
Blue Swirl [Sat, 11 Dec 2010 18:56:27 +0000 (18:56 +0000)]
monitor: implement x86 info mem for PAE and long modes

'info mem' didn't show correct information for PAE mode and
x86_64 long mode.

Fix by implementing the output for missing modes.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agomonitor: implement x86 info tlb for PAE and long modes
Blue Swirl [Sat, 11 Dec 2010 18:56:24 +0000 (18:56 +0000)]
monitor: implement x86 info tlb for PAE and long modes

'info tlb' didn't show correct information for PAE mode and
x86_64 long mode.

Implement the missing modes. Also print NX bit for PAE and long modes.
Fix off-by-one error in 32 bit mode mask.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agowdt_i6300esb: register a reset function
Bernhard Kohl [Wed, 8 Dec 2010 14:59:55 +0000 (15:59 +0100)]
wdt_i6300esb: register a reset function

The device shall set its default hardware state after each reset.
This includes that the timer is stopped which is especially important
if the guest does a reboot independantly of a watchdog bite. I moved
the initialization of the state variables completely from the init
to the reset function which is called right after init during the
first boot and afterwards during each reboot.

Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoisa-bus.c: use hw_error instead of fprintf
Tristan Gingold [Fri, 3 Dec 2010 11:05:03 +0000 (12:05 +0100)]
isa-bus.c: use hw_error instead of fprintf

Minor clean-up in isa-bus.c.  Using hw_error is more consistent.
There is a difference however: hw_error dumps the cpu state.

Signed-off-by: Tristan Gingold <gingold@adacore.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agousb_ohci: Always use little endian
Alexander Graf [Wed, 8 Dec 2010 11:05:50 +0000 (12:05 +0100)]
usb_ohci: Always use little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Because we don't depend on the target endianness anymore, we can also
move the driver over to Makefile.objs.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoisa_mmio: Always use little endian
Alexander Graf [Wed, 8 Dec 2010 11:05:49 +0000 (12:05 +0100)]
isa_mmio: Always use little endian

This patch converts the ISA MMIO bridge code to always use little endian mmio.
All bswap code that existed was only there to convert from native cpu
endianness to little endian ISA devices.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoheathrow_pic: Declare as little endian
Alexander Graf [Wed, 8 Dec 2010 11:05:48 +0000 (12:05 +0100)]
heathrow_pic: Declare as little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agortl8139: Declare as little endian
Alexander Graf [Wed, 8 Dec 2010 11:05:47 +0000 (12:05 +0100)]
rtl8139: Declare as little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Because we don't depend on the target endianness anymore, we can also
move the driver over to Makefile.objs.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoopenpic: Replace explicit byte swap with endian hints
Alexander Graf [Wed, 8 Dec 2010 11:05:46 +0000 (12:05 +0100)]
openpic: Replace explicit byte swap with endian hints

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoppc4xx_pci: Declare as little endian
Alexander Graf [Wed, 8 Dec 2010 11:05:45 +0000 (12:05 +0100)]
ppc4xx_pci: Declare as little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoversatile_pci: Declare as little endian
Alexander Graf [Wed, 8 Dec 2010 11:05:44 +0000 (12:05 +0100)]
versatile_pci: Declare as little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoprep: Declare as little endian
Alexander Graf [Wed, 8 Dec 2010 11:05:43 +0000 (12:05 +0100)]
prep: Declare as little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoe1000: Make little endian
Alexander Graf [Wed, 8 Dec 2010 11:05:42 +0000 (12:05 +0100)]
e1000: Make little endian

The e1000 has compatibility code to handle big endianness which makes it
mandatory to be recompiled on different targets.

With the generic mmio endianness solution, there's no need for that anymore.
We just declare all mmio to be little endian and call it a day.

Because we don't depend on the target endianness anymore, we can also
move the driver over to Makefile.objs.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agouninorth: Get rid of bswap
Alexander Graf [Wed, 8 Dec 2010 11:05:41 +0000 (12:05 +0100)]
uninorth: Get rid of bswap

There's no need to bswap once we correctly set the mmio to be little endian.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agopci-host: Delegate bswap to mmio layer
Alexander Graf [Wed, 8 Dec 2010 11:05:40 +0000 (12:05 +0100)]
pci-host: Delegate bswap to mmio layer

The only reason we have bswap versions of the pci host code is that
most pci host devices are little endian. The ppc e500 is the only
odd one here, being big endian.

So let's directly pass the endianness down to the mmio layer and not
worry about it on the pci host layer.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agodbdma: Make little endian
Alexander Graf [Wed, 8 Dec 2010 11:05:39 +0000 (12:05 +0100)]
dbdma: Make little endian

The device is only used on big endian systems, but always byte swaps. That's
a very good indicator that it's actually a little endian device ;-).

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoMake simple io mem handler endian aware
Alexander Graf [Wed, 8 Dec 2010 11:05:38 +0000 (12:05 +0100)]
Make simple io mem handler endian aware

As an alternative to the 3 individual handlers, there is also a simplified
io mem hook function. To be consistent, let's add an endianness parameter
there too.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoAdd endianness as io mem parameter
Alexander Graf [Wed, 8 Dec 2010 11:05:37 +0000 (12:05 +0100)]
Add endianness as io mem parameter

As stated before, devices can be little, big or native endian. The
target endianness is not of their concern, so we need to push things
down a level.

This patch adds a parameter to cpu_register_io_memory that allows a
device to choose its endianness. For now, all devices simply choose
native endian, because that's the same behavior as before.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoexec: introduce endianness swapped mmio
Alexander Graf [Wed, 8 Dec 2010 11:05:36 +0000 (12:05 +0100)]
exec: introduce endianness swapped mmio

The way we're currently modeling mmio is too simplified. We assume that
every device has the same endianness as the target CPU. In reality,
most devices are little endian (all PCI and ISA ones I'm aware of). Some
are big endian (special system devices) and a very little fraction is
target native endian (fw_cfg).

So instead of assuming every device to be native endianness, let's move
to a model where the device tells us which endianness it's in.

That way we can compile the devices only once and get rid of all the ugly
swap will be done by the underlying layer.

For the same of readability, this patch only introduces the helper framework
but doesn't allow the registering code to set its endianness yet.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agonoaudio: fix return value for read()
Michael Walle [Wed, 8 Dec 2010 23:34:51 +0000 (00:34 +0100)]
noaudio: fix return value for read()

Read should return bytes instead of samples.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: malc <av1474@comtv.ru>
13 years agovnc/spice: add set_passwd monitor command.
Gerd Hoffmann [Thu, 7 Oct 2010 10:22:54 +0000 (12:22 +0200)]
vnc/spice: add set_passwd monitor command.

This patch adds new set_password and expire_password monitor commands
which allows to change and expire the password for spice and vnc
connections.  See the doc update patch chunk for details.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agovnc: support password expire
Gerd Hoffmann [Thu, 7 Oct 2010 09:50:45 +0000 (11:50 +0200)]
vnc: support password expire

This patch adds support for expiring passwords to vnc.  It adds a new
vnc_display_pw_expire() function which specifies the time when the
password will expire.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agovnc: auth reject cleanup
Gerd Hoffmann [Thu, 7 Oct 2010 09:50:24 +0000 (11:50 +0200)]
vnc: auth reject cleanup

protocol_client_auth_vnc() has two places where the auth can fail,
with identical code sending the reject message to the client.
Move the common code to the end of the function and make both
error paths jump there.  No functional change.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agospice: add qmp 'query-spice' and hmp 'info spice' commands.
Gerd Hoffmann [Tue, 30 Nov 2010 10:02:51 +0000 (11:02 +0100)]
spice: add qmp 'query-spice' and hmp 'info spice' commands.

The patch adds a 'query-spice' monitor command which returns
informations about the spice server configuration and also a list of
channel connections.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agospice: connection events.
Gerd Hoffmann [Mon, 11 Oct 2010 16:03:51 +0000 (18:03 +0200)]
spice: connection events.

This patch adds support for connection events to spice.  The events are
quite simliar to the vnc events.  Unlike vnc spice uses multiple tcp
channels though.  qemu will report every single tcp connection (aka
spice channel).  If you want track spice sessions only you can filter
for the main channel (channel-type == 1).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agospice: add qxl device
Gerd Hoffmann [Tue, 27 Apr 2010 09:50:11 +0000 (11:50 +0200)]
spice: add qxl device

qxl is a paravirtual graphics card.  The qxl device is the bridge
between the guest and the spice server (aka libspice-server).  The
spice server will send the rendering commands to the spice client, which
will actually render them.

The spice server is also able to render locally, which is done in case
the guest wants read something from video memory.  Local rendering is
also used to support display over vnc and sdl.

qxl is activated using "-vga qxl".  qxl supports multihead, additional
cards can be added via '-device qxl".

[ v2: add copyright to files                     ]
[ v2: use qemu-common.h for standard includes    ]
[ v2: create separate qxl-vga device for primary ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agospice: add qxl vgabios binary.
Gerd Hoffmann [Tue, 30 Nov 2010 10:54:33 +0000 (11:54 +0100)]
spice: add qxl vgabios binary.

Just compiled from vgabios git repo @ git.qemu.org,
copyed over and committed.  Also added to the list
of blobs in the Makefile.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agopci/aer: factor out common code
Michael S. Tsirkin [Wed, 8 Dec 2010 08:46:28 +0000 (17:46 +0900)]
pci/aer: factor out common code

Same logic is used to assert interrupts
and send msix messages, so add a static functin for this.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agopci/aer: remove dead code
Michael S. Tsirkin [Wed, 8 Dec 2010 08:46:27 +0000 (17:46 +0900)]
pci/aer: remove dead code

Remove some unused variables and return values.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
13 years agopci/aer: fix interrupt on config write
Michael S. Tsirkin [Wed, 8 Dec 2010 08:46:26 +0000 (17:46 +0900)]
pci/aer: fix interrupt on config write

config write handling for aer seems broken:
For example, it won't clear a level interrupt
when command register is set to 0.

Make it match the spec: level should equal
the logical or of enabled bits, msi only
be sent when the logical or changes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
13 years agopci/aer: fix error injection
Michael S. Tsirkin [Wed, 8 Dec 2010 08:46:25 +0000 (17:46 +0900)]
pci/aer: fix error injection

Fix the injection logic upon aer message to follow 6.2.4.1.2 more
closely: specifically only send an msi interrupt when the logical or of
the enabled bits changed, not when a bit which was previously clear
becomes set.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
13 years agoMakefile: make msix/msi depend on CONFIG_PCI
Michael S. Tsirkin [Wed, 8 Dec 2010 08:46:24 +0000 (17:46 +0900)]
Makefile: make msix/msi depend on CONFIG_PCI

Possible now that pci is not depending on these.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agopci: untangle pci/msi dependency
Michael S. Tsirkin [Wed, 8 Dec 2010 08:46:23 +0000 (17:46 +0900)]
pci: untangle pci/msi dependency

msi depends on pci but pci should not depend on msi.
The only dependency we have is a recent addition
of pci_msi_ functions, IMO they add little enough to
open-code in the small number of users.

Follow-up patches add more cleanups.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
13 years agopci: make command SERR bit writable
Isaku Yamahata [Fri, 26 Nov 2010 12:01:41 +0000 (21:01 +0900)]
pci: make command SERR bit writable

pcie aer needs SERR bit to be writable, and the PCI spec requires
this as well.  For compatibility, introduce compat global property
command_serr_enable and make this bit readonly for a pre 0.14 pc
machine.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agovirtio-net: stop/start bh when appropriate
Michael S. Tsirkin [Mon, 22 Nov 2010 17:52:30 +0000 (19:52 +0200)]
virtio-net: stop/start bh when appropriate

Avoid sending out packets, and modifying
memory, when VM is stopped.
Add assert statements to verify this does not happen.

Avoid scheduling bh when vhost-net is started.

Stop bh when driver disabled bus mastering
(we must not access memory after this).

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Jason Wang <jasowang@redhat.com>
13 years agovirtio-net: don't dma while vm is stopped
Michael S. Tsirkin [Mon, 22 Nov 2010 17:52:19 +0000 (19:52 +0200)]
virtio-net: don't dma while vm is stopped

DMA into memory while VM is stopped makes it
hard to debug migration (consequitive saves
result in different files).
Fixing this completely is a large effort,
this patch does this for virtio-net.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Jason Wang <jasowang@redhat.com>
13 years agomigration/savevm: no need to flush requests
Michael S. Tsirkin [Mon, 22 Nov 2010 17:52:26 +0000 (19:52 +0200)]
migration/savevm: no need to flush requests

There's no need to flush requests after vmstop
as vmstop does it for us automatically now.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Jason Wang <jasowang@redhat.com>
13 years agocpus: flush all requests on each vm stop
Michael S. Tsirkin [Mon, 22 Nov 2010 17:52:22 +0000 (19:52 +0200)]
cpus: flush all requests on each vm stop

Flush all requests once we have stopped all
cpus and devices.
Make sure disk is in consistent state.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Jason Wang <jasowang@redhat.com>
Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
13 years agonet/sock: option to specify local address
Mike Ryan [Wed, 1 Dec 2010 19:16:47 +0000 (11:16 -0800)]
net/sock: option to specify local address

Add an option to specify the host IP to send multicast packets from,
when using a multicast socket for networking. The option takes an IP
address and sets the IP_MULTICAST_IF socket option, which causes the
packets to use that IP's interface as an egress.

This is useful if the host machine has several interfaces with several
virtual networks across disparate interfaces.

Signed-off-by: Mike Ryan <mikeryan@ISI.EDU>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agoppc: kvm: fix signedness warning
Alexander Graf [Thu, 25 Nov 2010 07:20:46 +0000 (08:20 +0100)]
ppc: kvm: fix signedness warning

I get a warning on a signed comparison with an unsigned variable, so
let's make the variable signed and be happy.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
13 years agoARM: Implement VCVT to 16 bit integer using new softfloat routines
Peter Maydell [Tue, 7 Dec 2010 15:37:34 +0000 (15:37 +0000)]
ARM: Implement VCVT to 16 bit integer using new softfloat routines

Use the softfloat conversion routines for conversion to 16 bit
integers, because just casting to a 16 bit type truncates the
value rather than saturating it at 16-bit MAXINT/MININT.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agosoftfloat: Add float/double to 16 bit integer conversion functions
Peter Maydell [Tue, 7 Dec 2010 15:37:34 +0000 (15:37 +0000)]
softfloat: Add float/double to 16 bit integer conversion functions

The ARM architecture needs float/double to 16 bit integer conversions.
(The 32 bit versions aren't sufficient because of the requirement
to saturate at 16 bit MAXINT/MININT and to get the exception bits right.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agoARM: Ignore top 16 bits when doing VCVT from 16 bit fixed point
Peter Maydell [Tue, 7 Dec 2010 15:37:34 +0000 (15:37 +0000)]
ARM: Ignore top 16 bits when doing VCVT from 16 bit fixed point

VCVT of 16 bit fixed point to float should ignore the top 16 bits
of the source register. Cast to int16_t and friends rather than
int16 -- the former is guaranteed exactly 16 bits wide where the
latter is merely at least 16 bits wide (and so is usually 32 bits).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agoARM: Return correct result for single<->double conversion of NaN
Peter Maydell [Tue, 7 Dec 2010 15:37:34 +0000 (15:37 +0000)]
ARM: Return correct result for single<->double conversion of NaN

The ARM ARM defines that if the input to a single<->double conversion
is a NaN then the output is always forced to be a quiet NaN by setting
the most significant bit of the fraction part.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agosoftfloat: Add float*_maybe_silence_nan() functions
Peter Maydell [Tue, 7 Dec 2010 15:37:34 +0000 (15:37 +0000)]
softfloat: Add float*_maybe_silence_nan() functions

Add functions float*_maybe_silence_nan() which ensure that a
value is not a signaling NaN by turning it into a quiet NaN.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agoARM: Return correct result for float-to-integer conversion of NaN
Peter Maydell [Tue, 7 Dec 2010 15:37:34 +0000 (15:37 +0000)]
ARM: Return correct result for float-to-integer conversion of NaN

The ARM architecture mandates that converting a NaN value to
integer gives zero (if Invalid Operation FP exceptions are
not being trapped). This isn't the behaviour of the SoftFloat
library, so NaNs must be special-cased.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agosoftfloat: Add float*_is_any_nan() functions
Peter Maydell [Tue, 7 Dec 2010 15:37:34 +0000 (15:37 +0000)]
softfloat: Add float*_is_any_nan() functions

Add float*_is_any_nan() functions which return true if the argument
is a NaN of any kind (quiet or signalling).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agoARM: Fix sense of to_integer bit in Neon VCVT float/int conversion
Peter Maydell [Tue, 7 Dec 2010 15:37:34 +0000 (15:37 +0000)]
ARM: Fix sense of to_integer bit in Neon VCVT float/int conversion

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agoARM: Fix decoding of Neon forms of VCVT between float and fixed point
Peter Maydell [Tue, 7 Dec 2010 15:37:34 +0000 (15:37 +0000)]
ARM: Fix decoding of Neon forms of VCVT between float and fixed point

Fix errors in the decoding of the Neon forms of fixed-point VCVT:
 * fixed-point VCVT is op 14 and 15, not 15 and 16
 * the fbits immediate field was being misinterpreted
 * the sense of the to_fixed bit was inverted

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agoARM: Fix decoding of VFP forms of VCVT between float and int/fixed
Peter Maydell [Tue, 7 Dec 2010 15:37:34 +0000 (15:37 +0000)]
ARM: Fix decoding of VFP forms of VCVT between float and int/fixed

Correct the decoding of source and destination registers
for the VFP forms of the VCVT instructions which convert
between floating point and integer or fixed-point.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agoARM: fix ldrexd/strexd
Peter Maydell [Tue, 7 Dec 2010 15:37:34 +0000 (15:37 +0000)]
ARM: fix ldrexd/strexd

Correct ldrexd and strexd code to always read and write the
high word of the 64-bit value from addr+4.
Also make ldrexd and strexd agree that for a 64 bit value the
address in env->exclusive_addr is that of the low word.

This fixes the issues reported in
https://bugs.launchpad.net/qemu/+bug/670883

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agotarget-arm: Handle 'smc' as an undefined instruction
Adam Lackorzynski [Tue, 7 Dec 2010 12:01:44 +0000 (12:01 +0000)]
target-arm: Handle 'smc' as an undefined instruction

Refine check on bkpt so that smc and undefined instruction encodings are
handled as an undefined instruction and trap.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agotarget-arm: Fix mixup in decoding of saturating add and sub
Johan Bengtsson [Tue, 7 Dec 2010 12:01:44 +0000 (12:01 +0000)]
target-arm: Fix mixup in decoding of saturating add and sub

The thumb2 decoder contained a mixup between the bit controlling
doubling and the bit controlling if the operation was an add or a sub.

Signed-off-by: Johan Bengtsson <teofrastius@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agotarget-arm: Add support for PKHxx in thumb2
Johan Bengtsson [Tue, 7 Dec 2010 12:01:44 +0000 (12:01 +0000)]
target-arm: Add support for PKHxx in thumb2

The PKHxx instructions were not recognized by the thumb2 decoder. The
solution provided in this changeset is identical to the arm-mode
implementation.

Signed-off-by: Johan Bengtsson <teofrastius@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Nathan Froyd <froydnj@codesourcery.com>
13 years agocorrect migrate_set_speed's args_type
Wen Congyang [Thu, 25 Nov 2010 01:06:05 +0000 (09:06 +0800)]
correct migrate_set_speed's args_type

The args_type of migrate_set_speed in qmp-commands.hx is wrong.
When we set migrate speed by json, qemu will be core dumped.

This bug was caused by 07de3e60b05 and hence affects master only.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
13 years agoQMP: Simplify monitor_json_emitter()
Luiz Capitulino [Mon, 22 Nov 2010 19:10:37 +0000 (17:10 -0200)]
QMP: Simplify monitor_json_emitter()

Use the ternary operator instead of an if (also fixes bad indentation).

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
13 years agoQMP: Drop dead code
Luiz Capitulino [Mon, 22 Nov 2010 18:35:09 +0000 (16:35 -0200)]
QMP: Drop dead code

The first if/else clause in handler_audit() makes no sense for two
reasons:

  1. this function is now called only by QMP code, so testing if
     it's a QMP call makes no sense anymore

  2. the else clause first asserts that there's no error in the
     monitor object, then it tries to free it!

Just drop it.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
13 years agoQMP: Fix default response regression
Luiz Capitulino [Mon, 22 Nov 2010 18:22:47 +0000 (16:22 -0200)]
QMP: Fix default response regression

Commit 030db6e89d dropped do_info() usage from QMP and introduced
qmp_call_query_cmd(). However, the new function doesn't emit QMP's
default OK response when the handler doesn't return data.

Fix that by also calling monitor_protocol_emitter() when
ret_data == NULL, so that the default response is emitted.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
13 years agoSpeedup 'tb_find_slow' by using the same heuristic as during memory page lookup
Kirill Batuzov [Thu, 2 Dec 2010 13:12:46 +0000 (16:12 +0300)]
Speedup 'tb_find_slow' by using the same heuristic as during memory page lookup

Move the last found TB to the head of the list so it will be found more quickly next time it will be looked for.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Pavel Yushchenko <pau@ispras.ru>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoRemove unused spin_trylock() function
Peter Maydell [Wed, 1 Dec 2010 19:44:38 +0000 (19:44 +0000)]
Remove unused spin_trylock() function

Remove the spin_trylock() function, as it is not used anywhere,
and is not even implemented if CONFIG_USE_NPTL is defined.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agodarwin-user: Use GCC_FMT_ATTR (format checking)
Stefan Weil [Mon, 15 Nov 2010 20:00:48 +0000 (21:00 +0100)]
darwin-user: Use GCC_FMT_ATTR (format checking)

The redundant forward declaration of qerror in machload.c
is removed because it should be taken from qemu.h.

Please note that this patch is untested because
I have no matching environment to compile it.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoaudio: Use GCC_FMT_ATTR (format checking)
Stefan Weil [Mon, 15 Nov 2010 19:54:12 +0000 (20:54 +0100)]
audio: Use GCC_FMT_ATTR (format checking)

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agotarget-sparc: Use fprintf_function (format checking)
Stefan Weil [Mon, 15 Nov 2010 18:58:41 +0000 (19:58 +0100)]
target-sparc: Use fprintf_function (format checking)

This change was missing in commit
9a78eead0c74333a394c0f7bbfc4423ac746fcd5.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years ago*-dis: Replace fprintf_ftype by fprintf_function (format checking)
Stefan Weil [Mon, 15 Nov 2010 18:39:43 +0000 (19:39 +0100)]
*-dis: Replace fprintf_ftype by fprintf_function (format checking)

This patch adds more printf format checking.

Additional modifications were needed for this code change:

* alpha-dis.c: The local definition of MAX conflicts with
  a previous definition from osdep.h, so add an #undef.

* dis-asm.h: Add include for fprintf_function (qemu-common.h).
  The standard (now redundant) includes are removed.

* mis-dis.c: The definition of ARRAY_SIZE is no longer needed
  and must be removed (conflict with previous definition from
  qemu-common.h).

* sh4-dis.c: Remove some unneeded forward declarations.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoFix mingw32 and OpenBSD warnings
Blue Swirl [Sat, 4 Dec 2010 17:37:35 +0000 (17:37 +0000)]
Fix mingw32 and OpenBSD warnings

ffsl() is not universally available, so there are these warnings
on both mingw32 and OpenBSD:
/src/qemu/hw/pcie_aer.c: In function 'pcie_aer_update_log':
/src/qemu/hw/pcie_aer.c:399: warning: implicit declaration of function 'ffsl'

Since status field in PCIEAERErr is uint32_t, we can just use ffs() instead.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
13 years agoMerge branch 'linux-user-for-upstream' of git://gitorious.org/qemu-maemo/qemu
Edgar E. Iglesias [Sat, 4 Dec 2010 03:18:28 +0000 (04:18 +0100)]
Merge branch 'linux-user-for-upstream' of git://gitorious.org/qemu-maemo/qemu

* 'linux-user-for-upstream' of git://gitorious.org/qemu-maemo/qemu:
  linux-user: fix mips and ppc to use UID16
  update binfmt conf
  linux-user: fix compiler error on nptl
  ARM: linux-user: Restore iWMMXT state from ucontext on sigreturn
  ARM: linux-user: Expose iWMMXT registers to signal handlers
  ARM: linux-user: Restore VFP state from ucontext on sigreturn
  ARM: linux-user: Expose VFP registers to signal handlers
  ARM: Expose vfp_get_fpscr() and vfp_set_fpscr() to C code
  ARM: linux-user: Correct size of padding in target_ucontext_v2
  target-sparc: remove unused functions cpu_lock(), cpu_unlock()
  ARM: enable XScale/iWMMXT in linux-user mode
  linux-user: Translate getsockopt level option
  linux-user: remove unnecessary local from __get_user(), __put_user()
  linux-user: fix memory leaks with NPTL emulation
  linux-user: mmap_reserve() not controlled by RESERVED_VA
  [PATCH] target-arm: remove unused functions cpu_lock(), cpu_unlock()

13 years agoexec: Remove debugging fprintf() that slipped into qemu_ram_alloc_from_ptr()
Stefan Hajnoczi [Fri, 3 Dec 2010 17:09:01 +0000 (17:09 +0000)]
exec: Remove debugging fprintf() that slipped into qemu_ram_alloc_from_ptr()

Remove the debugging fprintf() slipped in via the following commit:

    commit b2e0a138e77245290428a7d599a929e2e1bfe510
    Author: Michael S. Tsirkin <mst@redhat.com>
    Date:   Mon Nov 22 19:52:34 2010 +0200

        migration: stable ram block ordering

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agolinux-user: fix mips and ppc to use UID16
Martin Mohring [Sun, 7 Nov 2010 19:31:57 +0000 (20:31 +0100)]
linux-user: fix mips and ppc to use UID16

Signed-off-by: Martin Mohring <martin.mohring@5edatasoft.com>
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years agoupdate binfmt conf
Riku Voipio [Wed, 1 Dec 2010 12:53:10 +0000 (14:53 +0200)]
update binfmt conf

1) dont register i386 qemu on x86_64 host
2) widen sparc and arm match
3) add sh4, based on patch by David Kozub <zub@linux.fjfi.cvut.cz>

Rest based on patch by Jan-Simon Möller <jsmoeller@linuxfoundation.org>

13 years agolinux-user: fix compiler error on nptl
Riku Voipio [Fri, 26 Nov 2010 14:21:34 +0000 (16:21 +0200)]
linux-user: fix compiler error on nptl

Some compilers detect that new_stack isnt used after dd75d784

Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years agoARM: linux-user: Restore iWMMXT state from ucontext on sigreturn
Peter Maydell [Wed, 24 Nov 2010 15:20:08 +0000 (15:20 +0000)]
ARM: linux-user: Restore iWMMXT state from ucontext on sigreturn

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years agoARM: linux-user: Expose iWMMXT registers to signal handlers
Peter Maydell [Wed, 24 Nov 2010 15:20:07 +0000 (15:20 +0000)]
ARM: linux-user: Expose iWMMXT registers to signal handlers

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years agoARM: linux-user: Restore VFP state from ucontext on sigreturn
Peter Maydell [Wed, 24 Nov 2010 15:20:06 +0000 (15:20 +0000)]
ARM: linux-user: Restore VFP state from ucontext on sigreturn

Restore the VFP registers from the ucontext on return from a signal
handler in linux-user mode. This means that signal handlers cannot
accidentally corrupt the interrupted code's VFP state, and allows
them to deliberately modify the state via the ucontext structure.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years agoARM: linux-user: Expose VFP registers to signal handlers
Peter Maydell [Wed, 24 Nov 2010 15:20:05 +0000 (15:20 +0000)]
ARM: linux-user: Expose VFP registers to signal handlers

For ARM linux-user mode signal handlers, fill in the ucontext with
VFP register contents in the same way that the kernel does. We only
do this for v2 format sigframe (2.6.12 and above); this is actually
bug-for-bug compatible with the older kernels, which don't save and
restore VFP registers either.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years agoARM: Expose vfp_get_fpscr() and vfp_set_fpscr() to C code
Peter Maydell [Wed, 24 Nov 2010 15:20:04 +0000 (15:20 +0000)]
ARM: Expose vfp_get_fpscr() and vfp_set_fpscr() to C code

Expose the vfp_get_fpscr() and vfp_set_fpscr() functions to C
code as well as generated code, so we can use them to read and
write the FPSCR when saving and restoring VFP registers across
signal handlers in linux-user mode.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years agoARM: linux-user: Correct size of padding in target_ucontext_v2
Peter Maydell [Wed, 24 Nov 2010 15:20:03 +0000 (15:20 +0000)]
ARM: linux-user: Correct size of padding in target_ucontext_v2

The padding in the target_ucontext_v2 is defined by the size of
the target's sigset_t type, not the host's. (This bug only causes
problems when we start using the uc_regspace[] array to expose
VFP registers to userspace signal handlers.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years agotarget-sparc: remove unused functions cpu_lock(), cpu_unlock()
Peter Maydell [Fri, 19 Nov 2010 13:54:39 +0000 (13:54 +0000)]
target-sparc: remove unused functions cpu_lock(), cpu_unlock()

13 years agoARM: enable XScale/iWMMXT in linux-user mode
Peter Maydell [Fri, 19 Nov 2010 15:36:47 +0000 (15:36 +0000)]
ARM: enable XScale/iWMMXT in linux-user mode

In linux-user mode, the XScale/iWMMXT coprocessors must be enabled
at reset so that we can run code that uses these instructions.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
13 years agolinux-user: Translate getsockopt level option
Jamie Lentin [Fri, 26 Nov 2010 13:04:08 +0000 (15:04 +0200)]
linux-user: Translate getsockopt level option

n setsockopt, the socket level options are translated to the hosts'
architecture before the real syscall is called, e.g.
TARGET_SO_TYPE -> SO_TYPE. This patch does the same with getsockopt.

Tested on a x86 host emulating MIPS.  Without it:-

$ grep getsockopt host.strace
31311 getsockopt(3, SOL_SOCKET, 0x1007 /* SO_??? */, 0xbff17208,
0xbff17204) = -1 ENOPROTOOPT (Protocol not available)

With:-

$ grep getsockopt host.strace
25706 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0

Whitespace cleanup: Riku Voipio

Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
13 years agolinux-user: remove unnecessary local from __get_user(), __put_user()
Peter Maydell [Mon, 8 Nov 2010 18:13:58 +0000 (18:13 +0000)]
linux-user: remove unnecessary local from __get_user(), __put_user()

Remove an unnecessary local variable from the __get_user() and
__put_user() macros. This avoids confusing compilation failures
if the name of the local variable ('size') happens to be the
same as the variable the macro user is trying to read/write.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years agolinux-user: fix memory leaks with NPTL emulation
Nathan Froyd [Fri, 29 Oct 2010 14:48:57 +0000 (07:48 -0700)]
linux-user: fix memory leaks with NPTL emulation

Running programs that create large numbers of threads, such as this
snippet from libstdc++'s pthread7-rope.cc:

  const int max_thread_count = 4;
  const int max_loop_count = 10000;
  ...
  for (int j = 0; j < max_loop_count; j++)
    {
      ...
      for (int i = 0; i < max_thread_count; i++)
pthread_create (&tid[i], NULL, thread_main, 0);

      for (int i = 0; i < max_thread_count; i++)
pthread_join (tid[i], NULL);
    }

in user-mode emulation will quickly run out of memory.  This is caused
by a failure to free memory in do_syscall prior to thread exit:

          /* TODO: Free CPU state.  */
          pthread_exit(NULL);

The first step in fixing this is to make all TaskStates used by QEMU
dynamically allocated.  The TaskState used by the initial thread was
not, as it was allocated on main's stack.  So fix that, free the
cpu_env, free the TaskState, and we're home free, right?

Not exactly.  When we create a thread, we do:

        ts = qemu_mallocz(sizeof(TaskState) + NEW_STACK_SIZE);
        ...
        new_stack = ts->stack;
        ...
        ret = pthread_attr_setstack(&attr, new_stack, NEW_STACK_SIZE);

If we blindly free the TaskState, then, we yank the current (host)
thread's stack out from underneath it while it still has things to do,
like calling pthread_exit.  That causes problems, as you might expect.

The solution adopted here is to let the C library allocate the thread's
stack (so the C library can properly clean it up at pthread_exit) and
provide a hint that we want NEW_STACK_SIZE bytes of stack.

With those two changes, we're done, right?  Well, almost.  You see,
we're creating all these host threads and their parent threads never
bother to check that their children are finished.  There's no good place
for the parent threads to do so.  Therefore, we need to create the
threads in a detached state so the parent thread doesn't have to call
pthread_join on the child to release the child's resources; the child
does so automatically.

With those three major changes, we can comfortably run programs like the
above without exhausting memory.  We do need to delete 'stack' from the
TaskState structure.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years agolinux-user: mmap_reserve() not controlled by RESERVED_VA
amateur [Tue, 14 Sep 2010 05:22:34 +0000 (13:22 +0800)]
linux-user: mmap_reserve() not controlled by RESERVED_VA

mmap_reserve() should be called only when RESERVED_VA is enabled.
Otherwise, unmaped virtual address space will never be reusable. This
bug will exhaust virtual address space in extreme conditions.

Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years ago[PATCH] target-arm: remove unused functions cpu_lock(), cpu_unlock()
Peter Maydell [Fri, 19 Nov 2010 13:54:44 +0000 (13:54 +0000)]
[PATCH] target-arm: remove unused functions cpu_lock(), cpu_unlock()

Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
13 years agovirtio-9p: fix build on !CONFIG_UTIMENSAT
Hidetoshi Seto [Wed, 24 Nov 2010 02:38:10 +0000 (11:38 +0900)]
virtio-9p: fix build on !CONFIG_UTIMENSAT

This patch introduce a fallback mechanism for old systems that do not
support utimensat().  This fix build failure with following warnings:

hw/virtio-9p-local.c: In function 'local_utimensat':
hw/virtio-9p-local.c:479: warning: implicit declaration of function 'utimensat'
hw/virtio-9p-local.c:479: warning: nested extern declaration of 'utimensat'

and:

hw/virtio-9p.c: In function 'v9fs_setattr_post_chmod':
hw/virtio-9p.c:1410: error: 'UTIME_NOW' undeclared (first use in this function)
hw/virtio-9p.c:1410: error: (Each undeclared identifier is reported only once
hw/virtio-9p.c:1410: error: for each function it appears in.)
hw/virtio-9p.c:1413: error: 'UTIME_OMIT' undeclared (first use in this function)
hw/virtio-9p.c: In function 'v9fs_wstat_post_chmod':
hw/virtio-9p.c:2905: error: 'UTIME_OMIT' undeclared (first use in this function)

[NOTE: At this time virtio-9p is only user of utimensat(), and is available
       only when host is linux and CONFIG_VIRTFS is defined.  So there are
       no similar warning for win32.  Please provide a wrapper for win32 in
       oslib-win32.c if new user really requires it.]

v5:
  - Allow fallback on runtime
  - Move qemu_utimensat() to oslib-posix.c
  - Rebased on latest qemu.git
v4:
  - Use tv_now.tv_usec
v3:
  - Use better alternative handling for UTIME_NOW/OMIT
  - Move qemu_utimensat() to cutils.c
V2:
  - Introduce qemu_utimensat()

Acked-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: M. Mohan Kumar <mohan@in.ibm.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
13 years agovirtio-9p: Check the return value of llistxattr.
Kusanagi Kouichi [Sat, 30 Oct 2010 02:52:39 +0000 (11:52 +0900)]
virtio-9p: Check the return value of llistxattr.

If llistxattr returned 0, qemu aborts.

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
13 years agohw/virtio9p: Use appropriate debug print functions in TLINK path
Harsh Prateek Bora [Sun, 24 Oct 2010 15:24:26 +0000 (20:54 +0530)]
hw/virtio9p: Use appropriate debug print functions in TLINK path

Running fsstress with debug enabled causes assertion failure
because of inappropriate usage of debug print functions.
With this patch, fsstress passes without assertion failure.

Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
13 years ago[virtio-9p] Add datasync to server side TFSYNC/RFSYNC for dotl
Venkateswararao Jujjuri (JV) [Fri, 22 Oct 2010 17:08:45 +0000 (10:08 -0700)]
[virtio-9p] Add datasync to server side TFSYNC/RFSYNC for dotl

SYNOPSIS
    size[4] Tfsync tag[2] fid[4] datasync[4]

    size[4] Rfsync tag[2]

DESCRIPTION

    The Tfsync transaction transfers ("flushes") all modified in-core data of
    file identified by fid to the disk device (or other  permanent  storage
    device)  where that  file  resides.

    If datasync flag is specified data will be fleshed but does not flush
    modified metadata unless  that  metadata  is  needed  in order to allow a
    subsequent data retrieval to be correctly handled.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
13 years agoFix build
Anthony Liguori [Thu, 2 Dec 2010 20:41:59 +0000 (14:41 -0600)]
Fix build

msix.o and msi.o get pulled into the build unconditionally for QMP.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoMerge remote branch 'mst/for_anthony' into staging
Anthony Liguori [Thu, 2 Dec 2010 20:16:40 +0000 (14:16 -0600)]
Merge remote branch 'mst/for_anthony' into staging

13 years agovhost: Fix address calculation in vhost_dev_sync_region()
Jason Wang [Sat, 27 Nov 2010 14:05:07 +0000 (22:05 +0800)]
vhost: Fix address calculation in vhost_dev_sync_region()

We still need advance address even we find there's no dirty pages in
current chunk.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agomigration: allow rate > 4g
Michael S. Tsirkin [Tue, 23 Nov 2010 17:05:54 +0000 (19:05 +0200)]
migration: allow rate > 4g

I'd like to disable bandwidth limit or make it very high,
Use int64_t all over to make values >= 4g work.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Jason Wang <jasowang@redhat.com>
13 years agomigration: stable ram block ordering
Michael S. Tsirkin [Mon, 22 Nov 2010 17:52:34 +0000 (19:52 +0200)]
migration: stable ram block ordering

This makes ram block ordering under migration stable, ordered by offset.
This is especially useful for migration to exec, for debugging.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Jason Wang <jasowang@redhat.com>