* Re: [PATCH] libdvbv5: more fixes in the T2 delivery descriptor handler
From: Nikolaus Schulz @ 2013-12-19 2:37 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, Nikolaus Schulz
In-Reply-To: <20131218104931.743fc6d3@samsung.com>
Hi Mauro,
I didn't have the time yet to look at your comments and that patch
again, but:
Please note that my email address <schulz@macnetix.de> is shut down as
of today[1].
Please use my alternate address, <ns@htonl.de>, for any further replies
or followups.
Maybe Patchwork[2] should also be updated accordingly?
Thanks,
Nikolaus
[1] I don't know if the local admin will disable the old email address
<schulz@macnetix.de> in time, but I definitely will no longer read
messages sent to it, from now on.
[2] https://patchwork.linuxtv.org/patch/20943/
^ permalink raw reply
* Re: [PATCH] use initmpfs even if there's root= cmdline
From: Dave Young @ 2013-12-19 2:35 UTC (permalink / raw)
To: Rob Landley; +Cc: akpm, gregkh, grant.likely, sebastian.capella, linux-kernel
In-Reply-To: <52B1E0A2.2030202@landley.net>
On Wed, Dec 18, 2013 at 11:51:30AM -0600, Rob Landley wrote:
>
>
> On 12/12/13 20:38, Dave Young wrote:
> >On 12/12/13 at 05:25pm, Dave Young wrote:
> >>
> >>Current code use ramfs instead of tmpfs for stub when root= defined.
> >>
> >>But for real use case with initramfs, usually there's like cmdline like
> >>root=UUID=$UUID the root dev is the real device. For that case we have
> >>no way to use initmpfs, thus this patch removes the limitation so tmpfs
> >>can benefit more people.
>
> The reason I did that was if you specify a root= then you don't want
> to _stay_ on rootfs. You specify root= so either the kernel does
> switch_root for you, or so rootfs does a swich_root at the end.
>
> The point of initmpfs is that when rootfs _is_ the "real" root
> device, it can benefit from being tmpfs. When you're just goign to
> switch to a different root device, tmpfs doesn't make much
> difference.
The reason make sense to most of users. Thanks for the info.
For Fedora kdump initramfs there's different requirement though, we do the
vmcore capturing in ramfs with root=, the root= is not necessay in most of
the cases because we will reboot immediately after vmcore capturing finish.
There's one potential exception is that we could switch to real root in
case of capturing failure. Another thing is we use dracut to create initramfs
and dracut has a limitation that root= is a must-have param.
>
> >Discussed with Vivek Goyal about the kdump use case, I missed one thing that
> >tmpfs has default size limit though we can tune it.
> >
> >So I will think more about it, will address this later, please ignore this
> >patch.
>
> I have a vague todo item of feeding rootflags= through to initmpfs,
> but that's really intended to specify flags for root=. There isn't
> really an existing command line option to specify initramfs flags
> because ramfs doesn't care.
>
> It was one of those "only parse rootflags= for initmpfs when there's
> no root=" vs "create a new rdrootflags= ala rdinit= even though
> that's a subtly wrong name these days..." and it went on the todo
> list because neither approach was obviously superior.
>
> Happy to take suggestions and whip up a patch if this is
> inconveniencing somebody. :)
It would be great that initmpfs can use the whole memory on demand by default at
the same time we can avoid the deadlock mentioned about OOM handler.
For this purpose no need for extra flags? For other flags maybe "initmpfsflags="?
Thanks
Dave
^ permalink raw reply
* Re: [BUG][3.10.15] reading from /proc/sys/net/netfilter/nf_log/*
From: Gao feng @ 2013-12-19 2:09 UTC (permalink / raw)
To: Steven Rostedt, Florian Westphal
Cc: netdev, Luis Claudio R. Goncalves, Clark Williams
In-Reply-To: <20131218161139.2bb1538f@gandalf.local.home>
On 12/19/2013 05:11 AM, Steven Rostedt wrote:
> On Wed, 18 Dec 2013 22:08:17 +0100
> Florian Westphal <fw@strlen.de> wrote:
>
>> Steven Rostedt <rostedt@goodmis.org> wrote:
>>> On Mon, 16 Dec 2013 14:55:50 +0800
>>> Gao feng <gaofeng@cn.fujitsu.com> wrote:
>>>> On 12/14/2013 11:10 PM, Steven Rostedt wrote:
>> [..]
>>>>> BUG: unable to handle kernel paging request at ffffffffa06189f0
>>>>> IP: [<ffffffff814b7904>] nf_log_proc_dostring+0x94/0x1a0
>> [..]
>>
>>>>> And after the module-load test, it crashes when reading those files.
>>>>>
>>>>
>>>> Oops, I forgot to unset the nf_loggers of net namespace when unload module nfnetlink_log.
>>>> I will send a patch, please have a try.
>>>
>>> Hi Gao,
>>>
>>> I haven't seen a patch. Was one sent?
>>
>> Yes, submitted to netfilter-devel, see http://patchwork.ozlabs.org/patch/301485/
>
> Thanks, someone else pointed it to me on netdev list. I wasn't on the
> Cc, so I missed it.
>
Sorry, I thought git send-mail will send the patch to the Reported-by.
but now I know, it didn't. :(
^ permalink raw reply
* Re: [net-next/master PATCH] lib: fix compile warning in hashlib_init
From: Wanlong Gao @ 2013-12-19 1:36 UTC (permalink / raw)
To: Daniel Borkmann; +Cc: Fengguang Wu, davem, ffusco, kbuild-all, netdev, LKML
In-Reply-To: <52B24C92.8050201@iogearbox.net>
On 12/19/2013 09:32 AM, Daniel Borkmann wrote:
> On 12/19/2013 02:15 AM, Fengguang Wu wrote:
>> CC the list.
>>
>> On Thu, Dec 19, 2013 at 09:08:34AM +0800, Wanlong Gao wrote:
>>> /git/linux/lib/hash.c: In function 'hashlib_init':
>>> /git/linux/lib/hash.c:35:2: warning: passing argument 1 of 'setup_arch_fast_hash' from incompatible pointer type [enabled by default]
>>> /git/linux/include/asm-generic/hash.h:5:20: note: expected 'struct arch_hash_ops *' but argument is of type 'struct fast_hash_ops *'
>>>
>>> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
>>> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
>
> That's already in netdev patchwork:
>
> http://patchwork.ozlabs.org/patch/302908/
Nice, thank you.
Regards,
Wanlong Gao
>
> Thanks !
>
^ permalink raw reply
* [PATCH] audit: fix build error when disable audit
From: Gao feng @ 2013-12-19 2:34 UTC (permalink / raw)
To: linux-audit; +Cc: linux-kernel, Gao feng
kernel/capability.c: In function ‘SYSC_capset’:
kernel/capability.c:280:2: warning: passing argument 1 of ‘audit_log_capset’ makes integer from pointer without a cast [enabled by default]
audit_log_capset(new, current_cred());
^
In file included from kernel/capability.c:10:0:
include/linux/audit.h:400:20: note: expected ‘pid_t’ but argument is of type ‘struct cred *’
static inline void audit_log_capset(pid_t pid, const struct cred *new,
^
kernel/capability.c:280:2: error: too few arguments to function ‘audit_log_capset’
audit_log_capset(new, current_cred());
^
In file included from kernel/capability.c:10:0:
include/linux/audit.h:400:20: note: declared here
static inline void audit_log_capset(pid_t pid, const struct cred *new,
^
make[1]: *** [kernel/capability.o] Error 1
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
---
include/linux/audit.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/audit.h b/include/linux/audit.h
index b4d5160..6976219 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -397,8 +397,8 @@ static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
{
return 0;
}
-static inline void audit_log_capset(pid_t pid, const struct cred *new,
- const struct cred *old)
+static inline void audit_log_capset(const struct cred *new,
+ const struct cred *old)
{ }
static inline void audit_mmap_fd(int fd, int flags)
{ }
--
1.8.3.1
^ permalink raw reply related
* Re: [RFC][PATCH v1] ASoC: fsl_ssi: Add DAI master mode support for SSI on i.MX series
From: Nicolin Chen @ 2013-12-19 2:14 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, lgirdwood, tiwai, timur, perex, linuxppc-dev
In-Reply-To: <20131218185952.GM31886@sirena.org.uk>
On Wed, Dec 18, 2013 at 06:59:52PM +0000, Mark Brown wrote:
> On Thu, Dec 12, 2013 at 06:44:45PM +0800, Nicolin Chen wrote:
>
> > +/**
> > + * fsl_ssi_set_dai_tdm_slot - set TDM slot number
> > + *
> > + * Note: This function can be only called when using SSI as DAI master
> > + */
> > +static int fsl_ssi_set_dai_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
> > + u32 rx_mask, int slots, int slot_width)
> > +{
> > + struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(cpu_dai);
> > + struct ccsr_ssi __iomem *ssi = ssi_private->ssi;
> > + u32 val;
>
> I'm a bit concernred about what this is for and why it's required - is
> it something that machine drivers have to call and if it is shouldn't
> the driver be defaulting to a sensible configuration?
SSI can control how many slots to generate and which slot to send data. Yes,
the normal case, which should be defaulting to normal two slots I2S case, can
be configured by SSI driver itself as you mentioned. I'll add it to startup().
Then only those machine drivers using multiple slots (>2) need to call it.
Thank you for the comments.
Nicolin Chen
^ permalink raw reply
* Re: [RFC][PATCH v1] ASoC: fsl_ssi: Add DAI master mode support for SSI on i.MX series
From: Nicolin Chen @ 2013-12-19 2:14 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, lgirdwood, tiwai, timur, linuxppc-dev
In-Reply-To: <20131218185952.GM31886@sirena.org.uk>
On Wed, Dec 18, 2013 at 06:59:52PM +0000, Mark Brown wrote:
> On Thu, Dec 12, 2013 at 06:44:45PM +0800, Nicolin Chen wrote:
>
> > +/**
> > + * fsl_ssi_set_dai_tdm_slot - set TDM slot number
> > + *
> > + * Note: This function can be only called when using SSI as DAI master
> > + */
> > +static int fsl_ssi_set_dai_tdm_slot(struct snd_soc_dai *cpu_dai, u32 tx_mask,
> > + u32 rx_mask, int slots, int slot_width)
> > +{
> > + struct fsl_ssi_private *ssi_private = snd_soc_dai_get_drvdata(cpu_dai);
> > + struct ccsr_ssi __iomem *ssi = ssi_private->ssi;
> > + u32 val;
>
> I'm a bit concernred about what this is for and why it's required - is
> it something that machine drivers have to call and if it is shouldn't
> the driver be defaulting to a sensible configuration?
SSI can control how many slots to generate and which slot to send data. Yes,
the normal case, which should be defaulting to normal two slots I2S case, can
be configured by SSI driver itself as you mentioned. I'll add it to startup().
Then only those machine drivers using multiple slots (>2) need to call it.
Thank you for the comments.
Nicolin Chen
^ permalink raw reply
* Re: [Qemu-devel] [PATCH v3 4/4] ioapic: QOM'ify ioapic
From: Chen Fan @ 2013-12-19 2:28 UTC (permalink / raw)
To: Andreas Färber
Cc: xiaoqiang zhao, Paolo Bonzini, qemu-devel, Anthony Liguori
In-Reply-To: <52B1E385.4030303@suse.de>
On Wed, 2013-12-18 at 19:03 +0100, Andreas Färber wrote:
> Am 05.11.2013 11:16, schrieb xiaoqiang zhao:
> > changes:
> > 1. use type constant for kvm_ioapic and ioapic
> > 2. convert 'init' to QOM's 'realize' for ioapic and kvm_ioapic
> > For QOM'ify, I move variable 'ioapic_no' from static to global.
> > Then we can drop the 'instance_no' argument. Now, it's child
> > that increase 'ioapic_no' counter.
> >
> > Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
> > ---
> > hw/i386/kvm/ioapic.c | 15 +++++++++------
> > hw/intc/ioapic.c | 19 +++++++++++++------
> > hw/intc/ioapic_common.c | 13 ++++++++++---
> > include/hw/i386/ioapic_internal.h | 3 ++-
> > 4 files changed, 34 insertions(+), 16 deletions(-)
> >
> > diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c
> > index 772a712..36f7de2 100644
> > --- a/hw/i386/kvm/ioapic.c
> > +++ b/hw/i386/kvm/ioapic.c
> > @@ -15,6 +15,8 @@
> > #include "hw/i386/apic_internal.h"
> > #include "sysemu/kvm.h"
> >
> > +#define TYPE_KVM_IOAPIC "kvm-ioapic"
> > +
> > /* PC Utility function */
> > void kvm_pc_setup_irq_routing(bool pci_enabled)
> > {
> > @@ -127,12 +129,12 @@ static void kvm_ioapic_set_irq(void *opaque, int irq, int level)
> > apic_report_irq_delivered(delivered);
> > }
> >
> > -static void kvm_ioapic_init(IOAPICCommonState *s, int instance_no)
> > +static void kvm_ioapic_realize(DeviceState *dev, Error **errp)
> > {
> > - DeviceState *dev = DEVICE(s);
> > -
> > - memory_region_init_reservation(&s->io_memory, NULL, "kvm-ioapic", 0x1000);
> > + IOAPICCommonState *s = IOAPIC_COMMON(dev);
> >
> > + memory_region_init_reservation(&s->io_memory, NULL,
> > + TYPE_KVM_IOAPIC, 0x1000);
> > qdev_init_gpio_in(dev, kvm_ioapic_set_irq, IOAPIC_NUM_PINS);
> > }
> >
> > @@ -143,10 +145,11 @@ static Property kvm_ioapic_properties[] = {
> >
> > static void kvm_ioapic_class_init(ObjectClass *klass, void *data)
> > {
> > +
> > IOAPICCommonClass *k = IOAPIC_COMMON_CLASS(klass);
> > DeviceClass *dc = DEVICE_CLASS(klass);
> >
> > - k->init = kvm_ioapic_init;
> > + k->realize = kvm_ioapic_realize;
> > k->pre_save = kvm_ioapic_get;
> > k->post_load = kvm_ioapic_put;
> > dc->reset = kvm_ioapic_reset;
> > @@ -154,7 +157,7 @@ static void kvm_ioapic_class_init(ObjectClass *klass, void *data)
> > }
> >
> > static const TypeInfo kvm_ioapic_info = {
> > - .name = "kvm-ioapic",
> > + .name = TYPE_KVM_IOAPIC,
> > .parent = TYPE_IOAPIC_COMMON,
> > .instance_size = sizeof(KVMIOAPICState),
> > .class_init = kvm_ioapic_class_init,
> > diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c
> > index 8842845..885f385 100644
> > --- a/hw/intc/ioapic.c
> > +++ b/hw/intc/ioapic.c
> > @@ -36,6 +36,10 @@
> >
> > static IOAPICCommonState *ioapics[MAX_IOAPICS];
> >
> > +#define TYPE_IOAPIC "ioapic"
> > +/* global variable from ioapic_common.c */
> > +extern int ioapic_no;
> > +
> > static void ioapic_service(IOAPICCommonState *s)
> > {
> > uint8_t i;
> > @@ -225,16 +229,19 @@ static const MemoryRegionOps ioapic_io_ops = {
> > .endianness = DEVICE_NATIVE_ENDIAN,
> > };
> >
> > -static void ioapic_init(IOAPICCommonState *s, int instance_no)
> > +static void ioapic_realize(DeviceState *dev, Error **errp)
> > {
> > - DeviceState *dev = DEVICE(s);
> > + IOAPICCommonState *s = IOAPIC_COMMON(dev);
> >
> > memory_region_init_io(&s->io_memory, OBJECT(s), &ioapic_io_ops, s,
> > - "ioapic", 0x1000);
> > + TYPE_IOAPIC, 0x1000);
> >
> > qdev_init_gpio_in(dev, ioapic_set_irq, IOAPIC_NUM_PINS);
> >
> > - ioapics[instance_no] = s;
> > + ioapics[ioapic_no] = s;
> > +
> > + /* increase the counter */
> > + ioapic_no++;
>
> This increment used to happen in common code before, now it's done for
> the non-KVM version only ...
Due to IOAPICS are not more then one, why did not we get rid of
ioapic_no and ioapics, to use one ioapics pointer instead of ioapics[] ?
Thanks,
Chen
>
> > }
> >
> > static void ioapic_class_init(ObjectClass *klass, void *data)
> > @@ -242,12 +249,12 @@ static void ioapic_class_init(ObjectClass *klass, void *data)
> > IOAPICCommonClass *k = IOAPIC_COMMON_CLASS(klass);
> > DeviceClass *dc = DEVICE_CLASS(klass);
> >
> > - k->init = ioapic_init;
> > + k->realize = ioapic_realize;
> > dc->reset = ioapic_reset_common;
> > }
> >
> > static const TypeInfo ioapic_info = {
> > - .name = "ioapic",
> > + .name = TYPE_IOAPIC,
> > .parent = TYPE_IOAPIC_COMMON,
> > .instance_size = sizeof(IOAPICCommonState),
> > .class_init = ioapic_class_init,
> > diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c
> > index e55c6d1..aac0402 100644
> > --- a/hw/intc/ioapic_common.c
> > +++ b/hw/intc/ioapic_common.c
> > @@ -23,6 +23,14 @@
> > #include "hw/i386/ioapic_internal.h"
> > #include "hw/sysbus.h"
> >
> > +/* ioapic_no count start from 0 to MAX_IOAPICS,
> > + * remove as static variable from ioapic_common_init.
> > + * now as a global variable, let child to increase the counter
> > + * then we can drop the 'instance_no' argument
> > + * and convert to our QOM's realize function
> > + */
> > +int ioapic_no;
> > +
> > void ioapic_reset_common(DeviceState *dev)
> > {
> > IOAPICCommonState *s = IOAPIC_COMMON(dev);
> > @@ -61,7 +69,6 @@ static void ioapic_common_realize(DeviceState *dev, Error **errp)
> > {
> > IOAPICCommonState *s = IOAPIC_COMMON(dev);
> > IOAPICCommonClass *info;
> > - static int ioapic_no;
> >
> > if (ioapic_no >= MAX_IOAPICS) {
> > error_setg(errp, "Only %d ioapics allowed", MAX_IOAPICS);
>
> ... while the check for max. IOAPICs still happens in common code.
>
> Do we need to count KVM IOAPICs as well? Or can we consolidate this into
> the non-KVM version and keep it static there?
>
> Regards,
> Andreas
>
> > @@ -69,10 +76,10 @@ static void ioapic_common_realize(DeviceState *dev, Error **errp)
> > }
> >
> > info = IOAPIC_COMMON_GET_CLASS(s);
> > - info->init(s, ioapic_no);
> > + info->realize(dev, errp);
> >
> > sysbus_init_mmio(SYS_BUS_DEVICE(s), &s->io_memory);
> > - ioapic_no++;
> > +
> > }
> >
> > static const VMStateDescription vmstate_ioapic_common = {
> > diff --git a/include/hw/i386/ioapic_internal.h b/include/hw/i386/ioapic_internal.h
> > index 25576c8..cbe4744 100644
> > --- a/include/hw/i386/ioapic_internal.h
> > +++ b/include/hw/i386/ioapic_internal.h
> > @@ -83,7 +83,8 @@ typedef struct IOAPICCommonState IOAPICCommonState;
> >
> > typedef struct IOAPICCommonClass {
> > SysBusDeviceClass parent_class;
> > - void (*init)(IOAPICCommonState *s, int instance_no);
> > + /* QOM realize */
> > + DeviceRealize realize;
> > void (*pre_save)(IOAPICCommonState *s);
> > void (*post_load)(IOAPICCommonState *s);
> > } IOAPICCommonClass;
>
^ permalink raw reply
* HW accelerated support for setting skb->pkt_type?
From: Florian Fainelli @ 2013-12-19 2:29 UTC (permalink / raw)
To: netdev, Eric Dumazet, David Miller
Hi all,
I work with two Ethernet controllers which can tell on a per-packet
basis whether this is a broadcast, unicast or multicast, eventually
allowing me to bypass the initial checks done in eth_type_trans().
Is there any other hardware out there which supports that, and is
there any interest in optimizing that operation?
Thanks
--
Florian
^ permalink raw reply
* [PATCH V3 1/2] ARM: imx: add vddsoc/pu setpoint info into dts
From: Fabio Estevam @ 2013-12-19 2:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <112fab48e08c43749c0797328b1f1ee1@DM2PR03MB317.namprd03.prod.outlook.com>
On Thu, Dec 19, 2013 at 12:13 AM, Anson.Huang at freescale.com
<Anson.Huang@freescale.com> wrote:
> After re-consideration, I think below should be better:
> arm-supply: regulator node supplying arm.
> pu-supply: regulator node supplying pu.
> soc-supply: regulator node supplying soc.
Yes, this looks better.
Regards,
Fabio Estevam
^ permalink raw reply
* Re: [PATCH V3 1/2] ARM: imx: add vddsoc/pu setpoint info into dts
From: Fabio Estevam @ 2013-12-19 2:30 UTC (permalink / raw)
To: Anson.Huang@freescale.com
Cc: Shawn Guo, rjw@rjwysocki.net, Viresh Kumar,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org
In-Reply-To: <112fab48e08c43749c0797328b1f1ee1@DM2PR03MB317.namprd03.prod.outlook.com>
On Thu, Dec 19, 2013 at 12:13 AM, Anson.Huang@freescale.com
<Anson.Huang@freescale.com> wrote:
> After re-consideration, I think below should be better:
> arm-supply: regulator node supplying arm.
> pu-supply: regulator node supplying pu.
> soc-supply: regulator node supplying soc.
Yes, this looks better.
Regards,
Fabio Estevam
^ permalink raw reply
* [Qemu-devel] [RFC PATCH v3 6/6] qcow2: Add full image preallocation option
From: Hu Tao @ 2013-12-19 2:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Fam Zheng, Peter Lieven, hutao
In-Reply-To: <cover.1387419339.git.hutao@cn.fujitsu.com>
This adds a preallocation=full mode to qcow2 image creation, which
creates a non-sparse image file.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
block/qcow2.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index 487a595..3c41d4a 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1386,7 +1386,7 @@ static int qcow2_change_backing_file(BlockDriverState *bs,
return qcow2_update_header(bs);
}
-static int preallocate(BlockDriverState *bs)
+static int preallocate(BlockDriverState *bs, enum prealloc_mode mode)
{
uint64_t nb_sectors;
uint64_t offset;
@@ -1395,9 +1395,19 @@ static int preallocate(BlockDriverState *bs)
int ret;
QCowL2Meta *meta;
+ assert(mode != PREALLOC_OFF);
+
nb_sectors = bdrv_getlength(bs) >> 9;
offset = 0;
+ if (mode == PREALLOC_FULL) {
+ ret = bdrv_preallocate(bs->file, 0, bdrv_getlength(bs));
+ if (ret < 0) {
+ return ret;
+ }
+ }
+
+ /* allocate metadata */
while (nb_sectors) {
num = MIN(nb_sectors, INT_MAX >> 9);
ret = qcow2_alloc_cluster_offset(bs, offset, 0, num, &num,
@@ -1577,11 +1587,11 @@ static int qcow2_create2(const char *filename, int64_t total_size,
}
}
- /* And if we're supposed to preallocate metadata, do that now */
+ /* And if we're supposed to preallocate data, do that now */
if (prealloc) {
BDRVQcowState *s = bs->opaque;
qemu_co_mutex_lock(&s->lock);
- ret = preallocate(bs);
+ ret = preallocate(bs, prealloc);
qemu_co_mutex_unlock(&s->lock);
if (ret < 0) {
error_setg_errno(errp, -ret, "Could not preallocate metadata");
@@ -1638,6 +1648,8 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options,
prealloc = PREALLOC_OFF;
} else if (!strcmp(options->value.s, "metadata")) {
prealloc = PREALLOC_METADATA;
+ } else if (!strcmp(options->value.s, "full")) {
+ prealloc = PREALLOC_FULL;
} else {
error_setg(errp, "Invalid preallocation mode: '%s'",
options->value.s);
@@ -2229,7 +2241,7 @@ static QEMUOptionParameter qcow2_create_options[] = {
{
.name = BLOCK_OPT_PREALLOC,
.type = OPT_STRING,
- .help = "Preallocation mode (allowed values: off, metadata)"
+ .help = "Preallocation mode (allowed values: off, metadata, full)"
},
{
.name = BLOCK_OPT_LAZY_REFCOUNTS,
--
1.7.11.7
^ permalink raw reply related
* [Qemu-devel] [RFC PATCH v3 3/6] block/raw-posix: implement bdrv_preallocate
From: Hu Tao @ 2013-12-19 2:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Fam Zheng, Peter Lieven, hutao
In-Reply-To: <cover.1387419339.git.hutao@cn.fujitsu.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
block/raw-posix.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 10c6b34..19181f2 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -1160,6 +1160,39 @@ static int64_t raw_get_allocated_file_size(BlockDriverState *bs)
return (int64_t)st.st_blocks * 512;
}
+#ifdef __linux__
+static int raw_preallocate2(int fd, int64_t offset, int64_t length)
+{
+ int ret = -1;
+
+ ret = fallocate(fd, 0, offset, length);
+
+ /* fallback to posix_fallocate() if fallocate() is not supported */
+ if (ret < 0 && (errno == ENOSYS || errno == EOPNOTSUPP)) {
+ ret = posix_fallocate(fd, offset, length);
+ }
+
+ return ret;
+}
+#else
+static int raw_preallocate2(int fd, int64_t offset, int64_t length)
+{
+ return posix_fallocate(fd, offset, length);
+}
+#endif
+
+static int raw_preallocate(BlockDriverState *bs, int64_t offset, int64_t length)
+{
+ BDRVRawState *s = bs->opaque;
+ int64_t len = bdrv_getlength(bs);
+
+ if (offset + length < 0 || offset + length > len) {
+ return -EINVAL;
+ }
+
+ return raw_preallocate2(s->fd, offset, length);
+}
+
static int raw_create(const char *filename, QEMUOptionParameter *options,
Error **errp)
{
@@ -1356,6 +1389,7 @@ static BlockDriver bdrv_file = {
.bdrv_close = raw_close,
.bdrv_create = raw_create,
.bdrv_has_zero_init = bdrv_has_zero_init_1,
+ .bdrv_preallocate = raw_preallocate,
.bdrv_co_get_block_status = raw_co_get_block_status,
.bdrv_co_write_zeroes = raw_co_write_zeroes,
--
1.7.11.7
^ permalink raw reply related
* [Qemu-devel] [RFC PATCH v3 5/6] qcow2: implement bdrv_preallocate
From: Hu Tao @ 2013-12-19 2:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Fam Zheng, Peter Lieven, hutao
In-Reply-To: <cover.1387419339.git.hutao@cn.fujitsu.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
block/qcow2.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/block/qcow2.c b/block/qcow2.c
index 32cb39f..487a595 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -2188,6 +2188,12 @@ static int qcow2_amend_options(BlockDriverState *bs,
return 0;
}
+static int qcow2_preallocate(BlockDriverState *bs, int64_t offset,
+ int64_t length)
+{
+ return bdrv_preallocate(bs->file, offset, length);
+}
+
static QEMUOptionParameter qcow2_create_options[] = {
{
.name = BLOCK_OPT_SIZE,
@@ -2242,6 +2248,7 @@ static BlockDriver bdrv_qcow2 = {
.bdrv_reopen_prepare = qcow2_reopen_prepare,
.bdrv_create = qcow2_create,
.bdrv_has_zero_init = bdrv_has_zero_init_1,
+ .bdrv_preallocate = qcow2_preallocate,
.bdrv_co_get_block_status = qcow2_co_get_block_status,
.bdrv_set_key = qcow2_set_key,
.bdrv_make_empty = qcow2_make_empty,
--
1.7.11.7
^ permalink raw reply related
* [Qemu-devel] [RFC PATCH v3 2/6] block: add BlockDriver.bdrv_preallocate.
From: Hu Tao @ 2013-12-19 2:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Fam Zheng, Peter Lieven, hutao
In-Reply-To: <cover.1387419339.git.hutao@cn.fujitsu.com>
This field is used to preallocate disk space for block device.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
block.c | 13 +++++++++++++
include/block/block.h | 1 +
include/block/block_int.h | 3 +++
3 files changed, 17 insertions(+)
diff --git a/block.c b/block.c
index 64e7d22..b901587 100644
--- a/block.c
+++ b/block.c
@@ -3216,6 +3216,19 @@ bool bdrv_can_write_zeroes_with_unmap(BlockDriverState *bs)
return false;
}
+int bdrv_preallocate(BlockDriverState *bs, int64_t offset, int64_t length)
+{
+ if (bs->backing_hd) {
+ return -ENOTSUP;
+ }
+
+ if (bs->drv->bdrv_preallocate) {
+ return bs->drv->bdrv_preallocate(bs, offset, length);
+ }
+
+ return -ENOTSUP;
+}
+
typedef struct BdrvCoGetBlockStatusData {
BlockDriverState *bs;
BlockDriverState *base;
diff --git a/include/block/block.h b/include/block/block.h
index 3732f25..bc1f277 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -349,6 +349,7 @@ int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors);
int bdrv_co_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors);
int bdrv_has_zero_init_1(BlockDriverState *bs);
int bdrv_has_zero_init(BlockDriverState *bs);
+int bdrv_preallocate(BlockDriverState *bs, int64_t offset, int64_t length);
bool bdrv_unallocated_blocks_are_zero(BlockDriverState *bs);
bool bdrv_can_write_zeroes_with_unmap(BlockDriverState *bs);
int64_t bdrv_get_block_status(BlockDriverState *bs, int64_t sector_num,
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 8b132d7..5bb1005 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -232,6 +232,9 @@ struct BlockDriver {
*/
int (*bdrv_has_zero_init)(BlockDriverState *bs);
+ int (*bdrv_preallocate)(BlockDriverState *bs, int64_t offset,
+ int64_t length);
+
QLIST_ENTRY(BlockDriver) list;
};
--
1.7.11.7
^ permalink raw reply related
* [Qemu-devel] [RFC PATCH v3 4/6] raw-posix: Add full image preallocation option
From: Hu Tao @ 2013-12-19 2:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Fam Zheng, Peter Lieven, hutao
In-Reply-To: <cover.1387419339.git.hutao@cn.fujitsu.com>
This patch adds a new option preallocation for raw format, and implements
full preallocation.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
block/raw-posix.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 19181f2..e09e170 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -1199,11 +1199,22 @@ static int raw_create(const char *filename, QEMUOptionParameter *options,
int fd;
int result = 0;
int64_t total_size = 0;
+ int prealloc = PREALLOC_OFF;
/* Read out options */
while (options && options->name) {
if (!strcmp(options->name, BLOCK_OPT_SIZE)) {
total_size = options->value.n / BDRV_SECTOR_SIZE;
+ } else if (!strcmp(options->name, BLOCK_OPT_PREALLOC)) {
+ if (!options->value.s || !strcmp(options->value.s, "off")) {
+ prealloc = PREALLOC_OFF;
+ } else if (!strcmp(options->value.s, "full")) {
+ prealloc = PREALLOC_FULL;
+ } else {
+ error_setg(errp, "Invalid preallocation mode: '%s'",
+ options->value.s);
+ return -EINVAL;
+ }
}
options++;
}
@@ -1218,6 +1229,12 @@ static int raw_create(const char *filename, QEMUOptionParameter *options,
result = -errno;
error_setg_errno(errp, -result, "Could not resize file");
}
+ if (prealloc == PREALLOC_FULL &&
+ raw_preallocate2(fd, 0, total_size * BDRV_SECTOR_SIZE) != 0) {
+ result = -errno;
+ error_setg_errno(errp, -result,
+ "Could not preallocate data for the new file");
+ }
if (qemu_close(fd) != 0) {
result = -errno;
error_setg_errno(errp, -result, "Could not close the new file");
@@ -1373,6 +1390,11 @@ static QEMUOptionParameter raw_create_options[] = {
.type = OPT_SIZE,
.help = "Virtual disk size"
},
+ {
+ .name = BLOCK_OPT_PREALLOC,
+ .type = OPT_STRING,
+ .help = "Preallocation mode (allowed values: off, full)"
+ },
{ NULL }
};
--
1.7.11.7
^ permalink raw reply related
* [Qemu-devel] [RFC PATCH v3 0/6] qemu-img: add preallocation=full
From: Hu Tao @ 2013-12-19 2:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Fam Zheng, Peter Lieven, hutao
This series implements full image preallocation to create a non-sparse image
file at creation time, both for raw and qcow2 format. The purpose is to avoid
performance deterioration of the guest cause by sparse image.
v3: - Fix comments to v2 by Fam.
- qcow2: first fallocate disk space, then allocate metadata. This avoids
the problem in v2 that bdrv_preallocate may clear all information in
metadata. This does not necessarily map all data clusters sequentially
but does keep information in metadata. Peter, is this acceptable?
Hu Tao (6):
block: introduce prealloc_mode
block: add BlockDriver.bdrv_preallocate.
block/raw-posix: implement bdrv_preallocate
raw-posix: Add full image preallocation option
qcow2: implement bdrv_preallocate
qcow2: Add full image preallocation option
block.c | 13 +++++++++++
block/qcow2.c | 33 ++++++++++++++++++++++------
block/raw-posix.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++
include/block/block.h | 7 ++++++
include/block/block_int.h | 3 +++
5 files changed, 105 insertions(+), 7 deletions(-)
--
1.7.11.7
^ permalink raw reply
* [Qemu-devel] [RFC PATCH v3 1/6] block: introduce prealloc_mode
From: Hu Tao @ 2013-12-19 2:27 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Fam Zheng, Peter Lieven, hutao
In-Reply-To: <cover.1387419339.git.hutao@cn.fujitsu.com>
This patch prepares for the subsequent patches.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
---
block/qcow2.c | 6 +++---
include/block/block.h | 6 ++++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index f29aa88..32cb39f 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1614,7 +1614,7 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options,
uint64_t sectors = 0;
int flags = 0;
size_t cluster_size = DEFAULT_CLUSTER_SIZE;
- int prealloc = 0;
+ int prealloc = PREALLOC_OFF;
int version = 3;
Error *local_err = NULL;
int ret;
@@ -1635,9 +1635,9 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options,
}
} else if (!strcmp(options->name, BLOCK_OPT_PREALLOC)) {
if (!options->value.s || !strcmp(options->value.s, "off")) {
- prealloc = 0;
+ prealloc = PREALLOC_OFF;
} else if (!strcmp(options->value.s, "metadata")) {
- prealloc = 1;
+ prealloc = PREALLOC_METADATA;
} else {
error_setg(errp, "Invalid preallocation mode: '%s'",
options->value.s);
diff --git a/include/block/block.h b/include/block/block.h
index 36efaea..3732f25 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -527,4 +527,10 @@ int bdrv_debug_remove_breakpoint(BlockDriverState *bs, const char *tag);
int bdrv_debug_resume(BlockDriverState *bs, const char *tag);
bool bdrv_debug_is_suspended(BlockDriverState *bs, const char *tag);
+enum prealloc_mode {
+ PREALLOC_OFF = 0,
+ PREALLOC_METADATA,
+ PREALLOC_FULL,
+};
+
#endif
--
1.7.11.7
^ permalink raw reply related
* Re: [RFC PATCH 07/10] Add new vmport code.
From: Don Slutz @ 2013-12-19 2:29 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: Keir Fraser, Ian Campbell, Stefano Stabellini, Ian Jackson,
Eddie Dong, Don Slutz, xen-devel, Jan Beulich, Jun Nakajima,
Boris Ostrovsky, Suravee Suthikulpanit
In-Reply-To: <20131217203621.GF25371@phenom.dumpdata.com>
On 12/17/13 15:36, Konrad Rzeszutek Wilk wrote:
> On Thu, Dec 12, 2013 at 02:15:15PM -0500, Don Slutz wrote:
>> From: Don Slutz <dslutz@verizon.com>
>>
>> enable vmport_flush call.
> I think this patch needs a bigger description of what it does!
I see that you agree with Jan. Looks like the description from an
intermediate patch during coding and development ended up here. Will
spend a lot of time writing some thing that will help understand this code.
[snip]
-Don Slutz
^ permalink raw reply
* imx6 power consumption
From: Anson.Huang at freescale.com @ 2013-12-19 2:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20131218113240.GK6691@S2101-09.ap.freescale.net>
Best Regards.
Anson huang ???
?
Freescale Semiconductor Shanghai
?????????192?A?2?
201203
Tel:021-28937058
>-----Original Message-----
>From: linux-arm-kernel [mailto:linux-arm-kernel-bounces at lists.infradead.org]
>On Behalf Of Shawn Guo
>Sent: Wednesday, December 18, 2013 7:33 PM
>To: Bj?rn Erik Nilsen
>Cc: linux-arm-kernel at lists.infradead.org
>Subject: Re: imx6 power consumption
>
>On Wed, Dec 18, 2013 at 12:12:05PM +0100, Bj?rn Erik Nilsen wrote:
>> As far as I can tell, commit e95dddb34c8 "ARM: imx: enable anatop
>> suspend/resume" is the common ancestor for mainline and freescale, and
>> from there pm-imx6q.c starts to diverge.
>>
>> I haven not looked at it in great detail yet, but it seems there are
>> not too many patches missing in mainline. Any idea why remaining
>> patches haven't been upstreamed?
>
>Probably because no one cares and would spend time to upstream these patches.
This root cause is we did NOT put the DSM code in IRAM and free DDR IO in DSM.
We have done this in our internal v3.10 kernel, so I will do the upstream soon,
Below is the DSM number of i.MX6Q SabreSD we got on v3.10 release:
VDDARM_IN(R27) 0mA at 0.97V
VDDSOC_IN(R21) 4.2 at 0.97V
DDR(R25) 14.8mA at 1.5V
VDDHIGH_IN + SNVS(SH17) 0.35mA at 2.98V, 0.9mA
Anson
>
>Shawn
>
>>
>> If it is just a matter of someone doing the work, what would be the
>> recommended approach?
>>
>>
>> Best regards,
>> Bj?rn Erik Nilsen
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
>
>_______________________________________________
>linux-arm-kernel mailing list
>linux-arm-kernel at lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply
* Re: [RFC PATCH 07/10] Add new vmport code.
From: Don Slutz @ 2013-12-19 2:25 UTC (permalink / raw)
To: Jan Beulich
Cc: Keir Fraser, Ian Campbell, Stefano Stabellini, Jun Nakajima,
Ian Jackson, Eddie Dong, Don Slutz, Suravee Suthikulpanit,
xen-devel, Boris Ostrovsky
In-Reply-To: <52AAF6A0020000780010CEFE@nat28.tlf.novell.com>
On 12/13/13 05:59, Jan Beulich wrote:
>>>> On 12.12.13 at 20:15, Don Slutz <dslutz@verizon.com> wrote:
>> From: Don Slutz <dslutz@verizon.com>
>>
>> enable vmport_flush call.
>>
>> Signed-off-by: Don Slutz <dslutz@verizon.com>
> Again - please be more verbose.
>
> And clean up the coding style before submitting.
>
> Jan
>
Will do.
-Don Slutz
^ permalink raw reply
* Re: [PATCH] powerpc: book3s: kvm: Use the saved dsisr and dar values
From: Paul Mackerras @ 2013-12-19 2:26 UTC (permalink / raw)
To: Alexander Graf
Cc: Aneesh Kumar K.V, Ben Herrenschmidt, linuxppc-dev, kvm-ppc,
kvm@vger.kernel.org mailing list
In-Reply-To: <0AB88010-F2B7-44A1-8FA9-2A40079706BB@suse.de>
On Wed, Dec 18, 2013 at 10:44:08PM +0100, Alexander Graf wrote:
>
> On 11.11.2013, at 15:02, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote:
>
> > From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
> >
> > Don't try to compute these values.
> >
> > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> > ---
> >
> > NOTE: I am not sure why we were originally computing dsisr and dar. So may be
> > we need a variant of this patch. But with this and the additional patch
> > "powerpc: book3s: PR: Enable Little Endian PR guest" I am able to get a Little Endian
> > PR guest to boot.
>
> It's quite easy to find out - git blame tells you all the history and points you to commit ca7f4203b.
>
> commit ca7f4203b9b66e12d0d9968ff7dfe781f3a9695a
> Author: Alexander Graf <agraf@suse.de>
> Date: Wed Mar 24 21:48:28 2010 +0100
>
> KVM: PPC: Implement alignment interrupt
>
> Mac OS X has some applications - namely the Finder - that require alignment
> interrupts to work properly. So we need to implement them.
>
> But the spec for 970 and 750 also looks different. While 750 requires the
> DSISR and DAR fields to reflect some instruction bits (DSISR) and the fault
> address (DAR), the 970 declares this as an optional feature. So we need
> to reconstruct DSISR and DAR manually.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> Signed-off-by: Avi Kivity <avi@redhat.com>
>
> Read this as "on 970, alignment interrupts don't give us DSISR and DAR of the faulting instruction" as otherwise I wouldn't have implemented it.
Although it's optional, all IBM POWER cpus, and as far as I know all
PowerPC cpus, set DAR on an alignment interrupt to the effective
address being accessed. You have a valid point regarding DSISR, but
it would be nice to skip the computations where either the host CPU
provides the bits, or the virtual CPU doesn't.
Paul.
^ permalink raw reply
* Re: [PATCH] powerpc: book3s: kvm: Use the saved dsisr and dar values
From: Paul Mackerras @ 2013-12-19 2:26 UTC (permalink / raw)
To: Alexander Graf
Cc: linuxppc-dev, Aneesh Kumar K.V, kvm-ppc,
kvm@vger.kernel.org mailing list
In-Reply-To: <0AB88010-F2B7-44A1-8FA9-2A40079706BB@suse.de>
On Wed, Dec 18, 2013 at 10:44:08PM +0100, Alexander Graf wrote:
>
> On 11.11.2013, at 15:02, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote:
>
> > From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
> >
> > Don't try to compute these values.
> >
> > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> > ---
> >
> > NOTE: I am not sure why we were originally computing dsisr and dar. So may be
> > we need a variant of this patch. But with this and the additional patch
> > "powerpc: book3s: PR: Enable Little Endian PR guest" I am able to get a Little Endian
> > PR guest to boot.
>
> It's quite easy to find out - git blame tells you all the history and points you to commit ca7f4203b.
>
> commit ca7f4203b9b66e12d0d9968ff7dfe781f3a9695a
> Author: Alexander Graf <agraf@suse.de>
> Date: Wed Mar 24 21:48:28 2010 +0100
>
> KVM: PPC: Implement alignment interrupt
>
> Mac OS X has some applications - namely the Finder - that require alignment
> interrupts to work properly. So we need to implement them.
>
> But the spec for 970 and 750 also looks different. While 750 requires the
> DSISR and DAR fields to reflect some instruction bits (DSISR) and the fault
> address (DAR), the 970 declares this as an optional feature. So we need
> to reconstruct DSISR and DAR manually.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> Signed-off-by: Avi Kivity <avi@redhat.com>
>
> Read this as "on 970, alignment interrupts don't give us DSISR and DAR of the faulting instruction" as otherwise I wouldn't have implemented it.
Although it's optional, all IBM POWER cpus, and as far as I know all
PowerPC cpus, set DAR on an alignment interrupt to the effective
address being accessed. You have a valid point regarding DSISR, but
it would be nice to skip the computations where either the host CPU
provides the bits, or the virtual CPU doesn't.
Paul.
^ permalink raw reply
* Re: [PATCH] powerpc: book3s: kvm: Use the saved dsisr and dar values
From: Paul Mackerras @ 2013-12-19 2:26 UTC (permalink / raw)
To: Alexander Graf
Cc: Aneesh Kumar K.V, Ben Herrenschmidt, linuxppc-dev, kvm-ppc,
kvm@vger.kernel.org mailing list
In-Reply-To: <0AB88010-F2B7-44A1-8FA9-2A40079706BB@suse.de>
On Wed, Dec 18, 2013 at 10:44:08PM +0100, Alexander Graf wrote:
>
> On 11.11.2013, at 15:02, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote:
>
> > From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
> >
> > Don't try to compute these values.
> >
> > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> > ---
> >
> > NOTE: I am not sure why we were originally computing dsisr and dar. So may be
> > we need a variant of this patch. But with this and the additional patch
> > "powerpc: book3s: PR: Enable Little Endian PR guest" I am able to get a Little Endian
> > PR guest to boot.
>
> It's quite easy to find out - git blame tells you all the history and points you to commit ca7f4203b.
>
> commit ca7f4203b9b66e12d0d9968ff7dfe781f3a9695a
> Author: Alexander Graf <agraf@suse.de>
> Date: Wed Mar 24 21:48:28 2010 +0100
>
> KVM: PPC: Implement alignment interrupt
>
> Mac OS X has some applications - namely the Finder - that require alignment
> interrupts to work properly. So we need to implement them.
>
> But the spec for 970 and 750 also looks different. While 750 requires the
> DSISR and DAR fields to reflect some instruction bits (DSISR) and the fault
> address (DAR), the 970 declares this as an optional feature. So we need
> to reconstruct DSISR and DAR manually.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> Signed-off-by: Avi Kivity <avi@redhat.com>
>
> Read this as "on 970, alignment interrupts don't give us DSISR and DAR of the faulting instruction" as otherwise I wouldn't have implemented it.
Although it's optional, all IBM POWER cpus, and as far as I know all
PowerPC cpus, set DAR on an alignment interrupt to the effective
address being accessed. You have a valid point regarding DSISR, but
it would be nice to skip the computations where either the host CPU
provides the bits, or the virtual CPU doesn't.
Paul.
^ permalink raw reply
* [PATCH net-next] netfilter: ipvs: remove the unused variable
From: Wang Weidong @ 2013-12-19 2:23 UTC (permalink / raw)
To: wensong, horms, ja, David Miller; +Cc: netdev
when I built the netfilter, I got that:
net/netfilter/ipvs/ip_vs_sync.c: In function sync_thread_master’:
net/netfilter/ipvs/ip_vs_sync.c:1640: warning: unused variable ‘ret’
Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
---
net/netfilter/ipvs/ip_vs_sync.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
index f63c238..d258125 100644
--- a/net/netfilter/ipvs/ip_vs_sync.c
+++ b/net/netfilter/ipvs/ip_vs_sync.c
@@ -1637,7 +1637,7 @@ static int sync_thread_master(void *data)
continue;
}
while (ip_vs_send_sync_msg(tinfo->sock, sb->mesg) < 0) {
- int ret = __wait_event_interruptible(*sk_sleep(sk),
+ __wait_event_interruptible(*sk_sleep(sk),
sock_writeable(sk) ||
kthread_should_stop());
if (unlikely(kthread_should_stop()))
--
1.7.12
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.