[Qemu-devel] [PATCH V2] hw/virtio: Add PCIe capability to virtio devices

2015-10-28 Thread Marcel Apfelbaum
The virtio devices are converted to PCI-Express if they are plugged into a PCI-Express bus and the 'modern' protocol is enabled. Devices plugged directly into the Root Complex as Integrated Endpoints remain PCI. Signed-off-by: Marcel Apfelbaum --- v1 -> v2: - Addressed Michael S. Tsirkin's com

[Qemu-devel] [PATCH v8 11/17] qapi: Fix alternates that accept 'number' but not 'int'

2015-10-28 Thread Eric Blake
The QMP input visitor allows integral values to be assigned by promotion to a QTYPE_QFLOAT. However, when parsing an alternate, we did not take this into account, such that an alternate that accepts 'number' but not 'int' would reject integral values. With this patch, we now have the following de

[Qemu-devel] [PATCH v8 12/17] qapi: Remove dead visitor code

2015-10-28 Thread Eric Blake
Commit cbc95538 removed unused start_handle() and end_handle(), but forgot got remove their declarations. Commit 4e27e819 introduced optional visitor callbacks for all sorts of int types, but except for type_uint64 and type_size, none of them have ever been supplied (the generic implementation bas

[Qemu-devel] [PATCH v2 1/4] fw_cfg: move internal function call docs to header file

2015-10-28 Thread Gabriel L. Somlo
Move documentation for fw_cfg functions internal to qemu from docs/specs/fw_cfg.txt to the fw_cfg.h header file, next to their prototype declarations, formatted as doc-comments. Suggested-by: Peter Maydell Cc: Laszlo Ersek Cc: Gerd Hoffmann Cc: Marc Marí Cc: Jordan Justen Cc: Paolo Bonzini C

[Qemu-devel] [PATCH v2 4/4] fw_cfg: streamline (non-DMA) read operations

2015-10-28 Thread Gabriel L. Somlo
Replace fw_cfg_comb_read(), fw_cfg_data_mem_read(), and fw_cfg_read() with a single method, fw_cfg_data_read(), which works on all possible read sizes (single- or multi-byte). The new method also eliminates redundant validity checks caused by multi-byte reads repeatedly invoking the old single-byte

[Qemu-devel] [PATCH v2 0/4] fw_cfg: spec update, read optimization, misc. cleanup

2015-10-28 Thread Gabriel L. Somlo
This series' main purpose is to update (and simplify) the specified read callback behavior. An earlier standalone patch to move qemu function call API documentation into fw_cfg.h should logically be part of the series. Here's the summary of what each patch does: - Patch 1/4 is an updated

[Qemu-devel] [PATCH v8 15/17] qapi: Test failure in middle of array parse

2015-10-28 Thread Eric Blake
Our generated list visitors have the same problem as has been mentioned elsewhere (see commit 2f52e20): they allocate data even on failure. An upcoming patch will correct things to provide saner guarantees, but first we need to expose the behavior in the testsuite to ensure we aren't introducing an

[Qemu-devel] [PATCH v8 17/17] qapi: Simplify visits of optional fields

2015-10-28 Thread Eric Blake
None of the visitor callbacks would set an error when testing if an optional field was present; make this part of the interface contract by eliminating the errp argument. Then, for less code, reflect the determined boolean value back to the caller instead of making the caller read the boolean afte

Re: [Qemu-devel] [PATCH V2] hw/virtio: Add PCIe capability to virtio devices

2015-10-28 Thread Michael S. Tsirkin
On Wed, Oct 28, 2015 at 07:16:06PM +0200, Marcel Apfelbaum wrote: > The virtio devices are converted to PCI-Express > if they are plugged into a PCI-Express bus and > the 'modern' protocol is enabled. > > Devices plugged directly into the Root Complex as > Integrated Endpoints remain PCI. > > Sig

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

2015-10-28 Thread Alistair Francis
Add the sst25wf080 SPI flash device. Signed-off-by: Alistair Francis --- 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 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -163,6 +163,7 @@ static const Fla

[Qemu-devel] [PATCH v3 0/5] Connect the SPI devices to ZynqMP

2015-10-28 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. V3: - Don't reach into the SoC to get the SPI Bus V2: - Connect the SPI flash in the board code - Update git patches to properl

[Qemu-devel] [PATCH v3 5/5] xlnx-ep108: Connect the SPI Flash

2015-10-28 Thread Alistair Francis
Connect the sst25wf080 SPI flash to the EP108 board. Signed-off-by: Alistair Francis --- V3: - Don't reach into the SoC V2: - Use sst25wf080 instead of m25p80 hw/arm/xlnx-ep108.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/arm/xlnx-ep108.c b/hw/arm/xlnx-ep108.c

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

2015-10-28 Thread Alistair Francis
Seperate out the XilinxSPIPS struct into a seperate header file. Signed-off-by: Alistair Francis --- V2: - Only split out required #defines - Prefix XLNX_SPIPS_ hw/ssi/xilinx_spips.c | 54 --- include/hw/ssi/xilinx_spips.h | 74 +

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

2015-10-28 Thread Alistair Francis
Connect the Xilinx SPI device to the ZynqMP model. Signed-off-by: Alistair Francis --- V3: - Expose the SPI Bus as part of the SoC device V2: - Don't connect the SPI flash to the SoC hw/arm/xlnx-zynqmp.c | 37 + include/hw/arm/xlnx-zynqmp.h | 4 +++

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

2015-10-28 Thread Alistair Francis
Move the ssi.h include file into the ssi directory. Signed-off-by: Alistair Francis --- V2: - Change git patch to indicate rename hw/arm/pxa2xx.c | 2 +- hw/arm/spitz.c | 2 +- hw/arm/stellaris.c | 2 +- hw/arm/strongarm.c

Re: [Qemu-devel] [PATCH v3 8/9] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-28 Thread Paolo Bonzini
Hi Andrey, just one question. Is kvm_arch_set_irq actually needed? I think everything should work fine without it. Can you check? If so, I can remove it myself and revert the patch that introduced the hook. Paolo On 22/10/2015 18:09, Andrey Smetanin wrote: > SynIC (synthetic interrupt contro

Re: [Qemu-devel] [PATCH V2] hw/virtio: Add PCIe capability to virtio devices

2015-10-28 Thread Marcel Apfelbaum
On 10/28/2015 07:34 PM, Michael S. Tsirkin wrote: On Wed, Oct 28, 2015 at 07:16:06PM +0200, Marcel Apfelbaum wrote: The virtio devices are converted to PCI-Express if they are plugged into a PCI-Express bus and the 'modern' protocol is enabled. Devices plugged directly into the Root Complex as

[Qemu-devel] [PATCH] configure: disallow ccache during compile tests

2015-10-28 Thread John Snow
If the user is using CCACHE during the configuration step, it may interfere with some of the configuration tests, particularly the "Is CCACHE interfering with macro analysis" step, which is a bit of a poetic problem. 1) Disallow CCACHE from reading from the cache during configure, but don't dis

[Qemu-devel] [PULL] target-*: Advance pc after recognizing a breakpoint

2015-10-28 Thread Richard Henderson
Some targets already had this within their logic, but make sure it's present for all targets. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-alpha/translate.c | 5 + target-arm/translate-a64.c| 7 +-- target-arm/translate.c| 7 +-- target-cri

[Qemu-devel] [PULL] Advance pc after recognizing a breakpoint

2015-10-28 Thread Richard Henderson
github.com/rth7680/qemu.git tags/pull-tcg-20151028 for you to fetch changes up to 522a0d4e3c0d397ffb45ec400d8cbd426dad9d17: target-*: Advance pc after recognizing a breakpoint (2015-10-28 10:57:16 -0700) Breakp

Re: [Qemu-devel] [PATCH] vl.c: Replace fprintf(stderr) with error_report()

2015-10-28 Thread Eduardo Habkost
On Mon, Oct 26, 2015 at 04:21:16PM -0200, Eduardo Habkost wrote: > On Mon, Oct 26, 2015 at 06:43:43PM +0100, Markus Armbruster wrote: > > Eduardo Habkost writes: > [...] > > > Not sure if this is appropriate post soft-freeze, but if we are going to > > > apply > > > the max-cpus patch from Drew b

[Qemu-devel] [PATCH v2 00/16] vl.c: Error message rework

2015-10-28 Thread Eduardo Habkost
Extra patches for many suggestions I got when changing vl.c to use error_report(). I tried to implement each suggestion in a separate patch to make it easier to pick and choose the changes that are considered good enough. Eduardo Habkost (16): vl.c: Replace fprintf(stderr) with error_report()

[Qemu-devel] [PATCH v2 09/16] vl.c: Reword -no-kvm-pit-reinjection deprecation warning

2015-10-28 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index af8d09c..67147e0 100644 --- a/vl.c +++ b/vl.c @@ -3667,8 +3667,8 @@ int main(int argc, char **argv, char **envp) { /* end of list */ }

[Qemu-devel] [PATCH v2 01/16] vl.c: Replace fprintf(stderr) with error_report()

2015-10-28 Thread Eduardo Habkost
Replace most fprintf(stderr) calls on vl.c with error_report(). Minimal changes were made in the error messages. Only the trailing newlines, "qemu:" and "error:" message prefixes were removed. The only remaining fprintf(stderr) calls are the ones at qemu_kill_report(), because the error mesage is

[Qemu-devel] [PATCH v2 02/16] vl.c: Use error_report() when reporting shutdown signal

2015-10-28 Thread Eduardo Habkost
This usage of fprintf(stderr) can't be directly converted to error_report() like the others, because a single error message is split into multiple fprintf() calls. Make separate error_report() calls for each case. Suggested-by: Markus Armbruster Reviewed-by: Markus Armbruster Signed-off-by: Edua

[Qemu-devel] [PATCH v2 03/16] vl.c: Remove periods from error_report() error messages

2015-10-28 Thread Eduardo Habkost
Except for removing periods, no other changes were made to the error messages (yet). Suggested-by: Markus Armbruster Signed-off-by: Eduardo Habkost --- vl.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/vl.c b/vl.c index 71104ae..e744c75 100644 ---

[Qemu-devel] [PATCH v2 05/16] vl.c: Use "cannot" instead of "can not" in error messages

2015-10-28 Thread Eduardo Habkost
Suggested-by: Eric Blake Signed-off-by: Eduardo Habkost --- vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 24343f7..b68b891 100644 --- a/vl.c +++ b/vl.c @@ -4165,12 +4165,12 @@ int main(int argc, char **argv, char **envp) if (display_type

[Qemu-devel] [PATCH v2 08/16] vl.c: Simplify "ignoring deprecated option" warnings

2015-10-28 Thread Eduardo Habkost
Simplify warnings about deprecated options by rewriting them as "warning: ignoring deprecated option -". Suggested-by: Andrew Jones Signed-off-by: Eduardo Habkost --- vl.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index f37e3a9..af8d09c 100644 --- a/v

[Qemu-devel] [PATCH v2 04/16] vl.c: Use "warning:" prefix consistently on warnings

2015-10-28 Thread Eduardo Habkost
Suggested-by: Andrew Jones Signed-off-by: Eduardo Habkost --- vl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index e744c75..24343f7 100644 --- a/vl.c +++ b/vl.c @@ -2277,7 +2277,7 @@ static int parse_fw_cfg(void *opaque, QemuOpts *opts, Error **errp

[Qemu-devel] [PATCH v2 11/16] vl.c: Remove unnecessary uppercase in error messages

2015-10-28 Thread Eduardo Habkost
Suggested-by: Andrew Jones Signed-off-by: Eduardo Habkost --- vl.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/vl.c b/vl.c index b8c6c3c..cd76ff4 100644 --- a/vl.c +++ b/vl.c @@ -905,7 +905,7 @@ static int bt_hci_parse(const char *str)

[Qemu-devel] [PATCH v2 16/16] vl.c: Reword fw_cfg name prefix warning

2015-10-28 Thread Eduardo Habkost
Make it a shorter and simpler phrase. Signed-off-by: Eduardo Habkost --- vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 6b831eb..67f75da 100644 --- a/vl.c +++ b/vl.c @@ -2276,8 +2276,8 @@ static int parse_fw_cfg(void *opaque, QemuOpts *opts, Error

[Qemu-devel] [PATCH v2 13/16] vl.c: Reword -machine help error messages

2015-10-28 Thread Eduardo Habkost
* Use "\n" consistently in both error messages. * Simplify error message. Signed-off-by: Eduardo Habkost --- vl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 61e474b..55521a0 100644 --- a/vl.c +++ b/vl.c @@ -2634,8 +2634,8 @@ static gint machine_

[Qemu-devel] [PATCH v2 06/16] vl.c: Use 'quotes' instead of `quotes' in messages

2015-10-28 Thread Eduardo Habkost
Suggested-by: Eric Blake Signed-off-by: Eduardo Habkost --- vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index b68b891..d417dd9 100644 --- a/vl.c +++ b/vl.c @@ -964,7 +964,7 @@ static struct bt_device_s *bt_device_add(const char *opt) if (!strcmp(

[Qemu-devel] [PATCH v2 15/16] vl.c: Use US spelling for "unrecognized"

2015-10-28 Thread Eduardo Habkost
All other error_report() and error_setg() cases use "unrecognized", use the same spelling here for consistency. Reported-by: Eric Blake Signed-off-by: Eduardo Habkost --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 686a7d3..6b831eb 100644 --- a/vl.

[Qemu-devel] [PATCH v2 07/16] vl.c: Use "%s support disabled" error messages consistently

2015-10-28 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- vl.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/vl.c b/vl.c index d417dd9..f37e3a9 100644 --- a/vl.c +++ b/vl.c @@ -1018,8 +1018,7 @@ static int parse_sandbox(void *opaque, QemuOpts *opts, Error **er

[Qemu-devel] [PATCH v2 10/16] vl.c: Convert error sentences to simpler phrases

2015-10-28 Thread Eduardo Habkost
Simplify some error messages by making them simple phrases instead of full sentences. Suggested-by: Andrew Jones Signed-off-by: Eduardo Habkost --- vl.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vl.c b/vl.c index 67147e0..b8c6c3c 100644 --- a/vl.c +++ b/

[Qemu-devel] [PATCH v2 12/16] vl.c: trivial: Don't wrap lines unnecessarily

2015-10-28 Thread Eduardo Habkost
Suggested-by: Andrew Jones Signed-off-by: Eduardo Habkost --- vl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index cd76ff4..61e474b 100644 --- a/vl.c +++ b/vl.c @@ -931,8 +931,8 @@ static void bt_vhci_add(int vlan_id) struct bt_scatternet_s *vla

[Qemu-devel] [PATCH v2 14/16] vl.c: Simplify date format error message

2015-10-28 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 55521a0..686a7d3 100644 --- a/vl.c +++ b/vl.c @@ -828,8 +828,8 @@ static void configure_rtc_date_offset(const char *startdate, int legacy) rtc_start_date = m

[Qemu-devel] [PATCH v2 0/4] linux-user: manage SOCK_PACKET socket type

2015-10-28 Thread Laurent Vivier
This is obsolete, but if we want to use dhcp with some distros (like debian ppc 8.2 jessie), we need it. At the bind level, we are not able to know the socket type so we try to guess it by analyzing the name. We manage only the case "ethX", "ethX" in spk_device is similar to set htons(0x6574) in s

[Qemu-devel] [PATCH v2 1/4] linux-user: SOCK_PACKET uses network endian to encode protocol in socket()

2015-10-28 Thread Laurent Vivier
in PACKET(7) : packet_socket = socket(AF_PACKET, int socket_type, int protocol); [...] protocol is the IEEE 802.3 protocol number in network order. See the include file for a list of allowed protocols. When protocol is set to htons(ETH_P_ALL) then

[Qemu-devel] [PATCH v2 4/4] linux-user: manage bind with a socket of SOCK_PACKET type.

2015-10-28 Thread Laurent Vivier
This is obsolete, but if we want to use dhcp with an old distro (like debian etch), we need it. Some users (like dhclient) use SOCK_PACKET with AF_PACKET and the kernel allows that. packet(7) In Linux 2.0, the only way to get a packet socket was by calling socket(AF_INET, SOCK_PACKET,

[Qemu-devel] [PATCH v2 3/4] linux-user: add a function hook to translate sockaddr

2015-10-28 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 41 - 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 41b85b4..31b5c2c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@

[Qemu-devel] [PATCH v2 2/4] linux-user: rename TargetFdFunc to TargetFdDataFunc, and structure fields accordingly

2015-10-28 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7c724ab..41b85b4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -295,20 +295,20 @@ stati

[Qemu-devel] [kvm-unit-tests PATCHv5 2/3] arm: pmu: Check cycle count increases

2015-10-28 Thread Christopher Covington
Ensure that reads of the PMCCNTR_EL0 are monotonically increasing, even for the smallest delta of two subsequent reads. Signed-off-by: Christopher Covington Reviewed-by: Andrew Jones --- arm/pmu.c | 60 1 file changed, 60 insertions(+

[Qemu-devel] [kvm-unit-tests PATCHv6] ARM PMU tests

2015-10-28 Thread Christopher Covington
Changes from v5: 2/3 arm: pmu: Check cycle count increases * Use universal initializer {0} despite spurious compiler warnings. * Add Drew's Reviewed-by. 3/3 arm: pmu: Add CPI checking * Use numeric constant 0 directly with no intermediate variable. * More tabs in inline assembly. * Make A32/A64 i

Re: [Qemu-devel] [PATCH v2 1/4] linux-user: SOCK_PACKET uses network endian to encode protocol in socket()

2015-10-28 Thread Peter Maydell
On 28 October 2015 at 19:13, Laurent Vivier wrote: > in PACKET(7) : > > packet_socket = socket(AF_PACKET, int socket_type, int protocol); > [...] >protocol is the IEEE 802.3 protocol > number in network order. See the include file for a > list of allow

Re: [Qemu-devel] [PATCH v2 2/4] linux-user: rename TargetFdFunc to TargetFdDataFunc, and structure fields accordingly

2015-10-28 Thread Peter Maydell
On 28 October 2015 at 19:13, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > linux-user/syscall.c | 18 +- > 1 file changed, 9 insertions(+), 9 deletions(-) > Reviewed-by: Peter Maydell thanks -- PMM

[Qemu-devel] [kvm-unit-tests PATCHv5 1/3] arm: Add PMU test

2015-10-28 Thread Christopher Covington
Beginning with a simple sanity check of the control register, add a unit test for the ARM Performance Monitors Unit (PMU). Signed-off-by: Christopher Covington Reviewed-by: Andrew Jones --- arm/pmu.c| 82 arm/unittests.cfg

[Qemu-devel] [kvm-unit-tests PATCHv5 3/3] arm: pmu: Add CPI checking

2015-10-28 Thread Christopher Covington
Calculate the numbers of cycles per instruction (CPI) implied by ARM PMU cycle counter values. The code includes a strict checking facility intended for the -icount option in TCG mode but it is not yet enabled in the configuration file. Enabling it must wait on infrastructure improvements which all

Re: [Qemu-devel] [PATCH v2 3/4] linux-user: add a function hook to translate sockaddr

2015-10-28 Thread Peter Maydell
On 28 October 2015 at 19:13, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > linux-user/syscall.c | 41 - > 1 file changed, 36 insertions(+), 5 deletions(-) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 41b85b4..31b5c2c

Re: [Qemu-devel] [PATCH v2 0/4] linux-user: manage SOCK_PACKET socket type

2015-10-28 Thread Peter Maydell
On 28 October 2015 at 19:12, Laurent Vivier wrote: > This is obsolete, but if we want to use dhcp with some distros (like debian > ppc 8.2 jessie), we need it. > > At the bind level, we are not able to know the socket type so we try to > guess it by analyzing the name. We manage only the case "eth

Re: [Qemu-devel] [PATCH v2 4/4] linux-user: manage bind with a socket of SOCK_PACKET type.

2015-10-28 Thread Peter Maydell
On 28 October 2015 at 19:13, Laurent Vivier wrote: > This is obsolete, but if we want to use dhcp with an old distro (like debian > etch), we need it. Some users (like dhclient) use SOCK_PACKET with AF_PACKET > and the kernel allows that. > > packet(7) > > In Linux 2.0, the only way to get a

Re: [Qemu-devel] [PATCH v2 4/4] linux-user: manage bind with a socket of SOCK_PACKET type.

2015-10-28 Thread Laurent Vivier
Le 28/10/2015 20:20, Peter Maydell a écrit : > On 28 October 2015 at 19:13, Laurent Vivier wrote: >> This is obsolete, but if we want to use dhcp with an old distro (like debian >> etch), we need it. Some users (like dhclient) use SOCK_PACKET with AF_PACKET >> and the kernel allows that. >> >> p

Re: [Qemu-devel] [PATCH 3/4] ide: add support for cancelable read requests

2015-10-28 Thread Peter Lieven
Am 28.10.2015 um 12:26 schrieb Stefan Hajnoczi: > On Tue, Oct 27, 2015 at 11:58:55AM +0100, Peter Lieven wrote: >> Am 26.10.2015 um 11:39 schrieb Stefan Hajnoczi: >>> On Mon, Oct 12, 2015 at 02:27:24PM +0200, Peter Lieven wrote: +BlockAIOCB *ide_readv_cancelable(IDEState *s, int64_t sector_num

Re: [Qemu-devel] [PATCH v2 4/4] linux-user: manage bind with a socket of SOCK_PACKET type.

2015-10-28 Thread Peter Maydell
On 28 October 2015 at 19:25, Laurent Vivier wrote: > > > Le 28/10/2015 20:20, Peter Maydell a écrit : >> On 28 October 2015 at 19:13, Laurent Vivier wrote: >>> +static abi_long packet_target_to_host_addr(void *host_addr, >>> + abi_ulong target_addr, >>> +

[Qemu-devel] [PATCH v3 3/5] linux-user: add a function hook to translate sockaddr

2015-10-28 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- v3: insert fd_trans_target_to_host_addr() into target_to_host_sockaddr() and pass fd. linux-user/syscall.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 41b8

[Qemu-devel] [PATCH v3 1/5] linux-user: SOCK_PACKET uses network endian to encode protocol in socket()

2015-10-28 Thread Laurent Vivier
in PACKET(7) : packet_socket = socket(AF_PACKET, int socket_type, int protocol); [...] protocol is the IEEE 802.3 protocol number in network order. See the include file for a list of allowed protocols. When protocol is set to htons(ETH_P_ALL) then

[Qemu-devel] [PATCH v3 5/5] linux-user: check fd is >= 0 in fd_trans_host_to_target_data/fd_trans_host_to_target_addr

2015-10-28 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 22b28a4..eb45e72 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -309,7 +309,7 @@ static unsigned int ta

[Qemu-devel] [PATCH v3 2/5] linux-user: rename TargetFdFunc to TargetFdDataFunc, and structure fields accordingly

2015-10-28 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell --- linux-user/syscall.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7c724ab..41b85b4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c

[Qemu-devel] [PATCH v3 0/5] linux-user: manage SOCK_PACKET socket type

2015-10-28 Thread Laurent Vivier
This is obsolete, but if we want to use dhcp with some distros (like debian ppc 8.2 jessie), we need it. bind() uses an interface name instead an interface index, and socket() needs network order value to encode the protocol. v3: update cover letter message, insert Reviewed-by: in PATCH 1 and

[Qemu-devel] [PATCH v3 4/5] linux-user: manage bind with a socket of SOCK_PACKET type.

2015-10-28 Thread Laurent Vivier
This is obsolete, but if we want to use dhcp with an old distro (like debian etch), we need it. Some users (like dhclient) use SOCK_PACKET with AF_PACKET and the kernel allows that. packet(7) In Linux 2.0, the only way to get a packet socket was by calling socket(AF_INET, SOCK_PACKET,

[Qemu-devel] [PATCH] fixup! dataplane: support non-contigious s/g

2015-10-28 Thread Michael S. Tsirkin
Should fix issues Stefan reported. --- Built only. hw/virtio/dataplane/vring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/dataplane/vring.c b/hw/virtio/dataplane/vring.c index 9ae9424..23f667e 100644 --- a/hw/virtio/dataplane/vring.c +++ b/hw/virtio/datapl

[Qemu-devel] [PATCH 1/1] monitor: correct socket listen port

2015-10-28 Thread Sam Bobroff
Currently when constructing an inet socket monitor (e.g. via "-monitor telent:localhost:12345,server,nowait") the port is ignored and a random one is used instead. It appears this behaviour was accidentally introduced by commit dafd325d "qemu-char: Convert socket backend to QAPI". The cause is tha

[Qemu-devel] [PATCH v2 0/2] Add an i.MX25 specific CCM driver

2015-10-28 Thread Jean-Christophe Dubois
i.MX25 SOC has a different CCM device than i.MX31. Qemu i.MX25 emulation was built with i.MX31 CCM driver. This allows Linux to work on top of the i.MX25 emultion but this is not correct. Furthermore, other SOC we could emulate like i.MX6 have yet a different implementation of the CCM device. We

[Qemu-devel] [PATCH v2 1/2] i.MX: rework CCM driver.

2015-10-28 Thread Jean-Christophe Dubois
The CCM drive is in fact specific to the i.MX31. We need to add an i.MX25 CCM driver. As a first step, we split the CCM driver into 2 parts: 1) A common/utility part that allow to compute an manipulate clock freq for any CCM driver 2) The i.MX31 CCM specifc driver. We also remove EPIT/GPT time

[Qemu-devel] [PATCH v2 2/2] i.MX: Add i.MX25 CCM driver

2015-10-28 Thread Jean-Christophe Dubois
The i.MX25 CCM device is different from the i.MX31 one. So for now the emulation was not correct even if linux was working OK on top of the i.MX25 emulation. We add an i.MX25 specific CCM driver and use it in the i.MX25 SOC emulation. Signed-off-by: Jean-Christophe Dubois --- Changes since v1:

Re: [Qemu-devel] [PATCH v3 0/5] linux-user: manage SOCK_PACKET socket type

2015-10-28 Thread Peter Maydell
On 28 October 2015 at 20:40, Laurent Vivier wrote: > This is obsolete, but if we want to use dhcp with some distros (like debian > ppc 8.2 jessie), we need it. > > bind() uses an interface name instead an interface index, and socket() > needs network order value to encode the protocol. > > v3: upd

[Qemu-devel] How to specify the full block driver tree on the CLI ?

2015-10-28 Thread Daniel P. Berrange
As previously mentioned, I'm working on support for LUKS full disk encryption in QEMU. I have a simple driver implemented that works on top of plain files. eg I can launch qemu-io thus: $ qemu-io /home/berrange/VirtualMachines/demo.luks-aes-cbc-plain-sha256 and it'll probe the luks format & inst

[Qemu-devel] [PATCH] qemu-iotests: fix cleanup of background processes

2015-10-28 Thread Jeff Cody
Commit 934659c switched the iotests to run qemu and qemu-nbd from a bash subshell, in order to catch segfaults. Unfortunately, this means the process PID cannot be captured via '$!'. We stopped killing qemu and qemu-nbd processes, leaving a lot of orphaned, running qemu processes after executing i

Re: [Qemu-devel] [PATCH 3/9] block: Track discard requests

2015-10-28 Thread Fam Zheng
On Wed, 10/28 10:54, Kevin Wolf wrote: > > -return 0; > > +out: > > +tracked_request_end(&req); > > +return ret; > > } > > I would prefer an explicit ret = 0 before the out label because > otherwise you're relying on the previous value that has been set > somewhere in the loop. As far

Re: [Qemu-devel] [PATCH 4/9] iscsi: Emulate commands in iscsi_aio_ioctl as iscsi_ioctl

2015-10-28 Thread Fam Zheng
On Wed, 10/28 10:51, Kevin Wolf wrote: > Am 26.10.2015 um 07:24 hat Fam Zheng geschrieben: > > iscsi_ioctl emulates SG_GET_VERSION_NUM and SG_GET_SCSI_ID. Now that > > bdrv_ioctl() will be emulated with .bdrv_aio_ioctl, replicate the logic > > into iscsi_aio_ioctl to make them consistent. > > > >

Re: [Qemu-devel] [PATCH 8/9] block: Introduce BlockDriver.bdrv_drain callback

2015-10-28 Thread Fam Zheng
On Wed, 10/28 11:13, Kevin Wolf wrote: > Am 26.10.2015 um 07:24 hat Fam Zheng geschrieben: > > Drivers can have internal request sources that generate IO, like the > > need_check_timer in QED. Since we want quiesced periods that contain > > nested event loops in block layer, we need to have a way t

Re: [Qemu-devel] [PATCH v7 1/2] hw/ptimer: Fix issues caused by artificially limited timer timeout

2015-10-28 Thread Peter Crosthwaite
On Tue, Oct 27, 2015 at 2:26 PM, Dmitry Osipenko wrote: > 25.10.2015 20:39, Peter Crosthwaite пишет: > > On Sun, Oct 25, 2015 at 6:23 AM, Dmitry Osipenko wrote: >> >>> 25.10.2015 02:55, Peter Crosthwaite пишет: >>> >>> On Sat, Oct 24, 2015 at 3:22 PM, Dmitry Osipenko wrote: >

Re: [Qemu-devel] [PATCH v3 1/5] m25p80.c: Add sst25wf080 SPI flash device

2015-10-28 Thread Peter Crosthwaite
On Wed, Oct 28, 2015 at 10:32 AM, Alistair Francis < alistair.fran...@xilinx.com> wrote: > 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/m

Re: [Qemu-devel] [PATCH v3 2/5] ssi: Move ssi.h into a separate directory

2015-10-28 Thread Peter Crosthwaite
On Wed, Oct 28, 2015 at 10:32 AM, Alistair Francis < alistair.fran...@xilinx.com> wrote: > Move the ssi.h include file into the ssi directory. > > Needs a note about the typedef changes. You can drop those changes if you want, as checkpatch is not an issue when moving code. > Signed-off-by: Alis

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

2015-10-28 Thread Peter Crosthwaite
On Wed, Oct 28, 2015 at 10:32 AM, Alistair Francis < alistair.fran...@xilinx.com> wrote: > Seperate out the XilinxSPIPS struct into a seperate header > file. > > Signed-off-by: Alistair Francis > --- > V2: > - Only split out required #defines > - Prefix XLNX_SPIPS_ > > hw/ssi/xilinx_spips.c

Re: [Qemu-devel] [RFC 0/2] Reduce the VM downtime about 300us

2015-10-28 Thread Li, Liang Z
Hi mg, Have you tested this patch? Can it fix the kvm-clock issue? Liang > -Original Message- > From: Marcin Gibuła [mailto:m.gib...@beyond.pl] > Sent: Wednesday, August 26, 2015 3:26 AM > To: Li, Liang Z; qemu-devel@nongnu.org > Cc: pbonz...@redhat.com; mtosa...@redhat.com > Subject: R

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

2015-10-28 Thread Peter Crosthwaite
On Wed, Oct 28, 2015 at 10:32 AM, Alistair Francis < alistair.fran...@xilinx.com> wrote: > Connect the Xilinx SPI device to the ZynqMP model. > > "devices" > Signed-off-by: Alistair Francis > --- > V3: > - Expose the SPI Bus as part of the SoC device > V2: > - Don't connect the SPI flash to t

Re: [Qemu-devel] [PATCH v3 5/5] xlnx-ep108: Connect the SPI Flash

2015-10-28 Thread Peter Crosthwaite
On Wed, Oct 28, 2015 at 10:32 AM, Alistair Francis < alistair.fran...@xilinx.com> wrote: > Connect the sst25wf080 SPI flash to the EP108 board. > > Signed-off-by: Alistair Francis > --- > V3: > - Don't reach into the SoC > V2: > - Use sst25wf080 instead of m25p80 > > hw/arm/xlnx-ep108.c | 19 +

[Qemu-devel] [PATCH v2 0/9] block: Fixes for bdrv_drain

2015-10-28 Thread Fam Zheng
v2: Add Kevin's reviewed-by in patches 1, 2, 5-7, 9. Address Kevin's reviewing comments which are: - Explicit "ret = 0" before out label in patch 3. - Add missing qemu_aio_unref() in patch 4. - Recurse into all children in bdrv_drain in patch 8. Previously bdrv_drain and bdrv_drain

[Qemu-devel] [PATCH v2 2/9] block: Track flush requests

2015-10-28 Thread Fam Zheng
Both bdrv_flush and bdrv_aio_flush eventually call bdrv_co_flush, add tracked_request_begin and tracked_request_end pair in that function so that all flush requests are now tracked. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf --- block/io.c | 11 --- 1 file changed, 8 insertions(+)

[Qemu-devel] [PATCH v2 7/9] block: Drop BlockDriver.bdrv_ioctl

2015-10-28 Thread Fam Zheng
Now the callback is not used any more, drop the field along with all implementations in block drivers, which are iscsi and raw. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf --- block/iscsi.c | 33 - block/raw-posix.c | 8 block/r

[Qemu-devel] [PATCH v2 1/9] block: Add more types for tracked request

2015-10-28 Thread Fam Zheng
We'll track more request types besides read and write, change the boolean field to an enum. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf --- block/io.c| 9 + include/block/block_int.h | 10 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/b

[Qemu-devel] [PATCH v2 6/9] block: Emulate bdrv_ioctl with bdrv_aio_ioctl and track both

2015-10-28 Thread Fam Zheng
Currently all drivers that support .bdrv_aio_ioctl also implement .bdrv_ioctl redundantly. To track ioctl requests in block layer it is easier if we unify the two paths, because we'll need to run it in a coroutine, as required by tracked_request_begin. While we're at it, use .bdrv_aio_ioctl plus a

[Qemu-devel] [PATCH v2 9/9] qed: Implement .bdrv_drain

2015-10-28 Thread Fam Zheng
The "need_check_timer" is used to clear the "NEED_CHECK" flag in the image header after a grace period once metadata update has finished. In compliance to the bdrv_drain semantics we should make sure it remains deleted once .bdrv_drain is called. We cannot reuse qed_need_check_timer_cb because her

[Qemu-devel] [PATCH v2 3/9] block: Track discard requests

2015-10-28 Thread Fam Zheng
Both bdrv_discard and bdrv_aio_discard will call into bdrv_co_discard, so add tracked_request_begin/end calls around the loop. Signed-off-by: Fam Zheng --- block/io.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/block/io.c b/block/io.c index 5c1f093..8d00c01

[Qemu-devel] [PATCH v2 4/9] iscsi: Emulate commands in iscsi_aio_ioctl as iscsi_ioctl

2015-10-28 Thread Fam Zheng
iscsi_ioctl emulates SG_GET_VERSION_NUM and SG_GET_SCSI_ID. Now that bdrv_ioctl() will be emulated with .bdrv_aio_ioctl, replicate the logic into iscsi_aio_ioctl to make them consistent. Signed-off-by: Fam Zheng --- block/iscsi.c | 40 ++-- 1 file changed, 38

[Qemu-devel] [PATCH v2 5/9] block: Add ioctl parameter fields to BlockRequest

2015-10-28 Thread Fam Zheng
The two fields that will be used by ioctl handling code later are added as union, because it's used exclusively by ioctl code which dosn't need the four fields in the other struct of the union. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf --- include/block/block.h | 16 1 f

[Qemu-devel] [PATCH v2 8/9] block: Introduce BlockDriver.bdrv_drain callback

2015-10-28 Thread Fam Zheng
Drivers can have internal request sources that generate IO, like the need_check_timer in QED. Since we want quiesced periods that contain nested event loops in block layer, we need to have a way to disable such event sources. Block drivers must implement the "bdrv_drain" callback if it has any int

Re: [Qemu-devel] [PATCH v5 28/33] nvdimm acpi: support Get Namespace Label Size function

2015-10-28 Thread Xiao Guangrong
On 10/29/2015 12:41 AM, Stefan Hajnoczi wrote: On Wed, Oct 28, 2015 at 10:26:26PM +, Xiao Guangrong wrote: +struct nvdimm_func_in_get_label_data { +uint32_t offset; /* the offset in the namespace label data area. */ +uint32_t length; /* the size of data is to be read via the functi

Re: [Qemu-devel] [PATCH v5 29/33] nvdimm acpi: support Get Namespace Label Data function

2015-10-28 Thread Xiao Guangrong
On 10/29/2015 12:46 AM, Stefan Hajnoczi wrote: On Wed, Oct 28, 2015 at 10:26:27PM +, Xiao Guangrong wrote: +static void nvdimm_dsm_func_get_label_data(NVDIMMDevice *nvdimm, + nvdimm_dsm_in *in, GArray *out) +{ +NVDIMMClass *nvc = NVDIMM_GET_CLA

Re: [Qemu-devel] [PATCH v5 30/33] nvdimm acpi: support Set Namespace Label Data function

2015-10-28 Thread Xiao Guangrong
On 10/29/2015 12:48 AM, Stefan Hajnoczi wrote: On Wed, Oct 28, 2015 at 10:26:28PM +, Xiao Guangrong wrote: +static void nvdimm_dsm_func_set_label_data(NVDIMMDevice *nvdimm, + nvdimm_dsm_in *in, GArray *out) +{ +NVDIMMClass *nvc = NVDIMM_GET_CLA

Re: [Qemu-devel] [PATCH v3 2/6] e1000: Trivial implementation of various MAC registers

2015-10-28 Thread Jason Wang
On 10/28/2015 11:31 PM, Leonid Bloch wrote: > These registers appear in Intel's specs, but were not implemented. > These registers are now implemented trivially, i.e. they are initiated > with zero values, and if they are RW, they can be written or read by the > driver, or read only if they are R

Re: [Qemu-devel] [PATCH v5 29/33] nvdimm acpi: support Get Namespace Label Data function

2015-10-28 Thread Xiao Guangrong
On 10/29/2015 10:25 AM, Xiao Guangrong wrote: On 10/29/2015 12:46 AM, Stefan Hajnoczi wrote: On Wed, Oct 28, 2015 at 10:26:27PM +, Xiao Guangrong wrote: +static void nvdimm_dsm_func_get_label_data(NVDIMMDevice *nvdimm, + nvdimm_dsm_in *in, GArra

Re: [Qemu-devel] proposal: new qemu-arm mailing list

2015-10-28 Thread Shannon Zhao
On 2015/10/27 19:02, Edgar E. Iglesias wrote: > On Tue, Oct 27, 2015 at 10:15:32AM +, Peter Maydell wrote: >> Hi; it's been suggested to me that it would be helpful to have a >> qemu-arm mailing list, along the lines of the existing qemu-ppc >> and qemu-block lists. The idea would be to get p

Re: [Qemu-devel] [PATCH] qemu-iotests: fix cleanup of background processes

2015-10-28 Thread Eric Blake
On 10/28/2015 07:15 PM, Jeff Cody wrote: > Commit 934659c switched the iotests to run qemu and qemu-nbd from a bash > subshell, in order to catch segfaults. Unfortunately, this means the > process PID cannot be captured via '$!'. We stopped killing qemu and > qemu-nbd processes, leaving a lot of o

Re: [Qemu-devel] [PATCH v8 37/54] Postcopy: End of iteration

2015-10-28 Thread Amit Shah
On (Tue) 29 Sep 2015 [09:38:01], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The end of migration in postcopy is a bit different since some of > the things normally done at the end of migration have already been > done on the transition to postcopy. > > Signed-off-by

Re: [Qemu-devel] [PATCH v8 38/54] Page request: Add MIG_RP_MSG_REQ_PAGES reverse command

2015-10-28 Thread Amit Shah
On (Tue) 29 Sep 2015 [09:38:02], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add MIG_RP_MSG_REQ_PAGES command on Return path for the postcopy > destination to request a page from the source. > > Two versions exist: >MIG_RP_MSG_REQ_PAGES_ID that includes a RAMBloc

Re: [Qemu-devel] [PATCH] vl.c: Replace fprintf(stderr) with error_report()

2015-10-28 Thread Markus Armbruster
Eduardo Habkost writes: > On Mon, Oct 26, 2015 at 04:21:16PM -0200, Eduardo Habkost wrote: >> On Mon, Oct 26, 2015 at 06:43:43PM +0100, Markus Armbruster wrote: >> > Eduardo Habkost writes: >> [...] >> > > Not sure if this is appropriate post soft-freeze, but if we are >> > > going to apply >> >

Re: [Qemu-devel] [PATCH] configure: disallow ccache during compile tests

2015-10-28 Thread Markus Armbruster
John Snow writes: > If the user is using CCACHE during the configuration step, > it may interfere with some of the configuration tests, > particularly the "Is CCACHE interfering with macro analysis" step, > which is a bit of a poetic problem. > > 1) Disallow CCACHE from reading from the cache dur

<    1   2   3   4   >