[Qemu-devel] [PATCH 3/9] dma-helpers: Do not truncate small qiovs

2015-12-16 Thread Alex Pyrgiotis
If the size of the qiov is smaller than the sector size, do not truncate the qiov, which would effectively make it empty. Instead, allow it to pass as is. This is necessary for SCSI requests like READ CAPACITY which have small buffers, e.g. 32 bytes. Signed-off-by: Alex Pyrgiotis

[Qemu-devel] [PATCH] os-posix: Log to logfile in case of daemonize

2015-12-16 Thread Alex Pyrgiotis
From: Dimitris Aragiorgis In case of daemonize, use the logfile passed with the -D option in order to redirect stdout/stderr to a file instead of /dev/null. Signed-off-by: Dimitris Aragiorgis Signed-off-by: Alex Pyrgiotis diff

[Qemu-devel] [PATCH v2 3/3] hw/sd: use guest error logging rather than fprintf to stderr

2015-12-16 Thread Andrew Baumann
Some of these errors may be harmless (e.g. probing unimplemented commands, or issuing CMD12 in the wrong state), and may also be quite frequent. Spamming the standard error output isn't desirable in such cases. Signed-off-by: Andrew Baumann --- It might also be

[Qemu-devel] [PATCH v2 1/3] hw/sd: implement CMD23 (SET_BLOCK_COUNT) for MMC compatibility

2015-12-16 Thread Andrew Baumann
CMD23 is optional for SD but required for MMC, and the UEFI bootloader used for Windows on Raspberry Pi 2 issues it. Signed-off-by: Andrew Baumann --- hw/sd/sd.c | 37 + 1 file changed, 37 insertions(+) diff --git a/hw/sd/sd.c

[Qemu-devel] [PATCH 4/9] scsi-generic: Add common functions

2015-12-16 Thread Alex Pyrgiotis
In the `scsi_generic_req_ops' struct, instead of pointing to the implementations of read_data/write_data/send_command, point to wrappers around these functions, prefixed with "common_". Also, introduce the concept of "buffer" operations. Buffer operations are the read/write operations that rely

[Qemu-devel] [PATCH v2 2/3] hw/sd: model a power-up delay, as a workaround for an EDK2 bug

2015-12-16 Thread Andrew Baumann
The SD spec for ACMD41 says that a zero argument is an "inquiry" ACMD41, which does not start initialisation and is used only for retrieving the OCR. However, Tianocore EDK2 (UEFI) has a bug [1]: it first sends an inquiry (zero) ACMD41. If that first request returns an OCR value with the power up

Re: [Qemu-devel] [PATCH 1/3] sd: sdhci: Delete over-zealous power check

2015-12-16 Thread Andrew Baumann
> From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Wednesday, 16 December 2015 12:00 > On Wed, Dec 16, 2015 at 11:47 AM, Andrew Baumann > wrote: > > This is exactly equivalent to Peter's patch here: > >

Re: [Qemu-devel] [RFC PATCH v0 2/9] cpu: Store CPU typename in MachineState

2015-12-16 Thread Igor Mammedov
On Tue, 15 Dec 2015 14:08:09 +0530 Bharata B Rao wrote: > On Mon, Dec 14, 2015 at 03:29:49PM -0200, Eduardo Habkost wrote: > > On Thu, Dec 10, 2015 at 11:45:37AM +0530, Bharata B Rao wrote: > > > Storing CPU typename in MachineState lets us to create CPU threads > > >

Re: [Qemu-devel] [PATCH 02/11] alpha: convert "naked" qemu_log to tracepoint

2015-12-16 Thread Richard Henderson
On 12/12/2015 02:36 AM, Paolo Bonzini wrote: Cc: Richard Henderson Signed-off-by: Paolo Bonzini --- hw/alpha/pci.c | 3 ++- trace-events | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) Acked-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v2 1/1] i386: expose floppy-related objects in SSDT

2015-12-16 Thread Roman Kagan
On Wed, Dec 16, 2015 at 05:46:57PM +0100, Igor Mammedov wrote: > On Wed, 16 Dec 2015 10:45:09 +0300 "Denis V. Lunev" > wrote: > > @@ -1125,6 +1183,26 @@ build_ssdt(GArray *table_data, GArray *linker, > > aml_append(ssdt, scope); > > } > > > > +{ > add this

[Qemu-devel] [PATCH] scsi: use scsi_req_cancel_async when purging requests

2015-12-16 Thread Paolo Bonzini
This avoids calls to aio_poll without having acquired the context first. Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-bus.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index fd1171e..524a998 100644 ---

Re: [Qemu-devel] [PATCH v4 3/5] xilinx_spips: Seperate the state struct into a header

2015-12-16 Thread Alistair Francis
On Tue, Dec 15, 2015 at 10:48 AM, Peter Maydell wrote: > On 23 November 2015 at 08:54, Alistair Francis > wrote: >> Seperate out the XilinxSPIPS struct into a seperate header >> file. > > If you need to respin this series it would be nice to

[Qemu-devel] Block I/O Tracing

2015-12-16 Thread Luis Pabón
Hi all, I am really interested in the following feature: http://wiki.qemu.org/Features/Block/Todo#Trace_guest_block_I.2FO.2C_replay_with_qemu-io . Is there any more information about this feature? Thanks, - Luis

[Qemu-devel] [PATCH 2/9] dma-helpers: Add support for ioctl operations

2015-12-16 Thread Alex Pyrgiotis
Allow ioctl operations to benefit from the DMA functionality created for the read/write operations. More specifically, create a function called "dma_blk_ioctl" that uses the existing code for mapping scatter-gather lists to qiovs and ultimately calls the blk_aio_ioctl() function to perform the

[Qemu-devel] [PATCH 6/9] scsi-generic: Make request execution buf-specific

2015-12-16 Thread Alex Pyrgiotis
Move the request execution logic from execute_command() to scsi_buf_do_request(), since the way the io header is initialized and the ioctl is performed is used only for requests that use an intermediate buffer. For now, the above is the only request type, but we need to pave the way for the

Re: [Qemu-devel] [PATCH 1/3] sd: sdhci: Delete over-zealous power check

2015-12-16 Thread Peter Crosthwaite
On Wed, Dec 16, 2015 at 11:47 AM, Andrew Baumann wrote: > This check was conditionalising SD card operation on the card being > powered by the SDHCI host controller. It is however possible > (particularly in embedded systems) for the power control of the SD card > to

[Qemu-devel] [Bug 1307225] Re: Running a virtual machine on a Haswell system produces machine check events

2015-12-16 Thread cvbkf
Minor Update: Bug occurs under Intel Skylake, too. System-information: Intel Core i7-6700 with 4x8 GB Samsung M378A1G43DB0-CPB DDR4-2133 RAM, Motherboard: Fujitsu D3401-H1 Dec 15 06:53:30 srv01 kernel: [224214.850599] mce: [Hardware Error]: Machine check events logged Dec 15 06:55:08 srv01

Re: [Qemu-devel] [PATCH for-2.6 v2 01/10] fdc: move pick_geometry

2015-12-16 Thread John Snow
On 12/15/2015 04:51 PM, Hervé Poussineau wrote: > Le 08/12/2015 00:34, John Snow a écrit : >> Code motion: I want to refactor this function to work with FDrive >> directly, so shuffle it below that definition. >> >> Signed-off-by: John Snow >> --- >> hw/block/fdc.c | 90 >>

[Qemu-devel] [PATCH 3/3] sdhci: add optional quirk property to disable card insertion/removal interrupts

2015-12-16 Thread Andrew Baumann
This is needed for a quirk of the Raspberry Pi (bcm2835/6) MMC controller, where the card insert bit is documented as unimplemented (always reads zero, doesn't generate interrupts) but is in fact observed on hardware as set at power on, but is cleared (and remains clear) on subsequent controller

Re: [Qemu-devel] [RFC PATCH v0 2/9] cpu: Store CPU typename in MachineState

2015-12-16 Thread Eduardo Habkost
On Wed, Dec 16, 2015 at 05:54:25PM +0100, Igor Mammedov wrote: > On Tue, 15 Dec 2015 14:08:09 +0530 > Bharata B Rao wrote: > > > On Mon, Dec 14, 2015 at 03:29:49PM -0200, Eduardo Habkost wrote: > > > On Thu, Dec 10, 2015 at 11:45:37AM +0530, Bharata B Rao wrote: > > >

[Qemu-devel] [PATCH 0/9] Add full scatter-gather support for SCSI generic devices

2015-12-16 Thread Alex Pyrgiotis
Hi all, This patch is an attempt to boost the performance of "scsi-generic" and "scsi-block" device types, by removing an extra data copy and reducing their memory footprint. More specifically, the problem lies in the functions in the `scsi-generic_req_ops` struct of scsi-generic.c. These

[Qemu-devel] [PATCH 5/9] scsi-generic: Separate `sg_io_hdr' initializations

2015-12-16 Thread Alex Pyrgiotis
Separate the initialization of the `sg_io_hdr' struct in two parts: one part that fills the struct with sane defaults, and another part that prepares it for an SG_IO request with DIRECT IO and a single buffer. The first part can also be reused later on by the code that uses scatter-gather lists.

[Qemu-devel] [PATCH 7/9] scsi-generic: Make data-copying logic clearer

2015-12-16 Thread Alex Pyrgiotis
The copying of data to/from the intermediate buffer of the device is done by scsi_req_data(). Internally, scsi_req_data() also restarts the request with scsi_req_continue(). Therefore, we need a guard variable to know when the contents of the intermediate buffer are in sync with the data of the

[Qemu-devel] [PATCH v2 0/3] SD emulation fixes for Pi2 Tianocore EDK2 UEFI

2015-12-16 Thread Andrew Baumann
This series contains fixes to the SD card emulation that are needed to unblock Tianocore EDK2 UEFI (specifically, the bootloader for Windows on Raspberry Pi 2). Changes in v2, based on feedback from Peter Crosthwaite: * correct implementation of CMD23 to switch to transfer state on completion *

[Qemu-devel] [PATCH 9/9] scsi-generic: Allow full scatter-gather support

2015-12-16 Thread Alex Pyrgiotis
If the scsi controller uses scatter-gather lists, do not copy them to an intermediate buffer. Instead, use them as is via the dma_blk_ioctl() function. In order to make this feature possible, the following changes have been made to the code: * All I/O functions have been branched into two types

Re: [Qemu-devel] [PATCH v4 4/5] xlnx-zynqmp: Connect the SPI devices

2015-12-16 Thread Alistair Francis
On Tue, Dec 15, 2015 at 10:46 AM, Peter Maydell wrote: > On 23 November 2015 at 08:54, Alistair Francis > wrote: >> Connect the Xilinx SPI devices to the ZynqMP model. >> >> Signed-off-by: Alistair Francis > >>

[Qemu-devel] [PATCH 8/9] scsi-generic: Factor out response interception

2015-12-16 Thread Alex Pyrgiotis
The interception of read/write responses is currently done in the main code that handles the read write response. Move the interception logic in a function of its own, so that it can be reused from the scatter-gather path. Also, instead of altering the response buffer directly, use the

[Qemu-devel] [PATCH v2 1/1] xlnx-zynqmp: Add support for high DDR memory regions

2015-12-16 Thread Alistair Francis
The Xilinx ZynqMP SoC and EP108 board supports three memory regions: - A 2GB region starting at 0 - A 32GB region starting at 32GB - A 256GB region starting at 768GB This patch adds support for the first two memory regions, which is automatically created based on the size specified by the QEMU

[Qemu-devel] [PATCH 1/3] sd: sdhci: Delete over-zealous power check

2015-12-16 Thread Andrew Baumann
This check was conditionalising SD card operation on the card being powered by the SDHCI host controller. It is however possible (particularly in embedded systems) for the power control of the SD card to be managed outside of SDHCI. This can be as trivial as hard-wiring the SD slot VCC to a

[Qemu-devel] [PATCH 2/3] sdhci: don't raise a command index error for an unexpected response

2015-12-16 Thread Andrew Baumann
This deletes a block of code that raised a command index error if a command returned response data, but the guest did not set the appropriate bits in the response register to handle such a response. I cannot find any documentation that suggests the controller should behave in this way, the error

[Qemu-devel] [PATCH 1/9] dma-helpers: Expose the sg mapping logic

2015-12-16 Thread Alex Pyrgiotis
The mapping of scatter-gather lists from physical addresses (as perceived by the guest kernel) to the virtual address space of the QEMU process is a vital step for a DMA operation. This step is currently implemented, amongst other things, in dma_blk_cb(), making it impossible to be used by anyone

[Qemu-devel] [PATCH 0/3] sdhci patches to enable Raspberry Pi

2015-12-16 Thread Andrew Baumann
This is a series of three tweaks needed to enable the generic sdhci controller to emulate Raspberry Pi (bcm2835/2836), and boot Linux and Windows. There was some discussion of these changes in the following thread: https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg01401.html Cheers,

Re: [Qemu-devel] [PATCH v2 11/14] pc: Remove PcGuestInfo.isapc_ram_fw field

2015-12-16 Thread Eduardo Habkost
On Tue, Dec 15, 2015 at 04:27:51PM +0200, Marcel Apfelbaum wrote: > On 12/11/2015 08:42 PM, Eduardo Habkost wrote: [...] > >@@ -131,8 +130,7 @@ static void pc_q35_init(MachineState *machine) > > rom_memory = get_system_memory(); > > } > > > >-guest_info =

Re: [Qemu-devel] [PATCH] target-*: Get rid of "PC advancement" trick

2015-12-16 Thread Sergey Fedorov
On 12/16/15 20:03, Richard Henderson wrote: On 12/15/2015 01:02 PM, Sergey Fedorov wrote: For that, I think it might be interesting to arrange for non-empty TBs to exit prior to recognizing a breakpoint. So that a breakpoint TB is always just the one operation. Except for the fact that

Re: [Qemu-devel] [PATCH] target-*: Get rid of "PC advancement" trick

2015-12-16 Thread Richard Henderson
On 12/15/2015 01:02 PM, Sergey Fedorov wrote: For that, I think it might be interesting to arrange for non-empty TBs to exit prior to recognizing a breakpoint. So that a breakpoint TB is always just the one operation. Except for the fact that "generate an exception" has traditionally been a

Re: [Qemu-devel] [PATCH v2 4/6] Migration: Emit event at start of pass

2015-12-16 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 12/16/2015 04:47 AM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Emit an event each time we sync the dirty bitmap on the source; > > this helps libvirt use postcopy by giving it a kick when it >

Re: [Qemu-devel] [PATCH RFC] qemu-char: add an "overlay" backend type

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 18:56, Daniel P. Berrange wrote: > Introduce a new QEMU chardev backend called "overlay" which > allows you to splice together a pair of chardev backends into > one combined backend. The master backend permits full input/output > but the slave backend is output only. > > The

Re: [Qemu-devel] [PATCH v2 0/3] KVM-UNIT-TESTS: Hyper-V SynIC timers test

2015-12-16 Thread Denis V. Lunev
On 12/08/2015 07:36 PM, Andrey Smetanin wrote: The test checks Hyper-V SynIC timers functionality. The test runs on every vCPU and performs start/stop of periodic/one-shot timers (with period=1ms) and checks validity of received expiration messages in appropriate ISR's. Changes v2: * Share

Re: [Qemu-devel] RFC: Operation Blockers in QEMU Block Nodes

2015-12-16 Thread Jeff Cody
On Wed, Dec 16, 2015 at 09:31:26AM -0700, Eric Blake wrote: > On 12/15/2015 11:25 PM, Jeff Cody wrote: > > Background: > > > > Block jobs, and other QAPI operations, may modify and impact the > > BlockDriverState graph in QEMU. In order to support multiple > > operations safely, we

[Qemu-devel] [PATCH 3/5] target-i386: kvm: Simplify MSR array construction

2015-12-16 Thread Eduardo Habkost
Add a helper function that appends new entries to the MSR buffer and checks for the buffer size limit. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 262 ++ 1 file changed, 125 insertions(+), 137 deletions(-)

[Qemu-devel] [PATCH 1/5] target-i386: kvm: Allocate kvm_msrs struct once per VCPU

2015-12-16 Thread Eduardo Habkost
Instead of using 2400 bytes in the stack for 150 MSR entries in kvm_get_msrs() and kvm_put_msrs(), allocate a buffer once for each VCPU. Signed-off-by: Eduardo Habkost --- target-i386/cpu-qom.h | 4 target-i386/kvm.c | 37 +++-- 2

[Qemu-devel] [PATCH RFC] qemu-char: add an "overlay" backend type

2015-12-16 Thread Daniel P. Berrange
Introduce a new QEMU chardev backend called "overlay" which allows you to splice together a pair of chardev backends into one combined backend. The master backend permits full input/output but the slave backend is output only. The primary use case for this is to allow arbitrary backends to have

Re: [Qemu-devel] [PATCH 0/9] Add full scatter-gather support for SCSI generic devices

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 17:55, Alex Pyrgiotis wrote: > Hi all, > > This patch is an attempt to boost the performance of "scsi-generic" and > "scsi-block" device types, by removing an extra data copy and reducing > their memory footprint. More specifically, the problem lies in the > functions in the

Re: [Qemu-devel] [RFC PATCH v0 0/9] Generic cpu-core device

2015-12-16 Thread Igor Mammedov
On Wed, 16 Dec 2015 16:57:54 +0100 Andreas Färber wrote: > Am 16.12.2015 um 16:44 schrieb Igor Mammedov: > > On Wed, 16 Dec 2015 16:19:06 +0100 > > Andreas Färber wrote: > > > >> Am 10.12.2015 um 07:15 schrieb Bharata B Rao: > >>> CPU hotplug granularity >

Re: [Qemu-devel] Rationalising exit_request, cpu->exit_request and tcg_exit_req?

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 18:14, Alex Bennée wrote: > > While looking at Fred's current MTTCG WIP branch I ran into a problem > where: > > - async_safe_work_pending() was true > - this triggered setting cpu->exit_request > - however we never left tcg_exec_all() > - because the global exit_request

[Qemu-devel] Rationalising exit_request, cpu->exit_request and tcg_exit_req?

2015-12-16 Thread Alex Bennée
Hi, While looking at Fred's current MTTCG WIP branch I ran into a problem where: - async_safe_work_pending() was true - this triggered setting cpu->exit_request - however we never left tcg_exec_all() - because the global exit_request wasn't set - hence qemu_tcg_wait_io_event() never

Re: [Qemu-devel] -loadvm and disk only snapshot

2015-12-16 Thread Vasiliy Tolstov
2015-12-16 19:19 GMT+03:00 Eric Blake : > Won't work (qemu is not able to load disk snapshots without memory). > What libvirt does instead is to use qemu-img snapshot -c to change the > snapshot back to the active layer, then boot qemu fresh on the correct > contents. >

Re: [Qemu-devel] [RFC PATCH 00/40] Sneak peek of virtio and dataplane changes for 2.6

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 13:54, Christian Borntraeger wrote: > Just some quick remarks before I leave into vacation: > > Performance seems to be better than the initial version. I have some > hangs from time to time when shutting down (also with your previous > version) Yes, I've seen them too. To

[Qemu-devel] [PATCH] block: use drained section around bdrv_snapshot_delete

2015-12-16 Thread Paolo Bonzini
Do not use bdrv_drain, since by itself it does not guarantee anything. Signed-off-by: Paolo Bonzini --- block/snapshot.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/block/snapshot.c b/block/snapshot.c index 6e9fa8d..2d86b88

[Qemu-devel] [PATCH] block: fix bdrv_ioctl called from coroutine

2015-12-16 Thread Paolo Bonzini
When called from a coroutine, bdrv_ioctl must be asynchronous just like e.g. bdrv_flush. The code was incorrectly making it synchronous, fix it. Signed-off-by: Paolo Bonzini --- Fam, any reason why you did it this way? I don't see any coroutine caller, but

[Qemu-devel] [PATCH] scsi: always call notifier on async cancellation

2015-12-16 Thread Paolo Bonzini
This was found by code inspection. If the request is cancelled twice, the notifier is never called on the second cancellation request, and hence for example a TMF might never finish. Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-bus.c | 3 --- 1 file changed, 3

[Qemu-devel] [PATCH 0/5] target-i386: kvm: Increase MSR entry array limits, check for array overrun

2015-12-16 Thread Eduardo Habkost
We are dangerously close to the array limits in kvm_put_msrs() and kvm_get_msrs(): with the default mcg_cap configuration, we can set up to 148 MSRs in kvm_put_msrs(), and if we allow mcg_cap to be changed, we can write up to 236 MSRs[1]. This series changes the code to allocate a buffer once per

Re: [Qemu-devel] -loadvm and disk only snapshot

2015-12-16 Thread Eric Blake
On 12/16/2015 10:25 AM, Vasiliy Tolstov wrote: > 2015-12-16 19:19 GMT+03:00 Eric Blake : >> Won't work (qemu is not able to load disk snapshots without memory). >> What libvirt does instead is to use qemu-img snapshot -c to change the >> snapshot back to the active layer, then

Re: [Qemu-devel] [PATCH v1] kvm/x86: Remove Hyper-V SynIC timer stopping

2015-12-16 Thread Paolo Bonzini
On 14/12/2015 18:01, Andrey Smetanin wrote: > hostguest > start periodic stimer > start periodic timer > timer expires after 15ms > send expiration message into guest > restart periodic timer > doing something > timer expires

[Qemu-devel] [PATCH untested] mirror: start drained section earlier

2015-12-16 Thread Paolo Bonzini
Ensure that the guest does not write anything to disk after cnt is read for the final time. Signed-off-by: Paolo Bonzini --- Untested. block/mirror.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/block/mirror.c

[Qemu-devel] [PATCH 4/5] target-i386: kvm: Simplify MSR setting functions

2015-12-16 Thread Eduardo Habkost
Simplify kvm_put_tscdeadline_msr() and kvm_put_msr_feature_control() using kvm_msr_buf and the kvm_msr_entry_add() helper. Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v1 1/1] xlnx-ep108: Add support for high DDR memory regions

2015-12-16 Thread Alistair Francis
On Tue, Nov 24, 2015 at 10:33 PM, Peter Crosthwaite wrote: > On Mon, Nov 23, 2015 at 9:00 PM, Alistair Francis > wrote: >> The Xilinx EP108 supports three memory regions: >> - A 2GB region starting at 0 >> - A 32GB region starting at

[Qemu-devel] [PATCH 2/5] target-i386: kvm: Increase MSR_BUF_SIZE

2015-12-16 Thread Eduardo Habkost
We are dangerously close to the array limits in kvm_put_msrs() and kvm_get_msrs(): with the default mcg_cap configuration, we can set up to 148 MSRs in kvm_put_msrs(), and if we allow mcg_cap to be changed, we can write up to 236 MSRs. Use 4096 bytes for the buffer, that can hold 255

[Qemu-devel] [PATCH 5/5] target-i386: kvm: Eliminate kvm_msr_entry_set()

2015-12-16 Thread Eduardo Habkost
Inline the function inside kvm_msr_entry_add(). Signed-off-by: Eduardo Habkost --- target-i386/kvm.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 3550866..b328392 100644 --- a/target-i386/kvm.c

[Qemu-devel] [PATCH v3 08/11] fdc: add physical disk sizes

2015-12-16 Thread John Snow
2.88MB capable drives can accept 1.44MB floppies, for instance. To rework the pick_geometry function, we need to know if our current drive can even accept the type of disks we're considering. NB: This allows us to distinguish between all of the "total sectors" collisions between 1.20MB and 1.44MB

[Qemu-devel] [PATCH v3 10/11] qtest/fdc: Support for 2.88MB drives

2015-12-16 Thread John Snow
The old test assumes a 1.44MB drive. Assert that the QEMU default drive is now either 1.44 or 2.88. Signed-off-by: John Snow --- tests/fdc-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fdc-test.c b/tests/fdc-test.c index b5a4696..526d459

[Qemu-devel] [PATCH v5 5/6] xlnx-zynqmp: Connect the SPI devices

2015-12-16 Thread Alistair Francis
Connect the Xilinx SPI devices to the ZynqMP model. Signed-off-by: Alistair Francis --- V5: - Use the bus renaming function V4: - Rename the SPI busses so that they can all be accessed from the SoC - Don't set the num-busses property V3: - Expose the SPI Bus as

[Qemu-devel] [PATCH v5 6/6] xlnx-ep108: Connect the SPI Flash

2015-12-16 Thread Alistair Francis
Connect the sst25wf080 SPI flash to the EP108 board. Signed-off-by: Alistair Francis --- V4: - Only add one SPI flash V3: - Don't reach into the SoC V2: - Use sst25wf080 instead of m25p80 hw/arm/xlnx-ep108.c | 16 1 file changed, 16

[Qemu-devel] [PATCH v3 04/11] fdc: add default drive type option

2015-12-16 Thread John Snow
This patch adds a new explicit Floppy Drive Type option. The existing behavior in QEMU is to automatically guess a drive type based on the media inserted, or if a diskette is not present, arbitrarily assign one. This behavior can be described as "auto." This patch adds explicit behaviors: 120,

[Qemu-devel] [PATCH v3 00/11] fdc: fix 2.88mb floppy diskette support

2015-12-16 Thread John Snow
requires: 1448895398-13465-1-git-send-email-ehabk...@redhat.com pc: Add pc-*-2.6 machine classes Yes, it's been broken for ten years. No, it's not a CVE. The problem is that QEMU doesn't have a configuration option for the type of floppy drive you want. It determines that based on the

Re: [Qemu-devel] [PATCH v3 11/11] fdc: change auto fallback drive for ISA FDC to 288

2015-12-16 Thread John Snow
On 12/16/2015 05:16 PM, John Snow wrote: > The 2.88 drive is more suitable as a default because > it can still read 1.44 images correctly, but the reverse > is not true. > > Since there exist virtio-win drivers that are shipped on > 2.88 floppy images, this patch will allow VMs booted without >

[Qemu-devel] [PATCH v3 06/11] fdc: do not call revalidate on eject

2015-12-16 Thread John Snow
Currently, fd_revalidate is called in two different places, with two different expectations of behavior: (1) On initialization, as a routine to help pick the drive type and initial geometries as a side-effect of the pick_geometry routine (2) On insert/eject, which either sets the geometries

[Qemu-devel] [PATCH v3 07/11] fdc: implement new drive type property

2015-12-16 Thread John Snow
Respect the drive type as given via the CLI. Set the type given by the CLI during fd_init. If the type remains the default (auto), we'll attempt to scan an inserted diskette if present to determine a type. If auto is selected but no diskette is present, we fall back to a predetermined default

Re: [Qemu-devel] [RFC PATCH v0 0/9] Generic cpu-core device

2015-12-16 Thread Igor Mammedov
On Wed, 16 Dec 2015 18:22:20 +0100 Igor Mammedov wrote: > On Wed, 16 Dec 2015 16:57:54 +0100 > Andreas Färber wrote: [...] > > > > Attendees in Seattle said that thread-level hot-plug were dangerous > > for Linux guests due to assumptions in the (guest's)

[Qemu-devel] [PATCH v5 2/6] ssi: Move ssi.h into a separate directory

2015-12-16 Thread Alistair Francis
Move the ssi.h include file into the ssi directory. While touching the code also fix the typdef lines as checkpatch complains. Signed-off-by: Alistair Francis Reviewed-by: Peter Crosthwaite --- V2: - Change git patch to indicate rename

[Qemu-devel] [PATCH v5 4/6] qdev: Add a function to rename busses

2015-12-16 Thread Alistair Francis
Add a function which can be used to rename busses. Signed-off-by: Alistair Francis --- hw/core/qdev.c | 5 + include/hw/qdev-core.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index b3ad467..29a3e9d 100644 ---

Re: [Qemu-devel] [RFC PATCH v0 0/9] Generic cpu-core device

2015-12-16 Thread Igor Mammedov
On Wed, 16 Dec 2015 16:46:37 +0100 Andreas Färber wrote: > Am 10.12.2015 um 13:35 schrieb Igor Mammedov: > > wrt CLI can't we do something like this? > > > > -device some-cpu-model,socket=x[,core=y[,thread=z]] > > That's problematic and where my x86 remodeling got stuck. It

[Qemu-devel] [PATCH v3 09/11] fdc: rework pick_geometry

2015-12-16 Thread John Snow
This one is the crazy one. fd_revalidate currently uses pick_geometry to tell if the diskette geometry has changed upon an eject/insert event, but it won't allow us to insert a 1.44MB diskette into a 2.88MB drive. This is inflexible. The new algorithm applies a new heuristic to guessing disk

Re: [Qemu-devel] [PATCH v5 4/6] qdev: Add a function to rename busses

2015-12-16 Thread Peter Crosthwaite
On Wed, Dec 16, 2015 at 1:45 PM, Alistair Francis wrote: > Add a function which can be used to rename busses. > > Signed-off-by: Alistair Francis > --- > > hw/core/qdev.c | 5 + > include/hw/qdev-core.h | 2 ++ > 2 files

Re: [Qemu-devel] [PATCH v3 04/11] fdc: add default drive type option

2015-12-16 Thread Eric Blake
On 12/16/2015 03:16 PM, John Snow wrote: > This patch adds a new explicit Floppy Drive Type option. The existing > behavior in QEMU is to automatically guess a drive type based on the > media inserted, or if a diskette is not present, arbitrarily assign one. > > This behavior can be described as

Re: [Qemu-devel] [PATCH v5 5/6] xlnx-zynqmp: Connect the SPI devices

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 22:45, Alistair Francis wrote: > + > +/* Rename each SPI bus after the SPI device to allow the board > + * to access all of the busses from the SoC. > + */ > +spi_bus = qdev_get_child_bus(DEVICE(>spi[i]), "spi0"); > +snprintf(bus_name, 6,

Re: [Qemu-devel] [PATCH 0/5] target-i386: kvm: Increase MSR entry array limits, check for array overrun

2015-12-16 Thread Paolo Bonzini
On 16/12/2015 20:06, Eduardo Habkost wrote: > We are dangerously close to the array limits in kvm_put_msrs() > and kvm_get_msrs(): with the default mcg_cap configuration, we > can set up to 148 MSRs in kvm_put_msrs(), and if we allow mcg_cap > to be changed, we can write up to 236 MSRs[1]. > >

[Qemu-devel] [PATCH v5 3/6] xilinx_spips: Separate the state struct into a header

2015-12-16 Thread Alistair Francis
Separate out the XilinxSPIPS struct into a separate header file. Signed-off-by: Alistair Francis --- V5: - Fix typos V4: - Don't split off R_MOD_ID and hardcode R_MAX V2: - Only split out required #defines - Prefix XLNX_SPIPS_ hw/ssi/xilinx_spips.c | 46

[Qemu-devel] [PATCH v5 1/6] m25p80.c: Add sst25wf080 SPI flash device

2015-12-16 Thread Alistair Francis
Add the sst25wf080 SPI flash device. Signed-off-by: Alistair Francis Reviewed-by: Peter Crosthwaite --- hw/block/m25p80.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index efc43dd..7b9f97c

[Qemu-devel] [PATCH v5 0/6] Connect the SPI devices to ZynqMP

2015-12-16 Thread Alistair Francis
Connect the SPI devices to Xilinx's ZynqMP. I also need to make some changes to the actual SPI device to imporove the fuctionality, but for the time being this works. V5: - Fix a typo - Use a qdev API to rename the SPI bus V4: - Rebase - Rename the SPI busses so that they can all be accessed

Re: [Qemu-devel] [PATCH v2 1/1] i386: expose floppy-related objects in SSDT

2015-12-16 Thread Igor Mammedov
On Wed, 16 Dec 2015 20:34:55 +0300 Roman Kagan wrote: > On Wed, Dec 16, 2015 at 05:46:57PM +0100, Igor Mammedov wrote: > > On Wed, 16 Dec 2015 10:45:09 +0300 "Denis V. Lunev" > > wrote: > > > @@ -1125,6 +1183,26 @@ build_ssdt(GArray *table_data, GArray > >

[Qemu-devel] [PATCH v3 03/11] fdc: add disk field

2015-12-16 Thread John Snow
This allows us to distinguish between the current disk type and the current drive type. The drive is what's reported to CMOS, the disk is whatever the pick_geometry function suspects has been inserted. The drive field maintains the exact same meaning as it did previously, however

Re: [Qemu-devel] [RFC PATCH v0 2/9] cpu: Store CPU typename in MachineState

2015-12-16 Thread Igor Mammedov
On Wed, 16 Dec 2015 17:39:02 -0200 Eduardo Habkost wrote: > On Wed, Dec 16, 2015 at 05:54:25PM +0100, Igor Mammedov wrote: > > On Tue, 15 Dec 2015 14:08:09 +0530 > > Bharata B Rao wrote: > > > > > On Mon, Dec 14, 2015 at 03:29:49PM -0200,

[Qemu-devel] [PATCH v3 11/11] fdc: change auto fallback drive for ISA FDC to 288

2015-12-16 Thread John Snow
The 2.88 drive is more suitable as a default because it can still read 1.44 images correctly, but the reverse is not true. Since there exist virtio-win drivers that are shipped on 2.88 floppy images, this patch will allow VMs booted without a floppy disk inserted to later insert a 2.88MB floppy

[Qemu-devel] [PATCH v3 02/11] fdc: refactor pick_geometry

2015-12-16 Thread John Snow
Modify this function to operate directly on FDrive objects instead of unpacking and passing all of those parameters manually. Helps reduce complexity in each caller, and reduces the number of args. Signed-off-by: John Snow --- hw/block/fdc.c | 54

[Qemu-devel] [PATCH v3 01/11] fdc: move pick_geometry

2015-12-16 Thread John Snow
Code motion: I want to refactor this function to work with FDrive directly, so shuffle it below that definition. Signed-off-by: John Snow --- hw/block/fdc.c | 90 +- 1 file changed, 45 insertions(+), 45 deletions(-) diff

[Qemu-devel] [PATCH v3 05/11] fdc: Add fallback option

2015-12-16 Thread John Snow
Add the fallback drive type as an option so we can control the behavior as a function of the QEMU machine version. Signed-off-by: John Snow --- hw/block/fdc.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index

[Qemu-devel] [PATCH v14 Resend 12/13] vfio-pci: pass the aer error to guest

2015-12-16 Thread Cao jin
From: Chen Fan when the vfio device encounters an uncorrectable error in host, the vfio_pci driver will signal the eventfd registered by this vfio device, the results in the qemu eventfd handler getting invoked. this patch is to pass the error to guest and have the

[Qemu-devel] [PATCH v14 Resend 05/13] vfio: add pcie extanded capability support

2015-12-16 Thread Cao jin
From: Chen Fan For vfio pcie device, we could expose the extended capability on PCIE bus. in order to avoid config space broken, we introduce a copy config for parsing extended caps. and rebuild the pcie extended config space. Signed-off-by: Chen Fan

[Qemu-devel] [PATCH v14 Resend 01/13] vfio: extract vfio_get_hot_reset_info as a single function

2015-12-16 Thread Cao jin
From: Chen Fan the function is used to get affected devices by bus reset. so here extract it, and can used for aer soon. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 66 +++ 1

[Qemu-devel] [PATCH v14 Resend 02/13] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2015-12-16 Thread Cao jin
From: Chen Fan squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 75 +++ 1 file changed, 44 insertions(+), 31

Re: [Qemu-devel] [PATCH] change type of pci_bridge_initfn() to void

2015-12-16 Thread Cao jin
Ping On 11/30/2015 05:19 PM, Michael S. Tsirkin wrote: On Mon, Nov 30, 2015 at 05:00:44PM +0800, Cao jin wrote: It always return 0(success), change its type to void, and modify its caller. Doing this can reduce a error path of its caller, and it is also good when convert init() to realize()

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/4] spapr: Handle "ibm, nmi-register" and "ibm, nmi-interlock" RTAS calls

2015-12-16 Thread Aravinda Prasad
On Thursday 17 December 2015 09:21 AM, David Gibson wrote: > On Wed, Dec 16, 2015 at 11:38:22AM +0530, Aravinda Prasad wrote: >> This patch adds support in QEMU to handle "ibm,nmi-register" >> and "ibm,nmi-interlock" RTAS calls. >> >> The machine check notification address is saved when the >>

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 3/4] target-ppc: Handle NMI guest exit

2015-12-16 Thread Aravinda Prasad
On Thursday 17 December 2015 09:30 AM, David Gibson wrote: > On Wed, Dec 16, 2015 at 11:38:37AM +0530, Aravinda Prasad wrote: >> Memory error such as bit flips that cannot be corrected >> by hardware are passed on to the kernel for handling. >> If the memory address in error belongs to guest

[Qemu-devel] [PATCH 1/2] block: Remove prototype of bdrv_swap from header

2015-12-16 Thread Fam Zheng
The function has gone. Signed-off-by: Fam Zheng --- include/block/block.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/block/block.h b/include/block/block.h index 3477328..028f2fb 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -197,7 +197,6 @@

[Qemu-devel] [PATCH v2] coverity: Model g_poll()

2015-12-16 Thread Markus Armbruster
In my testing, Coverity reported two more CHECKED_RETURN: * qemu-char.c:1248: fixed in commit c1f2448: "qemu-char: retry g_poll on EINTR". * migration/qemu-file-unix.c:75: harmless, cleaned up in commit 4e39f57 "migration: Clean up use of g_poll() in socket_writev_buffer() Signed-off-by:

Re: [Qemu-devel] [TCG only][Migration Bug? ] Occasionally, the content of VM's memory is inconsistent between Source and Destination of migration

2015-12-16 Thread Amit Shah
On (Fri) 04 Dec 2015 [01:43:07], Li, Liang Z wrote: > > > > Thanks for describing how to reproduce the bug. > > If some pages are not transferred to destination then it is a bug, so we > > need > > to know what the problem is, notice that the problem can be that TCG is not > > marking dirty some

[Qemu-devel] [PATCH 0/2] Clean up the remainders of bdrv_swap

2015-12-16 Thread Fam Zheng
Fam Zheng (2): block: Remove prototype of bdrv_swap from header iotests: Don't mention bdrv_swap in comments include/block/block.h | 1 - tests/qemu-iotests/094 | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) -- 2.4.3

[Qemu-devel] [PATCH 2/2] iotests: Don't mention bdrv_swap in comments

2015-12-16 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/094 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/qemu-iotests/094 b/tests/qemu-iotests/094 index 27a2be2..d30c78d 100755 --- a/tests/qemu-iotests/094 +++ b/tests/qemu-iotests/094 @@ -1,6 +1,6 @@

Re: [Qemu-devel] [PATCH v2 4/4] spapr: Introduce FWNMI KVM capability

2015-12-16 Thread Aravinda Prasad
On Thursday 17 December 2015 09:32 AM, David Gibson wrote: > On Wed, Dec 16, 2015 at 11:38:47AM +0530, Aravinda Prasad wrote: >> Introduce a new KVM capability to control how KVM >> behaves on machine check exception. >> >> Without this capability, KVM redirects machine check >> exceptions to

  1   2   3   >