Re: [for-5.0 2/4] spapr: Improve handling of fdt buffer size

2019-12-01 Thread Greg Kurz
On Fri, 29 Nov 2019 16:33:54 +1100 David Gibson wrote: > Previously, spapr_build_fdt() constructed the device tree in a fixed > buffer of size FDT_MAX_SIZE. This is a bit inflexible, but more > importantly it's awkward for the case where we use it during CAS. In > that case the guest firmware s

Re: [PATCH 09/21] hw/acpi: Fix latent legacy CPU plug error handling bug

2019-12-01 Thread Igor Mammedov
On Sat, 30 Nov 2019 20:42:28 +0100 Markus Armbruster wrote: > legacy_acpi_cpu_plug_cb() crashes when acpi_set_cpu_present_bit() > fails and its @errp argument is null. Messed up in commit cc43364de7 > "acpi/cpu-hotplug: introduce helper function to keep bit setting in > one place". > > The bug

Re: [for-5.0 1/4] spapr: Don't trigger a CAS reboot for XICS/XIVE mode changeover

2019-12-01 Thread Greg Kurz
On Fri, 29 Nov 2019 16:33:53 +1100 David Gibson wrote: > PAPR allows the interrupt controller used on a POWER9 machine (XICS or > XIVE) to be selected by the guest operating system, by using the > ibm,client-architecture-support (CAS) feature negotiation call. > > Currently, if the guest selects

Re: [PATCH 08/21] exec: Fix latent file_ram_alloc() error handling bug

2019-12-01 Thread Igor Mammedov
On Sat, 30 Nov 2019 20:42:27 +0100 Markus Armbruster wrote: > When os_mem_prealloc() fails, file_ram_alloc() calls qemu_ram_munmap() > and returns null. Except it doesn't when its @errp argument is null, > because it checks for failure with (errp && *errp). Messed up in > commit 056b68af77 "fix

Re: [for-5.0 1/4] spapr,ppc: Simplify signature of kvmppc_rma_size()

2019-12-01 Thread Cédric Le Goater
On 29/11/2019 02:35, David Gibson wrote: > This function calculates the maximum size of the RMA as implied by the > host's page size of structure of the VRMA (there are a number of other > constraints on the RMA size which will supersede this one in many > circumstances). > > The current interface

Re: [PATCH v37 05/17] target/avr: Add instruction translation - Arithmetic and Logic Instructions

2019-12-01 Thread Michael Rolnik
Aleksandar. I could not find what happens if an instruction with unsupported registers is executed. So, I am leaving this tiny core for later. Regards, Michael Rolnik On Sun, Dec 1, 2019 at 1:11 AM Aleksandar Markovic < aleksandar.m.m...@gmail.com> wrote: > > > On Saturday, November 30, 2019, M

Re: [PATCH 2/2] Add -mem-shared option

2019-12-01 Thread Igor Mammedov
On Fri, 29 Nov 2019 18:46:12 +0100 Paolo Bonzini wrote: > On 29/11/19 13:16, Igor Mammedov wrote: > > As for "-m", I'd make it just an alias that translates > > -m/mem-path/mem-prealloc > > I think we should just deprecate -mem-path/-mem-prealloc in 5.0. CCing > Thomas as mister deprecation.

Re: [PATCH v37 10/17] target/avr: Add instruction disassembly function

2019-12-01 Thread Michael Rolnik
Aleksandar. If this code is going to be merge in 2019 I should modify al the copyrights, right. or should I put 2020 in? Regards, Michael Rolnik On Mon, Dec 2, 2019 at 2:28 AM Aleksandar Markovic < aleksandar.m.m...@gmail.com> wrote: > > > On Wednesday, November 27, 2019, Michael Rolnik wrote:

Re: [for-5.0 0/4] spapr: Improvements to CAS feature negotiation

2019-12-01 Thread Cédric Le Goater
On 29/11/2019 06:33, David Gibson wrote: > This series contains several cleanups to the handling of the > ibm,client-architecture-support firmware call used for boot time > feature negotiation between the guest OS and the firmware & > hypervisor. > > Mostly it's just internal polish, but one signi

Re: [for-5.0 3/4] spapr: Fold h_cas_compose_response() into h_client_architecture_support()

2019-12-01 Thread Cédric Le Goater
On 29/11/2019 06:33, David Gibson wrote: > spapr_h_cas_compose_response() handles the last piece of the PAPR feature > negotiation process invoked via the ibm,client-architecture-support OF > call. Its only caller is h_client_architecture_support() which handles > most of the rest of that process.

Re: [for-5.0 2/4] spapr: Improve handling of fdt buffer size

2019-12-01 Thread Cédric Le Goater
On 29/11/2019 06:33, David Gibson wrote: > Previously, spapr_build_fdt() constructed the device tree in a fixed > buffer of size FDT_MAX_SIZE. This is a bit inflexible, but more > importantly it's awkward for the case where we use it during CAS. In > that case the guest firmware supplies a buffer

Re: [for-5.0 4/4] spapr: Simplify ovec diff

2019-12-01 Thread Cédric Le Goater
On 29/11/2019 06:33, David Gibson wrote: > spapr_ovec_diff(ov, old, new) has somewhat complex semantics. ov is set > to those bits which are in new but not old, and it returns as a boolean > whether or not there are any bits in old but not new. > > It turns out that both callers only care about t

Re: [for-5.0 1/4] spapr: Don't trigger a CAS reboot for XICS/XIVE mode changeover

2019-12-01 Thread Cédric Le Goater
On 29/11/2019 06:33, David Gibson wrote: > PAPR allows the interrupt controller used on a POWER9 machine (XICS or > XIVE) to be selected by the guest operating system, by using the > ibm,client-architecture-support (CAS) feature negotiation call. > > Currently, if the guest selects an interrupt co

Re: [PATCH] target/i386: Remove monitor from some CPU model

2019-12-01 Thread Tao Xu
I am so forry for sending this old version patch by mistake. Please ignore this patch. On 12/2/2019 2:28 PM, Xu, Tao3 wrote: Add new version of Snowridge, Denverton, Opteron_G3, EPYC, and Dhyana CPU model to remove MONITOR/MWAIT feature. After QEMU/KVM use "-overcommit cpu-pm=on" to expose MON

[PATCH RESEND 2/4] target/i386: Remove monitor from some CPU models

2019-12-01 Thread Tao Xu
Add new version of Snowridge, Denverton, Opteron_G3, EPYC, and Dhyana CPU model to remove MONITOR/MWAIT feature. After QEMU/KVM use "-overcommit cpu-pm=on" to expose MONITOR/MWAIT (commit id 6f131f13e68d648a8e4f083c667ab1acd88ce4cd), the MONITOR/MWAIT feature in these CPU model is unused. Signed-

[PATCH RESEND 1/4] target/i386: Add Denverton-v2 (no MPX) CPU model

2019-12-01 Thread Tao Xu
Because MPX is being removed from the linux kernel, remove MPX feature from Denverton. Signed-off-by: Tao Xu --- target/i386/cpu.c | 12 1 file changed, 12 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 69f518a21a..06a3077f95 100644 --- a/target/i386/cpu.c +

[PATCH RESEND 0/4] Add extra information to versioned CPU models

2019-12-01 Thread Tao Xu
This series of patches will remove MPX from Denverton, remove Remove monitor from some CPU models. Add additional information for -cpu help to indicate the changes in this version of CPU model. The output is as follows: x86_64-softmmu/qemu-system-x86_64 -cpu help | grep "\[" x86 Broadwell-v2

[PATCH RESEND 3/4] target/i386: Add new property note to versioned CPU models

2019-12-01 Thread Tao Xu
Add additional information for -cpu help to indicate the changes in this version of CPU model. Suggested-by: Eduardo Habkost Signed-off-by: Tao Xu --- target/i386/cpu.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

[PATCH RESEND 4/4] target/i386: Add notes for versioned CPU models

2019-12-01 Thread Tao Xu
Add which features are added or removed in this version. Remove the changed model-id in versioned CPU models. Signed-off-by: Tao Xu --- target/i386/cpu.c | 50 +++ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/target/i386/cpu.c b/targ

Re: [PATCH v3 4/4] qom/object: Use common get/set uint helpers

2019-12-01 Thread Alexey Kardashevskiy
On 30/11/2019 04:46, Felipe Franciosi wrote: > Several objects implemented their own uint property getters and setters, > despite them being straightforward (without any checks/validations on > the values themselves) and identical across objects. This makes use of > an enhanced API for object_pr

[PATCH 4/4] target/i386: Add notes for versioned CPU models

2019-12-01 Thread Tao Xu
Add which features are added or removed in this version. Remove the changed model-id in versioned CPU models. Signed-off-by: Tao Xu --- target/i386/cpu.c | 50 +++ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/target/i386/cpu.c b/targ

[PATCH 2/4] target/i386: Remove monitor from some CPU models

2019-12-01 Thread Tao Xu
Add new version of Snowridge, Denverton, Opteron_G3, EPYC, and Dhyana CPU model to remove MONITOR/MWAIT feature. After QEMU/KVM use "-overcommit cpu-pm=on" to expose MONITOR/MWAIT (commit id 6f131f13e68d648a8e4f083c667ab1acd88ce4cd), the MONITOR/MWAIT feature in these CPU model is unused. Signed-

[PATCH 1/4] target/i386: Add Denverton-v2 (no MPX) CPU model

2019-12-01 Thread Tao Xu
Because MPX is being removed from the linux kernel, remove MPX feature from Denverton. Signed-off-by: Tao Xu --- target/i386/cpu.c | 12 1 file changed, 12 insertions(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 69f518a21a..06a3077f95 100644 --- a/target/i386/cpu.c +

[PATCH 3/4] target/i386: Add new property note to versioned CPU models

2019-12-01 Thread Tao Xu
Add additional information for -cpu help to indicate the changes in this version of CPU model. Suggested-by: Eduardo Habkost Signed-off-by: Tao Xu --- target/i386/cpu.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index

Re: [RFC][PATCH 0/3] IVSHMEM version 2 device for QEMU

2019-12-01 Thread Jan Kiszka
On 27.11.19 18:19, Jan Kiszka wrote: Hi Liang, On 27.11.19 16:28, Liang Yan wrote: On 11/11/19 7:57 AM, Jan Kiszka wrote: To get the ball rolling after my presentation of the topic at KVM Forum [1] and many fruitful discussions around it, this is a first concrete code series. As discussed, I

[PATCHv3] exynos4210_gic: Suppress gcc9 format-truncation warnings

2019-12-01 Thread David Gibson
exynos4210_gic_realize() prints the number of cpus into some temporary buffers, but it only allows 3 bytes space for it. That's plenty: existing machines will only ever set this value to EXYNOS4210_NCPUS (2). But the compiler can't always figure that out, so some[*] gcc9 versions emit -Wformat-tr

Re: [PATCH v4 01/37] qdev: remove unused qdev_prop_int64

2019-12-01 Thread Markus Armbruster
Marc-André Lureau writes: > Signed-off-by: Marc-André Lureau > --- > hw/core/qdev-properties.c| 32 > include/hw/qdev-properties.h | 3 --- > 2 files changed, 35 deletions(-) > > diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c > index ac2

Re: [PATCH 13/21] memory-device: Fix latent memory pre-plug error handling bugs

2019-12-01 Thread Markus Armbruster
David Hildenbrand writes: > On 30.11.19 20:42, Markus Armbruster wrote: >> memory_device_get_free_addr() crashes when >> memory_device_check_addable() fails and its @errp argument is null. >> Messed up in commit 1b6d6af21b "pc-dimm: factor out capacity and slot >> checks into MemoryDevice". >> >

Re: [PATCH 16/21] s390/cpu_modules: Fix latent realize() error handling bugs

2019-12-01 Thread Markus Armbruster
David Hildenbrand writes: > On 30.11.19 20:42, Markus Armbruster wrote: >> get_max_cpu_model() crashes when kvm_s390_get_host_cpu_model() fails >> and its @errp argument is null. >> >> apply_cpu_model() crashes when kvm_s390_apply_cpu_model() fails and >> its @errp argument is null. >> >> s390_

Re: [PATCH 17/21] s390x: Fix latent query-cpu-model-FOO error handling bugs

2019-12-01 Thread Markus Armbruster
David Hildenbrand writes: > On 01.12.19 14:46, Aleksandar Markovic wrote: >> >> >> On Saturday, November 30, 2019, David Hildenbrand > > wrote: >> >> >> >> > Am 30.11.2019 um 20:42 schrieb Markus Armbruster >> mailto:arm...@redhat.com>>: >> > >> >

Re: [PATCH] configure: Use lld --image-base for --disable-pie user mode binaries

2019-12-01 Thread Fangrui Song
Thanks for reviewing this patch! On 2019-12-01, Richard Henderson wrote: On 11/27/19 6:36 PM, Fangrui Song wrote: On 2019-11-20, Fangrui Song wrote: On 2019-11-15, Fangrui Song wrote: For lld, --image-base is the preferred way to set the base address. lld does not actually implement -Ttext-

Re: Network connection with COLO VM

2019-12-01 Thread Daniel Cho
Hi Zhang, We use qemu-4.1.0 release on this case. I think we need use block mirror to sync the disk to secondary node first, then stop the primary VM and build COLO system. In the stop moment, you need add some netfilter and chardev socket node for COLO, maybe you need re-check this part. Our

Re: [PATCH] virtio-input: fix memory leak in virtio_input_device_unrealize()

2019-12-01 Thread Marc-André Lureau
On Mon, Dec 2, 2019 at 5:20 AM wrote: > > From: PanNengyuan > > vdev->vq[i] is forgot to cleanup in > virtio_input_device_unrealize, the memory leak stack is as bellow: > > Direct leak of 3584 byte(s) in 1 object(s) allocated from: > #0 0x7f84a49f6560 in calloc (/usr/lib64/libasan.so.3+0xc756

Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread Jason Wang
On 2019/12/2 上午5:54, David Miller wrote: From: "Michael S. Tsirkin" Date: Sun, 1 Dec 2019 16:40:22 -0500 Right. But it is helpful to expose the supported functionality to guest in some way, if nothing else then so that guests can be moved between different hosts. Also, we need a way to repo

Re: [RFC net-next 00/18] virtio_net XDP offload

2019-12-01 Thread Jason Wang
On 2019/12/2 上午12:54, David Ahern wrote: On 11/27/19 10:18 PM, Jason Wang wrote: We try to follow what NFP did by starting from a fraction of the whole eBPF features. It would be very hard to have all eBPF features implemented from the start.  It would be helpful to clarify what's the minimal

Re: [RFC net-next 07/18] tun: set offloaded xdp program

2019-12-01 Thread Jason Wang
On 2019/12/2 上午12:45, David Ahern wrote: On 11/26/19 4:07 AM, Prashant Bhole wrote: From: Jason Wang This patch introduces an ioctl way to set an offloaded XDP program to tun driver. This ioctl will be used by qemu to offload XDP program from virtio_net in the guest. Seems like you need to

Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread Jason Wang
On 2019/12/2 上午12:39, David Ahern wrote: On 11/26/19 4:07 AM, Prashant Bhole wrote: run offloaded XDP program as soon as packet is removed from the ptr ring. Since this is XDP in Tx path, the traditional handling of XDP actions XDP_TX/REDIRECT isn't valid. For this reason we call do_xdp_generi

Re: [RFC net-next 07/18] tun: set offloaded xdp program

2019-12-01 Thread Jason Wang
On 2019/12/2 上午12:35, David Ahern wrote: On 11/26/19 4:07 AM, Prashant Bhole wrote: From: Jason Wang This patch introduces an ioctl way to set an offloaded XDP program to tun driver. This ioctl will be used by qemu to offload XDP program from virtio_net in the guest. Signed-off-by: Jason Wa

Re: [PATCH v2 11/14] target/arm: default SVE length to 64 bytes for linux-user

2019-12-01 Thread Richard Henderson
On 11/30/19 8:45 AM, Alex Bennée wrote: > The Linux kernel chooses the default of 64 bytes for SVE registers on > the basis that it is the largest size that won't grow the signal > frame. When debugging larger sizes are also unwieldy in gdb as each > zreg will take over a page of terminal to displa

Re: [PATCH v6] ppc: well form kvmppc_hint_smt_possible error hint helper

2019-12-01 Thread David Gibson
On Wed, Nov 27, 2019 at 10:14:34PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Make kvmppc_hint_smt_possible hint append helper well formed: > rename errp to errp_in, as it is IN-parameter here (which is unusual > for errp), rename function to be kvmppc_error_append_*_hint. I'm not entirely convi

Re: [PATCH v2 08/14] gdbstub: extend GByteArray to read register helpers

2019-12-01 Thread Richard Henderson
On 11/30/19 8:45 AM, Alex Bennée wrote: > -static int cpu_read_virt_reg(CPUS390XState *env, uint8_t *mem_buf, int n) > +static int cpu_read_virt_reg(CPUS390XState *env, GByteArray *mem_buf, int n) > { > switch (n) { > case S390_VIRT_CKC_REGNUM: > @@ -296,9 +296,9 @@ static int cpu_write_

Re: [PATCH v2 06/14] target/arm: use gdb_get_reg helpers

2019-12-01 Thread Richard Henderson
On 11/30/19 8:45 AM, Alex Bennée wrote: > This is cleaner than poking memory directly and will make later > clean-ups easier. > > Signed-off-by: Alex Bennée > > --- > v2 > - make sure we pass hi/lo correctly as quads are stored in LE order > --- > target/arm/helper.c | 18 +++--- >

Re: [PATCH v2 05/14] gdbstub: add helper for 128 bit registers

2019-12-01 Thread Richard Henderson
On 11/30/19 8:45 AM, Alex Bennée wrote: > Signed-off-by: Alex Bennée > > --- > v2 > - take care of endianess of the whole 128 bit word > --- > include/exec/gdbstub.h | 13 + > 1 file changed, 13 insertions(+) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 02/14] gdbstub: stop passing GDBState * around and use global

2019-12-01 Thread Richard Henderson
On 11/30/19 8:45 AM, Alex Bennée wrote: > We only have one GDBState which should be allocated at the time we > process any commands. This will make further clean-up a bit easier. > > Signed-off-by: Alex Bennée > --- > gdbstub.c | 539 +++--- > 1 fi

Re: [PATCH v2 01/14] gdbstub: make GDBState static and have common init function

2019-12-01 Thread Richard Henderson
On 11/30/19 8:45 AM, Alex Bennée wrote: > -static GDBState *gdbserver_state; > +static GDBState gdbserver_state; > + > +static void init_gdbserver_state(void) > +{ > +g_assert(!gdbserver_state.init); > +memset(&gdbserver_state, 0, sizeof(GDBState)); > +gdbserver_state.init = true; > +}

Re: [PATCH v7] Implement backend program convention command for vhost-user-blk

2019-12-01 Thread Micky C
Ping On Mon, Nov 25, 2019 at 1:17 PM Micky Yun Chan(michiboo) < chanmicky...@gmail.com> wrote: > From: Micky Yun Chan > > This patch is to add standard commands defined in > docs/interop/vhost-user.rst > For vhost-user-* program > > Signed-off-by: Micky Yun Chan (michiboo) > --- > contrib/vhos

Re: [PATCH v1 5/5] linux-user: convert target_munmap debug to a tracepoint

2019-12-01 Thread Richard Henderson
On 11/28/19 7:46 PM, Alex Bennée wrote: > Convert the final bit of DEBUG_MMAP to a tracepoint and remove the > last remanents of the #ifdef hackery. > > Signed-off-by: Alex Bennée > --- > linux-user/mmap.c | 9 ++--- > linux-user/trace-events | 1 + > 2 files changed, 3 insertions(+),

Re: [PATCH v1 4/5] linux-user: log page table changes under -d page

2019-12-01 Thread Richard Henderson
On 11/28/19 7:46 PM, Alex Bennée wrote: > +if (qemu_loglevel_mask(CPU_LOG_PAGE)) { > +qemu_log_lock(); > +qemu_log("new page @ 0x"TARGET_ABI_FMT_lx" updates page map:\n", > start); > +log_page_dump(); > +qemu_log_unlock(); > +} Hmm. The language used here

[PATCH] virtio-input: fix memory leak in virtio_input_device_unrealize()

2019-12-01 Thread pannengyuan
From: PanNengyuan vdev->vq[i] is forgot to cleanup in virtio_input_device_unrealize, the memory leak stack is as bellow: Direct leak of 3584 byte(s) in 1 object(s) allocated from: #0 0x7f84a49f6560 in calloc (/usr/lib64/libasan.so.3+0xc7560) #1 0x7f84a3b3e015 in g_malloc0 (/usr/lib64/lib

Re: [PATCH v1 3/5] linux-user: add target_mmap_complete tracepoint

2019-12-01 Thread Richard Henderson
On 11/28/19 7:46 PM, Alex Bennée wrote: > For full details we also want to see where the mmaps end up. > > Signed-off-by: Alex Bennée > --- > linux-user/mmap.c | 2 +- > linux-user/trace-events | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v1 2/5] linux-user: convert target_mmap debug to tracepoint

2019-12-01 Thread Richard Henderson
On 11/28/19 7:46 PM, Alex Bennée wrote: > +if (TRACE_TARGET_MMAP_ENABLED) { > +char prot_str[4]; > +g_autoptr(GString) flag_str = g_string_new(NULL); > + > +pp_prot(&prot_str, prot); > + > +if (flags & MAP_FIXED) { > +g_string_append(flag_str, "MAP_FI

Re: [PATCH v1 1/5] linux-user: convert target_mprotect debug to tracepoint

2019-12-01 Thread Richard Henderson
On 11/28/19 7:45 PM, Alex Bennée wrote: > -#ifdef DEBUG_MMAP > -printf("mprotect: start=0x" TARGET_ABI_FMT_lx > - "len=0x" TARGET_ABI_FMT_lx " prot=%c%c%c\n", start, len, > - prot & PROT_READ ? 'r' : '-', > - prot & PROT_WRITE ? 'w' : '-', > - prot & PROT

Re: [PATCH v37 10/17] target/avr: Add instruction disassembly function

2019-12-01 Thread Aleksandar Markovic
On Wednesday, November 27, 2019, Michael Rolnik wrote: > Provide function disassembles executed instruction when `-d in_asm` is > provided > > Example: > `./avr-softmmu/qemu-system-avr -bios > free-rtos/Demo/AVR_ATMega2560_GCC/demo.elf > -d in_asm` will produce something like the following > > `

Re: [PATCH 4/5] mips: r4000: Renovate coding style

2019-12-01 Thread Aleksandar Markovic
On Monday, November 25, 2019, Filip Bozuta wrote: > The script checkpatch.pl located in scripts folder was > used to detect all errors and warrnings in file: > hw/mips/mips_r4k.c > > This mips r4000 machine file was edited and > all the errors and warrings generated by the checkpatch.pl > scr

Re: [PATCH 2/2] exec: drop tb_invalidate_phys_addr

2019-12-01 Thread Richard Henderson
On 11/27/19 10:06 PM, Max Filippov wrote: > The only remaining user of tb_invalidate_phys_addr is target/xtensa > instruction breakpoint code and it is better to use tb_flush there. > > Drop tb_invalidate_phys_addr implementations and declarations. > Use tb_flush in xtensa IBREAK helpers. > > Sig

Re: [PATCH 5/5] mips: fulong 2e: Renovate coding style

2019-12-01 Thread Aleksandar Markovic
On Monday, November 25, 2019, Filip Bozuta wrote: > The script checkpatch.pl located in scripts folder was > used to detect all errors and warrnings in files: > hw/mips/mips_fulong2e.c > hw/isa/vt82c686.c > hw/pci-host/bonito.c > include/hw/isa/vt82c686.h > > These mips Fulong 2E

Re: [PATCH 1/2] exec: flush CPU TB cache in breakpoint_invalidate

2019-12-01 Thread Richard Henderson
On 11/27/19 10:06 PM, Max Filippov wrote: > When a breakpoint is inserted at location for which there's currently no > virtual to physical translation no action is taken on CPU TB cache. If a > TB for that virtual address already exists but is not visible ATM the > breakpoint won't be hit next time

Re: [RFC] exec: flush CPU TB cache when breakpoint address translation fails

2019-12-01 Thread Richard Henderson
On 11/26/19 10:26 PM, Max Filippov wrote: > When a breakpoint is inserted at location for which there's currently no > virtual to physical translation no action is taken on CPU TB cache. If a > TB for that virtual address already exists but is not visible ATM the > breakpoint won't be hit next time

Re: [PATCH] target/arm: Allow loading elf from aliased ROM regions

2019-12-01 Thread Peter Maydell
On Sun, 1 Dec 2019 at 22:50, Jean-Hugues Deschênes wrote: > > My preference for fixing this properly is: > > * get Damien's three-phase-reset patchset into master > > * make the ROM blob loader write its data into ram > >in phase 2 ('hold') > > * make the arm CPU reset read the data in phase

RE: [PATCH] target/arm: Allow loading elf from aliased ROM regions

2019-12-01 Thread Jean-Hugues Deschênes
> No. This is a reset ordering problem. The CPU reset happens before the > 'rom blob loader' reset, so at this point the rom data (usually an ELF file > segment) has not been written into ram, and doing an > address_space_read() will just read zeroes. This is also why the aliasing > issue happens

Re: [PATCH] target/arm: Allow loading elf from aliased ROM regions

2019-12-01 Thread Peter Maydell
On Sun, 1 Dec 2019 at 20:13, Richard Henderson wrote: > > On 11/25/19 12:41 PM, Jean-Hugues Deschênes wrote: > > initial_msp = ldl_p(rom); > > initial_pc = ldl_p(rom + 4); > > } else { > > -/* Address zero not covered by a ROM blob, or the ROM blob >

Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread David Miller
From: "Michael S. Tsirkin" Date: Sun, 1 Dec 2019 16:40:22 -0500 > Right. But it is helpful to expose the supported functionality > to guest in some way, if nothing else then so that > guests can be moved between different hosts. > > Also, we need a way to report this kind of event to guest > so

Re: [PATCH] configure: Use lld --image-base for --disable-pie user mode binaries

2019-12-01 Thread Richard Henderson
On 11/27/19 6:36 PM, Fangrui Song wrote: > On 2019-11-20, Fangrui Song wrote: >> On 2019-11-15, Fangrui Song wrote: >>> For lld, --image-base is the preferred way to set the base address. >>> lld does not actually implement -Ttext-segment, but treats it as an alias >>> for >>> -Ttext. -Ttext-segme

Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread Michael S. Tsirkin
On Sun, Dec 01, 2019 at 12:56:21PM -0800, David Miller wrote: > From: David Ahern > Date: Sun, 1 Dec 2019 09:39:54 -0700 > > > Below you just drop the packet which is going to be a bad user > > experience. A better user experience is to detect XDP return codes a > > program uses, catch those that

Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread David Miller
From: David Ahern Date: Sun, 1 Dec 2019 09:39:54 -0700 > Below you just drop the packet which is going to be a bad user > experience. A better user experience is to detect XDP return codes a > program uses, catch those that are not supported for this use case and > fail the install of the program

Re: [PATCH 2/5] mips: malta: Renovate coding style

2019-12-01 Thread Philippe Mathieu-Daudé
Hi Filip, On 11/25/19 2:04 PM, Filip Bozuta wrote: The script checkpatch.pl located in scripts folder was used to detect all errors and warrnings in files: hw/mips/mips_malta.c hw/mips/gt64xxx_pci.c tests/acceptance/linux_ssh_mips_malta.py All these mips malta machine files were

Re: [PATCH] target/arm: Allow loading elf from aliased ROM regions

2019-12-01 Thread Richard Henderson
On 11/25/19 12:41 PM, Jean-Hugues Deschênes wrote: > initial_msp = ldl_p(rom); > initial_pc = ldl_p(rom + 4); > } else { > -/* Address zero not covered by a ROM blob, or the ROM blob > - * is in non-modifiable memory and this is a second re

Re: [PATCH v2 06/14] target/arm: use gdb_get_reg helpers

2019-12-01 Thread Philippe Mathieu-Daudé
On 11/30/19 9:45 AM, Alex Bennée wrote: This is cleaner than poking memory directly and will make later clean-ups easier. Signed-off-by: Alex Bennée --- v2 - make sure we pass hi/lo correctly as quads are stored in LE order --- target/arm/helper.c | 18 +++--- 1 file changed,

Re: [PATCH v2 05/14] gdbstub: add helper for 128 bit registers

2019-12-01 Thread Philippe Mathieu-Daudé
On 11/30/19 9:45 AM, Alex Bennée wrote: Signed-off-by: Alex Bennée --- v2 - take care of endianess of the whole 128 bit word --- include/exec/gdbstub.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 08363969c14..59e

Re: [PATCH 04/26] qdev: move helper function to monitor/misc

2019-12-01 Thread Philippe Mathieu-Daudé
On 12/1/19 12:15 PM, Marc-André Lureau wrote: Move the one-user function to the place it is being used. Signed-off-by: Marc-André Lureau --- hw/core/qdev.c | 26 -- include/hw/qdev-core.h | 2 -- monitor/misc.c | 26 ++ 3 fil

Re: [PATCH 01/26] object: add extra sanity checks

2019-12-01 Thread Philippe Mathieu-Daudé
On 12/1/19 12:15 PM, Marc-André Lureau wrote: Type system checked that children class_size >= parent class_size, but not instances. Fix that. Signed-off-by: Marc-André Lureau --- qom/object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qom/object.c b/qom/object.c index d51b57fba1..93

Re: [PATCH v6 00/37] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR

2019-12-01 Thread Aleksandar Markovic
On Sunday, December 1, 2019, Aleksandar Markovic < aleksandar.m.m...@gmail.com> wrote: > > > On Sunday, December 1, 2019, Marc-André Lureau > wrote: > >> Hi Aleksandar >> >> On Sun, Dec 1, 2019 at 4:15 PM Aleksandar Markovic >> wrote: >> > >> > >> > >> > On Sunday, December 1, 2019, Marc-André L

Re: [PATCH v6 00/37] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR

2019-12-01 Thread Aleksandar Markovic
On Sunday, December 1, 2019, Marc-André Lureau wrote: > Hi Aleksandar > > On Sun, Dec 1, 2019 at 4:15 PM Aleksandar Markovic > wrote: > > > > > > > > On Sunday, December 1, 2019, Marc-André Lureau < > marcandre.lur...@gmail.com> wrote: > > > >> > >> - "RFC: mips/cps: fix setting saar property" >

Re: [PATCH 11/21] hw/ipmi: Fix latent realize() error handling bugs

2019-12-01 Thread Corey Minyard
On Sat, Nov 30, 2019 at 08:42:30PM +0100, Markus Armbruster wrote: > isa_ipmi_bt_realize(), ipmi_isa_realize(), pci_ipmi_bt_realize(), and > pci_ipmi_kcs_realize() crash when IPMIInterfaceClass method init() > fails and their @errp argument is null. First messed up in commit > 0719029c47 "ipmi: Ad

Re: [PATCH v4 00/37] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR

2019-12-01 Thread Peter Maydell
On Sun, 1 Dec 2019 at 17:27, Marc-André Lureau wrote: > > Hi > > On Sun, Dec 1, 2019 at 9:18 PM Peter Maydell wrote: > > > > On Sun, 1 Dec 2019 at 10:19, Marc-André Lureau > > wrote: > > > > > > - "serial: register vmsd with DeviceClass" > > > > > > This is standard qdev-ification, however it br

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-12-01 Thread Paolo Bonzini
On 01/12/19 16:40, Marc-André Lureau wrote: >>> The original idea was to always support one NUMA node, so that you could >>> do "-numa node,memdev=..." to specify a memory backend with -object. >>> However, this is not possible anymore since >>> >>> if (!mc->cpu_index_to_instance_props || >>>

Re: [PATCH v4 00/37] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR

2019-12-01 Thread Marc-André Lureau
Hi On Sun, Dec 1, 2019 at 9:18 PM Peter Maydell wrote: > > On Sun, 1 Dec 2019 at 10:19, Marc-André Lureau > wrote: > > > > - "serial: register vmsd with DeviceClass" > > > > This is standard qdev-ification, however it breaks backward migration, > > but that's just how qdev_set_legacy_instance_id

Re: [PATCH v4 00/37] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR

2019-12-01 Thread Peter Maydell
On Sun, 1 Dec 2019 at 10:19, Marc-André Lureau wrote: > > - "serial: register vmsd with DeviceClass" > > This is standard qdev-ification, however it breaks backward migration, > but that's just how qdev_set_legacy_instance_id() works. I don't understand this part. Surely the whole point of settin

Re: [RFC net-next 00/18] virtio_net XDP offload

2019-12-01 Thread David Ahern
On 11/27/19 10:18 PM, Jason Wang wrote: > We try to follow what NFP did by starting from a fraction of the whole > eBPF features. It would be very hard to have all eBPF features > implemented from the start.  It would be helpful to clarify what's the > minimal set of features that you want to have

Re: [RFC net-next 07/18] tun: set offloaded xdp program

2019-12-01 Thread David Ahern
On 11/26/19 4:07 AM, Prashant Bhole wrote: > From: Jason Wang > > This patch introduces an ioctl way to set an offloaded XDP program > to tun driver. This ioctl will be used by qemu to offload XDP program > from virtio_net in the guest. > Seems like you need to set / reset the SOCK_XDP flag on

Re: [RFC net-next 08/18] tun: run offloaded XDP program in Tx path

2019-12-01 Thread David Ahern
On 11/26/19 4:07 AM, Prashant Bhole wrote: > run offloaded XDP program as soon as packet is removed from the ptr > ring. Since this is XDP in Tx path, the traditional handling of > XDP actions XDP_TX/REDIRECT isn't valid. For this reason we call > do_xdp_generic_core instead of do_xdp_generic. do_x

Re: [RFC net-next 07/18] tun: set offloaded xdp program

2019-12-01 Thread David Ahern
On 11/26/19 4:07 AM, Prashant Bhole wrote: > From: Jason Wang > > This patch introduces an ioctl way to set an offloaded XDP program > to tun driver. This ioctl will be used by qemu to offload XDP program > from virtio_net in the guest. > > Signed-off-by: Jason Wang > Signed-off-by: Prashant Bh

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-12-01 Thread Marc-André Lureau
Hi On Sat, Nov 30, 2019 at 12:23 AM Eduardo Habkost wrote: > > On Fri, Nov 29, 2019 at 10:31:36AM +0100, Paolo Bonzini wrote: > > On 28/11/19 17:10, Eduardo Habkost wrote: > > > On Thu, Nov 28, 2019 at 06:15:16PM +0400, Marc-André Lureau wrote: > > >> Hi, > > >> > > >> Setting up shared memory fo

Re: [PATCH v6 00/37] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR

2019-12-01 Thread Marc-André Lureau
Hi Aleksandar On Sun, Dec 1, 2019 at 4:15 PM Aleksandar Markovic wrote: > > > > On Sunday, December 1, 2019, Marc-André Lureau > wrote: > >> >> - "RFC: mips/cps: fix setting saar property" >> >> Perhaps I should have used FIX instead of RFC, because this should >> actually be a real fix. Howeve

Re: [PATCH 00/21] Error handling fixes, may contain 4.2 material

2019-12-01 Thread Michael S. Tsirkin
On Sat, Nov 30, 2019 at 08:42:19PM +0100, Markus Armbruster wrote: > PATCH 2-4 fix crash bugs. Including them would be a no-brainer at > -rc0. But we're post -rc3, and even for crash bugs we require a > certain likelihood of users getting bitten. > > Jens, please assess impact of PATCH 2's crash

Re: [PATCH 16/21] s390/cpu_modules: Fix latent realize() error handling bugs

2019-12-01 Thread David Hildenbrand
On 30.11.19 20:42, Markus Armbruster wrote: > get_max_cpu_model() crashes when kvm_s390_get_host_cpu_model() fails > and its @errp argument is null. > > apply_cpu_model() crashes when kvm_s390_apply_cpu_model() fails and > its @errp argument is null. > > s390_realize_cpu_model() crashes when get_

Re: [PATCH 13/21] memory-device: Fix latent memory pre-plug error handling bugs

2019-12-01 Thread David Hildenbrand
On 30.11.19 20:42, Markus Armbruster wrote: > memory_device_get_free_addr() crashes when > memory_device_check_addable() fails and its @errp argument is null. > Messed up in commit 1b6d6af21b "pc-dimm: factor out capacity and slot > checks into MemoryDevice". > > The bug can't bite as no caller ac

Re: [PATCH 17/21] s390x: Fix latent query-cpu-model-FOO error handling bugs

2019-12-01 Thread Aleksandar Markovic
On Sunday, December 1, 2019, Aleksandar Markovic < aleksandar.m.m...@gmail.com> wrote: > > > On Sunday, December 1, 2019, Aleksandar Markovic < > aleksandar.m.m...@gmail.com> wrote: > >> >> >> On Saturday, November 30, 2019, David Hildenbrand >> wrote: >> >>> >>> >>> > Am 30.11.2019 um 20:42 schr

Re: [PATCH 17/21] s390x: Fix latent query-cpu-model-FOO error handling bugs

2019-12-01 Thread David Hildenbrand
On 01.12.19 14:46, Aleksandar Markovic wrote: > > > On Saturday, November 30, 2019, David Hildenbrand > wrote: > > > > > Am 30.11.2019 um 20:42 schrieb Markus Armbruster > mailto:arm...@redhat.com>>: > > > > cpu_model_from_info() is a helper for >

Re: [PATCH 17/21] s390x: Fix latent query-cpu-model-FOO error handling bugs

2019-12-01 Thread Aleksandar Markovic
On Sunday, December 1, 2019, Aleksandar Markovic < aleksandar.m.m...@gmail.com> wrote: > > > On Saturday, November 30, 2019, David Hildenbrand > wrote: > >> >> >> > Am 30.11.2019 um 20:42 schrieb Markus Armbruster : >> > >> > cpu_model_from_info() is a helper for qmp_query_cpu_model_expansion(),

Re: [PATCH 17/21] s390x: Fix latent query-cpu-model-FOO error handling bugs

2019-12-01 Thread Aleksandar Markovic
On Saturday, November 30, 2019, David Hildenbrand wrote: > > > > Am 30.11.2019 um 20:42 schrieb Markus Armbruster : > > > > cpu_model_from_info() is a helper for qmp_query_cpu_model_expansion(), > > qmp_query_cpu_model_comparison(), qmp_query_cpu_model_baseline(). It > > crashes when the visito

Re: [PATCH v37 00/17] QEMU AVR 8 bit cores

2019-12-01 Thread Aleksandar Markovic
On Sunday, December 1, 2019, Aleksandar Markovic < aleksandar.m.m...@gmail.com> wrote: > Renaming devices such hw/char/avr_usart.c -> hw/char/atmel_usart.c >> (similarly with the macros) would be enough Aleksandar? >> >> On Thursday, November 28, 2019, Michael Rolnik wrote: > >> I will rename the

Re: [PATCH v37 00/17] QEMU AVR 8 bit cores

2019-12-01 Thread Aleksandar Markovic
> > Renaming devices such hw/char/avr_usart.c -> hw/char/atmel_usart.c > (similarly with the macros) would be enough Aleksandar? > > On Thursday, November 28, 2019, Michael Rolnik wrote: > I will rename them. > AVR is the name of a microcontroller lineup, and Atmel is the name of the company tha

[PATCH v2 2/5] target/arm: Honor HCR_EL2.TID1 trapping requirements

2019-12-01 Thread Marc Zyngier
HCR_EL2.TID1 mandates that access from EL1 to REVIDR_EL1, AIDR_EL1 (and their 32bit equivalents) as well as TCMTR, TLBTR are trapped to EL2. QEMU ignores it, making it harder for a hypervisor to virtualize the HW (though to be fair, no known hypervisor actually cares). Do the right thing by trappi

[PATCH v2 4/5] target/arm: Handle AArch32 CP15 trapping via HSTR_EL2

2019-12-01 Thread Marc Zyngier
HSTR_EL2 offers a way to trap ranges of CP15 system register accesses to EL2, and it looks like this register is completely ignored by QEMU. To avoid adding extra .accessfn filters all over the place (which would have a direct performance impact), let's add a new TB flag that gets set whenever HST

[PATCH v2 3/5] target/arm: Handle trapping to EL2 of AArch32 VMRS instructions

2019-12-01 Thread Marc Zyngier
HCR_EL2.TID3 requires that AArch32 reads of MVFR[012] are trapped to EL2, and HCR_EL2.TID0 does the same for reads of FPSID. In order to handle this, introduce a new TCG helper function that checks for these control bits before executing the VMRC instruction. Tested with a hacked-up version of KVM

[PATCH v2 1/5] target/arm: Honor HCR_EL2.TID2 trapping requirements

2019-12-01 Thread Marc Zyngier
HCR_EL2.TID2 mandates that access from EL1 to CTR_EL0, CCSIDR_EL1, CCSIDR2_EL1, CLIDR_EL1, CSSELR_EL1 are trapped to EL2, and QEMU completely ignores it, making it impossible for hypervisors to virtualize the cache hierarchy. Do the right thing by trapping to EL2 if HCR_EL2.TID2 is set. Signed-of

[PATCH v2 5/5] target/arm: Add support for missing Jazelle system registers

2019-12-01 Thread Marc Zyngier
QEMU lacks the minimum Jazelle implementation that is required by the architecture (everything is RAZ or RAZ/WI). Add it together with the HCR_EL2.TID0 trapping that goes with it. Signed-off-by: Marc Zyngier --- target/arm/helper.c | 27 +++ 1 file changed, 27 insertions(

[PATCH v2 0/5] target/arm: More EL2 trapping fixes

2019-12-01 Thread Marc Zyngier
Hi all, This series is a follow-up on [1], which tried to address the remaining missing HCR_EL2.TIDx traps. I've hopefully now adressed the comments that Peter and Edgar raised. I've also tried to tackle missing traps generated by HSTR_EL2, which got completely ignored so far. Note that this resu

Re: [PATCH v6 00/37] Clean-ups: qom-ify serial and remove QDEV_PROP_PTR

2019-12-01 Thread Aleksandar Markovic
On Sunday, December 1, 2019, Marc-André Lureau wrote: > - "RFC: mips/cps: fix setting saar property" > > Perhaps I should have used FIX instead of RFC, because this should > actually be a real fix. However I could use someone help to exercise > the code path. > > Marc-André, hi. There is a work

  1   2   >