[PULL 01/15] riscv: Suppress the error report for QEMU testing with riscv_find_firmware()

2020-06-03 Thread Alistair Francis
From: Bin Meng We only ship plain binary bios images in the QEMU source. With Spike machine that uses ELF images as the default bios, running QEMU test will complain hence let's suppress the error report for QEMU testing. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Message-Id:

Re: [PATCH v5 0/4] introduction of migration_version attribute for VFIO live migration

2020-06-03 Thread Alex Williamson
On Wed, 3 Jun 2020 01:24:43 -0400 Yan Zhao wrote: > On Tue, Jun 02, 2020 at 09:55:28PM -0600, Alex Williamson wrote: > > On Tue, 2 Jun 2020 23:19:48 -0400 > > Yan Zhao wrote: > > > > > On Tue, Jun 02, 2020 at 04:55:27PM -0600, Alex Williamson wrote: > > > > On Wed, 29 Apr 2020 20:39:50

[PULL 03/15] hw/riscv: sifive_u: Remove the riscv_ prefix of the soc* functions

2020-06-03 Thread Alistair Francis
From: Bin Meng To keep consistency with the machine* functions, remove the riscv_ prefix of the soc* functions. Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Message-id: 1590072147-13035-1-git-send-email-bmeng...@gmail.com Message-Id:

Re: [PATCH] ati-vga: increment mm_index in ati_mm_read/write

2020-06-03 Thread P J P
+-- On Wed, 3 Jun 2020, BALATON Zoltan wrote --+ | or even > MM_DATA + 3 may be best as that only refers to defines used in | that case. So maybe | | + } else if (s->regs.mm_index > MM_DATA + 3) { | > ati_mm_write(s, s->regs.mm_index + addr - MM_DATA, data, size); | > } | > | > and do the

[PULL 08/15] docs: deprecated: Update the -bios documentation

2020-06-03 Thread Alistair Francis
Update the -bios deprecation documentation to describe the new behaviour. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng --- docs/system/deprecated.rst | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/system/deprecated.rst

[PULL 04/15] hw/riscv: virt: Remove the riscv_ prefix of the machine* functions

2020-06-03 Thread Alistair Francis
From: Bin Meng Remove the riscv_ prefix of the machine* functions. Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Message-id: 1590072147-13035-2-git-send-email-bmeng...@gmail.com Message-Id: <1590072147-13035-2-git-send-email-bmeng...@gmail.com>

Re: [PATCH] hw/isa/apm: Convert debug printf()s to trace events

2020-06-03 Thread Richard Henderson
On 5/24/20 9:48 AM, Philippe Mathieu-Daudé wrote: > Convert APM_DPRINTF() to trace events and remove ifdef'ry. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/isa/apm.c| 15 +-- > hw/isa/trace-events | 4 > 2 files changed, 9 insertions(+), 10 deletions(-)

Re: [PATCH v1 8/9] plugins: new hwprofile plugin

2020-06-03 Thread Alex Bennée
Robert Foley writes: > On Wed, 3 Jun 2020 at 07:43, Alex Bennée wrote: >> >> >> Robert Foley writes: >> > >> > >> > When testing out the options, I noticed that >> > if we supply arguments of "read", and "write", then we will only get >> > the last one set, "write", since rw gets

Re: [PATCH v3 14/20] numa: Handle virtio-mem in NUMA stats

2020-06-03 Thread Pankaj Gupta
> Account the memory to the configured nid. > > Cc: Eduardo Habkost > Cc: Marcel Apfelbaum > Cc: "Michael S. Tsirkin" > Signed-off-by: David Hildenbrand > --- > hw/core/numa.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/hw/core/numa.c b/hw/core/numa.c > index

[PATCH 3/3] target/unicore32: Prefer qemu_semihosting_log_out() over curses

2020-06-03 Thread Philippe Mathieu-Daudé
Use the common API for semihosting logging. Signed-off-by: Philippe Mathieu-Daudé --- default-configs/unicore32-softmmu.mak | 1 + target/unicore32/helper.c | 57 +++ 2 files changed, 6 insertions(+), 52 deletions(-) diff --git

[PATCH v2 1/2] sd: sdhci: Implement basic vendor specific register support

2020-06-03 Thread Guenter Roeck
The Linux kernel's IMX code now uses vendor specific commands. This results in endless warnings when booting the Linux kernel. sdhci-esdhc-imx 2194000.usdhc: esdhc_wait_for_card_clock_gate_off: card clock still not gate off in 100us!. Implement support for the vendor specific command

RE: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs

2020-06-03 Thread Salil Mehta
> From: Qemu-arm [mailto:qemu-arm-bounces+salil.mehta=huawei@nongnu.org] > On Behalf Of Andrew Jones > Sent: Wednesday, June 3, 2020 3:37 PM > To: Salil Mehta > Cc: Peter Maydell ; m...@redhat.com; > qemu-devel@nongnu.org; eric.au...@redhat.com; qemu-...@nongnu.org; Igor > Mammedov >

[PATCH v3 16/20] virtio-mem: Allow notifiers for size changes

2020-06-03 Thread David Hildenbrand
We want to send qapi events in case the size of a virtio-mem device changes. This allows upper layers to always know how much memory is actually currently consumed via a virtio-mem device. Unfortuantely, we have to report the id of our proxy device. Let's provide an easy way for our proxy device

RE: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-03 Thread Babu Moger
> -Original Message- > From: Eduardo Habkost > Sent: Tuesday, June 2, 2020 6:01 PM > To: Moger, Babu > Cc: marcel.apfelb...@gmail.com; pbonz...@redhat.com; r...@twiddle.net; > m...@redhat.com; imamm...@redhat.com; qemu-devel@nongnu.org > Subject: Re: [PATCH v7 07/13] hw/386: Add EPYC

Re: [PATCH v3 0/2] fuzz: Skip QTest serialization

2020-06-03 Thread Alexander Bulekov
On 200603 1646, Thomas Huth wrote: > On 02/06/2020 15.40, Alexander Bulekov wrote: > > Thank you Darren. > > > > On 200602 1428, Darren Kenny wrote: > >> > >> Hi Alex, > >> > >> In general the series looks good, so: > >> > >> Reviewed-by: Darren Kenny > >> > >> But not sure how to handle the

Re: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-03 Thread Babu Moger
On 6/3/20 10:31 AM, Eduardo Habkost wrote: > On Wed, Jun 03, 2020 at 10:22:10AM -0500, Babu Moger wrote: >> >> >>> -Original Message- >>> From: Eduardo Habkost >>> Sent: Tuesday, June 2, 2020 6:01 PM >>> To: Moger, Babu >>> Cc: marcel.apfelb...@gmail.com; pbonz...@redhat.com;

Re: [PATCH] ati-vga: increment mm_index in ati_mm_read/write

2020-06-03 Thread BALATON Zoltan
On Wed, 3 Jun 2020, P J P wrote: +-- On Wed, 3 Jun 2020, Gerd Hoffmann wrote --+ | Hmm, why modify mm_index? Shouldn't we just check it is non-zero | before calling ati_mm_read/ati_mm_write? if (s->regs.mm_index & BIT(31)) { ... } else { ati_mm_write(s, s->regs.mm_index + addr -

Re: [PATCH v2] exec: flush the whole TLB if a watchpoint crosses a page boundary

2020-06-03 Thread Richard Henderson
On 6/3/20 4:24 AM, Alex Bennée wrote: > There is no particular reason why you can't have a watchpoint in TCG > that covers a large chunk of the address space. We could be clever > about it but these cases are pretty rare and we can assume the user > will expect a little performance degradation. >

Re: [PATCH 1/5] linux-user: Add strace support for a group of syscalls

2020-06-03 Thread Laurent Vivier
Le 02/06/2020 à 13:53, Filip Bozuta a écrit : > From: Filip Bozuta > > This patch implements strace argument printing functionality for following > syscalls: > > *acct - switch process accounting on or off > > int acct(const char *filename) > man page:

Re: [PATCH 0/5] Add strace support for printing arguments of selected syscalls

2020-06-03 Thread Alex Bennée
Filip Bozuta writes: > From: Filip Bozuta > > This series covers strace support for printing arguments of following > syscalls: > > *acct() *lgetxattr()*lseek() > *fsync()*fgetxattr()*chown() > *fdatasync()*listxattr()*lchown() >

Re: [PATCH 3/5] linux-user: Add strace support for printing arguments of lseek()

2020-06-03 Thread Laurent Vivier
Le 02/06/2020 à 13:53, Filip Bozuta a écrit : > From: Filip Bozuta > > This patch implements strace argument printing functionality for syscall: > > *lseek - reposition read/write file offset > > off_t lseek(int fd, off_t offset, int whence) > man page:

[PATCH v3 08/20] migration/colo: Use ram_block_discard_disable()

2020-06-03 Thread David Hildenbrand
COLO will copy all memory in a RAM block, disable discarding of RAM. Reviewed-by: Dr. David Alan Gilbert Cc: "Michael S. Tsirkin" Cc: Hailiang Zhang Cc: Juan Quintela Cc: "Dr. David Alan Gilbert" Signed-off-by: David Hildenbrand --- include/migration/colo.h | 2 +- migration/migration.c

[PATCH v3 09/20] linux-headers: update to contain virtio-mem

2020-06-03 Thread David Hildenbrand
To be merged hopefully soon. Then, we can replace this by a proper header sync. Cc: "Michael S. Tsirkin" Signed-off-by: David Hildenbrand --- include/standard-headers/linux/virtio_ids.h | 1 + include/standard-headers/linux/virtio_mem.h | 211 2 files changed, 212

[PATCH v3 19/20] virtio-mem: Add trace events

2020-06-03 Thread David Hildenbrand
Let's add some trace events that might come in handy later. Cc: "Michael S. Tsirkin" Cc: "Dr. David Alan Gilbert" Signed-off-by: David Hildenbrand --- hw/virtio/trace-events | 10 ++ hw/virtio/virtio-mem.c | 10 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git

[PATCH v2 2/2] hw: arm: Set vendor property for IMX SDHCI emulations

2020-06-03 Thread Guenter Roeck
Set vendor property to IMX to enable IMX specific functionality in sdhci code. Tested-by: Philippe Mathieu-Daudé Signed-off-by: Guenter Roeck --- v2: Added missing error checks Added Philippe's Tested-by: tag hw/arm/fsl-imx25.c | 6 ++ hw/arm/fsl-imx6.c | 6 ++

Re: [PATCH 3/4] block: Add block accounting code for GET LBA STATUS

2020-06-03 Thread Claudio Fontana
On 6/2/20 9:42 AM, Lin Ma wrote: > Signed-off-by: Lin Ma > --- > include/block/accounting.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/block/accounting.h b/include/block/accounting.h > index 878b4c3581..645014fb0b 100644 > --- a/include/block/accounting.h > +++

Re: [PATCH] qom-hmp-cmds: fix a memleak in hmp_qom_get

2020-06-03 Thread Li Qiang
Pan Nengyuan 于2020年6月3日周三 下午2:17写道: > 'obj' forgot to free at the end of hmp_qom_get(). Fix that. > > The leak stack: > Direct leak of 40 byte(s) in 1 object(s) allocated from: > #0 0x7f4e3a779ae8 in __interceptor_malloc (/lib64/libasan.so.5+0xefae8) > #1 0x7f4e398f91d5 in g_malloc

Re: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-03 Thread Eduardo Habkost
On Wed, Jun 03, 2020 at 10:22:10AM -0500, Babu Moger wrote: > > > > -Original Message- > > From: Eduardo Habkost > > Sent: Tuesday, June 2, 2020 6:01 PM > > To: Moger, Babu > > Cc: marcel.apfelb...@gmail.com; pbonz...@redhat.com; r...@twiddle.net; > > m...@redhat.com;

Re: [PATCH 1/3] target/unicore32: Remove unused headers

2020-06-03 Thread Richard Henderson
On 6/3/20 5:37 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > target/unicore32/helper.c | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH 0/3] target/unicore32: Semihosting cleanup

2020-06-03 Thread Philippe Mathieu-Daudé
Trivial cleanups around semihosting code. Guan: Do you have binaries to run testing? I couldn't rebuild anything from https://github.com/gxt/UniCore32 that you referenced here: https://www.mail-archive.com/qemu-devel@nongnu.org/msg608054.html - u-boot patches are missing - which

[PATCH 2/3] target/unicore32: Replace DPRINTF() by qemu_log_mask(GUEST_ERROR)

2020-06-03 Thread Philippe Mathieu-Daudé
Replace disabled DPRINTF() by qemu_log_mask(GUEST_ERROR). Signed-off-by: Philippe Mathieu-Daudé --- target/unicore32/helper.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/target/unicore32/helper.c b/target/unicore32/helper.c index 53292ae311..00371a7da6 100644

[PATCH 1/3] target/unicore32: Remove unused headers

2020-06-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/unicore32/helper.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/unicore32/helper.c b/target/unicore32/helper.c index 7d538e2144..53292ae311 100644 --- a/target/unicore32/helper.c +++ b/target/unicore32/helper.c @@ -12,9 +12,7 @@

[PATCH] ati-vga: increment mm_index in ati_mm_read/write

2020-06-03 Thread P J P
From: Prasad J Pandit While accessing VGA registers via ati_mm_read/write routines, a guest may set 's->regs.mm_index' such that it leads to infinite recursion. Increment the mm_index value to avoid it. Reported-by: Ren Ding Reported-by: Hanqing Zhao Reported-by: Yi Ren Signed-off-by: Prasad

Re: [PATCH v2] target/arm/cpu: adjust virtual time for arm cpu

2020-06-03 Thread Peter Maydell
On Wed, 3 Jun 2020 at 09:26, Andrew Jones wrote: > The name 'kvm_arm_add_vcpu_properties' says nothing about being specific > to the timer. So this is either the wrong place for this function, or the > function is named wrong. I'd say it's the wrong place, because, as the > comment above

Re: [PATCH] util/oslib-posix : qemu_init_exec_dir implementation for MacOS

2020-06-03 Thread David CARLIER
Good point even tough the libproc api is here in this form since quite a time. >From d23bf60961ee036f8298794f879d1b8b9bd717dc Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 26 May 2020 21:35:27 +0100 Subject: [PATCH] util/oslib: current process full path resolution on MacOS Using

Re: [PATCH for-5.1 V4 1/4] hw/mips: Implement the kvm_type() hook in MachineClass

2020-06-03 Thread Aleksandar Markovic
уто, 2. јун 2020. у 04:38 Huacai Chen је написао/ла: > MIPS has two types of KVM: TE & VZ, and TE is the default type. Now we > can't create a VZ guest in QEMU because it lacks the kvm_type() hook in > MachineClass. Besides, libvirt uses a null-machine to detect the kvm > capability, so by

[PATCH v3 03/20] accel/kvm: Convert to ram_block_discard_disable()

2020-06-03 Thread David Hildenbrand
Discarding memory does not work as expected. At the time this is called, we cannot have anyone active that relies on discards to work properly. Reviewed-by: Dr. David Alan Gilbert Cc: Paolo Bonzini Signed-off-by: David Hildenbrand --- accel/kvm/kvm-all.c | 4 ++-- 1 file changed, 2

[PATCH v3 05/20] virtio-balloon: Rip out qemu_balloon_inhibit()

2020-06-03 Thread David Hildenbrand
The only remaining special case is postcopy. It cannot handle concurrent discards yet, which would result in requesting already sent pages from the source. Special-case it in virtio-balloon instead. Introduce migration_in_incoming_postcopy(), to find out if incoming postcopy is active. Cc:

[PATCH v3 11/20] virtio-pci: Proxy for virtio-mem

2020-06-03 Thread David Hildenbrand
Let's add a proxy for virtio-mem, make it a memory device, and pass-through the properties. Reviewed-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Cc: "Dr. David Alan Gilbert" Cc: Igor Mammedov Signed-off-by: David Hildenbrand --- hw/virtio/Makefile.objs| 1 +

[PATCH v3 15/20] pc: Support for virtio-mem-pci

2020-06-03 Thread David Hildenbrand
Let's wire it up similar to virtio-pmem. Also disallow unplug, so it's harder for users to shoot themselves into the foot. Reviewed-by: Pankaj Gupta Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: Eric Blake Cc: Markus

Re: [PATCH 1/1] util/oslib: Returns real thread identifier on FreeBSD and NetBSD

2020-06-03 Thread Li-Wen Hsu
Sorry that I am not familiar with this part so I asked others to help review (the FreeBSD related code). It's good and please append: Reviewed-by: Edward Tomasz Napierala Thanks! On Wed, Jun 3, 2020 at 2:14 PM David CARLIER wrote: > > Sorry it landed in the spam. > > It does make things more

Re: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-03 Thread Eduardo Habkost
On Wed, Jun 03, 2020 at 10:38:46AM -0500, Babu Moger wrote: > > > On 6/3/20 10:31 AM, Eduardo Habkost wrote: > > On Wed, Jun 03, 2020 at 10:22:10AM -0500, Babu Moger wrote: > >> > >> > >>> -Original Message- > >>> From: Eduardo Habkost > >>> Sent: Tuesday, June 2, 2020 6:01 PM > >>> To:

[PATCH] pci: check address before reading configuration bytes

2020-06-03 Thread P J P
From: Prasad J Pandit While reading PCI configuration bytes, a guest may send an address towards the end of the configuration space. It may lead to an OOB access issue. Add check to ensure 'address + len' is within PCI configuration space. Reported-by: Ren Ding Reported-by: Hanqing Zhao

Re: [PATCH] ati-vga: increment mm_index in ati_mm_read/write

2020-06-03 Thread BALATON Zoltan
On Wed, 3 Jun 2020, Gerd Hoffmann wrote: On Wed, Jun 03, 2020 at 06:17:32PM +0530, P J P wrote: From: Prasad J Pandit While accessing VGA registers via ati_mm_read/write routines, a guest may set 's->regs.mm_index' such that it leads to infinite recursion. Lovely. Increment the mm_index

Re: [PATCH] util/oslib-posix : qemu_init_exec_dir implementation for MacOS

2020-06-03 Thread Justin Hibbits
On Wed, 3 Jun 2020 08:08:42 +0200 Philippe Mathieu-Daudé wrote: > Cc'ing more developers. > > On 5/26/20 10:40 PM, David CARLIER wrote: > > From b24a6702beb2a4e2a9c1c03b69c6d1dd07d4cf08 Mon Sep 17 00:00:00 > > 2001 From: David Carlier > > Date: Tue, 26 May 2020 21:35:27 +0100 > > Subject:

Re: [PATCH RFC 01/32] python/qemu: create qemu.lib module

2020-06-03 Thread John Snow
On 6/3/20 5:00 AM, Kevin Wolf wrote: > Am 02.06.2020 um 18:44 hat John Snow geschrieben: >> >> >> On 6/2/20 6:08 AM, Kevin Wolf wrote: >>> Am 14.05.2020 um 07:53 hat John Snow geschrieben: move python/qemu/*.py to python/qemu/lib/*.py. To create a namespace package, the 'qemu'

Re: [PATCH v3 0/2] fuzz: Skip QTest serialization

2020-06-03 Thread Thomas Huth
On 02/06/2020 15.40, Alexander Bulekov wrote: > Thank you Darren. > > On 200602 1428, Darren Kenny wrote: >> >> Hi Alex, >> >> In general the series looks good, so: >> >> Reviewed-by: Darren Kenny >> >> But not sure how to handle the patchew output though, not sure if it is >> really a concern

Re: [PATCH 1/4] block: Add bdrv_co_get_lba_status

2020-06-03 Thread Claudio Fontana
Hi Lin, just a couple of things, leaving the core aspects to more knowledgeable people in this area to address. In general, you want all patches in the series to build correctly. Applying only PATCH 1/4 breaks the build for me with: /home/claudio/git/qemu/block/io.c:2190:1: error: no previous

[PATCH v3 20/20] virtio-mem: Exclude unplugged memory during migration

2020-06-03 Thread David Hildenbrand
The content of unplugged memory is undefined and should not be migrated, ever. Exclude all unplugged memory during precopy using the precopy notifier infrastructure introduced for free page hinting in virtio-balloon. Unplugged memory is marked as "not dirty", meaning it won't be considered for

Re: [PATCH v3 00/20] virtio-mem: Paravirtualized memory hot(un)plug

2020-06-03 Thread Eric Blake
On 6/3/20 9:48 AM, David Hildenbrand wrote: This is the very basic, initial version of virtio-mem. More info on virtio-mem in general can be found in the Linux kernel driver v2 posting [1] and in patch #10. The latest Linux driver v4 can be found at [2]. This series is based on [3]:

Re: [PATCH] util/oslib-posix : qemu_init_exec_dir implementation for MacOS

2020-06-03 Thread Justin Hibbits
On Wed, 3 Jun 2020 16:36:27 +0200 Philippe Mathieu-Daudé wrote: > On 6/3/20 4:09 PM, Justin Hibbits wrote: > > On Wed, 3 Jun 2020 08:08:42 +0200 > > Philippe Mathieu-Daudé wrote: > > > >> Cc'ing more developers. > >> > >> On 5/26/20 10:40 PM, David CARLIER wrote: > >>> From

Re: [PATCH 3/3] target/unicore32: Prefer qemu_semihosting_log_out() over curses

2020-06-03 Thread Richard Henderson
On 6/3/20 5:37 AM, Philippe Mathieu-Daudé wrote: > Use the common API for semihosting logging. > > Signed-off-by: Philippe Mathieu-Daudé > --- > default-configs/unicore32-softmmu.mak | 1 + > target/unicore32/helper.c | 57 +++ > 2 files changed, 6

Re: [PULL 04/12] hmp: Simplify qom-set

2020-06-03 Thread David Hildenbrand
On 03.06.20 14:24, Dr. David Alan Gilbert wrote: > * David Hildenbrand (da...@redhat.com) wrote: >> On 03.06.20 13:43, Dr. David Alan Gilbert wrote: >>> * David Hildenbrand (da...@redhat.com) wrote: On 03.06.20 12:43, Dr. David Alan Gilbert wrote: > * David Hildenbrand (da...@redhat.com)

Re: [PATCH v1 9/9] .travis.yml: allow failure for unreliable hosts

2020-06-03 Thread Philippe Mathieu-Daudé
On 6/3/20 10:18 AM, Philippe Mathieu-Daudé wrote: > On 6/2/20 5:46 PM, Alex Bennée wrote: >> They will still run but they won't get in the way of the result. >> >> Signed-off-by: Alex Bennée >> --- >> .travis.yml | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/.travis.yml

Re: [PATCH] pci: check address before reading configuration bytes

2020-06-03 Thread Philippe Mathieu-Daudé
On 6/3/20 2:40 PM, P J P wrote: > From: Prasad J Pandit > > While reading PCI configuration bytes, a guest may send an > address towards the end of the configuration space. It may lead > to an OOB access issue. Add check to ensure 'address + len' is > within PCI configuration space. > >

Re: [PATCH] ati-vga: increment mm_index in ati_mm_read/write

2020-06-03 Thread Gerd Hoffmann
On Wed, Jun 03, 2020 at 06:17:32PM +0530, P J P wrote: > From: Prasad J Pandit > > While accessing VGA registers via ati_mm_read/write routines, > a guest may set 's->regs.mm_index' such that it leads to infinite > recursion. Lovely. > Increment the mm_index value to avoid it. Hmm, why modify

Re: [PATCH for-5.1] qcow2: Don't open images with a backing file and the data-file-raw bit

2020-06-03 Thread Max Reitz
On 15.04.20 21:02, Alberto Garcia wrote: > Although we cannot create these images with qemu-img it is still > possible to do it using an external tool. QEMU should refuse to open > them until the data-file-raw bit is cleared with 'qemu-img check'. > > Signed-off-by: Alberto Garcia > --- >

[PATCH v3 17/20] virtio-pci: Send qapi events when the virtio-mem size changes

2020-06-03 Thread David Hildenbrand
Let's register the notifier and trigger the qapi event with the right device id. MEMORY_DEVICE_SIZE_CHANGE is similar to BALLOON_CHANGE, however on a memory device level. Don't unregister the notifier (we neither have finalize() nor unrealize() for VirtIOPCIProxy, so it's not that simple to do

[PATCH v3 13/20] hmp: Handle virtio-mem when printing memory device info

2020-06-03 Thread David Hildenbrand
Print the memory device info just like for other memory devices. Cc: "Dr. David Alan Gilbert" Cc: "Michael S. Tsirkin" Signed-off-by: David Hildenbrand --- monitor/hmp-cmds.c | 16 1 file changed, 16 insertions(+) diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index

[PATCH v3 07/20] migration/rdma: Use ram_block_discard_disable()

2020-06-03 Thread David Hildenbrand
RDMA will pin all guest memory (as documented in docs/rdma.txt). We want to disable RAM block discards - however, to keep it simple use ram_block_discard_is_required() instead of inhibiting. Note: It is not sufficient to limit disabling to pin_all. Even when only conditionally pinning 1 MB

[PATCH v3 14/20] numa: Handle virtio-mem in NUMA stats

2020-06-03 Thread David Hildenbrand
Account the memory to the configured nid. Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: "Michael S. Tsirkin" Signed-off-by: David Hildenbrand --- hw/core/numa.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/core/numa.c b/hw/core/numa.c index 316bc50d75..06960918e7 100644 ---

[PATCH v3 04/20] s390x/pv: Convert to ram_block_discard_disable()

2020-06-03 Thread David Hildenbrand
Discarding RAM does not work as expected with protected VMs. Let's switch to ram_block_discard_disable() for now, as we want to get rid of qemu_balloon_inhibit(). Note that it will currently never fail, but might fail in the future with new technologies (e.g., virtio-mem). Cc: Richard Henderson

Re: [PATCH 4/4] scsi-disk: Add support for the GET LBA STATUS 16 command

2020-06-03 Thread Claudio Fontana
On 6/2/20 9:42 AM, Lin Ma wrote: > Signed-off-by: Lin Ma > --- > hw/scsi/scsi-disk.c | 92 > include/scsi/constants.h | 1 + > 2 files changed, 93 insertions(+) > > diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c > index

Re: [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-03 Thread Eric Blake
On 6/2/20 9:29 PM, Eric Blake wrote: +++ b/accel/tcg/translate-all.c @@ -2565,9 +2565,9 @@ int page_check_range(target_ulong start, target_ulong len, int flags)   /* This function should never be called with addresses outside the guest address space.  If this assert fires, it

Re: [PATCH] ati-vga: increment mm_index in ati_mm_read/write

2020-06-03 Thread Gerd Hoffmann
On Wed, Jun 03, 2020 at 08:05:50PM +0530, P J P wrote: > +-- On Wed, 3 Jun 2020, Gerd Hoffmann wrote --+ > | Hmm, why modify mm_index? Shouldn't we just check it is non-zero > | before calling ati_mm_read/ati_mm_write? > > if (s->regs.mm_index & BIT(31)) { > ... > } else { } else if

Re: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-03 Thread Babu Moger
On 6/3/20 10:45 AM, Eduardo Habkost wrote: > On Wed, Jun 03, 2020 at 10:38:46AM -0500, Babu Moger wrote: >> >> >> On 6/3/20 10:31 AM, Eduardo Habkost wrote: >>> On Wed, Jun 03, 2020 at 10:22:10AM -0500, Babu Moger wrote: > -Original Message- > From: Eduardo Habkost

Re: [PATCH v1 8/9] plugins: new hwprofile plugin

2020-06-03 Thread Peter Maydell
On Tue, 2 Jun 2020 at 16:54, Alex Bennée wrote: > > This is a plugin intended to help with profiling access to various > bits of system hardware. It only really makes sense for system > emulation. > > It takes advantage of the recently exposed helper API that allows us > to see the device name

[PATCH v3] xen: fix build without pci passthrough

2020-06-03 Thread Anthony PERARD
From: Roger Pau Monne Xen PCI passthrough support may not be available and thus the global variable "has_igd_gfx_passthru" might be compiled out. Common code should not access it in that case. Unfortunately, we can't use CONFIG_XEN_PCI_PASSTHROUGH directly in xen-common.c so this patch instead

Re: [PATCH] pci: check address before reading configuration bytes

2020-06-03 Thread Daniel P . Berrangé
On Wed, Jun 03, 2020 at 06:10:41PM +0530, P J P wrote: > From: Prasad J Pandit > > While reading PCI configuration bytes, a guest may send an > address towards the end of the configuration space. It may lead > to an OOB access issue. Add check to ensure 'address + len' is > within PCI

Re: [PATCH v4] icount: make dma reads deterministic

2020-06-03 Thread Kevin Wolf
Am 03.06.2020 um 12:22 hat Pavel Dovgalyuk geschrieben: > From: Pavel Dovgalyuk > > Windows guest sometimes makes DMA requests with overlapping > target addresses. This leads to the following structure of iov for > the block driver: > > addr size1 > addr size2 > addr size3 > > It means that

Re: [PATCH 1/2] Introduce (x86) CPU model deprecation API

2020-06-03 Thread Eric Blake
On 6/3/20 6:47 AM, Robert Hoo wrote: Complement versioned CPU model framework with the ability of marking some versions deprecated. When that CPU model is chosen, get some warning. The warning message is customized, e.g. telling in which future QEMU version will it be obsoleted. The deprecation

Re: [PATCH] util/oslib-posix : qemu_init_exec_dir implementation for MacOS

2020-06-03 Thread Philippe Mathieu-Daudé
On 6/3/20 4:22 PM, David CARLIER wrote: > Good point even tough the libproc api is here in this form since quite a time. Top-posting is difficult to read on technical lists; it's better to reply inline. Also, please don't remove the post content you are replying to... Because then your answer

[PATCH 1/1] block: propagate discard alignment from format drivers to the guest

2020-06-03 Thread Denis V. Lunev
Nowaday SCSI drivers in guests are able to align UNMAP requests before sending to the device. Right now QEMU provides an ability to set this via "discard_granularity" property of the block device which could be used by management layer. Though, in particular, from the point of QEMU, there is

[PATCH v3 00/20] virtio-mem: Paravirtualized memory hot(un)plug

2020-06-03 Thread David Hildenbrand
This is the very basic, initial version of virtio-mem. More info on virtio-mem in general can be found in the Linux kernel driver v2 posting [1] and in patch #10. The latest Linux driver v4 can be found at [2]. This series is based on [3]: "[PATCH v1] pc: Support coldplugging of

[PATCH v3 06/20] target/i386: sev: Use ram_block_discard_disable()

2020-06-03 Thread David Hildenbrand
AMD SEV will pin all guest memory, mark discarding of RAM broken. At the time this is called, we cannot have anyone active that relies on discards to work properly - let's still implement error handling. Reviewed-by: Dr. David Alan Gilbert Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard

[PATCH v3 12/20] MAINTAINERS: Add myself as virtio-mem maintainer

2020-06-03 Thread David Hildenbrand
Let's make sure patches/bug reports find the right person. Reviewed-by: Dr. David Alan Gilbert Cc: "Michael S. Tsirkin" Cc: Peter Maydell Cc: Markus Armbruster Signed-off-by: David Hildenbrand --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS

[PATCH v3 02/20] vfio: Convert to ram_block_discard_disable()

2020-06-03 Thread David Hildenbrand
VFIO is (except devices without a physical IOMMU or some mediated devices) incompatible with discarding of RAM. The kernel will pin basically all VM memory. Let's convert to ram_block_discard_disable(), which can now fail, in contrast to qemu_balloon_inhibit(). Leave "x-balloon-allowed" named as

[PATCH v3 18/20] virtio-mem: Migration sanity checks

2020-06-03 Thread David Hildenbrand
We want to make sure that certain properties don't change during migration, especially to catch user errors in a nice way. Let's migrate a temporary structure and validate that the properties didn't change. Cc: "Michael S. Tsirkin" Cc: "Dr. David Alan Gilbert" Signed-off-by: David Hildenbrand

RE: [Question] Regarding containers "unattached/peripheral/anonymous" - their relation with hot(un)plug of devices

2020-06-03 Thread Salil Mehta
Hi Igor, My sincere Apologies, I just realized that I missed to reply this mail. I was distracted to something else in the month of the February and had only resumed working on hotplug in march. But will still reply to this mail. Also, I have incorporated most of the below points as in the vcpu

Re: [PATCH v1 8/9] plugins: new hwprofile plugin

2020-06-03 Thread Robert Foley
On Wed, 3 Jun 2020 at 07:43, Alex Bennée wrote: > > > Robert Foley writes: > > > > > When testing out the options, I noticed that > > if we supply arguments of "read", and "write", then we will only get > > the last one set, "write", since rw gets overwritten. > > One option would be to error

Re: [PATCH v1 09/12] tests/docker: Added docker build support for TSan.

2020-06-03 Thread Robert Foley
On Tue, 2 Jun 2020 at 16:21, Alex Bennée wrote: > > > Robert Foley writes: > > > > configure_qemu() > > { > > +if test -z "$TSAN"; then > > +requires clang tsan > > +echo "Including TSan Support" > > +tsan_log_dir="/tmp/qemu-test/build/tsan" > > +mkdir -p

Re: [PATCH] tcg: Sanitize shift constants on ppc64le so that shift operations with large constants don't generate invalid instructions.

2020-06-03 Thread Richard Henderson
On 6/2/20 11:43 PM, Philippe Mathieu-Daudé wrote: > > Hi Catherine, > > On 6/3/20 7:23 AM, agrecascino...@gmail.com wrote: >> From: "Catherine A. Frederick" >> >> Signed-off-by: "Catherine A. Frederick" >> --- >> tcg/ppc/tcg-target.inc.c | 4 >> 1 file changed, 4 insertions(+) >> >> diff

Re: [PATCH 2/3] target/unicore32: Replace DPRINTF() by qemu_log_mask(GUEST_ERROR)

2020-06-03 Thread Richard Henderson
On 6/3/20 5:37 AM, Philippe Mathieu-Daudé wrote: > Replace disabled DPRINTF() by qemu_log_mask(GUEST_ERROR). > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/unicore32/helper.c | 11 +++ > 1 file changed, 7 insertions(+), 4 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PULL 04/12] hmp: Simplify qom-set

2020-06-03 Thread David Hildenbrand
On 03.06.20 14:26, David Hildenbrand wrote: > On 03.06.20 14:24, Dr. David Alan Gilbert wrote: >> * David Hildenbrand (da...@redhat.com) wrote: >>> On 03.06.20 13:43, Dr. David Alan Gilbert wrote: * David Hildenbrand (da...@redhat.com) wrote: > On 03.06.20 12:43, Dr. David Alan Gilbert

Re: another tst-arm-mte bug: qemu-system segfaults

2020-06-03 Thread Szabolcs Nagy
The 06/02/2020 14:58, Richard Henderson wrote: > On 5/29/20 5:04 AM, Szabolcs Nagy wrote: > > again i'm using the branch at > > > > https://github.com/rth7680/qemu/tree/tgt-arm-mte > > > > to test armv8.5-a mte, now qemu-system-aarch64 segfaults > > and it's easy to reproduce: minimal source and

Re: [PATCH] ati-vga: increment mm_index in ati_mm_read/write

2020-06-03 Thread P J P
+-- On Wed, 3 Jun 2020, Gerd Hoffmann wrote --+ | Hmm, why modify mm_index? Shouldn't we just check it is non-zero | before calling ati_mm_read/ati_mm_write? if (s->regs.mm_index & BIT(31)) { ... } else { ati_mm_write(s, s->regs.mm_index + addr - MM_DATA, data, size); } Exit

Re: [PATCH] util/oslib-posix : qemu_init_exec_dir implementation for MacOS

2020-06-03 Thread Philippe Mathieu-Daudé
On 6/3/20 4:09 PM, Justin Hibbits wrote: > On Wed, 3 Jun 2020 08:08:42 +0200 > Philippe Mathieu-Daudé wrote: > >> Cc'ing more developers. >> >> On 5/26/20 10:40 PM, David CARLIER wrote: >>> From b24a6702beb2a4e2a9c1c03b69c6d1dd07d4cf08 Mon Sep 17 00:00:00 >>> 2001 From: David Carlier >>> Date:

Re: [Question] Regarding PMU initialization within the QEMU for ARM VCPUs

2020-06-03 Thread Andrew Jones
On Wed, Jun 03, 2020 at 01:48:10PM +, Salil Mehta wrote: > (Maybe I should float the ARM VCPU Hotplug patches and let this > discussion be held over there?) > Yes, I think that would be best. Keep in mind that the 'pmu' CPU property is just one CPU property that we require all CPUs to have,

Re: [PATCH 4/5] linux-user: Add strace support for printing arguments of chown()/lchown()

2020-06-03 Thread Laurent Vivier
Le 02/06/2020 à 13:53, Filip Bozuta a écrit : > From: Filip Bozuta > > This patch implements strace argument printing functionality for syscalls: > > *chown, lchown - change ownership of a file > > int chown(const char *pathname, uid_t owner, gid_t group) > int lchown(const

Re: [PATCH 2/5] vhost: involve device backends in feature negotiation

2020-06-03 Thread Stefan Hajnoczi
On Fri, May 29, 2020 at 03:29:13PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > On Fri, May 29, 2020 at 03:04:54PM +0800, Jason Wang wrote: > > > > > > On 2020/5/23 上午1:17, Stefan Hajnoczi wrote: > > > > Many vhost devices in QEMU currently do not

Re: [PATCH 5/5] linux-user: Add strace support for printing arguments of fallocate()

2020-06-03 Thread Laurent Vivier
Le 02/06/2020 à 13:53, Filip Bozuta a écrit : > From: Filip Bozuta > > This patch implements strace argument printing functionality for following > syscall: > > *fallocate - manipulate file space > > int fallocate(int fd, int mode, off_t offset, off_t len) > man page:

[PATCH v2 0/2] sd: sdhci: Implement basic vendor specific register support

2020-06-03 Thread Guenter Roeck
The Linux kernel's IMX code now uses vendor specific commands. This results in endless warnings when booting the Linux kernel. sdhci-esdhc-imx 2194000.usdhc: esdhc_wait_for_card_clock_gate_off: card clock still not gate off in 100us!. Implement support for the vendor specific command

[PATCH v3 10/20] virtio-mem: Paravirtualized memory hot(un)plug

2020-06-03 Thread David Hildenbrand
This is the very basic/initial version of virtio-mem. An introduction to virtio-mem can be found in the Linux kernel driver [1]. While it can be used in the current state for hotplug of a smaller amount of memory, it will heavily benefit from resizeable memory regions in the future. Each

Re: [RFC PATCH 2/2] linux-user/mmap: Fix Clang 'type-limit-compare' warning

2020-06-03 Thread Eric Blake
On 5/3/20 6:32 AM, Philippe Mathieu-Daudé wrote: When building with Clang 10 on Fedora 32, we get: CC linux-user/mmap.o linux-user/mmap.c:720:49: error: result of comparison 'unsigned long' > 18446744073709551615 is always false [-Werror,-Wtautological-type-limit-compare]

RE: [PATCH v3] xen: fix build without pci passthrough

2020-06-03 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD > Sent: 03 June 2020 17:05 > To: qemu-devel@nongnu.org > Cc: Anthony PERARD ; Roger Pau Monne > ; Michael S. > Tsirkin ; Marcel Apfelbaum ; > Paolo Bonzini > ; Richard Henderson ; Eduardo Habkost > ; > Stefano Stabellini ; Paul Durrant ; xen-

Re: [PATCH v2 2/2] pci: ensure configuration access is within bounds

2020-06-03 Thread BALATON Zoltan
On Thu, 4 Jun 2020, P J P wrote: From: Prasad J Pandit While reading PCI configuration bytes, a guest may send an address towards the end of the configuration space. It may lead to an OOB access issue. Assert that 'address + len' is within PCI configuration space. Suggested-by: Philippe

[PATCH 1/2] lockable: use QLNULL for a null lockable

2020-06-03 Thread Joe Slater
Allows us to build with -Og and optimizations that do not clean up dead-code. Signed-off-by: Joe Slater to be squished Signed-off-by: Joe Slater --- block/block-backend.c | 4 ++-- block/block-copy.c | 2 +- block/mirror.c | 5 +++--

[PATCH 0/2] Use QLNULL for null lockable

2020-06-03 Thread Joe Slater
We currently will fail to build for optimizations like -Og because they do not eliminate dead code. We do not need such clean up if we use QLNULL. There is no need to produce a QemuLockable that will be thrown away. Only testing: $ ../configure $ make -j16 CFLAGS="$CFLAGS" # which I set

Re: [PATCH] tests: fix a memory in test_socket_unix_abstract_good

2020-06-03 Thread xiaoqiang zhao
在 2020/6/4 上午12:14, Li Qiang 写道: After build qemu with '-fsanitize=address' extra-cflags, 'make check' show following leak: = ==44580==ERROR: LeakSanitizer: detected memory leaks Direct leak of 2500 byte(s) in 1 object(s)

[PATCH v2 0/2] Ensure PCI configuration access is within bounds

2020-06-03 Thread P J P
From: Prasad J Pandit Hello, This patch series fixes 1. While reading PCI configuration bytes, a guest may send an address towards the end of the configuration space. It may lead to an OOB access issue. Add check to ensure 'addr + size' is within bounds. 2. Assert that PCI configuration

<    1   2   3   >