Re: [Qemu-devel] sane char device writes?

2016-11-23 Thread Thomas Huth
On 23.11.2016 19:09, Michal Suchánek wrote: > Hello, > > I have reported the issue with qemu aborting in spapr_vty.c because > gtk.c submitted more data than can be sent to the emulated serial port. > > While the abort has been resolved and spapr_vty.c should truncate the > data now getting the

Re: [Qemu-devel] dpdk/vpp and cross-version migration for vhost

2016-11-23 Thread Yuanhan Liu
On Tue, Nov 22, 2016 at 04:53:05PM +0200, Michael S. Tsirkin wrote: > > > You keep assuming that you have the VM started first and > > > figure out things afterwards, but this does not work. > > > > > > Think about a cluster of machines. You want to start a VM in > > > a way that will ensure

Re: [Qemu-devel] [PATCH v1 09/10] target-ppc: add vextu[bhw]lx instructions

2016-11-23 Thread Nikunj A Dadhania
David Gibson writes: > [ Unknown signature status ] > On Wed, Nov 23, 2016 at 05:07:18PM +0530, Nikunj A Dadhania wrote: >> From: Avinesh Kumar >> >> vextublx: Vector Extract Unsigned Byte Left >> vextuhlx: Vector Extract Unsigned

Re: [Qemu-devel] [PATCH v7 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-11-23 Thread Ketan Nilangekar
On 11/24/16, 4:07 AM, "Paolo Bonzini" wrote: > > >On 23/11/2016 23:09, ashish mittal wrote: >> On the topic of protocol security - >> >> Would it be enough for the first patch to implement only >> authentication and not encryption? > >Yes, of course. However, as we

Re: [Qemu-devel] [PATCH v2] pci: relax pci_msi_get_message()

2016-11-23 Thread Peter Xu
On Tue, Nov 22, 2016 at 04:08:50PM +0800, Peter Xu wrote: > We are very strict in the past getting MSIs from commit > d1f6af6a1 ("kvm-irqchip: simplify kvm_irqchip_add_msi_route"), assuming > that MSI should be configured before hand when fetching. When we have > unrecognized configurations, we

Re: [Qemu-devel] [PATCH 1/2] virtio-net rsc: support coalescing ipv4 tcp traffic

2016-11-23 Thread Michael S. Tsirkin
On Thu, Nov 24, 2016 at 12:31:18PM +0800, Jason Wang wrote: > > > On 2016年11月24日 12:26, Michael S. Tsirkin wrote: > > On Thu, Nov 24, 2016 at 12:17:21PM +0800, Jason Wang wrote: > > > > diff --git a/include/standard-headers/linux/virtio_net.h > > > >

Re: [Qemu-devel] [PATCH] memory: add section range info for IOMMU notifier

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 05:20:58PM +0800, Peter Xu wrote: > In this patch, IOMMUNotifier.{start|end} are introduced to store section > information for a specific notifier. When notification occurs, we not > only check the notification type (MAP|UNMAP), but also check whether the > notified iova is

Re: [Qemu-devel] [PATCH] hw/pci: disable pci-bridge's shpc by default

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 01:08:46PM +0200, Marcel Apfelbaum wrote: > On 11/22/2016 10:25 PM, Laurent Vivier wrote: > > > > > > On 22/11/2016 18:26, Marcel Apfelbaum wrote: > > > On 11/18/2016 05:52 PM, Andrew Jones wrote: > > > > On Wed, Nov 16, 2016 at 07:05:25PM +0200, Marcel Apfelbaum wrote: >

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

2016-11-23 Thread Wei Huang
On 11/23/2016 11:15 AM, Andrew Jones wrote: > On Wed, Nov 23, 2016 at 01:16:08PM +, Andre Przywara wrote: >> Hi, >> >> On 22/11/16 18:29, Wei Huang wrote: >>> From: Christopher Covington >>> >>> Beginning with a simple sanity check of the control register, add >>> a

Re: [Qemu-devel] [PATCH 1/2] virtio-net rsc: support coalescing ipv4 tcp traffic

2016-11-23 Thread Jason Wang
On 2016年11月24日 12:26, Michael S. Tsirkin wrote: On Thu, Nov 24, 2016 at 12:17:21PM +0800, Jason Wang wrote: diff --git a/include/standard-headers/linux/virtio_net.h b/include/standard-headers/linux/virtio_net.h index 30ff249..e67b36e 100644 --- a/include/standard-headers/linux/virtio_net.h

Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI

2016-11-23 Thread Michael S. Tsirkin
On Wed, Nov 23, 2016 at 07:38:35PM -0500, Kevin O'Connor wrote: > As a general comment - it does seem unfortunate that we keep building > adhoc interfaces to communicate information from firmware to QEMU. We > have a generic mechanism (fw_cfg) for passing adhoc information from > QEMU to the

Re: [Qemu-devel] [ RFC Patch v7 0/2] Support Receive-Segment-Offload(RSC) for WHQL

2016-11-23 Thread Jason Wang
On 2016年11月01日 01:41, w...@redhat.com wrote: From: Wei Xu This patch is to support WHQL test for Windows guest, while this feature also benifits other guest works as a kernel 'gro' like feature with userspace implementation. Feature information:

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

2016-11-23 Thread Wei Huang
From: 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 Signed-off-by: Wei Huang Reviewed-by: Andrew

Re: [Qemu-devel] [PATCH 1/2] virtio-net rsc: support coalescing ipv4 tcp traffic

2016-11-23 Thread Michael S. Tsirkin
On Thu, Nov 24, 2016 at 12:17:21PM +0800, Jason Wang wrote: > > diff --git a/include/standard-headers/linux/virtio_net.h > > b/include/standard-headers/linux/virtio_net.h > > index 30ff249..e67b36e 100644 > > --- a/include/standard-headers/linux/virtio_net.h > > +++

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

2016-11-23 Thread Wei Huang
From: 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 in the configuration file. Signed-off-by: Christopher

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

2016-11-23 Thread Wei Huang
From: 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 Signed-off-by: Wei Huang ---

[Qemu-devel] [kvm-unit-tests PATCH v12 0/3] ARM PMU tests

2016-11-23 Thread Wei Huang
Changes from v11: * Use report_info() to report PMU HW related info (implementer, id code, ...) * Print PMU PMCR info in the same line Note: 1) Current KVM code has bugs in handling PMCCFILTR write. A fix (see below) is required for this unit testing code to work correctly under KVM mode.

Re: [Qemu-devel] [PATCH 1/2] virtio-net rsc: support coalescing ipv4 tcp traffic

2016-11-23 Thread Jason Wang
On 2016年11月01日 01:41, w...@redhat.com wrote: From: Wei Xu All the data packets in a tcp connection are cached to a single buffer in every receive interval, and will be sent out via a timer, the 'virtio_net_rsc_timeout' controls the interval, this value may impact the

[Qemu-devel] [PATCH v2 3/4] spec/vhost-user: add the VHOST_USER_SET_PEER_CONNECTION message

2016-11-23 Thread Wei Wang
The VHOST_USER_SET_PEER_CONNECTION message is introduced to manage the vhost-pci dataplane connection status. The slave can use the vhost-pci dataplane to transmit/receive packets to/from the master when the connection is turned ON, and stops using it when the connection is turned OFF.

[Qemu-devel] [PATCH v2 4/4] spec/vhost-user: add VHOST_USER_PROTOCOL_F_VERSATILE_SLAVE

2016-11-23 Thread Wei Wang
The VHOST_USER_PROTOCOL_F_VERSATILE_SLAVE protocol feature indicates that the slave side implementation supports different types of devices. The master tells the slave what type of device to create by sending the VHOST_USER_SET_DEV_INFO message. Signed-off-by: Wei Wang ---

[Qemu-devel] [PATCH v2 2/4] spec/vhost-user: extend vhost-user to support the vhost-pci based inter-vm communiaction

2016-11-23 Thread Wei Wang
The protocol feature, VHOST_USER_PROTOCOL_F_VHOST_PCI, indicates the support of vhost-pci. With the vhost-pci extension, the slave may actively sending meesages to the master. VHOST_USER_SET_FEATURES is one of the examples. To understand this example, let's first understand how the device feature

[Qemu-devel] [PATCH v2 1/4] spec/vhost-user: fix the VHOST_USER prefix

2016-11-23 Thread Wei Wang
Signed-off-by: Wei Wang --- docs/specs/vhost-user.txt | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 7890d71..d70bd83 100644 --- a/docs/specs/vhost-user.txt +++

[Qemu-devel] [PATCH v2 0/4] *** vhost-user spec extension for vhost-pci ***

2016-11-23 Thread Wei Wang
This spec patch series extends the vhost-user protocol to support the vhost-pci based inter-VM communiaction. v1->v2 changes: 1) start from the simpler case - change "1-slave-N-master" to "1-slave-1-master" configuration plane. Accordingly, the previous "uuid", "conn_id" are removed; 2) add the

Re: [Qemu-devel] -nodefaults and available buses (was Re: [RFC 00/15] qmp: Report supported device types on 'query-machines')

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 03:10:47PM -0200, Eduardo Habkost wrote: > (CCing the maintainers of the machines that crash when using > -nodefaults) > > On Tue, Nov 22, 2016 at 08:34:50PM -0200, Eduardo Habkost wrote: > [...] > > "default defaults" vs "-nodefault defaults" > >

Re: [Qemu-devel] [PATCH 2/9] target-ppc: Fix xscmpodp and xscmpudp instructions

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 11:10:08AM +0530, Bharata B Rao wrote: > On Wed, Nov 23, 2016 at 03:01:18PM +1100, David Gibson wrote: > > On Tue, Nov 22, 2016 at 05:15:58PM +0530, Nikunj A Dadhania wrote: > > > From: Bharata B Rao > > > > > > - xscmpodp & xscmpudp are

Re: [Qemu-devel] [PATCH v2 2/4] target-ppc: Implement bcdctsq. instruction

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 02:21:43PM -0200, Jose Ricardo Ziviani wrote: > bcdctsq.: Decimal convert to signed quadword. It is possible to > convert packed decimal values to signed quadwords. > > Signed-off-by: Jose Ricardo Ziviani Reviewed-by: David Gibson

Re: [Qemu-devel] [PATCH v2 4/4] target-ppc: Implement bcdsetsgn. instruction

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 02:21:45PM -0200, Jose Ricardo Ziviani wrote: > bcdsetsgn.: Decimal set sign. This instruction copies the register > value to the result register but adjust the signal according to > the preferred sign value. > > Signed-off-by: Jose Ricardo Ziviani

Re: [Qemu-devel] [PATCH v2 3/4] target-ppc: Implement bcdcpsgn. instruction

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 02:21:44PM -0200, Jose Ricardo Ziviani wrote: > bcdcpsgn.: Decimal copy sign. Given two registers vra and vrb, it > copies the vra value with vrb sign to the result register vrt. > > Signed-off-by: Jose Ricardo Ziviani Reviewed-by: David Gibson

Re: [Qemu-devel] [PATCH v2 0/4] POWER9 TCG enablements - BCD functions part II

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 02:21:41PM -0200, Jose Ricardo Ziviani wrote: > v2: > - use div128 and mul64 functions to make code easier to understand > - fixed int128 neg > - improved functions bcdcpsgn and bcdsetsgn to do less work >than necessary > - rebased on ppc-for-2.9 > > This serie

Re: [Qemu-devel] [PATCH v1 ppc-for-2.9 00/10] POWER9 TCG enablements - part8

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 05:07:09PM +0530, Nikunj A Dadhania wrote: > This series contains 18 new instructions for POWER9 ISA3.0 > Vector Extract Left/Right Indexed > VSX Scalar Compare Exponents > VSX Scalar Compare Quad-Precision > Load/Store VSX Vector > Load/Store VSX

Re: [Qemu-devel] [PATCH v1 09/10] target-ppc: add vextu[bhw]lx instructions

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 05:07:18PM +0530, Nikunj A Dadhania wrote: > From: Avinesh Kumar > > vextublx: Vector Extract Unsigned Byte Left > vextuhlx: Vector Extract Unsigned Halfword Left > vextuwlx: Vector Extract Unsigned Word Left > > Signed-off-by: Avinesh

Re: [Qemu-devel] [PATCH v2 1/4] target-ppc: Implement bcdcfsq. instruction

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 02:21:42PM -0200, Jose Ricardo Ziviani wrote: > bcdcfsq.: Decimal convert from signed quadword. It is not possible > to convert values less than 10^31-1 or greater than -10^31-1 to be > represented in packed decimal format. You have your less than / greater than the wrong

Re: [Qemu-devel] [PATCH v2 1/4] target-ppc: Implement bcdcfsq. instruction

2016-11-23 Thread David Gibson
On Thu, Nov 24, 2016 at 01:43:18AM +0100, Richard Henderson wrote: > On 11/23/2016 05:21 PM, Jose Ricardo Ziviani wrote: > > bcdcfsq.: Decimal convert from signed quadword. It is not possible > > to convert values less than 10^31-1 or greater than -10^31-1 to be > > represented in packed decimal

Re: [Qemu-devel] [PATCH v1 02/10] target-ppc: rename CRF_* defines as CRF_*_BIT

2016-11-23 Thread David Gibson
On Wed, Nov 23, 2016 at 05:07:11PM +0530, Nikunj A Dadhania wrote: > Add _BIT to CRF_[GT,LT,EQ_SO] and introduce CRF_[GT,LT,EQ,SO] for usage > without shifts in the code. This would simplify the code. > > Signed-off-by: Nikunj A Dadhania Nice! -- David Gibson

Re: [Qemu-devel] [PATCH for-2.8] target-m68k: Fix cmpa operand size

2016-11-23 Thread Richard Henderson
On 11/23/2016 09:55 PM, Laurent Vivier wrote: "The size of the operation can be specified as word or long. Word length source operands are sign-extended to 32 bits for comparison." So comparison is always done using OS_LONG. Signed-off-by: Laurent Vivier ---

Re: [Qemu-devel] [PATCH v2 1/4] target-ppc: Implement bcdcfsq. instruction

2016-11-23 Thread Richard Henderson
On 11/23/2016 05:21 PM, Jose Ricardo Ziviani wrote: bcdcfsq.: Decimal convert from signed quadword. It is not possible to convert values less than 10^31-1 or greater than -10^31-1 to be represented in packed decimal format. Signed-off-by: Jose Ricardo Ziviani ---

Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI

2016-11-23 Thread Kevin O'Connor
On Thu, Nov 24, 2016 at 01:01:58AM +0100, Laszlo Ersek wrote: > CC Jordan & Mike > > On 11/23/16 23:35, Paolo Bonzini wrote: > > > > > > On 18/11/2016 11:36, Laszlo Ersek wrote: > >> This is v3 of the series, with updates based on the v2 discussion: > >>

Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI

2016-11-23 Thread Laszlo Ersek
On 11/24/16 01:01, Laszlo Ersek wrote: > CC Jordan & Mike > > On 11/23/16 23:35, Paolo Bonzini wrote: >> >> >> On 18/11/2016 11:36, Laszlo Ersek wrote: >>> This is v3 of the series, with updates based on the v2 discussion: >>>

Re: [Qemu-devel] [PATCH 4/4] arm: Add an RX8900 RTC to the ASpeed board

2016-11-23 Thread Andrew Jeffery
On Wed, 2016-11-23 at 09:48 +0100, Cédric Le Goater wrote: > On 11/23/2016 01:46 AM, Alastair D'Silva wrote: > > On Tue, 2016-11-22 at 17:56 +0100, Cédric Le Goater wrote: > > > On 11/17/2016 05:36 AM, Alastair D'Silva wrote: > > > > > > > > > > > > From: Alastair D'Silva >

Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI

2016-11-23 Thread Laszlo Ersek
CC Jordan & Mike On 11/23/16 23:35, Paolo Bonzini wrote: > > > On 18/11/2016 11:36, Laszlo Ersek wrote: >> This is v3 of the series, with updates based on the v2 discussion: >> . >> >> I've added feature negotiation via the

[Qemu-devel] [Bug 1626972] Re: QEMU memfd_create fallback mechanism change for security drivers

2016-11-23 Thread Martin Pitt
Hello Rafael, or anyone else affected, Accepted qemu into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qemu/1:2.5+dfsg- 5ubuntu10.7 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See

Re: [Qemu-devel] [PATCH v7 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-11-23 Thread Paolo Bonzini
On 23/11/2016 23:09, ashish mittal wrote: > On the topic of protocol security - > > Would it be enough for the first patch to implement only > authentication and not encryption? Yes, of course. However, as we introduce more and more QEMU-specific characteristics to a protocol that is already

Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI

2016-11-23 Thread Paolo Bonzini
On 18/11/2016 11:36, Laszlo Ersek wrote: > This is v3 of the series, with updates based on the v2 discussion: > . > > I've added feature negotiation via the APM_STS ("scratchpad") register. > A new spec file called

Re: [Qemu-devel] [PATCH for-2.8 v3] xen_disk: split discard input to match internal representation

2016-11-23 Thread Olaf Hering
Am 23. November 2016 21:44:50 MEZ, schrieb Olaf Hering : >Is this a can for 2.x? candidate Olaf

Re: [Qemu-devel] [PATCH v7 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support

2016-11-23 Thread ashish mittal
On the topic of protocol security - Would it be enough for the first patch to implement only authentication and not encryption? On Wed, Nov 23, 2016 at 12:25 AM, Ketan Nilangekar wrote: > +Nitin Jerath from Veritas. > > > > > On 11/18/16, 7:06 PM, "Daniel P.

Re: [Qemu-devel] [PATCH v1 04/18] util/rbcache: range-based cache core

2016-11-23 Thread Kevin Wolf
Am 15.11.2016 um 07:37 hat Pavel Butsykin geschrieben: > RBCache provides functionality to cache the data from block devices > (basically). The range here is used as the main key for searching and storing > data. The cache is based on red-black trees, so basic operations search, > insert, delete

[Qemu-devel] [PATCH for-2.8] target-m68k: Fix cmpa operand size

2016-11-23 Thread Laurent Vivier
"The size of the operation can be specified as word or long. Word length source operands are sign-extended to 32 bits for comparison." So comparison is always done using OS_LONG. Signed-off-by: Laurent Vivier --- target-m68k/translate.c | 2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH for-2.8 v3] xen_disk: split discard input to match internal representation

2016-11-23 Thread Olaf Hering
Am 23. November 2016 13:27:13 MEZ, schrieb Kevin Wolf : >Am 23.11.2016 um 12:40 hat Eric Blake geschrieben: >> Qualifies as a bug fix, so requesting 2.8 inclusion. >> Reviewed-by: Eric Blake Is this a can for 2.x? Olaf

[Qemu-devel] [PATCH 2/2] tpm: Add TPM I2C Atmel frontend

2016-11-23 Thread Fabio Urquiza
Add a new frontend to the TPM backend that emulate the Atmel I2C TPM AT97SC3204T device and make it available to use on ARM machines that have I2C Bus configured. Signed-off-by: Fabio Urquiza --- default-configs/aarch64-softmmu.mak | 1 + default-configs/arm-softmmu.mak

[Qemu-devel] [PATCH 1/2] i2c: Add flag to NACK I2C transfers when busy

2016-11-23 Thread Fabio Urquiza
Add a busy flag on the I2CSlave struct which the device could set to NACK I2C transfer requests during the execution of the event handling function. If the busy flag is set, i2c_start_transfer() shall return 1. Signed-off-by: Fabio Urquiza --- hw/i2c/core.c| 3 +++

[Qemu-devel] [PATCH 0/2] Add Atmel I2C TPM AT97SC3204T emulated device

2016-11-23 Thread Fabio Urquiza
### Overview ### The TPM passthrough feature allow a developer to test TPM functionalities, like Measure Boot, without the need to tamper with critical parts of the host machine, ie. bootloader. It has been implemented to the x86 architecture and have the same interface that is provided to PC

[Qemu-devel] [PATCH v2 2/5] slirp: VMStatify sbuf

2016-11-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Convert the sbuf structure to a VMStateDescription. Note this uses the VMSTATE_WITH_TMP mechanism to calculate and reload the offsets based on the pointers. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson

[Qemu-devel] [PATCH v2 5/5] slirp: VMStatify remaining except for loop

2016-11-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This converts the remaining components, except for the top level loop, to VMState. Signed-off-by: Dr. David Alan Gilbert --- slirp/slirp.c | 48 +++- 1 file changed, 19

[Qemu-devel] [PATCH v2 0/5] SLIRP VMStatification [ for 2.9 ]

2016-11-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is an update to my previous series that included VMSTATE_WITH_TMP. I've not bothered including the VMSTATE_WITH_TMP set this time; but it's still dependent on it, so we'll wait until it's in first. My main change in this version

[Qemu-devel] [PATCH v2 3/5] slirp: Common lhost/fhost union

2016-11-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The socket structure has a pair of unions for lhost and fhost addresses; the unions are identical so split them out into a separate union declaration. Signed-off-by: Dr. David Alan Gilbert --- slirp/socket.h | 18

[Qemu-devel] [PATCH v2 4/5] slirp: VMStatify socket level

2016-11-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Working up the stack, this replaces the slirp_socket_load/save with VMState definitions. Signed-off-by: Dr. David Alan Gilbert --- slirp/slirp.c | 146 ++---

[Qemu-devel] [PATCH v2 1/5] slirp: VMState conversion; tcpcb

2016-11-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Convert the migration of the struct tcpcb to use a VMStateDescription, the rest of it will come later. Mostly mechanical, except for conversion of some 'char' to uint8_t to ensure portability. Signed-off-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH] xen_disk: convert discard input to byte ranges

2016-11-23 Thread Stefano Stabellini
On Wed, 23 Nov 2016, Olaf Hering wrote: > On Wed, Nov 23, Olaf Hering wrote: > > > > > +if (!blk_split_discard(ioreq, req->sector_number, > > > > req->nr_sectors)) { > > > > +goto err; > > > How is error handling supposed to work here? > > In the guest the cmd is stuck,

Re: [Qemu-devel] [PATCH for-2.8 v3] xen_disk: split discard input to match internal representation

2016-11-23 Thread Stefano Stabellini
On Wed, 23 Nov 2016, Kevin Wolf wrote: > Am 23.11.2016 um 12:40 hat Eric Blake geschrieben: > > On 11/23/2016 04:39 AM, Olaf Hering wrote: > > > The guest sends discard requests as u64 sector/count pairs, but the > > > block layer operates internally with s64/s32 pairs. The conversion > > > leads

Re: [Qemu-devel] [PATCH v3] xen_disk: split discard input to match internal representation

2016-11-23 Thread Stefano Stabellini
On Wed, 23 Nov 2016, Olaf Hering wrote: > The guest sends discard requests as u64 sector/count pairs, but the > block layer operates internally with s64/s32 pairs. The conversion > leads to IO errors in the guest, the discard request is not processed. > > domU.cfg: > 'vdev=xvda, format=qcow2,

Re: [Qemu-devel] [PATCH 3/3] xen: ignore direction in bufioreq handling

2016-11-23 Thread Stefano Stabellini
On Wed, 23 Nov 2016, Paul Durrant wrote: > > -Original Message- > > From: Jan Beulich [mailto:jbeul...@suse.com] > > Sent: 23 November 2016 09:25 > > To: qemu-devel@nongnu.org > > Cc: Anthony Perard ; Paul Durrant > > ; Stefano Stabellini

[Qemu-devel] [QEMU PATCH v14 2/4] migration: migrate QTAILQ

2016-11-23 Thread Jianjun Duan
Currently we cannot directly transfer a QTAILQ instance because of the limitation in the migration code. Here we introduce an approach to transfer such structures. We created VMStateInfo vmstate_info_qtailq for QTAILQ. Similar VMStateInfo can be created for other data structures such as list.

[Qemu-devel] [QEMU PATCH v14 0/4] migration: migrate QTAILQ

2016-11-23 Thread Jianjun Duan
Hi all, I addressed some review comments. Comments are welcome. v14: - Fixed a return statement. Previous versions are: v13: - Changed some QTAILQ related macro names to match existing ones. (link: http://lists.nongnu.org/archive/html/qemu-ppc/2016-11/msg00226.html) v12: - Fixed

[Qemu-devel] [QEMU PATCH v14 3/4] tests/migration: Add test for QTAILQ migration

2016-11-23 Thread Jianjun Duan
Add a test for QTAILQ migration to tests/test-vmstate.c. Signed-off-by: Jianjun Duan --- tests/test-vmstate.c | 160 +++ 1 file changed, 160 insertions(+) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index

[Qemu-devel] sane char device writes?

2016-11-23 Thread Michal Suchánek
Hello, I have reported the issue with qemu aborting in spapr_vty.c because gtk.c submitted more data than can be sent to the emulated serial port. While the abort has been resolved and spapr_vty.c should truncate the data now getting the data through is still not possible. Looking in the code I

Re: [Qemu-devel] [PATCH 1/3] xen: fix quad word bufioreq handling

2016-11-23 Thread Stefano Stabellini
On Wed, 23 Nov 2016, Jan Beulich wrote: > >>> On 23.11.16 at 11:45, wrote: > > No, if QEMU is using a default ioreq server (i.e. the legacy way of doing > > things) then it's vulnerable to the guest messing with the rings and I'd > > forgotten that migrated-in guests

Re: [Qemu-devel] [PATCH 2/3] xen: slightly simplify bufioreq handling

2016-11-23 Thread Stefano Stabellini
On Wed, 23 Nov 2016, Jan Beulich wrote: > There's no point setting fields always receiving the same value on each > iteration, as handle_ioreq() doesn't alter them anyway. Set state and > count once ahead of the loop, drop the redundant clearing of > data_is_ptr, and avoid the meaningless setting

[Qemu-devel] [QEMU PATCH v14 4/4] migration: add error_report

2016-11-23 Thread Jianjun Duan
Added error_report where version_ids do not match in vmstate_load_state. Signed-off-by: Jianjun Duan --- migration/vmstate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/vmstate.c b/migration/vmstate.c index 2f9d4ba..0e6fce4 100644 ---

[Qemu-devel] [PATCH v2 2/4] test-qga: Avoid qobject_from_jsonv("%"PRId64)

2016-11-23 Thread Eric Blake
The qobject_from_jsonv() function implements a pseudo-printf language for creating a QObject; however, it is hard-coded to only parse a subset of formats understood by -Wformat, and is not a straight synonym to bare printf(). In particular, any use of an int64_t integer works only if the system's

[Qemu-devel] [QEMU PATCH v14 1/4] migration: extend VMStateInfo

2016-11-23 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. put now will return int type. Signed-off-by: Jianjun Duan ---

Re: [Qemu-devel] [PATCH for-2.8] target-m68k: fix EXG instruction

2016-11-23 Thread Richard Henderson
On 11/23/2016 05:37 PM, Laurent Vivier wrote: opcodes of "EXG Ax,Ay" and "EXG Dx,Dy" have been swapped Signed-off-by: Laurent Vivier --- target-m68k/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Whoops. ;-) Reviewed-by: Richard Henderson

Re: [Qemu-devel] [PATCH 3/3] qapi: Drop support for qobject_from_jsonf("%"PRId64)

2016-11-23 Thread Eric Blake
On 11/23/2016 10:56 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 11/23/2016 08:17 AM, Markus Armbruster wrote: >> >>> >>> The first two patches are bug fixes, and as such they should be >>> considered for 2.8. >>> >>> This patch doesn't fix anything, and it might

[Qemu-devel] [PATCH v2 4/4] RFC: qapi: Drop support for qobject_from_jsonf("%"PRId64)

2016-11-23 Thread Eric Blake
The qobject_from_jsonf() function implements a pseudo-printf language for creating a QObject; however, it is hard-coded to only parse a subset of formats understood by printf(). In particular, any use of an int64_t integer works only if the system's definition of PRId64 matches what the parser

[Qemu-devel] [for-2.8 0/4] 9p patches for 2.8 20161123

2016-11-23 Thread Greg Kurz
The following changes since commit 00227fefd2059464cd2f59aed29944874c630e2f: Update version for v2.8.0-rc1 release (2016-11-22 22:29:08 +) are available in the git repository at: https://github.com/gkurz/qemu.git tags/for-upstream for you to fetch changes up to

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

2016-11-23 Thread Andrew Jones
On Tue, Nov 22, 2016 at 12:29:14PM -0600, Wei Huang wrote: > From: 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

Re: [Qemu-devel] [kvm-unit-tests PATCH v11 0/3] ARM PMU tests

2016-11-23 Thread Andrew Jones
On Tue, Nov 22, 2016 at 12:29:11PM -0600, Wei Huang wrote: > Changes from v10: > * Change the name of loop test function to precise_instrs_loop() > * Minor comment fixes to measure_instrs() and to explain isb() in loop funcs > > Note: > 1) Current KVM code has bugs in handling PMCCFILTR write. A

[Qemu-devel] [PATCH v2 for-2.8 0/4] Fix MacOS runtime failure of qobject_from_jsonf()

2016-11-23 Thread Eric Blake
programmingk...@gmail.com[*] reported a runtime failure on a 32-bit Mac OS compilation, where "%"PRId64 expands to "%qd". Fortunately, we had very few spots that were relying on our pseudo-printf JSON parsing of int64_t numbers, so it was easier to just convert callers to stick to safer %lld. The

[Qemu-devel] [for-2.8 1/4] 9pfs: adjust the order of resource cleanup in device unrealize

2016-11-23 Thread Greg Kurz
From: Li Qiang Unrealize should undo things that were set during realize in reverse order. So should do in the error path in realize. Signed-off-by: Li Qiang Reviewed-by: Greg Kurz Signed-off-by: Greg Kurz --- hw/9pfs/9p.c

[Qemu-devel] [PATCH v2 3/4] tests: Avoid qobject_from_jsonf("%"PRId64)

2016-11-23 Thread Eric Blake
The qobject_from_jsonf() function implements a pseudo-printf language for creating a QObject; however, it is hard-coded to only parse a subset of formats understood by -Wformat, and is not a straight synonym to bare printf(). In particular, any use of an int64_t integer works only if the system's

[Qemu-devel] [kvm-unit-tests PATCH v7 05/11] arm/arm64: irq enable/disable

2016-11-23 Thread Andrew Jones
Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 10 ++ lib/arm64/asm/processor.h | 10 ++ 2 files changed, 20 insertions(+) diff --git

[Qemu-devel] [kvm-unit-tests PATCH v7 04/11] arm/arm64: add some delay routines

2016-11-23 Thread Andrew Jones
Allow a thread to wait some specified amount of time. Can specify in cycles, usecs, and msecs. Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- lib/arm/asm/processor.h | 19 +++

Re: [Qemu-devel] [RFC 00/15] qmp: Report supported device types on 'query-machines'

2016-11-23 Thread Eduardo Habkost
On Wed, Nov 23, 2016 at 06:43:16PM +0200, Marcel Apfelbaum wrote: > On 11/22/2016 03:11 AM, Eduardo Habkost wrote: > > The Problem > > === > > > > Currently management software has no way to find out which device > > types can be plugged in a machine, unless the machine is already > >

[Qemu-devel] [PATCH v2 1/4] qmp-event: Avoid qobject_from_jsonf("%"PRId64)

2016-11-23 Thread Eric Blake
The qobject_from_jsonf() function implements a pseudo-printf language for creating a QObject; however, it is hard-coded to only parse a subset of formats understood by -Wformat, and is not a straight synonym to bare printf(). In particular, any use of an int64_t integer works only if the system's

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

2016-11-23 Thread Andrew Jones
On Wed, Nov 23, 2016 at 01:16:08PM +, Andre Przywara wrote: > Hi, > > On 22/11/16 18:29, Wei Huang wrote: > > From: Christopher Covington > > > > Beginning with a simple sanity check of the control register, add > > a unit test for the ARM Performance Monitors Unit

[Qemu-devel] [for-2.8 3/4] 9pfs: add cleanup operation for handle backend driver

2016-11-23 Thread Greg Kurz
From: Li Qiang In the init operation of handle backend dirver, it allocates a handle_data struct and opens a mount file. We should free these resources when the 9pfs device is unrealized. This is what this patch does. Signed-off-by: Li Qiang Reviewed-by:

[Qemu-devel] [for-2.8 2/4] 9pfs: add cleanup operation in FileOperations

2016-11-23 Thread Greg Kurz
From: Li Qiang Currently, the backend of VirtFS doesn't have a cleanup function. This will lead resource leak issues if the backed driver allocates resources. This patch addresses this issue. Signed-off-by: Li Qiang Reviewed-by: Greg Kurz

Re: [Qemu-devel] [PATCH 2/3] test-qga: Avoid qobject_from_jsonf("%"PRId64)

2016-11-23 Thread Markus Armbruster
Eric Blake writes: > On 11/23/2016 08:05 AM, Markus Armbruster wrote: > >> Same problem as in the previous patch, but here you replace it by >> g_strdup_printf(), where the previous patch replaced it by manual >> QObject construction, >> >> Manual QObject construction tends

Re: [Qemu-devel] [RFC v2 0/3] virtio-net: Add support to MTU feature

2016-11-23 Thread Michael S. Tsirkin
On Wed, Nov 23, 2016 at 09:02:53AM -0500, Aaron Conole wrote: > "Michael S. Tsirkin" writes: > > > On Wed, Nov 23, 2016 at 11:42:52AM +0800, Jason Wang wrote: > >> > > > > > > > Seems to me like an easy way to get out of sync. > >> > > > > > > >> > > > > >If we send it to the

[Qemu-devel] -nodefaults and available buses (was Re: [RFC 00/15] qmp: Report supported device types on 'query-machines')

2016-11-23 Thread Eduardo Habkost
(CCing the maintainers of the machines that crash when using -nodefaults) On Tue, Nov 22, 2016 at 08:34:50PM -0200, Eduardo Habkost wrote: [...] > "default defaults" vs "-nodefault defaults" > --- > > Two bad news: > > 1) We need to differentiate buses

[Qemu-devel] [kvm-unit-tests PATCH v7 11/11] arm/arm64: gic: don't just use zero

2016-11-23 Thread Andrew Jones
Allow user to select who sends ipis and with which irq, rather than just always sending irq=0 from cpu0. Signed-off-by: Andrew Jones --- v7: cleanup cmdline parsing and add complain on bad args [Eric] v6: - make sender/irq names more future-proof [drew] - sanity check

[Qemu-devel] [kvm-unit-tests PATCH v7 10/11] arm/arm64: gicv3: add an IPI test

2016-11-23 Thread Andrew Jones
Signed-off-by: Andrew Jones --- v7: - add common ipi_send_single/mask (replacing ipi_send). Note, the arg order irq,cpu got swapped. [Eric] - comment rewording [Eric] - make enable_defaults a common op [Eric] - gic_enable_defaults() will now invoke gic_init if

Re: [Qemu-devel] [PATCH 3/3] qapi: Drop support for qobject_from_jsonf("%"PRId64)

2016-11-23 Thread Markus Armbruster
Eric Blake writes: > On 11/23/2016 08:17 AM, Markus Armbruster wrote: > >> >> The first two patches are bug fixes, and as such they should be >> considered for 2.8. >> >> This patch doesn't fix anything, and it might conceivably break >> something. Too late for 2.8. > > Ah,

[Qemu-devel] [kvm-unit-tests PATCH v7 08/11] libcflat: add IS_ALIGNED() macro, and page sizes

2016-11-23 Thread Andrew Jones
From: Peter Xu These macros will be useful to do page alignment checks. Reviewed-by: Andre Przywara Reviewed-by: Eric Auger Signed-off-by: Peter Xu [drew: also added SZ_64K and changed to shifts]

[Qemu-devel] [for-2.8 4/4] 9pfs: add cleanup operation for proxy backend driver

2016-11-23 Thread Greg Kurz
From: Li Qiang In the init operation of proxy backend dirver, it allocates a V9fsProxy struct and some other resources. We should free these resources when the 9pfs device is unrealized. This is what this patch does. Signed-off-by: Li Qiang Reviewed-by: Greg

[Qemu-devel] [kvm-unit-tests PATCH v7 09/11] arm/arm64: add initial gicv3 support

2016-11-23 Thread Andrew Jones
Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v7: split lib/arm/gic.c into gic-v2/3.c [Eric] v6: - added comments [Alex] - added stride parameter to gicv3_set_redist_base [Andre] -

[Qemu-devel] [kvm-unit-tests PATCH v7 07/11] arm/arm64: gicv2: add an IPI test

2016-11-23 Thread Andrew Jones
Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v6: move the spurious check to its own check_ function [drew] v5: use modern registers [Andre] v4: properly mask irqnr in ipi_handler v2: add more details in the output if a test fails, report

[Qemu-devel] [kvm-unit-tests PATCH v7 00/11] arm/arm64: add gic framework

2016-11-23 Thread Andrew Jones
v7: - biggest change is splitting lib/arm/gic.c into lib/arm/gic.c, lib/arm/gic-v2.c, lib/arm/gic-v3.c - second biggest change, which probably affects Alex, is that gic_ipi_send(cpu, irq) changed to gic_ipi_send_single(irq, cpu), note the swapping of cpu and irq! - other changes thanks

[Qemu-devel] [kvm-unit-tests PATCH v7 03/11] arm/arm64: smp: support more than 8 cpus

2016-11-23 Thread Andrew Jones
By adding support for launching with gicv3 we can break the 8 vcpu limit. This patch adds support to smp code and also selects the vgic model corresponding to the host. The vgic model may also be manually selected by adding e.g. -machine gic-version=3 to extra_params. Reviewed-by: Alex Bennée

[Qemu-devel] [kvm-unit-tests PATCH v7 02/11] arm64: fix get_"sysreg32" and make MPIDR 64bit

2016-11-23 Thread Andrew Jones
mrs is always 64bit, so we should always use a 64bit register. Sometimes we'll only want to return the lower 32, but not for MPIDR, as that does define fields in the upper 32. Reviewed-by: Alex Bennée Reviewed-by: Eric Auger Signed-off-by: Andrew

[Qemu-devel] [kvm-unit-tests PATCH v7 06/11] arm/arm64: add initial gicv2 support

2016-11-23 Thread Andrew Jones
Add some gicv2 support. This just adds init and enable functions, allowing unit tests to start messing with it. Reviewed-by: Andre Przywara Reviewed-by: Eric Auger Signed-off-by: Andrew Jones --- v6: added comments (register

  1   2   3   >