Avi Kivity | 1 Jan 2012 10:21
Picon
Favicon

Re: [ANNOUNCE] qemu-test: a set of tests scripts for QEMU

On 12/29/2011 11:10 PM, Peter Maydell wrote:

>
> > Even if that turns out to be the case, it's fine.  Better to
> > have a few good devices than dozens of bad ones.
>
> This is easier to say on the x86 side of the fence, since
> most of the devices you need are already in the codebase and
> nobody is going to throw them out again if tests don't get
> written for them :-)
>
> There are lots of things where I'd rather have a "tested by
> booting a guest OS" implementation than none at all (like audio
> support for the versatile/etc boards, which went in recently) or
> TrustZone support (not in yet but may be along later). At least
> then we have something that works for most people and something
> we can fix bugs in, rather than a gaping hole in capability.
>

We can have different criteria for different parts of the tree. 
Undesirable, but tradeoffs have to be made.

--

-- 
error compiling committee.c: too many arguments to function

Orit Wasserman | 1 Jan 2012 10:43
Picon
Favicon

Re: [PATCH 00/21][RFC] postcopy live migration

On 12/30/2011 12:39 AM, Anthony Liguori wrote:
> On 12/28/2011 07:25 PM, Isaku Yamahata wrote:
>> Intro
>> =====
>> This patch series implements postcopy live migration.[1]
>> As discussed at KVM forum 2011, dedicated character device is used for
>> distributed shared memory between migration source and destination.
>> Now we can discuss/benchmark/compare with precopy. I believe there are
>> much rooms for improvement.
>>
>> [1] http://wiki.qemu.org/Features/PostCopyLiveMigration
>>
>>
>> Usage
>> =====
>> You need load umem character device on the host before starting migration.
>> Postcopy can be used for tcg and kvm accelarator. The implementation depend
>> on only linux umem character device. But the driver dependent code is split
>> into a file.
>> I tested only host page size == guest page size case, but the implementation
>> allows host page size != guest page size case.
>>
>> The following options are added with this patch series.
>> - incoming part
>>    command line options
>>    -postcopy [-postcopy-flags<flags>]
>>    where flags is for changing behavior for benchmark/debugging
>>    Currently the following flags are available
>>    0: default
>>    1: enable touching page request
(Continue reading)

Dor Laor | 1 Jan 2012 10:52
Picon
Favicon

Re: [PATCH 00/21][RFC] postcopy live migration

On 12/30/2011 12:39 AM, Anthony Liguori wrote:
> On 12/28/2011 07:25 PM, Isaku Yamahata wrote:
>> Intro
>> =====
>> This patch series implements postcopy live migration.[1]
>> As discussed at KVM forum 2011, dedicated character device is used for
>> distributed shared memory between migration source and destination.
>> Now we can discuss/benchmark/compare with precopy. I believe there are
>> much rooms for improvement.
>>
>> [1] http://wiki.qemu.org/Features/PostCopyLiveMigration
>>
>>
>> Usage
>> =====
>> You need load umem character device on the host before starting
>> migration.
>> Postcopy can be used for tcg and kvm accelarator. The implementation
>> depend
>> on only linux umem character device. But the driver dependent code is
>> split
>> into a file.
>> I tested only host page size == guest page size case, but the
>> implementation
>> allows host page size != guest page size case.
>>
>> The following options are added with this patch series.
>> - incoming part
>> command line options
>> -postcopy [-postcopy-flags<flags>]
(Continue reading)

Dor Laor | 1 Jan 2012 11:16
Picon
Favicon

Re: Better qemu/kvm defaults (was Re: [RFC PATCH 0/4] Gang scheduling in CFS)

On 12/29/2011 06:16 PM, Anthony Liguori wrote:
> On 12/29/2011 10:07 AM, Dor Laor wrote:
>> On 12/26/2011 11:05 AM, Avi Kivity wrote:
>>> On 12/26/2011 05:14 AM, Nikunj A Dadhania wrote:
>>>>>
>>>>> btw you can get an additional speedup by enabling x2apic, for
>>>>> default_send_IPI_mask_logical().
>>>>>
>>>> In the host?
>>>>
>>>
>>> In the host, for the guest:
>>>
>>> qemu -cpu ...,+x2apic
>>>
>>
>> It seems to me that we should improve our default flags.
>> So many times users fail to submit the proper huge command-line
>> options that we
>> require. Honestly, we can't blame them, there are so many flags and so
>> many use
>> cases its just too hard to get it right for humans.
>>
>> I propose a basic idea and folks are welcome to discuss it:
>>
>> 1. Improve qemu/kvm defaults
>> Break the current backward compatibility (but add a --default-
>> backward-compat-mode) and set better values for:
>> - rtc slew time
>
(Continue reading)

Michael S. Tsirkin | 1 Jan 2012 12:45
Picon
Favicon

Re: Compiling without python?

On Fri, Dec 30, 2011 at 11:36:53PM +0100, Sebastian Herbszt wrote:
> Sebastian Herbszt wrote:
> >Is it still possible to compile without python?
> >
> >python /v1.0-267-gda5361c/scripts/qapi-commands.py -m -o .
> >/bin/sh: python: command not found
> >make: *** [qmp-commands.h] Error 127
> >
> >Sebastian
> 
> Care to answer?
> 
> Thanks,
> Sebastian

Probably not. I think configure should check for python.

--

-- 
MST

Avi Kivity | 1 Jan 2012 15:53
Picon
Favicon

Re: [PATCH 1/4] rtc: fix 12-hour mode

On 11/21/2011 08:00 PM, Paolo Bonzini wrote:
> Hours in 12-hour mode are in the 1-12 range, not 0-11.
>
>  <at>  <at>  -320,7 +324,8  <at>  <at>  static void rtc_copy_date(RTCState *s)
>          s->cmos_data[RTC_HOURS] = rtc_to_bcd(s, tm->tm_hour);
>      } else {
>          /* 12 hour format */
> -        s->cmos_data[RTC_HOURS] = rtc_to_bcd(s, tm->tm_hour % 12);
> +        int h = (tm->tm_hour % 12) ? tm->tm_hour % 12 : 12;
> +        s->cmos_data[RTC_HOURS] = rtc_to_bcd(s, h);
>          if (tm->tm_hour >= 12)
>              s->cmos_data[RTC_HOURS] |= 0x80;
>      }

Nitpick, don't update patch on this account:

I dislike seeing int-to-bool conversion on anything that is not a
true/false or count value.  Things like if (has_some_property) or if
(!nr_items) read well and are easily understood.  But here, you're not
checking for "are there any tm_hours, if yes, use them, if not, use
12".  You're testing against the value 0 which has a special encoding in
12 hour mode.

The is usually manifested in

   if (!strcmp(a, b)) ...

strcmp() does not return a bool or a count, and in fact it reads exactly
the opposite of the intent: "if not string compare".  strcmp() returns
an enumeration, or perhaps a mapping of string trichotomy to integer
(Continue reading)

Stefan Hajnoczi | 1 Jan 2012 17:56
Picon
Gravatar

Re: [PATCH v6] block:add-cow file format

On Sat, Dec 31, 2011 at 9:17 AM, Dong Xu Wang
<wdongxu <at> linux.vnet.ibm.com> wrote:
> On Fri, Dec 30, 2011 at 22:09, Stefan Hajnoczi <stefanha <at> gmail.com> wrote:
>> On Thu, Dec 29, 2011 at 05:36:59PM +0800, Dong Xu Wang wrote:
>> > +    ret = bdrv_file_open(&backing_bs, bs->backing_file, 0);
>> > +    if (ret < 0) {
>> > +        return ret;
>> > +    }
>> > +    bdrv_delete(backing_bs);
>>
>> What does this do?  (It leaks s->bitmap when it fails.)
>
>
> I wanna make sure backing_file exists while opening.

block.c:bdrv_open() opens the backing file after .bdrv_open() has
returned.  It fails if the backing file does not exist.  There's no
need to duplicate this.

>> > +    s->image_hd = bdrv_new("");
>> > +
>> > +    if (path_has_protocol(s->image_file)) {
>> > +        pstrcpy(image_filename, sizeof(image_filename),
>> > +                s->image_file);
>> > +    } else {
>> > +        path_combine(image_filename, sizeof(image_filename),
>> > +                     bs->filename, s->image_file);
>> > +    }
>> > +
>> > +    image_drv = bdrv_find_format("raw");
(Continue reading)

Avi Kivity | 1 Jan 2012 18:23
Picon
Favicon

[PATCH] Fix wrong region_offset when overlaying a page with another

cpu_register_physical_memory_log() does not update region_offset
if a page was previously registered for the same address.  This
could cause mmio accesses going to the wrong place, by using the
old region_offset.

Signed-off-by: Avi Kivity <avi <at> redhat.com>
---

Once qemu-test is merged, remind me to post a testlet for this.

 exec.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/exec.c b/exec.c
index 8a3f621..c366835 100644
--- a/exec.c
+++ b/exec.c
 <at>  <at>  -2542,6 +2542,7  <at>  <at>  void cpu_register_physical_memory_log(target_phys_addr_t start_addr,
                 p->region_offset = 0;
             } else {
                 p->phys_offset = phys_offset;
+                p->region_offset = region_offset;
                 if ((phys_offset & ~TARGET_PAGE_MASK) <= IO_MEM_ROM ||
                     (phys_offset & IO_MEM_ROMD))
                     phys_offset += TARGET_PAGE_SIZE;
--

-- 
1.7.7.1

Paolo Bonzini | 1 Jan 2012 20:53
Picon
Favicon
Gravatar

Re: [PATCH 1/4] rtc: fix 12-hour mode

On 01/01/2012 03:53 PM, Avi Kivity wrote:
> On 11/21/2011 08:00 PM, Paolo Bonzini wrote:
>> Hours in 12-hour mode are in the 1-12 range, not 0-11.
>>
>>  <at>  <at>  -320,7 +324,8  <at>  <at>  static void rtc_copy_date(RTCState *s)
>>           s->cmos_data[RTC_HOURS] = rtc_to_bcd(s, tm->tm_hour);
>>       } else {
>>           /* 12 hour format */
>> -        s->cmos_data[RTC_HOURS] = rtc_to_bcd(s, tm->tm_hour % 12);
>> +        int h = (tm->tm_hour % 12) ? tm->tm_hour % 12 : 12;
>> +        s->cmos_data[RTC_HOURS] = rtc_to_bcd(s, h);
>>           if (tm->tm_hour>= 12)
>>               s->cmos_data[RTC_HOURS] |= 0x80;
>>       }
>
> Nitpick, don't update patch on this account:
>
> I dislike seeing int-to-bool conversion on anything that is not a
> true/false or count value.  Things like if (has_some_property) or if
> (!nr_items) read well and are easily understood.  But here, you're not
> checking for "are there any tm_hours, if yes, use them, if not, use
> 12".  You're testing against the value 0 which has a special encoding in
> 12 hour mode.
>
> The is usually manifested in
>
>     if (!strcmp(a, b)) ...
>
> strcmp() does not return a bool or a count, and in fact it reads exactly
> the opposite of the intent: "if not string compare".  strcmp() returns
(Continue reading)

Paolo Bonzini | 1 Jan 2012 22:45
Picon
Favicon
Gravatar

Re: [PATCH 4/9] virtio-9p: remove PCI dependencies from hw/9pfs/

On 11/29/2011 02:12 PM, Michael S. Tsirkin wrote:
> On Tue, Nov 29, 2011 at 09:38:43AM +0100, Paolo Bonzini wrote:
>> On 11/28/2011 07:46 PM, Michael S. Tsirkin wrote:
>>>>>   +#ifdef CONFIG_LINUX
>>>>>   +static int virtio_9p_init_pci(PCIDevice *pci_dev)
>>>>>   +{
>>>>>   +    VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
>>>>>   +    VirtIODevice *vdev;
>>>>>   +
>>>>>   +    vdev = virtio_9p_init(&pci_dev->qdev,&proxy->fsconf);
>>>>>   +    vdev->nvectors = proxy->nvectors;
>>>>>   +    virtio_init_pci(proxy, vdev);
>>>>>   +    /* make the actual value visible */
>>>>>   +    proxy->nvectors = vdev->nvectors;
>>>>>   +    return 0;
>>>>>   +}
>>>>>   +#endif
>>>>>   +
>>> This ifdef looks wrong to me - is there no way 9p can thinkably
>>> work on non-linux hosts? If yes, we should have a separate config
>>> entry for 9p, configure script can make it
>>> conditional on linux host.
>>
>> I think it was true in the beginning, but more recent versions
>> should only depend on CONFIG_POSIX.  I will set up FreeBSD and come
>> back.
>>
>> Paolo
>
> It might be easier to add CONFIG_VIRTIO_9P. That won't hurt in any case.
(Continue reading)


Gmane