lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 12 Dec 2019 13:37:43 +0000
From:   Tianyu Lan <Tianyu.Lan@...rosoft.com>
To:     vkuznets <vkuznets@...hat.com>,
        "lantianyu1986@...il.com" <lantianyu1986@...il.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "sashal@...nel.org" <sashal@...nel.org>,
        Michael Kelley <mikelley@...rosoft.com>
CC:     "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "eric.devolder@...cle.com" <eric.devolder@...cle.com>
Subject: RE: [EXTERNAL] Re: [RFC PATCH 4/4] x86/Hyper-V: Add memory hot remove
 function


> From: Vitaly Kuznetsov <vkuznets@...hat.com>
> 
> > From: Tianyu Lan <Tianyu.Lan@...rosoft.com>
> >
> > @@ -376,6 +391,27 @@ struct dm_hot_add_response {
> >  	__u32 result;
> >  } __packed;
> >
> > +struct dm_hot_remove {
> > +	struct dm_header hdr;
> > +	__u32 virtual_node;
> > +	__u32 page_count;
> > +	__u32 qos_flags;
> > +	__u32 reservedZ;
> > +} __packed;
> > +
> > +struct dm_hot_remove_response {
> > +	struct dm_header hdr;
> > +	__u32 result;
> > +	__u32 range_count;
> > +	__u64 more_pages:1;
> > +	__u64 reservedz:63;
> > +	union dm_mem_page_range range_array[]; } __packed;
> > +
> > +#define DM_REMOVE_QOS_LARGE	 (1 << 0)
> > +#define DM_REMOVE_QOS_LOCAL	 (1 << 1)
> > +#define DM_REMOVE_QoS_MASK       (0x3)
> 
> Capitalize 'QoS' to make it match previous two lines please.
> 

Yes, Will fix it.

> > +
> >  /*
> >   * Types of information sent from host to the guest.
> >   */
> > @@ -457,6 +493,13 @@ struct hot_add_wrk {
> >  	struct work_struct wrk;
> >  };
> >
> > +struct hot_remove_wrk {
> > +	__u32 virtual_node;
> > +	__u32 page_count;
> > +	__u32 qos_flags;
> > +	struct work_struct wrk;
> > +};
> > +
> >  static bool hot_add = true;
> >  static bool do_hot_add;
> >  /*
> > @@ -489,6 +532,7 @@ enum hv_dm_state {
> >  	DM_BALLOON_UP,
> >  	DM_BALLOON_DOWN,
> >  	DM_HOT_ADD,
> > +	DM_HOT_REMOVE,
> >  	DM_INIT_ERROR
> >  };
> >
> > @@ -515,11 +559,13 @@ struct hv_dynmem_device {
> >  	 * State to manage the ballooning (up) operation.
> >  	 */
> >  	struct balloon_state balloon_wrk;
> > +	struct balloon_state unballoon_wrk;
> >
> >  	/*
> >  	 * State to execute the "hot-add" operation.
> 
> This comment is stale now.
> 

Will update. Thanks.

> >  	 */
> >  	struct hot_add_wrk ha_wrk;
> > +	struct hot_remove_wrk hr_wrk;
> 
> Do we actually want to work struct and all the problems with their
> serialization? Can we get away with one?

I think it's possible to just use one work to handle  all kind of msgs
with a work struct which contains parameters for all dm msgs and identify
the msg type in the work callback function. 


 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ