Re: [Qemu-devel] Configuring pflash devices for OVMF firmware

2019-01-28 Thread Laszlo Ersek
(+Peter, keeping the context) On 01/25/19 16:03, Markus Armbruster wrote: > We configure OVMF firmware for PC machine types with -drive if=pflash. > This is pretty much the last remaining use of -drive in libvirt we can't > yet replace by -blockdev. Such a replacement is desirable, because > -blo

Re: [Qemu-devel] [PATCH v2] qemu-nbd: Deprecate qemu-nbd --partition

2019-01-28 Thread Stefano Garzarella
On Fri, Jan 25, 2019 at 05:48:37PM -0600, Eric Blake wrote: > The existing qemu-nbd --partition code claims to handle logical > partitions up to 8, since its introduction in 2008 (commit 7a5ca86). > However, the implementation is bogus (actual MBR logical partitions > form a sort of linked list, wi

Re: [Qemu-devel] [PATCH] hw: input: set category of the i8042 device

2019-01-28 Thread Thomas Huth
On 2019-01-25 17:44, Philippe Mathieu-Daudé wrote: > On 1/25/19 4:24 PM, Thomas Huth wrote: >> On 2019-01-25 16:14, kumar sourav wrote: >>> Sets the category of i8042 device as DEVICE_CATEGORY_INPUT >>> Devices should be assigned to one of DEVICE_CATEGORY_. >>> >>> Signed-off-by: kumar sourav

Re: [Qemu-devel] [PATCH RFC 1/2] virtio-blk: add DISCARD and WRITE ZEROES features

2019-01-28 Thread Stefano Garzarella
On Sun, Jan 27, 2019 at 12:51:44PM +, Stefan Hajnoczi wrote: > On Fri, Jan 25, 2019 at 05:18:13PM +0100, Stefano Garzarella wrote: > > On Fri, Jan 25, 2019 at 02:58:56PM +, Stefan Hajnoczi wrote: > > > On Thu, Jan 24, 2019 at 06:23:22PM +0100, Stefano Garzarella wrote: > > > > +

Re: [Qemu-devel] [PATCH] slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT

2019-01-28 Thread Stefano Garzarella
On Sun, Jan 27, 2019 at 12:46:59PM +0100, Samuel Thibault wrote: > Signed-off-by: Samuel Thibault > --- > slirp/ip.h | 4 ++-- > slirp/ip6.h | 4 ++-- > slirp/ip6_icmp.h | 10 +- > 3 files changed, 9 insertions(+), 9 deletions(-) Reviewed-by: Stefano Garzarella Thanks, Ste

Re: [Qemu-devel] [PATCH 2/2] i386: Add some MSR based features on Cascadelake-Server CPU model

2019-01-28 Thread Tao Xu
On 1/24/2019 3:15 AM, Eduardo Habkost wrote: On Mon, Jan 21, 2019 at 05:29:32PM +0800, Tao Xu wrote: On 1/15/2019 2:35 AM, Eduardo Habkost wrote: Sorry, we do have a problem here: On Thu, Dec 27, 2018 at 10:43:04AM +0800, Tao Xu wrote: [...] #define PC_COMPAT_3_0 \ diff --git a/target/i386

Re: [Qemu-devel] [PATCH] hw/input/lm832x: set device category of lm832x

2019-01-28 Thread Thomas Huth
Hi, On 2019-01-27 11:18, kumar sourav wrote: > Sets the category of lm832x as DEVICE_CATEGORY_INPUT > Devices should be assigned to one of DEVICE_CATEGORY_ > > Signed-off-by: kumar sourav > --- > hw/input/lm832x.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/input/lm832x.c

Re: [Qemu-devel] [PATCH 1/3] configure: Disable W^X on OpenBSD

2019-01-28 Thread Thomas Huth
On 2019-01-25 20:27, Philippe Mathieu-Daudé wrote: > Since OpenBSD 6.0 [1], W^X is enforced by default [2]. > TCG requires WX access. Disable W^X if it is available. > This fixes: > > # lm32-softmmu/qemu-system-lm32 > Could not allocate dynamic translator buffer > > # sysctl kern.wxabort=1

Re: [Qemu-devel] [PATCH 3/3] WIP tests/vm: Run tests on OpenBSD

2019-01-28 Thread Thomas Huth
On 2019-01-25 20:27, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/vm/openbsd | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/tests/vm/openbsd b/tests/vm/openbsd > index cfe0572c59..de907dd21c 100755 > --- a/tests/vm/openbsd > +++

Re: [Qemu-devel] [PATCH 2/3] scsi-disk: Add device_id property

2019-01-28 Thread Peter Krempa
On Fri, Jan 25, 2019 at 18:46:52 +0100, Kevin Wolf wrote: > The new device_id property specifies which value to use for the vendor > specific designator in the Device Identification VPD page. > > In particular, this is necessary for libvirt to maintain guest ABI > compatibility when no serial numb

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: remove the interrupt presenters from under PowerPCCPU

2019-01-28 Thread Greg Kurz
On Mon, 28 Jan 2019 07:55:52 +0100 Cédric Le Goater wrote: > These fields have now been replaced by equivalents under the machine > data. > > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > target/ppc/cpu.h | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/target/

Re: [Qemu-devel] [Qemu-ppc] [PATCH] hw/input/adb.c: set device category of adb

2019-01-28 Thread Thomas Huth
On 2019-01-27 11:02, kumar sourav wrote: > Sets the category of adb as DEVICE_CATEGORY_INPUT > Devices should be assigned to one of DEVICE_CATEGORY_ > > Signed-off-by: kumar sourav > --- > hw/input/adb.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/input/adb.c b/hw/input/adb.

Re: [Qemu-devel] [PATCH] hw: sd: set category of the sd memory card

2019-01-28 Thread Thomas Huth
On 2019-01-24 17:20, kumar sourav wrote: > Sets the category of the sd memory card as DEVICE_CATEGORY_STORAGE. > Devices should be assigned to one of DEVICE_CATEGORY_. > > Signed-off-by: kumar sourav > --- > hw/sd/sd.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/sd/sd.c b/hw

Re: [Qemu-devel] [PATCH 2/3] scsi-disk: Add device_id property

2019-01-28 Thread Peter Krempa
On Mon, Jan 28, 2019 at 09:50:41 +0100, Peter Krempa wrote: > On Fri, Jan 25, 2019 at 18:46:52 +0100, Kevin Wolf wrote: > > The new device_id property specifies which value to use for the vendor > > specific designator in the Device Identification VPD page. > > > > In particular, this is necessary

Re: [Qemu-devel] [PATCH v2 4/9] Extend the command-line to provide memory latency and bandwidth information

2019-01-28 Thread Tao Xu
On 1/22/2019 1:09 AM, Eric Blake wrote: On 1/21/19 12:03 AM, Tao Xu wrote:   # +# @hmat-lb: memory latency and bandwidth information (Since: 2.13) s/2.13/4.0/ (probably in multiple spots in your series) Hi Eric, Thank you for your comments. The spell mistakes in patches 1/9 to 6/9 have been

[Qemu-devel] [PATCH 02/19] ppc: externalize ppc_get_vcpu_by_pir()

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

Re: [Qemu-devel] [PATCH v5 2/2] hw/arm: add Arm SBSA reference machine, devices part

2019-01-28 Thread Hongbo Zhang
On Tue, 22 Jan 2019 at 19:49, Peter Maydell wrote: > > On Fri, 7 Dec 2018 at 09:08, Hongbo Zhang wrote: > > > > Following the previous patch, this patch adds peripheral devices to the > > newly introduced SBSA-ref machine. > > > > Signed-off-by: Hongbo Zhang > > --- > > hw/arm/sbsa-ref.c | 421

[Qemu-devel] [PATCH 08/19] target/ppc: Fix nip on power management instructions

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Those instructions currently raise an exception from within the helper. This tends to result in a bogus nip value in the env context (typically the beginning of the TB). Such a helper needs a gen_update_nip() first. This fixes it with a different approach which is to

[Qemu-devel] [PATCH 06/19] target/ppc: Remove some #if 0'ed code

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Some debug stuff we don't need to keep there Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Cédric Le Goater --- target/ppc/excp_helper.c | 12 target/ppc/mmu_helper.c | 12 2 files changed, 24 deletions(-) diff --git a/target/ppc

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

2019-01-28 Thread Cédric Le Goater
Hello, Here is a series adding support for the XIVE interrupt controller as found on POWER9 PowerNV mchines. It includes models for the baremetal IC itself and a set of fixes and extensions of the POWER9 core provided by Ben. Thanks, C. Changes in v1 (since PnvXive was last sent) : - made mor

[Qemu-devel] [PATCH 03/19] xive: extend the XiveRouter get_tctx() method with the page offset

2019-01-28 Thread Cédric Le Goater
The PowerNV machine can perform indirect loads and stores on the TIMA on behalf of another CPU. The PIR of the CPU is controlled by a set of 4 registers, one per TIMA page. To know which page is being accessed, we need to inform the controller model of the operation offset. Signed-off-by: Cédric L

[Qemu-devel] [PATCH 05/19] ppc/pnv: add XIVE support

2019-01-28 Thread Cédric Le Goater
This is simple model of the POWER9 XIVE interrupt controller for the PowerNV machine. XIVE for baremetal is a complex controller and the model only addresses the needs of the skiboot firmware. The PowerNV model reuses the common XIVE framework developed for sPAPR and the fundamentals aspects are q

[Qemu-devel] [PATCH 15/19] target/ppc: Detect erroneous condition in interrupt delivery

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt It's very easy for the CPU specific has_work() implementation and the logic in ppc_hw_interrupt() to be subtly out of sync. This can occasionally allow a CPU to wakeup from a PM state and resume executing past the PM instruction when it should resume at the 0x100 vec

[Qemu-devel] [PATCH 01/19] ppc/xive: hardwire the Physical CAM line of the thread context

2019-01-28 Thread Cédric Le Goater
By default on P9, the HW CAM line (23bits) is hardwired to : 0x000||0b1||4Bit chip number||7Bit Thread number. When the block group mode is enabled at the controller level (PowerNV), the CAM line is changed for CAM compares to : 4Bit chip number||0x001||7Bit Thread number This will

[Qemu-devel] [PATCH 04/19] ppc/pnv: xive: export the TIMA memory accessors

2019-01-28 Thread Cédric Le Goater
The PowerNV machine can perform indirect loads and stores on the TIMA on behalf of another CPU. Give the controller the possibility to call the TIMA memory accessors with a XiveTCTX of its choice. Signed-off-by: Cédric Le Goater --- include/hw/ppc/xive.h | 3 +++ hw/intc/xive.c| 27

[Qemu-devel] [PATCH 07/19] target/ppc: Make special ORs match x86 pause and don't generate on mttcg

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt There's no point in going out of translation on an SMT OR with mttcg since the backend won't do anything useful such as pausing, it's only useful on traditional TCG to give time to other processors. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Cédric Le Goat

[Qemu-devel] [PATCH 13/19] target/ppc: Rename "in_pm_state" to "resume_as_sreset"

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt To better reflect what this does, as it's specific to some of the P7/P8/P9 PM states, not generic. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Cédric Le Goater --- target/ppc/cpu.h | 6 +++--- hw/ppc/ppc.c | 2 +- target/ppc/excp_helpe

[Qemu-devel] [PATCH 16/19] target/ppc: Add Hypervisor Virtualization Interrupt on POWER9

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This adds support for delivering that exception Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Cédric Le Goater --- target/ppc/cpu.h| 5 - target/ppc/excp_helper.c| 17 - target/ppc/translate_init.inc.c | 16 +

[Qemu-devel] [PATCH 10/19] target/ppc: Fix support for "STOP light" states on POWER9

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt STOP must act differently based on PSSCR:EC on POWER9. When set, it acts like the P7/P8 power management instructions and wake up at 0x100 based on the wakeup conditions in LPCR. When PSSCR:EC is clear however it will wakeup at the next instruction after STOP (if EE

[Qemu-devel] [PATCH 09/19] target/ppc: Don't clobber MSR:EE on PM instructions

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt When issuing a power management instruction, we set MSR:EE to force ppc_hw_interrupt() into calling powerpc_excp() to deal with the fact that on P7 and P8, the system reset caused by the wakeup needs to be generated regardless of the MSR:EE value (using LPCR only). T

Re: [Qemu-devel] [Qemu-ppc] [PATCH] hw/input/adb.c: set device category of adb

2019-01-28 Thread David Gibson
On Mon, Jan 28, 2019 at 10:06:03AM +0100, Thomas Huth wrote: > On 2019-01-27 11:02, kumar sourav wrote: > > Sets the category of adb as DEVICE_CATEGORY_INPUT > > Devices should be assigned to one of DEVICE_CATEGORY_ > > > > Signed-off-by: kumar sourav > > --- > > hw/input/adb.c | 1 + > > 1

[Qemu-devel] [PATCH 12/19] target/ppc: Disable ISA 2.06 PM instructions on POWER9

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt The ISA 2.06/2.07 Power Management instructions (doze, nap & rvwinkle) don't exist on POWER9, don't enable them. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Cédric Le Goater --- target/ppc/translate_init.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[Qemu-devel] [PATCH 11/19] target/ppc: Move "wakeup reset" code to a separate function

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This moves the code to handle waking up from the 0x100 vector from powerpc_excp() to a separate function, as the former is already way too big as it is. No functional change. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Cédric Le Goater --- target/ppc/exc

[Qemu-devel] [PATCH 14/19] target/ppc: Add POWER9 exception model

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt And use it to get the correct HILE bit in HID0 Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Cédric Le Goater --- target/ppc/cpu-qom.h| 2 ++ target/ppc/excp_helper.c| 17 + target/ppc/translate.c | 3 ++- targ

[Qemu-devel] [PATCH 19/19] target/ppc: Add support for LPCR:HEIC on POWER9

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt This controls whether the External Interrupt (0x500) can be delivered to the hypervisor or not. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Cédric Le Goater --- target/ppc/excp_helper.c| 5 - target/ppc/translate_init.inc.c | 5 - 2 files

[Qemu-devel] [PATCH 17/19] target/ppc: Add POWER9 external interrupt model

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt Adds support for the Hypervisor directed interrupts in addition to the OS ones. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Cédric Le Goater --- include/hw/ppc/ppc.h| 2 ++ target/ppc/cpu-qom.h| 2 ++ target/ppc/cpu.h

[Qemu-devel] [PATCH 18/19] ppc/xive: Make XIVE generate the proper interrupt types

2019-01-28 Thread Cédric Le Goater
From: Benjamin Herrenschmidt It should be generic Hypervisor Virtualization interrupts for HV directed rings and traditional External Interrupts for the OS directed ring. Don't generate anything for the user ring as it isn't actually supported. Signed-off-by: Benjamin Herrenschmidt Signed-off-

Re: [Qemu-devel] [PATCH 2/3] XXX oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure

2019-01-28 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Previous to OpenBSD 6.3 [1], fcntl(F_SETFL) is not permitted on memory > devices. Do not assert fcntl failures on OpenBSD. > This fixes: > > $ lm32-softmmu/qemu-system-lm32 > assertion "f != -1" failed: file "util/oslib-posix.c", line 247, function > "qemu_

Re: [Qemu-devel] [PATCH v3 1/8] target/ppc: implement complete set of Vsr* macros

2019-01-28 Thread David Gibson
On Sun, Jan 27, 2019 at 09:02:59AM +, Mark Cave-Ayland wrote: > This prepares us for eliminating the use of direct array access within the VMX > instruction implementations. > > Signed-off-by: Mark Cave-Ayland > Reviewed-by: Richard Henderson Applied to ppc-for-4.0. > --- > target/ppc/int

Re: [Qemu-devel] [PATCH] gdbstub: Fix i386/x86_64 machine description and add control registers

2019-01-28 Thread Paolo Bonzini
On 24/01/19 21:29, Doug Gale wrote: > The machine description we send is being (silently) thrown on the floor > by GDB and GDB silently uses the default machine description. > > With current QEMU, if you debug gdb, and set debug_xml=1 and continue, > then attach to qemu gdbstub from the debugged g

[Qemu-devel] [Bug 1810603] Re: QEMU QCow Images grow dramatically

2019-01-28 Thread Lenny Helpline
> Looking at the file size isn't helpful. The 23 GB > are the space that is actually used. You can use 'du -h' > to confirm this, but I think it gets the number in the exact same way as > qemu-img. Are you sure about that? My OS complains that the disk is full. I can't even start any VM anymore.

Re: [Qemu-devel] [PATCH v5 1/2] hw/arm: Add arm SBSA reference machine, skeleton part

2019-01-28 Thread Hongbo Zhang
On Tue, 22 Jan 2019 at 19:42, Peter Maydell wrote: > > On Fri, 7 Dec 2018 at 09:08, Hongbo Zhang wrote: > > > > For the Aarch64, there is one machine 'virt', it is primarily meant to > > run on KVM and execute virtualization workloads, but we need an > > environment as faithful as possible to phy

Re: [Qemu-devel] Booting Raspbian on RPi emulation

2019-01-28 Thread Peter Maydell
On Sun, 27 Jan 2019 at 23:13, BALATON Zoltan wrote: > On Sun, 27 Jan 2019, Peter Maydell wrote: > > Unfortunately I'm not sufficiently familiar with how OSX > > event handling works to figure out how to plumb it back in > > again. It ought to be a fairly simple matter of "implement > > whatever me

Re: [Qemu-devel] [PATCH] hw/block: clean up stake xen_disk trace entries

2019-01-28 Thread Paul Durrant
Ping? I realize that I typo-ed the commit comment but, assuming that can be fixed, can I get an ack or otherwise on this? Thanks, Paul > -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 22 January 2019 14:52 > To: qemu-devel@nongnu.org; qemu-bl...@nong

Re: [Qemu-devel] [PATCH] test-filter-mirror: pass UNIX domain socket through fd

2019-01-28 Thread Daniel P . Berrangé
On Mon, Jan 28, 2019 at 12:11:59PM +0800, Jason Wang wrote: > The tests tries to let qemu server mode to process the connection > which turns out to be racy after commit 8258292e18c3 ("monitor: Remove > "x-oob", offer capability "oob" unconditionally"). This is because the > filter may try to mirro

[Qemu-devel] [PATCH] spice: set device address and device display ID in QXL interface

2019-01-28 Thread Lukáš Hrázký
Calls the new SPICE QXL interface function spice_qxl_set_device_info to set the hardware address of the graphics device represented by the QXL interface (e.g. a PCI path) and the device display IDs (the IDs of the device's monitors that belong to this QXL interface). Also stops using the deprecate

Re: [Qemu-devel] [PATCH] slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT

2019-01-28 Thread Alex Bennée
Samuel Thibault writes: > Signed-off-by: Samuel Thibault Is there a rationale as to why we should replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT or is it particular to these QEMU_BUILD_BUG_ON instances? It would be nice to have a little more context in the commit message. Otherwise the chang

Re: [Qemu-devel] Configuring pflash devices for OVMF firmware

2019-01-28 Thread Peter Maydell
On Fri, 25 Jan 2019 at 15:11, Markus Armbruster wrote: > (1) cfi.pflash01 isn't available with -device. > > (2) "Magic board code picks up the backend [created for -drive > if=pflash], creates a frontend (a cfi.pflash01 device), and maps it > into the guest's address space." When we repla

Re: [Qemu-devel] [PATCH] slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT

2019-01-28 Thread Samuel Thibault
Alex Bennée, le lun. 28 janv. 2019 10:35:37 +, a ecrit: > Samuel Thibault writes: > > > Signed-off-by: Samuel Thibault > > Is there a rationale as to why we should replace QEMU_BUILD_BUG_ON with > G_STATIC_ASSERT or is it particular to these QEMU_BUILD_BUG_ON > instances? It would be nice t

Re: [Qemu-devel] of apci_1_compatible in CPUHotplugFeatures

2019-01-28 Thread Igor Mammedov
On Fri, 25 Jan 2019 14:49:28 -0500 "Michael S. Tsirkin" wrote: > On Fri, Jan 25, 2019 at 09:26:05AM +0100, Igor Mammedov wrote: > > On Wed, 23 Jan 2019 18:28:59 + > > "Dr. David Alan Gilbert" wrote: > > > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Tue, Jan 22, 2019 at

Re: [Qemu-devel] [PATCH v5 1/2] hw/arm: Add arm SBSA reference machine, skeleton part

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 10:16, Hongbo Zhang wrote: > > On Tue, 22 Jan 2019 at 19:42, Peter Maydell wrote: > > > > On Fri, 7 Dec 2018 at 09:08, Hongbo Zhang wrote: > > > > > > For the Aarch64, there is one machine 'virt', it is primarily meant to > > > run on KVM and execute virtualization workloa

Re: [Qemu-devel] [PATCH v5 1/2] hw/arm: Add arm SBSA reference machine, skeleton part

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 10:16, Hongbo Zhang wrote: > > On Tue, 22 Jan 2019 at 19:42, Peter Maydell wrote: > > Comment says 256M but the size field says it's larger... > > > I calculated, 256M should be 0x1000, 7 zeros. Yes, you're right, this was my mistake. PS: sorry about the other blank m

[Qemu-devel] [PATCH] linux-user: fix emulation of accept4/getpeername/getsockname/recvfrom syscalls

2019-01-28 Thread Andreas Schwab
System calls that return a socket address do so by putting the possibly truncated address into the provided buffer space, but setting the addrlen parameter to the actual size of the address. To determine how much to copy back to the target memory the emulation needs to remember the old value of th

Re: [Qemu-devel] [PATCH 1/3] configure: Disable W^X on OpenBSD

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/28/19 9:43 AM, Thomas Huth wrote: > On 2019-01-25 20:27, Philippe Mathieu-Daudé wrote: >> Since OpenBSD 6.0 [1], W^X is enforced by default [2]. >> TCG requires WX access. Disable W^X if it is available. >> This fixes: >> >> # lm32-softmmu/qemu-system-lm32 >> Could not allocate dynamic tra

Re: [Qemu-devel] [PATCH 47/52] vfio: express vfio dependencies with Kconfig

2019-01-28 Thread Paolo Bonzini
On 25/01/19 21:00, Alex Williamson wrote: >> >> -config VFIO_SPAPR >> -bool >> -default y >> -depends on VFIO && LINUX && PSERIES > > I can't say I really understand what happened with this through the > course of the series. In patch 27 spapr.o became obj-y, VFIO_SPAPR > came about

Re: [Qemu-devel] [PATCH 2/3] XXX oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/28/19 7:22 AM, Markus Armbruster wrote: > Is the XXX in the subject meant to go on permanent record? The original plan was to rename it as NOTFORMERGE before sending but I forgot (late Friday). So the whole content of this patch isn't meant to go on perm record ;)

Re: [Qemu-devel] [PATCH 2/3] XXX oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/28/19 10:47 AM, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > >> Previous to OpenBSD 6.3 [1], fcntl(F_SETFL) is not permitted on memory >> devices. Do not assert fcntl failures on OpenBSD. >> This fixes: >> >> $ lm32-softmmu/qemu-system-lm32 >> assertion "f != -1" failed: file

Re: [Qemu-devel] [PATCH 3/3] WIP tests/vm: Run tests on OpenBSD

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/28/19 9:44 AM, Thomas Huth wrote: > On 2019-01-25 20:27, Philippe Mathieu-Daudé wrote: >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> tests/vm/openbsd | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/tests/vm/openbsd b/tests/vm/openbsd >> index cfe0572c59..d

Re: [Qemu-devel] [PATCH 2/3] XXX oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure

2019-01-28 Thread Paolo Bonzini
On 28/01/19 10:47, Alex Bennée wrote: >> >> [1] The fix seems https://github.com/openbsd/src/commit/c2a35b387f9d3c >> "fcntl(F_SETFL) invokes the FIONBIO and FIOASYNC ioctls internally, so >> the memory devices (/dev/null, /dev/zero, etc) need to permit them." > I assume set_nonblock is called

[Qemu-devel] [RFC PATCH 1/4] hw:acpi: Make ACPI IO address space configurable

2019-01-28 Thread Shameer Kolothum
This is in preparation for adding support for ARM64 platforms where it doesn't use port mapped IO for ACPI IO space. Also add a flag to identify hw reduced ACPI platforms as they might use GPIO hw for signaling ACPI platform events. Signed-off-by: Shameer Kolothum --- hw/acpi/memory_hotplug.c

[Qemu-devel] [RFC PATCH 0/4] ARM virt: ACPI memory hotplug support

2019-01-28 Thread Shameer Kolothum
This series is an attempt to provide hotplug support to both pc-dimm and nvdimm device memory on ARM virt platform. This is based on Eric's recent works to support PCDIMM/NVDIMM device memory[1]. The kernel support for arm64 memory hot add was added only recently by Robin[2] and hence the guest ker

[Qemu-devel] [RFC PATCH 3/4] hw/arm/virt: Enable pc-dimm hotplug support

2019-01-28 Thread Shameer Kolothum
pc-dimm memory hotplug is enabled using GPIO(Pin 2) based ACPI event. Hot removal functionality is not yet supported. Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 57 +++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/h

Re: [Qemu-devel] [PATCH 6/6] tests/tcg/aarch64: Add pauth smoke tests

2019-01-28 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson > --- > tests/tcg/aarch64/pauth-1.c | 23 +++ > tests/tcg/aarch64/Makefile.target | 7 ++- > 2 files changed, 29 insertions(+), 1 deletion(-) > create mode 100644 tests/tcg/aarch64/pauth-1.c > > diff

Re: [Qemu-devel] [PATCH] slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT

2019-01-28 Thread Alex Bennée
Samuel Thibault writes: > Alex Bennée, le lun. 28 janv. 2019 10:35:37 +, a ecrit: >> Samuel Thibault writes: >> >> > Signed-off-by: Samuel Thibault >> >> Is there a rationale as to why we should replace QEMU_BUILD_BUG_ON with >> G_STATIC_ASSERT or is it particular to these QEMU_BUILD_BUG_

[Qemu-devel] [RFC PATCH 2/4] hw/arm/virt: Add GPIO based pcdimm hotplug ACPI event support

2019-01-28 Thread Shameer Kolothum
This adds support for using PL061 GPIO controller pin to trigger pcdimm hotplug event to guest. Signed-off-by: Shameer Kolothum --- default-configs/arm-softmmu.mak | 1 + hw/arm/virt-acpi-build.c| 28 hw/arm/virt.c | 37

Re: [Qemu-devel] [PATCH 1/7] target/arm/translate-a64: Don't underdecode system instructions

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > The "system instructions" and "system register move" subcategories > of "branches, exception generating and system instructions" for A64 > only apply if bits [23:22] are zero; other values are currently > unallocated. Correctly UNDEF these u

Re: [Qemu-devel] [PATCH 3/7] target/arm/translate-a64: Don't underdecode SIMD ld/st multiple

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > In the AdvSIMD load/store multiple structures encodings, > the non-post-indexed case should have zeroes in [20:16] > (which is the Rm field for the post-indexed case). > Correctly UNDEF the currently unallocated encodings which > have non-ze

Re: [Qemu-devel] [PATCH] hw/input/lm832x: set device category of lm832x

2019-01-28 Thread Philippe Mathieu-Daudé
Hi Thomas, On 1/28/19 9:37 AM, Thomas Huth wrote: > Hi, > > On 2019-01-27 11:18, kumar sourav wrote: >> Sets the category of lm832x as DEVICE_CATEGORY_INPUT >> Devices should be assigned to one of DEVICE_CATEGORY_ >> >> Signed-off-by: kumar sourav >> --- >> hw/input/lm832x.c | 1 + >> 1 fi

Re: [Qemu-devel] [PATCH 2/7] target/arm/translate-a64: Don't underdecode PRFM

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > The PRFM prefetch insn in the load/store with imm9 encodings > requires idx field 0b00; we were underdecoding this by > only checking !is_unpriv (which is equivalent to idx != 2). > Correctly UNDEF the unallocated encodings where idx == 0b01

Re: [Qemu-devel] [PATCH] target/xtensa: drop function xtensa_timer_irq

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/27/19 2:44 AM, Max Filippov wrote: > It's a one-liner used in a single place, move its implementation there > and remove its declaration. > > Signed-off-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé > --- > hw/xtensa/pic_cpu.c | 7 +-- > target/xtensa/cpu.h | 1 - > 2 files ch

[Qemu-devel] [RFC PATCH 4/4] hw/arm/virt: Add nvdimm hotplug support

2019-01-28 Thread Shameer Kolothum
nvdimm hotplug is enabled using GPIO(Pin 4) based ACPI event. Hot removal functionality is not yet supported. Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 17 + hw/arm/virt.c| 29 ++--- include/hw/arm/virt.h| 1 + 3 files

Re: [Qemu-devel] [PATCH 5/7] target/arm/translate-a64: Don't underdecode add/sub extended register

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 11:16, Laurent Desnogues wrote: > > On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell > wrote: > > > > In the "add/subtract (extended register)" encoding group, the "opt" > > field in bits [23:22] must be zero. Correctly UNDEF the unallocated > > encodings where this field is

Re: [Qemu-devel] [PATCH] slirp: Replace QEMU_BUILD_BUG_ON with own macro

2019-01-28 Thread Philippe Mathieu-Daudé
Hi Marc-André, On 1/27/19 12:37 PM, Marc-André Lureau wrote: > Hi > > On Sun, Jan 27, 2019 at 5:55 AM Samuel Thibault > wrote: >> >> (Which I'll fold as appropriate within Marc-André's patch series) > > Did you try using G_STATIC_ASSERT* instead? [...] Is there a same plan for QEMU codebase?

Re: [Qemu-devel] [PATCH 4/7] target/arm/translate-a64: Don't underdecode SIMD ld/st single

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > In the AdvSIMD load/store single structure encodings, the > non-post-indexed case should have zeroes in [20:16] (which is the > Rm field for the post-indexed case). Bit 31 must also be zero > (a check we got right in ldst_multiple but not he

Re: [Qemu-devel] [PATCH 7/7] target/arm/translate-a64: Don't underdecode SDOT and UDOT

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > In the AdvSIMD scalar x indexed element and vector x indexed element > encoding group, the SDOT and UDOT instructions are vector only, > and their opcode is unallocated in the scalar group. Correctly > UNDEF this unallocated encoding. > > Re

Re: [Qemu-devel] [PATCH 5/7] target/arm/translate-a64: Don't underdecode add/sub extended register

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > In the "add/subtract (extended register)" encoding group, the "opt" > field in bits [23:22] must be zero. Correctly UNDEF the unallocated > encodings where this field is not zero. > > Reported-by: Laurent Desnogues > Signed-off-by: Peter Ma

Re: [Qemu-devel] [PATCH] target/xtensa: rearrange access to external interrupts

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/27/19 2:45 AM, Max Filippov wrote: > Replace xtensa_get_extint that returns single external IRQ descriptor > with xtensa_get_extints that returns a vector of all external IRQs. > > Signed-off-by: Max Filippov > --- > hw/xtensa/pic_cpu.c | 24 +++- > hw/xtensa/xtfpga.c |

Re: [Qemu-devel] [PATCH 6/7] target/arm/translate-a64: Don't underdecode FP insns

2019-01-28 Thread Laurent Desnogues
On Fri, Jan 25, 2019 at 7:26 PM Peter Maydell wrote: > > In the encoding groups > * floating-point data-processing (1 source) > * floating-point data-processing (2 source) > * floating-point data-processing (3 source) > * floating-point immediate > * floating-point compare > * floating-ponit

Re: [Qemu-devel] [PATCH v3 2/2] s390x/pci: Unplug remaining devices on pcihost reset

2019-01-28 Thread Cornelia Huck
On Wed, 23 Jan 2019 12:05:39 +0100 Cornelia Huck wrote: > On Mon, 21 Jan 2019 14:42:49 +0100 > David Hildenbrand wrote: > > > When resetting the guest we should unplug and remove all devices that > > are still pending. Otherwise the fresh guest will see devices that will > > suddenly vanish. >

Re: [Qemu-devel] [PATCH v5 11/11] block/backup: use backup-top instead of write notifiers

2019-01-28 Thread Vladimir Sementsov-Ogievskiy
18.01.2019 17:56, Max Reitz wrote: > On 29.12.18 13:20, Vladimir Sementsov-Ogievskiy wrote: >> Drop write notifiers and use filter node instead. Changes: >> >> 1. copy-before-writes now handled by filter node, so, drop all >> is_write_notifier arguments. >> >> 2. we don't have intersecting requ

Re: [Qemu-devel] [PATCH] slirp: Replace QEMU_BUILD_BUG_ON with own macro

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 11:22, Philippe Mathieu-Daudé wrote: > On 1/27/19 12:37 PM, Marc-André Lureau wrote: > > Did you try using G_STATIC_ASSERT* instead? > [...] > > Is there a same plan for QEMU codebase? Our version uses _Static_assert where possible, which I think will give better error mess

Re: [Qemu-devel] [PATCH RFC 4/8] i386/kvm: Implement 'hv-all' pass-through mode

2019-01-28 Thread Roman Kagan
On Fri, Jan 25, 2019 at 02:46:42PM +0100, Vitaly Kuznetsov wrote: > Roman Kagan writes: > > > On Fri, Jan 25, 2019 at 12:41:51PM +0100, Vitaly Kuznetsov wrote: > >> In many case we just want to give Windows guests all currently supported > >> Hyper-V enlightenments and that's where this new mode

Re: [Qemu-devel] [PATCH v1] s390x/pci: Warn when adding PCI devices without the 'zpci' feature

2019-01-28 Thread Cornelia Huck
On Tue, 22 Jan 2019 10:41:43 +0100 David Hildenbrand wrote: > We decided to always create the PCI host bridge, even if 'zpci' is not > enabled (due to migration compatibility). This however right now allows > to add zPCI/PCI devices to a VM although the guest will never actually see > them, confu

Re: [Qemu-devel] [PATCH v3 1/2] s390x/pci: Introduce unplug requests and split unplug handler

2019-01-28 Thread Cornelia Huck
On Wed, 23 Jan 2019 12:08:37 +0100 David Hildenbrand wrote: > On 23.01.19 12:03, Cornelia Huck wrote: > > On Mon, 21 Jan 2019 14:42:48 +0100 > > David Hildenbrand wrote: > > > >> PCI on s390x is really weird and how it was modeled in QEMU might not have > >> been the right choice. Anyhow, rig

Re: [Qemu-devel] [PATCH] s390x: remove direct reference to mem_path global form s90x code

2019-01-28 Thread David Hildenbrand
On 25.01.19 11:40, Igor Mammedov wrote: > On Fri, 25 Jan 2019 09:03:49 +0100 > David Hildenbrand wrote: > >> On 24.01.19 17:57, Igor Mammedov wrote: >>> I plan to deprecate -mem-path option and replace it with memory-backend, >>> for that it's necessary to get rid of mem_path global variable. >>>

Re: [Qemu-devel] [PATCH] slirp: Replace QEMU_BUILD_BUG_ON with own macro

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/28/19 12:25 PM, Peter Maydell wrote: > On Mon, 28 Jan 2019 at 11:22, Philippe Mathieu-Daudé > wrote: >> On 1/27/19 12:37 PM, Marc-André Lureau wrote: >>> Did you try using G_STATIC_ASSERT* instead? >> [...] >> >> Is there a same plan for QEMU codebase? > > Our version uses _Static_assert wh

Re: [Qemu-devel] [PATCH v1 0/2] s390x/pci: PCI bridge plugging fixes

2019-01-28 Thread Cornelia Huck
On Tue, 22 Jan 2019 13:51:31 +0100 David Hildenbrand wrote: > Hotplugging of PCI bridges is right now pretty much broken. Coldplugging > and hotplugging will assign wrong primary bus numbers in some scenarios. > > I base my knowledge on how this is supposed to work on > http://www.science.unitn.

Re: [Qemu-devel] [PATCH v2] bt: use size_t type for length parameters instead of int

2019-01-28 Thread Philippe Mathieu-Daudé
Hi Hugo, On 1/28/19 10:31 AM, Hugo Lefeuvre wrote: > Hi, > >> The length parameter values are not negative, thus use an unsigned >> type 'size_t' for them. Many routines pass 'len' values to memcpy(3) >> calls. If it was negative, it could lead to memory corruption issues. >> Add check to avoid i

[Qemu-devel] ping Re: [PATCH v3 0/9] qcow2: encryption threads

2019-01-28 Thread Vladimir Sementsov-Ogievskiy
ping Hi! Mostly reviewed-by Alberto, "/* No sense in releasing the lock */" should be removed from 06, should I resend just for this? I'd prefer to handle some other comments, if any. 08.01.2019 20:06, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > The series brings threads to qcow2 encryp

Re: [Qemu-devel] [PATCH] target/arm: Fix validation of 32-bit address spaces for aa32

2019-01-28 Thread Peter Maydell
On Fri, 25 Jan 2019 at 18:49, Richard Henderson wrote: > > When tsz == 0, aarch32 selects the address space via exclusion, > and there are no "top_bits" remaining that require validation. > > Fixes: ba97be9f4a4 > Reported-by: Peter Maydell > Signed-off-by: Richard Henderson > --- > target/arm/h

[Qemu-devel] Very slow finding extents in QCOW2-backed nbd

2019-01-28 Thread Tim Smith
Hi all, I have a question about the intent of the last call to bdrv_co_block_status() in bdrv_co_block_status(), in block/io.c about line 2195, which looks like this: ret2 = bdrv_co_block_status(local_file, want_zero, local_map, *pnum, &file_pnum, NULL

Re: [Qemu-devel] Crash when booting KDE Neon using qxl-vga

2019-01-28 Thread Dr. David Alan Gilbert
* Leonardo Soares Müller (leozinho29...@hotmail.com) wrote: > With QEMU version 3.1.50 (v3.1.0-1218-gad7a21e812-dirty) (commit > ad7a21e81231ae64540310384fb0f87ac8758b02) on Xubuntu 18.04 host, a KDE > Neon guest is crashing on boot. The QEMU command line is: > > gdb -q -ex "set pagination off" -e

Re: [Qemu-devel] [PATCH 0/4] aspeed/smc: add fast read support under User command mode.

2019-01-28 Thread Peter Maydell
On Thu, 24 Jan 2019 at 14:08, Cédric Le Goater wrote: > > Hello, > > When in the User command mode, the Aspeed SMC controller driver > performs the dummy cycles of a fast read command using byte transfers, > that is ony byte for eight cycles. But, the QEMU m25p80 models one > dummy cycle with one

Re: [Qemu-devel] [libvirt] Configuring pflash devices for OVMF firmware

2019-01-28 Thread Gerd Hoffmann
Hi, > > Issue (1) isn't too hard: we add the device to the dynamic sysbus device > > white-list, move a sysbus_mmio_map() from pflash_cfi01_realize() into > > pflash_cfi01_realize(). The latter requires a new device property to > > configure the base address. I got a working prototype. Since

[Qemu-devel] [PATCH v2] s390x: remove direct reference to mem_path global form s390x code

2019-01-28 Thread Igor Mammedov
I plan to deprecate -mem-path option and replace it with memory-backend, for that it's necessary to get rid of mem_path global variable. Do it for s390x case, replacing it with alternative way to enable 1Mb hugepages capability. Todo that replace qemu_mempath_getpagesize() with qemu_getrampagesize

Re: [Qemu-devel] [PATCH v2] s390x: remove direct reference to mem_path global form s390x code

2019-01-28 Thread David Hildenbrand
On 28.01.19 13:31, Igor Mammedov wrote: > I plan to deprecate -mem-path option and replace it with memory-backend, > for that it's necessary to get rid of mem_path global variable. > Do it for s390x case, replacing it with alternative way to enable > 1Mb hugepages capability. > > Todo that replace

Re: [Qemu-devel] [PULL 00/50] Misc patches for 2019-01-21

2019-01-28 Thread Peter Maydell
On Fri, 25 Jan 2019 at 17:19, Paolo Bonzini wrote: > > The following changes since commit 8b7a3e1e5434b55d7710071b00af97c7086cab7a: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' > into staging (2019-01-24 15:04:47 +) > > are available in the git repository at:

Re: [Qemu-devel] [libvirt] Configuring pflash devices for OVMF firmware

2019-01-28 Thread Peter Maydell
On Mon, 28 Jan 2019 at 12:40, Gerd Hoffmann wrote: > The tricky part is the access control here. On physical hardware you > typically have one flash rom, say 16M below 4G (on x86). > > Our pflash device doesn't allow to define multiple regions, so we use > multiple pflash devices instead, each wi

Re: [Qemu-devel] [PATCH] tests/microbit-test: Add tests for nRF51 NVMC

2019-01-28 Thread Peter Maydell
On Thu, 24 Jan 2019 at 14:11, Stefan Hajnoczi wrote: > > From: Steffen Görtz > > Signed-off-by: Steffen Görtz > Signed-off-by: Stefan Hajnoczi > --- > This resolves the conflict with Julia's UART test series due to > global_qtest removal. > > tests/microbit-test.c | 108 +++

Re: [Qemu-devel] [PATCH v2] bt: use size_t type for length parameters instead of int

2019-01-28 Thread Hugo Lefeuvre
Hi, > The length parameter values are not negative, thus use an unsigned > type 'size_t' for them. Many routines pass 'len' values to memcpy(3) > calls. If it was negative, it could lead to memory corruption issues. > Add check to avoid it. I'm working on a Debian LTS security update for qemu and

  1   2   3   4   5   >