[Qemu-devel] [PATCH] s390-pci: fix compilation on older GCC versions

2017-01-27 Thread Paolo Bonzini
S390PCIBusDevice is typedef'ed earlier in the file, before the hunks that this patch modifies. The double typedef causes old versions of GCC to complain. Signed-off-by: Paolo Bonzini --- hw/s390x/s390-pci-bus.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/s390x/s39

Re: [Qemu-devel] [PATCH RFC] mem-prealloc: Reduce large guest start-up and migration time.

2017-01-27 Thread Daniel P. Berrange
On Thu, Jan 05, 2017 at 12:54:02PM +0530, Jitendra Kolhe wrote: > Using "-mem-prealloc" option for a very large guest leads to huge guest > start-up and migration time. This is because with "-mem-prealloc" option > qemu tries to map every guest page (create address translations), and > make sure th

Re: [Qemu-devel] [PATCH v8 16/25] cputlb and arm/sparc targets: convert mmuidx flushes from varg to bitmap

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 10:34, Alex Bennée wrote: > While the vargs approach was flexible the original MTTCG ended up > having munge the bits to a bitmap so the data could be used in > deferred work helpers. Instead of hiding that in cputlb we push the > change to the API to make it take a bitmap of

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

2017-01-27 Thread Peter Maydell
On 26 January 2017 at 10:19, Stefan Hajnoczi wrote: > The following changes since commit c7f1cf01b8245762ca5864e835d84f6677ae8b1f: > > Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging > (2017-01-25 17:54:14 +) > > are available in the git repository at: > > git:

Re: [Qemu-devel] [PATCH] s390-pci: fix compilation on older GCC versions

2017-01-27 Thread Christian Borntraeger
On 01/27/2017 02:20 PM, Paolo Bonzini wrote: > S390PCIBusDevice is typedef'ed earlier in the file, before the hunks > that this patch modifies. The double typedef causes old versions of > GCC to complain. > > Signed-off-by: Paolo Bonzini > --- > hw/s390x/s390-pci-bus.h | 4 ++-- > 1 file change

Re: [Qemu-devel] [PATCH 04/10] armv7m: implement CCR, CFSR, HFSR, DFSR, BFAR, and MMFAR

2017-01-27 Thread Alex Bennée
Peter Maydell writes: > From: Michael Davidsaver > > Implement the v7M system registers CCR, CFSR, HFSR, DFSR, BFAR and > MMFAR. For the moment these simply read as written (with some basic > handling of RAZ/WI bits and W1C semantics). > > Signed-off-by: Michael Davidsaver > [PMM: drop warnin

Re: [Qemu-devel] [PATCH 06/10] armv7m: set CFSR.UNDEFINSTR on undefined instructions

2017-01-27 Thread Alex Bennée
Peter Maydell writes: > From: Michael Davidsaver > > When we take an exception for an undefined instruction, set the > appropriate CFSR bit. > > Signed-off-by: Michael Davidsaver > [PMM: tweaked commit message, comment] > Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée > --- > targe

[Qemu-devel] [PULL 02/41] replay: improve interrupt handling

2017-01-27 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch improves interrupt handling in record/replay mode. Now "interrupt" event is saved only when cc->cpu_exec_interrupt returns true. This patch also adds missing return to cpu_exec_interrupt function. Signed-off-by: Pavel Dovgalyuk Message-Id: <20170124071708.4572.6

[Qemu-devel] [PULL 06/41] replay: exception replay fix

2017-01-27 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch fixes replaying the exception when TB cache is full. It breaks cpu loop execution through setting exception_index to process such queued work as TB flush. v8: moved setting of exeption_index to tb_gen_code Signed-off-by: Pavel Dovgalyuk Message-Id: <20170126123

[Qemu-devel] [PULL 03/41] replay: don't use rtc clock on loadvm phase

2017-01-27 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch disables the update of the periodic timer of mc146818rtc in record/replay mode. State of this timer is saved and therefore does not need to be updated in record/replay mode. Read of RTC breaks the replay because all rtc reads have to be the same as in record mode.

[Qemu-devel] [PULL 01/41] icount: update instruction counter on apic patching

2017-01-27 Thread Paolo Bonzini
From: Pavel Dovgalyuk kvmvapic patches the code when some instructions are executed. E.g. mov 0xff, 0xfffe0080 is interpreted as push 0xff/call ... This patching is also followed by some side effects (changing apic and guest memory state). Therefore deterministic execution should take this operat

[Qemu-devel] [PULL 19/41] pc: Enable vmware-cpuid-freq CPU option for 2.9+ machine types

2017-01-27 Thread Paolo Bonzini
From: Phil Dennis-Jordan Signed-off-by: Phil Dennis-Jordan Message-Id: <1484921496-11257-4-git-send-email-p...@philjordan.eu> Signed-off-by: Paolo Bonzini --- include/hw/i386/pc.h | 6 +- target/i386/cpu.c| 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/hw

[Qemu-devel] [PULL 00/41] Misc changes for 2017-01-27

2017-01-27 Thread Paolo Bonzini
The following changes since commit 3879284d6517dc22529395bdb259f4183b589127: Merge remote-tracking branch 'remotes/berrange/tags/pull-qio-2017-01-23-2' into staging (2017-01-23 15:59:09 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for

[Qemu-devel] [PULL 10/41] hw/isa/lpc_ich9: add SMI feature negotiation via fw_cfg

2017-01-27 Thread Paolo Bonzini
From: Laszlo Ersek Introduce the following fw_cfg files: - "etc/smi/supported-features": a little endian uint64_t feature bitmap, presenting the features known by the host to the guest. Read-only for the guest. The content of this file will be determined via bit-granularity ICH9-LPC dev

[Qemu-devel] [PULL 04/41] savevm: add public save_vmstate function

2017-01-27 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch introduces save_vmstate function to allow saving and loading vmstates from the replay module. Signed-off-by: Pavel Dovgalyuk Message-Id: <20170124071741.4572.13714.stgit@PASHA-ISP> Signed-off-by: Paolo Bonzini --- include/sysemu/sysemu.h | 1 + migration/save

[Qemu-devel] [PULL 07/41] apic: save apic_delivered flag

2017-01-27 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch implements saving/restoring of static apic_delivered variable. v8: saving static variable only for one of the APICs Signed-off-by: Pavel Dovgalyuk Message-Id: <20170126123429.5412.94368.stgit@PASHA-ISP> Signed-off-by: Paolo Bonzini --- hw/intc/apic_common.c

[Qemu-devel] [PULL 15/41] hw/scsi: Fix debug message of cdb structure in scsi-generic

2017-01-27 Thread Paolo Bonzini
From: Eric Farman When running with debug enabled, the scsi-generic cdb that is dumped skips byte 0 of the command, which is the opcode. This makes identifying which command is being issued/completed a little difficult. Example: 0x00 0x00 0x01 0x00 0x00 scsi-generic: scsi_read_data 0x0 s

[Qemu-devel] [PULL 22/41] qemu-options: stdio is available on win32

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Available since commit db418a0a7ef5887ea0f3d167584e6f500bb0c4c5 (October 2011, qemu 1.0) Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- qemu-options.hx | 2 -- 1 file changed, 2 deletions(-) diff --git a/qemu-options.hx b/qe

[Qemu-devel] [PULL 05/41] replay: save/load initial state

2017-01-27 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch implements initial vmstate creation or loading at the start of record/replay. It is needed for rewinding the execution in the replay mode. v4 changes: - snapshots are not created by default anymore v3 changes: - added rrsnapshot option Signed-off-by: Pavel Do

[Qemu-devel] [PULL 08/41] memory: tune mtree_print_mr() to dump mr type

2017-01-27 Thread Paolo Bonzini
From: Peter Xu We were dumping RW bits for each memory region, that might be confusing. It'll make more sense to dump the memory region type directly rather than the RW bits since that's how the bits are derived. Meanwhile, with some slight cleanup in the function. Signed-off-by: Peter Xu Mess

[Qemu-devel] [PULL 16/41] block: Fix target variable of BLKSECTGET ioctl

2017-01-27 Thread Paolo Bonzini
From: Eric Farman Commit 6f6071745bd0 ("raw-posix: Fetch max sectors for host block device") introduced a routine to call the kernel BLKSECTGET ioctl, which stores the result back to user space. However, the size of the data returned depends on the routine handling the ioctl. The (compat_)blkde

[Qemu-devel] [PULL 29/41] char: introduce generic qemu_chr_get_kind()

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau This allows to remove the "is_mux" field from CharDriverState. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- include/sysemu/char.h | 15 +-- monitor.c | 2 +- qemu-char.c | 21 ++---

[Qemu-devel] [PULL 09/41] memory: hmp: add "-f" for "info mtree"

2017-01-27 Thread Paolo Bonzini
From: Peter Xu Adding one more option "-f" for "info mtree" to dump the flat views of all the address spaces. This will be useful to debug the memory rendering logic, also it'll be much easier with it to know what memory region is handling what address range. Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [PULL 13/41] block/iscsi: avoid data corruption with cache=writeback

2017-01-27 Thread Paolo Bonzini
From: Peter Lieven nb_cls_shrunk in iscsi_allocmap_update can become -1 if the request starts and ends within the same cluster. This results in passing -1 to bitmap_set and bitmap_clear and they don't handle negative values properly. In the end this leads to data corruption. Fixes: e1123a3b40a1a

[Qemu-devel] [PULL 20/41] block/iscsi: statically link qemu_iscsi_opts

2017-01-27 Thread Paolo Bonzini
From: Peter Lieven commit f57b4b5f moved qemu_iscsi_opts into vl.c. This made them invisible for qemu-img, qemu-nbd etc. Fixes: f57b4b5fb127b60e1aade2684a8b16bc4f630b29 Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven Message-Id: <1485262161-18543-1-git-send-email...@kamp.de> [Drop useles

[Qemu-devel] [PULL 32/41] bt: use qemu_chr_alloc()

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Use common allocator for CharDriverState. Rename the now untouched parent field. The casts added are temporary, they are replaced with QOM type-safe macros in a later patch in this series. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo B

[Qemu-devel] [PULL 12/41] hw/isa/lpc_ich9: negotiate SMI broadcast on pc-q35-2.9+ machine types

2017-01-27 Thread Paolo Bonzini
From: Laszlo Ersek Cc: "Michael S. Tsirkin" Cc: Eduardo Habkost Cc: Gerd Hoffmann Cc: Igor Mammedov Cc: Paolo Bonzini Signed-off-by: Laszlo Ersek Reviewed-by: Eduardo Habkost Reviewed-by: Michael S. Tsirkin Reviewed-by: Igor Mammedov Message-Id: <20170126014416.11211-4-ler...@redhat.com>

[Qemu-devel] [PULL 36/41] char: use error_report()

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Prefer error_report() over fprintf(stderr..) Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- qemu-char.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/qemu-char.c b/qemu-char.c

[Qemu-devel] [PULL 30/41] char: use a feature bit for replay

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Use a feature flag rather than a structure field for "replay". Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- include/sysemu/char.h | 3 ++- qemu-char.c | 33 - 2 files changed, 22 i

[Qemu-devel] [PULL 18/41] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-27 Thread Paolo Bonzini
From: Phil Dennis-Jordan This fixes timekeeping of x86-64 Darwin/OS X/macOS guests when using KVM. Darwin/OS X/macOS for x86-64 uses the TSC for timekeeping; it normally calibrates this by querying various clock frequency scaling MSRs. Details depend on the exact CPU model detected. The local

[Qemu-devel] [PULL 11/41] hw/isa/lpc_ich9: add broadcast SMI feature

2017-01-27 Thread Paolo Bonzini
From: Laszlo Ersek The generic edk2 SMM infrastructure prefers EFI_SMM_CONTROL2_PROTOCOL.Trigger() to inject an SMI on each processor. If Trigger() only brings the current processor into SMM, then edk2 handles it in the following ways: (1) If Trigger() is executed by the BSP (which is guaranteed

[Qemu-devel] [PULL 27/41] char: move callbacks in CharDriver

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau This makes the code more declarative, and avoids duplicating the information on all instances. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- backends/baum.c | 11 +- backends/msmouse.c| 11 +- backends/testdev.c

[Qemu-devel] [PULL 41/41] memory: don't sign-extend 32-bit writes

2017-01-27 Thread Paolo Bonzini
From: Ladi Prosek ldl_p has a signed return type so assigning it to uint64_t implicitly sign-extends the value. This results in devices with min_access_size = 8 seeing unexpected values passed to their write handlers. Example: guest performs a 32-bit write of 0x8000 to an mmio region and the

[Qemu-devel] [PULL 14/41] Introduce DEVICE_CATEGORY_CPU for CPU devices

2017-01-27 Thread Paolo Bonzini
From: Thomas Huth Now that CPUs show up in the help text of "-device ?", we should group them into an appropriate category. Signed-off-by: Thomas Huth Reviewed-by: Eduardo Habkost Message-Id: <1484917276-7107-1-git-send-email-th...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/cpu/core.c

[Qemu-devel] [PULL 35/41] spice-char: improve error reporting

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Set errp to report errors up to the right monitor. Use error_append_hint() to give hints about parameters on !qmp monitors, instead of a direct fprintf() call. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- spice-qemu-char.c

Re: [Qemu-devel] [PATCH 07/10] armv7m: Report no-coprocessor faults correctly

2017-01-27 Thread Alex Bennée
Peter Maydell writes: > For v7M attempts to access a nonexistent coprocessor are reported > differently from plain undefined instructions (as UsageFaults of type > NOCP rather than type UNDEFINSTR). Split them out into a new > EXCP_NOCP so we can report the FSR value correctly. > > Signed-off-b

[Qemu-devel] [PULL 25/41] char: use a const CharDriver

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau No need to allocate & copy fields, let's use static const struct instead. Add an alias field to the CharDriver structure to cover the cases where we previously registered a driver twice under two names. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-of

[Qemu-devel] [PULL 17/41] block: get max_transfer limit for char (scsi-generic) devices

2017-01-27 Thread Paolo Bonzini
From: Eric Farman We can get the maximum number of bytes for a single I/O transfer from the BLKSECTGET ioctl, but we only perform this for block devices. scsi-generic devices are represented as character devices, and so do not issue this today. Update this, so that virtio-scsi devices using the

[Qemu-devel] [PULL 37/41] gtk: overwrite the console.c char driver

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Instead of registering a vc handler to allocate the Gtk VC Chardev, overwrite the console.c char driver. A later patch, when switching to QOM, will register a default console vc QOM class if none has been registered before. Signed-off-by: Marc-André Lureau Reviewed-by:

[Qemu-devel] [PULL 26/41] char: use a static array for backends

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Number and kinds of backends is known at compile-time, use a fixed-sized static array to simplify iterations & lookups. Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- qemu-char.c | 68 ++--- 1 f

Re: [Qemu-devel] [PATCH 08/10] armv7m: Honour CCR.USERSETMPEND

2017-01-27 Thread Alex Bennée
Peter Maydell writes: > From: Michael Davidsaver > > The CCR.USERSETMPEND bit has to be set to permit unprivileged code to > write to the Software Triggered Interrupt register; honour this bit > rather than letting any code write to the register. > > Signed-off-by: Michael Davidsaver > [PMM: T

[Qemu-devel] [PULL 28/41] char: fold single-user functions in caller

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau This shortens the code a bit. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- qemu-char.c | 95 +++-- 1 file changed, 29 insertions(+), 66 deletions(-) diff --git a/qemu

[Qemu-devel] [PULL 23/41] char: add qemu_chr_fe_add_watch() Returns description

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- include/sysemu/char.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sysemu/char.h b/include/sysemu/char.h index 0a14942..b6e3618 100644 --- a/include/sysemu/char.h

[Qemu-devel] [PULL 38/41] baum: use a common prefix for chr callbacks

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- backends/baum.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/backends/baum.c b/backends/baum.c index 23d3c4a..8842936 100644 --- a/backends

Re: [Qemu-devel] [PATCH v2 30/30] target-sparc: fix up niagara machine

2017-01-27 Thread Markus Armbruster
Artyom Tarasenko writes: > On Thu, Jan 26, 2017 at 8:35 AM, Markus Armbruster wrote: >> niagara_init() does something naughty, which conflicts with Max's >> "[PATCH v6 0/9] block: Drop BDS.filename". Details inline. >> >> Artyom Tarasenko writes: >> >>> Remove the Niagara stub implementation f

[Qemu-devel] [PULL 34/41] char: rename TCPChardev and NetChardev

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Rename the types to follow the name of the chardev kind. - socket: TCPChardev -> SocketChardev - udp: NetChardev -> UdpChardev Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- qemu-char.c | 74 ++

[Qemu-devel] [PULL 24/41] doc: fix spelling

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau I am pretty sure that's the word Fabrice Bellard intended to write. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-opt

[Qemu-devel] [PULL 31/41] char: allocate CharDriverState as a single object

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Use a single allocation for CharDriverState, this avoids extra allocations & pointers, and is a step towards more object-oriented CharDriver. Gtk console is a bit peculiar, gd_vc_chr_set_echo() used to have a temporary VirtualConsole to save the echo bit. Instead now, we

Re: [Qemu-devel] [PATCH 1/3] stellaris: Document memory map and which SoC devices are unimplemented

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 14:11, Alex Bennée wrote: > > Peter Maydell writes: > >> Add a comment documenting the memory map of the SoC devices and which >> are not implemented. >> >> Signed-off-by: Peter Maydell >> --- >> hw/arm/stellaris.c | 31 +++ >> 1 file changed, 3

[Qemu-devel] [PULL 40/41] chardev: qom-ify

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau Turn Chardev into Object. qemu_chr_alloc() is replaced by the qemu_chardev_new() constructor. It will call qemu_char_open() to open/intialize the chardev with the ChardevCommon *backend settings. The CharDriver::create() callback is turned into a ChardevClass::open() whi

[Qemu-devel] [PULL 21/41] tests: fix linking test-char on win32

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau test.char.exe fails to link: qemu-char.o: In function `win_chr_free': /home/elmarco/src/qemu/qemu-char.c:2149: undefined reference to `qemu_del_polling_cb' /home/elmarco/src/qemu/qemu-char.c:2151: undefined reference to `qemu_del_polling_cb' qemu-char.o: In function `win

[Qemu-devel] [PULL 39/41] vc: use a common prefix for chr callbacks

2017-01-27 Thread Paolo Bonzini
From: Marc-André Lureau vc_chr_write() is more appropriate than _puts() since no newline is appended, even though it's not used only as a callback. Keep "qemu_chr_parse" prefix, most chardev parse functions use this prefix atm. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Signed-o

Re: [Qemu-devel] [PATCH v2 30/30] target-sparc: fix up niagara machine

2017-01-27 Thread Paolo Bonzini
On 27/01/2017 15:06, Markus Armbruster wrote: >> Is rom_add_file_fixed supposed to mark the memory region read-only? Or >> should it be created read-only before calling rom_add_file_fixed? > I'm not familiar with the memory API, but the fact that you're getting > RW suggests that you need to mark

Re: [Qemu-devel] [PATCH] pflash_cfi01: fix per device sector length in CFI table

2017-01-27 Thread Peter Maydell
On 12 January 2017 at 11:36, Andrew Jones wrote: > On Thu, Jan 12, 2017 at 10:42:41AM +, Peter Maydell wrote: >> Thanks for the patch. I haven't checked against the pflash spec yet, >> but this looks like it's probably the right thing. >> >> The only two machines which use a setup with multipl

Re: [Qemu-devel] [PATCH 10/10] armv7m: R14 should reset to 0xffffffff

2017-01-27 Thread Alex Bennée
Peter Maydell writes: > For M profile (unlike A profile) the reset value of R14 is specified > as 0x. (The rationale is that this is an illegal exception > return value, so if guest code tries to return to it it will result > in a helpful exception.) > > Registers r0 to r12 and the flag

Re: [Qemu-devel] [PATCH 3/3] stellaris: Use the 'unimplemented' device for parts we don't implement

2017-01-27 Thread Alex Bennée
Peter Maydell writes: > Use the 'unimplemented' dummy device to cover regions of the > SoC device memory map which we don't have proper device > implementations for yet. > > Signed-off-by: Peter Maydell Looks good although I couldn't find any Stellaris images to test with so I take the actual

Re: [Qemu-devel] [PULL 0/1] s390x build fix

2017-01-27 Thread Peter Maydell
On 26 January 2017 at 11:03, Cornelia Huck wrote: > The following changes since commit c7f1cf01b8245762ca5864e835d84f6677ae8b1f: > > Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging > (2017-01-25 17:54:14 +) > > are available in the git repository at: > > git://

Re: [Qemu-devel] [PATCH 09/10] armv7m: FAULTMASK should be 0 on reset

2017-01-27 Thread Alex Bennée
Peter Maydell writes: > From: Michael Davidsaver > > For M profile CPUs, FAULTMASK should be 0 on reset, like PRIMASK. > QEMU stores FAULTMASK in the PSTATE F bit, so (as with PRIMASK in the > I bit) we have to clear these to undo the A profile default of 1. > > Update the comment accordingly a

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-27 Thread Igor Mammedov
On Thu, 26 Jan 2017 14:43:04 +0100 Phil Dennis-Jordan wrote: > On 23 January 2017 at 12:12, Igor Mammedov wrote: > >> For reference, my approach to filling out the Xdsdt/Xfacs fields in > >> build_fadt() is essentially the same as for the 32-bit variants from > >> rev1: > >> > >> unsigned xfacs_

Re: [Qemu-devel] [PULL v1] Merge io/ 2017/01/26

2017-01-27 Thread Peter Maydell
On 26 January 2017 at 10:27, Daniel P. Berrange wrote: > The following changes since commit c7f1cf01b8245762ca5864e835d84f6677ae8b1f: > > Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging > (2017-01-25 17:54:14 +) > > are available in the git repository at: > > g

Re: [Qemu-devel] [PATCH 0/4] block/gluster: cleanups for GlfsPreopened

2017-01-27 Thread Eric Blake
On 01/27/2017 04:00 AM, Stefan Hajnoczi wrote: > Code added in commit 6349c15410361d3fe52c9beee309954d606f8ccd ("block/gluster: > memory usage: use one glfs instance per volume") does not follow conventions > and violates QEMU coding style. Although any single issue in isolation is not > worth pat

Re: [Qemu-devel] [PATCH 10/18] tcg/i386: add support for vector opcodes

2017-01-27 Thread Alex Bennée
Kirill Batuzov writes: > To be able to generate vector operations in a TCG backend we need to do > several things. > > 1. We need to tell the register allocator about vector target's register. >In case of x86 we'll use xmm0..xmm7. xmm7 is designated as a scratch >register, others can be

Re: [Qemu-devel] [PATCH v2] vl: Ensure the cpu_synchronize_all_post_init() in the appropriate location

2017-01-27 Thread Alex Bennée
Dou Liyang writes: > At the Qemu initialization, we call the cpu_synchronize_all_post_init() > to synchronize All CPU states to KVM in the ./vl.c::main(). > > Currently, it is called before we initialize the CPUs, which created by > "-device" command, So, these CPUs may be ignored to synchronize

Re: [Qemu-devel] [PATCH v2 30/30] target-sparc: fix up niagara machine

2017-01-27 Thread Artyom Tarasenko
On Fri, Jan 27, 2017 at 3:27 PM, Paolo Bonzini wrote: > > > On 27/01/2017 15:06, Markus Armbruster wrote: >>> Is rom_add_file_fixed supposed to mark the memory region read-only? Or >>> should it be created read-only before calling rom_add_file_fixed? >> I'm not familiar with the memory API, but th

Re: [Qemu-devel] [PATCH 2/3] hw/misc: New "unimplemented" sysbus device

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 14:33, Alex Bennée wrote: > Is there any millage at being able to define areas on the command line > or would we expect every usage of this to be from a board file in the > source? Command line syntax is for life, not just for Christmas, so I'd rather we didn't add any until

Re: [Qemu-devel] [PATCH 1/3] stellaris: Document memory map and which SoC devices are unimplemented

2017-01-27 Thread Alex Bennée
Peter Maydell writes: > Add a comment documenting the memory map of the SoC devices and which > are not implemented. > > Signed-off-by: Peter Maydell > --- > hw/arm/stellaris.c | 31 +++ > 1 file changed, 31 insertions(+) > > diff --git a/hw/arm/stellaris.c b/hw/arm

Re: [Qemu-devel] [PATCH 00/18] Emulate guest vector operations with host vector operations

2017-01-27 Thread Alex Bennée
Kirill Batuzov writes: > The goal of these patch series is to set up an infrastructure to emulate > guest vector operations using host vector operations. Preliminary > experiments show that simply translating loads and stores increases > performance of x264 video codec by 10%. The performance of

Re: [Qemu-devel] [PATCH] pflash_cfi01: fix per device sector length in CFI table

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 14:31, Peter Maydell wrote: > On 12 January 2017 at 11:36, Andrew Jones wrote: >> On Thu, Jan 12, 2017 at 10:42:41AM +, Peter Maydell wrote: >>> Thanks for the patch. I haven't checked against the pflash spec yet, >>> but this looks like it's probably the right thing. >>

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-27 Thread Kevin O'Connor
On Thu, Jan 26, 2017 at 08:59:04PM +0200, Michael S. Tsirkin wrote: > On Thu, Jan 26, 2017 at 07:25:22PM +0100, Laszlo Ersek wrote: > > On 01/26/17 19:15, Michael S. Tsirkin wrote: > > > On Thu, Jan 26, 2017 at 06:43:22PM +0100, Laszlo Ersek wrote: > > >> On 01/26/17 16:20, Michael S. Tsirkin wrote

[Qemu-devel] [PATCH] hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet

2017-01-27 Thread Thomas Huth
The "or-irq" device is just used internally. It's strange to see this device showing up in the "-device ?" help text. Let's mark it with cannot_instantiate_with_device_add_yet to hide it from the users. Signed-off-by: Thomas Huth --- hw/core/or-irq.c | 3 +++ 1 file changed, 3 insertions(+) dif

Re: [Qemu-devel] [PATCH v2 8/8] hw: Drop superfluous special checks for orphaned -drive

2017-01-27 Thread John Snow
On 01/27/2017 06:51 AM, Markus Armbruster wrote: > John Snow writes: > >> On 01/26/2017 10:09 AM, Markus Armbruster wrote: >>> We've traditionally rejected orphans here and there, but not >>> systematically. For instance, the sun4m machines have an onboard SCSI >>> HBA (bus=0), and have always

Re: [Qemu-devel] [PATCH 2/3] hw/misc: New "unimplemented" sysbus device

2017-01-27 Thread Alex Bennée
Peter Maydell writes: > Create a new "unimplemented" sysbus device, which simply accepts > all read and write accesses, and implements them as read-as-zero, > write-ignored, with logging of the access as LOG_UNIMP. > > This is useful for stubbing out bits of an SoC or board model > which haven't

Re: [Qemu-devel] [PATCH] pflash_cfi01: fix per device sector length in CFI table

2017-01-27 Thread Andrew Jones
On Fri, Jan 27, 2017 at 02:54:20PM +, Peter Maydell wrote: > On 27 January 2017 at 14:31, Peter Maydell wrote: > > On 12 January 2017 at 11:36, Andrew Jones wrote: > >> On Thu, Jan 12, 2017 at 10:42:41AM +, Peter Maydell wrote: > >>> Thanks for the patch. I haven't checked against the pfl

[Qemu-devel] [PATCH] hw/core/register: Mark the device with cannot_instantiate_with_device_add_yet

2017-01-27 Thread Thomas Huth
The "qemu,register" device is just used internally. It's strange to see this device showing up in the "-device ?" help text. Let's mark it with cannot_instantiate_with_device_add_yet to hide it from the users. Signed-off-by: Thomas Huth --- hw/core/register.c | 9 + 1 file changed, 9 ins

[Qemu-devel] [Bug 1622547] Re: qemu-system-sparc fatal error Trap 0x29 on Solaris 2.6

2017-01-27 Thread m...@papersolve.com
Yep, this works great for the SS-20 ROM (tested with SS-5 ROM also). Boots all the way to OS (have to use -nographic but that's fine). Thanks! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1622547 Ti

Re: [Qemu-devel] [PATCH] dma: omap: check dma channel data_type

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 12:05, P J P wrote: > From: Prasad J Pandit > > When setting dma channel 'data_type', if (value & 3) == 3, > the set 'data_type' is said to be bad. This also leads to an > OOB access in 'omap_dma_transfer_generic', while doing > cpu_physical_memory_r/w operations. Add check

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-27 Thread Laszlo Ersek
On 01/27/17 15:18, Kevin O'Connor wrote: > On Thu, Jan 26, 2017 at 08:59:04PM +0200, Michael S. Tsirkin wrote: >> On Thu, Jan 26, 2017 at 07:25:22PM +0100, Laszlo Ersek wrote: >>> On 01/26/17 19:15, Michael S. Tsirkin wrote: On Thu, Jan 26, 2017 at 06:43:22PM +0100, Laszlo Ersek wrote: > O

Re: [Qemu-devel] [PULL 30/30] target-sparc: fix up niagara machine

2017-01-27 Thread Jakub Jermář
Hi Artyom, On 01/23/2017 03:10 PM, Artyom Tarasenko wrote: > On Mon, Jan 23, 2017 at 1:40 PM, Peter Maydell > wrote: >> On 18 January 2017 at 22:38, Artyom Tarasenko wrote: >>> Remove the Niagara stub implementation from sun4u.c and add a machine, >>> compatible with Legion simulator from the O

Re: [Qemu-devel] [PULL v2 00/18] virtio, vhost, pci: fixes, features

2017-01-27 Thread Peter Maydell
On 26 January 2017 at 16:15, Michael S. Tsirkin wrote: > The following changes since commit ae5045ae5b2bbd8ce1335d1b05f9ecacca83a6cf: > > Merge remote-tracking branch 'remotes/rth/tags/pull-nios-20170124' into > staging (2017-01-25 13:30:23 +) > > are available in the git repository at: > >

[Qemu-devel] [PULL 21/22] arm_gicv3: Fix broken logic in ELRSR calculation

2017-01-27 Thread Peter Maydell
Fix a broken expression in the calculation of ELRSR register bits: instead of "(lr & ICH_LR_EL2_HW) == 1" we want to check for != 0, because the HW bit is not bit 0 so a test for == 1 is always false. Fixes: https://bugs.launchpad.net/bugs/1658506 Signed-off-by: Peter Maydell Reviewed-by: Thomas

[Qemu-devel] [PULL 22/22] dma: omap: check dma channel data_type

2017-01-27 Thread Peter Maydell
From: Prasad J Pandit When setting dma channel 'data_type', if (value & 3) == 3, the set 'data_type' is said to be bad. This also leads to an OOB access in 'omap_dma_transfer_generic', while doing cpu_physical_memory_r/w operations. Add check to avoid it. Reported-by: Jiang Xin Signed-off-by: P

[Qemu-devel] [PULL 00/22] target-arm queue

2017-01-27 Thread Peter Maydell
in the git repository at: git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20170127 for you to fetch changes up to 146871c33eb70ca7090a0a55e69e5a8f9b5eb102: dma: omap: check dma channel data_type (2017-01-27 15:2

[Qemu-devel] [PULL 20/22] hw/char/exynos4210_uart: Drop unused local variable frame_size

2017-01-27 Thread Peter Maydell
The frame_size local variable in exynos4210_uart_update_parameters() is calculated but never used (and has been this way since the device was introduced in commit e5a4914efc7). The qemu_chr_fe_ioctl() doesn't need this information (if it really wanted it it could calculate it from the parity/data_b

[Qemu-devel] [PULL 19/22] arm: stellaris: make MII accesses complete immediately

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver When the guest attempts to start an MII register access via the MCTL register, clear the START bit, so that when the guest reads it back the register transaction will be signalled as having completed. This avoids the guest spinning as it polls the START bit waiting for it

[Qemu-devel] [PULL 18/22] armv7m: R14 should reset to 0xffffffff

2017-01-27 Thread Peter Maydell
For M profile (unlike A profile) the reset value of R14 is specified as 0x. (The rationale is that this is an illegal exception return value, so if guest code tries to return to it it will result in a helpful exception.) Registers r0 to r12 and the flags are architecturally UNKNOWN on res

[Qemu-devel] [PULL 16/22] armv7m: Honour CCR.USERSETMPEND

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver The CCR.USERSETMPEND bit has to be set to permit unprivileged code to write to the Software Triggered Interrupt register; honour this bit rather than letting any code write to the register. Signed-off-by: Michael Davidsaver Reviewed-by: Alex Bennée Message-id: 14852853

[Qemu-devel] [PULL 13/22] armv7m: honour CCR.STACKALIGN on exception entry

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver The CCR.STACKALIGN bit controls whether the CPU is supposed to force 8-alignment of the stack pointer on entry to the exception handler. Signed-off-by: Michael Davidsaver Message-id: 1485285380-10565-6-git-send-email-peter.mayd...@linaro.org [PMM: commit message and com

[Qemu-devel] [PULL 04/22] armv7m: Explicit error for bad vector table

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver Give an explicit error and abort when a load from the vector table fails. Architecturally this should HardFault (which will then immediately fail to load the HardFault vector and go into Lockup). Since we don't model Lockup, just report this guest error via cpu_abort(). T

[Qemu-devel] [PULL 11/22] armv7m: add state for v7M CCR, CFSR, HFSR, DFSR, MMFAR, BFAR

2017-01-27 Thread Peter Maydell
Add the structure fields, VMState fields, reset code and macros for the v7M system control registers CCR, CFSR, HFSR, DFSR, MMFAR and BFAR. Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Message-id: 1485285380-10565-4-git-send-email-peter.mayd...@linaro.org --- target/arm/cpu.h | 54

[Qemu-devel] [PULL 14/22] armv7m: set CFSR.UNDEFINSTR on undefined instructions

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver When we take an exception for an undefined instruction, set the appropriate CFSR bit. Signed-off-by: Michael Davidsaver Reviewed-by: Alex Bennée Message-id: 1485285380-10565-7-git-send-email-peter.mayd...@linaro.org [PMM: tweaked commit message, comment] Signed-off-by:

[Qemu-devel] [PULL 17/22] armv7m: FAULTMASK should be 0 on reset

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver For M profile CPUs, FAULTMASK should be 0 on reset, like PRIMASK. QEMU stores FAULTMASK in the PSTATE F bit, so (as with PRIMASK in the I bit) we have to clear these to undo the A profile default of 1. Update the comment accordingly and move it so that it's closer to the

[Qemu-devel] [PULL 12/22] armv7m: implement CCR, CFSR, HFSR, DFSR, BFAR, and MMFAR

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver Implement the v7M system registers CCR, CFSR, HFSR, DFSR, BFAR and MMFAR. For the moment these simply read as written (with some basic handling of RAZ/WI bits and W1C semantics). Signed-off-by: Michael Davidsaver Reviewed-by: Alex Bennée Message-id: 1485285380-10565-5

[Qemu-devel] [PULL 08/22] pflash_cfi01: fix per-device sector length in CFI table

2017-01-27 Thread Peter Maydell
For configurations of the pflash_cfi01 device which set it up with a device-width not equal to the width (ie where we are emulating multiple narrow flash devices wired up in parallel), we were giving incorrect values in the CFI data table: (1) the sector length entry should specify the sector leng

[Qemu-devel] [PULL 01/22] aspeed/smc: handle dummy bytes when doing fast reads in command mode

2017-01-27 Thread Peter Maydell
From: Cédric Le Goater When doing fast read, a certain amount of dummy bytes should be sent before the read. This number is configurable in the controler CE0 Control Register and needs to be modeled using fake transfers to the flash module. This only supports command mode. User mode requires mor

[Qemu-devel] [PULL 05/22] hw/registerfields.h: Pull FIELD etc macros out of hw/register.h

2017-01-27 Thread Peter Maydell
hw/register.h provides macros like FIELD which make it easy to define shift, mask and length constants for the fields within a register. Unfortunately register.h also includes a lot of other things, some of which will only compile in the softmmu build. Pull the FIELD macro and friends out into a s

[Qemu-devel] [PULL 03/22] armv7m: Replace armv7m.hack with unassigned_access handler

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver For v7m we need to catch attempts to execute from special addresses at 0xfff0 and above. Previously we did this with the aid of a hacky special purpose lump of memory in the address space and a check in translate.c for whether we were translating code at those address

[Qemu-devel] [PULL 09/22] target/arm: Drop IS_M() macro

2017-01-27 Thread Peter Maydell
We only use the IS_M() macro in two places, and it's a bit of a namespace grab to put in cpu.h. Drop it in favour of just explicitly calling arm_feature() in the places where it was used. Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Message-id: 1485285380-10565-2-git-send-email-peter.m

[Qemu-devel] [PULL 10/22] armv7m_nvic: keep a pointer to the CPU

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver Many NVIC operations access the CPU state, so store a pointer in struct nvic_state rather than fetching it via qemu_get_cpu() every time we need it. As with the arm_gicv3_common code, we currently just call qemu_get_cpu() in the NVIC's realize method, but in future we mi

[Qemu-devel] [PATCH 1/9] memory: make memory_listener_unregister idempotent

2017-01-27 Thread Paolo Bonzini
Make it easy to unregister a MemoryListener without tracking whether it had been registered before. Signed-off-by: Paolo Bonzini --- v3: new memory.c | 5 + 1 file changed, 5 insertions(+) diff --git a/memory.c b/memory.c index 2bfc37f..8fafd4c 100644 --- a/memory.c +++ b/memory.c

[Qemu-devel] [PATCH 3/9] virtio: use address_space_map/unmap to access descriptors

2017-01-27 Thread Paolo Bonzini
This makes little difference, but it makes the code change smaller for the next patch that introduces MemoryRegionCache. This is because map/unmap are similar to MemoryRegionCache init/destroy. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- v3: "goto done" when a descript

<    1   2   3   >