ccid-card-passthru: add atr check
Signed-off-by: Alon Levy <alevy@redhat.com>Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
libcacard: change default ATR
dev-smartcard-reader: reuse usb.h definitions
dev-smartcard-reader: support windows guest
By not advertising USB wakeup support (which we don't).
dev-smartcard-reader: remove aborts (never triggered, but just in case)
dev-smartcard-reader: nicer debug messages
dev-smartcard-reader: white space fixes
libcacard: remove default libcoolkey loading
Use only the modules defined in the NSS database.
Signed-off-by: Marc-André Lureau <mlureau@redhat.com>Reviewed-by: Alon Levy <alevy@redhat.com>
libcacard: remove sql: prefix
For some reason, with sql:/ prefix, the PKCS11 modules are not loaded.
This patch goes on top of Alon smartcard series.
libcacard: teach vscclient to use GMainLoop for portability
This version handles non-blocking sending and receiving from thesocket.
libcacard: vscclient to use QemuThread for portability
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>Reviewed-by: Alon Levy <alevy@redhat.com>
libcacard: split vscclient main() from socket reading
libcacard: fix mingw64 cross-compilation
Compile and link with version.lo
build-sys: must link with -fstack-protector
It is needed to give that flag to the linker as well, but latestlibtool 2.4.2 still swallows that argument, so let's pass it withlibtool -Wc argument.
qemu-1.4.0/stubs/arch-query-cpu-def.c:6: undefined reference to `__stack_chk_guard'...
util: move socket_init() to osdep.c
vscclient needs to call socket_init() for portability.Moving to osdep.c since it has no internal dependency.
libcacard: use system config directory for nss db on win32
It's a bit nicer to look for default database underCSIDL_COMMON_APPDATA\pki\nss rather that /etc/pki/nss.
ccid: declare DEFAULT_ATR table to be "static const"
Signed-off-by: Jim Meyering <meyering@redhat.com>Reviewed-by: Alon Levy <alevy@redhat.com>Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
ccid: make backend_enum_table "static const" and adjust users
ccid-card-emul: do not crash if backend is not provided
Program received signal SIGSEGV, Segmentation fault.__strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164164 movdqu (%rsi), %xmm2(gdb) bt at /home/elmarco/320g/src/qemu/hw/ccid-card-emulated.c:477...
libcacard: correct T0 historical bytes size
The VCARD_ATR_PREFIX macro adds a prefix of 6 characters only.
pcsc_scan was complaining before the patch:
+ Historical bytes: 56 43 41 52 44 5F 4E 53 53 ERROR! ATR is truncated: 2 byte(s) is/are missing
Signed-off-by: Marc-André Lureau <mlureau@redhat.com>...
Move TPM passthrough specific command line options to backend structure
Move the TPM passthrough specific command line options to the passthroughbackend implementation and attach them to the backend's interface structure.
Add code to tpm.c for validating the TPM command line options....
virtio-9p: add the virtio-9p device.
Create virtio-9p-device which extends virtio-device, so it can be connected onvirtio-bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366708123-19626-2-git-send-email-fred.konrad@greensocs.com...
virtio-9p-pci: switch to the new API.
Here the virtio-9p-pci is modified for the new API. The devicevirtio-9p-pci extends virtio-pci. It creates and connects avirtio-9p-device during the init. The properties are not changed.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>...
virtio-9p: cleanup: init function.
This remove old init function as it is no longer needed.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366708123-19626-4-git-send-email-fred.konrad@greensocs.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-9p: cleanup: QOM casts.
As the virtio-9p-pci is switched to the new API, we can use QOM casts.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366708123-19626-5-git-send-email-fred.konrad@greensocs.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/gtk: Add Turkish translations
Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>Message-id: 1366711456-1935-1-git-send-email-ozancag@gmail.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/gtk: Use gtk_widget_get_window() to support both gtk2 and gtk3
This fixes build with gtk+-3.0.
Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>Message-id: 1366711402-1750-1-git-send-email-ozancag@gmail.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'kraxel/usb.81' into staging
xhci: remove XHCIRing->base (unused)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ehci_free_packet: Discard finished packets when the queue is halted
With pipelining it is possible to encounter a finished packet when cleaningthe queue due to a halt. This happens when a non stall error happens whiletalking to a real device. In this case the queue on the usb-host side will...
usb: better speed mismatch error reporting
Report the supported speeds for device and port in the error message.Also add the speeds to the tracepoint. And while being at it dropthe redundant error message in usb_desc_attach, usb_device_attach willreport the error anyway....
usb-host: raise libusbx minimum version to 1.0.13
Allows to remove one FIXME. Makes LIBUSB_LOG_LEVEL_WARNING build errorsgo away. And starting with that version libusb has a LIBUSBX_API_VERSIONdefine which allows to easily #ifdef version dependencies should that...
block: Fix build with tracing enabled
filename was still uninitialised when it's used as a parameter to atracing function, so let's move the initialisation. Also, commit c2ad1b0cforgot to add a NULL check, which this patch adds while we're at it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
tpm: Simplify creation of cancel path
Simplify the creation of the cancel path given the TPM's device path.Given the path /dev/tpm0 build the path /sys/class/misc/tpm0/device/cancel.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>Reviewed-by: Eric Blake <eblake@redhat.com>...
qtest: Handle addresses and values for {in, out}[bwl] as unsigned
Handle the addresses and values for {in,out}[bwl] as unsigned (iewith strtoul), as per the protocol specification comment. This fixesa test failure in test_i440fx_defaults on 32-bit hosts where the test...
Add option to mlock qemu and guest memory
In certain scenario, latency induced by paging is significant andmemory locking is needed. Also, in the scenario with untrustedguests, latency improvement due to mlock is desired.
This patch introduces a following new option to mlock guest and...
qemu-char: do not operate on sources from finalize callbacks
Due to a glib bug, the finalize callback is called with the GMainContextlock held. Thus, any operation on the context from the callback willcause recursive locking and a deadlock. This happens, for example,...
qemu-char: use consistent idiom for removing sources
Always check that the source is active, and zero the tag afterwards.
The occurrence in pty_chr_state will trigger with the next patch, theothers are just theoretical.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qemu-char: simplify pty polling
There is no need to use a timer and pty_chr_read to detect a connectedpty. It is simpler to just call g_poll periodically and check for POLLHUP.It is done once per second, and only if the pty is disconnected, so itis cheap enough....
qemu-char: correct return value from chr_read functions
Even if a CharDriverState's source is blocked by the front-end,it must not be dropped. The IOWatchPoll that wraps it will takecare of adding and removing it to the main loop. Only removethe source when the channel is closed; and in that case, make sure...
translate-all: fix compiler warning and linked error
The code did use profile_getclock() but did not includeinclude/qemu/timer.h where this function is defined. The patch fixes this.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>Message-id: 1366616571-4321-1-git-send-email-aik@ozlabs.ru...
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'bonzini/nbd-next' into staging
Message-id: 1366381830-11267-1-git-send-email-pbonzini@redhat.com...
Merge remote-tracking branch 'bonzini/scsi-next' into staging
Merge remote-tracking branch 'luiz/queue/qmp' into staging
block: Allow overriding backing.file.filename
If a filename is passed in the driver-specific options from the commandline, the backing file path from the image is ignored now.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>
qemu-iotests: add 053 unaligned compressed image size test
Test that qemu-img convert -c works when input image length is not amultiple of the cluster size.
Previously an error message would be produced:
qemu-img: error while compressing sector 0: Input/output error...
block: Remove filename parameter from .bdrv_file_open()
It is unused now in all block drivers.
block: Fail gracefully when using a format driver on protocol level
Specifying the wrong driver could fail an assertion:
$ qemu-system-x86_64 -drive file.driver=qcow2,file=xqemu-system-x86_64: block.c:721: bdrv_open_common: Assertion `file !=((void *)0)' failed....
block: Add driver-specific options for backing files
Options starting in "backing." are passed to the backing file now. Ifyou don't need to specify the filename for the backing file, you can addit on the command line instead of in the image file:
$ qemu-nbd -t /tmp/test.img...
block: Enable filename option
This allows using the file.filename option instead of the string thatcomes from -drive file=... and is passed around as a separate parameter.The goal is to get rid of this parameter and use the options QDict moreconsistently....
raw-posix: Use bdrv_open options instead of filename
raw-win32: Use bdrv_open options instead of filename
blkdebug: Use bdrv_open options instead of filename
blkverify: Use bdrv_open options instead of filename
curl: Use bdrv_open options instead of filename
As a bonus, going through the QemuOpts QEMU_OPT_SIZE parser for thereadahead option gives us proper error reporting that the previous useof atoi() lacked.
gluster: Use bdrv_open options instead of filename
This is only to convert the internal interface that is used for passingthe "filename" to be parsed, but converting to actual fine grainedoptions is left for another day, as it doesn't look trivial.
iscsi: Use bdrv_open options instead of filename
rbd: Use bdrv_open options instead of filename
sheepdog: Use bdrv_open options instead of filename
vvfat: Use bdrv_open options instead of filename
qcow2: allow sub-cluster compressed write to last cluster
Compression in qcow2 requires image length to be a multiple of thecluster size. Lift this requirement by zero-padding the final clusterwhen necessary. The virtual disk size is still not cluster-aligned, so...
qcow: allow sub-cluster compressed write to last cluster
Compression in qcow requires image length to be a multiple of thecluster size. Lift this requirement by zero-padding the final clusterwhen necessary. The virtual disk size is still not cluster-aligned, so...
qemu-img: do not zero-pad the compressed write buffer
bdrv_write_compressed() does not allow requests that span the end of thedevice. Therefore it is useless to zero-pad the last cluster andthereby exceed the end of the device.
Let image formats handle zero-padding the final compressed cluster, if...
qemu-iotests: Fix _filter_qemu
$QEMU_PROG happens to be 'qemu' in my setup, so this sed commandreplaces a bit too much. Restrict it to the start of the line and towhen it's followed by a colon, i.e. the form used by error messages.
ui/cocoa.m: Fix recent compile breakage
Fix failures to compile introduced by recent console commits1dbfa00503, 81c0d5a6) which removed is_graphic_console() andvga_hw_update() without updating the cocoa UI backend to match.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
i386 ROR r8/r16 instruction fix
Fixed EFLAGS corruption by ROR r8/r16 instruction located at the end of the TB.
Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@gmail.com>Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qdev: Drop taddr properties
Drop all the infrastructure for taddr properties (ie ones whichare 'hwaddr' sized). These are now unused, and any further desireduse would be rather questionable since device properties shouldn'tgenerally depend on a type that is conceptually variable based on...
hw/sm501: Use correct setter for sysbus-ohci dma-address property
The sysbus-ohci dma-address property is declared as a HEX64property, not a TADDR, so use the correct setter for it.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Acked-by: Andreas Färber <afaerber@suse.de>...
Merge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm
Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm
Merge branch 'linux-user-for-upstream' of git://git.linaro.org/people/rikuvoipio/qemu
vhost-scsi-s390: new device supporting the tcm_vhost Linux kernel module
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Asias He <asias@redhat.com>Cc: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>...
vhost-scsi-ccw: new device supporting the tcm_vhost Linux kernel module
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
vhost-scsi-pci: new device supporting the tcm_vhost Linux kernel module
Cc: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>Signed-off-by: Asias He <asias@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio: simplify Makefile conditionals
vhost-scsi: new device supporting the tcm_vhost Linux kernel module
The WWPN specified in configfs is passed to "-device vhost-scsi-pci".The tgpt field of the SET_ENDPOINT ioctl is obsolete now, so it is notavailable from the QEMU command-line. Instead, I hardcode it to zero....
virtio-scsi: create VirtIOSCSICommon
This patch refactors existing virtio-scsi code into VirtIOSCSICommonin order to allow virtio_scsi_init_common() to be used by both internalvirtio_scsi_init() and external vhost-scsi-pci code.
Cc: Michael S. Tsirkin <mst@redhat.com>...
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pci: add pci test device
This adds a new device that we can use for testing PCI PIO and MMIO, with andwithout ioeventfd in different configurations. FAST_MMIO will be added if/whenkvm supports it. Also included are minor cleanups in kvm APIs that it needs....
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
monitor: fix the wrong order of releasing keys
(qemu) sendkey ctrl_r-scroll_lock-scroll_lock
Executing this command could not let Windows guest panic, it caused bythe wrong order of releasing keys. This problem was introduced bycommit e4c8f004c55d9da3eae3e14df740238bf805b5d6....
virtio-balloon: fix integer overflow in BALLOON_CHANGE QMP event
Because dev->actual is uint32_t, the expression 'dev->actual <<VIRTIO_BALLOON_PFN_SHIFT' is truncated to 32 bits. This overflows whendev->actual >= 1048576.
To reproduce:
1. Start a VM with a QMP socket and 5G of RAM...
target-arm: port ARM CPU save/load to use VMState
Port the ARM CPU save/load code to use VMState. Some state issaved in a slightly different order to simplify things -- forexample arrays are saved one after the other rather than 'striped',and we always save all 32 VFP registers even if the CPU happens...
target-arm: Add some missing CPU state fields to VMState
A number of CPU state fields were accidentally omitted fromour migration state: some OMAP specific cp15 registers, andsome related to state for load/store exclusive insns. Add them.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm: Correctly restore FPSCR
Use the helper functions to save and restore the FPSCR, so thatwe correctly propagate rounding mode and flushing behaviour intothe float_status fields. This also allows us to stop saving thevector length/stride fields separately....
target-arm: Reinsert missing return statement in ARM mode SRS decode
Since patch 81465888c5306cd94abb9847e560796fd13d3c2f target-arm: factor out handling of SRS instructionthe ARM mode SRS instruction has not worked in QEMU.
The problem is a missing return directive that was removed in the...
hw/versatile_pci: Drop unnecessary vpb_pci_config_addr()
Drop the vpb_pci_config_addr() function -- it is unnecessary sincethe size of the memory regions means the hwaddr is always withinthe 24 bit size. (This function was probably a leftover from when...
versatile_pci: Implement the PCI controller's control registers
The versatile_pci PCI controller has a set of control registers whichhandle the mapping between PCI and system address spaces. Implementthese registers (though for now they have no effect since we don't...
arm/realview: Fix mapping of PCI regions
Fix the mapping of the PCI regions for the realview board, which wereall incorrect. (This was never noticed because the Linux kerneldoesn't actually include a PCI driver for the realview boards.)
versatile_pci: Expose PCI memory space to system
The VersatilePB's PCI controller exposes the PCI memory space to thesystem via three regions controlled by the mapping control registers.Implement this so that guests can actually use MMIO-BAR PCI cards....
versatile_pci: Put the host bridge PCI device at slot 29
On real hardware the host bridge appears as a PCI device in slot 29,so make QEMU put its host bridge in that slot too.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Acked-by: Paul Brook <paul@codesourcery.com>
versatile_pci: Implement the correct PCI IRQ mapping
Implement the correct IRQ mapping for the Versatile PCI controller; itdiffers between realview and versatile boards, but the previous QEMUimplementation was correct only for the first PCI card on a versatile...
versatile_pci: Update to realize and instance init functions
Update the Versatile PCI controller to use a realize function ratherthan SysBusDevice::init. To reflect the fact that the 'realview_pci'class is taking most of its implementation from 'versatile_pci' (and...
versatile_pci: Change to subclassing TYPE_PCI_HOST_BRIDGE
Change versatile_pci to subclass TYPE_PCI_HOST_BRIDGE and generallyhandle PCI in a more QOM-like fashion.
versatile_pci: Use separate PCI I/O space rather than system I/O space
Rather than overloading the system I/O space (which doesn't even makeany sense on ARM) for PCI I/O, create an memory region in the PCIcontroller and use that to represent the I/O space....
versatile_pci: Fix hardcoded tabs
There is just one line in this source file with a hardcoded tabindent, so just fix it.
versatile_pci: Expose PCI I/O region on Versatile PB
Comments in the QEMU source code claim that the version of the PCIcontroller on the VersatilePB board doesn't support the PCI I/Oregion, but this is incorrect; expose that region, map it in thecorrect location, and drop the misleading comments....
m25p80: Remove bogus include of devices.h
I think in the early revisions of this we had an instantiation helperfor the device in devices.h. This was later removed and this header wasleft over. Removed
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
ssh: Remove unnecessary use of strlen function.
Reviewed-by: Eric Blake <eblake@redhat.com>Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>