[Qemu-devel] [PATCH v5 2/6] fsdev-throttle-qmp: Rename the ThrottleLimits member names

2018-11-16 Thread xiezhide
Rename the ThrottleLimits member names and modify related code Signed-off-by: xiezhide --- qapi/block-core.json | 70 +++--- util/throttle.c | 163 +-- 2 files changed, 116 insertions(+), 117 deletions(-) diff --git

[Qemu-devel] [PATCH v5 3/6] fsdev-throttle-qmp: Rewrite BlockIOThrottle with ThrottleLimits as its base class

2018-11-16 Thread xiezhide
Rewrite BlockIOThrottle with ThrottleLimits as its base class and modify related code Signed-off-by: xiezhide --- blockdev.c | 2 ++ qapi/block-core.json | 73 ++-- 2 files changed, 4 insertions(+), 71 deletions(-) diff --git

Re: [Qemu-devel] [PATCH for-4.0 00/17] tcg: Move softmmu out-of-line

2018-11-16 Thread Richard Henderson
On 11/16/18 6:10 AM, Emilio G. Cota wrote: > It's possible that newer machines with larger reorder buffers > will be able to take better advantage of the higher instruction > locality, hiding the latency of having to execute more instructions. > I'll test on Skylake tomorrow. I've noticed that

Re: [Qemu-devel] [PATCH 0/3] Introduce 'rendernode' option for egl-headless display type

2018-11-16 Thread Gerd Hoffmann
On Thu, Nov 15, 2018 at 09:47:44AM -0600, Eric Blake wrote: > On 11/15/18 9:15 AM, Erik Skultety wrote: > > Since QEMU always picks the default DRI device, libvirt doesn't know which > > one > > to put into the mount namespace and relabel it accordingly, hence hitting > > permission issues,

Re: [Qemu-devel] [RFC v1 13/23] riscv: tcg-target: Add the extract instructions

2018-11-16 Thread Richard Henderson
On 11/15/18 11:35 PM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > Signed-off-by: Michael Clark > --- > tcg/riscv/tcg-target.inc.c | 34 ++ > 1 file changed, 34 insertions(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v5 18/24] hw: i386: Export the MADT build method

2018-11-16 Thread Igor Mammedov
On Mon, 5 Nov 2018 02:40:41 +0100 Samuel Ortiz wrote: > It is going to be used by the PC machine type as the MADT table builder > method and thus needs to be exported outside of acpi-build.c > > Also, now that the generic build_madt() API is exported, we have to > rename the ARM static one in

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

2018-11-16 Thread Paolo Bonzini
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, which would also be more efficient. However,

[Qemu-devel] [PATCH v5 0/6] fsdev-throttle-qmp: qmp interface for fsdev io throttling

2018-11-16 Thread xiezhide
This patches provide qmp interface to query/set io throttle parameters of a fsdev. Some of patches also refactor the code and structure that was present in block and fsdev files. xiezhide (6): fsdev-throttle-qmp: factor out throttle code to reuse code fsdev-throttle-qmp: Rename the

[Qemu-devel] [PATCH v5 1/6] fsdev-throttle-qmp: factor out throttle code to reuse code

2018-11-16 Thread xiezhide
Factor out throttle parameter parsing code to a new common function which will be used by block and fsdev. Rename function throttle_parse_options to throttle_parse_group to resolve function name conflict Reviewed-by: Eric Blake Signed-off-by: xiezhide --- block/throttle.c| 6

Re: [Qemu-devel] [PATCH v4 1/4] fsdev-throttle-qmp: factor out throttle code to reuse code

2018-11-16 Thread xiezhide
-Original Message- From: Eric Blake [mailto:ebl...@redhat.com] Sent: 2018年11月16日 4:56 To: xiezhide ; qemu-devel@nongnu.org Cc: gr...@kaod.org; aneesh.ku...@linux.vnet.ibm.com; arm...@redhat.com; be...@igalia.com; zengcanfu 00215970 ; Jinxuefeng ; Chenhui (Felix, Euler) Subject: Re:

Re: [Qemu-devel] [RFC v1 00/23] Add RISC-V TCG backend support

2018-11-16 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: cover.1542321076.git.alistair.fran...@wdc.com Type: series Subject: [Qemu-devel] [RFC v1 00/23] Add RISC-V TCG backend support === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [RFC v1 12/23] riscv: tcg-target: Add the mov and movi instruction

2018-11-16 Thread Richard Henderson
On 11/15/18 11:35 PM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > Signed-off-by: Michael Clark > --- > tcg/riscv/tcg-target.inc.c | 62 ++ > 1 file changed, 62 insertions(+) > > diff --git a/tcg/riscv/tcg-target.inc.c

[Qemu-devel] QEMU crash with sun4v machine

2018-11-16 Thread Thomas Huth
Hi Artyom, I noticed that QEMU aborts the hard way when it is simply started like this: $ sparc64-softmmu/qemu-system-sparc64 -M sun4v qemu: fatal: Trap 0x0010 while trap level (6) >= MAXTL (6), Error state pc: 0200 npc: 0204 %g0-3:

Re: [Qemu-devel] [PATCH V6 5/6] hw/arm/virt: add pvpanic deviceinvirt acpi table

2018-11-16 Thread peng.hao2
>> >> add pvpanic device in virt acpi table, so when kenrel command line uses >> >> acpi=force, kernel can get info from acpi table in aarch64. >> >> [...] >> >> >> >> >> +static void acpi_dsdt_add_pvpanic(Aml *scope, const MemMapEntry >> >> *pvpanic_memmap) >> >> +{ >> >> +Aml *dev =

Re: [Qemu-devel] [PATCH 0/3] Introduce 'rendernode' option for egl-headless display type

2018-11-16 Thread Gerd Hoffmann
On Fri, Nov 16, 2018 at 10:24:30AM +0100, Erik Skultety wrote: > On Fri, Nov 16, 2018 at 09:43:52AM +0100, Gerd Hoffmann wrote: > > It's simple enough and we are early in the -rc cycle still, I think it > > would be okay for 3.1. > > As far as upstream's concerned, I'm okay with both because

Re: [Qemu-devel] [PATCH v5 19/24] hw: acpi: Retrieve the PCI bus from AcpiPciHpState

2018-11-16 Thread Igor Mammedov
On Mon, 5 Nov 2018 02:40:42 +0100 Samuel Ortiz wrote: > From: Sebastien Boeuf > > Instead of using the machine type specific method find_i440fx() to > retrieve the PCI bus, this commit aims to rely on the fact that the > PCI bus is known by the structure AcpiPciHpState. > > When the

[Qemu-devel] [PATCH v5 5/6] fsdev-throttle-qmp: qmp interface for fsdev io throttling

2018-11-16 Thread xiezhide
provides two interfaces: 1. set the IO limits for the required fsdev device 2. query info of all the fsdev devices. Signed-off-by: xiezhide --- Makefile| 27 - Makefile.objs | 12 -- fsdev/qemu-fsdev-dummy.c| 11 +

Re: [Qemu-devel] [RFC v1 08/23] riscv: tcg-target: Add support for the constraints

2018-11-16 Thread Richard Henderson
On 11/15/18 11:35 PM, Alistair Francis wrote: > +case 'L': > +/* qemu_ld/qemu_st constraint */ > +ct->ct |= TCG_CT_REG; > +ct->u.regs = 0x; > +/* qemu_ld/qemu_st uses TCG_REG_TMP0 */ > +#if defined(CONFIG_SOFTMMU) > +/* tcg_out_tlb_load uses

Re: [Qemu-devel] [PATCH v4] Add arm SBSA reference machine

2018-11-16 Thread Hongbo Zhang
On Fri, 16 Nov 2018 at 00:21, Peter Maydell wrote: > > On 19 October 2018 at 09:55, Hongbo Zhang wrote: > > there are two commit reverts I have to do to boot system currently, these > > block not only my new 'sbsa-ref', but also the 'virt'. > > (other two workarounds can be ignored, they are

Re: [Qemu-devel] [RFC v1 09/23] riscv: tcg-target: Add the immediate encoders

2018-11-16 Thread Richard Henderson
On 11/15/18 11:35 PM, Alistair Francis wrote: > +static int32_t encode_simm12(uint32_t imm) > +{ > +return ((imm << 20) >> 25) << 25 | ((imm << 27) >> 27) << 7; > +} I'm not fond of triple shifts like this, as it makes me count. I'd be ok with a formulation like return ((imm & 0x1f) <<

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

2018-11-16 Thread Richard Henderson
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 == sextract32(offset, 1, 12) << 1); > + > +code_ptr[0] |=

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

2018-11-16 Thread Richard Henderson
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 = tcg_brcond_to_riscv[cond].op; > +bool swap = tcg_brcond_to_riscv[cond].swap; > + > +

Re: [Qemu-devel] [PATCH V7 6/6] pvpanic : update pvpanic document

2018-11-16 Thread Andrew Jones
On Fri, Nov 16, 2018 at 06:50:06PM +0800, Peng Hao wrote: > Add mmio support info in docs/specs/pvpanic.txt. > > Signed-off-by: Peng Hao > --- > docs/specs/pvpanic.txt | 16 +++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/docs/specs/pvpanic.txt

Re: [Qemu-devel] [RFC v8 15/18] hw/arm/virt: Add virtio-iommu to the virt board

2018-11-16 Thread Auger Eric
Hi Jean, Bharat, On 11/14/18 5:41 PM, Auger Eric wrote: > Hi Jean, > > On 11/14/18 5:01 PM, Jean-Philippe Brucker wrote: >> On 09/11/2018 11:29, Eric Auger wrote: >>> +static void create_virtio_iommu(VirtMachineState *vms, >>> +const char *pciehb_nodename, PCIBus

Re: [Qemu-devel] [PATCH v6 04/16] gdbstub: add multiprocess support to 'H' and 'T' packets

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:41:55AM +0100, Luc Michel wrote: > Add a couple of helper functions to cope with GDB threads and processes. > > The gdb_get_process() function looks for a process given a pid. > > The gdb_get_cpu() function returns the CPU corresponding to the (pid, > tid) pair given

Re: [Qemu-devel] [PATCH v6 05/16] gdbstub: add multiprocess support to vCont packets

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:41:56AM +0100, Luc Michel wrote: > Add the gdb_first_cpu() and gdb_next_cpu() to iterate over all > the CPUs in currently attached processes. > > Add the gdb_first_cpu_in_process() and gdb_next_cpu_in_process() to > iterate over CPUs of a given process. > > Use them to

Re: [Qemu-devel] [PATCH v6 09/16] gdbstub: add multiprocess support to gdb_vm_state_change()

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:42:00AM +0100, Luc Michel wrote: > Add support for multiprocess extension in gdb_vm_state_change() > function. > > Signed-off-by: Luc Michel > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias > --- > gdbstub.c | 15 --- > 1 file

Re: [Qemu-devel] [PATCH v6 08/16] gdbstub: add multiprocess support to Xfer:features:read:

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:41:59AM +0100, Luc Michel wrote: > Change the Xfer:features:read: packet handling to support the > multiprocess extension. This packet is used to request the XML > description of the CPU. In multiprocess mode, different descriptions can > be sent for different processes.

Re: [Qemu-devel] [PATCH v1 6/9] qapi: rewrite string-input-visitor

2018-11-16 Thread Markus Armbruster
David Hildenbrand writes: > The input visitor has some problems right now, especially > - unsigned type "Range" is used to process signed ranges, resulting in > inconsistent behavior and ugly/magical code > - uint64_t are parsed like int64_t, so big uint64_t values are not > supported and

Re: [Qemu-devel] [PATCH v6 12/16] gdbstub: add support for vAttach packets

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:42:03AM +0100, Luc Michel wrote: > Add support for the vAttach packets. In multiprocess mode, GDB sends > them to attach to additional processes. > > Signed-off-by: Luc Michel Reviewed-by: Edgar E. Iglesias > --- > gdbstub.c | 35

[Qemu-devel] [PATCH v2 2/3] ui: Allow specifying 'rendernode' display option for egl-headless

2018-11-16 Thread Erik Skultety
As libvirt can't predict which rendernode QEMU would pick, it won't adjust the permissions on the device, hence QEMU getting "Permission denied" when opening the DRI device. Therefore, enable 'rendernode' option for egl-headless display type. Resolves:

Re: [Qemu-devel] [PATCH v6 14/16] gdbstub: gdb_set_stop_cpu: ignore request when process is not attached

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:42:05AM +0100, Luc Michel wrote: > When gdb_set_stop_cpu() is called with a CPU associated to a process > currently not attached by the GDB client, return without modifying the > stop CPU. Otherwise, GDB gets confused if it receives packets with a > thread-id it does not

Re: [Qemu-devel] [PATCH v2] qapi: Reduce Makefile boilerplate

2018-11-16 Thread Markus Armbruster
Eric Blake writes: > Adding a new qapi module requires some rather tedious repetition to > wire it into Makefile and Makefile.objs. Add some indirection by > taking advantage of GNU Make string processing to expand a list > of module names into all the required artifacts, so that future >

Re: [Qemu-devel] [PATCH v6 00/16] gdbstub: support for the multiprocess extension

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:41:51AM +0100, Luc Michel wrote: Hi Luc, I think I've either reviewed all of the patches or commented on all now. Great work! Thanks, Edgar > changes since v5: > - patch 1Rebased on top of master > > - patch 2Cluster ID handling hardening to ensure

Re: [Qemu-devel] [PATCH v6 15/16] gdbstub: add multiprocess extension support

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:42:06AM +0100, Luc Michel wrote: > Add multiprocess extension support by enabling multiprocess mode when > the peer requests it, and by replying that we actually support it in the > qSupported reply packet. > > Signed-off-by: Luc Michel > Reviewed-by: Philippe

Re: [Qemu-devel] [PATCH v2] qapi: Reduce Makefile boilerplate

2018-11-16 Thread Daniel P . Berrangé
On Thu, Nov 15, 2018 at 04:50:52PM -0600, Eric Blake wrote: > Adding a new qapi module requires some rather tedious repetition to > wire it into Makefile and Makefile.objs. Add some indirection by > taking advantage of GNU Make string processing to expand a list > of module names into all the

Re: [Qemu-devel] [PATCH v2 4/4] keymaps: drop support for include files

2018-11-16 Thread Li Qiang
Gerd Hoffmann 于2018年11月16日周五 下午6:43写道: > Signed-off-by: Gerd Hoffmann > Reviewed-by: Li Qiang > --- > ui/keymaps.c | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/ui/keymaps.c b/ui/keymaps.c > index 085889b555..6e44f738ed 100644 > --- a/ui/keymaps.c > +++

[Qemu-devel] [PATCH v5 09/36] ppc/xive: notify the CPU when the interrupt priority is more privileged

2018-11-16 Thread Cédric Le Goater
After the event data was pushed in the O/S Event Queue, the IVPE raises the bit corresponding to the priority of the pending interrupt in the register IBP (Interrupt Pending Buffer) to indicate there is an event pending in one of the 8 priority queues. The Pending Interrupt Priority Register

[Qemu-devel] [PATCH v5 12/36] spapr: initialize VSMT before initializing the IRQ backend

2018-11-16 Thread Cédric Le Goater
We will need to use xics_max_server_number() to create the sPAPRXive object modeling the interrupt controller of the machine which is created before the CPUs. Signed-off-by: Cédric Le Goater --- hw/ppc/spapr.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH v5 15/36] spapr: introdude a new machine IRQ backend for XIVE

2018-11-16 Thread Cédric Le Goater
The XIVE IRQ backend uses the same layout as the new XICS backend but covers the full range of the IRQ number space. The IRQ numbers for the CPU IPIs are allocated at the bottom of this space, below 4K, to preserve compatibility with XICS which does not use that range. This should be enough given

[Qemu-devel] [PATCH v5 13/36] spapr: introduce a spapr_irq_init() routine

2018-11-16 Thread Cédric Le Goater
Initialize the MSI bitmap from it as this will be necessary for the sPAPR IRQ backend for XIVE. Signed-off-by: Cédric Le Goater --- include/hw/ppc/spapr_irq.h | 1 + hw/ppc/spapr.c | 2 +- hw/ppc/spapr_irq.c | 16 +++- 3 files changed, 13 insertions(+), 6

[Qemu-devel] [PATCH v5 06/36] ppc/xive: add support for the END Event State buffers

2018-11-16 Thread Cédric Le Goater
The Event Notification Descriptor also contains two Event State Buffers providing further coalescing of interrupts, one for the notification event (ESn) and one for the escalation events (ESe). A MMIO page is assigned for each to control the EOI through loads only. Stores are not allowed. The END

[Qemu-devel] [PATCH v5 21/36] spapr: extend the sPAPR IRQ backend for XICS migration

2018-11-16 Thread Cédric Le Goater
Introduce a new sPAPR IRQ handler to handle resend after migration when the machine is using a KVM XICS interrupt controller model. Signed-off-by: Cédric Le Goater --- include/hw/ppc/spapr_irq.h | 2 ++ hw/ppc/spapr.c | 13 + hw/ppc/spapr_irq.c | 27

[Qemu-devel] [PATCH v5 25/36] spapr: set the interrupt presenter at reset

2018-11-16 Thread Cédric Le Goater
Currently, the interrupt presenter of the VPCU is set at realize time. Setting it at reset will become useful when the new machine supporting both interrupt modes is introduced. In this machine, the interrupt mode is chosen at CAS time and activated after a reset. Signed-off-by: Cédric Le Goater

[Qemu-devel] [PATCH v5 20/36] spapr: add classes for the XIVE models

2018-11-16 Thread Cédric Le Goater
The XIVE models for the QEMU and KVM accelerators will have a lot in common. Introduce an abstract class for the source, the thread context and the interrupt controller object to handle the differences in the object initialization. These classes will also be used to define state synchronization

[Qemu-devel] [PATCH v5 11/36] spapr/xive: use the VCPU id as a NVT identifier

2018-11-16 Thread Cédric Le Goater
The IVPE scans the O/S CAM line of the XIVE thread interrupt contexts to find a matching Notification Virtual Target (NVT) among the NVTs dispatched on the HW processor threads. On a real system, the thread interrupt contexts are updated by the hypervisor when a Virtual Processor is scheduled to

[Qemu-devel] [PATCH v5 31/36] spapr/xive: export the spapr_xive_kvm_init() routine

2018-11-16 Thread Cédric Le Goater
We will need it to initialize the KVM XIVE device globally from the machine when the XIVE interrupt mode is selected. Signed-off-by: Cédric Le Goater --- include/hw/ppc/spapr_xive.h | 2 ++ hw/intc/spapr_xive_kvm.c| 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v5 36/36] ppc/pnv: add XIVE support

2018-11-16 Thread Cédric Le Goater
This is simple model of the POWER9 XIVE interrupt controller for the PowerNV machine. XIVE for baremetal is a complex controller and the model only addresses the needs of the skiboot firmware. * Overall architecture XIVE Interrupt Controller

[Qemu-devel] [PATCH v5 29/36] ppc/xics: remove abort() in icp_kvm_init()

2018-11-16 Thread Cédric Le Goater
Replace the abort with an error report which will be handled by the caller. Signed-off-by: Cédric Le Goater --- hw/intc/xics_kvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c index efad1b19d821..9662e208fa81 100644 ---

[Qemu-devel] [PATCH v5 16/36] spapr: add hcalls support for the XIVE exploitation interrupt mode

2018-11-16 Thread Cédric Le Goater
The different XIVE virtualization structures (sources and event queues) are configured with a set of Hypervisor calls : - H_INT_GET_SOURCE_INFO used to obtain the address of the MMIO page of the Event State Buffer (ESB) entry associated with the source. - H_INT_SET_SOURCE_CONFIG

[Qemu-devel] [PATCH v5 30/36] spapr: check for KVM IRQ device activation

2018-11-16 Thread Cédric Le Goater
The KVM IRQ device activation will depend on the interrupt mode chosen at CAS time by the machine and some methods used at reset or by the migration need to be protected. Signed-off-by: Cédric Le Goater --- hw/intc/spapr_xive_kvm.c | 5 + hw/intc/xics_kvm.c | 20

[Qemu-devel] [PATCH v5 27/36] sysbus: add a sysbus_mmio_unmap() helper

2018-11-16 Thread Cédric Le Goater
This will be used to remove the MMIO regions of the POWER9 XIVE interrupt controller when the sPAPR machine is reseted. Signed-off-by: Cédric Le Goater --- include/hw/sysbus.h | 1 + hw/core/sysbus.c| 10 ++ 2 files changed, 11 insertions(+) diff --git a/include/hw/sysbus.h

Re: [Qemu-devel] [RFC v1 07/23] riscv: tcg-target: Regiser the JIT

2018-11-16 Thread Richard Henderson
On 11/15/18 11:34 PM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > Signed-off-by: Michael Clark > --- > tcg/riscv/tcg-target.inc.c | 45 ++ > 1 file changed, 45 insertions(+) I think this whole patch should be merged with the prologue. They

[Qemu-devel] [PATCH v5 6/6] fsdev-throttle-qmp: hmp interface for fsdev io throttling

2018-11-16 Thread xiezhide
introduces io throttling hmp interfaces for the fsdev devices Signed-off-by: xiezhide --- hmp-commands-info.hx | 15 ++ hmp-commands.hx | 15 ++ hmp.c| 81 ++-- hmp.h| 4 +++ 4 files changed,

[Qemu-devel] [PATCH v5 4/6] fsdev-throttle-qmp: Move ThrottleLimits into a new file for future reuse

2018-11-16 Thread xiezhide
Move ThrottleLimits into a new file for future reuse. Signed-off-by: xiezhide --- Makefile | 9 + Makefile.objs | 4 qapi/block-core.json | 49 +-- qapi/qapi-schema.json | 1 + qapi/tlimits.json | 53

Re: [Qemu-devel] [PATCH for-4.0 00/17] tcg: Move softmmu out-of-line

2018-11-16 Thread Richard Henderson
On 11/16/18 2:13 AM, Emilio G. Cota wrote: > This allows us to discard most TBs; in the example above, > we end up *not* discarding only ~70 TBs, that is we end up keeping > only 70/2500 = 2.8% of the TBs that we'd discard without OOL. Thanks. When I apply this I think I'll rename "n_ool_thunks"

Re: [Qemu-devel] [PATCH v4 2/4] fsdev-throttle-qmp: move struct ThrottleLimits to new file

2018-11-16 Thread xiezhide
-Original Message- From: Eric Blake [mailto:ebl...@redhat.com] Sent: 2018年11月16日 6:03 To: xiezhide ; qemu-devel@nongnu.org Cc: be...@igalia.com; arm...@redhat.com; zengcanfu 00215970 ; gr...@kaod.org; aneesh.ku...@linux.vnet.ibm.com; Jinxuefeng ; Chenhui (Felix, Euler) Subject: Re:

Re: [Qemu-devel] [PATCH v4 2/4] fsdev-throttle-qmp: move struct ThrottleLimits to new file

2018-11-16 Thread xiezhide
-Original Message- From: Eric Blake [mailto:ebl...@redhat.com] Sent: 2018年11月16日 5:41 To: xiezhide ; qemu-devel@nongnu.org Cc: gr...@kaod.org; aneesh.ku...@linux.vnet.ibm.com; arm...@redhat.com; be...@igalia.com; zengcanfu 00215970 ; Jinxuefeng ; Chenhui (Felix, Euler) Subject: Re:

Re: [Qemu-devel] [RFC v1 10/23] riscv: tcg-target: Add the instruction emitters

2018-11-16 Thread Richard Henderson
On 11/15/18 11:35 PM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > Signed-off-by: Michael Clark > --- > tcg/riscv/tcg-target.inc.c | 40 ++ > 1 file changed, 40 insertions(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [RFC v1 14/23] riscv: tcg-target: Add the out load and store instructions

2018-11-16 Thread Richard Henderson
On 11/15/18 11:36 PM, Alistair Francis wrote: > Signed-off-by: Alistair Francis > Signed-off-by: Michael Clark > --- > tcg/riscv/tcg-target.inc.c | 56 ++ > 1 file changed, 56 insertions(+) > > diff --git a/tcg/riscv/tcg-target.inc.c

Re: [Qemu-devel] [PATCH V6 5/6] hw/arm/virt: add pvpanic device invirt acpi table

2018-11-16 Thread Andrew Jones
On Fri, Nov 16, 2018 at 09:45:42AM +0800, peng.h...@zte.com.cn wrote: > >> add pvpanic device in virt acpi table, so when kenrel command line uses > >> acpi=force, kernel can get info from acpi table in aarch64. > > [...] > > >> > >> +static void acpi_dsdt_add_pvpanic(Aml *scope, const

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

2018-11-16 Thread Richard Henderson
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] = OPC_FENCE_R_R, > +[TCG_MO_ST_LD] = OPC_FENCE_W_R, > +

Re: [Qemu-devel] [PATCH 0/3] Introduce 'rendernode' option for egl-headless display type

2018-11-16 Thread Erik Skultety
On Fri, Nov 16, 2018 at 09:43:52AM +0100, Gerd Hoffmann wrote: > On Thu, Nov 15, 2018 at 09:47:44AM -0600, Eric Blake wrote: > > On 11/15/18 9:15 AM, Erik Skultety wrote: > > > Since QEMU always picks the default DRI device, libvirt doesn't know > > > which one > > > to put into the mount

Re: [Qemu-devel] Are FreeBSD guest images working?

2018-11-16 Thread Peter Maydell
On 16 November 2018 at 05:01, Peter Xu wrote: > I would guess there aren't many people like me to prefer booting a VM > using console, though I agree that it'll be nice if we put something > into the prebuilt images like what's suggested by Ilya (and so far I > don't see anything bad with that):

Re: [Qemu-devel] [PATCH v6 06/16] gdbstub: add multiprocess support to 'sC' packets

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:41:57AM +0100, Luc Michel wrote: > Change the sC packet handling to support the multiprocess extension. > Instead of returning the first thread, we return the first thread of the > current process. > > Signed-off-by: Luc Michel > Reviewed-by: Philippe Mathieu-Daudé >

Re: [Qemu-devel] [Qemu-block] [PATCH] migration/block-dirty-bitmap: fix Coverity CID1390625

2018-11-16 Thread Peter Maydell
On 16 November 2018 at 03:28, John Snow wrote: > I looked again. I think Vladimir's patch will shut up Coverity for sure, > feel free to apply it if you want this out of your hair. > > Stefan suggests the following, however; > > > diff --git a/migration/block-dirty-bitmap.c

Re: [Qemu-devel] [PATCH v6 11/16] gdbstub: add support for extended mode packet

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:42:02AM +0100, Luc Michel wrote: > Add support for the '!' extended mode packet. This is required for the > multiprocess extension. > > Signed-off-by: Luc Michel Reviewed-by: Edgar E. Iglesias > --- > gdbstub.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff

Re: [Qemu-devel] [PATCH 0/2] typedefs.h cleanup

2018-11-16 Thread Markus Armbruster
Eric Blake writes: > Prompted by my review of xiezhide's work. No semantic change, but > not technically a bug fix, so I don't care if it goes in 3.1 or > waits for 4.0. Reviewed-by: Markus Armbruster

[Qemu-devel] [PATCH v2 0/3] Introduce 'rendernode' option for egl-headless display type

2018-11-16 Thread Erik Skultety
https://bugzilla.redhat.com/show_bug.cgi?id=1648236 Changes since v1: - adjusted the QAPI version and description commentaries for egl-headless Erik Skultety (3): qapi: Add "rendernode" display option for egl-headless ui: Allow specifying 'rendernode' display option for egl-headless help:

Re: [Qemu-devel] [PATCH v6 13/16] gdbstub: processes initialization on new peer connection

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:42:04AM +0100, Luc Michel wrote: > When a new connection is established, we set the first process to be > attached, and the others detached. The first CPU of the first process > is selected as the current CPU. > > Signed-off-by: Luc Michel > Reviewed-by: Alistair

Re: [Qemu-devel] [PATCH v4] Add arm SBSA reference machine

2018-11-16 Thread Hongbo Zhang
On Fri, 16 Nov 2018 at 17:58, Peter Maydell wrote: > > On 16 November 2018 at 08:23, Hongbo Zhang wrote: > > Well, for the SMP booting, when GICv2 used, there is no problem, max > > CPU number 8 can be booted, including all the three cases: kernel > > only, UEFI+kernel and ATF+UEFI+kernel. > > >

[Qemu-devel] [PATCH v5 00/36] ppc: support for the XIVE interrupt controller (POWER9)

2018-11-16 Thread Cédric Le Goater
Hello, Here is the version 5 of the QEMU models adding support for the XIVE interrupt controller to the sPAPR machine, under TCG and KVM, and to the PowerNV POWER9 machine. The most important changes for sPAPR are the introduction of a new 'dual' pseries machine supporting both interrupt mode:

[Qemu-devel] [PATCH v5 03/36] ppc/xive: introduce the XiveFabric interface

2018-11-16 Thread Cédric Le Goater
The XiveFabric offers a simple interface, between the XiveSource object and the main interrupt controller of the machine. It will forward event notifications to the XIVE Interrupt Virtualization Routing Engine (IVRE). Signed-off-by: Cédric Le Goater --- include/hw/ppc/xive.h | 23

[Qemu-devel] [PATCH v5 02/36] ppc/xive: add support for the LSI interrupt sources

2018-11-16 Thread Cédric Le Goater
The 'sent' status of the LSI interrupt source is modeled with the 'P' bit of the ESB and the assertion status of the source is maintained in an array under the main sPAPRXive object. The type of the source is stored in the same array for practical reasons. Signed-off-by: Cédric Le Goater ---

[Qemu-devel] [PATCH v5 22/36] spapr/xive: add models for KVM support

2018-11-16 Thread Cédric Le Goater
This introduces a set of XIVE models specific to KVM which derive from the XIVE base models. The interfaces with KVM are a new capability and a new KVM device for the XIVE native exploitation interrupt mode. They handle the initialization of the TIMA and the source ESB memory regions which have a

[Qemu-devel] [PATCH v5 18/36] spapr: allocate the interrupt thread context under the CPU core

2018-11-16 Thread Cédric Le Goater
Each interrupt mode has its own specific interrupt presenter object, that we store under the CPU object, one for XICS and one for XIVE. Extend the sPAPR IRQ backend with a new handler to support them both. Signed-off-by: Cédric Le Goater --- include/hw/ppc/spapr.h | 1 +

[Qemu-devel] [PATCH v5 07/36] ppc/xive: introduce the XIVE interrupt thread context

2018-11-16 Thread Cédric Le Goater
Each POWER9 processor chip has a XIVE presenter that can generate four different exceptions to its threads: - hypervisor exception, - O/S exception - Event-Based Branch (EBB) - msgsnd (doorbell). Each exception has a state independent from the others called a Thread Interrupt Management

[Qemu-devel] [PATCH v5 17/36] spapr: add device tree support for the XIVE exploitation mode

2018-11-16 Thread Cédric Le Goater
The XIVE interface for the guest is described in the device tree under the "interrupt-controller" node. A couple of new properties are specific to XIVE : - "reg" contains the base address and size of the thread interrupt managnement areas (TIMA), for the User level and for the Guest OS

[Qemu-devel] [PATCH v5 33/36] spapr: introduce routines to delete the KVM IRQ device

2018-11-16 Thread Cédric Le Goater
If a new interrupt mode is chosen by CAS, the machine generates a reset to reconfigure. At this point, the connection with the previous KVM device needs to be closed and a new connection needs to opened with the KVM device operating the chosen interrupt mode. New routines are introduced to

[Qemu-devel] [PATCH v5 32/36] spapr/rtas: modify spapr_rtas_register() to remove RTAS handlers

2018-11-16 Thread Cédric Le Goater
Removing RTAS handlers will become necessary when the new pseries machine supporting multiple interrupt mode is introduced. Signed-off-by: Cédric Le Goater --- hw/ppc/spapr_rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index

[Qemu-devel] [PATCH v5 28/36] ppc/xics: introduce a icp_kvm_init() routine

2018-11-16 Thread Cédric Le Goater
This routine gathers all the KVM initialization of the XICS KVM presenter. It will be useful when the initialization of the KVM XICS device is moved to a global routine. Signed-off-by: Cédric Le Goater --- hw/intc/xics_kvm.c | 29 +++-- 1 file changed, 19 insertions(+),

[Qemu-devel] [PATCH v5 35/36] ppc: externalize ppc_get_vcpu_by_pir()

2018-11-16 Thread Cédric Le Goater
We will use it to get the CPU interrupt presenter in XIVE. Signed-off-by: Cédric Le Goater --- include/hw/ppc/ppc.h | 1 + hw/ppc/pnv.c | 16 hw/ppc/ppc.c | 16 3 files changed, 17 insertions(+), 16 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v5 22/24] hw: pci-host: piix: Return PCI host pointer instead of PCI bus

2018-11-16 Thread Igor Mammedov
On Mon, 5 Nov 2018 02:40:45 +0100 Samuel Ortiz wrote: All remaining patches a bit out of proper order, they should be around patch 12/24 where you started to touch MCFG code. > For building the MCFG table, we need to track a given machine > type PCI host pointer, and we can't get it from the

Re: [Qemu-devel] [PATCH v4] hw/arm: Add arm SBSA reference machine

2018-11-16 Thread Peter Maydell
On 16 November 2018 at 10:46, Hongbo Zhang wrote: > On Fri, 16 Nov 2018 at 00:05, Peter Maydell wrote: >> If after you've done that this patch is still more than >> about 500 lines long, I would recommend that you split it >> up into coherent pieces, to make it easier to review. > I think

Re: [Qemu-devel] [PATCH v2 01/12] i2c: Split smbus into parts

2018-11-16 Thread Corey Minyard
On 11/15/18 4:22 PM, Philippe Mathieu-Daudé wrote: On 15/11/18 20:24, miny...@acm.org wrote: From: Corey Minyard smbus.c and smbus.h had device side code, master side code, and smbus.h has some smbus_eeprom.c definitions.  Split them into separate files. Lovely cleanup! Yes, this really

[Qemu-devel] [PULL 0/3] Fixes 31 20181116 patches

2018-11-16 Thread Gerd Hoffmann
The following changes since commit cb968d275c145467c8b385a3618a207ec111eab1: Update version for v3.1.0-rc1 release (2018-11-13 18:16:14 +) are available in the git repository at: git://git.kraxel.org/qemu tags/fixes-31-20181116-pull-request for you to fetch changes up

[Qemu-devel] [PULL 3/3] help: Provide help for egl-headless

2018-11-16 Thread Gerd Hoffmann
From: Erik Skultety EGL headless has been missing from QEMU's help or man page, we should mention that such a thing exists, especially since projects like libvirt might rely on that. This patch also adds the newly introduced option for egl-headless 'rendernode'. Signed-off-by: Erik Skultety

[Qemu-devel] [PULL 1/3] qapi: Add "rendernode" display option for egl-headless

2018-11-16 Thread Gerd Hoffmann
From: Erik Skultety Unlike SPICE, egl-headless doesn't offer a way of specifying the DRM node used for OpenGL, hence QEMU always selecting the first one that is available. Thus, add the 'rendernode' option for egl-headless to QAPI. Signed-off-by: Erik Skultety Message-id:

[Qemu-devel] [PULL 2/3] ui: Allow specifying 'rendernode' display option for egl-headless

2018-11-16 Thread Gerd Hoffmann
From: Erik Skultety As libvirt can't predict which rendernode QEMU would pick, it won't adjust the permissions on the device, hence QEMU getting "Permission denied" when opening the DRI device. Therefore, enable 'rendernode' option for egl-headless display type. Resolves:

Re: [Qemu-devel] [PATCH v2 00/12] RFC: Fix/add vmstate handling in some I2C code

2018-11-16 Thread Corey Minyard
On 11/15/18 5:01 PM, Philippe Mathieu-Daudé wrote: Hi Corey, On 15/11/18 20:24, miny...@acm.org wrote: These changes allow SMBus access while doing a state transfer. Seems like a good idea to me in general. I have these queued for the SMBus IPMI driver work, of course. I had submitted this

Re: [Qemu-devel] [Qemu-block] [PATCH v5 2/3] file-posix: Drop s->lock_fd

2018-11-16 Thread Max Reitz
On 14.11.18 14:54, Alberto Garcia wrote: > On Thu 11 Oct 2018 09:21:34 AM CEST, Fam Zheng wrote: >> The lock_fd field is not strictly necessary because transferring locked >> bytes from old fd to the new one shouldn't fail anyway. This spares the >> user one fd per image. >> >> Signed-off-by: Fam

Re: [Qemu-devel] [PATCH 3/4] target/arm: Install ASIDs for short-form from EL1

2018-11-16 Thread Peter Maydell
On 29 October 2018 at 15:53, Richard Henderson wrote: > This is less complex than the LPAE case, but still we now avoid the > flush in case it is only the PROCID field that is changing. > > Signed-off-by: Richard Henderson > --- > target/arm/helper.c | 34 -- > 1

Re: [Qemu-devel] [PATCH v4] Add arm SBSA reference machine

2018-11-16 Thread Peter Maydell
On 16 November 2018 at 08:23, Hongbo Zhang wrote: > Well, for the SMP booting, when GICv2 used, there is no problem, max > CPU number 8 can be booted, including all the three cases: kernel > only, UEFI+kernel and ATF+UEFI+kernel. > > But when GICv3 used, these two cases still work: kernel only,

Re: [Qemu-devel] [PATCH v6 07/16] gdbstub: add multiprocess support to (f|s)ThreadInfo and ThreadExtraInfo

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:41:58AM +0100, Luc Michel wrote: > Change the thread info related packets handling to support multiprocess > extension. > > Add the CPUs class name in the extra info to help differentiate > them in multiprocess mode. > > Signed-off-by: Luc Michel > Reviewed-by:

Re: [Qemu-devel] [PATCH v6 10/16] gdbstub: add multiprocess support to 'D' packets

2018-11-16 Thread Edgar E. Iglesias
On Thu, Nov 15, 2018 at 10:42:01AM +0100, Luc Michel wrote: > 'D' packets are used by GDB to detach from a process. In multiprocess > mode, the PID to detach from is sent in the request. > > Signed-off-by: Luc Michel > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias > ---

[Qemu-devel] [PATCH v2 3/3] help: Provide help for egl-headless

2018-11-16 Thread Erik Skultety
EGL headless has been missing from QEMU's help or man page, we should mention that such a thing exists, especially since projects like libvirt might rely on that. This patch also adds the newly introduced option for egl-headless 'rendernode'. Signed-off-by: Erik Skultety --- qemu-options.hx | 6

[Qemu-devel] [PATCH v2 1/3] qapi: Add "rendernode" display option for egl-headless

2018-11-16 Thread Erik Skultety
Unlike SPICE, egl-headless doesn't offer a way of specifying the DRM node used for OpenGL, hence QEMU always selecting the first one that is available. Thus, add the 'rendernode' option for egl-headless to QAPI. Signed-off-by: Erik Skultety --- qapi/ui.json | 17 - 1 file

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

2018-11-16 Thread Li Qiang
Paolo Bonzini 于2018年11月16日周五 下午5:31写道: > 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 >

[Qemu-devel] [PATCH v2 3/4] keymaps: remove common include

2018-11-16 Thread Gerd Hoffmann
Copy the content into the sl and sv files (the only ones left which are not generated by qemu-keymap). Signed-off-by: Gerd Hoffmann --- Makefile | 2 +- pc-bios/keymaps/common | 174 pc-bios/keymaps/sl | 177

[Qemu-devel] [PATCH v2 1/4] keymaps: remove modifiers include

2018-11-16 Thread Gerd Hoffmann
"common" is the only file using it, so we can just include it directly. Signed-off-by: Gerd Hoffmann --- Makefile | 2 +- pc-bios/keymaps/common| 19 ++- pc-bios/keymaps/modifiers | 18 -- 3 files changed, 19 insertions(+), 20 deletions(-)

  1   2   3   >