[Qemu-devel] [PULL V4 03/31] net: vl: Move default_net to vl.c

2016-06-01 Thread Jason Wang
From: Eduardo Habkost All handling of defaults (default_* variables) is inside vl.c, move default_net there too, so we can more easily refactor that code later. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost Signed-off-by: Jason Wang --- include/net/net.h | 1 - net/net.c

[Qemu-devel] [PULL V4 12/31] net: Add macros for MAC address tracing

2016-06-01 Thread Jason Wang
From: Dmitry Fleytman These macros will be used by future commits introducing e1000e device emulation and by vmxnet3 tracing code. Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Reviewed-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- include/net/net.h | 5 + 1 file cha

[Qemu-devel] [PULL V4 06/31] msix: make msix_clr_pending() visible for clients

2016-06-01 Thread Jason Wang
From: Dmitry Fleytman This function will be used by e1000e device code. Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Reviewed-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/pci/msix.c | 2 +- include/hw/pci/msix.h | 1 + 2 files changed, 2 insertions(+), 1 del

[Qemu-devel] [PULL V4 01/31] net/tap: Allocating Large sized arrays to heap

2016-06-01 Thread Jason Wang
From: Zhou Jie net_init_tap has a huge stack usage of 8192 bytes approx. Moving large arrays to heap to reduce stack usage. Signed-off-by: Zhou Jie Signed-off-by: Jason Wang --- net/tap.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/tap.c b/net/tap.c index 740

[Qemu-devel] [PULL V4 10/31] vmxnet3: Use generic function for DSN capability definition

2016-06-01 Thread Jason Wang
From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Reviewed-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 20f26b7..

[Qemu-devel] [PULL V4 02/31] net: mipsnet: check packet length against buffer

2016-06-01 Thread Jason Wang
From: Prasad J Pandit When receiving packets over MIPSnet network device, it uses receive buffer of size 1514 bytes. In case the controller accepts large(MTU) packets, it could lead to memory corruption. Add check to avoid it. Reported by: Oleksandr Bazhaniuk Signed-off-by: Prasad J Pandit Sig

[Qemu-devel] [PULL V4 00/31] Net patches

2016-06-01 Thread Jason Wang
The following changes since commit 287db79df8af8e31f18e262feb5e05103a09e4d4: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-05-24 13:06:33 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for

Re: [Qemu-devel] [PATCH 8/9] adding instruction translations

2016-06-01 Thread Michael Rolnik
right. no reason. I can make it just a C file. when I started I was not sure what was the best way to do it as I generate some come code. thanks, I will fix it. On Thu, Jun 2, 2016 at 9:44 AM, Richard Henderson wrote: > On 05/29/2016 06:23 PM, Michael Rolnik wrote: > >> Signed-off-by: Michael Ro

[Qemu-devel] [PATCH] net: mipsnet: check transmit buffer size before sending

2016-06-01 Thread P J P
From: Prasad J Pandit When processing MIPSnet I/O port write operation, it uses a transmit buffer tx_buffer[MAX_ETH_FRAME_SIZE=1514]. Two indices 's->tx_written' and 's->tx_count' are used to control data written to this buffer. If the two were to be equal before writing, it'd lead to an OOB writ

Re: [Qemu-devel] [PATCH 8/9] adding instruction translations

2016-06-01 Thread Richard Henderson
On 05/29/2016 06:23 PM, Michael Rolnik wrote: Signed-off-by: Michael Rolnik --- target-avr/translate.c.inc | 2546 1 file changed, 2546 insertions(+) create mode 100644 target-avr/translate.c.inc Is there any good reason for you to pull out these

Re: [Qemu-devel] [PATCH 1/9] AVR cores support is added. 1. basic CPU structure 2. registers 3. no instructions

2016-06-01 Thread Michael Rolnik
I ran checkpatch.pl on my patches and it was ok. I will fix it. On Thu, Jun 2, 2016 at 9:39 AM, Richard Henderson wrote: > On 05/29/2016 06:23 PM, Michael Rolnik wrote: > >> +static void avr_cpu_set_pc( >> +CPUState *cs, >> +

Re: [Qemu-devel] [PATCH 4/9] adding instructions encodings for LE and BE compilers.

2016-06-01 Thread Michael Rolnik
I disagree. it's non portable as long as you don't know what compiler you are using. if bitfields are not acceptable at all, I will regenerate my code. thanks. On Thu, Jun 2, 2016 at 9:32 AM, Richard Henderson wrote: > On 05/29/2016 06:23 PM, Michael Rolnik wrote: > >> I am aware of bad por

Re: [Qemu-devel] [PATCH 1/9] AVR cores support is added. 1. basic CPU structure 2. registers 3. no instructions

2016-06-01 Thread Richard Henderson
On 05/29/2016 06:23 PM, Michael Rolnik wrote: +static void avr_cpu_set_pc( +CPUState *cs, +vaddr value) The formatting throughout all of these patches is wrong. You need to follow the instructions in

Re: [Qemu-devel] [PATCH 4/9] adding instructions encodings for LE and BE compilers.

2016-06-01 Thread Richard Henderson
On 05/29/2016 06:23 PM, Michael Rolnik wrote: I am aware of bad portability of bit fields as compilers for LE and BE hosts lists bit fields in different order However they won't "parse" in target memory but a data prepared by me What data prepared by you? You're assigning to an int

[Qemu-devel] [PATCH] ps2: take exact use of ps2 buffer

2016-06-01 Thread Yang Hongyang
According to PS/2 Mouse/Keyboard Protocol, the keyboard output buffer size is 16 bytes, but we only use 15 bytes actually, this causes some problem, for example, if I submit "123456789" in a bunch through VNC, the actual result will be "123456788...", because the 16th key event which is "8"

[Qemu-devel] [PATCH v3 21/24] target-sparc: Use explicit writes to cpu_fsr

2016-06-01 Thread Richard Henderson
By arranging for explicit writes to cpu_fsr after floating point operations, we are able to mark the helpers as not writing to tcg globals, which means that we don't need to invalidate the integer register set across said calls. Signed-off-by: Richard Henderson --- target-sparc/fop_helper.c | 22

[Qemu-devel] [PATCH v3 20/24] target-sparc: Remove helper_ldf_asi, helper_stf_asi

2016-06-01 Thread Richard Henderson
We've now implemented all fp asis inline, except for the no-fault memory reads. The latter can be passed directly to helper_ld_asi. Signed-off-by: Richard Henderson --- target-sparc/helper.h | 2 - target-sparc/ldst_helper.c | 148 - target-spa

[Qemu-devel] [PATCH v3 23/24] target-sparc: Use cpu_loop_exit_restore from helper_check_ieee_exceptions

2016-06-01 Thread Richard Henderson
This avoids needing to save state before every FP operation. Signed-off-by: Richard Henderson --- target-sparc/fop_helper.c | 17 + target-sparc/translate.c | 6 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/target-sparc/fop_helper.c b/target-sparc/fop_

[Qemu-devel] [PATCH v3 15/24] target-sparc: Directly implement easy ldd/std asis

2016-06-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 115 ++- 1 file changed, 103 insertions(+), 12 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 7d10578..b2b3027 100644 --- a/target-sparc/translate.c ++

[Qemu-devel] [PATCH v3 22/24] target-sparc: Use cpu_fsr in stfsr

2016-06-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index e9be680..a7f 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -5400,17 +540

[Qemu-devel] [PATCH v3 16/24] target-sparc: Fix obvious error in ASI_M_BFILL

2016-06-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/ldst_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index 23840db..3700ca1 100644 --- a/target-sparc/ldst_helper.c +++ b/target-sparc/ldst_helper.c @@ -989,7 +98

[Qemu-devel] [PATCH v3 24/24] target-sparc: Elide duplicate updates to fprs

2016-06-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 45 +++-- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 4a6a554..2d3cda6 100644 --- a/target-sparc/translate.c +++ b/

[Qemu-devel] [PATCH v3 12/24] target-sparc: Directly implement easy ld/st asis

2016-06-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 104 --- 1 file changed, 90 insertions(+), 14 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 1d8c880..0e870d8 100644 --- a/target-sparc/translate.c +++

[Qemu-devel] [PATCH v3 11/24] target-sparc: Use defines from asi.h

2016-06-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/ldst_helper.c | 459 +++-- target-sparc/translate.c | 6 +- 2 files changed, 235 insertions(+), 230 deletions(-) diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index f73cf6d..a6c4d

[Qemu-devel] [PATCH v3 17/24] target-sparc: Pass TCGMemOp constants to helper_ld/st_asi

2016-06-01 Thread Richard Henderson
Reduces the argument count for helper_ld_asi; do helper_st_asi for consistency. Signed-off-by: Richard Henderson --- target-sparc/helper.h | 4 +-- target-sparc/ldst_helper.c | 73 ++ target-sparc/translate.c | 58 --

[Qemu-devel] [PATCH v3 04/24] target-sparc: Create gen_exception

2016-06-01 Thread Richard Henderson
This unifies quite a few duplicate code fragments. Signed-off-by: Richard Henderson --- target-sparc/translate.c | 75 +--- 1 file changed, 20 insertions(+), 55 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index fb3938

[Qemu-devel] [PATCH v3 18/24] target-sparc: Directly implement easy ldf/stf asis

2016-06-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 45 + 1 file changed, 45 insertions(+) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 968564e..948869e 100644 --- a/target-sparc/translate.c +++ b/target-sparc/tran

[Qemu-devel] [PATCH v3 09/24] target-sparc: Import linux/arch/sparc/include/uapi/asm/asi.h

2016-06-01 Thread Richard Henderson
Copied from tag v4.2, 64291f7db5bd8150a74ad2036f1037e6a0428df2. Signed-off-by: Richard Henderson --- target-sparc/asi.h | 297 + 1 file changed, 297 insertions(+) create mode 100644 target-sparc/asi.h diff --git a/target-sparc/asi.h b/target-

[Qemu-devel] [PATCH v3 14/24] target-sparc: Introduce gen_check_align

2016-06-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 48 +--- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 0917486..7d10578 100644 --- a/target-sparc/translate.c +++

[Qemu-devel] [PATCH v3 13/24] target-sparc: Use QT0 to return results from ldda

2016-06-01 Thread Richard Henderson
Also implement a few more twinx asis. Signed-off-by: Richard Henderson --- target-sparc/helper.h | 2 +- target-sparc/ldst_helper.c | 156 - target-sparc/translate.c | 12 +++- 3 files changed, 120 insertions(+), 50 deletions(-) diff --git a

[Qemu-devel] [PATCH v3 10/24] target-sparc: Add UA2011 defines to asi.h

2016-06-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/asi.h | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/target-sparc/asi.h b/target-sparc/asi.h index aace6f3..c9a1849 100644 --- a/target-sparc/asi.h +++ b/target-sparc/asi.h @@ -144,24 +144,36 @@ * ASI

[Qemu-devel] [PATCH v3 01/24] target-sparc: Mark more flags for helpers

2016-06-01 Thread Richard Henderson
Quite a few helpers do not modify tcg globals but did not so indicate. Signed-off-by: Richard Henderson --- target-sparc/helper.h | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/target-sparc/helper.h b/target-sparc/helper.h i

[Qemu-devel] [PATCH v3 05/24] target-sparc: Unify asi handling between 32 and 64-bit

2016-06-01 Thread Richard Henderson
We now have a single copy of gen_ld_asi, gen_st_asi, gen_swap_asi, and everything uses gen_get_asi. Signed-off-by: Richard Henderson --- target-sparc/translate.c | 285 ++- 1 file changed, 131 insertions(+), 154 deletions(-) diff --git a/target-sparc/

[Qemu-devel] [PATCH v3 02/24] target-sparc: Remove softint as a TCG global

2016-06-01 Thread Richard Henderson
The global is only ever read for one insn; we can just as well use a load from env instead and generate the same code. This also allows us to indicate the the associated helpers do not touch TCG globals. Signed-off-by: Richard Henderson --- target-sparc/helper.h| 6 +++--- target-sparc/tran

[Qemu-devel] [PATCH v3 19/24] target-sparc: Directly implement block and short ldf/stf asis

2016-06-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 122 +++ 1 file changed, 122 insertions(+) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 948869e..9151ab8 100644 --- a/target-sparc/translate.c +++ b/target-sparc/

[Qemu-devel] [PATCH v3 03/24] target-sparc: Store mmu index in TB flags

2016-06-01 Thread Richard Henderson
Doing this instead of saving the raw PS_PRIV and TL. This means that all nucleus mode TBs (TL > 0) can be shared. This fixes a bug in that we didn't include HS_PRIV in the TB flags, and so could produce incorrect TB matches for hypervisor state. The LSU and DMMU states were unused by the transla

[Qemu-devel] [PATCH v3 00/24] target-sparc improvements

2016-06-01 Thread Richard Henderson
The primary focus of this patch set is to reduce the number of helpers that modify TCG globals, and thus increase the lifetime of those globals within each TB, and thus decrease the number of times that tcg must spill and fill them from backing store. As a byproduct, I also implement the bulk of t

[Qemu-devel] [PATCH v3 06/24] target-sparc: Store %asi in TB flags

2016-06-01 Thread Richard Henderson
Knowing the value of %asi at translation time means that we can handle the common settings without a function call. The steady state appears to be %asi == ASI_P, so that sparcv9 code can use offset forms of lda/sta. The %asi register gets pushed and popped on entry to certain functions, but it ra

[Qemu-devel] [PATCH v3 07/24] target-sparc: Introduce get_asi

2016-06-01 Thread Richard Henderson
Replace gen_get_asi, and use it for both 32-bit and 64-bit. For v8, do supervisor and immediate checks here. Also, move save_state and TB ending into the respective subroutines, out of disas_sparc_insn. Signed-off-by: Richard Henderson --- target-sparc/translate.c | 505

[Qemu-devel] [PATCH v3 08/24] target-sparc: Pass TCGMemOp to gen_ld/st_asi

2016-06-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-sparc/translate.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 8917a72..99a251c 100644 --- a/target-sparc/translate.c +++ b/target-sparc/

Re: [Qemu-devel] [Qemu-ppc] [PULL 02/12] ppc: Use split I/D mmu modes to avoid flushes on interrupts

2016-06-01 Thread Mark Cave-Ayland
On 02/06/16 04:15, David Gibson wrote: > On Wed, Jun 01, 2016 at 08:33:30PM +0100, Mark Cave-Ayland wrote: >> On 31/05/16 01:41, David Gibson wrote: >> >>> From: Benjamin Herrenschmidt >>> >>> We rework the way the MMU indices are calculated, providing separate >>> indices for I and D side based

Re: [Qemu-devel] [RFC PATCH v0 0/2] Increase max memslots to 512 for PowerPC

2016-06-01 Thread Bharata B Rao
On Thu, Jun 02, 2016 at 10:42:23AM +1000, David Gibson wrote: > On Wed, Jun 01, 2016 at 12:18:22PM +0200, Thomas Huth wrote: > > On 01.06.2016 11:51, Bharata B Rao wrote: > > > Recently the number of memory slots supported by KVM for PowerPC was > > > changed > > > from 32 to 512. QEMU was restric

Re: [Qemu-devel] [PATCH qemu v17 07/12] vfio: spapr: Add DMA memory preregistering (SPAPR IOMMU v2)

2016-06-01 Thread David Gibson
On Wed, Jun 01, 2016 at 06:57:38PM +1000, Alexey Kardashevskiy wrote: > This makes use of the new "memory registering" feature. The idea is > to provide the userspace ability to notify the host kernel about pages > which are going to be used for DMA. Having this information, the host > kernel can p

Re: [Qemu-devel] [PATCH qemu v17 08/12] spapr_pci: Add and export DMA resetting helper

2016-06-01 Thread David Gibson
On Wed, Jun 01, 2016 at 06:57:39PM +1000, Alexey Kardashevskiy wrote: > This will be later used by the "ibm,reset-pe-dma-window" RTAS handler > which resets the DMA configuration to the defaults. > > Signed-off-by: Alexey Kardashevskiy > Reviewed-by: David Gibson Should be safe even without the

Re: [Qemu-devel] [PATCH v8 04/25] acpi: add DMAR scope definition for root IOAPIC

2016-06-01 Thread Peter Xu
On Wed, Jun 01, 2016 at 02:56:38PM +0200, Igor Mammedov wrote: [...] > > @@ -2561,6 +2563,9 @@ build_dmar_q35(MachineState *ms, GArray *table_data, > > GArray *linker) > > AcpiTableDmar *dmar; > > AcpiDmarHardwareUnit *drhd; > > uint8_t dmar_flags = 0; > > +AcpiDmarDeviceScope

Re: [Qemu-devel] [QEMU RFC PATCH v3 1/6] Migration: Defined VMStateDescription struct for spapr_drc

2016-06-01 Thread David Gibson
On Tue, May 31, 2016 at 11:02:39AM -0700, Jianjun Duan wrote: > To manage hotplug/unplug of dynamic resources such as PCI cards, > memory, and CPU on sPAPR guests, a firmware abstraction known as > a Dynamic Resource Connector (DRC) is used to assign a particular > dynamic resource to the guest, an

Re: [Qemu-devel] [QEMU RFC PATCH v3 4/6] Migration: migrate QTAILQ

2016-06-01 Thread David Gibson
On Tue, May 31, 2016 at 11:02:42AM -0700, Jianjun Duan wrote: > Currently we cannot directly transfer a QTAILQ instance because of the > limitation in the migration code. Here we introduce an approach to > transfer such structures. In our approach such a structure is tagged > with VMS_CSTM. We then

[Qemu-devel] [PATCH] seccomp: Add support for ppc/ppc64

2016-06-01 Thread Michael Strosaker
Support for ppc/ppc64 is official in libseccomp 2.3.0, so modify the configuration script to allow qemuu to enable seccomp for those platforms. Signed-off-by: Michael Strosaker --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index b5aab72..79b571d 10075

Re: [Qemu-devel] [PATCH 4/6 Resend] Vhost-pci RFC: Detailed Description in the Virtio Specification Format

2016-06-01 Thread Xiao Guangrong
On 06/02/2016 11:15 AM, Wang, Wei W wrote: On Wed 6/1/2016 4:15 PM, Xiao Guangrong wrote: On 05/29/2016 04:11 PM, Wei Wang wrote: Signed-off-by: Wei Wang --- Details | 324 1 file changed, 324 insertions(+) create mod

Re: [Qemu-devel] [PATCH qemu v17 00/12] spapr: vfio: Enable Dynamic DMA windows (DDW)

2016-06-01 Thread David Gibson
On Wed, Jun 01, 2016 at 06:57:31PM +1000, Alexey Kardashevskiy wrote: > Each Partitionable Endpoint (IOMMU group) has an address range on a PCI bus > where devices are allowed to do DMA. These ranges are called DMA windows. > By default, there is a single DMA window, 1 or 2GB big, mapped at zero >

Re: [Qemu-devel] [for-2.7 PATCH v3 06/15] cpu: Abstract CPU core type

2016-06-01 Thread David Gibson
On Thu, May 12, 2016 at 09:18:16AM +0530, Bharata B Rao wrote: > Add an abstract CPU core type that could be used by machines that want > to define and hotplug CPUs in core granularity. > > Signed-off-by: Bharata B Rao > Signed-off-by: Igor Mammedov >[Integer core property] > Rev

Re: [Qemu-devel] [PATCH qemu v17 06/12] memory: Add reporting of supported page sizes

2016-06-01 Thread David Gibson
On Wed, Jun 01, 2016 at 06:57:37PM +1000, Alexey Kardashevskiy wrote: > Every IOMMU has some granularity which MemoryRegionIOMMUOps::translate > uses when translating, however this information is not available outside > the translate context for various checks. > > This adds a get_page_sizes callb

Re: [Qemu-devel] [Qemu-ppc] [PULL 04/12] ppc: tlbie, tlbia and tlbisync are HV only

2016-06-01 Thread David Gibson
On Wed, Jun 01, 2016 at 08:03:08AM +0100, Mark Cave-Ayland wrote: > On 01/06/16 03:15, David Gibson wrote: > > > On Tue, May 31, 2016 at 11:28:49PM +0100, Mark Cave-Ayland wrote: > >> On 31/05/16 01:41, David Gibson wrote: > >> > >>> From: Benjamin Herrenschmidt > >>> > >>> Not that anything remo

Re: [Qemu-devel] [PATCH 4/6 Resend] Vhost-pci RFC: Detailed Description in the Virtio Specification Format

2016-06-01 Thread Wang, Wei W
On Wed 6/1/2016 4:15 PM, Xiao Guangrong wrote: > On 05/29/2016 04:11 PM, Wei Wang wrote: > > Signed-off-by: Wei Wang > > --- > > Details | 324 > > > 1 file changed, 324 insertions(+) > > create mode 100644 Details > > > > diff

Re: [Qemu-devel] [PATCH] block/raw-posix: Fix error_report of mounting message

2016-06-01 Thread Fam Zheng
On Thu, 06/02 03:04, Wei, Jiangang wrote: > On Wed, 2016-06-01 at 15:23 +0800, Fam Zheng wrote: > > On Wed, 06/01 15:08, Wei Jiangang wrote: > > > Use a single error_printf to replace triple error_report. > > > > > > Signed-off-by: Wei Jiangang > > > --- > > > block/raw-posix.c | 10 +- >

Re: [Qemu-devel] [Qemu-ppc] [PULL 02/12] ppc: Use split I/D mmu modes to avoid flushes on interrupts

2016-06-01 Thread David Gibson
On Wed, Jun 01, 2016 at 08:33:30PM +0100, Mark Cave-Ayland wrote: > On 31/05/16 01:41, David Gibson wrote: > > > From: Benjamin Herrenschmidt > > > > We rework the way the MMU indices are calculated, providing separate > > indices for I and D side based on MSR:IR and MSR:DR respectively, > > and

Re: [Qemu-devel] [PATCH] block/raw-posix: Fix error_report of mounting message

2016-06-01 Thread Wei, Jiangang
On Wed, 2016-06-01 at 15:23 +0800, Fam Zheng wrote: > On Wed, 06/01 15:08, Wei Jiangang wrote: > > Use a single error_printf to replace triple error_report. > > > > Signed-off-by: Wei Jiangang > > --- > > block/raw-posix.c | 10 +- > > 1 file changed, 5 insertions(+), 5 deletions(-) > >

[Qemu-devel] [Bug 1586611] Re: usb-hub can not be detached when detach usb device from VM

2016-06-01 Thread Michael liu
** Description changed: I give a host usb device to guest in the way of using "virsh attach-device" cmd. In guest os,use "lsusb" cmd I can see two devices have been added,one is usb device and the other is usb-hub(0409:55aa NEC Corp. Hub). when I use "virsh detach-device" detach the usb devi

Re: [Qemu-devel] [RFC PATCH v4 0/3] Add Mediated device support[was: Add vGPU support]

2016-06-01 Thread Jike Song
On 05/31/2016 10:29 PM, Alex Williamson wrote: > On Tue, 31 May 2016 10:29:10 +0800 > Jike Song wrote: > >> On 05/28/2016 10:56 PM, Alex Williamson wrote: >>> On Fri, 27 May 2016 22:43:54 + >>> "Tian, Kevin" wrote: >>> My impression was that you don't like hypervisor specific th

Re: [Qemu-devel] [for-2.7 PATCH v3 05/15] qdev: hotplug: Introduce HotplugHandler.pre_plug() callback

2016-06-01 Thread David Gibson
On Thu, May 12, 2016 at 09:18:15AM +0530, Bharata B Rao wrote: > From: Igor Mammedov > > pre_plug callback is to be called before device.realize() is executed. > This would allow to check/set device's properties from HotplugHandler. > > Signed-off-by: Igor Mammedov > Signed-off-by: Bharata B Ra

Re: [Qemu-devel] [PATCH v3 2/2] Makefile: Derive "PKGVERSION" from "git describe" by default

2016-06-01 Thread Fam Zheng
On Wed, 06/01 15:55, Paolo Bonzini wrote: > > > On 01/06/2016 13:13, Laszlo Ersek wrote: > > On 06/01/16 12:40, Gerd Hoffmann wrote: > >> Hi, > >> > >>> + git describe 2>/dev/null | tr -d '\n'; \ > >>> + if ! git diff-index --quiet HEAD &>/dev/nul

Re: [Qemu-devel] heterogenous cores

2016-06-01 Thread Alistair Francis
On Wed, Jun 1, 2016 at 2:39 PM, Peter Maydell wrote: > On 1 June 2016 at 22:34, Michael Rolnik wrote: >> as I understand it's not possible right off the shelf as some functions >> like gen_intermediate_code are global. >> so, the question is *is it a complex task to make a heterogenous setup >> p

Re: [Qemu-devel] [RFC PATCH v0 1/2] kvm: API to obtain max supported mem slots

2016-06-01 Thread David Gibson
On Wed, Jun 01, 2016 at 11:56:07AM +0200, Paolo Bonzini wrote: > > > On 01/06/2016 11:51, Bharata B Rao wrote: > > Introduce kvm_get_max_memslots() API that can be used to obtain the > > maximum number of memslots supported by KVM. > > > > Signed-off-by: Bharata B Rao > > --- > > include/sysem

Re: [Qemu-devel] [PATCH qemu v16 04/19] vmstate: Define VARRAY with VMS_ALLOC

2016-06-01 Thread David Gibson
On Wed, Jun 01, 2016 at 10:11:05AM +0200, Paolo Bonzini wrote: > > > On 01/06/2016 04:29, Alexey Kardashevskiy wrote: > > On 27/05/16 17:54, Alexey Kardashevskiy wrote: > >> On 04/05/16 16:52, Alexey Kardashevskiy wrote: > >>> This allows dynamic allocation for migrating arrays. > >>> > >>> Alrea

Re: [Qemu-devel] [RFC PATCH v0 0/2] Increase max memslots to 512 for PowerPC

2016-06-01 Thread David Gibson
On Wed, Jun 01, 2016 at 12:18:22PM +0200, Thomas Huth wrote: > On 01.06.2016 11:51, Bharata B Rao wrote: > > Recently the number of memory slots supported by KVM for PowerPC was changed > > from 32 to 512. QEMU was restricting the user specifiable hot-pluggable > > memory > > slots to 32. This pat

[Qemu-devel] [PATCH] throttle: refuse iops-size without iops-total/read/write

2016-06-01 Thread Stefan Hajnoczi
In a similar vein to commit ee2bdc33c913b7d765baa5aa338c29fb30a05c9a ("throttle: refuse bps_max/iops_max without bps/iops") it is likely that the user made a configuration error if iops-size has been set but no iops limit has been set. Print an error message so the user can check their throttling

Re: [Qemu-devel] [PATCH] hw/char: QOM'ify escc.c (fix)

2016-06-01 Thread xiaoqiang zhao
> 在 2016年6月2日,03:44,Mark Cave-Ayland 写道: > >> On 01/06/16 08:58, xiaoqiang zhao wrote: >> >> The previous commit e7c9136977cb99c6eb52c9139f7b8d8b5fa87db9 >> (hw/char: QOM'ify escc.c) cause qemu-system-ppc/ppc64 >> OpenBIOS to freeze on startup, this commit fix it. >> >> Signed-off-by: xiaoqia

Re: [Qemu-devel] [PATCH v4 00/11] nbd: tighter protocol compliance

2016-06-01 Thread Eric Blake
ping On 05/11/2016 04:39 PM, Eric Blake wrote: > Fix several corner-case bugs in our implementation of the NBD > protocol, both as client and as server. > > Depends on Kevin's block-next branch: > git://repo.or.cz/qemu/kevin.git block-next > > Also available as a tag at this location: > git fetc

Re: [Qemu-devel] [PATCH v5 1/4] Provide support for the CUSE TPM

2016-06-01 Thread BICKFORD, JEFFREY E
> * BICKFORD, JEFFREY E (jb6...@att.com) wrote: > > > * Daniel P. Berrange (berra...@redhat.com) wrote: > > > > On Wed, Jan 20, 2016 at 10:54:47AM -0500, Stefan Berger wrote: > > > > > On 01/20/2016 10:46 AM, Daniel P. Berrange wrote: > > > > > >On Wed, Jan 20, 2016 at 10:31:56AM -0500, Stefan Berg

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target-ppc/fpu_helper: Fix efscmp* instructions handling

2016-06-01 Thread David Gibson
On Fri, May 27, 2016 at 07:43:46AM +, Imran, Talha wrote: > > On 05/27/2016 06:37 AM, David Gibson wrote: > > On Thu, May 19, 2016 at 05:11:35PM +0500, Talha Imran wrote: > >> With specification at hand from the reference manual from Freescale > >> http://cache.nxp.com/files/32bit/doc/ref_manu

Re: [Qemu-devel] [RFC v2 PATCH 02/13] tcg/i386: Add support for fence

2016-06-01 Thread Pranith Kumar
On Wed, Jun 1, 2016 at 5:17 PM, Richard Henderson wrote: > > Because x86 has a strong memory model. > > It does not require barriers to keep normal loads and stores in order. The > primary reason for the *fence instructions is to order the "non-temporal" > memory operations that are part of the S

Re: [Qemu-devel] heterogenous cores

2016-06-01 Thread Peter Maydell
On 1 June 2016 at 22:34, Michael Rolnik wrote: > as I understand it's not possible right off the shelf as some functions > like gen_intermediate_code are global. > so, the question is *is it a complex task to make a heterogenous setup > possible*? Yes, it's a complex task. It's not impossible, bu

Re: [Qemu-devel] [RFC v2 PATCH 01/13] Introduce TCGOpcode for memory barrier

2016-06-01 Thread Richard Henderson
On 06/01/2016 11:43 AM, Pranith Kumar wrote: This is, IMO, confused. Either we should use the C++11 barrier types, or the Linux barrier types, but not both. This part of the design is still being fleshed out. The above listing is all the kinds of barriers we can encounter during translation. M

Re: [Qemu-devel] heterogenous cores

2016-06-01 Thread Michael Rolnik
as I understand it's not possible right off the shelf as some functions like gen_intermediate_code are global. so, the question is *is it a complex task to make a heterogenous setup possible*? On Thu, Jun 2, 2016 at 12:28 AM, Michael Rolnik wrote: > Hi all, > > Is there a way to build a platform

[Qemu-devel] heterogenous cores

2016-06-01 Thread Michael Rolnik
Hi all, Is there a way to build a platform with two or more different cores e.g. PPC & ARM ? -- Best Regards, Michael Rolnik

Re: [Qemu-devel] [RFC v2 PATCH 02/13] tcg/i386: Add support for fence

2016-06-01 Thread Richard Henderson
On 06/01/2016 11:49 AM, Pranith Kumar wrote: On Tue, May 31, 2016 at 4:27 PM, Richard Henderson wrote: On 05/31/2016 11:39 AM, Pranith Kumar wrote: +case INDEX_op_mb: +tcg_out_mb(s); You need to look at the barrier type and DTRT. In particular, the Linux smp_rmb and smp_wmb ty

[Qemu-devel] [PATCH v2 04/13] block: Switch bdrv_write_zeroes() to byte interface

2016-06-01 Thread Eric Blake
Rename to bdrv_pwrite_zeroes() to let the compiler ensure we cater to the updated semantics. Do the same for bdrv_aio_write_zeroes() and bdrv_co_write_zeroes(). Two of the three places map to the byte-based counterparts; but for now, since we have no byte-based aio write, we still require sector

[Qemu-devel] [PATCH v2 08/13] gluster: Convert to bdrv_co_pwrite_zeroes()

2016-06-01 Thread Eric Blake
Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf --- block/gluster.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index a8aaacf..d361d8e 100644 --- a

[Qemu-devel] [PATCH v2 09/13] qed: Convert to bdrv_co_pwrite_zeroes()

2016-06-01 Thread Eric Blake
Another step on our continuing quest to switch to byte-based interfaces. Kill an abuse of the comma operator while at it (fortunately, the semantics were still right). Also, the test for requests not aligned to clusters should be applied always, not just when a backing file is present. Signed-of

[Qemu-devel] [PATCH v2 12/13] vmdk: Convert to bdrv_co_pwrite_zeroes()

2016-06-01 Thread Eric Blake
Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf --- block/vmdk.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 8494d63..fa5bc09 100644 --- a/block/vmdk

[Qemu-devel] [PATCH v2 13/13] block: Kill bdrv_co_write_zeroes()

2016-06-01 Thread Eric Blake
Now that all drivers have been converted to a byte interface, we no longer need a sector interface. Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf --- include/block/block_int.h | 2 -- block/io.c| 15 ++- 2 files changed, 2 insertions(+), 15 deletions(-) diff --

[Qemu-devel] [PATCH v2 05/13] iscsi: Convert to bdrv_co_pwrite_zeroes()

2016-06-01 Thread Eric Blake
Another step on our continuing quest to switch to byte-based interfaces. As this is the first byte-based iscsi interface, convert is_request_lun_aligned() into two versions, one for sectors and one for bytes. Also, change from outright -EINVAL failure on an unaligned request, to instead failing w

[Qemu-devel] [PATCH v2 10/13] raw-posix: Convert to bdrv_co_pwrite_zeroes()

2016-06-01 Thread Eric Blake
Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake --- block/raw-posix.c | 34 +- trace-events | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c inde

[Qemu-devel] [PATCH v2 07/13] blkreplay: Convert to bdrv_co_pwrite_zeroes()

2016-06-01 Thread Eric Blake
Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf --- block/blkreplay.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/block/blkreplay.c b/block/blkreplay.c index 1a721ad..525c2d5 100755 ---

[Qemu-devel] [PATCH v2 06/13] qcow2: Convert to bdrv_co_pwrite_zeroes()

2016-06-01 Thread Eric Blake
Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake --- block/qcow2.c | 37 +++-- trace-events | 4 ++-- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index cc59efc..

[Qemu-devel] [PATCH v2 11/13] raw_bsd: Convert to bdrv_co_pwrite_zeroes()

2016-06-01 Thread Eric Blake
Another step on our continuing quest to switch to byte-based interfaces. Signed-off-by: Eric Blake Reviewed-by: Kevin Wolf --- block/raw_bsd.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index d9adf90..b1d5237 100644 --- a/bl

[Qemu-devel] [PATCH v2 03/13] block: Add .bdrv_co_pwrite_zeroes()

2016-06-01 Thread Eric Blake
Update bdrv_co_do_write_zeroes() to be byte-based, and select between the new byte-based bdrv_co_pwrite_zeroes() or the old bdrv_co_write_zeroes(). The next patches will convert drivers, then remove the old interface. Signed-off-by: Eric Blake --- include/block/block_int.h | 4 ++- block/io.c

[Qemu-devel] [PATCH v2 01/13] iscsi: Use block size as minimum zero/discard alignment

2016-06-01 Thread Eric Blake
If hardware does not advertise a minimum zero/discard alignment, we still want to guarantee that the block layer will align requests to our blocks, rather than the arbitrary 512-byte BDRV sector size. Signed-off-by: Eric Blake --- block/iscsi.c | 5 + 1 file changed, 5 insertions(+) diff --

[Qemu-devel] [PATCH v2 02/13] block: Track write zero limits in bytes

2016-06-01 Thread Eric Blake
Another step towards removing sector-based interfaces: convert the maximum write and minimum alignment values from sectors to bytes. Rename the variables to let the compiler check that all users are converted to the new semantics. The maximum remains an int as long as BDRV_REQUEST_MAX_SECTORS is

[Qemu-devel] [PATCH v2 00/13] Kill sector-based write_zeroes

2016-06-01 Thread Eric Blake
Kevin pointed out that my recent change to byte-based instead of sector-based blk_write_zeroes() (commit 983a1600) makes life harder as long as bdrv_write_zeroes is still sector-based, and where the compiler doesn't flag any change in parameter types. Complete the conversion, by making all write_ze

Re: [Qemu-devel] [PATCH v6 10/15] qht: QEMU's fast, resizable and scalable Hash Table

2016-06-01 Thread Sergey Fedorov
On 31/05/16 10:46, Alex Bennée wrote: > Sergey Fedorov writes: > >> On 25/05/16 04:13, Emilio G. Cota wrote: >>> diff --git a/include/qemu/qht.h b/include/qemu/qht.h >>> new file mode 100644 >>> index 000..aec60aa >>> --- /dev/null >>> +++ b/include/qemu/qht.h >>> @@ -0,0 +1,183 @@ >> (snip) >

[Qemu-devel] [Bug 1568356] Re: ERROR:ui/sdl2-2d.c:120:sdl2_2d_switch:

2016-06-01 Thread T. Huth
Could you add a debug printf before that assert statement in the code to see which format is missing here? So that the default case looks like: default: printf("Surface format is: %x\n", surface_format(scon->surface)); g_assert_not_reached(); -- You received this bug notifica

Re: [Qemu-devel] [PATCH 02/10] qcow2: add qcow2_co_write_compressed

2016-06-01 Thread Stefan Hajnoczi
On Wed, Jun 01, 2016 at 11:25:57AM +0200, Kevin Wolf wrote: > Am 27.05.2016 um 19:33 hat Stefan Hajnoczi geschrieben: > > On Sat, May 14, 2016 at 03:45:50PM +0300, Denis V. Lunev wrote: > > > +qemu_co_mutex_lock(&s->lock); > > > +cluster_offset = \ > > > +qcow2_alloc_compressed_clus

Re: [Qemu-devel] [PATCH] scsi: mark TYPE_SCSI_DISK_BASE as abstract

2016-06-01 Thread Stefan Hajnoczi
On Wed, Jun 01, 2016 at 03:15:09PM +0200, Paolo Bonzini wrote: > Suggested-by: Stefan Hajnoczi > Signed-off-by: Paolo Bonzini > --- > hw/scsi/scsi-disk.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [Qemu-devel] [PATCH] block: Drop bdrv_ioctl_bh_cb

2016-06-01 Thread Stefan Hajnoczi
On Wed, Jun 01, 2016 at 09:52:23AM +0800, Fam Zheng wrote: > Similar to the "!drv || !drv->bdrv_aio_ioctl" case above, here it is > okay to set co.ret and return. As pointed out by Paolo, a BH will be > created as necessary by the caller (bdrv_co_maybe_schedule_bh). > Besides, as pointed out by Kev

Re: [Qemu-devel] [PATCH] hw/char: QOM'ify escc.c (fix)

2016-06-01 Thread Mark Cave-Ayland
On 01/06/16 08:58, xiaoqiang zhao wrote: > The previous commit e7c9136977cb99c6eb52c9139f7b8d8b5fa87db9 > (hw/char: QOM'ify escc.c) cause qemu-system-ppc/ppc64 > OpenBIOS to freeze on startup, this commit fix it. > > Signed-off-by: xiaoqiang zhao > --- > hw/char/escc.c | 12 +++- > 1 fi

Re: [Qemu-devel] [Qemu-ppc] [PULL 02/12] ppc: Use split I/D mmu modes to avoid flushes on interrupts

2016-06-01 Thread Mark Cave-Ayland
On 31/05/16 01:41, David Gibson wrote: > From: Benjamin Herrenschmidt > > We rework the way the MMU indices are calculated, providing separate > indices for I and D side based on MSR:IR and MSR:DR respectively, > and thus no longer need to flush the TLB on context changes. This also > adds corre

Re: [Qemu-devel] [RESEND PATCH] pc: allow raising low memory via max-ram-below-4g option

2016-06-01 Thread Eduardo Habkost
On Wed, Jun 01, 2016 at 03:02:56PM +0200, Paolo Bonzini wrote: > On 01/06/2016 14:28, Gerd Hoffmann wrote: > > This patch extends the functionality of the max-ram-below-4g option > > to also allow increasing lowmem. Use case: Give as much memory as > > possible to legacy non-PAE guests. > > > > W

Re: [Qemu-devel] [PATCH 4/7] scsi-disk: introduce dma_readv and dma_writev

2016-06-01 Thread Mark Cave-Ayland
On 23/05/16 13:54, Paolo Bonzini wrote: > These are replacements for blk_aio_preadv and blk_aio_pwritev that allow > customization of the data path. They reuse the DMA helpers' DMAIOFunc > callback type, so that the same function can be used in either the > QEMUSGList or the bounce-buffered case.

Re: [Qemu-devel] [RESEND PATCH] pc: allow raising low memory via max-ram-below-4g option

2016-06-01 Thread Eduardo Habkost
On Wed, Jun 01, 2016 at 02:28:11PM +0200, Gerd Hoffmann wrote: > This patch extends the functionality of the max-ram-below-4g option > to also allow increasing lowmem. Use case: Give as much memory as > possible to legacy non-PAE guests. > > While being at it also rework the lowmem calculation lo

  1   2   3   >