[Qemu-devel] [PATCH v3] xen/pt: allow passthrough of devices with bogus interrupt pin

2018-12-03 Thread Zhao Yan
For some pci device, even its PCI_INTERRUPT_PIN is not 0, it actually doesn't support INTx mode, so its machine irq read from host sysfs is 0. In that case, report PCI_INTERRUPT_PIN as 0 to guest and let passthrough continue. Cc: Roger Pau Monné Cc: Jan Beulich Signed-off-by: Zhao Yan --- v2:

Re: [Qemu-devel] [Xen-devel] [PATCH v2] xen/pt: Fix a xen passthrough failure

2018-12-03 Thread Zhao Yan
hi Andrew, It's a pci device that does not support legacy intx mode, but it accidently reports PCI_INTERRUPT_PIN as 1, which should be 0 instead. So, in dom0, the machine irq is 0, which will cause later xc_physdev_map_pirq() fail and passthrough failure. Therefore, we treat this case as PCI_INTE

Re: [Qemu-devel] [PATCH v2 1/3] qapi: Turn ShutdownCause into QAPI enum

2018-12-03 Thread Dominik Csapak
On 12/3/18 10:34 PM, Eric Blake wrote: On 12/3/18 3:26 AM, Dominik Csapak wrote: Needed so the patch after next can add ShutdownCause to QMP events SHUTDOWN and RESET. Signed-off-by: Dominik Csapak ---   include/sysemu/sysemu.h | 20   qapi/run-state.json | 34 +

Re: [Qemu-devel] [PATCH v2 2/3] qapi: Add reason to SHUTDOWN and RESET events

2018-12-03 Thread Dominik Csapak
On 12/3/18 10:36 PM, Eric Blake wrote: On 12/3/18 3:26 AM, Dominik Csapak wrote: This makes it possible to determine what the exact reason was for a RESET or a SHUTDOWN. A management layer might need the specific reason of those events to determine which cleanups or other actions it needs to do

Re: [Qemu-devel] [PATCH V5_resend 7/7] hostmem-file: add 'sync' option

2018-12-03 Thread Yi Zhang
On 2018-11-26 at 03:46:50 -0500, Pankaj Gupta wrote: > > > > > This option controls whether QEMU mmap(2) the memory backend file with > > MAP_SYNC flag, which can fully guarantee the guest write persistence > > Not sure 'persistence' is the right word here. I think it should be > something like

Re: [Qemu-devel] [PATCH v2 3/3] qapi: Split host-qmp into quit and system-reset

2018-12-03 Thread Dominik Csapak
On 12/3/18 10:38 PM, Eric Blake wrote: On 12/3/18 3:26 AM, Dominik Csapak wrote: It is interesting to know whether the shutdown cause was 'quit' or 'reset', especially when using "--no-reboot". In that case, a management layer can now determine if the guest wanted a reboot or shutdown, and can a

Re: [Qemu-devel] [PATCH V5_resend 3/7] exec: switch qemu_ram_alloc_from_{file, fd} to the 'flags' parameter

2018-12-03 Thread Yi Zhang
On 2018-11-29 at 04:11:11 -0500, Pankaj Gupta wrote: > > > > > As more flag parameters besides the existing 'share' are going to be > > added to qemu_ram_alloc_from_{file,fd}(), let's swith 'share' to a > > 'flags' parameters in advance, so as to ease the further additions. > > > > Signed-off-by

Re: [Qemu-devel] [PATCH RFC v7 5/9] migration: fix the multifd code when sending less channels

2018-12-03 Thread Fei Li
Hi Juan, Kindly ping again. :) Have a nice day, thanks Fei On 11/12/2018 12:43 PM, Fei Li wrote: Hi Juan, Kindly ping, as this multifd migration topic needs your suggestions. :) Have a nice day, thanks Fei On 11/03/2018 12:33 AM, Dr. David Alan Gilbert wrote: * Peter Xu (pet...@redhat.com)

Re: [Qemu-devel] [PATCH v2] xen/pt: Fix a xen passthrough failure

2018-12-03 Thread Zhao Yan
On Mon, Dec 03, 2018 at 12:20:30PM +0100, Roger Pau Monné wrote: > Hello, > > Thanks for the patch. > > The subject should be more descriptive, "Fix a xen passthrough > failure" is too generic. How about: "allow passthrough of devices with > bogus interrupt pin" or something similar. right, thank

Re: [Qemu-devel] [PATCH V5 for 3.1 5/5] virtio-net-test: add large tx buffer test

2018-12-03 Thread Thomas Huth
On 2018-12-04 04:53, Jason Wang wrote: > This test tries to build a packet whose size is greater than INT_MAX > which tries to trigger integer overflow in qemu_net_queue_append_iov() > which may result OOB. > > Signed-off-by: Jason Wang > --- > tests/virtio-net-test.c | 46 ++

Re: [Qemu-devel] [PATCH V5 for 3.1 2/5] net: hub: suppress warnings of no host network for qtest

2018-12-03 Thread Thomas Huth
On 2018-12-04 04:53, Jason Wang wrote: > If we want to qtest through hub, it would be much more simpler and > safer to configure the hub without host network. So silent this > warnings for qtest. > > Signed-off-by: Jason Wang > --- > net/hub.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deleti

Re: [Qemu-devel] [PATCH V5 for 3.1 1/5] net: drop too large packet early

2018-12-03 Thread Thomas Huth
On 2018-12-04 04:53, Jason Wang wrote: > We try to detect and drop too large packet (>INT_MAX) in 1592a9947036 > ("net: ignore packet size greater than INT_MAX") during packet > delivering. Unfortunately, this is not sufficient as we may hit > another integer overflow when trying to queue such larg

Re: [Qemu-devel] [PATCH v2 2/3] qapi: Add reason to SHUTDOWN and RESET events

2018-12-03 Thread Markus Armbruster
Eric Blake writes: > On 12/3/18 6:26 AM, Markus Armbruster wrote: >> Dominik Csapak writes: >> >>> This makes it possible to determine what the exact reason was for >>> a RESET or a SHUTDOWN. A management layer might need the specific reason >>> of those events to determine which cleanups or oth

Re: [Qemu-devel] [RFC 1/5] virtio-balloon: Remove unnecessary MADV_WILLNEED on deflate

2018-12-03 Thread David Gibson
On Mon, Oct 15, 2018 at 06:43:06AM -0400, Michael S. Tsirkin wrote: > On Mon, Oct 15, 2018 at 08:54:27AM +0200, David Hildenbrand wrote: > > On 12/10/2018 20:05, Michael S. Tsirkin wrote: > > > On Fri, Oct 12, 2018 at 02:24:27PM +1100, David Gibson wrote: > > >> When the balloon is inflated, we dis

[Qemu-devel] [PATCH V5 for 3.1 5/5] virtio-net-test: add large tx buffer test

2018-12-03 Thread Jason Wang
This test tries to build a packet whose size is greater than INT_MAX which tries to trigger integer overflow in qemu_net_queue_append_iov() which may result OOB. Signed-off-by: Jason Wang --- tests/virtio-net-test.c | 46 + 1 file changed, 46 insertions(+)

Re: [Qemu-devel] [PATCH for-next 0/6] qemu-img: Add salvaging mode to convert

2018-12-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20181203175211.8230-1-mre...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH for-next 0/6] qemu-img: Add salvaging mode to convert Message-id: 20181203175211.8230-1-

[Qemu-devel] [PATCH V5 for 3.1 3/5] virtio-net-test: accept variable length argument in pci_test_start()

2018-12-03 Thread Jason Wang
This allows flexibility to be reused for all kinds of command line used by other tests. Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- tests/virtio-net-test.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/virtio-net

[Qemu-devel] [PATCH V5 for 3.1 2/5] net: hub: suppress warnings of no host network for qtest

2018-12-03 Thread Jason Wang
If we want to qtest through hub, it would be much more simpler and safer to configure the hub without host network. So silent this warnings for qtest. Signed-off-by: Jason Wang --- net/hub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/hub.c b/net/hub.c index 78b671e

[Qemu-devel] [PATCH V5 for 3.1 1/5] net: drop too large packet early

2018-12-03 Thread Jason Wang
We try to detect and drop too large packet (>INT_MAX) in 1592a9947036 ("net: ignore packet size greater than INT_MAX") during packet delivering. Unfortunately, this is not sufficient as we may hit another integer overflow when trying to queue such large packet in qemu_net_queue_append_iov(): - siz

[Qemu-devel] [PATCH V5 for 3.1 4/5] virtio-net-test: remove unused macro

2018-12-03 Thread Jason Wang
Reviewed-by: Thomas Huth Reviewed-by: Eric Blake Signed-off-by: Jason Wang --- tests/virtio-net-test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/virtio-net-test.c b/tests/virtio-net-test.c index 587a043e67..bdd6af 100644 --- a/tests/virtio-net-test.c +++ b/tests/virtio-net-te

[Qemu-devel] [PATCH V5 for 3.1 0/5] Fix possible OOB during queuing packets

2018-12-03 Thread Jason Wang
Hi: This series tries to fix a possible OOB during queueing packets through qemu_net_queue_append_iov(). This could happen when it tries to queue a packet whose size is larger than INT_MAX which may lead integer overflow. We've fixed similar issue in the past during qemu_net_queue_deliver_iov() by

Re: [Qemu-devel] [PATCH for-4.0 0/7] Assume GCC v4.8 and Clang v3.4 as minimum compiler versions

2018-12-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1543845937-300-1-git-send-email-th...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEG

Re: [Qemu-devel] [PATCH V4 for 3.1 1/4] net: drop too large packet early

2018-12-03 Thread Jason Wang
On 2018/12/4 上午2:13, Thomas Huth wrote: On 2018-12-03 11:06, Jason Wang wrote: We try to detect and drop too large packet (>INT_MAX) in 1592a9947036 ("net: ignore packet size greater than INT_MAX") during packet delivering. Unfortunately, this is not sufficient as we may hit another integer ov

Re: [Qemu-devel] [PATCH V4 for 3.1 4/4] virtio-net-test: add large tx buffer test

2018-12-03 Thread Jason Wang
On 2018/12/4 上午12:46, Eric Blake wrote: On 12/3/18 4:06 AM, Jason Wang wrote: This test tries to build a packet whose size is greater than INT_MAX which tries to trigger integer overflow in qemu_net_queue_append_iov() which may result OOB. Can you also add a packet just slightly larger than

Re: [Qemu-devel] [PATCH V4 for 3.1 1/4] net: drop too large packet early

2018-12-03 Thread Jason Wang
On 2018/12/4 上午12:18, Eric Blake wrote: On 12/3/18 4:06 AM, Jason Wang wrote: We try to detect and drop too large packet (>INT_MAX) in 1592a9947036 ("net: ignore packet size greater than INT_MAX") during packet delivering. Unfortunately, this is not sufficient as we may hit another integer ove

Re: [Qemu-devel] [PATCH V4 for 3.1 0/4] Fix possible OOB during queuing packets

2018-12-03 Thread Jason Wang
On 2018/12/4 上午12:18, Peter Maydell wrote: On Mon, 3 Dec 2018 at 10:06, Jason Wang wrote: Hi: This series tries to fix a possible OOB during queueing packets through qemu_net_queue_append_iov(). This could happen when it tries to queue a packet whose size is larger than INT_MAX which may lea

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

2018-12-03 Thread David Gibson
On Mon, Dec 03, 2018 at 05:49:37PM +0100, Cédric Le Goater wrote: > +} > + > +switch (qsize) { > +case 12: > +case 16: > +case 21: > +case 24: > +end.w3 = ((uint64_t)qpage) & 0x; > >>

Re: [Qemu-devel] [PATCH v5 08/36] ppc/xive: introduce a simplified XIVE presenter

2018-12-03 Thread David Gibson
On Mon, Dec 03, 2018 at 06:05:12PM +0100, Cédric Le Goater wrote: > I forgot to reply to this one. > > On 11/29/18 1:47 AM, David Gibson wrote: > > On Wed, Nov 28, 2018 at 11:59:58AM +0100, Cédric Le Goater wrote: > >> On 11/28/18 12:49 AM, David Gibson wrote: > >>> On Fri, Nov 16, 2018 at 11:57:0

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

2018-12-03 Thread David Gibson
On Mon, Dec 03, 2018 at 04:52:46PM +0100, Cédric Le Goater wrote: > On 11/29/18 5:36 PM, Cédric Le Goater wrote: > > On 11/29/18 5:09 AM, David Gibson wrote: > >> On Fri, Nov 16, 2018 at 11:57:20AM +0100, Cédric Le Goater wrote: > >>> This will be used to remove the MMIO regions of the POWER9 XIVE

Re: [Qemu-devel] [PATCH v2 0/2] Cleanup and locality range check

2018-12-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20181203170105.2367492-1-stef...@linux.vnet.ibm.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v2 0/2] Cleanup and locality range check Message-id: 20181203170105.2367492-

Re: [Qemu-devel] [PATCH for-4.0 v3 3/4] i386: import bootparam.h

2018-12-03 Thread Michael S. Tsirkin
On Mon, Dec 03, 2018 at 10:48:51PM +0800, Li Zhijian wrote: > It provides setup_data struct and header fields > > CC: Michael S. Tsirkin > Signed-off-by: Li Zhijian Sorry I was unclear when I said "import it from Linux". The way to import it is to copy the header from the linux kernel by addi

Re: [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support

2018-12-03 Thread peng.hao2
>On Mon, 3 Dec 2018 at 11:04, Peng Hao wrote: >> >> The first patches are simple cleanups: >> - patch 1 move the pvpanic device with the 'ocmmon objects' so we >> compile >>it once for the x86/arm/aarch64 archs, >> - patch 2 simply renames ISA fields/definitions to gener

[Qemu-devel] [PATCH for 3.1? or 4 v4 1/1] qemu-iotests: Don't run the test when user is root

2018-12-03 Thread Farhan Ali
Test 232 creates image files with read-only permission and expects an error message when trying to access the image files with read-only and auto-read-only turned off. Don't run as root user, since root can open files with read/write access for read-only files. Signed-off-by: Farhan Ali Reviewed

Re: [Qemu-devel] [for-4.0 PATCH v2 8/9] q35/440fx/arm/spapr: Add QEMU 4.0 machine type

2018-12-03 Thread David Gibson
On Mon, Dec 03, 2018 at 09:28:36AM -0700, Alex Williamson wrote: > Including all machine types that might have a pcie-root-port. > > Cc: Peter Maydell > Cc: Michael S. Tsirkin > Cc: Marcel Apfelbaum > Cc: Paolo Bonzini > Cc: Richard Henderson > Cc: Eduardo Habkost > Cc: David Gibson > Signe

[Qemu-devel] [Bug 1806114] Re: Reading sectors from floppy with BIOS INT 13h is broken

2018-12-03 Thread Jacek Wieczorek
I see. That wasn't much of a problem, but thank you for the information. I'll try to keep it in mind when building QEMU in future. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1806114 Title: Readi

[Qemu-devel] [Bug 1806114] Re: Reading sectors from floppy with BIOS INT 13h is broken

2018-12-03 Thread Peter Maydell
The memfd_create() compilation failure is a bug in older QEMU versions that was only revealed by a newer glibc version (ie old QEMU built OK with older glibc but fails with newer glibc). It's fixed in git in commit 75e5b70e6b5dcc4f221, so backporting that to the older versions you're trying to buil

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

2018-12-03 Thread Richard Henderson
On 12/3/18 4:19 PM, Peter Maydell wrote: > On Mon, 3 Dec 2018 at 20:45, Aaron Lindsay > wrote: >> >> On Nov 30 16:10, Peter Maydell wrote: >>> PMCEID2 and PMCEID3 are only defined from ARMv8.1; before that they >>> are UNDEFINED. So these registers need to be only defined if a >>> suitable featur

[Qemu-devel] [Bug 1806114] Re: Reading sectors from floppy with BIOS INT 13h is broken

2018-12-03 Thread Jacek Wieczorek
Alright, I managed to compile 2.5.0, 2.5.1 and 2.6.0 by simply making memfd_create() non-static. It turns out that 2.6.0 is the first version causing problems. I tested each of these with the provided SeaBIOS version and with SeaBIOS rel-1.7.4-0-g96917a8. -- You received this bug notification be

Re: [Qemu-devel] [PATCH for-4.0 0/5] tcg/i386: Improve guest_base handling

2018-12-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20181203160840.15115-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH for-4.0 0/5] tcg/i386: Improve guest_base handling Message-id: 2018120316084

[Qemu-devel] [Bug 1806114] Re: Reading sectors from floppy with BIOS INT 13h is broken

2018-12-03 Thread Jacek Wieczorek
I ran plenty of QEMU/SeaBIOS configurations and these are the results: Ubuntu 18.04: OK --> QEMU qemu-2.0.0 + SEABIOS rel-1.7.4-0-g96917a8 OK --> QEMU qemu-2.0.0 + SEABIOS 1.10.2-1ubuntu1 (default) BAD --> QEMU Debian 1:2.11+dfsg-1ubuntu7.8 (default) + SEABIOS 1.10.2-1ub

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

2018-12-03 Thread Peter Maydell
On Mon, 3 Dec 2018 at 20:45, Aaron Lindsay wrote: > > On Nov 30 16:10, Peter Maydell wrote: > > PMCEID2 and PMCEID3 are only defined from ARMv8.1; before that they > > are UNDEFINED. So these registers need to be only defined if a > > suitable feature bit or ID register field check passes. > > It

Re: [Qemu-devel] [PATCH v2 3/3] qapi: Split host-qmp into quit and system-reset

2018-12-03 Thread Eric Blake
On 12/3/18 3:26 AM, Dominik Csapak wrote: It is interesting to know whether the shutdown cause was 'quit' or 'reset', especially when using "--no-reboot". In that case, a management layer can now determine if the guest wanted a reboot or shutdown, and can act accordingly. Changes the ouput of th

Re: [Qemu-devel] [PATCH v2 2/3] qapi: Add reason to SHUTDOWN and RESET events

2018-12-03 Thread Eric Blake
On 12/3/18 3:26 AM, Dominik Csapak wrote: This makes it possible to determine what the exact reason was for a RESET or a SHUTDOWN. A management layer might need the specific reason of those events to determine which cleanups or other actions it needs to do. This patch also fixes the iotests to i

Re: [Qemu-devel] [PATCH v2 1/3] qapi: Turn ShutdownCause into QAPI enum

2018-12-03 Thread Eric Blake
On 12/3/18 3:26 AM, Dominik Csapak wrote: Needed so the patch after next can add ShutdownCause to QMP events SHUTDOWN and RESET. Signed-off-by: Dominik Csapak --- include/sysemu/sysemu.h | 20 qapi/run-state.json | 34 ++ 2 files chan

Re: [Qemu-devel] [PATCH v2 2/3] qapi: Add reason to SHUTDOWN and RESET events

2018-12-03 Thread Eric Blake
On 12/3/18 6:26 AM, Markus Armbruster wrote: Dominik Csapak writes: This makes it possible to determine what the exact reason was for a RESET or a SHUTDOWN. A management layer might need the specific reason of those events to determine which cleanups or other actions it needs to do. This patc

Re: [Qemu-devel] [PATCH v3 15/16] hw/i2c/smbus_eeprom: Create at most SMBUS_EEPROM_MAX EEPROMs on a SMBus

2018-12-03 Thread Corey Minyard
On 12/1/18 11:43 AM, Philippe Mathieu-Daudé wrote: On 1/12/18 12:57, Peter Maydell wrote: On Fri, 30 Nov 2018 at 20:47, Corey Minyard wrote: On 11/30/18 11:39 AM, Peter Maydell wrote: On Mon, 26 Nov 2018 at 20:04, wrote: From: Philippe Mathieu-Daudé /* XXX: make this persistent */

Re: [Qemu-devel] [PATCH 01/71] vhost-net: move stubs to a separate file

2018-12-03 Thread Eric Blake
On 12/3/18 9:32 AM, Paolo Bonzini wrote: There is no reason for CONFIG_VHOST_NET to be specific to a single target; it is a host feature that can be add to all targets, as long as they support s/add/added/ the virtio-net device. Currently CONFIG_VHOST_NET depends on CONFIG_KVM, but ioeventfd

Re: [Qemu-devel] [PATCH] apic: Make APIC ID limit error message clearer

2018-12-03 Thread Wainer dos Santos Moschetta
On 11/26/2018 08:56 PM, Eduardo Habkost wrote: Remove the "apic initialization failed" prefix (it conveys no useful information), replace "invalid" with "too large", and add an error hint with two possible solutions for the problem. Before: $ qemu-system-x86_64 -machine q35 -smp 256 qem

Re: [Qemu-devel] [PATCH for-4.0 00/71] qtest: qgraph driver framework

2018-12-03 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1543851204-41186-1-git-send-email-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH for-4.0 00/71] qtest: qgraph driver framework Message-id: 1543851204-41186

[Qemu-devel] [PATCH v2 06/10] target/arm: Use arm_hcr_el2_eff more places

2018-12-03 Thread Richard Henderson
Since arm_hcr_el2_eff includes a check against arm_is_secure_below_el3, we can often remove a nearby check against secure state. In some cases, sort the call to arm_hcr_el2_eff to the end of a short-circuit logical sequence. Signed-off-by: Richard Henderson --- target/arm/helper.c| 22 +

[Qemu-devel] [PATCH v2 05/10] target/arm: Introduce arm_hcr_el2_eff

2018-12-03 Thread Richard Henderson
Replace arm_hcr_el2_{fmo,imo,amo} with a more general routine that also takes SCR_EL3.NS (aka arm_is_secure_below_el3) into account, as documented for the plethora of bits in HCR_EL2. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 67 +-- hw/

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

2018-12-03 Thread Aaron Lindsay
On Nov 30 16:10, Peter Maydell wrote: > On Tue, 20 Nov 2018 at 21:26, Aaron Lindsay > wrote: > > > > Signed-off-by: Aaron Lindsay > > --- > > target/arm/cpu.h| 4 ++-- > > target/arm/helper.c | 12 ++-- > > 2 files changed, 12 insertions(+), 4 deletions(-) > > > > diff --git a/targe

[Qemu-devel] [PATCH v2 10/10] target/arm: Implement the ARMv8.2-AA32HPD extension

2018-12-03 Thread Richard Henderson
The bulk of the work here, beyond base HPD, is defining the TTBCR2 register. In addition we must check TTBCR.T2E, which is not present (RES0) for AArch64. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h| 9 + target/arm/cpu.c| 4 target/a

[Qemu-devel] [PATCH v2 03/10] target/arm: Add SCR_EL3 bits up to ARMv8.5

2018-12-03 Thread Richard Henderson
Post v8.4 bits taken from SysReg_v85_xml-00bet8. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 79d58978f7..20d97b66de 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1302,6

[Qemu-devel] [PATCH v2 07/10] target/arm: Tidy scr_write

2018-12-03 Thread Richard Henderson
Because EL3 has a fixed execution mode, we can properly decide which of the bits are RES{0,1}. Signed-off-by: Richard Henderson --- target/arm/cpu.h| 2 -- target/arm/helper.c | 14 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/c

[Qemu-devel] [PATCH v2 08/10] target/arm: Implement the ARMv8.1-LOR extension

2018-12-03 Thread Richard Henderson
Provide a trivial implementation with zero limited ordering regions, which causes the LDLAR and STLLR instructions to devolve into the LDAR and STLR instructions from the base ARMv8.0 instruction set. Signed-off-by: Richard Henderson --- v2: Mark LORID_EL1 read-only. Add TLOR access checks.

[Qemu-devel] [PATCH v2 01/10] target/arm: Move id_aa64mmfr* to ARMISARegisters

2018-12-03 Thread Richard Henderson
At the same time, define the fields for these registers, and use those defines in arm_pamax(). Signed-off-by: Richard Henderson v2: Include the v8.5 fields; init the registers for kvm. Upcase all of the field names. --- target/arm/cpu.h | 26 -- target/arm

[Qemu-devel] [PATCH v2 00/10] target/arm: LOR, HPD, AA32HPD

2018-12-03 Thread Richard Henderson
Three relatively simple post-8.0 extensions. Changes since v1: * Add TLOR access checks for LOR registers. * Clean up access to HCR_EL2. * Clean up setting of SCR_EL3. * Other changes as noted within each patch. r~ Richard Henderson (10): target/arm: Move id_aa64mmfr* to ARMISARegist

[Qemu-devel] [PATCH v2 09/10] target/arm: Implement the ARMv8.1-HPD extension

2018-12-03 Thread Richard Henderson
Since the TCR_*.HPD bits were RES0 in ARMv8.0, we can simply interpret the bits as if ARMv8.1-HPD is present without checking. We will need a slightly different check for hpd for aarch32. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu64.c | 1 + target/arm/help

[Qemu-devel] [PATCH v2 04/10] target/arm: Fix HCR_EL2.TGE check in arm_phys_excp_target_el

2018-12-03 Thread Richard Henderson
The enable for TGE has already occurred within arm_hcr_el2_amo and friends. Moreover, when E2H is also set, the sense is supposed to be reversed, which has also already occurred within the helpers. Signed-off-by: Richard Henderson --- target/arm/helper.c | 3 --- 1 file changed, 3 deletions(-)

[Qemu-devel] [PATCH v2 02/10] target/arm: Add HCR_EL2 bits up to ARMv8.5

2018-12-03 Thread Richard Henderson
Post v8.3 bits taken from SysReg_v85_xml-00bet8. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 656a96a8f8..79d58978f7 100644 --- a/target/arm/cpu.h +++ b/t

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

2018-12-03 Thread Aaron Lindsay
On Nov 30 16:14, Peter Maydell wrote: > On Tue, 20 Nov 2018 at 21:26, Aaron Lindsay > wrote: > > diff --git a/target/arm/cpu.h b/target/arm/cpu.h > > index 50de58e4a2..32c3397948 100644 > > --- a/target/arm/cpu.h > > +++ b/target/arm/cpu.h > > @@ -993,6 +993,16 @@ void pmu_op_finish(CPUARMState *e

Re: [Qemu-devel] [PATCH] Acceptance test: add coverage tests for -smp option

2018-12-03 Thread Wainer dos Santos Moschetta
On 11/12/2018 02:31 PM, Eduardo Habkost wrote: On Fri, Nov 09, 2018 at 02:58:00PM -0500, Wainer dos Santos Moschetta wrote: This adds tests for SMP option, by passing -smp with various combinations of cpus, cores, threads, and sockets values it checks that invalid topologies are not accepted a

Re: [Qemu-devel] [PULL 1/2] usb-mtp: fix utf16_to_str

2018-12-03 Thread Eric Blake
On 12/3/18 1:50 PM, Gerd Hoffmann wrote: Make utf16_to_str return an allocated string. Remove the assumtion that s/assumtion/assumption/ (but probably too late to worry about commit typos in a pull request :) the number of string bytes equals the number of utf16 chars (which is only true f

Re: [Qemu-devel] QMP accepts double dict keys

2018-12-03 Thread Eric Blake
On 12/3/18 1:48 PM, Markus Armbruster wrote: Eric Blake writes: On 12/3/18 10:30 AM, Max Reitz wrote: Hi, QMP accepts double keys in dicts without complaining. The value it is using is apparently the last one specified: JSON says it is undefined what happens when a client passes double ke

[Qemu-devel] [PULL 2/2] usb-mtp: outlaw slashes in filenames

2018-12-03 Thread Gerd Hoffmann
Slash is unix directory separator, so they are not allowed in filenames. Note this also stops the classic escape via "../". Fixes: CVE-2018-16867 Reported-by: Michael Hanselmann Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-id: 20181203101045.27976-3-kra...@redhat.com

[Qemu-devel] [PULL 1/2] usb-mtp: fix utf16_to_str

2018-12-03 Thread Gerd Hoffmann
Make utf16_to_str return an allocated string. Remove the assumtion that the number of string bytes equals the number of utf16 chars (which is only true for ascii chars). Instead call wcstombs twice, once to figure the storage size and once for the actual conversion (as suggested by the wcstombs m

[Qemu-devel] [PULL 0/2] Fixes 31 20181203 patches

2018-12-03 Thread Gerd Hoffmann
The following changes since commit 039d4e3df0049bdd8f93a2de735a816483b13954: scsi: Address spurious clang warning (2018-11-27 23:56:12 +) are available in the git repository at: git://git.kraxel.org/qemu tags/fixes-31-20181203-pull-request for you to fetch changes up to

Re: [Qemu-devel] QMP accepts double dict keys

2018-12-03 Thread Markus Armbruster
Eric Blake writes: > On 12/3/18 10:30 AM, Max Reitz wrote: >> Hi, >> >> QMP accepts double keys in dicts without complaining. The value it is >> using is apparently the last one specified: > > JSON says it is undefined what happens when a client passes double > keys. We are probably best off if

Re: [Qemu-devel] [PULL 0/3] NBD patches for 3.1-rc4

2018-12-03 Thread Peter Maydell
On Mon, 3 Dec 2018 at 16:46, Eric Blake wrote: > > The following changes since commit 4750e1a888ac3d320607f33b676f299005be98e6: > > Update version for v3.1.0-rc3 release (2018-11-28 17:37:34 +) > > are available in the Git repository at: > > https://repo.or.cz/qemu/ericb.git tags/pull-nbd-

[Qemu-devel] [Bug 1806114] Re: Reading sectors from floppy with BIOS INT 13h is broken

2018-12-03 Thread John Snow
Hello! Thank you for your kindly and detailed report. Since this is via the INT 13h mechanism, the problem is likely in SeaBIOS. If I'm reading the version strings right, it looks like QEMU 2.0.0 QEMU 1.1.2 appear to be working correctly for you, but do you know what versions of the SeaBIOS firmw

Re: [Qemu-devel] [PATCH] docs: Update references to JSON RFC

2018-12-03 Thread Markus Armbruster
Eric Blake writes: > RFC8259 obsoletes RFC7159. Fix a couple of URLs to point to the > newer version. > > Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v2 2/2] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid

2018-12-03 Thread Marc-André Lureau
Hi On Mon, Dec 3, 2018 at 9:01 PM Stefan Berger wrote: > > Make sure that the new locality passed to tpm_tis_prep_abort() > is valid. This is merely a precaution since none of the current > callers passes an invalid locality number into this function. If this should never happen, then let's make

Re: [Qemu-devel] [qemu-web PATCH] Import historical documentation

2018-12-03 Thread Marc-André Lureau
Hi On Mon, Dec 3, 2018 at 9:23 PM Daniel P. Berrangé wrote: > > The files included are taken from formal builds of previous versions > of QEMU, going back to 2.0.0 > > - qemu-doc.html > - qemu-qmp-ref.html > - qemu-ga-ref.html > > To import them all content outside of is stripped and > rep

Re: [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support

2018-12-03 Thread Peter Maydell
On Mon, 3 Dec 2018 at 11:04, Peng Hao wrote: > > The first patches are simple cleanups: > - patch 1 move the pvpanic device with the 'ocmmon objects' so we compile >it once for the x86/arm/aarch64 archs, > - patch 2 simply renames ISA fields/definitions to generic ones. >

Re: [Qemu-devel] [PATCH v1 0/4] hw/arm: versal: Correct number of IRQs in GIC setup

2018-12-03 Thread Peter Maydell
On Thu, 29 Nov 2018 at 16:36, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > The Versal GIC has 192 IRQs not 256 as we previously had setup. > This series fixes the setup and moves the virtio-mmio nodes > to use other reserved interrupts. > > Since we don't have 32 reserved lines, we

Re: [Qemu-devel] [PATCH for-4.0 5/5] tcg/i386: Add setup_guest_base_seg for FreeBSD

2018-12-03 Thread Richard Henderson
On 12/3/18 11:01 AM, Kamil Rytarowski wrote: > On 03.12.2018 17:08, Richard Henderson wrote: >> Signed-off-by: Richard Henderson >> --- >> tcg/i386/tcg-target.inc.c | 9 + >> 1 file changed, 9 insertions(+) >> >> diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c >> index

Re: [Qemu-devel] [PATCH V4 for 3.1 2/4] virtio-net-test: accept variable length argument in pci_test_start()

2018-12-03 Thread Thomas Huth
On 2018-12-03 11:06, Jason Wang wrote: > This allows flexibility to be reused for all kinds of command line > used by other tests. > > Signed-off-by: Jason Wang > --- > tests/virtio-net-test.c | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH V4 for 3.1 1/4] net: drop too large packet early

2018-12-03 Thread Thomas Huth
On 2018-12-03 11:06, Jason Wang wrote: > We try to detect and drop too large packet (>INT_MAX) in 1592a9947036 > ("net: ignore packet size greater than INT_MAX") during packet > delivering. Unfortunately, this is not sufficient as we may hit > another integer overflow when trying to queue such larg

Re: [Qemu-devel] [PATCH for-3.1 v3 1/2] usb-mtp: fix utf16_to_str

2018-12-03 Thread Markus Armbruster
Gerd Hoffmann writes: > Make utf16_to_str return an allocated string. Remove the assumtion that > the number of string bytes equals the number of utf16 chars (which is > only true for ascii chars). Instead call wcstombs twice, once to figure > the storage size and once for the actual conversion

Re: [Qemu-devel] [PATCH 10/18] xen: add header and build dataplane/xen-qdisk.c

2018-12-03 Thread Anthony PERARD
On Wed, Nov 21, 2018 at 03:12:03PM +, Paul Durrant wrote: > This patch adds the transformations necessary to get dataplane/xen-qdisk.c > to build against the new XenBus/XenDevice framework. MAINTAINERS is also > updated due to the introduction of dataplane/xen-qdisk.h. > > NOTE: Existing data

[Qemu-devel] [PATCH for-next 6/6] iotests: Test qemu-img convert --salvage

2018-12-03 Thread Max Reitz
This test converts a simple image to another, but blkdebug injects block_status and read faults at some offsets. The resulting image should be the same as the input image, except that sectors that could not be read have to be 0. Signed-off-by: Max Reitz --- tests/qemu-iotests/236 | 164

[Qemu-devel] [PATCH for-next 2/6] qemu-img: Add salvaging mode to convert

2018-12-03 Thread Max Reitz
This adds a salvaging mode (--salvage) to qemu-img convert which ignores read errors and treats the respective areas as containing only zeroes. This can be used for instance to at least partially recover the data from terminally corrupted qcow2 images. Signed-off-by: Max Reitz --- qemu-img.c

[Qemu-devel] [PATCH for-next 4/6] blkdebug: Add "none" event

2018-12-03 Thread Max Reitz
Together with @iotypes and @sector, this can be used to trap e.g. the first read or write access to a certain sector without having to know what happens internally in the block layer, i.e. which "real" events happen right before such an access. Signed-off-by: Max Reitz --- qapi/block-core.json |

[Qemu-devel] [PATCH] docs: Update references to JSON RFC

2018-12-03 Thread Eric Blake
RFC8259 obsoletes RFC7159. Fix a couple of URLs to point to the newer version. Signed-off-by: Eric Blake --- docs/devel/qapi-code-gen.txt | 2 +- docs/interop/qmp-spec.txt| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-cod

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

2018-12-03 Thread Peter Maydell
On Thu, 29 Nov 2018 at 04:55, David Gibson wrote: > > On Fri, Nov 16, 2018 at 11:57:20AM +0100, Cédric Le Goater wrote: > > 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 > > Revie

[Qemu-devel] [PATCH for-next 3/6] blkdebug: Add @iotype error option

2018-12-03 Thread Max Reitz
This new error option allows users of blkdebug to inject errors only on certain kinds of I/O operations. Users usually want to make a very specific operation fail, not just any; but right now they simply hope that the event that triggers the error injection is followed up with that very operation.

[Qemu-devel] [PATCH for-next 0/6] qemu-img: Add salvaging mode to convert

2018-12-03 Thread Max Reitz
Hi, This series adds a --salvage option to qemu-img convert. With this, qemu-img will not abort when it encounters an I/O error. Instead, it tries to narrow it down and will treat the affected sectors as being completely 0 (and print a warning). Testing this is not so easy, because while real I

Re: [Qemu-devel] Hot-pluggable device without ->unrealize() is highly suspect

2018-12-03 Thread Markus Armbruster
Peter Maydell writes: > On Fri, 30 Nov 2018 at 07:40, Markus Armbruster wrote: >> Peter Maydell writes: >> > Add an assert somewhere and catch it with the usual >> > "instantiate everything" qtest? > >> The troublemaker is (3), where we may end up with an overridden >> realize-like method and a

[Qemu-devel] [PATCH for-next 5/6] blkdebug: Inject errors on .bdrv_co_block_status()

2018-12-03 Thread Max Reitz
Signed-off-by: Max Reitz --- qapi/block-core.json | 5 - block/blkdebug.c | 8 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 045206196b..bfe48f71f4 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -

Re: [Qemu-devel] [PULL 0/2] Block layer patches

2018-12-03 Thread Peter Maydell
On Mon, 3 Dec 2018 at 16:58, Kevin Wolf wrote: > > The following changes since commit 83ea23cd207a03c5736be0231acbf7f8b05dbf52: > > i386: hvf: Fix overrun of _decode_tbl1 (2018-12-03 15:09:55 +) > > are available in the Git repository at: > > git://repo.or.cz/qemu/kevin.git tags/for-upstre

[Qemu-devel] [PATCH for-next 1/6] qemu-img: Move quiet into ImgConvertState

2018-12-03 Thread Max Reitz
Move img_convert()'s quiet flag into the ImgConvertState so it is accessible by nested functions. -q dictates that it suppresses anything but errors, so if those functions want to emit warnings, they need to query this flag first. (There currently are no such warnings, but there will be as of the

[Qemu-devel] [PATCH v2 2/2] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid

2018-12-03 Thread Stefan Berger
Make sure that the new locality passed to tpm_tis_prep_abort() is valid. This is merely a precaution since none of the current callers passes an invalid locality number into this function. Add a comment to aborting_locty that it may be any locality, including TPM_TIS_NO_LOCALITY. Signed-off-by: S

Re: [Qemu-devel] [PATCH v2 0/2] mirror dead-lock

2018-12-03 Thread Eric Blake
On 12/3/18 8:26 AM, Max Reitz wrote: So because apparently there is going to be an rc4 anyway (like basically always...), I'd really like to bring this fix into it, unless there are any objections from anyone (though all of you are more than welcome to explicitly agree, too :-)). I agree with

Re: [Qemu-devel] [PATCH v5 08/36] ppc/xive: introduce a simplified XIVE presenter

2018-12-03 Thread Cédric Le Goater
I forgot to reply to this one. On 11/29/18 1:47 AM, David Gibson wrote: > On Wed, Nov 28, 2018 at 11:59:58AM +0100, Cédric Le Goater wrote: >> On 11/28/18 12:49 AM, David Gibson wrote: >>> On Fri, Nov 16, 2018 at 11:57:01AM +0100, Cédric Le Goater wrote: The last sub-engine of the XIVE archit

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

2018-12-03 Thread Stefan Berger
Remove the unused locty parameter from tpm_tis_abort() function. Signed-off-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé --- hw/tpm/tpm_tis.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index d9322692ee..176d424ed9 10064

[Qemu-devel] [PATCH v2] i386/kvm: expose HV_CPUID_ENLIGHTMENT_INFO.EAX and HV_CPUID_NESTED_FEATURES.EAX as feature words

2018-12-03 Thread Vitaly Kuznetsov
It was found that QMP users of QEMU (e.g. libvirt) may need HV_CPUID_ENLIGHTMENT_INFO.EAX/HV_CPUID_NESTED_FEATURES.EAX information. In particular, 'hv_tlbflush' and 'hv_evmcs' enlightenments are only exposed in HV_CPUID_ENLIGHTMENT_INFO.EAX. HV_CPUID_NESTED_FEATURES.EAX is exposed for two reasons:

[Qemu-devel] [PULL 0/2] Block layer patches

2018-12-03 Thread Kevin Wolf
The following changes since commit 83ea23cd207a03c5736be0231acbf7f8b05dbf52: i386: hvf: Fix overrun of _decode_tbl1 (2018-12-03 15:09:55 +) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch changes up to db5e8210adbafe9c6383d83643

[Qemu-devel] [PATCH v2 0/2] Cleanup and locality range check

2018-12-03 Thread Stefan Berger
This series of patches removes an unnecessary parameter from tpm_tis_abort() and adds a locality range check to tpm_tis_prep_abort(). Stefan Stefan Berger (2): tpm: Remove unused locty parameter from tpm_tis_abort() tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid hw/

Re: [Qemu-devel] [PATCH for-4.0 v3 3/4] i386: import bootparam.h

2018-12-03 Thread Richard Henderson
On 12/3/18 8:48 AM, Li Zhijian wrote: > #include "hw/net/ne2000-isa.h" > +#include > > /* debug PC/ISA interrupts */ > //#define DEBUG_IRQ > @@ -820,20 +821,6 @@ static long get_file_size(FILE *f) > return size; > } > > -/* setup_data types */ > -#define SETUP_NONE 0 > -#define SE

  1   2   3   4   >