Re: [Qemu-devel] [RFC v1 15/23] riscv: tcg-target: Add branch and jump instructions

2018-11-20 Thread Richard Henderson
On 11/21/18 12:49 AM, Alistair Francis wrote: > On Fri, Nov 16, 2018 at 1:14 AM Richard Henderson > wrote: >> >> On 11/15/18 11:36 PM, Alistair Francis wrote: >>> +static void tcg_out_brcond(TCGContext *s, TCGCond cond, TCGReg arg1, >>> + TCGReg arg2, TCGLabel *l) >>> +{

Re: [Qemu-devel] 3.1.0-rc{0,1} doesn't start

2018-11-20 Thread balducci
> Sorry Gabriele, Eduardo and Paolo pointed out that the patch was incomplete. > I am not sure however how you are getting non zero data with the rdmsr on an > AMD. > Can you please try this instead ? > > diff --git a/target/i386/kvm.c b/target/i386/kvm.c > index f524e7d929..cfec559aa3 100644 >

Re: [Qemu-devel] [PATCH 3/5] Add migration functions for VFIO devices

2018-11-20 Thread Zhao, Yan Y
> -Original Message- > From: Qemu-devel [mailto:qemu-devel- > bounces+yan.y.zhao=intel@nongnu.org] On Behalf Of Kirti Wankhede > Sent: Wednesday, November 21, 2018 4:40 AM > To: alex.william...@redhat.com; c...@nvidia.com > Cc: zhengxiao...@alibaba-inc.com; Tian, Kevin ; Liu, Yi >

Re: [Qemu-devel] [RFC v1 16/23] riscv: tcg-target: Add slowpath load and store instructions

2018-11-20 Thread Richard Henderson
On 11/21/18 1:18 AM, Alistair Francis wrote: > On Fri, Nov 16, 2018 at 1:24 AM Richard Henderson > wrote: >> >> On 11/15/18 11:36 PM, Alistair Francis wrote: >>> +static void tcg_out_mb(TCGContext *s, TCGArg a0) >>> +{ >>> +static const RISCVInsn fence[] = { >>> +[0 ... TCG_MO_ALL] =

Re: [Qemu-devel] [RFC v1 11/23] riscv: tcg-target: Add the relocation functions

2018-11-20 Thread Richard Henderson
On 11/21/18 2:15 AM, Alistair Francis wrote: >> Will the riscv-32 compiler use a FSTD insn to implement atomic_set for >> 64-bit? >> If not, you may be just better off using the indirect method. > > I'm not sure. Is the indirect method just using atomic set, because > that is what I have now?

Re: [Qemu-devel] [PULL 0/8] Monitor patches for 2018-10-30

2018-11-20 Thread Markus Armbruster
Peter Xu writes: > On Tue, Nov 20, 2018 at 06:44:27PM +0100, Markus Armbruster wrote: >> >> We want the test to drive QEMU into the "queue full" state with an >> out-of-band command unreceived, then watch the queue drain and the >> out-of-band command overtaking part of it. >> >> Driving QEMU

[Qemu-devel] [PATCH v3] MAINTAINERS: Assign some more files in the hw/arm/ directory

2018-11-20 Thread Thomas Huth
I apparently missed some more files and even a complete machine (the "imx25-pdk") in my previous patch... but now we should hopefully have a completely coverage for all available ARM boards. Fixes: 95a5db3ae5698b49c63144610ad02913e780c828 Signed-off-by: Thomas Huth --- v3: Dropped

[Qemu-devel] [PATCH] hw/virt/arm: Add support fot Cortex-A72

2018-11-20 Thread luzhipeng
From: ZhiPeng Lu Signed-off-by: ZhiPeng Lu --- hw/arm/virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a2b8d8f..f69e7eb 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -174,6 +174,7 @@ static const char *valid_cpus[] = {

Re: [Qemu-devel] [PATCH v2] MAINTAINERS: Assign some more files in the hw/arm/ directory

2018-11-20 Thread Thomas Huth
On 2018-11-20 21:23, Philippe Mathieu-Daudé wrote: > On 20/11/18 18:42, Thomas Huth wrote: >> I apparently missed some more files and even a complete machine (the >> "imx25-pdk") in my previous patch... but now we should hopefully have >> a completely coverage for all available ARM boards. >> >>

Re: [Qemu-devel] [PATCH 1/5] VFIO KABI for migration interface

2018-11-20 Thread Tian, Kevin
> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > Sent: Wednesday, November 21, 2018 12:24 PM > > > On 11/21/2018 5:56 AM, Tian, Kevin wrote: > >> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > >> Sent: Wednesday, November 21, 2018 4:40 AM > >> > >> - Defined MIGRATION region type and

Re: [Qemu-devel] [PATCH] misc: Avoid UTF-8 in error messages

2018-11-20 Thread Thomas Huth
On 2018-11-20 21:36, Eric Blake wrote: > While most developers are now using UTF-8 environments, it's > harder to guarantee that error messages will be output to > a multibyte locale. Rather than risking error messages that > get corrupted into mojibake when the user runs qemu in a > non-multibyte

Re: [Qemu-devel] [PATCH 0/5] Add migration support for VFIO device

2018-11-20 Thread Peter Xu
On Wed, Nov 21, 2018 at 02:09:38AM +0530, Kirti Wankhede wrote: > Add migration support for VFIO device Hi, Kirti, I failed to apply the series cleanly onto master. Could you push the tree somewhere so that people might read the work easier? Or would you tell me the base commit, then I can

Re: [Qemu-devel] [SeaBIOS] SeaBIOS booting time optimization

2018-11-20 Thread Stefan Berger
On 11/20/18 11:51 AM, Stefano Garzarella wrote: On Tue, Nov 20, 2018 at 5:13 PM Steve Douthit wrote: On 11/20/18 10:55 AM, Kevin O'Connor wrote: On Mon, Nov 19, 2018 at 07:38:39PM +0100, Stefano Garzarella wrote: just an update, I enabled the debug prints and I saw two timeouts fired with a

Re: [Qemu-devel] When AioHandler->is_external=true?

2018-11-20 Thread Fam Zheng
On Tue, 11/20 20:34, Dongli Zhang wrote: > Hi, > > Would you please help explain in which case AioHandler->is_external is true, > and > when it is false? > > I read about iothread and mainloop and I am little bit confused about it. VirtIO's ioeventfd is an example of is_external == true. It

Re: [Qemu-devel] [PATCH 2/5] Add save and load functions for VFIO PCI devices

2018-11-20 Thread Peter Xu
On Wed, Nov 21, 2018 at 02:09:40AM +0530, Kirti Wankhede wrote: > Save and restore with MSIX type is not tested. > > Signed-off-by: Kirti Wankhede > Reviewed-by: Neo Jia > --- > hw/vfio/pci.c | 95 > +++ > hw/vfio/pci.h | 29

[Qemu-devel] [PATCH v2 1/3] fw_cfg: fix -boot bootsplash error checking

2018-11-20 Thread Li Qiang
fw_cfg_bootsplash() gets option parameter "splash-time" with qemu_opt_get(), then converts it to an integer by hand. It neglects to check that conversion for errors. This is needlessly complicated and error-prone. But as "splash-time not specified" is not the same as "splash-time=T" for any T, we

[Qemu-devel] [PATCH v2 2/3] fw_cfg: fix -boot reboot-timeout error checking

2018-11-20 Thread Li Qiang
fw_cfg_reboot() gets option parameter "reboot-timeout" with qemu_opt_get(), then converts it to an integer by hand. It neglects to check that conversion for errors, and fails to reject negative values. Positive values above the limit get reported and replaced by the limit. This patch checks for

[Qemu-devel] [PATCH v2 3/3] fw_cfg: make qemu_extra_params_fw locally

2018-11-20 Thread Li Qiang
qemu_extra_params_fw[] has external linkage, but is used only in fw_cfg_bootsplash(), it makes sense to make it locally. Signed-off-by: Li Qiang Reviewed-by: Markus Armbruster --- hw/nvram/fw_cfg.c | 1 + include/sysemu/sysemu.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-devel] [PATCH v2 0/3] fw_cfg: fix boot bootsplash and reboot-timeout error checking

2018-11-20 Thread Li Qiang
And also do some code cleanup. A lot of thanks to Markus's review and advice. v2: fix some small issue per Markus's review. Li Qiang (3): fw_cfg: fix -boot bootsplash error checking fw_cfg: fix -boot reboot-timeout error checking fw_cfg: make qemu_extra_params_fw locally

Re: [Qemu-devel] 3.1.0-rc{0,1} doesn't start

2018-11-20 Thread Bandan Das
baldu...@units.it writes: > hello > >> incomplete because it can return 0 for data. Can you try this: >> >> diff --git a/target/i386/kvm.c b/target/i386/kvm.c >> index f524e7d929..4878ffb90b 100644 >> --- a/target/i386/kvm.c >> +++ b/target/i386/kvm.c >> @@ -2002,14 +2002,9 @@ static int

Re: [Qemu-devel] [PATCH 1/5] VFIO KABI for migration interface

2018-11-20 Thread Kirti Wankhede
On 11/21/2018 5:56 AM, Tian, Kevin wrote: >> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] >> Sent: Wednesday, November 21, 2018 4:40 AM >> >> - Defined MIGRATION region type and sub-type. >> - Defined VFIO device states during migration process. >> - Defined vfio_device_migration_info

Re: [Qemu-devel] [PATCH 1/2] riscv: virt: Fix pcie memory ranges

2018-11-20 Thread Guenter Roeck
Hi Alistair, On 11/20/18 4:43 PM, Alistair Francis wrote: On Tue, Nov 20, 2018 at 3:01 PM Guenter Roeck wrote: - Provide separate maps for VIRT_PCIE_MMIO (32 bit) and VIRT_PCIE_MMIO_HIGH (64 bit) - VIRT_PCIE_PIO is for IO ports, not for the physical address - VIRT_PCIE_ECAM size reduced

Re: [Qemu-devel] 3.1.0-rc{0,1} doesn't start

2018-11-20 Thread Bandan Das
Paolo Bonzini writes: ... > diff --git a/target/i386/kvm.c b/target/i386/kvm.c > index f524e7d929..4878ffb90b 100644 > --- a/target/i386/kvm.c > +++ b/target/i386/kvm.c > @@ -2002,14 +2002,9 @@ static int kvm_put_msrs(X86CPU *cpu, int level) > #endif > > /*

Re: [Qemu-devel] [PATCH 0/3] fw_cfg: fix boot bootsplash and reboot-timeout error checking

2018-11-20 Thread 李强
At 2018-11-21 03:59:28, "Philippe Mathieu-Daudé" wrote: >Hi Markus, Li. > >On 20/11/18 20:34, Markus Armbruster wrote: >> Li Qiang writes: >> >>> And also do some code cleanup. >>> A lot of thanks to Markus's review and advice. >>> >>> Li Qiang (3): >>>fw_cfg: fix -boot bootsplash

Re: [Qemu-devel] [PATCH] memory: check write/read_with_attrs in memory dispatch

2018-11-20 Thread Li Qiang
Ping... It makes sense as when we use 'memory_region_read_accessor' we check mr->ops->read. but when we use 'memory_region_read_with_attrs_accessor', we doesn't check this. Thanks, Li Qiang Li Qiang 于2018年11月13日周二 上午9:42写道: > This can avoid the NULL-deref if the rm doesn't has a > read/write

Re: [Qemu-devel] [PULL 0/8] Monitor patches for 2018-10-30

2018-11-20 Thread Peter Xu
On Tue, Nov 20, 2018 at 06:44:27PM +0100, Markus Armbruster wrote: > Peter Xu writes: > > > On Mon, Nov 19, 2018 at 07:08:13PM +0100, Markus Armbruster wrote: > >> Peter Xu writes: > >> > >> > On Mon, Nov 19, 2018 at 02:17:27PM +0800, Peter Xu wrote: > >> >> I reproduced the error with a

Re: [Qemu-devel] [PATCH for 3.1 v2] spapr: Fix ibm, max-associativity-domains property number of nodes

2018-11-20 Thread David Gibson
On Mon, Nov 19, 2018 at 11:23:05AM -0500, Serhii Popovych wrote: > Laurent Vivier reported off by one with maximum number of NUMA nodes > provided by qemu-kvm being less by one than required according to > description of "ibm,max-associativity-domains" property in LoPAPR. > > It appears that I

[Qemu-devel] [PATCH v2 4/5] x86: exit qemu if load_image fails

2018-11-20 Thread Li Zhijian
CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Michael S. Tsirkin" CC: Marcel Apfelbaum Signed-off-by: Li Zhijian --- hw/i386/pc.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f095725..2ffe6fb 100644 ---

[Qemu-devel] [PATCH v2 3/5] refactor load_image/load_image_size

2018-11-20 Thread Li Zhijian
Don't expect read(2) can always read as many as it's told. Signed-off-by: Li Zhijian --- hw/core/loader.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index 0d53229..5f891e2 100644 --- a/hw/core/loader.c +++

[Qemu-devel] [PATCH v2 5/5] x86: allow load initrd below 4G for recent linux

2018-11-20 Thread Li Zhijian
a new field xloadflags was added to recent x86 linux, and BIT 1: XLF_CAN_BE_LOADED_ABOVE_4G is used to tell bootload that where initrd can be loaded saftly. Current QEMU always load initrd below below_4g_mem_size which always less than 4G, so here limit initrd_max to 4G - 1 simply is enough if

[Qemu-devel] [PATCH v2 0/5] support loading initrd below 4G for recent kernel

2018-11-20 Thread Li Zhijian
Long long ago, linux kernel have supported up to 4G initrd, but it's header still hard code to allow loading initrd below 2G only. cutting from arch/x86/head.S: # (Header version 0x0203 or later) the highest safe address for the contents # of an initrd. The current kernel allows up to 4 GB, but

[Qemu-devel] [PATCH v2 1/5] unify len and addr type for memory/address APIs

2018-11-20 Thread Li Zhijian
Some address/memory APIs have different type between 'hwaddr addr' and 'int len'. It is very unsafety, espcially some APIs will be passed a non-int len by caller which might cause overflow quietly. Below is an potential overflow case: dma_memory_read(uint32_t len) ->

[Qemu-devel] [PATCH v2 2/5] change load_image() reture type to ssize_t

2018-11-20 Thread Li Zhijian
This patch allow load_iamge to load >=2G file Signed-off-by: Li Zhijian --- hw/core/loader.c| 5 +++-- include/hw/loader.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index aa0b3fc..0d53229 100644 --- a/hw/core/loader.c +++

Re: [Qemu-devel] [PATCH 1/2] riscv: virt: Fix pcie memory ranges

2018-11-20 Thread Guenter Roeck
Hi Alistair, On 11/20/18 4:43 PM, Alistair Francis wrote: On Tue, Nov 20, 2018 at 3:01 PM Guenter Roeck wrote: - Provide separate maps for VIRT_PCIE_MMIO (32 bit) and VIRT_PCIE_MMIO_HIGH (64 bit) - VIRT_PCIE_PIO is for IO ports, not for the physical address - VIRT_PCIE_ECAM size reduced

Re: [Qemu-devel] [Qemu-block] [PATCH for-next? 0/2] qemu-img: Minor fixes to an amend error path

2018-11-20 Thread John Snow
On 11/19/18 5:19 AM, Max Reitz wrote: > One of the amend error paths has two issues that are fixed by this > series. Since they are relatively minor and have been present in 3.0 > already, I think there is no need to get them into 3.1. OTOH they are > bug fixes, so they could go into 3.1 if

Re: [Qemu-devel] [Qemu-block] KVM Forum block no[td]es

2018-11-20 Thread Vladimir Sementsov-Ogievskiy
On 12.11.2018 16:10, Nir Soffer wrote: On Mon, Nov 12, 2018 at 5:26 PM Max Reitz mailto:mre...@redhat.com>> wrote: On 12.11.18 00:36, Nir Soffer wrote: > On Mon, Nov 12, 2018 at 12:25 AM Max Reitz > mailto:mre...@redhat.com> > >> wrote: > >

Re: [Qemu-devel] [RFC v1 11/23] riscv: tcg-target: Add the relocation functions

2018-11-20 Thread Alistair Francis
On Fri, Nov 16, 2018 at 12:33 AM Richard Henderson wrote: > > On 11/15/18 11:35 PM, Alistair Francis wrote: > > +static void reloc_sbimm12(tcg_insn_unit *code_ptr, tcg_insn_unit *target) > > +{ > > +intptr_t offset = (intptr_t)target - (intptr_t)code_ptr; > > +tcg_debug_assert(offset ==

Re: [Qemu-devel] [PATCH 2/2] riscv: virt: Fix interrupt mapping

2018-11-20 Thread Alistair Francis
On Tue, Nov 20, 2018 at 3:01 PM Guenter Roeck wrote: > > - Interrupt map width is 6, not 7 > address (3), pci interrupt (1), controller phandle (1), irq (1) > - Since the interrupt map is the default pci interrupt map, we can not > omit devfn from the mapping function. > - It is not

Re: [Qemu-devel] [PATCH 1/2] riscv: virt: Fix pcie memory ranges

2018-11-20 Thread Alistair Francis
On Tue, Nov 20, 2018 at 3:01 PM Guenter Roeck wrote: > > - Provide separate maps for VIRT_PCIE_MMIO (32 bit) and > VIRT_PCIE_MMIO_HIGH (64 bit) > - VIRT_PCIE_PIO is for IO ports, not for the physical address > - VIRT_PCIE_ECAM size reduced to size needed to cover 256 ports > - Use

Re: [Qemu-devel] [PATCH 1/5] VFIO KABI for migration interface

2018-11-20 Thread Tian, Kevin
> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > Sent: Wednesday, November 21, 2018 4:40 AM > > - Defined MIGRATION region type and sub-type. > - Defined VFIO device states during migration process. > - Defined vfio_device_migration_info structure which will be placed at 0th > offset of

Re: [Qemu-devel] [RFC v1 16/23] riscv: tcg-target: Add slowpath load and store instructions

2018-11-20 Thread Alistair Francis
On Fri, Nov 16, 2018 at 1:24 AM Richard Henderson wrote: > > On 11/15/18 11:36 PM, Alistair Francis wrote: > > +static void tcg_out_mb(TCGContext *s, TCGArg a0) > > +{ > > +static const RISCVInsn fence[] = { > > +[0 ... TCG_MO_ALL] = OPC_FENCE_RW_RW, > > +[TCG_MO_LD_LD] =

Re: [Qemu-devel] [RFC v1 15/23] riscv: tcg-target: Add branch and jump instructions

2018-11-20 Thread Alistair Francis
On Fri, Nov 16, 2018 at 1:14 AM Richard Henderson wrote: > > On 11/15/18 11:36 PM, Alistair Francis wrote: > > +static void tcg_out_brcond(TCGContext *s, TCGCond cond, TCGReg arg1, > > + TCGReg arg2, TCGLabel *l) > > +{ > > +RISCVInsn op =

Re: [Qemu-devel] [Qemu-block] [PATCH for-3.1] iotests: Enhance 223 to cover multiple bitmap granularities

2018-11-20 Thread John Snow
On 11/19/18 12:29 PM, Eric Blake wrote: > Testing granularity at the same size as the cluster isn't quite > as fun as what happens when it is larger or smaller. This > enhancement also shows that qemu's nbd server can server the > same disk over multiple exports simultaneously. > >

Re: [Qemu-devel] [Qemu-block] [PATCH] iotests: Skip 233 if certtool not installed

2018-11-20 Thread John Snow
On 11/20/18 5:52 PM, Eric Blake wrote: > The use of TLS while building qemu is optional. While the > 'certtool' binary should be available on every platform that > supports building against TLS, that does not imply that the > developer has installed it. Make the test gracefully skip > in that

Re: [Qemu-devel] [RFC v1 20/23] riscv: tcg-target: Add the target init code

2018-11-20 Thread Alistair Francis
On Mon, Nov 19, 2018 at 10:55 PM Richard Henderson wrote: > > On 11/20/18 12:04 AM, Alistair Francis wrote: > > On Fri, Nov 16, 2018 at 9:26 AM Richard Henderson > > wrote: > >> > >> On 11/15/18 11:36 PM, Alistair Francis wrote: > >>> +tcg_regset_set_reg(s->reserved_regs, TCG_REG_L0); > >>>

Re: [Qemu-devel] [PATCH 14/22] nvram/ds1225y: Convert sysbus init function to realize function

2018-11-20 Thread Philippe Mathieu-Daudé
Hi Peter, On 20/11/18 15:51, Peter Maydell wrote: On 19 November 2018 at 12:08, Mao Zhongyi wrote: Use DeviceClass rather than SysBusDeviceClass in nvram_sysbus_class_init(). Cc: pbonz...@redhat.com Cc: marcandre.lur...@redhat.com Signed-off-by: Mao Zhongyi Signed-off-by: Zhang Shengju

Re: [Qemu-devel] [PATCH] iotests: Skip 233 if certtool not installed

2018-11-20 Thread Eric Blake
On 11/20/18 4:52 PM, Eric Blake wrote: The use of TLS while building qemu is optional. While the 'certtool' binary should be available on every platform that supports building against TLS, that does not imply that the developer has installed it. Make the test gracefully skip in that case.

[Qemu-devel] No RISC-V Patches this Week

2018-11-20 Thread Palmer Dabbelt
I don't have anything in my patch queue for this week, so I don't plan on sending a pull request. Let me know if I'm missing anything.

[Qemu-devel] [PATCH 1/2] riscv: virt: Fix pcie memory ranges

2018-11-20 Thread Guenter Roeck
- Provide separate maps for VIRT_PCIE_MMIO (32 bit) and VIRT_PCIE_MMIO_HIGH (64 bit) - VIRT_PCIE_PIO is for IO ports, not for the physical address - VIRT_PCIE_ECAM size reduced to size needed to cover 256 ports - Use memmap[VIRT_PCIE_ECAM].size instead of memmap[VIRT_PCIE_ECAM].base to

[Qemu-devel] [PATCH 2/2] riscv: virt: Fix interrupt mapping

2018-11-20 Thread Guenter Roeck
- Interrupt map width is 6, not 7 address (3), pci interrupt (1), controller phandle (1), irq (1) - Since the interrupt map is the default pci interrupt map, we can not omit devfn from the mapping function. - It is not necessary to specify "interrupt-parent" and "interrupts" since both

Re: [Qemu-devel] [PATCH] misc: Avoid UTF-8 in error messages

2018-11-20 Thread John Snow
On 11/20/18 5:01 PM, Eric Blake wrote: > [adding Markus in CC, since git didn't do it automatically from the > 'Reported-by'] > > On 11/20/18 3:28 PM, John Snow wrote: >> >> >> On 11/20/18 3:36 PM, Eric Blake wrote: >>> While most developers are now using UTF-8 environments, it's >>> harder to

[Qemu-devel] [PATCH] iotests: Skip 233 if certtool not installed

2018-11-20 Thread Eric Blake
The use of TLS while building qemu is optional. While the 'certtool' binary should be available on every platform that supports building against TLS, that does not imply that the developer has installed it. Make the test gracefully skip in that case. Reported-by: Kevin Wolf Signed-off-by: Eric

[Qemu-devel] [Bug 1804323] [NEW] qemu segfaults in virtio-scsi driver if underlying device returns -EIO

2018-11-20 Thread Richard Jones
Public bug reported: Reported downstream in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1650975 Using qemu from git and reasonably recent nbdkit, this command injects -EIO errors into the block device which virtio-scsi is reading from: $ nbdkit --filter=error memory size=64M

Re: [Qemu-devel] [PATCH] misc: Avoid UTF-8 in error messages

2018-11-20 Thread Eric Blake
[adding Markus in CC, since git didn't do it automatically from the 'Reported-by'] On 11/20/18 3:28 PM, John Snow wrote: On 11/20/18 3:36 PM, Eric Blake wrote: While most developers are now using UTF-8 environments, it's harder to guarantee that error messages will be output to a multibyte

Re: [Qemu-devel] [PATCH 6/6] tests: exercise NBD server in TLS mode

2018-11-20 Thread Kevin Wolf
Am 20.11.2018 um 19:22 hat Eric Blake geschrieben: > On 11/20/18 11:53 AM, Daniel P. Berrangé wrote: > > > > > > +echo > > > > > +echo "== preparing TLS creds ==" > > > > > + > > > > > +tls_x509_create_root_ca "ca1" > > > > > +tls_x509_create_root_ca "ca2" > > > > > +tls_x509_create_server "ca1"

Re: [Qemu-devel] [PATCH for-3.1 0/2] iotests: More Python 3 fixes

2018-11-20 Thread Kevin Wolf
Am 20.11.2018 um 18:22 hat Kevin Wolf geschrieben: > Kevin Wolf (2): > iotests: Replace time.clock() with Timeout > iotests: Replace assertEquals() with assertEqual() Thanks for the quick reviews, applied to the block branch. Kevin

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] iotests: Replace assertEquals() with assertEqual()

2018-11-20 Thread John Snow
On 11/20/18 12:22 PM, Kevin Wolf wrote: > TestCase.assertEquals() is deprecated since Python 2.7. Recent Python > versions print a warning when the function is called, which makes test > cases fail. > > Replace it with the preferred spelling assertEqual(). > > Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH v5 00/24] ACPI reorganization for hardware-reduced API addition

2018-11-20 Thread Paolo Bonzini
On 19/11/18 19:14, Michael S. Tsirkin wrote: > On Mon, Nov 19, 2018 at 06:14:26PM +0100, Paolo Bonzini wrote: >> On 19/11/18 16:31, Igor Mammedov wrote: >>> I've tried to give suggestions how to restructure series >>> on per patch basis. In my opinion it quite possible to split >>> series in

Re: [Qemu-devel] [PATCH v5 00/24] ACPI reorganization for hardware-reduced API addition

2018-11-20 Thread Paolo Bonzini
On 20/11/18 13:57, Igor Mammedov wrote: > On Mon, 19 Nov 2018 18:14:26 +0100 > Paolo Bonzini wrote: > >> On 19/11/18 16:31, Igor Mammedov wrote: >>> I've tried to give suggestions how to restructure series >>> on per patch basis. In my opinion it quite possible to split >>> series in several

Re: [Qemu-devel] [PATCH 01/22] musicpal: Convert sysbus init function to realize function

2018-11-20 Thread Philippe Mathieu-Daudé
On 19/11/18 13:07, Mao Zhongyi wrote: Use DeviceClass rather than SysBusDeviceClass in mv88w8618_wlan_class_init(). Cc: jan.kis...@web.de Cc: peter.mayd...@linaro.org Cc: qemu-...@nongnu.org Signed-off-by: Mao Zhongyi Signed-off-by: Zhang Shengju Reviewed-by: Philippe Mathieu-Daudé ---

Re: [Qemu-devel] [PATCH] misc: Avoid UTF-8 in error messages

2018-11-20 Thread John Snow
On 11/20/18 3:36 PM, Eric Blake wrote: > While most developers are now using UTF-8 environments, it's > harder to guarantee that error messages will be output to > a multibyte locale. Rather than risking error messages that > get corrupted into mojibake when the user runs qemu in a >

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] iotests: Replace time.clock() with Timeout

2018-11-20 Thread John Snow
On 11/20/18 12:22 PM, Kevin Wolf wrote: > time.clock() is deprecated since Python 3.3. Current Python versions > warn that the function will be removed in Python 3.8, and those warnings > make the test case 118 fail. > > Replace it with the Timeout mechanism that is compatible with both >

Re: [Qemu-devel] [PATCH 13/22] puv3_pm.c: Convert sysbus init function to realize function

2018-11-20 Thread Philippe Mathieu-Daudé
On 19/11/18 13:08, Mao Zhongyi wrote: Use DeviceClass rather than SysBusDeviceClass in puv3_pm_class_init(). Cc: g...@mprc.pku.edu.cn Signed-off-by: Mao Zhongyi Signed-off-by: Zhang Shengju Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/puv3_pm.c | 10 -- 1 file changed, 4

[Qemu-devel] [PATCH v8 09/13] target/arm: Finish implementation of PM[X]EVCNTR and PM[X]EVTYPER

2018-11-20 Thread Aaron Lindsay
Add arrays to hold the registers, the definitions themselves, access functions, and logic to reset counters when PMCR.P is set. Update filtering code to support counters other than PMCCNTR. Support migration with raw read/write functions. Signed-off-by: Aaron Lindsay Signed-off-by: Aaron Lindsay

[Qemu-devel] [PATCH v8 10/13] target/arm: PMU: Add instruction and cycle events

2018-11-20 Thread Aaron Lindsay
The instruction event is only enabled when icount is used, cycles are always supported. Always defining get_cycle_count (but altering its behavior depending on CONFIG_USER_ONLY) allows us to remove some CONFIG_USER_ONLY #defines throughout the rest of the code. Signed-off-by: Aaron Lindsay

[Qemu-devel] [PATCH v8 13/13] target/arm: Send interrupts on PMU counter overflow

2018-11-20 Thread Aaron Lindsay
Setup a QEMUTimer to get a callback when we expect counters to next overflow and trigger an interrupt at that time. Signed-off-by: Aaron Lindsay Signed-off-by: Aaron Lindsay --- target/arm/cpu.c| 12 + target/arm/cpu.h| 7 +++ target/arm/helper.c | 126

[Qemu-devel] [PATCH v8 12/13] target/arm: Implement PMSWINC

2018-11-20 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Richard Henderson --- target/arm/helper.c | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index b8462d429a..99bce8a526 100644 ---

[Qemu-devel] [PATCH v8 07/13] target-arm: Make PMCEID[01]_EL0 64 bit registers, add PMCEID[23]

2018-11-20 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay --- target/arm/cpu.h| 4 ++-- target/arm/helper.c | 12 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 627e5c1995..50de58e4a2 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -837,8

Re: [Qemu-devel] [PATCH 11/22] milkymist-hpdmc: Convert sysbus init function to realize function

2018-11-20 Thread Philippe Mathieu-Daudé
On 19/11/18 13:08, Mao Zhongyi wrote: Use DeviceClass rather than SysBusDeviceClass in milkymist_hpdmc_class_init(). Cc: g...@mprc.pku.edu.cn Cc: mich...@walle.cc Signed-off-by: Mao Zhongyi Signed-off-by: Zhang Shengju --- hw/intc/puv3_intc.c | 1 + hw/misc/milkymist-hpdmc.c | 9

[Qemu-devel] [PATCH v8 08/13] target/arm: Add array for supported PMU events, generate PMCEID[01]_EL0

2018-11-20 Thread Aaron Lindsay
This commit doesn't add any supported events, but provides the framework for adding them. We store the pm_event structs in a simple array, and provide the mapping from the event numbers to array indexes in the supported_event_map array. Because the value of PMCEID[01] depends upon which events are

[Qemu-devel] [PATCH v8 02/13] target/arm: Reorganize PMCCNTR accesses

2018-11-20 Thread Aaron Lindsay
pmccntr_read and pmccntr_write contained duplicate code that was already being handled by pmccntr_sync. Consolidate the duplicated code into two functions: pmccntr_op_start and pmccntr_op_finish. Add a companion to c15_ccnt in CPUARMState so that we can simultaneously save both the architectural

[Qemu-devel] [PATCH v8 04/13] target/arm: Filter cycle counter based on PMCCFILTR_EL0

2018-11-20 Thread Aaron Lindsay
Rename arm_ccnt_enabled to pmu_counter_enabled, and add logic to only return 'true' if the specified counter is enabled and neither prohibited or filtered. Signed-off-by: Aaron Lindsay Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/cpu.c

[Qemu-devel] [PATCH v8 06/13] target/arm: Implement PMOVSSET

2018-11-20 Thread Aaron Lindsay
Add an array for PMOVSSET so we only define it for v7ve+ platforms Signed-off-by: Aaron Lindsay Reviewed-by: Richard Henderson --- target/arm/helper.c | 28 1 file changed, 28 insertions(+) diff --git a/target/arm/helper.c b/target/arm/helper.c index

[Qemu-devel] [PATCH v8 11/13] target/arm: PMU: Set PMCR.N to 4

2018-11-20 Thread Aaron Lindsay
This both advertises that we support four counters and enables them because the pmu_num_counters() reads this value from PMCR. Signed-off-by: Aaron Lindsay Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell --- target/arm/helper.c | 10 +- 1 file changed, 5 insertions(+), 5

[Qemu-devel] [PATCH v8 01/13] migration: Add post_save function to VMStateDescription

2018-11-20 Thread Aaron Lindsay
In some cases it may be helpful to modify state before saving it for migration, and then modify the state back after it has been saved. The existing pre_save function provides half of this functionality. This patch adds a post_save function to provide the second half. Signed-off-by: Aaron Lindsay

Re: [Qemu-devel] [PATCH 06/22] dma/puv3_dma: Convert sysbus init function to realize function

2018-11-20 Thread Philippe Mathieu-Daudé
On 19/11/18 13:08, Mao Zhongyi wrote: Use DeviceClass rather than SysBusDeviceClass in puv3_dma_class_init(). Cc: g...@mprc.pku.edu.cn Signed-off-by: Mao Zhongyi Signed-off-by: Zhang Shengju Reviewed-by: Philippe Mathieu-Daudé --- hw/dma/puv3_dma.c | 10 -- 1 file changed, 4

[Qemu-devel] [PATCH v8 03/13] target/arm: Swap PMU values before/after migrations

2018-11-20 Thread Aaron Lindsay
Because of the PMU's design, many register accesses have side effects which are inter-related, meaning that the normal method of saving CP registers can result in inconsistent state. These side-effects are largely handled in pmu_op_start/finish functions which can be called before and after the

[Qemu-devel] [PATCH v8 00/13] More fully implement ARM PMUv3

2018-11-20 Thread Aaron Lindsay
The ARM PMU implementation currently contains a basic cycle counter, but it is often useful to gather counts of other events, filter them based on execution mode, and/or be notified on counter overflow. These patches flesh out the implementations of various PMU registers including PM[X]EVCNTR and

[Qemu-devel] [PATCH v8 05/13] target/arm: Allow AArch32 access for PMCCFILTR

2018-11-20 Thread Aaron Lindsay
Signed-off-by: Aaron Lindsay Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/helper.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index ddb47813d2..0aff261528 100644 ---

Re: [Qemu-devel] [PATCH 04/22] core/empty_slot: Convert sysbus init function to realize function

2018-11-20 Thread Philippe Mathieu-Daudé
On 19/11/18 13:08, Mao Zhongyi wrote: Use DeviceClass rather than SysBusDeviceClass in empty_slot_class_init(). Signed-off-by: Mao Zhongyi Signed-off-by: Zhang Shengju Reviewed-by: Philippe Mathieu-Daudé --- hw/core/empty_slot.c | 9 - 1 file changed, 4 insertions(+), 5

Re: [Qemu-devel] [PATCH] nvme: fix out-of-bounds access to the CMB

2018-11-20 Thread Philippe Mathieu-Daudé
On 20/11/18 19:41, Paolo Bonzini wrote: Because the CMB BAR has a min_access_size of 2, if you read the last byte it will try to memcpy *2* bytes from n->cmbuf, causing an off-by-one error. This is CVE-2018-16847. Another way to fix this might be to register the CMB as a RAM memory region,

Re: [Qemu-devel] [PATCH v2 6/9] qapi: Rewrite string-input-visitor

2018-11-20 Thread Markus Armbruster
I think the title should be something like qapi: Rewrite string-input-visitor's integer and list parsing because you don't actually rewrite all of it. Eric Blake writes: > On 11/20/18 3:25 AM, David Hildenbrand wrote: >> The input visitor has some problems right now, especially >> -

Re: [Qemu-devel] [PATCH v2 5/9] test-string-input-visitor: Add more tests

2018-11-20 Thread Markus Armbruster
Eric Blake writes: > On 11/20/18 11:20 AM, Eric Blake wrote: >> On 11/20/18 11:06 AM, Eric Blake wrote: >>> On 11/20/18 3:25 AM, David Hildenbrand wrote: Test that very big/small values are not accepted and that ranges with only one element work. Also test that ranges are ascending and

[Qemu-devel] [PATCH 5/5] Make vfio-pci device migration capable.

2018-11-20 Thread Kirti Wankhede
Call vfio_migration_probe() and vfio_migration_finalize() functions for vfio-pci device to enable migration for vfio PCI device. Removed vfio_pci_vmstate structure. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/pci.c | 13 ++--- 1 file changed, 6 insertions(+), 7

[Qemu-devel] [PATCH 4/5] Add vfio_listerner_log_sync to mark dirty pages

2018-11-20 Thread Kirti Wankhede
vfio_listerner_log_sync gets list of dirty pages from vendor driver and mark those pages dirty. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/common.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/vfio/common.c b/hw/vfio/common.c

[Qemu-devel] [PATCH 0/5] Add migration support for VFIO device

2018-11-20 Thread Kirti Wankhede
Add migration support for VFIO device This Patch set include patches as below: - Define KABI for VFIO device for migration support. - Added save and restore functions for PCI configuration space - Generic migration functionality for VFIO device. * This patch set adds functionality only for PCI

[Qemu-devel] [PATCH 1/5] VFIO KABI for migration interface

2018-11-20 Thread Kirti Wankhede
- Defined MIGRATION region type and sub-type. - Defined VFIO device states during migration process. - Defined vfio_device_migration_info structure which will be placed at 0th offset of migration region to get/set VFIO device related information. Defined actions and members of structure usage

[Qemu-devel] [PATCH 2/5] Add save and load functions for VFIO PCI devices

2018-11-20 Thread Kirti Wankhede
Save and restore with MSIX type is not tested. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/pci.c | 95 +++ hw/vfio/pci.h | 29 ++ 2 files changed, 124 insertions(+) diff --git a/hw/vfio/pci.c

[Qemu-devel] [PATCH 3/5] Add migration functions for VFIO devices

2018-11-20 Thread Kirti Wankhede
- Migration function are implemented for VFIO_DEVICE_TYPE_PCI device. - Added SaveVMHandlers and implemented all basic functions required for live migration. - Added VM state change handler to know running or stopped state of VM. - Added migration state change notifier to get notification on

Re: [Qemu-devel] [PATCH v2 2/9] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes

2018-11-20 Thread Eric Blake
On 11/20/18 2:31 PM, Markus Armbruster wrote: Eric Blake writes: On 11/20/18 3:25 AM, David Hildenbrand wrote: qemu_strtosz() & friends reject NaNs, but happily accept inifities. s/inifities/infinities/ They shouldn't. Fix that. The fix makes use of qemu_strtod_finite(). To avoid ugly

[Qemu-devel] [PATCH] target/xtensa: xtfpga: provide default memory sizes

2018-11-20 Thread Max Filippov
Provide default RAM sizes for all XTFPGA boards, so that when started without -m option they do the right thing. Signed-off-by: Max Filippov --- hw/xtensa/xtfpga.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index

[Qemu-devel] [PATCH] misc: Avoid UTF-8 in error messages

2018-11-20 Thread Eric Blake
While most developers are now using UTF-8 environments, it's harder to guarantee that error messages will be output to a multibyte locale. Rather than risking error messages that get corrupted into mojibake when the user runs qemu in a non-multibyte locale, let's stick to straight ASCII error

Re: [Qemu-devel] [PATCH v2 3/9] qapi: Fix string-input-visitor to reject NaN and infinities

2018-11-20 Thread Markus Armbruster
David Hildenbrand writes: > The string-input-visitor happily accepts NaN and inifities when parsing Make that "infinities". > numbers (doubles). They shouldn't. Fix that. > > Also, add two test cases, testing if "NaN" and "inf" is properly > rejected. > > Reviewed-by: Eric Blake >

Re: [Qemu-devel] [PATCH v2 2/9] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes

2018-11-20 Thread Markus Armbruster
Eric Blake writes: > On 11/20/18 3:25 AM, David Hildenbrand wrote: >> qemu_strtosz() & friends reject NaNs, but happily accept inifities. > > s/inifities/infinities/ > >> They shouldn't. Fix that. >> >> The fix makes use of qemu_strtod_finite(). To avoid ugly casts, >> change the @end parameter

Re: [Qemu-devel] [PATCH v2] MAINTAINERS: Assign some more files in the hw/arm/ directory

2018-11-20 Thread Philippe Mathieu-Daudé
On 20/11/18 18:42, Thomas Huth wrote: I apparently missed some more files and even a complete machine (the "imx25-pdk") in my previous patch... but now we should hopefully have a completely coverage for all available ARM boards. Fixes: 95a5db3ae5698b49c63144610ad02913e780c828 Signed-off-by:

Re: [Qemu-devel] [PATCH 2/2] iotests: Replace assertEquals() with assertEqual()

2018-11-20 Thread Philippe Mathieu-Daudé
On 20/11/18 18:22, Kevin Wolf wrote: TestCase.assertEquals() is deprecated since Python 2.7. Recent Python versions print a warning when the function is called, which makes test cases fail. Replace it with the preferred spelling assertEqual(). Signed-off-by: Kevin Wolf Reviewed-by: Philippe

Re: [Qemu-devel] [PATCH 1/2] iotests: Replace time.clock() with Timeout

2018-11-20 Thread Philippe Mathieu-Daudé
On 20/11/18 18:22, Kevin Wolf wrote: time.clock() is deprecated since Python 3.3. Current Python versions warn that the function will be removed in Python 3.8, and those warnings make the test case 118 fail. Replace it with the Timeout mechanism that is compatible with both Python 2 and 3, and

Re: [Qemu-devel] [PATCH 1/2] tpm: Remove unused locty parameter from tpm_tis_abort()

2018-11-20 Thread Philippe Mathieu-Daudé
On 20/11/18 19:27, Stefan Berger wrote: Remove the unused locty parameter from tpm_tis_abort() function. Signed-off-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé --- hw/tpm/tpm_tis.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/tpm/tpm_tis.c

Re: [Qemu-devel] [PATCH v2 1/9] cutils: Add qemu_strtod() and qemu_strtod_finite()

2018-11-20 Thread Markus Armbruster
Eric Blake writes: > On 11/20/18 3:25 AM, David Hildenbrand wrote: >> Let's provide a wrapper for strtod(). >> >> Reviewed-by: Eric Blake > > This changed enough from v1 that I would have dropped R-b to ensure > that reviewers notice the differences. > >> Signed-off-by: David Hildenbrand >>

Re: [Qemu-devel] [PATCH 0/3] fw_cfg: fix boot bootsplash and reboot-timeout error checking

2018-11-20 Thread Philippe Mathieu-Daudé
Hi Markus, Li. On 20/11/18 20:34, Markus Armbruster wrote: Li Qiang writes: And also do some code cleanup. A lot of thanks to Markus's review and advice. Li Qiang (3): fw_cfg: fix -boot bootsplash error checking fw_cfg: fix -boot reboot-timeout error checking fw_cfg: make

  1   2   3   4   >