Re: [Qemu-devel] [RFC 02/10] fdc: add default drive type option

2015-07-03 Thread Markus Armbruster
John Snow writes: > On 07/03/2015 09:18 AM, Markus Armbruster wrote: [...] >>> diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h >>> index 0cfff1c..0872b41 100644 >>> --- a/include/hw/qdev-properties.h >>> +++ b/include/hw/qdev-properties.h >>> @@ -20,6 +20,7 @@ extern Prop

Re: [Qemu-devel] [RFC 03/10] fdc: respect default drive type

2015-07-03 Thread Markus Armbruster
John Snow writes: > On 07/03/2015 09:34 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> Respect the default drive type as proffered via the CLI. >>> >>> This patch overloads the "drive out" parameter of pick_geometry >>> to be used as a "default hint" which is offered by fd_revalidate.

[Qemu-devel] [PULL 30/35] ahci: add cmd header to ncq transfer state

2015-07-03 Thread John Snow
While the rest of the AHCI device can rely on a single bookmarked pointer for the AHCI Command Header currently being processed, NCQ is asynchronous and may have many commands in flight simultaneously. Add a cmdh pointer to the ncq_tfs object and make the sglist prepare function take an AHCICmdHea

[Qemu-devel] [PULL 28/35] ahci: correct ncq sector count

2015-07-03 Thread John Snow
uint16_t isn't enough to hold the real sector count, since a value of zero implies a full 64K sectors, so we need a uint32_t here. We *could* cheat and pretend that this value is 0-based and fit it in a uint16_t, but I'd rather waste 2 bytes instead of a future dev's 10 minutes when they forget to

[Qemu-devel] [PULL 25/35] ahci: factor ncq_finish out of ncq_cb

2015-07-03 Thread John Snow
When we add werror=stop or rerror=stop support to NCQ, we'll want to take a codepath where we don't actually complete the command, so factor that out into a new routine. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435767578-32743-6-git-send-email-js...@redhat.com --- hw/i

[Qemu-devel] [PULL 22/35] ahci: stash ncq command

2015-07-03 Thread John Snow
For migration and werror=stop/rerror=stop resume purposes, it will be convenient to have the command handy inside of ncq_tfs. Eventually, we'd like to avoid reading from the FIS entirely after the initial read, so this is a byte (hah!) sized step in that direction. Signed-off-by: John Snow Revie

[Qemu-devel] [PULL 19/35] qtest/ahci: simple ncq data test

2015-07-03 Thread John Snow
Test the NCQ pathways for a simple IO RW test. Also, test that libqos doesn't explode when running NCQ commands :) Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-16-git-send-email-js...@redhat.com --- tests/ahci-test.c | 13 + tests/libqos/ahci.c

[Qemu-devel] [PULL 20/35] qtest/ahci: ncq migration test

2015-07-03 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-17-git-send-email-js...@redhat.com --- tests/ahci-test.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 0d117fe..3f06fd9 100644

[Qemu-devel] [PULL 17/35] libqos/ahci: set the NCQ tag on command_commit

2015-07-03 Thread John Snow
NCQ commands have the concept of a "TAG" that they need to set, but in the AHCI world, it is mandated that the TAG always match the command slot that you executed the NCQ from. See AHCI 9.3.1.1.5.2 "Native Queued Commands". Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 14350

[Qemu-devel] [PULL 35/35] ahci: fix sdb fis semantics

2015-07-03 Thread John Snow
There are two things to fix here: The first one is subtle: the PxSACT register in the AHCI HBA has different semantics from the field it is shadowing, the ACT field in the Set Device Bits FIS. In the HBA register, PxSACT acts as a bitfield indicating outstanding NCQ commands where a set bit indic

[Qemu-devel] [PULL 32/35] ahci: ncq migration

2015-07-03 Thread John Snow
Migrate the NCQ queue. This is solely for the benefit of halted commands, since anything else should have completed and had any relevant status flushed to the HBA registers already. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435767578-32743-13-git-send-email-js...@redhat.

[Qemu-devel] [PULL 13/35] libqos/ahci: fix cmd_sanity for ncq

2015-07-03 Thread John Snow
NCQ commands should not / do not update the byte count in the command header post command, so this field is meaningless for NCQ tests. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-10-git-send-email-js...@redhat.com --- tests/libqos/ahci.c | 46 ++

[Qemu-devel] [PULL 34/35] qtest/ahci: halted ncq migration test

2015-07-03 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435767578-32743-15-git-send-email-js...@redhat.com --- tests/ahci-test.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index c30837b..87d7691 100644

[Qemu-devel] [PULL 33/35] ahci: Do not map cmd_fis to generate response

2015-07-03 Thread John Snow
The Register D2H FIS should copy the current values of the registers instead of just parroting back the same values the guest sent back to it. In this case, the SECTOR COUNT variables are actually not generally meaningful in terms of standard commands (See ATA8-AC3 Section 9.2 Normal Outputs), so

[Qemu-devel] [PULL 29/35] qtest/ahci: halted NCQ test

2015-07-03 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435767578-32743-10-git-send-email-js...@redhat.com --- tests/ahci-test.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 3f06fd9..c30837b 100644

[Qemu-devel] [PULL 26/35] ahci: add rwerror=stop support for ncq

2015-07-03 Thread John Snow
Handle NCQ failures for cases where we want to halt the VM on IO errors. Upon a VM state change, retry the halted NCQ commands. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435767578-32743-7-git-send-email-js...@redhat.com --- hw/ide/ahci.c | 36 +++

[Qemu-devel] [PULL 09/35] ahci: separate prdtl from opts

2015-07-03 Thread John Snow
There's no real reason to have it bundled together, and this way is a little nicer to follow if you have the AHCI spec pulled up. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-6-git-send-email-js...@redhat.com --- hw/ide/ahci.c | 23 --- h

[Qemu-devel] [PULL 31/35] ahci: add get_cmd_header helper

2015-07-03 Thread John Snow
cur_cmd is an internal bookmark that points to the current AHCI Command Header being processed by the AHCI state machine. With NCQ needing to occasionally rely on some of the same AHCI helpers, we cannot use cur_cmd and will need to grab explicit pointers instead. In an attempt to begin relying on

[Qemu-devel] [PULL 18/35] libqos/ahci: Force all NCQ commands to be LBA48

2015-07-03 Thread John Snow
NCQ commands are LBA48 by definition. See SATA 3.2 13.6.4.1 "READ FPDMA QUEUED", or SATA 3.2 13.6.5.1 "WRITE FPDMA QUEUED." Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-15-git-send-email-js...@redhat.com --- tests/libqos/ahci.c | 2 +- 1 file changed, 1

[Qemu-devel] [PULL 27/35] ahci: correct types in NCQTransferState

2015-07-03 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435767578-32743-8-git-send-email-js...@redhat.com --- hw/ide/ahci.c | 10 +- hw/ide/ahci.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index d996f37..efd07ac 100

[Qemu-devel] [PULL 08/35] ahci: check for ncq prdtl overflow

2015-07-03 Thread John Snow
Don't attempt the NCQ transfer if the PRDT we were given is not big enough to perform the entire transfer. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-5-git-send-email-js...@redhat.com --- hw/ide/ahci.c | 20 +++- 1 file changed, 15 insertio

[Qemu-devel] [PULL 24/35] ahci: refactor process_ncq_command

2015-07-03 Thread John Snow
Split off execute_ncq_command so that we can call it separately later if we desire. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435767578-32743-5-git-send-email-js...@redhat.com --- hw/ide/ahci.c | 73 ++- 1 file cha

[Qemu-devel] [PULL 23/35] ahci: assert is_ncq for process_ncq

2015-07-03 Thread John Snow
We already checked this in the handle_cmd phase, so just change this to an assertion and simplify the error logic. (Also, fix the switch indent, because checkpatch.pl yelled.) ((Sorry for churn.)) Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435767578-32743-4-git-send-emai

[Qemu-devel] [PULL 07/35] ahci: add ncq_err helper

2015-07-03 Thread John Snow
Set some appropriate error bits for NCQ for us. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-4-git-send-email-js...@redhat.com --- hw/ide/ahci.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c

[Qemu-devel] [PULL 14/35] libqos/ahci: add NCQ frame support

2015-07-03 Thread John Snow
NCQ frames are generated a little differently than their non-NCQ cousins. Add support for them. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-11-git-send-email-js...@redhat.com --- tests/libqos/ahci.c | 44 +++- tests/l

[Qemu-devel] [PULL 21/35] ide: add limit to .prepare_buf()

2015-07-03 Thread John Snow
prepare_buf should not always grab as many descriptors as it can, sometimes it should self-limit. For example, an NCQ transfer of 1 sector with a PRDT that describes 4GiB of data should not copy 4GiB of data, it should just transfer that first 512 bytes. PIO is not affected, because the dma_buf_r

[Qemu-devel] [PULL 12/35] ahci/qtest: Execute IDENTIFY prior to data commands

2015-07-03 Thread John Snow
If you try to execute an NCQ command before trying to engage with the device by issuing an IDENTIFY command, the error bits that are part of the signature will fool the test suite into thinking there was a failure. Issue IDENTIFY first on "boot", which will clear the signature out of the registers

[Qemu-devel] [PULL 03/35] libqos/ahci: fix memory management bugs

2015-07-03 Thread John Snow
There's a handful of trivial bugs in the libqos/ahci functions, squish them together. - Zero cached pointers after freeing them - The Command List Buffer is an array of 32x 32 byte structures, not 32x 8 byte pointers -- it's 1MiB, not 256 bytes. Zero it ALL. - Free the correct command in ahci_pi

[Qemu-devel] [PULL 16/35] libqos/ahci: adjust expected NCQ interrupts

2015-07-03 Thread John Snow
NCQ commands will expect the SDBS interrupt, and in the normative case, do not expect to see a D2H Register FIS unless something went wrong. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-13-git-send-email-js...@redhat.com --- tests/libqos/ahci.c | 9 +++--

[Qemu-devel] [PULL 15/35] libqos/ahci: edit wait to be ncq aware

2015-07-03 Thread John Snow
The wait command should check to make sure SACT is clear as well as the Command Issue register. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-12-git-send-email-js...@redhat.com --- tests/libqos/ahci.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deleti

[Qemu-devel] [PULL 04/35] qtest/ahci: add port_reset test

2015-07-03 Thread John Snow
Test that we can survive a couple of cycles of running a basic identify test, some IO, and resetting the HBA. Ensures that we can bring the HBA back to compliant spec during the lifecycle of the VM. Signed-off-by: John Snow Message-id: 1434470575-21625-5-git-send-email-js...@redhat.com --- tests

[Qemu-devel] [PULL 10/35] ahci: add ncq debug checks

2015-07-03 Thread John Snow
Most of the time, these bits can be safely ignored. For the purposes of debugging however, it's nice to know that they're not being used. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-7-git-send-email-js...@redhat.com --- hw/ide/ahci.c | 23 ++

[Qemu-devel] [PULL 11/35] ahci: ncq sector count correction

2015-07-03 Thread John Snow
This value should not be size-corrected, 0 sectors does not imply 1 sector(s). This is just debug information, but it's misleading! Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-8-git-send-email-js...@redhat.com --- hw/ide/ahci.c | 6 +++--- 1 file changed, 3

[Qemu-devel] [PULL 05/35] ahci: Rename NCQFIS structure fields

2015-07-03 Thread John Snow
Several fields of the NCQFIS structure are ambiguously named. This patch clarifies the intended (if unsupported) usage of the NCQ fields to aid in creating more meaningful debug messages through the NCQ codepaths. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-

[Qemu-devel] [PULL 01/35] ahci: Do not ignore memory access read size

2015-07-03 Thread John Snow
The only guidance the AHCI specification gives on memory access is: "Register accesses shall have a maximum size of 64-bits; 64-bit access must not cross an 8-byte alignment boundary." I interpret this to mean that aligned or unaligned 1, 2 and 4 byte accesses should work, as well as aligned 8 byt

[Qemu-devel] [PULL 02/35] qtest/ahci: add test_max

2015-07-03 Thread John Snow
Test that the FIS delivered after a nondata command has appropriately updated registers, just as we'd expect a data command to do. Signed-off-by: John Snow Message-id: 1434470575-21625-3-git-send-email-js...@redhat.com --- tests/ahci-test.c | 50 +-

[Qemu-devel] [PULL 06/35] ahci: use shorter variables

2015-07-03 Thread John Snow
Trivial cleanup that I didn't want to tack-on to anything else. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Message-id: 1435016308-6150-3-git-send-email-js...@redhat.com --- hw/ide/ahci.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/ide/ah

[Qemu-devel] [PULL 00/35] Ide patches

2015-07-03 Thread John Snow
The following changes since commit 35360642d043c2a5366e8a04a10e5545e7353bd5: Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20150703-1' into staging (2015-07-03 12:05:31 +0100) are available in the git repository at: https://github.com/jnsnow/qemu.git tags/ide-pu

Re: [Qemu-devel] [RFC 03/10] fdc: respect default drive type

2015-07-03 Thread John Snow
On 07/03/2015 09:34 AM, Markus Armbruster wrote: > John Snow writes: > >> Respect the default drive type as proffered via the CLI. >> >> This patch overloads the "drive out" parameter of pick_geometry >> to be used as a "default hint" which is offered by fd_revalidate. >> >> Signed-off-by: John

Re: [Qemu-devel] [RFC 08/10] fdc: refactor pick_geometry

2015-07-03 Thread John Snow
On 07/03/2015 09:45 AM, Markus Armbruster wrote: > John Snow writes: > >> This one is the crazy one. > > I'm afraid I don't have the mental capacity to properly review this one > right now. > > From what I've understood of your series so far, it's a strict decrease > of fdc craziness. Thanks

Re: [Qemu-devel] [RFC 06/10] fdc: add physical disk sizes

2015-07-03 Thread John Snow
On 07/03/2015 09:38 AM, Markus Armbruster wrote: > John Snow writes: > >> 2.88MB capable drives can accept 1.44MB floppies, >> for instance. To rework the pick_geometry function, >> we need to know if our current drive can even accept >> the type of disks we're considering. >> >> NB: This allow

Re: [Qemu-devel] [RFC 02/10] fdc: add default drive type option

2015-07-03 Thread John Snow
On 07/03/2015 09:18 AM, Markus Armbruster wrote: > John Snow writes: > >> We want to change the current default drive type, >> but to be kind, we need to allow users to specify >> the old drive type somehow. > > Uh, what is *this* commit about? as far as I can tell, it adds drive > type prope

Re: [Qemu-devel] SATA CD-ROM booting failure with latest OVMF

2015-07-03 Thread John Snow
On 07/03/2015 10:15 AM, Hannes Reinecke wrote: > > After some _very_ tedious debugging I've found this to be an issue > with the ahci driver in qemu; ATAPI PIO transfers seem to be > slightly buggy. Enabling 'atapi_dma' transfers in atapi driver (even > for PIO mode) makes everything work again.

Re: [Qemu-devel] [Qemu-block] NVMe volatile write cache fixes

2015-07-03 Thread Christoph Hellwig
On Wed, Jun 17, 2015 at 02:24:06PM +0200, Kevin Wolf wrote: > Am 17.06.2015 um 13:59 hat Christoph Hellwig geschrieben: > > Thank Eric. > > > > Kevin, > > > > do you want me to resend the series with these cover letter/cc fixes or > > is it okay this time? > > It's not worth a respin. I'm just w

Re: [Qemu-devel] [PATCH qemu v7 06/14] spapr_iommu: Introduce "enabled" state for TCE table

2015-07-03 Thread Alexey Kardashevskiy
On 05/27/2015 05:05 PM, Paolo Bonzini wrote: On 27/05/2015 01:55, Alexey Kardashevskiy wrote: One step back :) Whole dance is what here? There are: 1) del+set_size(0) 2) set_size(not zero)+add Then no need for begin/commit. :) I got a new problem here - set_size(0) + set_size(not 0) do not

Re: [Qemu-devel] [PATCH] exec: skip MMIO regions correctly in cpu_physical_memory_write_rom_internal

2015-07-03 Thread Laurent Vivier
On 04/07/2015 00:42, Paolo Bonzini wrote: > Loading the BIOS in the mac99 machine is interesting, because there is a > PROM in the middle of the BIOS region (from 16K to 32K). Before memory > region accesses were clamped, when QEMU was asked to load a BIOS from > 0xfff0 to 0x it woul

[Qemu-devel] [PATCH] exec: skip MMIO regions correctly in cpu_physical_memory_write_rom_internal

2015-07-03 Thread Paolo Bonzini
Loading the BIOS in the mac99 machine is interesting, because there is a PROM in the middle of the BIOS region (from 16K to 32K). Before memory region accesses were clamped, when QEMU was asked to load a BIOS from 0xfff0 to 0x it would put even those 16K from the BIOS file into the reg

Re: [Qemu-devel] [PATCH 1/3] exec.c: Don't call cpu_reload_memory_map() from cpu_exec_init()

2015-07-03 Thread Edgar E. Iglesias
On Fri, Jul 03, 2015 at 04:11:41PM +0100, Peter Maydell wrote: > Currently we call cpu_reload_memory_map() from cpu_exec_init(), > but this is not necessary: > * KVM doesn't use the data structures maintained by >cpu_reload_memory_map() (the TLB and cpu->memory_dispatch) > * for TCG, we will

Re: [Qemu-devel] [PATCH pic32 v2 4/5] Two new processor variants: M4K and microAptivP.

2015-07-03 Thread Maciej W. Rozycki
On Wed, 1 Jul 2015, Aurelien Jarno wrote: > > diff --git a/target-mips/translate_init.c b/target-mips/translate_init.c > > index ddfaff8..430a547 100644 > > --- a/target-mips/translate_init.c > > +++ b/target-mips/translate_init.c > > @@ -232,6 +232,52 @@ static const mips_def_t mips_defs[] = > >

Re: [Qemu-devel] [PATCH pic32 v2 2/5] Fixed random index generation for TLBWR instruction. It was not quite random and did not skip Wired entries.

2015-07-03 Thread Maciej W. Rozycki
On Wed, 1 Jul 2015, Aurelien Jarno wrote: > Secondly, I don't think calling random() is the correct thing to do. > It's an expensive function that is not thread safe. Quoting the > specification: > > "Within the required constraints of the upper and lower bounds, the > manner in which the pro

Re: [Qemu-devel] [PATCH v8 6/8] vmport_rpc: Add QMP access to vmport_rpc object.

2015-07-03 Thread Don Slutz
On 07/03/15 13:56, Markus Armbruster wrote: Don Slutz writes: On 07/02/15 10:11, Markus Armbruster wrote: Don Slutz writes: From: Don Slutz This adds one new inject command: inject-vmport-action And three guest info commands: vmport-guestinfo-set vmport-guestinfo-get query-vmport-gues

Re: [Qemu-devel] [PULL 0/3] X86 queue, 2015-07-03

2015-07-03 Thread Andreas Färber
Am 03.07.2015 um 22:47 schrieb Eduardo Habkost: > > X86 queue, 2015-07-03 > > > > Jan Kiszka (1): > i386: Introduce ARAT CPU feature > > Paolo Bonzini (1): > targ

[Qemu-devel] [PULL 5/6] numa: Store boot memory address range in node_info

2015-07-03 Thread Eduardo Habkost
From: Bharata B Rao Store memory address range information of boot memory in address range list of numa_info. This helps to have a common NUMA node lookup by address function that works for both boot-time memory and hotplugged memory. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Te

[Qemu-devel] [PULL 4/6] numa, pc-dimm: Store pc-dimm memory information in numa_info

2015-07-03 Thread Eduardo Habkost
From: Bharata B Rao Start storing the (start_addr, end_addr) of the pc-dimm memory in corresponding numa_info[node] so that this information can be used to lookup node by address. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signe

[Qemu-devel] [PULL 2/6] pc, pc-dimm: Factor out reusable parts in pc_dimm_plug to a separate routine

2015-07-03 Thread Eduardo Habkost
From: Bharata B Rao pc_dimm_plug() has code that will be needed for memory plug handlers in other archs too. Extract code from pc_dimm_plug() into a generic routine pc_dimm_memory_plug() that resides in pc-dimm.c. Also correspondingly refactor re-usable unplug code into pc_dimm_memory_unplug().

[Qemu-devel] [PULL 6/6] numa: API to lookup NUMA node by address

2015-07-03 Thread Eduardo Habkost
From: Bharata B Rao Introduce an API numa_get_node(ram_addr_t addr, Error **errp) that returns the NUMA node to which the given address belongs to. This API works uniformly for both boot time as well as hotplugged memory. This API is needed by sPAPR PowerPC to support ibm,dynamic-reconfiguration

[Qemu-devel] [PULL 0/6] NUMA queue, 2015-07-03

2015-07-03 Thread Eduardo Habkost
The following changes since commit 35360642d043c2a5366e8a04a10e5545e7353bd5: Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20150703-1' into staging (2015-07-03 12:05:31 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/numa-pu

[Qemu-devel] [PULL 1/6] pc, pc-dimm: Extract hotplug related fields in PCMachineState to a structure

2015-07-03 Thread Eduardo Habkost
From: Bharata B Rao Move hotplug_memory_base and hotplug_memory fields of PCMachineState into a separate structure so that the same can be made use of from other architectures supporing memory hotplug. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Reviewed-by: Igor Mammedov Tested-by

[Qemu-devel] [PULL 3/6] pc: Abort if HotplugHandlerClass::plug() fails

2015-07-03 Thread Eduardo Habkost
From: Bharata B Rao HotplugHandlerClass::plug() shouldn't fail and hence use error_abort to abort if it fails. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Reviewed-by: Igor Mammedov Tested-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 2 +- 1 file changed,

[Qemu-devel] [PULL 3/3] target-i386: emulate CPUID level of real hardware

2015-07-03 Thread Eduardo Habkost
From: Radim Krčmář W10 insider has a bug where it ignores CPUID level and interprets CPUID.(EAX=07H, ECX=0H) incorrectly, because CPUID in fact returned CPUID.(EAX=04H, ECX=0H); this resulted in execution of unsupported instructions. While it's a Windows bug, there is no reason to emulate incor

[Qemu-devel] [PULL 2/3] target-i386: avoid overflow in the tsc-frequency property

2015-07-03 Thread Eduardo Habkost
From: Paolo Bonzini The TSC frequency fits comfortably in an int when expressed in kHz, but it may overflow when converted to Hz. In this case, tsc-frequency returns a negative value because x86_cpuid_get_tsc_freq does a 32-bit multiplication before assigning to int64_t. For simplicity just mak

[Qemu-devel] [PULL 1/3] i386: Introduce ARAT CPU feature

2015-07-03 Thread Eduardo Habkost
From: Jan Kiszka ARAT signals that the APIC timer does not stop in power saving states. As our APICs are emulated, it's fine to expose this feature to guests, at least when asking for KVM host features or with CPU types that include the flag. The exact model number that introduced the feature is

[Qemu-devel] [PULL 0/3] X86 queue, 2015-07-03

2015-07-03 Thread Eduardo Habkost
The following changes since commit 35360642d043c2a5366e8a04a10e5545e7353bd5: Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20150703-1' into staging (2015-07-03 12:05:31 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/x86-pu

Re: [Qemu-devel] [PATCH] Stop including qemu-common.h in memory.h

2015-07-03 Thread Paolo Bonzini
On 03/07/2015 16:18, Peter Maydell wrote: > Including qemu-common.h from other header files is generally a bad > idea, because it means it's very easy to end up with a circular > dependency. For instance, if we wanted to include memory.h from > qom/cpu.h we'd end up with this loop: > memory.h -> q

Re: [Qemu-devel] [PATCH COLO-Frame v6 03/31] COLO: migrate colo related info to slave

2015-07-03 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > We can know if VM in destination should go into COLO mode by refer to > the info that has been migrated from PVM. > > Signed-off-by: zhanghailiang > Signed-off-by: Yang Hongyang > Signed-off-by: Lai Jiangshan > Signed-off-by: Gonglei >

Re: [Qemu-devel] [PATCH v8 6/8] vmport_rpc: Add QMP access to vmport_rpc object.

2015-07-03 Thread Markus Armbruster
Don Slutz writes: > On 07/02/15 10:11, Markus Armbruster wrote: >> Don Slutz writes: >> >>> From: Don Slutz >>> >>> This adds one new inject command: >>> >>> inject-vmport-action >>> >>> And three guest info commands: >>> >>> vmport-guestinfo-set >>> vmport-guestinfo-get >>> query-vmport-guesti

Re: [Qemu-devel] [PATCH COLO-Frame v6 01/31] configure: Add parameter for configure to enable/disable COLO support

2015-07-03 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > configure --enable-colo/--disable-colo to switch COLO > support on/off. > COLO support is off by default. > > Signed-off-by: zhanghailiang > Signed-off-by: Yang Hongyang > Signed-off-by: Gonglei > Signed-off-by: Lai Jiangshan > --- > c

Re: [Qemu-devel] [PATCH] Stop including qemu-common.h in memory.h

2015-07-03 Thread Peter Maydell
On 3 July 2015 at 18:26, Markus Armbruster wrote: > Peter Maydell writes: > >> Including qemu-common.h from other header files is generally a bad >> idea, because it means it's very easy to end up with a circular >> dependency. For instance, if we wanted to include memory.h from >> qom/cpu.h we'd

Re: [Qemu-devel] [PATCH] Stop including qemu-common.h in memory.h

2015-07-03 Thread Markus Armbruster
Peter Maydell writes: > Including qemu-common.h from other header files is generally a bad > idea, because it means it's very easy to end up with a circular > dependency. For instance, if we wanted to include memory.h from > qom/cpu.h we'd end up with this loop: > memory.h -> qemu-common.h -> cp

Re: [Qemu-devel] How to break cpu_tb_exec()?

2015-07-03 Thread Jun Koi
On Sat, Jul 4, 2015 at 1:12 AM, Peter Maydell wrote: > On 3 July 2015 at 18:10, Jun Koi wrote: > > On Sat, Jul 4, 2015 at 1:06 AM, Peter Maydell > > wrote: > >> On 3 July 2015 at 18:02, Jun Koi wrote: > >> > If this is true, then what if this TB is running infinitely, and do > not > >> > retur

Re: [Qemu-devel] How to break cpu_tb_exec()?

2015-07-03 Thread Peter Maydell
On 3 July 2015 at 18:10, Jun Koi wrote: > On Sat, Jul 4, 2015 at 1:06 AM, Peter Maydell > wrote: >> On 3 July 2015 at 18:02, Jun Koi wrote: >> > If this is true, then what if this TB is running infinitely, and do not >> > return, or it is in a very long loop? In this case, TCG thread cannot be >

Re: [Qemu-devel] How to break cpu_tb_exec()?

2015-07-03 Thread Jun Koi
On Sat, Jul 4, 2015 at 1:06 AM, Peter Maydell wrote: > On 3 July 2015 at 18:02, Jun Koi wrote: > > I am looking at how the main thread interrupts TCG thread. Inside > > cpu-exec.c, in function cpu_tb_exec(), I can see that it executes one TB, > > and when this is over, it can check for events fr

Re: [Qemu-devel] How to break cpu_tb_exec()?

2015-07-03 Thread Peter Maydell
On 3 July 2015 at 18:02, Jun Koi wrote: > I am looking at how the main thread interrupts TCG thread. Inside > cpu-exec.c, in function cpu_tb_exec(), I can see that it executes one TB, > and when this is over, it can check for events from other threads (like main > thread). This is the reason why T

Re: [Qemu-devel] [PATCH for-2.4] hw/intc/arm_gic_common.c: Reset all registers

2015-07-03 Thread Peter Maydell
On 29 June 2015 at 19:25, Peter Maydell wrote: > The arm_gic_common reset function was missing reset code for > several of the GIC's state fields: > * bpr[] > * abpr[] > * priority1[] > * priority2[] > * sgi_pending[] > * irq_target[] (SMP configurations only) > > These probably went unnotic

[Qemu-devel] How to break cpu_tb_exec()?

2015-07-03 Thread Jun Koi
Hello, I am looking at how the main thread interrupts TCG thread. Inside cpu-exec.c, in function cpu_tb_exec(), I can see that it executes one TB, and when this is over, it can check for events from other threads (like main thread). This is the reason why TCG thread can be interrupted. Is my unde

Re: [Qemu-devel] [PATCH v8 6/8] vmport_rpc: Add QMP access to vmport_rpc object.

2015-07-03 Thread Don Slutz
On 07/02/15 10:11, Markus Armbruster wrote: Don Slutz writes: From: Don Slutz This adds one new inject command: inject-vmport-action And three guest info commands: vmport-guestinfo-set vmport-guestinfo-get query-vmport-guestinfo More details in qmp-commands.hx Signed-off-by: Don Slutz

Re: [Qemu-devel] [PATCH COLO-BLOCK v7 00/17] Block replication for continuous checkpoints

2015-07-03 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > Block replication is a very important feature which is used for > continuous checkpoints(for example: COLO). > > Usage: > Please refer to docs/block-replication.txt > > You can get the patch here: > https://github.com/wencongyang/qemu-colo/commits/bl

Re: [Qemu-devel] [PATCH 0/3] exec: Collect CPU's AddressSpace info into its own struct

2015-07-03 Thread Paolo Bonzini
On 03/07/2015 17:11, Peter Maydell wrote: > Patch 2 is a comment change which I hope Paolo will review to tell > me if I've misunderstood things :-) Yes, the comment summarizes our discussions from yesterday pretty well. Paolo

[Qemu-devel] [PATCH 0/3] exec: Collect CPU's AddressSpace info into its own struct

2015-07-03 Thread Peter Maydell
This patchset is a bit of groundwork heading in the direction of supporting multiple AddressSpaces per CPU. It does actually do something useful (handle a FIXME remark in tcg_commit()) so I've put it out for that reason and for some early comments. Patch 1 is just removing an unnecessary call to c

[Qemu-devel] [PATCH 2/3] cpu-exec.c: Clarify comment about cpu_reload_memory_map()'s RCU operations

2015-07-03 Thread Peter Maydell
The reason for cpu_reload_memory_map()'s RCU operations is not so much because the guest could make the critical section very long, but that it could have a critical section within which it made an arbitrary number of changes to the memory map and thus accumulate an unbounded amount of memory data

[Qemu-devel] [PATCH 1/3] exec.c: Don't call cpu_reload_memory_map() from cpu_exec_init()

2015-07-03 Thread Peter Maydell
Currently we call cpu_reload_memory_map() from cpu_exec_init(), but this is not necessary: * KVM doesn't use the data structures maintained by cpu_reload_memory_map() (the TLB and cpu->memory_dispatch) * for TCG, we will call this function via tcg_commit() either as soon as tcg_cpu_address_

[Qemu-devel] [PATCH 3/3] exec.c: Collect AddressSpace related fields into a CPUAddressSpace struct

2015-07-03 Thread Peter Maydell
Gather up all the fields currently in CPUState which deal with the CPU's AddressSpace into a separate CPUAddressSpace struct. This paves the way for allowing the CPU to know about more than one AddressSpace. The rearrangement also allows us to make the MemoryListener a directly embedded object in

[Qemu-devel] [PATCH v2] opts: produce valid command line in qemu_opts_print

2015-07-03 Thread Kővágó, Zoltán
This will let us print options in a format that the user would actually write it on the command line (foo=bar,baz=asd,etc=def), without prepending a spurious comma at the beginning of the list, or quoting values unnecessarily. This patch provides the following changes: * write and id=, if the opti

Re: [Qemu-devel] [PATCH] opts: produce valid command line in qemu_opts_print

2015-07-03 Thread Markus Armbruster
"Kővágó Zoltán" writes: > 2015-07-03 15:01 keltezéssel, Markus Armbruster írta: >> "Kővágó, Zoltán" writes: >> >>> This will let us print options in a format that the user would actually >>> write it on the command line (foo=bar,baz=asd,etc=def), without >>> prepending a spurious comma at the be

[Qemu-devel] [PATCH] Stop including qemu-common.h in memory.h

2015-07-03 Thread Peter Maydell
Including qemu-common.h from other header files is generally a bad idea, because it means it's very easy to end up with a circular dependency. For instance, if we wanted to include memory.h from qom/cpu.h we'd end up with this loop: memory.h -> qemu-common.h -> cpu.h -> cpu-qom.h -> qom/cpu.h -> m

[Qemu-devel] SATA CD-ROM booting failure with latest OVMF

2015-07-03 Thread Hannes Reinecke
Hi all, I've updated OVMF to use the SATA controller, so that I could finally use the Q35 machine specification with OVMF. However, upon doing so I found that the (SATA) CD-ROM wouldn't work anymore; directories on the CD-ROM can be read, but the file listing contained only garbage. After some _

Re: [Qemu-devel] [PATCH] opts: produce valid command line in qemu_opts_print

2015-07-03 Thread Kővágó Zoltán
2015-07-03 15:01 keltezéssel, Markus Armbruster írta: "Kővágó, Zoltán" writes: This will let us print options in a format that the user would actually write it on the command line (foo=bar,baz=asd,etc=def), without prepending a spurious comma at the beginning of the list, or quoting values unn

[Qemu-devel] [PATCH v2 5/6] qapi: change Netdev into a flat union

2015-07-03 Thread Kővágó, Zoltán
Except qapi-schema.json, this patch was generated by: find . -name .git -prune -o -type f \! -name '*~' -print0 | \ xargs -0 sed -i \ -e 's/NetClientOptionsKind/NetClientDriver/g' \ -e 's/NET_CLIENT_OPTIONS_KIND_/NET_CLIENT_DRIVER_/g' \ -e 's/netdev->opts/netdev/g' Signed-off-by: K

[Qemu-devel] [PATCH v2 4/6] net: use Netdev instead of NetClientOptions in client init

2015-07-03 Thread Kővágó, Zoltán
This way we no longer need NetClientOptions and can convert Netdev into a flat union. Signed-off-by: Kővágó, Zoltán --- net/clients.h| 20 ++-- net/dump.c | 6 +++--- net/hub.c| 6 +++--- net/l2tpv3.c | 6 +++--- net/net.c| 29 ++--

[Qemu-devel] [PATCH v2 3/6] net: remove NetLegacy struct

2015-07-03 Thread Kővágó, Zoltán
NetLegacy is just Netdev with some extra fields (name, vlan) and an optional id. This patch merges the two structs, and net_client_init1 got some extra checks to make sure only accept valid -netdev command lines. This is some extra work, but allows us to uniformly manage both legacy -net and non-

Re: [Qemu-devel] [RFC 08/10] fdc: refactor pick_geometry

2015-07-03 Thread Markus Armbruster
John Snow writes: > This one is the crazy one. I'm afraid I don't have the mental capacity to properly review this one right now. >From what I've understood of your series so far, it's a strict decrease of fdc craziness. Thanks!

[Qemu-devel] [PATCH v2 2/6] qapi: convert NumaOptions into a flat union

2015-07-03 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- numa.c | 2 +- qapi-schema.json | 47 --- 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/numa.c b/numa.c index 91fc6c1..8b0755d 100644 --- a/numa.c +++ b/numa.c @@ -140,7 +140,7 @@ static in

[Qemu-devel] [PATCH v2 1/6] qapi: support implicit structs in OptsVisitor

2015-07-03 Thread Kővágó, Zoltán
They are required for flat unions (you still have to allocate the structs). Signed-off-by: Kővágó, Zoltán --- qapi/opts-visitor.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c index 7ae33b3..aa68814 100644 --- a/qapi/opts-visitor.c

[Qemu-devel] [PATCH v2 0/6] qapi flattening

2015-07-03 Thread Kővágó, Zoltán
This patch series flattens the structures that are used by OptsVisitor, namely NumaOptions and Netdev (NetLegacy is removed in the process). Patch 1 is needed, otherwise qemu segfaults when OptsVisitor visits a flat struct. Patch 1 and 2 are identical to v1, while the networking related patches a

[Qemu-devel] [PATCH v2 6/6] qapi: reorder NetdevBase and Netdev

2015-07-03 Thread Kővágó, Zoltán
Probably more logical if NetdevBase comes before Netdev. No schematic changes. Signed-off-by: Kővágó, Zoltán --- qapi-schema.json | 46 +++--- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index b8ee0ad

Re: [Qemu-devel] [RFC 06/10] fdc: add physical disk sizes

2015-07-03 Thread Markus Armbruster
John Snow writes: > 2.88MB capable drives can accept 1.44MB floppies, > for instance. To rework the pick_geometry function, > we need to know if our current drive can even accept > the type of disks we're considering. > > NB: This allows us to distinguish between all of the > "total sectors" coll

Re: [Qemu-devel] [PATCH v3] QOM: object_property_add() performance improvement

2015-07-03 Thread Pavel Fedin
Hello! Thank you very much for your feedback. > Nack, I don't like the patch as is. Starting with the unoptimized code > movement combined with functional changes Will it be OK if i split it into two parts: 1. Restructuring, introduction of object_property_add_single() 2. Introduction of cach

Re: [Qemu-devel] [RFC 05/10] fdc: refactor pick_geometry

2015-07-03 Thread Markus Armbruster
John Snow writes: > Lessen the number of parameters it takes. > > Signed-off-by: John Snow Haven't reviewed in detail, but: YES, please!

Re: [Qemu-devel] [RFC 03/10] fdc: respect default drive type

2015-07-03 Thread Markus Armbruster
John Snow writes: > Respect the default drive type as proffered via the CLI. > > This patch overloads the "drive out" parameter of pick_geometry > to be used as a "default hint" which is offered by fd_revalidate. > > Signed-off-by: John Snow > --- > hw/block/fdc.c | 27 +

Re: [Qemu-devel] [PATCH v3] QOM: object_property_add() performance improvement

2015-07-03 Thread Andreas Färber
Am 03.07.2015 um 15:20 schrieb Pavel Fedin: >> Ping! > > May be you could PULL it? Andreas seems to be down... Nack, I don't like the patch as is. Starting with the unoptimized code movement combined with functional changes, up to the use of [*] for the new property iiuc. Andreas -- SUSE Linu

  1   2   3   >