Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr/pci: populate PCI DT in reverse order

2015-12-20 Thread David Gibson
On Thu, Dec 17, 2015 at 09:43:29AM +0100, Greg Kurz wrote: > On Thu, 3 Dec 2015 15:53:17 +0100 > Greg Kurz wrote: > > > On Tue, 1 Dec 2015 22:48:38 +0100 > > Thomas Huth wrote: > > > > > On 30/11/15 11:45, Greg Kurz wrote: > > > > Since commit

[Qemu-devel] [PATCH 2/2] ppc: Allow 64kiB pages for POWER8 in TCG

2015-12-20 Thread David Gibson
Now that the spapr code has been extended to support 64kiB pages, we can allow guests to use 64kiB pages on an emulated POWER8 by adding it to the "segment_page_sizes" structure which is advertised via the device tree. For now we just add support for 64kiB pages in 64kiB page segments. Real

[Qemu-devel] [PATCH 0/2] 64kiB page support for TCG guests with POWER8 CPU

2015-12-20 Thread David Gibson
This series enables 64kiB pages when using a TCG emulated POWER8 CPU. This gets the emulated POWER8 MMU a little bit closer to what the real POWER8 CPU supports. David Gibson (2): ppc: Move HPTE size parsing code to target-ppc helper (and add 64kiB pages) ppc: Allow 64kiB pages for

Re: [Qemu-devel] [PATCH 3/5] PXB: convert to realize()

2015-12-20 Thread Cao jin
On 12/20/2015 07:21 PM, Marcel Apfelbaum wrote: On 12/20/2015 12:48 PM, Cao jin wrote: Hi, On 12/20/2015 06:22 PM, Marcel Apfelbaum wrote: [...] + +err_register_bus: +object_unref(OBJECT(ds)); +object_unref(OBJECT(bds)); +object_unref(OBJECT(bus)); The order should be in the

Re: [Qemu-devel] [PATCH v2 3/3] hw/sd: use guest error logging rather than fprintf to stderr

2015-12-20 Thread Peter Crosthwaite
On Wed, Dec 16, 2015 at 11:02 AM, Andrew Baumann wrote: > Some of these errors may be harmless (e.g. probing unimplemented > commands, or issuing CMD12 in the wrong state), and may also be quite > frequent. Spamming the standard error output isn't desirable in such >

Re: [Qemu-devel] Is there a particular reason why REP STOS/MOV are jitted this way?

2015-12-20 Thread Peter Maydell
On 20 December 2015 at 23:13, farmdve wrote: > The rep stosd instruction seems to be jitted in a really weird way and I was > wondering what are the design choices behind this. > Basically the code is jitted to an operation where there is a conditional > branch that tests the

[Qemu-devel] [PATCH v2] linux-user/mmap.c: Always zero MAP_ANONYMOUS memory in mmap_frag()

2015-12-20 Thread chengang
From: Chen Gang When mapping MAP_ANONYMOUS memory fragments, still need notice about to set it zero, or it will cause issues. Signed-off-by: Chen Gang --- linux-user/mmap.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff

Re: [Qemu-devel] [PULL v3 00/15] Tracing patches

2015-12-20 Thread Denis V. Lunev
On 11/13/2015 01:44 PM, Stefan Hajnoczi wrote: On Fri, Nov 13, 2015 at 6:30 PM, Peter Maydell wrote: On 13 November 2015 at 07:58, Stefan Hajnoczi wrote: v3: * Include "exec/log.h" from translate-a64.c [Peter] v2: * Add missing log.py file

[Qemu-devel] Is there a particular reason why REP STOS/MOV are jitted this way?

2015-12-20 Thread farmdve
The rep stosd instruction seems to be jitted in a really weird way and I was wondering what are the design choices behind this. Basically the code is jitted to an operation where there is a conditional branch that tests the ECX register to see if it's zero or not(although I could have gotten this

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Notice about lock bitmask translation for fcntl

2015-12-20 Thread Chen Gang
On 2015年12月18日 18:47, Chen Gang wrote: > > On 2015年12月18日 17:41, Laurent Vivier wrote: >> >> Le 18/12/2015 07:51, Chen Gang a écrit : [...] >>> >>> +++ b/linux-user/mmap.c >>> @@ -567,6 +567,10 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, >>> int prot, >>> printf("\n"); >>>

Re: [Qemu-devel] [PATCH 5/5] xen-pvdevice: convert to realize()

2015-12-20 Thread Cao jin
On 12/19/2015 02:00 AM, Paolo Bonzini wrote: CCing Stefano, who is the maintainer. "Stefano" isn`t in the list when I use scripts/get_maintainer.pl... Paolo On 18/12/2015 12:03, Cao jin wrote: Signed-off-by: Cao jin --- hw/i386/xen/xen_pvdevice.c | 12

Re: [Qemu-devel] [PATCH 04/10] hw/sd: Add QOM bus which SD cards plug in to

2015-12-20 Thread Peter Crosthwaite
On Sun, Dec 20, 2015 at 3:18 PM, Peter Maydell wrote: > On 20 December 2015 at 20:51, Peter Crosthwaite > wrote: >> On Sun, Dec 20, 2015 at 9:10 AM, Peter Maydell >> wrote: >>> On 19 December 2015 at 21:38, Peter

Re: [Qemu-devel] [PATCH 1/2] compat: Introduce HW_COMPAT_2_5

2015-12-20 Thread David Gibson
On Fri, Dec 18, 2015 at 09:30:02AM +0200, Shmulik Ladkani wrote: > Introduce the place-holder for 2.5 back-compat properties, and the > accompanying PC_COMPAT_2_5, CCW_COMPAT_2_5, SPAPR_COMPAT_2_5. > > Signed-off-by: Shmulik Ladkani spapr part Acked-by:

Re: [Qemu-devel] [PATCH] hw/ppc/spapr_rtc: Remove bad class_size value

2015-12-20 Thread David Gibson
On Fri, Dec 18, 2015 at 10:06:14AM +0100, Thomas Huth wrote: > class_size = sizeof(XICSStateClass) does not make much sense > in the RTC code and likely was just a copy-n-paste error. > Let's simply remove it. > > Signed-off-by: Thomas Huth Oops, that's an embarrasing error.

[Qemu-devel] performance in io virtulization

2015-12-20 Thread ??????
i use qemu 2.2 and zhe vm kernel is 3.18i use fio do experiments in host and vm: 4k randwrite/read ioengine=libaio host: vm: randread about 200M/S randread about 190M/S randwrite about 160M/S randwrite

Re: [Qemu-devel] [PATCH 3/3] sdhci: add optional quirk property to disable card insertion/removal interrupts

2015-12-20 Thread Peter Crosthwaite
On Wed, Dec 16, 2015 at 11:47 AM, Andrew Baumann wrote: > This is needed for a quirk of the Raspberry Pi (bcm2835/6) MMC > controller, where the card insert bit is documented as unimplemented > (always reads zero, doesn't generate interrupts) but is in fact >

Re: [Qemu-devel] [PATCH v2 2/3] hw/sd: model a power-up delay, as a workaround for an EDK2 bug

2015-12-20 Thread Peter Crosthwaite
On Wed, Dec 16, 2015 at 11:02 AM, Andrew Baumann wrote: > The SD spec for ACMD41 says that a zero argument is an "inquiry" > ACMD41, which does not start initialisation and is used only for > retrieving the OCR. However, Tianocore EDK2 (UEFI) has a bug [1]: it >

[Qemu-devel] [PATCH v2] ivshmem: Store file descriptor for vhost-user negotiation

2015-12-20 Thread Tetsuya Mukawa
If virtio-net driver allocates memory in ivshmem shared memory, vhost-net will work correctly, but vhost-user will not work because a fd of shared memory will not be sent to vhost-user backend. This patch fixes ivshmem to store file descriptor of shared memory. It will be used when vhost-user

Re: [Qemu-devel] [PATCH 1/1] static checker: e1000-82540em got aliased to e1000

2015-12-20 Thread Jason Wang
On 12/18/2015 01:35 PM, Amit Shah wrote: > Commit 8304402033e8dbe8e379017d51ed1dd8344f1dce changed the name of the > e1000-82540em device to e1000. This was flagged: > >Section "e1000-82540em" does not exist in dest > > Add the mapping to the changed section names dictionary so the checker

Re: [Qemu-devel] [PATCH 04/10] hw/sd: Add QOM bus which SD cards plug in to

2015-12-20 Thread Peter Maydell
On 20 December 2015 at 20:51, Peter Crosthwaite wrote: > On Sun, Dec 20, 2015 at 9:10 AM, Peter Maydell > wrote: >> On 19 December 2015 at 21:38, Peter Crosthwaite >> wrote: >>> On Fri, Dec 11, 2015 at 04:37:05PM

[Qemu-devel] [PATCH 1/2] ppc: Move HPTE size parsing code to target-ppc helper (and add 64kiB pages)

2015-12-20 Thread David Gibson
The h_enter() hypercall implementation in spapr_hcall.c contains some code to determine the page size of the newly inserted hash PTE. This is surprisingly complex in the general case, because POWER CPUs can have different implementation dependent ways of encoding page sizes. The current version

[Qemu-devel] [PATCH 1/1] qga: guest-set-user-password - added ability to create new user

2015-12-20 Thread Denis V. Lunev
From: Yuri Pudgorodskiy Added optional 'create' flag to guest-set-user-password command. When it is specified, a new user will be created if it is not exists yet. The option to the existing command is added as password for newly created user should be set as specified.

Re: [Qemu-devel] [PATCH 2/2] ppc: Allow 64kiB pages for POWER8 in TCG

2015-12-20 Thread Benjamin Herrenschmidt
On Mon, 2015-12-21 at 13:41 +1100, David Gibson wrote: > Now that the spapr code has been extended to support 64kiB pages, we can > allow guests to use 64kiB pages on an emulated POWER8 by adding it to the > "segment_page_sizes" structure which is advertised via the device tree. > > For now we

[Qemu-devel] ?????? ?????? someconfusion on qemu i/o pocess and the qcow2format

2015-12-20 Thread ??????
I want to change the queue_size of virtio-blk ring from 128 to 1024, so I change here: s->vq = virtio_add_queue(vdev, 128, virtio_blk_handle_output); but the vm will not work. Are any thing i missed ?

Re: [Qemu-devel] [PATCH v4 5/5] kvm/x86: Hyper-V kvm exit

2015-12-20 Thread Pavel Fedin
Hello! Replying to everything in one message. > > As far as i understand this code, KVM_EXIT_HYPERV is called when one > > of three MSRs are accessed. But, shouldn't we have implemented > > instead something more generic, like KVM_EXIT_REG_IO, which would > > work similar to KVM_EXIT_PIO or

Re: [Qemu-devel] [PATCH 2/3] sdhci: don't raise a command index error for an unexpected response

2015-12-20 Thread Peter Crosthwaite
On Wed, Dec 16, 2015 at 11:47 AM, Andrew Baumann wrote: > This deletes a block of code that raised a command index error if a > command returned response data, but the guest did not set the > appropriate bits in the response register to handle such a response. I >

Re: [Qemu-devel] [PATCH] virtio-9p: use accessor to get thread_pool

2015-12-20 Thread Michael Tokarev
20.12.2015 14:19, Greg Kurz wrote: > The aio_context_new() function does not allocate a thread pool. This is > deferred to the first call to the aio_get_thread_pool() accessor. It is > hence forbidden to access the thread_pool field directly, as it may be > NULL. The accessor *must* be used

Re: [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-12-20 Thread Gonglei (Arei)
> -Original Message- > From: Kevin O'Connor [mailto:ke...@koconnor.net] > Sent: Saturday, December 19, 2015 11:12 PM > On Sat, Dec 19, 2015 at 12:03:15PM +, Gonglei (Arei) wrote: > > Maybe the root cause is not NMI but INTR, so yield() can open hardware > interrupt, > > And then

Re: [Qemu-devel] [PATCH 2/5] igd-passthrough-i440FX: convert to realize()

2015-12-20 Thread Cao jin
On 12/19/2015 05:18 AM, Markus Armbruster wrote: One short remark in addition to Eduardo's review. Eduardo Habkost writes: [...] config_fd = open(path, O_RDWR); if (config_fd < 0) { +error_setg(errp, "No such device"); return -ENODEV;

Re: [Qemu-devel] [PATCH 02/10] hw/sd/sd.c: QOMify

2015-12-20 Thread Peter Crosthwaite
On Sun, Dec 20, 2015 at 9:07 AM, Peter Maydell wrote: > On 19 December 2015 at 21:36, Peter Crosthwaite > wrote: >> On Fri, Dec 11, 2015 at 04:37:03PM +, Peter Maydell wrote: >>> Turn the SD card into a QOM device. >>> This conversion

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/3] ohci reset improvements

2015-12-20 Thread Mark Cave-Ayland
On 19/12/15 23:23, Hervé Poussineau wrote: > Hi, > > This small patchset adds different reset levels to OHCI USB controller. > The idea is from Benjamin Herrenschmidt. > Most significant change is that MacOS 9 doesn't try anymore to do some > DMA transfer to address 0, and boots a little bit

Re: [Qemu-devel] [PATCH v2] Use macro instead of plain text

2015-12-20 Thread Cao jin
On 12/18/2015 08:52 PM, Markus Armbruster wrote: Cao jin writes: There is TYPE_ICH9_AHCI definition in ahci.h when QOMify it, seems it is missed. Signed-off-by: Cao jin --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] [PATCH v2 26/74] pc: acpi: memhp: move MHPD._STA method into SSDT

2015-12-20 Thread Marcel Apfelbaum
On 12/16/2015 04:47 PM, Igor Mammedov wrote: Signed-off-by: Igor Mammedov --- v2: - add parentheses around ifctx block Suggested-by: Marcel Apfelbaum --- hw/acpi/memory_hotplug_acpi_table.c | 14 ++

[Qemu-devel] [PATCH] virtio-9p: use accessor to get thread_pool

2015-12-20 Thread Greg Kurz
The aio_context_new() function does not allocate a thread pool. This is deferred to the first call to the aio_get_thread_pool() accessor. It is hence forbidden to access the thread_pool field directly, as it may be NULL. The accessor *must* be used always. Fixes:

Re: [Qemu-devel] [PATCH 0/2] checkpatch: Fixing two cases of false positives in checkpatch.pl

2015-12-20 Thread Leonid Bloch
ping http://patchwork.ozlabs.org/patch/537763 http://patchwork.ozlabs.org/patch/537762 On Tue, Nov 24, 2015 at 4:43 PM, Leonid Bloch wrote: > ping > > http://patchwork.ozlabs.org/patch/537763 > http://patchwork.ozlabs.org/patch/537762 > > On Tue, Nov 10, 2015 at 11:48 AM,

Re: [Qemu-devel] [PATCH v2] Use macro instead of plain text

2015-12-20 Thread Cao jin
Hi Peter, Thanks for the explanation, it make me aware that why there are lots of "plain_text_for_device":) forget it please. On 12/18/2015 09:01 PM, Peter Maydell wrote: On 18 December 2015 at 12:52, Markus Armbruster wrote: Cao jin writes:

Re: [Qemu-devel] [PATCH 3/5] PXB: convert to realize()

2015-12-20 Thread Marcel Apfelbaum
Hi, On 12/18/2015 01:03 PM, Cao jin wrote: Signed-off-by: Cao jin --- hw/pci-bridge/pci_expander_bridge.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/hw/pci-bridge/pci_expander_bridge.c

Re: [Qemu-devel] [PATCH 3/5] PXB: convert to realize()

2015-12-20 Thread Marcel Apfelbaum
On 12/20/2015 12:48 PM, Cao jin wrote: Hi, On 12/20/2015 06:22 PM, Marcel Apfelbaum wrote: Hi, On 12/18/2015 01:03 PM, Cao jin wrote: Signed-off-by: Cao jin --- hw/pci-bridge/pci_expander_bridge.c | 24 ++-- 1 file changed, 14 insertions(+),

Re: [Qemu-devel] [PATCH 3/5] PXB: convert to realize()

2015-12-20 Thread Cao jin
Hi On 12/19/2015 02:01 AM, Paolo Bonzini wrote: On 18/12/2015 12:03, Cao jin wrote: [...] + +err_register_bus: +object_unref(OBJECT(ds)); +object_unref(OBJECT(bds)); +object_unref(OBJECT(bus)); I think these should be object_unparent, not unref. But, it seems these 3

Re: [Qemu-devel] [PATCH 2/5] igd-passthrough-i440FX: convert to realize()

2015-12-20 Thread Cao jin
On 12/19/2015 02:37 AM, Eduardo Habkost wrote: On Fri, Dec 18, 2015 at 07:03:49PM +0800, Cao jin wrote: Signed-off-by: Cao jin --- hw/pci-host/piix.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/hw/pci-host/piix.c

[Qemu-devel] new barrier type for paravirt (was Re: [PATCH] virtio_ring: use smp_store_mb)

2015-12-20 Thread Michael S. Tsirkin
On Thu, Dec 17, 2015 at 03:39:10PM +0100, Peter Zijlstra wrote: > On Thu, Dec 17, 2015 at 04:33:44PM +0200, Michael S. Tsirkin wrote: > > On Thu, Dec 17, 2015 at 02:57:26PM +0100, Peter Zijlstra wrote: > > > > > > You could of course go fix that instead of mutilating things into > > > sort-of

Re: [Qemu-devel] [PATCH 3/5] PXB: convert to realize()

2015-12-20 Thread Cao jin
Hi, On 12/20/2015 06:22 PM, Marcel Apfelbaum wrote: Hi, On 12/18/2015 01:03 PM, Cao jin wrote: Signed-off-by: Cao jin --- hw/pci-bridge/pci_expander_bridge.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git

[Qemu-devel] [PATCH RFC] smp_store_mb should use smp_mb

2015-12-20 Thread Michael S. Tsirkin
On some architectures smp_store_mb() calls mb() which is stronger than implied by both the name and the documentation. smp_store_mb is only used by core kernel code at the moment, so we know no one mis-uses it for an MMIO barrier. Make it call smp_mb consistently before some arch-specific code

Re: [Qemu-devel] [Xen-devel] new barrier type for paravirt (was Re: [PATCH] virtio_ring: use smp_store_mb)

2015-12-20 Thread Michael S. Tsirkin
On Sun, Dec 20, 2015 at 08:59:44PM +0100, Peter Zijlstra wrote: > On Sun, Dec 20, 2015 at 05:07:19PM +, Andrew Cooper wrote: > > > > Very much +1 for fixing this. > > > > Those names would be fine, but they do add yet another set of options in > > an already-complicated area. > > > > An

Re: [Qemu-devel] [PATCH v2 26/74] pc: acpi: memhp: move MHPD._STA method into SSDT

2015-12-20 Thread Michael S. Tsirkin
On Wed, Dec 16, 2015 at 03:47:35PM +0100, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > v2: > - add parentheses around ifctx block >Suggested-by: Marcel Apfelbaum > --- > hw/acpi/memory_hotplug_acpi_table.c | 14 ++

Re: [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-12-20 Thread Kevin O'Connor
On Sun, Dec 20, 2015 at 09:49:54AM +, Gonglei (Arei) wrote: > > From: Kevin O'Connor [mailto:ke...@koconnor.net] > > Sent: Saturday, December 19, 2015 11:12 PM > > On Sat, Dec 19, 2015 at 12:03:15PM +, Gonglei (Arei) wrote: > > > Maybe the root cause is not NMI but INTR, so yield() can

Re: [Qemu-devel] [PATCH v3 2/4] target-tilegx: Add single floating point implementation

2015-12-20 Thread Chen Gang
After tried, I guess, this way below is incorrect: float64_to_float32() assumes the input 'd' is already a standard (packed) float64 variable. But in fact, it is not (e.g. the input from floatsisf2). And we have to still check TILEGX_F_CALC_CVT, for they are really two different format:

Re: [Qemu-devel] [Xen-devel] new barrier type for paravirt (was Re: [PATCH] virtio_ring: use smp_store_mb)

2015-12-20 Thread Andrew Cooper
On 20/12/15 09:25, Michael S. Tsirkin wrote: > On Thu, Dec 17, 2015 at 03:39:10PM +0100, Peter Zijlstra wrote: >> On Thu, Dec 17, 2015 at 04:33:44PM +0200, Michael S. Tsirkin wrote: >>> On Thu, Dec 17, 2015 at 02:57:26PM +0100, Peter Zijlstra wrote: You could of course go fix that instead of

Re: [Qemu-devel] [PATCH 02/10] hw/sd/sd.c: QOMify

2015-12-20 Thread Peter Maydell
On 19 December 2015 at 21:36, Peter Crosthwaite wrote: > On Fri, Dec 11, 2015 at 04:37:03PM +, Peter Maydell wrote: >> Turn the SD card into a QOM device. >> This conversion only changes the device itself; the various >> functions which are effectively methods on

Re: [Qemu-devel] [PATCH 04/10] hw/sd: Add QOM bus which SD cards plug in to

2015-12-20 Thread Peter Maydell
On 19 December 2015 at 21:38, Peter Crosthwaite wrote: > On Fri, Dec 11, 2015 at 04:37:05PM +, Peter Maydell wrote: >> +bool sdbus_get_inserted(SDBus *sdbus) >> +{ >> +SDState *card = get_card(sdbus); >> + >> +if (card) { >> +SDClass *sc =

Re: [Qemu-devel] [PATCH 05/10] hw/sd/sdhci.c: Update to use SDBus APIs

2015-12-20 Thread Peter Maydell
On 19 December 2015 at 21:39, Peter Crosthwaite wrote: > On Fri, Dec 11, 2015 at 04:37:06PM +, Peter Maydell wrote: >> +carddev = qdev_create(qdev_get_child_bus(dev, "sd-bus"), TYPE_SD); >> +qdev_prop_set_drive(carddev, "drive", blk, errp); >> +if

Re: [Qemu-devel] [PATCH 08/10] hw/sd/pxa2xx_mmci: Update to use new SDBus APIs

2015-12-20 Thread Peter Maydell
On 19 December 2015 at 21:42, Peter Crosthwaite wrote: > On Fri, Dec 11, 2015 at 04:37:09PM +, Peter Maydell wrote: >> Now the PXA2xx MMCI device is QOMified itself, we can >> update it to use the SDBus APIs to talk to the SD card. >> void

Re: [Qemu-devel] [PATCH 09/10] hw/sd/pxa2xx_mmci: Convert to VMStateDescription

2015-12-20 Thread Peter Maydell
On 19 December 2015 at 21:45, Peter Crosthwaite wrote: > On Fri, Dec 11, 2015 at 04:37:10PM +, Peter Maydell wrote: >> Convert the pxa2xx_mmci device from manual save/load >> functions to a VMStateDescription structure. >> >> This is a migration compatibility

Re: [Qemu-devel] [Xen-devel] new barrier type for paravirt (was Re: [PATCH] virtio_ring: use smp_store_mb)

2015-12-20 Thread Peter Zijlstra
On Sun, Dec 20, 2015 at 05:07:19PM +, Andrew Cooper wrote: > > Very much +1 for fixing this. > > Those names would be fine, but they do add yet another set of options in > an already-complicated area. > > An alternative might be to have the regular smp_{w,r,}mb() not revert > back to nops

Re: [Qemu-devel] [PATCH 04/10] hw/sd: Add QOM bus which SD cards plug in to

2015-12-20 Thread Peter Crosthwaite
On Sun, Dec 20, 2015 at 9:10 AM, Peter Maydell wrote: > On 19 December 2015 at 21:38, Peter Crosthwaite > wrote: >> On Fri, Dec 11, 2015 at 04:37:05PM +, Peter Maydell wrote: >>> +bool sdbus_get_inserted(SDBus *sdbus) >>> +{ >>> +