Peter Maydell [Mon, 2 Mar 2015 12:13:45 +0000 (12:13 +0000)]
Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into staging
NUMA fixes queue
# gpg: Signature made Mon Feb 23 19:28:42 2015 GMT using RSA key ID
984DC5A6
# gpg: Can't check signature: public key not found
* remotes/ehabkost/tags/numa-pull-request:
numa: Rename set_numa_modes() to numa_post_machine_init()
numa: Rename option parsing functions
numa: Move QemuOpts parsing to set_numa_nodes()
numa: Make max_numa_nodeid static
numa: Move NUMA globals to numa.c
vl.c: Remove unnecessary zero-initialization of NUMA globals
numa: Move NUMA declarations from sysemu.h to numa.h
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Thu, 26 Feb 2015 12:16:46 +0000 (12:16 +0000)]
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp:
qapi-types: add C99 index names to arrays
monitor: Fix missing err = NULL in client_migrate_info()
balloon: Fix typo
hmp: Fix warning from smatch (wrong argument in function call)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Thu, 26 Feb 2015 11:18:30 +0000 (11:18 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-roms-
20150219-1' into staging
seabios: update to 1.8.0 release
# gpg: Signature made Thu Feb 19 08:36:30 2015 GMT using RSA key ID
D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-roms-
20150219-1:
seabios: update to 1.8.0 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Thu, 26 Feb 2015 09:08:54 +0000 (09:08 +0000)]
Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-
20150218' into staging
Features for s390x/kvm
1. guest reIPL changes (Fan Zhang)
Implements subcode 5 and 6 of diag 0x308. This allows to use
/sys/firmware/[re]ipl/ccw/* and the chreipl and lsreipl tools in
Linux. In addition to the normal "change the disk" this also
allows to switch from booting an external kernel into rebooting
from a disk.
2. Memory page table walking (Thomas Huth)
Fix several page table walking functions, used in several places
like gdb server and instruction handling. Also use these functions
in several I/O related functions.
# gpg: Signature made Wed Feb 18 09:13:22 2015 GMT using RSA key ID
B5A61C7C
# gpg: Good signature from "Christian Borntraeger (IBM) <borntraeger@de.ibm.com>"
* remotes/borntraeger/tags/s390x-
20150218: (29 commits)
s390x/helper: Remove s390_cpu_physical_memory_map
s390x/pci: Rework memory access in zpci instruction
s390x/ioinst: Rework memory access in TPI instruction
s390x/ioinst: Rework memory access in CHSC instruction
s390x/ioinst: Rework memory access in STCRW instruction
s390x/ioinst: Rework memory access in TSCH instruction
s390x/ioinst: Set condition code in ioinst_handle_tsch() handler
s390x/ioinst: Rework memory access in STSCH instruction
s390x/ioinst: Rework memory access in SSCH instruction
s390x/ioinst: Rework memory access in MSCH instruction
s390x/css: Make schib parameter of css_do_msch const
s390x/mmu: Add function for accessing guest memory
s390x/kvm: Add function for injecting pgm access exceptions
s390x/mmu: Clean up mmu_translate_asc()
s390x/mmu: Check bit 52 in page table entry
s390x/mmu: Renaming related to the ASCE confusion
s390x/mmu: Add support for read-only regions
s390x/mmu: Fix the exception codes for illegal table entries
s390x/mmu: Fix exception types when checking the ASCEs
s390x/mmu: Fix translation exception code in lowcore
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Thu, 26 Feb 2015 07:01:08 +0000 (07:01 +0000)]
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2015-02-18' into staging
Clean up around error_get_pretty(), qerror_report_err()
# gpg: Signature made Wed Feb 18 10:10:07 2015 GMT using RSA key ID
EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>"
* remotes/armbru/tags/pull-error-2015-02-18:
qemu-char: Avoid qerror_report_err() outside QMP command handlers
qemu-img: Avoid qerror_report_err() outside QMP command handlers
vl: Avoid qerror_report_err() outside QMP command handlers
tpm: Avoid qerror_report_err() outside QMP command handlers
numa: Avoid qerror_report_err() outside QMP command handlers
net: Avoid qerror_report_err() outside QMP command handlers
monitor: Avoid qerror_report_err() outside QMP command handlers
monitor: Clean up around monitor_handle_fd_param()
error: Use error_report_err() where appropriate
error: New convenience function error_report_err()
vhost-scsi: Improve error reporting for invalid vhostfd
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Wed, 25 Feb 2015 13:14:37 +0000 (13:14 +0000)]
Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-02-18' into staging
hmp: Normalize HMP command handler names
# gpg: Signature made Wed Feb 18 10:59:44 2015 GMT using RSA key ID
EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>"
* remotes/armbru/tags/pull-monitor-2015-02-18:
hmp: Name HMP info handler functions hmp_info_SUBCOMMAND()
hmp: Name HMP command handler functions hmp_COMMAND()
hmp: Clean up declarations for long-gone info handlers
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Wed, 25 Feb 2015 11:54:15 +0000 (11:54 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-
20150218-1' into staging
usb: error handling fixes from Markus, make sysbus ehci arm-only.
# gpg: Signature made Wed Feb 18 09:54:13 2015 GMT using RSA key ID
D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-usb-
20150218-1:
Make sysbus EHCI devices ARM only by default
PPC: Don't use legacy -usbdevice support for setting up board
r2d: Don't use legacy -usbdevice support for setting up board
usb: Change usb_create_simple() to abort on failure
usb: Suppress bogus error when automatic usb-hub creation fails
usb: Do not prefix error_setg() messages with "Error: "
usb: Improve -usbdevice error reporting a bit
usb: usb_create() can't fail, drop useless error handling
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Wed, 25 Feb 2015 11:05:10 +0000 (11:05 +0000)]
Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2015-02-16-v2-tag' into staging
tag for qga-pull-2015-02-16-v2
v2:
* generalized QAPI function definition for guest-memory-block-size
to guest-memory-block-info for future extensibility (Eric)
# gpg: Signature made Tue Feb 17 22:36:08 2015 GMT using RSA key ID
F108B584
# gpg: Good signature from "Michael Roth <flukshun@gmail.com>"
# gpg: aka "Michael Roth <mdroth@utexas.edu>"
# gpg: aka "Michael Roth <mdroth@linux.vnet.ibm.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: CEAC C9E1 5534 EBAB B82D 3FA0 3353 C9CE F108 B584
* remotes/mdroth/tags/qga-pull-2015-02-16-v2-tag:
qemu-ga-win: Fail loudly on bare 'set-time'
qga: add memory block command that unsupported
qga: implement qmp_guest_get_memory_block_info() for Linux with sysfs
qga: implement qmp_guest_set_memory_blocks() for Linux with sysfs
qga: implement qmp_guest_get_memory_blocks() for Linux with sysfs
qga: introduce three guest memory block commmands with stubs
qga: implement file commands for Windows guest
guest agent: guest-file-open: refactoring
utils: drop strtok_r from envlist_parse
qga: add guest-set-user-password command
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 24 Feb 2015 13:58:18 +0000 (13:58 +0000)]
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
- vhost-scsi: add bootindex property
- RCU: fix MemoryRegion lifetime issues in PCI; document the rules;
convert of AddressSpaceDispatch and RAMList
- KVM: add kvm_exit reasons for aarch64
# gpg: Signature made Mon Feb 16 16:32:32 2015 GMT using RSA key ID
78C7AE83
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini/tags/for-upstream: (21 commits)
Convert ram_list to RCU
exec: convert ram_list to QLIST
cosmetic changes preparing for the following patches
exec: protect mru_block with RCU
rcu: add g_free_rcu
rcu: introduce RCU-enabled QLIST
exec: RCUify AddressSpaceDispatch
exec: make iotlb RCU-friendly
exec: introduce cpu_reload_memory_map
docs: clarify memory region lifecycle
pci: split shpc_cleanup and shpc_free
pcie: remove mmconfig memory leak and wrap mmconfig update with transaction
memory: keep the owner of the AddressSpace alive until do_address_space_destroy
rcu: run RCU callbacks under the BQL
rcu: do not let RCU callbacks pile up indefinitely
vhost-scsi: set the bootable value of channel/target/lun
vhost-scsi: add a property for booting
vhost-scsi: expose the TYPE_FW_PATH_PROVIDER interface
vhost-scsi: add bootindex property
qdev: support to get a device firmware path directly
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 24 Feb 2015 12:59:13 +0000 (12:59 +0000)]
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request
v2:
* Fix C11 typedef redefinitions in ahci and libqos malloc [Peter]
* Fix lx -> PRIx64 format specifiers in ahci [Peter]
# gpg: Signature made Mon Feb 16 15:45:53 2015 GMT using RSA key ID
81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
* remotes/stefanha/tags/block-pull-request: (65 commits)
block: Keep bdrv_check*_request()'s return value
block: Remove "growable" from BDS
block: Clamp BlockBackend requests
qemu-io: Use BlockBackend
qemu-io: Remove "growable" option
qemu-io: Use blk_new_open() in openfile()
qemu-nbd: Use blk_new_open() in main()
qemu-img: Use BlockBackend as far as possible
qemu-img: Use blk_new_open() in img_rebase()
qemu-img: Use blk_new_open() in img_open()
block/xen: Use blk_new_open() in blk_connect()
blockdev: Use blk_new_open() in blockdev_init()
iotests: Add test for driver=qcow2, format=qcow2
block: Add Error parameter to bdrv_find_protocol()
block: Add blk_new_open()
block: Lift some BDS functions to the BlockBackend
iotests: Add test for qemu-img convert to NBD
qemu-img: Fix qemu-img convert -n
qemu-iotests: Add 093 for IO throttling
qemu-iotests: Allow caller to disable underscore convertion for qmp
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 24 Feb 2015 12:07:28 +0000 (12:07 +0000)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-
20150216-1' into staging
vnc: fixup some QemuOpts conversion fallout.
# gpg: Signature made Mon Feb 16 08:13:32 2015 GMT using RSA key ID
D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/kraxel/tags/pull-vnc-
20150216-1:
vnc: fix coverity warning
ui/vnc: optimize full scanline updates
vnc: auto assian an id when calling change vnc qmp interface
vnc: introduce an wrapper for auto assign vnc id
vnc: using bool type instead of int for QEMU_OPT_BOOL
vnc: correct missing property about vnc_display
vnc: fix qemu crash when not configure vnc option
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Tue, 24 Feb 2015 11:08:40 +0000 (11:08 +0000)]
Merge remote-tracking branch 'remotes/lalrae/tags/mips-
20150213-2' into staging
MIPS patches 2015-02-13
Changes:
* bug fixes, cleanups and minor improvements
# gpg: Signature made Sat Feb 14 17:01:37 2015 GMT using RSA key ID
0B29DA6B
# gpg: Can't check signature: public key not found
* remotes/lalrae/tags/mips-
20150213-2:
linux-user: correct stat structure in MIPS N32
target-mips: pass 0 instead of -1 as rs in microMIPS LUI instruction
target-mips: fix broken snapshotting
target-mips: use CP0EnLo_XI instead of magic number
target-mips: ll and lld cause AdEL exception for unaligned address
target-mips: fix detection of the end of the page during translation
target-mips: Make CP0.Status.CU1 read-only for the 5Kc and 5KEc processors
isa: remove isa_mem_base variable
gt64xxx: remove isa_mem_base usage
piix4: use PCI address space instead of system memory
mips: remove isa_mem_base usage
jazz: remove usage of isa_mem_base
jazz: do not explode QEMUMachineInitArgs structure
isa: add memory space parameter to isa_bus_new
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Eduardo Habkost [Sun, 8 Feb 2015 18:51:22 +0000 (16:51 -0200)]
numa: Rename set_numa_modes() to numa_post_machine_init()
This function does some initialization that needs to be done after
machine init. The function may be eventually removed if we move the
CPUState.numa_node initialization to the CPU init code, but while the
function exists, lets give it a name that makes sense.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Eduardo Habkost [Sun, 8 Feb 2015 18:51:21 +0000 (16:51 -0200)]
numa: Rename option parsing functions
Renaming set_numa_nodes() and numa_init_func() to parse_numa_opts() and
parse_numa() makes the purpose of those functions clearer.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Eduardo Habkost [Sun, 8 Feb 2015 18:51:20 +0000 (16:51 -0200)]
numa: Move QemuOpts parsing to set_numa_nodes()
This allows us to make numa_init_func() static.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Eduardo Habkost [Sun, 8 Feb 2015 18:51:19 +0000 (16:51 -0200)]
numa: Make max_numa_nodeid static
Now the only code that uses the variable is inside numa.c.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Eduardo Habkost [Sun, 8 Feb 2015 18:51:18 +0000 (16:51 -0200)]
numa: Move NUMA globals to numa.c
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Eduardo Habkost [Sun, 8 Feb 2015 18:51:17 +0000 (16:51 -0200)]
vl.c: Remove unnecessary zero-initialization of NUMA globals
There's no need to zero-initialize globals, they are automatically
initialized to zero.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Eduardo Habkost [Sun, 8 Feb 2015 18:51:16 +0000 (16:51 -0200)]
numa: Move NUMA declarations from sysemu.h to numa.h
Not all sysemu.h users need the NUMA declarations, and keeping them in a
separate file makes it easier to see what are the interfaces provided by
numa.c.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Michael S. Tsirkin [Thu, 19 Feb 2015 10:13:10 +0000 (11:13 +0100)]
qapi-types: add C99 index names to arrays
It's not easy to figure out how monitor translates
strings: most QEMU code deals with translated indexes,
these are translated using _lookup arrays,
so you need to find the array name, and find the
appropriate offset.
This patch adds C99 indexes to lookup arrays, which makes it possible to
find the correct key using simple grep, and see that the matching is
correct at a glance.
Example:
Before:
const char *MigrationCapability_lookup[] = {
"xbzrle",
"rdma-pin-all",
"auto-converge",
"zero-blocks",
NULL,
};
After:
const char *MigrationCapability_lookup[] = {
[MIGRATION_CAPABILITY_XBZRLE] = "xbzrle",
[MIGRATION_CAPABILITY_RDMA_PIN_ALL] = "rdma-pin-all",
[MIGRATION_CAPABILITY_AUTO_CONVERGE] = "auto-converge",
[MIGRATION_CAPABILITY_ZERO_BLOCKS] = "zero-blocks",
[MIGRATION_CAPABILITY_MAX] = NULL,
};
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Gonglei [Thu, 12 Feb 2015 01:57:20 +0000 (09:57 +0800)]
monitor: Fix missing err = NULL in client_migrate_info()
When SPICE isn't used, we either fail an assertion in error_set(),
or leak an error object. Broken in commit b25d81b.
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Eric Blake [Tue, 10 Feb 2015 22:40:30 +0000 (15:40 -0700)]
balloon: Fix typo
Commit
422e0501 introduced a typo (unless removing an 'o' from
balloon is how you deflate it?)
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Stefan Weil [Sun, 8 Feb 2015 14:40:48 +0000 (15:40 +0100)]
hmp: Fix warning from smatch (wrong argument in function call)
Fix this warning:
hmp.c:414:38: warning: Using plain integer as NULL pointer
qmp_query_block expects a pointer argument, so passing false is wrong.
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Gerd Hoffmann [Thu, 19 Feb 2015 08:33:03 +0000 (09:33 +0100)]
seabios: update to 1.8.0 release
'git shortlog
8936dbb2..
4c59f5d8' for seabios repo:
David Woodhouse (4):
Update EFI_COMPATIBILITY16_TABLE to match 0.98 spec update
build: use -m16 where available instead of asm(".code16gcc")
romlayout: Use .code16 not .code16gcc
vgabios: Use .code16 not .code16gcc
Gerd Hoffmann (2):
add scripts/tarball.sh
build: set LC_ALL=C
Hannes Reinecke (1):
megasas: read addional PCI I/O bar
Ian Campbell (1):
romlayout: Use "rep ; nop" not "rep nop".
Kevin O'Connor (139):
vgabios: Return from handle_1011() if handler found.
edd: Move EDD get drive parameters (int 1348) logic from disk.c to block.c.
edd: Use sectors==-1 to detect removable media.
edd: Separate out ATA and virtio specific parts of fill_edd().
cdemu: store internal cdemu fields in standard "el-torito" spec format.
Move cdemu call interface and disk_ret helper code to disk.c.
smm: Replace SMI assembler code with C code.
smm: Use a C struct to define the layout of the SMM area.
smp: Replace QEMU SMP init assembler code with C; run only in 32bit mode.
Don't enable thread preemption during S3 resume vga option rom execution.
Remove old Bochs bios fixed address string at 0xfff00.
Move most of the VAR16FIXED() defs to misc.c.
build: Avoid absolute paths during "whole-program" compiling.
Make sure handle_smi() and handle_smp() are compiled out if not enabled.
Remove the TODO file.
Abstract reset call (and possible 16bit mode switch) into reset() function.
build: Remove unused function getSectionsStart() from layoutrom.py.
build: Extract section visiting logic in layoutrom.py.
build: Refactor layoutrom.py gc() function.
build: Use customized entry point for each type of build.
build: Refactor findInit() function.
build: Rework getRelocs() to use a hash instead of categories in layoutrom.py
build: Keep segmented sections separate until final link step.
build: Use fileid instead of category to write sections in layoutrom.py.
build: Only export needed fields in LayoutInfo in layoutrom.py.
build: Get fixed address variables from 32bit compile pass (not 16bit)
build: Minor - fix comments referring to old tools/ directory.
xhci: Update the times for usb command timeouts.
ehci: Update usb command timeouts to use usb_xfer_time()
uhci: Update usb command timeouts to use usb_xfer_time()
ohci: Update usb command timeouts to use usb_xfer_time()
vgabios: Fix broken build resulting from
e5749978.
boot: Change ":rom%d" boot order rom instance to ":rom%x"
Minor - remove stray tab from src/fw/smm.c.
build: Update kconfig to version in Linux 3.16.
usb: Fix usb_xfer_time() to work when called in 16bit mode.
xhci: Call usb_desc2pipe() on xhci_update_pipe().
xhci: Remove 16bit code wrappers.
xhci: Use high memory instead of low memory for internal storage.
xhci: Move root hub and setup code to top of file.
xhci: Add xhci_check_ports() and xhci_free_pipes() functions.
ehci: Move port power up from ehci_hub_detect() to check_ehci_ports().
usb-hub: Enable power to all ports prior to calling usb_enumerate().
xhci: Change xhci_hub_detect() to use connect status instead of link state.
uhci: Repeatedly poll for device detect for 100ms.
ohci: Repeatedly poll for device detect for 100ms.
ehci: Stall uhci/ohci init only until default port routing is done.
usb: Perform device detect polling on all usb controllers.
ehci: Fix bug in hub port assignment
Revert "Use the extra stack for 16bit USB and PS2 keyboard/mouse commands."
pmm: Fix entry point to support non-zero %ss
Move stack hop code below call32/call16 code in stacks.c
Add need_hop_back() call that determines if stack_hop_back is needed
Update invoke_mouse_handler() to use need_hop_back()
Update stack_hop_back() to jump to 16bit mode if called in 32bit mode.
Track when entering via call32() and use the same mode for stack_hop_back()
Simplify farcall16 code
Update reset() to use call16_back()
build: Support declaring 32bit C functions that must reside in the f-segment
Move call16() functions from romlayout.S to inline assembler in stacks.c
Break up call32() into call32() and call32_sloppy()
Fully restore 16bit state during call16_sloppy()
Implement call32 mechanism using SMIs.
Move a20 code from system.c and ps2port.h to x86.h
Backup and restore a20 on call32_sloppy()
usb: Rename ?hci_control() to ?hci_send_control()
usb: Rename usb_getFrameExp() to usb_get_period()
usb: Rename findEndPointDesc() to usb_find_desc()
usb: Rename send_default_control() to usb_send_default_control()
usb: Rename free_pipe() to usb_free_pipe()
usb: Clarify usb freelist manipulations
xhci: Change xhci_update_pipe() to xhci_realloc_pipe() and use for alloc too
uhci: Export uhci_realloc_pipe() instead of uhci_alloc_pipe()
ohci: Export ohci_realloc_pipe() instead of ohci_alloc_pipe()
ehci: Export ehci_realloc_pipe() instead of ehci_alloc_pipe()
usb: Use usb_realloc_pipe for pipe alloc, update, and free.
Use 32bit memcpy in int1587 when applicable
Don't clobber %ax on ENTRY_INTO32 macro
Create assembler macros for saving and restoring 'struct bregs'
Do full BREGS backup/restore for pmm, pnp, and irqentry_extrastack
Remove unused macro ENTRY_ST
vgabios: Don't declare custom internal BDA storage in std/bda.h
vgabios: Cache a pointer to the current mode struct in the BDA
vgabios: Don't pass vmode_g to vgafb_move_chars() / vgafb_clear_chars()
vgabios: Rename vbe_flags to flags
vgabios: Set cursor shape fixes
vgabios: Refactor get/set_cursor_shape() code
vgabios: Only init BDA device details in init_bios_area()
vgabios: Only set the dcc_index=8 if stdvga ports are available
vgabios: Move standard table definitions to std/vga.h
vgabios: Fill in available legacy modes in video_func_static at runtime
vgabios: Add support for reading framebuffer in "direct" mode
Fix PNP regression introduced in
99cb8f3e due to missed conversion
Minor - move PORT_PS2_CTRLB from hw/ps2port.h to hw/timer.c
vgabios: Support emulating text mode attributes while in graphics mode
vgabios: Add software cursor capability
Use an aligned stack offset when entering on the extra stack
Minor - comment updates in romlayout.S
Fix build issue on gcc34
pciinit: Fix build warning in mch_pci_slot_get_irq()
floppy: Make sure to yield() during floppy PIO
Minor - be consistent in placement of .code16/32 in romlayout.S
Use macros for .code16/32 mode switches in inline asm in stacks.c
Eliminate FUNCFSEG - only force portions of inline asm to f-segment
usb: Update USB hub code to support super speed hubs
Simplify README files - point to online documentation instead
sdcard: Initial support for SD cards on PCI SDHCI controllers on QEMU
Add wiki documentation to repository
docs: Don't point to repo README files
docs: Add info on MODE16/MODESEGMENT compile time flags
docs: Add page describing SeaBIOS final object linking
scsi: Move cdb_* functions above scsi_* functions
scsi: Move process_scsi_op() to hw/blockcmd.c and rename
cdrom: call scsi_process_op() instead of cdb_read()
scsi: Don't export cdb_* functions
cdrom: Break up very large read requests into smaller requests
block: Check for read/write requests over 64K
usb: Add support for OHCI bulk transfers
readserial: Enhance pipe support
docs: Add documentation on using readserial.py script
uhci: Enable "depth" tree traversal for bulk transfers
uhci: Increase bulk transfer STACKTDS to 16
vgabios: Support emulated text in gfx_read_char()
ehci: No need to support td array wrapping
ehci: Simplify fillTDbuffer() and rename
ehci: Merge ehci_send_control with ehci_send_bulk
ohci: Merge ohci_send_control with ohci_send_bulk
uhci: Merge uhci_send_control with uhci_send_bulk
xhci: Merge xhci_send_control with xhci_send_bulk
usb: Use usb_send_pipe() now that all drivers have x_send_pipe()
xhci: Move xhci_xfer_x() functions together
xhci: Merge some xhci_xfer_x() functions into xhci_send_pipe()
usb: Control transfers always have an 8 byte command size
usb: Minor - properly free memory on get_device_config() error path
checkstack: Handle callw instruction
docs: Document why v1.6.3 release came after v0.6.2
docs: Update release history with dates of stable releases
docs: There is only one VAR16 flag now
docs: Note v1.8.0 release
Marcel Apfelbaum (1):
hw/pci: reserve IO and mem for pci express downstream ports with no devices attached
Markus Armbruster (1):
boot: Fix boot order for SCSI target, lun > 9
Paolo Bonzini (5):
piix: add and use dev-piix.h
smm: complete SMM setup
smm: unify SMM handlers
vgabios: fix graphics operation with Bochs VGA in non-DISPI modes
vgabios: implement read char in graphics mode
zhanghailiang (1):
acpi: use specified macro instead of magic-number
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Markus Armbruster [Fri, 6 Feb 2015 13:18:24 +0000 (14:18 +0100)]
hmp: Name HMP info handler functions hmp_info_SUBCOMMAND()
Some are called do_info_SUBCOMMAND() (old ones, usually), some
hmp_info_SUBCOMMAND(), some SUBCOMMAND_info(), sometimes SUBCOMMAND
pointlessly differs in spelling.
Normalize to hmp_info_SUBCOMMAND(), where SUBCOMMAND is exactly the
subcommand name with '-' replaced by '_'.
Exceptions:
* sun4m_irq_info(), sun4m_pic_info() renamed to sun4m_hmp_info_irq(),
sun4m_hmp_info_pic().
* lm32_irq_info(), lm32_pic_info() renamed to lm32_hmp_info_irq(),
lm32_hmp_info_pic().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Markus Armbruster [Fri, 6 Feb 2015 12:55:43 +0000 (13:55 +0100)]
hmp: Name HMP command handler functions hmp_COMMAND()
Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(),
and sometimes COMMAND pointlessly differs in spelling.
Normalize to hmp_COMMAND(), where COMMAND is exactly the command name
with '-' replaced by '_'.
Exceptions:
* do_device_add() and client_migrate_info() *not* renamed to
hmp_device_add(), hmp_client_migrate_info(), because they're also
QMP handlers. They still need to be converted to QAPI.
* do_memory_dump(), do_physical_memory_dump(), do_ioport_read(),
do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(),
hmp_i(), hmp_o(), because those names are too cryptic for my taste.
* do_info_help() renamed to hmp_info_help() instead of hmp_info(),
because it only covers help.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Markus Armbruster [Fri, 6 Feb 2015 11:07:09 +0000 (12:07 +0100)]
hmp: Clean up declarations for long-gone info handlers
Leftovers from
d1f2964 qapi: Convert query-spice
791e7c8 qapi: Convert query-migrate
0fe6a7f slirp: Drop statistic code
Signed-off-by: Markus Armbruster <armbru@redhat.com>
David Gibson [Wed, 18 Feb 2015 05:01:01 +0000 (16:01 +1100)]
Make sysbus EHCI devices ARM only by default
A number of ARM embedded boards include EHCI USB host controllers which
appear as directly mapped devices, rather than sitting on a PCI bus.
At present code to emulate such devices is included whenever EHCI support
is included. This patch adjusts teh config options to only include them
in builds targetting ARM by default.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Markus Armbruster [Wed, 4 Feb 2015 12:28:14 +0000 (13:28 +0100)]
PPC: Don't use legacy -usbdevice support for setting up board
It's tempting, because usbdevice_create() is so simple to use. But
there's a lot of unwanted complexity behind the simple interface.
Switch to usb_create_simple().
Cc: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Markus Armbruster [Wed, 4 Feb 2015 12:28:13 +0000 (13:28 +0100)]
r2d: Don't use legacy -usbdevice support for setting up board
It's tempting, because usbdevice_create() is so simple to use. But
there's a lot of unwanted complexity behind the simple interface.
Switch to usb_create_simple().
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Markus Armbruster [Wed, 4 Feb 2015 12:28:12 +0000 (13:28 +0100)]
usb: Change usb_create_simple() to abort on failure
Instead of returning null pointer. Matches pci_create_simple(),
isa_create_simple(), sysbus_create_simple(). It's unused since the
previous commit, but I'll put it to use again shortly.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Markus Armbruster [Wed, 4 Feb 2015 12:28:11 +0000 (13:28 +0100)]
usb: Suppress bogus error when automatic usb-hub creation fails
USBDevice's realize method usb_qdev_realize() automatically creates a
usb-hub when only one port is left. Creating devices in realize
methods is questionable, but works.
If usb-hub creation fails, an error is reported to stderr, but the
failure is otherwise ignored. We then create the actual device using
the last port, which may well succeed.
Example:
$ qemu -nodefaults -S -display none -machine usb=on -monitor stdio
QEMU 2.2.50 monitor - type 'help' for more information
(qemu) device_add usb-mouse
[Repeat 36 times]
(qemu) info usb
Device 0.0, Port 1, Speed 12 Mb/s, Product QEMU USB Mouse
Device 0.0, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
Device 0.0, Port 2.1, Speed 12 Mb/s, Product QEMU USB Mouse
[More mice and hubs omitted...]
Device 0.0, Port 2.8.8.8.8.7, Speed 12 Mb/s, Product QEMU USB Mouse
(qemu) device_add usb-mouse
usb hub chain too deep
Failed to initialize USB device 'usb-hub'
(qemu) info usb
[...]
Device 0.0, Port 2.8.8.8.8.7, Speed 12 Mb/s, Product QEMU USB Mouse
Device 0.0, Port 2.8.8.8.8.8, Speed 12 Mb/s, Product QEMU USB Mouse
Despite the "Failed" message, the command actually succeeded.
In QMP, it's worse. When adding the 37th mouse via QMP, the command
fails with
{"error": {"class": "GenericError", "desc": "usb hub chain too deep"}}
Additionally, "Failed to initialize USB device 'usb-hub'" is reported
on stderr. Despite the command failure, the device was created. This
is wrong.
Fix by avoiding qdev_init() for usb-hub creation, so we can ignore
errors cleanly.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Markus Armbruster [Wed, 4 Feb 2015 12:28:10 +0000 (13:28 +0100)]
usb: Do not prefix error_setg() messages with "Error: "
Because it produces beauties like
(qemu) usb_add mouse
Failed to initialize USB device 'usb-mouse': Error: tried to attach usb device QEMU USB Mouse to a bus with no free ports
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Markus Armbruster [Wed, 4 Feb 2015 12:28:09 +0000 (13:28 +0100)]
usb: Improve -usbdevice error reporting a bit
Most LegacyUSBFactory usbdevice_init() methods realize with
qdev_init_nofail(), even though their caller usbdevice_create() can
handle failure. Okay if it really can't fail (I didn't check), but
somewhat brittle.
usb_msd_init() and usb_bt_init() call qdev_init(). The latter
additionally reports an error when qdev_init() fails.
Realization failure produces multiple error reports: a specific one
from qdev_init(), and generic ones from usb_bt_init(),
usb_create_simple(), usbdevice_create() and usb_parse().
Remove realization from the usbdevice_init() methods. Realize in
usbdevice_create(), and produce exactly one error message there. You
still get another one from usb_parse().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Markus Armbruster [Wed, 4 Feb 2015 12:28:08 +0000 (13:28 +0100)]
usb: usb_create() can't fail, drop useless error handling
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Markus Armbruster [Tue, 10 Feb 2015 14:21:26 +0000 (15:21 +0100)]
qemu-char: Avoid qerror_report_err() outside QMP command handlers
qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP. It should not be used
elsewhere. Replace by error_report_err() in legacy chardev parser
qemu_chr_parse_compat(). Legacy chardev syntax is not to be used in
QMP.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Markus Armbruster [Tue, 10 Feb 2015 14:14:02 +0000 (15:14 +0100)]
qemu-img: Avoid qerror_report_err() outside QMP command handlers
qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP. It should not be used
elsewhere. Replace by error_report_err().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Markus Armbruster [Tue, 10 Feb 2015 14:12:59 +0000 (15:12 +0100)]
vl: Avoid qerror_report_err() outside QMP command handlers
qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP. It should not be used
elsewhere. Replace by error_report_err() in initial startup helpers
machine_set_property() and object_create().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Markus Armbruster [Tue, 10 Feb 2015 14:11:17 +0000 (15:11 +0100)]
tpm: Avoid qerror_report_err() outside QMP command handlers
qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP. It should not be used
elsewhere. Replace by error_report_err() in initial startup helper
configure_tpm().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Markus Armbruster [Tue, 10 Feb 2015 14:06:23 +0000 (15:06 +0100)]
numa: Avoid qerror_report_err() outside QMP command handlers
qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP. It should not be used
elsewhere. Replace by error_report_err() in initial startup helper
numa_init_func() and board setup helper
memory_region_allocate_system_memory().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Markus Armbruster [Tue, 10 Feb 2015 14:02:06 +0000 (15:02 +0100)]
net: Avoid qerror_report_err() outside QMP command handlers
qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP. It should not be used
elsewhere. Replace by error_report_err() in HMP command handler
hmp_host_net_add() and initial startup helpers net_init_client(),
net_init_netdev(). Keep it in QMP command handler qmp_netdev_add().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Markus Armbruster [Tue, 10 Feb 2015 14:15:43 +0000 (15:15 +0100)]
monitor: Avoid qerror_report_err() outside QMP command handlers
qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP. It should not be used
elsewhere. Replace by error_report_err() in HMP command handler
hmp_trace_event().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Markus Armbruster [Mon, 9 Feb 2015 13:03:19 +0000 (14:03 +0100)]
monitor: Clean up around monitor_handle_fd_param()
monitor_handle_fd_param() is a wrapper around
monitor_handle_fd_param2() that feeds errors to qerror_report_err()
instead of returning them. qerror_report_err() is inappropriate in
many contexts. monitor_handle_fd_param() looks simpler than
monitor_handle_fd_param2(), which tempts use. Remove the temptation:
drop the wrapper and open-code the (trivial) error handling instead.
Replace the open-coded qerror_report_err() by error_report_err() in
places that already use error_report(). Turns out that's everywhere.
While there, rename monitor_handle_fd_param2() to monitor_fd_param().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Markus Armbruster [Thu, 12 Feb 2015 12:55:05 +0000 (13:55 +0100)]
error: Use error_report_err() where appropriate
Coccinelle semantic patch:
@@
expression E;
@@
- error_report("%s", error_get_pretty(E));
- error_free(E);
+ error_report_err(E);
@@
expression E, S;
@@
- error_report("%s", error_get_pretty(E));
+ error_report_err(E);
(
exit(S);
|
abort();
)
Trivial manual touch-ups in block/sheepdog.c.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Markus Armbruster [Fri, 6 Feb 2015 14:27:19 +0000 (15:27 +0100)]
error: New convenience function error_report_err()
I've typed error_report("%s", error_get_pretty(ERR)) too many times
already, and I've fixed too many instances of qerror_report_err(ERR)
to error_report("%s", error_get_pretty(ERR)) as well. Capture the
pattern in a convenience function.
Since it's almost invariably followed by error_free(), stuff that into
the convenience function as well.
The next patch will put it to use.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Markus Armbruster [Mon, 9 Feb 2015 10:49:08 +0000 (11:49 +0100)]
vhost-scsi: Improve error reporting for invalid vhostfd
We get two error messages: one from monitor_handle_fd_param2(), and
another one from vhost_scsi_realize(). The second one gets suppressed
in QMP context.
That's because monitor_handle_fd_param() calls qerror_report_err().
Calling qerror_report_err() is always inappropriate in realize
methods, because it doesn't return the Error object. It either
reports the error to stderr or the human monitor, or it stores it in
the QMP monitor, where it makes the QMP command fail even when the
realize method ignores the error and succeeds. Fortunately,
vhost_scsi_realize() doesn't do that.
Fix by switching to monitor_handle_fd_param2().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:42 +0000 (18:09 +0100)]
s390x/helper: Remove s390_cpu_physical_memory_map
The function is now not used anymore, so it can be removed safely.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Frank Blaschka [Thu, 12 Feb 2015 17:09:41 +0000 (18:09 +0100)]
s390x/pci: Rework memory access in zpci instruction
Change zpci instructions to use the new logical memory access
functions.
Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:40 +0000 (18:09 +0100)]
s390x/ioinst: Rework memory access in TPI instruction
Change the handler for TPI to use the new logical memory
access functions.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:39 +0000 (18:09 +0100)]
s390x/ioinst: Rework memory access in CHSC instruction
Change the CHSC handler to correctly use logical addresses, too.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:38 +0000 (18:09 +0100)]
s390x/ioinst: Rework memory access in STCRW instruction
Change the handler for STCRW to use the new logical memory access
functions. Since STCRW is suppressed on protection/access exceptions,
we also have to make sure to re-queue the CRW in case it could not be
written to the memory.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:37 +0000 (18:09 +0100)]
s390x/ioinst: Rework memory access in TSCH instruction
Change the TSCH handler to use the new logical memory access functions.
Since the channel should not be updated in case of a protection or access
exception while writing to the guest memory, the css_do_tsch() has to be
split up into two parts, one for retrieving the IRB and one for the update.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:36 +0000 (18:09 +0100)]
s390x/ioinst: Set condition code in ioinst_handle_tsch() handler
Move the setting of the condition code from kvm.c into the handler
function in ioinst.c itself, just like it has been done with the other
handlers already (TSCH has just not been changed yet since it is called
from a different dispatcher in kvm.c).
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:35 +0000 (18:09 +0100)]
s390x/ioinst: Rework memory access in STSCH instruction
Change the handler for STSCH to use the new logical memory
access functions.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:34 +0000 (18:09 +0100)]
s390x/ioinst: Rework memory access in SSCH instruction
Change the handler for SSCH to use the new logical memory
access functions.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:33 +0000 (18:09 +0100)]
s390x/ioinst: Rework memory access in MSCH instruction
Change the handler for MSCH to use the new logical memory
access functions.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:32 +0000 (18:09 +0100)]
s390x/css: Make schib parameter of css_do_msch const
The schib parameter of css_do_msch() can be declared as const to
make it clear that it does not get modified by this function.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:31 +0000 (18:09 +0100)]
s390x/mmu: Add function for accessing guest memory
According to the POP specification, the parameter blocks of various
functions like the IO instructions are accessed with logical addresses.
Thus we need a function that can read or write a buffer from/to the
guest's logical address space.
This patch now provides a function that can be used to access virtual
guest memory by using the mmu_translate function of QEMU to convert
the virtual addresses to physical.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:30 +0000 (18:09 +0100)]
s390x/kvm: Add function for injecting pgm access exceptions
Program access exceptions are defined to deliver a translation exception
code in the low-core. Add a function trigger_access_exception() that
generates the proper program interrupt on both KVM and non-KVM systems
and switch the existing code to use it.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:29 +0000 (18:09 +0100)]
s390x/mmu: Clean up mmu_translate_asc()
We can get rid of the switch(asc) in mmu_translate_asc() by simply
selecting the right control register ASCE in the mmu_translate()
function already.
This patch is based on an original patch/idea by Ralf Hoppe.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:28 +0000 (18:09 +0100)]
s390x/mmu: Check bit 52 in page table entry
Bit 52 in a page table entry has always to be zero, or a translation
specification exception is to be recognized.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:27 +0000 (18:09 +0100)]
s390x/mmu: Renaming related to the ASCE confusion
An Address Space Control Element (ASCE) is only the very first unit of
an s390 address translation (normally residing in one of the control
registers). The entries in the page tables are called differently.
So let's call the relevant variable pt_entry instead of asce in
mmu_translate_pte() to avoid future confusion (thus there is no
functional change in this patch, just renaming).
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:26 +0000 (18:09 +0100)]
s390x/mmu: Add support for read-only regions
If the "DAT-protection" bit is set in the region table entry and EDAT is
enabled, only read accesses are allowed in the corresponding memory area.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:25 +0000 (18:09 +0100)]
s390x/mmu: Fix the exception codes for illegal table entries
Each different level of region/segment table has a dedicated
exception type for illegal entries.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:24 +0000 (18:09 +0100)]
s390x/mmu: Fix exception types when checking the ASCEs
If an ASCE has illegal bits set, an ASCE-type exception should be
generated instead of a translation specification exception.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:23 +0000 (18:09 +0100)]
s390x/mmu: Fix translation exception code in lowcore
The address space bits in the translation exception code were wrong.
In fact, we can simply copy the bits from the PSW, so there's no need
for the trans_bits() function anymore.
Additionally, we now also set the fetch/store bits in the translation
exception code, so a guest can determine whether the exception occured
during a write or during a read.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:22 +0000 (18:09 +0100)]
s390x/mmu: Skip exceptions properly when translating addresses for debug
When a fault occurs during the MMU lookup in s390_cpu_get_phys_page_debug(),
the trigger_page_fault() function writes the translation exception code
into the lowcore - something you would not expect during a memory access
by the debugger. Ease this problem by adding an additional parameter to
mmu_translate() which can be used to specify whether a program check and
the translation exception code should be injected or not.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:21 +0000 (18:09 +0100)]
s390x/mmu: Check table length and offset fields
The ACSEs have a table length field and the region entries have
table length and offset fields which must be checked during
translation to see whether the given virtual address is really
covered by the translation table.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:20 +0000 (18:09 +0100)]
s390x/mmu: Fix the handling of the table levels
The current code used a wrong and very confusing way of dealing with
the table levels by introducing a "fake level above current". However,
the real problem was simply that the checks for the region/segment
invalid bit and for the matching region/segment level was done at the
wrong spot in the code - it has to be done after the first table entry
has been looked up instead (e.g. there is also no "invalid" bit in the
ASCE itself and the current "level" has to be the same as the level in
the entry that we just looked up).
Also the entries for the segment table are quite a bit different compared
to the region table entries. So this patch moves the related code into the
function mmu_translate_segment() to make it clear at which table level we
currently are and to get rid of the ugly switch-statement in the function
mmu_translate_region().
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:19 +0000 (18:09 +0100)]
s390x/mmu: Fix the check for the real-space designation bit
The real-space designation bits live in the ASCEs, not in the table entries,
so the check must be done before we start walking the MMU table.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Thomas Huth [Thu, 12 Feb 2015 17:09:18 +0000 (18:09 +0100)]
s390x/mmu: Move mmu_translate() and friends to separate file
helper.c is quite overcrowded already, so let's move the MMU
translation to a separate file instead (like it has been done
with the other targets already).
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Michal Privoznik [Wed, 21 Jan 2015 11:09:50 +0000 (12:09 +0100)]
qemu-ga-win: Fail loudly on bare 'set-time'
The command is not implemented correctly yet. The documentation allows
to not pass any value to set, in which case the time is re-read from
RTC. However, reading CMOS on Windows is not trivial to implement. So
instead of pretending we've set the correct time, fail explicitly.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
zhanghailiang [Thu, 22 Jan 2015 02:40:06 +0000 (10:40 +0800)]
qga: add memory block command that unsupported
For memory block command, we only support for linux with sysfs.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
zhanghailiang [Thu, 22 Jan 2015 02:40:05 +0000 (10:40 +0800)]
qga: implement qmp_guest_get_memory_block_info() for Linux with sysfs
This conveys general information about guest memory blocks. Currently,
just the memory block size.
The size of a memory block is architecture dependent, it represents the logical
unit upon which memory online/offline operations are to be performed.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
*generalized guest-get-memory-block-size to get-get-memory-block-info
for future extensibility
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
zhanghailiang [Thu, 22 Jan 2015 02:40:04 +0000 (10:40 +0800)]
qga: implement qmp_guest_set_memory_blocks() for Linux with sysfs
We can change guest's online/offline state of memory blocks, by using
command 'guest-set-memory-blocks'.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
zhanghailiang [Thu, 22 Jan 2015 02:40:03 +0000 (10:40 +0800)]
qga: implement qmp_guest_get_memory_blocks() for Linux with sysfs
We can get guest's memory block information by using command
"guest-get-memory-blocks", the returned value contains a list of memory block
info, such as phys-index, online state, can-offline info.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
*replaced guest-triggerable assertion with an error msg
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
zhanghailiang [Thu, 22 Jan 2015 02:40:02 +0000 (10:40 +0800)]
qga: introduce three guest memory block commmands with stubs
Introduce three new guest commands:
guest-get-memory-blocks, guest-set-memory-blocks, guest-get-memory-block-size.
With these three commands, we can support online/offline guest's memory block
(logical memory hotplug/unplug) as required from host.
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
*generalized guest-get-memory-block-size to get-get-memory-block-info
for future extensibility
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Olga Krishtal [Fri, 6 Feb 2015 17:59:55 +0000 (20:59 +0300)]
qga: implement file commands for Windows guest
The following commands are implemented:
- guest_file_open
- guest_file_close
- guest_file_write
- guest_file_read
- guest_file_seek
- guest_file_flush
Motivation is quite simple: Windows guests should be supported with the
same set of features as Linux one. Also this patch is a prerequisite for
Windows guest-exec command support.
Signed-off-by: Olga Krishtal <okrishtal@parallels.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Simon Zolin [Fri, 6 Feb 2015 17:59:54 +0000 (20:59 +0300)]
guest agent: guest-file-open: refactoring
Moved the code that sets non-blocking flag on fd into a separate function.
Signed-off-by: Simon Zolin <szolin@parallels.com>
Reviewed-by: Roman Kagan <rkagan@parallels.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
CC: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Olga Krishtal [Fri, 6 Feb 2015 17:59:53 +0000 (20:59 +0300)]
utils: drop strtok_r from envlist_parse
The problem is that mingw 4.9.1 fails to compile the code with the
following warning:
/mingw/include/string.h:88:9: note: previous declaration of 'strtok_r'
was here
char *strtok_r(char * __restrict__ _Str,
const char * __restrict__ _Delim,
char ** __restrict__ __last);
/include/sysemu/os-win32.h:83:7: warning: redundant redeclaration of
'strtok_r' [-Wredundant-decls]
char *strtok_r(char *str, const char *delim, char **saveptr);
The problem is that compiles just fine on previous versions of mingw.
Compiler version check here is not a good idea. Though fortunately
strtok_r is used only once in the code and we could simply rewrite
the code without it.
Signed-off-by: Olga Krishtal <okrishtal@parallels.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Eric Blake <eblake@redhat.com>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Daniel P. Berrange [Wed, 11 Feb 2015 11:26:12 +0000 (11:26 +0000)]
qga: add guest-set-user-password command
Add a new 'guest-set-user-password' command for changing the password
of guest OS user accounts. This command is needed to enable OpenStack
to support its API for changing the admin password of guests running
on KVM/QEMU. It is not practical to provide a command at the QEMU
level explicitly targetting administrator account password change
only, since different guest OS have different names for the admin
account. While UNIX systems use 'root', Windows systems typically
use 'Administrator' and even that can be renamed. Higher level apps
like OpenStack have the ability to figure out the correct admin
account name since they have info that QEMU/libvirt do not.
The command accepts either the clear text password string, encoded
in base64 to make it 8-bit safe in JSON:
$ echo -n "123456" | base64
MTIzNDU2
$ virsh -c qemu:///system qemu-agent-command f21x86_64 \
'{ "execute": "guest-set-user-password",
"arguments": { "crypted": false,
"username": "root",
"password": "MTIzNDU2" } }'
{"return":{}}
Or a password that has already been run though a crypt(3) like
algorithm appropriate for the guest, again then base64 encoded:
$ echo -n '$6$n01A2Tau$e...snip...DfMOP7of9AJ1I8q0' | base64
JDYkb...snip...YT2Ey
$ virsh -c qemu:///system qemu-agent-command f21x86_64 \
'{ "execute": "guest-set-user-password",
"arguments": { "crypted": true,
"username": "root",
"password": "JDYkb...snip...YT2Ey" } }'
NB windows support is desirable, but not implemented in this
patch.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Mike Day [Thu, 5 Sep 2013 18:41:35 +0000 (14:41 -0400)]
Convert ram_list to RCU
Allow "unlocked" reads of the ram_list by using an RCU-enabled QLIST.
The ramlist mutex is kept. call_rcu callbacks are run with the iothread
lock taken, but that may change in the future. Writers still take the
ramlist mutex, but they no longer need to assume that the iothread lock
is taken.
Readers of the list, instead, no longer require either the iothread
or ramlist mutex, but they need to use rcu_read_lock() and
rcu_read_unlock().
One place in arch_init.c was downgrading from write side to read side
like this:
qemu_mutex_lock_iothread()
qemu_mutex_lock_ramlist()
...
qemu_mutex_unlock_iothread()
...
qemu_mutex_unlock_ramlist()
and the equivalent idiom is:
qemu_mutex_lock_ramlist()
rcu_read_lock()
...
qemu_mutex_unlock_ramlist()
...
rcu_read_unlock()
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Mike Day <ncmike@ncultra.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Mike Day [Wed, 21 Jan 2015 12:45:24 +0000 (13:45 +0100)]
exec: convert ram_list to QLIST
QLIST has RCU-friendly primitives, so switch to it.
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Mike Day <ncmike@ncultra.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Mike Day [Thu, 5 Sep 2013 18:41:35 +0000 (14:41 -0400)]
cosmetic changes preparing for the following patches
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Mike Day <ncmike@ncultra.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Mon, 9 Sep 2013 15:58:40 +0000 (17:58 +0200)]
exec: protect mru_block with RCU
Hence, freeing a RAMBlock has to be switched to call_rcu.
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Wed, 11 Feb 2015 14:00:12 +0000 (15:00 +0100)]
rcu: add g_free_rcu
This simplifies calling g_free from an RCU callback.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Mike Day [Tue, 27 Aug 2013 15:38:45 +0000 (11:38 -0400)]
rcu: introduce RCU-enabled QLIST
Add RCU-enabled variants on the existing bsd DQ facility. Each
operation has the same interface as the existing (non-RCU)
version. Also, each operation is implemented as macro.
Using the RCU-enabled QLIST, existing QLIST users will be able to
convert to RCU without using a different list interface.
Signed-off-by: Mike Day <ncmike@ncultra.org>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Wed, 21 Jan 2015 11:09:14 +0000 (12:09 +0100)]
exec: RCUify AddressSpaceDispatch
Note that even after this patch, most callers of address_space_*
functions must still be under the big QEMU lock, otherwise the memory
region returned by address_space_translate can disappear as soon as
address_space_translate returns. This will be fixed in the next part
of this series.
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Fri, 16 Aug 2013 06:26:30 +0000 (08:26 +0200)]
exec: make iotlb RCU-friendly
After the previous patch, TLBs will be flushed on every change to
the memory mapping. This patch augments that with synchronization
of the MemoryRegionSections referred to in the iotlb array.
With this change, it is guaranteed that iotlb_to_region will access
the correct memory map, even once the TLB will be accessed outside
the BQL.
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Thu, 15 Jan 2015 11:46:47 +0000 (12:46 +0100)]
exec: introduce cpu_reload_memory_map
This for now is a simple TLB flush. This can change later for two
reasons:
1) an AddressSpaceDispatch will be cached in the CPUState object
2) it will not be possible to do tlb_flush once the TCG-generated code
runs outside the BQL.
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Fri, 13 Feb 2015 12:42:03 +0000 (13:42 +0100)]
docs: clarify memory region lifecycle
Now that objects actually obey the rules, document them.
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Thu, 12 Feb 2015 20:39:20 +0000 (21:39 +0100)]
pci: split shpc_cleanup and shpc_free
object_unparent should not be called until the parent device is going to be
destroyed. Only remove the capability and do memory_region_del_subregion
at unrealize time. Freeing the data structures is left in shpc_free, to
be called from the instance_finalize callback.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini [Wed, 28 Jan 2015 10:18:58 +0000 (11:18 +0100)]
pcie: remove mmconfig memory leak and wrap mmconfig update with transaction
This memory leak was introduced inadvertently by omitting object_unparent.
A better fix is to use the new memory_region_set_size instead of destroying
and recreating the MMIO region on the fly.
Also, ensure that unmapping and remapping the region is done atomically.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Max Reitz [Thu, 5 Feb 2015 18:58:25 +0000 (13:58 -0500)]
block: Keep bdrv_check*_request()'s return value
Do not throw away the value returned by bdrv_check_request() and
bdrv_check_byte_request().
Fix up some coding style issues in the proximity of the affected hunks.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id:
1423162705-32065-17-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Max Reitz [Thu, 5 Feb 2015 18:58:24 +0000 (13:58 -0500)]
block: Remove "growable" from BDS
Now that request clamping is done in the BlockBackend, the "growable"
field can be removed from the BlockDriverState. All BDSs are now treated
as being "growable" (that is, they are allowed to grow; they are not
necessarily actually able to).
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id:
1423162705-32065-16-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Max Reitz [Thu, 5 Feb 2015 18:58:23 +0000 (13:58 -0500)]
block: Clamp BlockBackend requests
BlockBackend is used as the interface between the block layer and guest
devices. It should therefore assure that all requests are clamped to the
image size.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id:
1423162705-32065-15-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Max Reitz [Thu, 5 Feb 2015 18:58:22 +0000 (13:58 -0500)]
qemu-io: Use BlockBackend
qemu-io should behave like a guest, therefore it should use BlockBackend
to access the block layer.
There are a couple of places where that is infeasible: First, the
bdrv_debug_* functions could theoretically be mirrored in the
BlockBackend, but since these are functions internal to the block layer,
they should not be visible externally (qemu-io as a test tool is exempt
from this).
Second, bdrv_get_info() and bdrv_get_specific_info() work on a single
BDS alone, therefore they should stay BDS-specific.
Third, bdrv_is_allocated() mainly works on a single BDS as well. Some
data may be passed through from the BDS's file (if sectors which are
apparently allocated in the file are not really allocated there but just
zero).
[Fixed conflicts around block_acct_start() usage from Fam Zheng's
"qemu-io: Account IO by aio_read and aio_write" commit. Use
BlockBackend and blk_get_stats() instead of BlockDriverState.
--Stefan]
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id:
1423162705-32065-14-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Max Reitz [Thu, 5 Feb 2015 18:58:21 +0000 (13:58 -0500)]
qemu-io: Remove "growable" option
Remove "growable" option from the "open" command and from the qemu-io
command line. qemu-io is about to be converted to BlockBackend which
will make sure that no request exceeds the image size, so the only way
to keep "growable" would be to use BlockBackend if it is not given and
to directly access the BDS if it is.
qemu-io is a debugging tool, therefore removing a rarely used option
will have only a very small impact, if any. There was only one
qemu-iotest which used the option; since it is not critical, this patch
just removes it.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id:
1423162705-32065-13-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Max Reitz [Thu, 5 Feb 2015 18:58:20 +0000 (13:58 -0500)]
qemu-io: Use blk_new_open() in openfile()
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id:
1423162705-32065-12-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Max Reitz [Thu, 5 Feb 2015 18:58:19 +0000 (13:58 -0500)]
qemu-nbd: Use blk_new_open() in main()
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id:
1423162705-32065-11-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>